Skip to content

Commit

Permalink
chore: Release 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
malangfox committed Jun 23, 2022
1 parent 6e5ff78 commit 4c85687
Show file tree
Hide file tree
Showing 76 changed files with 3,910 additions and 147 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.0](https://github.com/naver/egjs-conveyer/compare/1.2.0...1.3.0) (2022-06-23)
### :sparkles: Packages
* `@egjs/conveyer` 1.3.0
* `@egjs/react-conveyer` 1.3.0
* `@egjs/svelte-conveyer` 1.3.0
* `@egjs/vue-conveyer` 1.3.0
* `@egjs/vue2-conveyer` 1.3.0
* `@egjs/ngx-conveyer` 1.3.0


### :rocket: New Features

* `@egjs/conveyer`
* use side wheel to move conveyer (#15) ([3cdeab5](https://github.com/naver/egjs-conveyer/commit/3cdeab57a53cae679972696f034b325f7dd3c32c))


### :mega: Other

* All
* update dependencies ([0630847](https://github.com/naver/egjs-conveyer/commit/06308477eda17a04c7bcef99543b36bb6ac969a3))
* update packages versions ([6e5ff78](https://github.com/naver/egjs-conveyer/commit/6e5ff787f1d1f90305261b4cf30ebb408bb0543c))
* Other
* fix github actions workflows ([dc5ce85](https://github.com/naver/egjs-conveyer/commit/dc5ce85827e8f717d9c4d470064aa6dcd2aa0c6c))
* fix github actions workflows ([0de06d4](https://github.com/naver/egjs-conveyer/commit/0de06d4d407f62384cef498f2bb6dc8bf30f344e))



## [1.2.0](https://github.com/naver/egjs-conveyer/compare/1.1.0...1.2.0) (2022-06-02)
### :sparkles: Packages
* `@egjs/conveyer` 1.2.0
Expand Down
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"demo:build": "npm run docs:build && npm run docs:version && npm run build --prefix packages/docs",
"demo:deploy": "lerna-helper deploy --base @egjs/conveyer --remote upstream",
"release": "lerna-helper release --base @egjs/conveyer --remote upstream --branch main",
"bootstrap": "lerna bootstrap --hoist react --hoist react-dom"
"bootstrap": "lerna bootstrap --hoist react --hoist react-dom",
"bootstrap:force": "npm run bootstrap --legacy-peer-deps"
},
"repository": {
"type": "git",
Expand Down
15 changes: 15 additions & 0 deletions packages/conveyer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.0](https://github.com/naver/egjs-conveyer/compare/@egjs/conveyer@1.2.0...@egjs/conveyer@1.3.0) (2022-06-23)


### :rocket: New Features

* use side wheel to move conveyer (#15) ([3cdeab5](https://github.com/naver/egjs-conveyer/commit/3cdeab57a53cae679972696f034b325f7dd3c32c))


### :mega: Other

* update dependencies ([0630847](https://github.com/naver/egjs-conveyer/commit/06308477eda17a04c7bcef99543b36bb6ac969a3))
* update packages versions ([6e5ff78](https://github.com/naver/egjs-conveyer/commit/6e5ff787f1d1f90305261b4cf30ebb408bb0543c))



## 1.2.0 (2022-06-02)


Expand Down
1 change: 1 addition & 0 deletions packages/docs/docs/api/ConveyerOptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ custom_edit_url: null
|horizontal|boolean|<p>scroll direction. (true: Horizontal Scroll, false: Vertical Scroll) (default: true) </p>|
|itemSelector|string|<p>selector to find items inside. (default: &quot;&quot;) </p>|
|useDrag|boolean|<p>Whether to use drag (default: true) </p>|
|useSideWheel|boolean|<p>Whether to use the mouse wheel in a direction aside from the scroll direction (default: false) </p>|
|scrollDebounce|number|<p>The maximum amount of time the scroll event does not fire for the finishScroll event to be triggered. (default: 100) </p>|
|preventDefault|boolean|<p>Whether to prevent being selected. (default: true) </p>|
|preventClickOnDrag|boolean|<p>Whether to prevent click event when dragging. (default: false) </p>|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ custom_edit_url: null
|horizontal|boolean|스크롤 방향. (true: 가로 스크롤, false: 세로 스크롤) (default: true)|
|itemSelector|string|내부의 아이템들을 찾기 위한 selector. (default: &quot;&quot;)|
|useDrag|boolean| 드래그를 사용할지 여부. (default: true)|
|useSideWheel|boolean|스크롤 방향과 다른 방향의 마우스 휠 입력을 사용할지 여부. (default: false)|
|scrollDebounce|number| finishScroll 이벤트가 발생되기 위한 scroll 이벤트가 발생하지 않는 최대 시간. (default: 100)|
|preventDefault|boolean|셀렉트가 되는 것을 막을지 여부. (default: true) |
|preventClickOnDrag|boolean|드래그하면 클릭이벤트를 막을지 여부. (default: true)|
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
custom_edit_url: null
---

```ts
const CONVEYER_METHODS
```

<div>

</div>

<p>egjs-conveyer<br />Copyright (c) 2022-present NAVER Corp.<br />MIT license</p>

Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
---
custom_edit_url: null
---

```ts
class Component
```

<div>

</div>

컴포넌트의 이벤트을 관리할 수 있게 하는 클래스

<div className="container">
<div className="row mb-2"><div className="col col--6"><strong>Properties</strong></div><div className="col col--6"><strong>Methods</strong></div></div>
<div className="row"><div className="col col--6"><a href="#VERSION">VERSION</a><span className="badge badge--info margin-left--sm">static</span></div><div className="col col--6"><a href="#trigger">trigger</a><br/><a href="#once">once</a><br/><a href="#hasOn">hasOn</a><br/><a href="#on">on</a><br/><a href="#off">off</a></div></div>
</div>

## Properties
### VERSION {#VERSION}

<div>
<span className="badge badge--info">static</span>
</div>

버전정보 문자열

**Type**: string

Component.VERSION; // ex) 3.0.0

## Methods

### trigger {#trigger}

<div>

</div>

커스텀 이벤트를 발생시킨다

**Returns**: this
- 컴포넌트 자신의 인스턴스

|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION|
|:---:|:---:|:---:|:---:|:---:|
|event|string \| ComponentEvent|||발생할 커스텀 이벤트의 이름 또는 ComponentEvent의 인스턴스|
|params|Array&lt;any&gt; \| $ts:...|||커스텀 이벤트가 발생할 때 전달할 데이터|

```ts
import Component, { ComponentEvent } from "@egjs/component";
class Some extends Component<{
beforeHi: ComponentEvent<{ foo: number; bar: string }>;
hi: { foo: { a: number; b: boolean } };
someEvent: (foo: number, bar: string) => void;
someOtherEvent: void; // When there's no event argument
}> {
some(){
if(this.trigger("beforeHi")){ // When event call to stop return false.
this.trigger("hi");// fire hi event.
}
}
}
const some = new Some();
some.on("beforeHi", e => {
if(condition){
e.stop(); // When event call to stop, `hi` event not call.
}
// `currentTarget` is component instance.
console.log(some === e.currentTarget); // true
typeof e.foo; // number
typeof e.bar; // string
});
some.on("hi", e => {
typeof e.foo.b; // boolean
});
// If you want to more know event design. You can see article.
// https://github.com/naver/egjs-component/wiki/How-to-make-Component-event-design%3F
```

### once {#once}

<div>

</div>

이벤트가 한번만 실행된다.

**Returns**: this
- 컴포넌트 자신의 인스턴스

|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION|
|:---:|:---:|:---:|:---:|:---:|
|eventName|string \| $ts:...|||등록할 이벤트의 이름 또는 이벤트 이름-핸들러 오브젝트|
|handlerToAttach|function \| $ts:...|✔️||등록할 이벤트의 핸들러 함수|

```ts
import Component, { ComponentEvent } from "@egjs/component";
class Some extends Component<{
hi: ComponentEvent;
}> {
hi() {
alert("hi");
}
thing() {
this.once("hi", this.hi);
}
}
var some = new Some();
some.thing();
some.trigger(new ComponentEvent("hi"));
// fire alert("hi");
some.trigger(new ComponentEvent("hi"));
// Nothing happens
```

### hasOn {#hasOn}

<div>

</div>

컴포넌트에 이벤트가 등록됐는지 확인한다.

**Returns**: boolean
- 이벤트 등록 여부

|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION|
|:---:|:---:|:---:|:---:|:---:|
|eventName|string|||등록 여부를 확인할 이벤트의 이름|

```ts
import Component from "@egjs/component";
class Some extends Component<{
hi: void;
}> {
some() {
this.hasOn("hi");// check hi event.
}
}
```

### on {#on}

<div>

</div>

컴포넌트에 이벤트를 등록한다.

**Returns**: this
- 컴포넌트 자신의 인스턴스

|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION|
|:---:|:---:|:---:|:---:|:---:|
|eventName|string \| $ts:...|||등록할 이벤트의 이름 또는 이벤트 이름-핸들러 오브젝트|
|handlerToAttach|function \| $ts:...|✔️||등록할 이벤트의 핸들러 함수|

```ts
import Component, { ComponentEvent } from "@egjs/component";
class Some extends Component<{
hi: void;
}> {
hi() {
console.log("hi");
}
some() {
this.on("hi",this.hi); //attach event
}
}
```

### off {#off}

<div>

</div>

컴포넌트에 등록된 이벤트를 해제한다.<br/>`eventName`이 주어지지 않았을 경우 모든 이벤트 핸들러를 제거한다.<br/>`handlerToAttach`가 주어지지 않았을 경우 `eventName`에 해당하는 모든 이벤트 핸들러를 제거한다.

**Returns**: this
- 컴포넌트 자신의 인스턴스

|PARAMETER|TYPE|OPTIONAL|DEFAULT|DESCRIPTION|
|:---:|:---:|:---:|:---:|:---:|
|eventName|string \| $ts:...|✔️||해제할 이벤트의 이름|
|handlerToDetach|function \| $ts:...|✔️||해제할 이벤트의 핸들러 함수|

```ts
import Component, { ComponentEvent } from "@egjs/component";
class Some extends Component<{
hi: void;
}> {
hi() {
console.log("hi");
}
some() {
this.off("hi",this.hi); //detach event
}
}
```

0 comments on commit 4c85687

Please sign in to comment.