kitchen-simulator 3.16.0 → 3.16.2-test-renderer-fix
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/es/LiteKitchenConfigurator.js +114 -97
- package/es/LiteRenderer.js +156 -130
- package/es/utils/isolate-event-handler.js +265 -210
- package/lib/LiteKitchenConfigurator.js +114 -98
- package/lib/LiteRenderer.js +155 -130
- package/lib/utils/isolate-event-handler.js +266 -210
- package/package.json +1 -1
package/lib/LiteRenderer.js
CHANGED
|
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = LiteRenderer;
|
|
9
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
12
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
14
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -20,75 +18,53 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
20
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
19
|
var _reactRedux = require("react-redux");
|
|
22
20
|
var _redux = require("redux");
|
|
21
|
+
var _immutable = require("immutable");
|
|
22
|
+
var Sentry = _interopRequireWildcard(require("@sentry/react"));
|
|
23
|
+
var THREE = _interopRequireWildcard(require("three"));
|
|
23
24
|
var _models = _interopRequireWildcard(require("./models"));
|
|
24
25
|
var Models = _models;
|
|
25
26
|
var _reducer = _interopRequireDefault(require("./reducers/reducer"));
|
|
26
27
|
var _AppContext = _interopRequireDefault(require("./AppContext"));
|
|
27
28
|
var _catalog = _interopRequireDefault(require("./catalog/catalog"));
|
|
28
|
-
var _SVGLoader = require("three/addons/loaders/SVGLoader");
|
|
29
|
-
var _constants = require("./constants");
|
|
30
29
|
var Areas = _interopRequireWildcard(require("./catalog/areas/area/planner-element"));
|
|
31
30
|
var Lines = _interopRequireWildcard(require("./catalog/lines/wall/planner-element"));
|
|
32
31
|
var Holes = _interopRequireWildcard(require("./catalog/holes/export"));
|
|
33
32
|
var _export2 = require("./plugins/export");
|
|
34
|
-
var _immutable = require("immutable");
|
|
35
|
-
var Sentry = _interopRequireWildcard(require("@sentry/react"));
|
|
36
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
37
33
|
var _LiteKitchenConfigurator = _interopRequireDefault(require("./LiteKitchenConfigurator"));
|
|
38
|
-
var _excluded = ["width", "height", "configData", "
|
|
34
|
+
var _excluded = ["width", "height", "configData", "externalEvent", "onInternalEvent", "onError"];
|
|
39
35
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
40
36
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
41
37
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
38
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
39
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
40
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
42
41
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
43
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
44
|
-
|
|
42
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // LiteRenderer.jsx
|
|
43
|
+
var isBrowser = typeof window !== 'undefined';
|
|
44
|
+
if (isBrowser) window.THREE = THREE;
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
//define reducer
|
|
58
|
-
var reducer = function reducer(state, action) {
|
|
59
|
-
state = state || AppState;
|
|
60
|
-
state = state.update('KitchenConfigurator', function (plannerState) {
|
|
61
|
-
return (0, _reducer["default"])(plannerState, action);
|
|
46
|
+
// ---- Keep prior Sentry behavior but ensure it only initializes once ----
|
|
47
|
+
var __sentryInited = false;
|
|
48
|
+
function ensureSentryInit() {
|
|
49
|
+
if (!isBrowser) return;
|
|
50
|
+
// assumes isProduction exists in your build just like today
|
|
51
|
+
if (!isProduction) return;
|
|
52
|
+
if (__sentryInited) return;
|
|
53
|
+
__sentryInited = true;
|
|
54
|
+
Sentry.init({
|
|
55
|
+
dsn: process.env.SENTRY_DSN,
|
|
56
|
+
environment: process.env.SENTRY_ENVIRONMENT
|
|
62
57
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"export": true,
|
|
74
|
-
// export history of actions in a file
|
|
75
|
-
"import": 'custom',
|
|
76
|
-
// import history of actions from a file
|
|
77
|
-
jump: true,
|
|
78
|
-
// jump back and forth (time travelling)
|
|
79
|
-
skip: true,
|
|
80
|
-
// skip (cancel) actions
|
|
81
|
-
reorder: true,
|
|
82
|
-
// drag and drop actions in the history list
|
|
83
|
-
dispatch: true,
|
|
84
|
-
// dispatch custom actions or action creators
|
|
85
|
-
test: true // generate tests for the selected actions
|
|
86
|
-
},
|
|
87
|
-
maxAge: 999999
|
|
88
|
-
}) : function (f) {
|
|
89
|
-
return f;
|
|
90
|
-
});
|
|
91
|
-
var plugins = [(0, _export2.Keyboard)(), (0, _export2.ConsoleDebugger)()];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ---------------- error helpers ----------------
|
|
61
|
+
function safeJson(v) {
|
|
62
|
+
try {
|
|
63
|
+
return JSON.parse(JSON.stringify(v));
|
|
64
|
+
} catch (_unused) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
92
68
|
function serializeError(err) {
|
|
93
69
|
try {
|
|
94
70
|
if (!err) return {
|
|
@@ -105,19 +81,12 @@ function serializeError(err) {
|
|
|
105
81
|
message: String(err),
|
|
106
82
|
raw: safeJson(err)
|
|
107
83
|
};
|
|
108
|
-
} catch (
|
|
84
|
+
} catch (_unused2) {
|
|
109
85
|
return {
|
|
110
86
|
message: 'Error serializing error'
|
|
111
87
|
};
|
|
112
88
|
}
|
|
113
89
|
}
|
|
114
|
-
function safeJson(v) {
|
|
115
|
-
try {
|
|
116
|
-
return JSON.parse(JSON.stringify(v));
|
|
117
|
-
} catch (_unused2) {
|
|
118
|
-
return undefined;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
90
|
|
|
122
91
|
/* ---------- Error Boundary that pushes into buffer ---------- */
|
|
123
92
|
var ToolErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
@@ -145,35 +114,139 @@ var ToolErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
145
114
|
}
|
|
146
115
|
}]);
|
|
147
116
|
}(_react["default"].Component);
|
|
117
|
+
ToolErrorBoundary.propTypes = {
|
|
118
|
+
pushError: _propTypes["default"].func.isRequired,
|
|
119
|
+
children: _propTypes["default"].any
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// ----------------- catalog init -----------------
|
|
123
|
+
function initCatalogOnce(catalog) {
|
|
124
|
+
if (!catalog) return;
|
|
125
|
+
if (catalog.__ksInitialized) return;
|
|
126
|
+
for (var x in Areas) catalog.registerElement(Areas[x]);
|
|
127
|
+
for (var _x in Lines) catalog.registerElement(Lines[_x]);
|
|
128
|
+
for (var _x2 in Holes) catalog.registerElement(Holes[_x2]);
|
|
129
|
+
catalog.registerCategory('Windows', 'Windows', [Holes.windowClear, Holes.windowCross, Holes.windowDoubleHung, Holes.windowVertical]);
|
|
130
|
+
catalog.registerCategory('Doors', 'Doors', [Holes.doorInterior, Holes.doorExterior, Holes.doorCloset, Holes.doorSliding, Holes.doorwayFramed, Holes.doorwayFrameless]);
|
|
131
|
+
catalog.__ksInitialized = true;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// ----------------- store factory -----------------
|
|
135
|
+
function createInstanceStore() {
|
|
136
|
+
var AppState = (0, _immutable.Map)({
|
|
137
|
+
KitchenConfigurator: new _models.State()
|
|
138
|
+
});
|
|
139
|
+
var reducer = function reducer(state, action) {
|
|
140
|
+
state = state || AppState;
|
|
141
|
+
return state.update('KitchenConfigurator', function (plannerState) {
|
|
142
|
+
return (0, _reducer["default"])(plannerState, action);
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
var enhancer = !isProduction && isBrowser && window.devToolsExtension ? window.devToolsExtension({
|
|
146
|
+
features: {
|
|
147
|
+
pause: true,
|
|
148
|
+
lock: true,
|
|
149
|
+
persist: true,
|
|
150
|
+
"export": true,
|
|
151
|
+
"import": 'custom',
|
|
152
|
+
jump: true,
|
|
153
|
+
skip: true,
|
|
154
|
+
reorder: true,
|
|
155
|
+
dispatch: true,
|
|
156
|
+
test: true
|
|
157
|
+
},
|
|
158
|
+
maxAge: 999999
|
|
159
|
+
}) : function (f) {
|
|
160
|
+
return f;
|
|
161
|
+
};
|
|
162
|
+
return (0, _redux.createStore)(reducer, null, enhancer);
|
|
163
|
+
}
|
|
164
|
+
function createPlugins() {
|
|
165
|
+
return [(0, _export2.Keyboard)(), (0, _export2.ConsoleDebugger)()];
|
|
166
|
+
}
|
|
148
167
|
function LiteRenderer(props) {
|
|
168
|
+
ensureSentryInit();
|
|
149
169
|
var width = props.width,
|
|
150
170
|
height = props.height,
|
|
151
171
|
configData = props.configData,
|
|
152
|
-
options = props.options,
|
|
153
|
-
user = props.user,
|
|
154
|
-
auth = props.auth,
|
|
155
|
-
featureFlags = props.featureFlags,
|
|
156
|
-
sentry = props.sentry,
|
|
157
|
-
analytics = props.analytics,
|
|
158
172
|
externalEvent = props.externalEvent,
|
|
159
173
|
onInternalEvent = props.onInternalEvent,
|
|
160
174
|
onError = props.onError,
|
|
161
175
|
passThrough = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
162
176
|
|
|
177
|
+
// ✅ instance-scoped store (no module singleton)
|
|
178
|
+
var storeRef = (0, _react.useRef)(null);
|
|
179
|
+
if (!storeRef.current) storeRef.current = createInstanceStore();
|
|
180
|
+
|
|
181
|
+
// ✅ instance-scoped catalog (no module singleton)
|
|
182
|
+
var catalogRef = (0, _react.useRef)(null);
|
|
183
|
+
if (!catalogRef.current) {
|
|
184
|
+
catalogRef.current = new _catalog["default"]();
|
|
185
|
+
initCatalogOnce(catalogRef.current);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// ✅ stable plugins array
|
|
189
|
+
var plugins = (0, _react.useMemo)(function () {
|
|
190
|
+
return createPlugins();
|
|
191
|
+
}, []);
|
|
192
|
+
|
|
193
|
+
// ✅ plugin lifecycle: supports cleanup if plugin returns function
|
|
194
|
+
var pluginCleanupsRef = (0, _react.useRef)([]);
|
|
195
|
+
(0, _react.useEffect)(function () {
|
|
196
|
+
var store = storeRef.current;
|
|
197
|
+
var stateExtractor = function stateExtractor(state) {
|
|
198
|
+
return state.get('KitchenConfigurator');
|
|
199
|
+
};
|
|
200
|
+
var cleanups = [];
|
|
201
|
+
var _iterator = _createForOfIteratorHelper(plugins),
|
|
202
|
+
_step;
|
|
203
|
+
try {
|
|
204
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
205
|
+
var p = _step.value;
|
|
206
|
+
try {
|
|
207
|
+
var maybeCleanup = p === null || p === void 0 ? void 0 : p(store, stateExtractor);
|
|
208
|
+
if (typeof maybeCleanup === 'function') cleanups.push(maybeCleanup);
|
|
209
|
+
} catch (_unused4) {
|
|
210
|
+
// keep prior behavior: do not crash
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
} catch (err) {
|
|
214
|
+
_iterator.e(err);
|
|
215
|
+
} finally {
|
|
216
|
+
_iterator.f();
|
|
217
|
+
}
|
|
218
|
+
pluginCleanupsRef.current = cleanups;
|
|
219
|
+
return function () {
|
|
220
|
+
var _iterator2 = _createForOfIteratorHelper(pluginCleanupsRef.current),
|
|
221
|
+
_step2;
|
|
222
|
+
try {
|
|
223
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
224
|
+
var fn = _step2.value;
|
|
225
|
+
try {
|
|
226
|
+
fn();
|
|
227
|
+
} catch (_unused3) {}
|
|
228
|
+
}
|
|
229
|
+
} catch (err) {
|
|
230
|
+
_iterator2.e(err);
|
|
231
|
+
} finally {
|
|
232
|
+
_iterator2.f();
|
|
233
|
+
}
|
|
234
|
+
pluginCleanupsRef.current = [];
|
|
235
|
+
};
|
|
236
|
+
}, [plugins]);
|
|
237
|
+
|
|
163
238
|
/* ---------- track last external event ---------- */
|
|
164
239
|
var lastExternalEventRef = (0, _react.useRef)(null);
|
|
165
240
|
(0, _react.useEffect)(function () {
|
|
166
|
-
if (externalEvent)
|
|
167
|
-
lastExternalEventRef.current = externalEvent;
|
|
168
|
-
}
|
|
241
|
+
if (externalEvent) lastExternalEventRef.current = externalEvent;
|
|
169
242
|
}, [externalEvent]);
|
|
170
243
|
|
|
171
244
|
/* ---------- error buffer + last emitted bundle ---------- */
|
|
172
|
-
var errorsBufferRef = (0, _react.useRef)([]);
|
|
245
|
+
var errorsBufferRef = (0, _react.useRef)([]);
|
|
173
246
|
var lastEmittedRef = (0, _react.useRef)({
|
|
174
247
|
externalEvent: null,
|
|
175
248
|
errors: []
|
|
176
|
-
});
|
|
249
|
+
});
|
|
177
250
|
var flushTimerRef = (0, _react.useRef)(null);
|
|
178
251
|
var emit = (0, _react.useCallback)(function (external, errors) {
|
|
179
252
|
var payload = {
|
|
@@ -182,13 +255,11 @@ function LiteRenderer(props) {
|
|
|
182
255
|
};
|
|
183
256
|
try {
|
|
184
257
|
onError === null || onError === void 0 || onError(payload);
|
|
185
|
-
} catch (
|
|
258
|
+
} catch (_unused5) {}
|
|
186
259
|
// eslint-disable-next-line no-console
|
|
187
260
|
console.debug('[LiteRenderer:onError]', payload);
|
|
188
261
|
lastEmittedRef.current = payload;
|
|
189
262
|
}, [onError]);
|
|
190
|
-
|
|
191
|
-
// batch short bursts (e.g., multiple async errors in same tick)
|
|
192
263
|
var scheduleFlush = (0, _react.useCallback)(function () {
|
|
193
264
|
if (flushTimerRef.current) return;
|
|
194
265
|
flushTimerRef.current = setTimeout(function () {
|
|
@@ -197,7 +268,7 @@ function LiteRenderer(props) {
|
|
|
197
268
|
if (!errors.length) return;
|
|
198
269
|
errorsBufferRef.current = [];
|
|
199
270
|
emit(lastExternalEventRef.current, errors);
|
|
200
|
-
}, 0);
|
|
271
|
+
}, 0);
|
|
201
272
|
}, [emit]);
|
|
202
273
|
var pushError = (0, _react.useCallback)(function (errPayload) {
|
|
203
274
|
errorsBufferRef.current.push(_objectSpread({
|
|
@@ -208,6 +279,7 @@ function LiteRenderer(props) {
|
|
|
208
279
|
|
|
209
280
|
/* ---------- global runtime + async error capture ---------- */
|
|
210
281
|
(0, _react.useEffect)(function () {
|
|
282
|
+
if (!isBrowser) return;
|
|
211
283
|
var onWindowError = function onWindowError(event) {
|
|
212
284
|
pushError({
|
|
213
285
|
type: 'runtime-error',
|
|
@@ -239,64 +311,20 @@ function LiteRenderer(props) {
|
|
|
239
311
|
var prev = prevExternalEventRef.current;
|
|
240
312
|
if (prev === externalEvent) return;
|
|
241
313
|
prevExternalEventRef.current = externalEvent;
|
|
242
|
-
|
|
243
|
-
// if we already emitted something before, re-send it with the new event context
|
|
244
314
|
var last = lastEmittedRef.current;
|
|
245
315
|
if (last && last.errors && last.errors.length) {
|
|
246
316
|
emit(lastExternalEventRef.current, last.errors);
|
|
247
317
|
}
|
|
248
318
|
}, [externalEvent, emit]);
|
|
249
|
-
var
|
|
250
|
-
logoImg =
|
|
251
|
-
companyUrl =
|
|
252
|
-
(0, _react.useEffect)(function () {
|
|
253
|
-
var initMyCatalog = /*#__PURE__*/function () {
|
|
254
|
-
var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
255
|
-
var x, _x, _x2;
|
|
256
|
-
return _regenerator["default"].wrap(function (_context) {
|
|
257
|
-
while (1) switch (_context.prev = _context.next) {
|
|
258
|
-
case 0:
|
|
259
|
-
for (x in Areas) MyCatalog.registerElement(Areas[x]);
|
|
260
|
-
for (_x in Lines) MyCatalog.registerElement(Lines[_x]);
|
|
261
|
-
for (_x2 in Holes) MyCatalog.registerElement(Holes[_x2]);
|
|
262
|
-
MyCatalog.registerCategory('Windows', 'Windows', [Holes.windowClear, Holes.windowCross, Holes.windowDoubleHung, Holes.windowVertical]);
|
|
263
|
-
MyCatalog.registerCategory('Doors', 'Doors', [Holes.doorInterior, Holes.doorExterior, Holes.doorCloset, Holes.doorSliding, Holes.doorwayFramed, Holes.doorwayFrameless]);
|
|
264
|
-
case 1:
|
|
265
|
-
case "end":
|
|
266
|
-
return _context.stop();
|
|
267
|
-
}
|
|
268
|
-
}, _callee);
|
|
269
|
-
}));
|
|
270
|
-
return function initMyCatalog() {
|
|
271
|
-
return _ref.apply(this, arguments);
|
|
272
|
-
};
|
|
273
|
-
}();
|
|
274
|
-
var initCatalog = /*#__PURE__*/function () {
|
|
275
|
-
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
276
|
-
return _regenerator["default"].wrap(function (_context2) {
|
|
277
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
278
|
-
case 0:
|
|
279
|
-
_context2.next = 1;
|
|
280
|
-
return initMyCatalog();
|
|
281
|
-
case 1:
|
|
282
|
-
case "end":
|
|
283
|
-
return _context2.stop();
|
|
284
|
-
}
|
|
285
|
-
}, _callee2);
|
|
286
|
-
}));
|
|
287
|
-
return function initCatalog() {
|
|
288
|
-
return _ref2.apply(this, arguments);
|
|
289
|
-
};
|
|
290
|
-
}();
|
|
291
|
-
initCatalog();
|
|
292
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
293
|
-
}, [id]);
|
|
319
|
+
var _ref = configData || {},
|
|
320
|
+
logoImg = _ref.logoImg,
|
|
321
|
+
companyUrl = _ref.companyUrl;
|
|
294
322
|
return /*#__PURE__*/_react["default"].createElement(_AppContext["default"].Provider, null, /*#__PURE__*/_react["default"].createElement(_reactRedux.Provider, {
|
|
295
|
-
store:
|
|
323
|
+
store: storeRef.current
|
|
296
324
|
}, /*#__PURE__*/_react["default"].createElement(ToolErrorBoundary, {
|
|
297
325
|
pushError: pushError
|
|
298
326
|
}, /*#__PURE__*/_react["default"].createElement(_LiteKitchenConfigurator["default"], (0, _extends2["default"])({
|
|
299
|
-
catalog:
|
|
327
|
+
catalog: catalogRef.current,
|
|
300
328
|
width: width,
|
|
301
329
|
height: height,
|
|
302
330
|
logoImage: logoImg,
|
|
@@ -310,9 +338,6 @@ function LiteRenderer(props) {
|
|
|
310
338
|
onInternalEvent: onInternalEvent
|
|
311
339
|
}, passThrough)))));
|
|
312
340
|
}
|
|
313
|
-
|
|
314
|
-
/* ============================== prop types ============================== */
|
|
315
|
-
|
|
316
341
|
LiteRenderer.propTypes = {
|
|
317
342
|
width: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
|
|
318
343
|
height: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
|