zakeke-configurator-react 0.1.270 → 0.1.271
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/dist/index.js +8 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21355,8 +21355,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21355
21355
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
21356
21356
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers */ "./src/helpers.tsx");
|
|
21357
21357
|
/* harmony import */ var _hooks_useZakeke__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/useZakeke */ "./src/hooks/useZakeke.ts");
|
|
21358
|
-
/* harmony import */ var
|
|
21359
|
-
/* harmony import */ var
|
|
21358
|
+
/* harmony import */ var _state_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../state/provider */ "./src/state/provider.tsx");
|
|
21359
|
+
/* harmony import */ var _debugs_debugPanel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./debugs/debugPanel */ "./src/components/debugs/debugPanel.tsx");
|
|
21360
21360
|
var _templateObject;
|
|
21361
21361
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
21362
21362
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -21373,7 +21373,7 @@ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.fre
|
|
|
21373
21373
|
|
|
21374
21374
|
|
|
21375
21375
|
var ZakekeViewerContainer = styled_components__WEBPACK_IMPORTED_MODULE_1___default().div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\twidth: 100%;\n\theight: 100%;\n\tposition: relative;\n\toutline: none !important;\n\n\tcanvas {\n\t\toutline: none !important;\n\t\tbackground-color: ", ";\n\t}\n"])), function (props) {
|
|
21376
|
-
return props.backgroundColor;
|
|
21376
|
+
return props.backgroundColor ? props.backgroundColor : 'transparent';
|
|
21377
21377
|
});
|
|
21378
21378
|
|
|
21379
21379
|
// Persistent mode will keep the SceneEditor alive after unmount.
|
|
@@ -21389,16 +21389,16 @@ var ZakekeViewer = function ZakekeViewer(_ref) {
|
|
|
21389
21389
|
internalAppendViewer = _useZakeke.internalAppendViewer,
|
|
21390
21390
|
backgroundColor = _useZakeke.backgroundColor,
|
|
21391
21391
|
removeBackground = _useZakeke.removeBackground;
|
|
21392
|
-
var internalState = (0,
|
|
21392
|
+
var internalState = (0,_state_provider__WEBPACK_IMPORTED_MODULE_4__.useInternalState)();
|
|
21393
21393
|
var stateRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(internalState);
|
|
21394
21394
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
21395
21395
|
if (isViewerReady) internalAppendViewer(document.getElementById('zakeke-viewer-container-' + guid));
|
|
21396
21396
|
}, [isViewerReady]);
|
|
21397
21397
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ZakekeViewerContainer, {
|
|
21398
|
-
backgroundColor: bgColor && !removeBackground ? bgColor : backgroundColor && !removeBackground ? backgroundColor : '#f2f2f2',
|
|
21398
|
+
backgroundColor: bgColor && !removeBackground ? bgColor : backgroundColor && !removeBackground ? backgroundColor : backgroundColor ? null : '#f2f2f2',
|
|
21399
21399
|
id: 'zakeke-viewer-container-' + guid,
|
|
21400
21400
|
className: "zakeke-viewer-container ".concat(className)
|
|
21401
|
-
}, (stateRef === null || stateRef === void 0 ? void 0 : stateRef.current.state.isDebug) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
21401
|
+
}, (stateRef === null || stateRef === void 0 ? void 0 : stateRef.current.state.isDebug) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_debugs_debugPanel__WEBPACK_IMPORTED_MODULE_5__.DebugPanel, null));
|
|
21402
21402
|
};
|
|
21403
21403
|
|
|
21404
21404
|
/***/ }),
|
|
@@ -22431,7 +22431,7 @@ var ZakekeEnvironment = /*#__PURE__*/function () {
|
|
|
22431
22431
|
_defineProperty(this, "translations", null);
|
|
22432
22432
|
_defineProperty(this, "useLegacyScreenshot", false);
|
|
22433
22433
|
_defineProperty(this, "uiConfig", null);
|
|
22434
|
-
_defineProperty(this, "backgroundColor",
|
|
22434
|
+
_defineProperty(this, "backgroundColor", null);
|
|
22435
22435
|
_defineProperty(this, "removeBackground", false);
|
|
22436
22436
|
_defineProperty(this, "parseParameters", function (parameters) {
|
|
22437
22437
|
console.info('Parameters', parameters);
|
|
@@ -23033,7 +23033,7 @@ var ZakekeEnvironment = /*#__PURE__*/function () {
|
|
|
23033
23033
|
urlLoader: (_this$zkScene$get$get = (_this$zkScene$get = _this.zkScene.get('config')) === null || _this$zkScene$get === void 0 ? void 0 : (_this$zkScene$get$get2 = _this$zkScene$get.get('uiConfig')) === null || _this$zkScene$get$get2 === void 0 ? void 0 : _this$zkScene$get$get2.get('urlLoader')) !== null && _this$zkScene$get$get !== void 0 ? _this$zkScene$get$get : '',
|
|
23034
23034
|
urlARIcon: (_this$zkScene$get$get3 = (_this$zkScene$get2 = _this.zkScene.get('config')) === null || _this$zkScene$get2 === void 0 ? void 0 : _this$zkScene$get2.get('uiConfig').get('urlARIcon')) !== null && _this$zkScene$get$get3 !== void 0 ? _this$zkScene$get$get3 : ''
|
|
23035
23035
|
};
|
|
23036
|
-
_this.backgroundColor = (_this$zkScene$get$get4 = (_this$zkScene3 = _this.zkScene) === null || _this$zkScene3 === void 0 ? void 0 : (_this$zkScene3$get = _this$zkScene3.get('config')) === null || _this$zkScene3$get === void 0 ? void 0 : (_this$zkScene3$get$ge = _this$zkScene3$get.get('general')) === null || _this$zkScene3$get$ge === void 0 ? void 0 : _this$zkScene3$get$ge.get('backgroundColor')) !== null && _this$zkScene$get$get4 !== void 0 ? _this$zkScene$get$get4 :
|
|
23036
|
+
_this.backgroundColor = (_this$zkScene$get$get4 = (_this$zkScene3 = _this.zkScene) === null || _this$zkScene3 === void 0 ? void 0 : (_this$zkScene3$get = _this$zkScene3.get('config')) === null || _this$zkScene3$get === void 0 ? void 0 : (_this$zkScene3$get$ge = _this$zkScene3$get.get('general')) === null || _this$zkScene3$get$ge === void 0 ? void 0 : _this$zkScene3$get$ge.get('backgroundColor')) !== null && _this$zkScene$get$get4 !== void 0 ? _this$zkScene$get$get4 : null;
|
|
23037
23037
|
_this.removeBackground = (_this$zkScene$get$get5 = (_this$zkScene4 = _this.zkScene) === null || _this$zkScene4 === void 0 ? void 0 : (_this$zkScene4$get = _this$zkScene4.get('config')) === null || _this$zkScene4$get === void 0 ? void 0 : (_this$zkScene4$get$ge = _this$zkScene4$get.get('general')) === null || _this$zkScene4$get$ge === void 0 ? void 0 : _this$zkScene4$get$ge.get('removeDefaultBackground')) !== null && _this$zkScene$get$get5 !== void 0 ? _this$zkScene$get$get5 : false;
|
|
23038
23038
|
if ((_this$zkScene5 = _this.zkScene) !== null && _this$zkScene5 !== void 0 && _this$zkScene5.get('config')) _this.product = _models__WEBPACK_IMPORTED_MODULE_11__.Product.fromProduct(_this.zkProduct);
|
|
23039
23039
|
_this.quantityRule = _this.zkProduct.get('quantityRule') ? _models__WEBPACK_IMPORTED_MODULE_11__.ProductQuantityRule.fromQuantityRule(_this.zkProduct.get('quantityRule')) : null;
|