@egjs/react-flicking 4.12.0-beta.8 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/declaration/CrossFlicking.d.ts +26 -11
- package/declaration/CrossGroup.d.ts +6 -5
- package/declaration/Flicking.d.ts +56 -42
- package/declaration/NonStrictPanel.d.ts +12 -12
- package/declaration/ReactElementProvider.d.ts +12 -12
- package/declaration/ReactRenderer.d.ts +17 -17
- package/declaration/StrictPanel.d.ts +14 -14
- package/declaration/ViewportSlot.d.ts +5 -5
- package/declaration/consts.d.ts +2 -2
- package/declaration/index.d.ts +8 -8
- package/declaration/index.umd.d.ts +2 -2
- package/declaration/types.d.ts +32 -34
- package/dist/flicking-inline.css +1 -9
- package/dist/flicking-inline.css.map +1 -0
- package/dist/flicking-inline.min.min.css +1 -0
- package/dist/flicking.cjs.js +54 -37
- package/dist/flicking.cjs.js.map +1 -1
- package/dist/flicking.css +5 -9
- package/dist/flicking.css.map +1 -0
- package/dist/flicking.esm.js +113 -50
- package/dist/flicking.esm.js.map +1 -1
- package/dist/flicking.min.min.css +1 -0
- package/dist/flicking.umd.js +54 -37
- package/dist/flicking.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/react-flicking/CrossFlicking.tsx +104 -41
- package/src/react-flicking/CrossGroup.tsx +12 -2
- package/src/react-flicking/Flicking.tsx +51 -35
- package/src/react-flicking/consts.ts +1 -0
- package/src/react-flicking/types.ts +1 -3
- package/declaration/ReactCrossRenderer.d.ts +0 -11
- package/dist/flicking.js +0 -9221
- package/dist/flicking.js.map +0 -1
- package/dist/flicking.min.js +0 -10
- package/dist/flicking.min.js.map +0 -1
- package/dist/flicking.pkgd.js +0 -14483
- package/dist/flicking.pkgd.js.map +0 -1
- package/dist/flicking.pkgd.min.js +0 -10
- package/dist/flicking.pkgd.min.js.map +0 -1
- package/src/react-flicking/ReactCrossRenderer.ts +0 -70
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) 2015 NAVER Corp.
|
|
3
|
-
* egjs projects are licensed under the MIT license
|
|
4
|
-
*/
|
|
5
|
-
import { getFlickingAttached } from "@egjs/flicking";
|
|
6
|
-
|
|
7
|
-
import ReactFlicking from "./Flicking";
|
|
8
|
-
import ReactRenderer, { ReactRendererOptions } from "./ReactRenderer";
|
|
9
|
-
|
|
10
|
-
class ReactCrossRenderer extends ReactRenderer {
|
|
11
|
-
// Internal States
|
|
12
|
-
protected _reactFlicking: ReactFlicking;
|
|
13
|
-
|
|
14
|
-
public constructor(options: ReactRendererOptions) {
|
|
15
|
-
super(options);
|
|
16
|
-
|
|
17
|
-
this._reactFlicking = options.reactFlicking;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/require-await
|
|
21
|
-
public async render() {
|
|
22
|
-
const flicking = getFlickingAttached(this._flicking);
|
|
23
|
-
const reactFlicking = this._reactFlicking;
|
|
24
|
-
const strategy = this._strategy;
|
|
25
|
-
|
|
26
|
-
this._rendering = true;
|
|
27
|
-
|
|
28
|
-
strategy.updateRenderingPanels(flicking);
|
|
29
|
-
strategy.renderPanels(flicking);
|
|
30
|
-
|
|
31
|
-
return new Promise<void>(resolve => {
|
|
32
|
-
reactFlicking.renderEmitter.once("render", () => {
|
|
33
|
-
this._rendering = false;
|
|
34
|
-
this._afterRender();
|
|
35
|
-
resolve();
|
|
36
|
-
});
|
|
37
|
-
reactFlicking.forceUpdate();
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public async forceRenderAllPanels() {
|
|
42
|
-
const reactFlicking = this._reactFlicking;
|
|
43
|
-
|
|
44
|
-
this._rendering = true;
|
|
45
|
-
await super.forceRenderAllPanels();
|
|
46
|
-
|
|
47
|
-
return new Promise<void>(resolve => {
|
|
48
|
-
reactFlicking.renderEmitter.once("render", () => {
|
|
49
|
-
this._rendering = false;
|
|
50
|
-
resolve();
|
|
51
|
-
});
|
|
52
|
-
reactFlicking.forceUpdate();
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public destroy() {
|
|
57
|
-
super.destroy();
|
|
58
|
-
this._reactFlicking.renderEmitter.off("render");
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
protected _collectPanels() {
|
|
62
|
-
const flicking = getFlickingAttached(this._flicking);
|
|
63
|
-
const reactFlicking = this._reactFlicking;
|
|
64
|
-
const reactPanels = reactFlicking.reactPanels;
|
|
65
|
-
|
|
66
|
-
this._panels = this._strategy.collectPanels(flicking, reactPanels);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default ReactCrossRenderer;
|