@egjs/react-flicking
Advanced tools
Comparing version 4.10.2-beta.1 to 4.10.2-beta.2
@@ -17,3 +17,2 @@ import * as React from "react"; | ||
private _prevChildren; | ||
private _renderingState; | ||
get reactPanels(): (StrictPanel | NonStrictPanel | HTMLDivElement)[]; | ||
@@ -20,0 +19,0 @@ get renderEmitter(): Component<{ |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/egjs-flicking/tree/master/packages/react-flicking | ||
version: 4.10.2-beta.1 | ||
version: 4.10.2-beta.2 | ||
*/ | ||
@@ -484,10 +484,2 @@ 'use strict'; | ||
var RenderingState; | ||
(function (RenderingState) { | ||
RenderingState[RenderingState["NONE"] = 0] = "NONE"; | ||
RenderingState[RenderingState["RENDERED"] = 1] = "RENDERED"; | ||
RenderingState[RenderingState["UPDATED"] = 2] = "UPDATED"; | ||
})(RenderingState || (RenderingState = {})); | ||
var Flicking = | ||
@@ -508,3 +500,2 @@ /*#__PURE__*/ | ||
_this._prevChildren = children; | ||
_this._renderingState = RenderingState.NONE; | ||
return _this; | ||
@@ -594,5 +585,6 @@ } | ||
var prevChildren = this._prevChildren; // Ignore updates before init, they will be updated after "ready" event's force update | ||
// Also, ignore update between two successive rendering calls | ||
// Also, prevent updates when another update is already queued. | ||
// This usually happens when render() called twice without calling componentDidMount, like in the case of React.StrictMode. | ||
if (!vanillaFlicking || !vanillaFlicking.initialized || this._renderingState === RenderingState.RENDERED) return; | ||
if (!vanillaFlicking || !vanillaFlicking.initialized || this._diffResult) return; | ||
@@ -619,3 +611,2 @@ var nextChildren = this._getChildren(props.children); | ||
VanillaFlicking.sync(flicking, diffResult, this.reactPanels); | ||
this._renderingState = RenderingState.UPDATED; | ||
this._diffResult = null; | ||
@@ -669,3 +660,2 @@ }; | ||
var panels = !!props.virtual && ((_b = props.panelsPerView) !== null && _b !== void 0 ? _b : -1) > 0 ? this._getVirtualPanels() : this._getPanels(); | ||
this._renderingState = RenderingState.RENDERED; | ||
return React.createElement(Viewport, __assign({}, attributes, { | ||
@@ -706,12 +696,2 @@ className: viewportClasses.join(" "), | ||
flicking.once(VanillaFlicking.EVENTS.READY, function () { | ||
var children = _this._getChildren(); | ||
var diffResult = _this._jsxDiffer.update(children); // children is changed before init | ||
if (diffResult.added.length > 0 || diffResult.removed.length > 0) { | ||
_this._panels = _this._createPanelRefs(_this.props, children); | ||
_this._diffResult = diffResult; | ||
} | ||
_this.forceUpdate(); | ||
@@ -742,3 +722,2 @@ }); | ||
var nextChild = nextChildren[idx]; | ||
console.log(child, nextChild); | ||
@@ -745,0 +724,0 @@ if (child.key && nextChild.key) { |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/egjs-flicking/tree/master/packages/react-flicking | ||
version: 4.10.2-beta.1 | ||
version: 4.10.2-beta.2 | ||
*/ | ||
@@ -484,10 +484,2 @@ import * as React from 'react'; | ||
var RenderingState; | ||
(function (RenderingState) { | ||
RenderingState[RenderingState["NONE"] = 0] = "NONE"; | ||
RenderingState[RenderingState["RENDERED"] = 1] = "RENDERED"; | ||
RenderingState[RenderingState["UPDATED"] = 2] = "UPDATED"; | ||
})(RenderingState || (RenderingState = {})); | ||
var Flicking = | ||
@@ -508,3 +500,2 @@ /*#__PURE__*/ | ||
_this._prevChildren = children; | ||
_this._renderingState = RenderingState.NONE; | ||
return _this; | ||
@@ -594,5 +585,6 @@ } | ||
var prevChildren = this._prevChildren; // Ignore updates before init, they will be updated after "ready" event's force update | ||
// Also, ignore update between two successive rendering calls | ||
// Also, prevent updates when another update is already queued. | ||
// This usually happens when render() called twice without calling componentDidMount, like in the case of React.StrictMode. | ||
if (!vanillaFlicking || !vanillaFlicking.initialized || this._renderingState === RenderingState.RENDERED) return; | ||
if (!vanillaFlicking || !vanillaFlicking.initialized || this._diffResult) return; | ||
@@ -619,3 +611,2 @@ var nextChildren = this._getChildren(props.children); | ||
sync(flicking, diffResult, this.reactPanels); | ||
this._renderingState = RenderingState.UPDATED; | ||
this._diffResult = null; | ||
@@ -669,3 +660,2 @@ }; | ||
var panels = !!props.virtual && ((_b = props.panelsPerView) !== null && _b !== void 0 ? _b : -1) > 0 ? this._getVirtualPanels() : this._getPanels(); | ||
this._renderingState = RenderingState.RENDERED; | ||
return React.createElement(Viewport, __assign({}, attributes, { | ||
@@ -706,12 +696,2 @@ className: viewportClasses.join(" "), | ||
flicking.once(EVENTS.READY, function () { | ||
var children = _this._getChildren(); | ||
var diffResult = _this._jsxDiffer.update(children); // children is changed before init | ||
if (diffResult.added.length > 0 || diffResult.removed.length > 0) { | ||
_this._panels = _this._createPanelRefs(_this.props, children); | ||
_this._diffResult = diffResult; | ||
} | ||
_this.forceUpdate(); | ||
@@ -742,3 +722,2 @@ }); | ||
var nextChild = nextChildren[idx]; | ||
console.log(child, nextChild); | ||
@@ -745,0 +724,0 @@ if (child.key && nextChild.key) { |
@@ -7,3 +7,3 @@ /* | ||
repository: https://github.com/naver/egjs-flicking/tree/master/packages/react-flicking | ||
version: 4.10.2-beta.1 | ||
version: 4.10.2-beta.2 | ||
*/ | ||
@@ -482,10 +482,2 @@ (function (global, factory) { | ||
var RenderingState; | ||
(function (RenderingState) { | ||
RenderingState[RenderingState["NONE"] = 0] = "NONE"; | ||
RenderingState[RenderingState["RENDERED"] = 1] = "RENDERED"; | ||
RenderingState[RenderingState["UPDATED"] = 2] = "UPDATED"; | ||
})(RenderingState || (RenderingState = {})); | ||
var Flicking = | ||
@@ -506,3 +498,2 @@ /*#__PURE__*/ | ||
_this._prevChildren = children; | ||
_this._renderingState = RenderingState.NONE; | ||
return _this; | ||
@@ -592,5 +583,6 @@ } | ||
var prevChildren = this._prevChildren; // Ignore updates before init, they will be updated after "ready" event's force update | ||
// Also, ignore update between two successive rendering calls | ||
// Also, prevent updates when another update is already queued. | ||
// This usually happens when render() called twice without calling componentDidMount, like in the case of React.StrictMode. | ||
if (!vanillaFlicking || !vanillaFlicking.initialized || this._renderingState === RenderingState.RENDERED) return; | ||
if (!vanillaFlicking || !vanillaFlicking.initialized || this._diffResult) return; | ||
@@ -617,3 +609,2 @@ var nextChildren = this._getChildren(props.children); | ||
VanillaFlicking.sync(flicking, diffResult, this.reactPanels); | ||
this._renderingState = RenderingState.UPDATED; | ||
this._diffResult = null; | ||
@@ -667,3 +658,2 @@ }; | ||
var panels = !!props.virtual && ((_b = props.panelsPerView) !== null && _b !== void 0 ? _b : -1) > 0 ? this._getVirtualPanels() : this._getPanels(); | ||
this._renderingState = RenderingState.RENDERED; | ||
return React.createElement(Viewport, __assign({}, attributes, { | ||
@@ -704,12 +694,2 @@ className: viewportClasses.join(" "), | ||
flicking.once(VanillaFlicking.EVENTS.READY, function () { | ||
var children = _this._getChildren(); | ||
var diffResult = _this._jsxDiffer.update(children); // children is changed before init | ||
if (diffResult.added.length > 0 || diffResult.removed.length > 0) { | ||
_this._panels = _this._createPanelRefs(_this.props, children); | ||
_this._diffResult = diffResult; | ||
} | ||
_this.forceUpdate(); | ||
@@ -740,3 +720,2 @@ }); | ||
var nextChild = nextChildren[idx]; | ||
console.log(child, nextChild); | ||
@@ -743,0 +722,0 @@ if (child.key && nextChild.key) { |
{ | ||
"name": "@egjs/react-flicking", | ||
"version": "4.10.2-beta.1", | ||
"version": "4.10.2-beta.2", | ||
"description": "Everyday 30 million people experience. It's reliable, flexible and extendable carousel.", | ||
@@ -5,0 +5,0 @@ "main": "dist/flicking.cjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
214353
2820