zakeke-configurator-react 0.1.273 → 0.1.274-prod
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
|
@@ -21376,8 +21376,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21376
21376
|
/* harmony import */ var styled_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(styled_components__WEBPACK_IMPORTED_MODULE_1__);
|
|
21377
21377
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers */ "./src/helpers.tsx");
|
|
21378
21378
|
/* harmony import */ var _hooks_useZakeke__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/useZakeke */ "./src/hooks/useZakeke.ts");
|
|
21379
|
-
/* harmony import */ var
|
|
21380
|
-
/* harmony import */ var
|
|
21379
|
+
/* harmony import */ var _state_provider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../state/provider */ "./src/state/provider.tsx");
|
|
21380
|
+
/* harmony import */ var _debugs_debugPanel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./debugs/debugPanel */ "./src/components/debugs/debugPanel.tsx");
|
|
21381
21381
|
var _templateObject;
|
|
21382
21382
|
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
21383
21383
|
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."); }
|
|
@@ -21394,7 +21394,7 @@ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.fre
|
|
|
21394
21394
|
|
|
21395
21395
|
|
|
21396
21396
|
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) {
|
|
21397
|
-
return props.backgroundColor;
|
|
21397
|
+
return props.backgroundColor ? props.backgroundColor : 'transparent';
|
|
21398
21398
|
});
|
|
21399
21399
|
|
|
21400
21400
|
// Persistent mode will keep the SceneEditor alive after unmount.
|
|
@@ -21410,16 +21410,16 @@ var ZakekeViewer = function ZakekeViewer(_ref) {
|
|
|
21410
21410
|
internalAppendViewer = _useZakeke.internalAppendViewer,
|
|
21411
21411
|
backgroundColor = _useZakeke.backgroundColor,
|
|
21412
21412
|
removeBackground = _useZakeke.removeBackground;
|
|
21413
|
-
var internalState = (0,
|
|
21413
|
+
var internalState = (0,_state_provider__WEBPACK_IMPORTED_MODULE_4__.useInternalState)();
|
|
21414
21414
|
var stateRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(internalState);
|
|
21415
21415
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
21416
21416
|
if (isViewerReady) internalAppendViewer(document.getElementById('zakeke-viewer-container-' + guid));
|
|
21417
21417
|
}, [isViewerReady]);
|
|
21418
21418
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(ZakekeViewerContainer, {
|
|
21419
|
-
backgroundColor: bgColor && !removeBackground ? bgColor : backgroundColor && !removeBackground ? backgroundColor : '#f2f2f2',
|
|
21419
|
+
backgroundColor: bgColor && !removeBackground ? bgColor : backgroundColor && !removeBackground ? backgroundColor : backgroundColor ? null : '#f2f2f2',
|
|
21420
21420
|
id: 'zakeke-viewer-container-' + guid,
|
|
21421
21421
|
className: "zakeke-viewer-container ".concat(className)
|
|
21422
|
-
}, (stateRef === null || stateRef === void 0 ? void 0 : stateRef.current.state.isDebug) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(
|
|
21422
|
+
}, (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));
|
|
21423
21423
|
};
|
|
21424
21424
|
|
|
21425
21425
|
/***/ }),
|
|
@@ -22452,7 +22452,7 @@ var ZakekeEnvironment = /*#__PURE__*/function () {
|
|
|
22452
22452
|
_defineProperty(this, "translations", null);
|
|
22453
22453
|
_defineProperty(this, "useLegacyScreenshot", false);
|
|
22454
22454
|
_defineProperty(this, "uiConfig", null);
|
|
22455
|
-
_defineProperty(this, "backgroundColor",
|
|
22455
|
+
_defineProperty(this, "backgroundColor", null);
|
|
22456
22456
|
_defineProperty(this, "removeBackground", false);
|
|
22457
22457
|
_defineProperty(this, "parseParameters", function (parameters) {
|
|
22458
22458
|
console.info('Parameters', parameters);
|
|
@@ -23054,7 +23054,7 @@ var ZakekeEnvironment = /*#__PURE__*/function () {
|
|
|
23054
23054
|
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 : '',
|
|
23055
23055
|
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 : ''
|
|
23056
23056
|
};
|
|
23057
|
-
_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 :
|
|
23057
|
+
_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;
|
|
23058
23058
|
_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;
|
|
23059
23059
|
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);
|
|
23060
23060
|
_this.quantityRule = _this.zkProduct.get('quantityRule') ? _models__WEBPACK_IMPORTED_MODULE_11__.ProductQuantityRule.fromQuantityRule(_this.zkProduct.get('quantityRule')) : null;
|