@carbonorm/carbonreact 4.0.25 → 5.0.4

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.
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var require$$0 = require('react');
3
+ var jsxRuntime = require('react/jsx-runtime');
4
4
  var reactRouterDom = require('react-router-dom');
5
+ var React = require('react');
5
6
  var reactToastify = require('react-toastify');
6
7
  var carbonnode = require('@carbonorm/carbonnode');
7
8
  var classNames = require('classnames');
@@ -10,433 +11,6 @@ var reactFontawesome = require('@fortawesome/react-fontawesome');
10
11
  var Skeleton = require('react-loading-skeleton');
11
12
  var react = require('@testing-library/react');
12
13
 
13
- var jsxRuntime = {exports: {}};
14
-
15
- var reactJsxRuntime_production = {};
16
-
17
- /**
18
- * @license React
19
- * react-jsx-runtime.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */
26
-
27
- var hasRequiredReactJsxRuntime_production;
28
-
29
- function requireReactJsxRuntime_production () {
30
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
31
- hasRequiredReactJsxRuntime_production = 1;
32
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
33
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
34
- function jsxProd(type, config, maybeKey) {
35
- var key = null;
36
- void 0 !== maybeKey && (key = "" + maybeKey);
37
- void 0 !== config.key && (key = "" + config.key);
38
- if ("key" in config) {
39
- maybeKey = {};
40
- for (var propName in config)
41
- "key" !== propName && (maybeKey[propName] = config[propName]);
42
- } else maybeKey = config;
43
- config = maybeKey.ref;
44
- return {
45
- $$typeof: REACT_ELEMENT_TYPE,
46
- type: type,
47
- key: key,
48
- ref: void 0 !== config ? config : null,
49
- props: maybeKey
50
- };
51
- }
52
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
53
- reactJsxRuntime_production.jsx = jsxProd;
54
- reactJsxRuntime_production.jsxs = jsxProd;
55
- return reactJsxRuntime_production;
56
- }
57
-
58
- var reactJsxRuntime_development = {};
59
-
60
- /**
61
- * @license React
62
- * react-jsx-runtime.development.js
63
- *
64
- * Copyright (c) Meta Platforms, Inc. and affiliates.
65
- *
66
- * This source code is licensed under the MIT license found in the
67
- * LICENSE file in the root directory of this source tree.
68
- */
69
-
70
- var hasRequiredReactJsxRuntime_development;
71
-
72
- function requireReactJsxRuntime_development () {
73
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
74
- hasRequiredReactJsxRuntime_development = 1;
75
- "production" !== process.env.NODE_ENV &&
76
- (function () {
77
- function getComponentNameFromType(type) {
78
- if (null == type) return null;
79
- if ("function" === typeof type)
80
- return type.$$typeof === REACT_CLIENT_REFERENCE
81
- ? null
82
- : type.displayName || type.name || null;
83
- if ("string" === typeof type) return type;
84
- switch (type) {
85
- case REACT_FRAGMENT_TYPE:
86
- return "Fragment";
87
- case REACT_PROFILER_TYPE:
88
- return "Profiler";
89
- case REACT_STRICT_MODE_TYPE:
90
- return "StrictMode";
91
- case REACT_SUSPENSE_TYPE:
92
- return "Suspense";
93
- case REACT_SUSPENSE_LIST_TYPE:
94
- return "SuspenseList";
95
- case REACT_ACTIVITY_TYPE:
96
- return "Activity";
97
- }
98
- if ("object" === typeof type)
99
- switch (
100
- ("number" === typeof type.tag &&
101
- console.error(
102
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
103
- ),
104
- type.$$typeof)
105
- ) {
106
- case REACT_PORTAL_TYPE:
107
- return "Portal";
108
- case REACT_CONTEXT_TYPE:
109
- return (type.displayName || "Context") + ".Provider";
110
- case REACT_CONSUMER_TYPE:
111
- return (type._context.displayName || "Context") + ".Consumer";
112
- case REACT_FORWARD_REF_TYPE:
113
- var innerType = type.render;
114
- type = type.displayName;
115
- type ||
116
- ((type = innerType.displayName || innerType.name || ""),
117
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
118
- return type;
119
- case REACT_MEMO_TYPE:
120
- return (
121
- (innerType = type.displayName || null),
122
- null !== innerType
123
- ? innerType
124
- : getComponentNameFromType(type.type) || "Memo"
125
- );
126
- case REACT_LAZY_TYPE:
127
- innerType = type._payload;
128
- type = type._init;
129
- try {
130
- return getComponentNameFromType(type(innerType));
131
- } catch (x) {}
132
- }
133
- return null;
134
- }
135
- function testStringCoercion(value) {
136
- return "" + value;
137
- }
138
- function checkKeyStringCoercion(value) {
139
- try {
140
- testStringCoercion(value);
141
- var JSCompiler_inline_result = !1;
142
- } catch (e) {
143
- JSCompiler_inline_result = true;
144
- }
145
- if (JSCompiler_inline_result) {
146
- JSCompiler_inline_result = console;
147
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
148
- var JSCompiler_inline_result$jscomp$0 =
149
- ("function" === typeof Symbol &&
150
- Symbol.toStringTag &&
151
- value[Symbol.toStringTag]) ||
152
- value.constructor.name ||
153
- "Object";
154
- JSCompiler_temp_const.call(
155
- JSCompiler_inline_result,
156
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
157
- JSCompiler_inline_result$jscomp$0
158
- );
159
- return testStringCoercion(value);
160
- }
161
- }
162
- function getTaskName(type) {
163
- if (type === REACT_FRAGMENT_TYPE) return "<>";
164
- if (
165
- "object" === typeof type &&
166
- null !== type &&
167
- type.$$typeof === REACT_LAZY_TYPE
168
- )
169
- return "<...>";
170
- try {
171
- var name = getComponentNameFromType(type);
172
- return name ? "<" + name + ">" : "<...>";
173
- } catch (x) {
174
- return "<...>";
175
- }
176
- }
177
- function getOwner() {
178
- var dispatcher = ReactSharedInternals.A;
179
- return null === dispatcher ? null : dispatcher.getOwner();
180
- }
181
- function UnknownOwner() {
182
- return Error("react-stack-top-frame");
183
- }
184
- function hasValidKey(config) {
185
- if (hasOwnProperty.call(config, "key")) {
186
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
187
- if (getter && getter.isReactWarning) return false;
188
- }
189
- return void 0 !== config.key;
190
- }
191
- function defineKeyPropWarningGetter(props, displayName) {
192
- function warnAboutAccessingKey() {
193
- specialPropKeyWarningShown ||
194
- ((specialPropKeyWarningShown = true),
195
- console.error(
196
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
197
- displayName
198
- ));
199
- }
200
- warnAboutAccessingKey.isReactWarning = true;
201
- Object.defineProperty(props, "key", {
202
- get: warnAboutAccessingKey,
203
- configurable: true
204
- });
205
- }
206
- function elementRefGetterWithDeprecationWarning() {
207
- var componentName = getComponentNameFromType(this.type);
208
- didWarnAboutElementRef[componentName] ||
209
- ((didWarnAboutElementRef[componentName] = true),
210
- console.error(
211
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
212
- ));
213
- componentName = this.props.ref;
214
- return void 0 !== componentName ? componentName : null;
215
- }
216
- function ReactElement(
217
- type,
218
- key,
219
- self,
220
- source,
221
- owner,
222
- props,
223
- debugStack,
224
- debugTask
225
- ) {
226
- self = props.ref;
227
- type = {
228
- $$typeof: REACT_ELEMENT_TYPE,
229
- type: type,
230
- key: key,
231
- props: props,
232
- _owner: owner
233
- };
234
- null !== (void 0 !== self ? self : null)
235
- ? Object.defineProperty(type, "ref", {
236
- enumerable: false,
237
- get: elementRefGetterWithDeprecationWarning
238
- })
239
- : Object.defineProperty(type, "ref", { enumerable: false, value: null });
240
- type._store = {};
241
- Object.defineProperty(type._store, "validated", {
242
- configurable: false,
243
- enumerable: false,
244
- writable: true,
245
- value: 0
246
- });
247
- Object.defineProperty(type, "_debugInfo", {
248
- configurable: false,
249
- enumerable: false,
250
- writable: true,
251
- value: null
252
- });
253
- Object.defineProperty(type, "_debugStack", {
254
- configurable: false,
255
- enumerable: false,
256
- writable: true,
257
- value: debugStack
258
- });
259
- Object.defineProperty(type, "_debugTask", {
260
- configurable: false,
261
- enumerable: false,
262
- writable: true,
263
- value: debugTask
264
- });
265
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
266
- return type;
267
- }
268
- function jsxDEVImpl(
269
- type,
270
- config,
271
- maybeKey,
272
- isStaticChildren,
273
- source,
274
- self,
275
- debugStack,
276
- debugTask
277
- ) {
278
- var children = config.children;
279
- if (void 0 !== children)
280
- if (isStaticChildren)
281
- if (isArrayImpl(children)) {
282
- for (
283
- isStaticChildren = 0;
284
- isStaticChildren < children.length;
285
- isStaticChildren++
286
- )
287
- validateChildKeys(children[isStaticChildren]);
288
- Object.freeze && Object.freeze(children);
289
- } else
290
- console.error(
291
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
292
- );
293
- else validateChildKeys(children);
294
- if (hasOwnProperty.call(config, "key")) {
295
- children = getComponentNameFromType(type);
296
- var keys = Object.keys(config).filter(function (k) {
297
- return "key" !== k;
298
- });
299
- isStaticChildren =
300
- 0 < keys.length
301
- ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
302
- : "{key: someKey}";
303
- didWarnAboutKeySpread[children + isStaticChildren] ||
304
- ((keys =
305
- 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
306
- console.error(
307
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
308
- isStaticChildren,
309
- children,
310
- keys,
311
- children
312
- ),
313
- (didWarnAboutKeySpread[children + isStaticChildren] = true));
314
- }
315
- children = null;
316
- void 0 !== maybeKey &&
317
- (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
318
- hasValidKey(config) &&
319
- (checkKeyStringCoercion(config.key), (children = "" + config.key));
320
- if ("key" in config) {
321
- maybeKey = {};
322
- for (var propName in config)
323
- "key" !== propName && (maybeKey[propName] = config[propName]);
324
- } else maybeKey = config;
325
- children &&
326
- defineKeyPropWarningGetter(
327
- maybeKey,
328
- "function" === typeof type
329
- ? type.displayName || type.name || "Unknown"
330
- : type
331
- );
332
- return ReactElement(
333
- type,
334
- children,
335
- self,
336
- source,
337
- getOwner(),
338
- maybeKey,
339
- debugStack,
340
- debugTask
341
- );
342
- }
343
- function validateChildKeys(node) {
344
- "object" === typeof node &&
345
- null !== node &&
346
- node.$$typeof === REACT_ELEMENT_TYPE &&
347
- node._store &&
348
- (node._store.validated = 1);
349
- }
350
- var React = require$$0,
351
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
352
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
353
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
354
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
355
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
356
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
357
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
358
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
359
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
360
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
361
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
362
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
363
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
364
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
365
- ReactSharedInternals =
366
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
367
- hasOwnProperty = Object.prototype.hasOwnProperty,
368
- isArrayImpl = Array.isArray,
369
- createTask = console.createTask
370
- ? console.createTask
371
- : function () {
372
- return null;
373
- };
374
- React = {
375
- "react-stack-bottom-frame": function (callStackForError) {
376
- return callStackForError();
377
- }
378
- };
379
- var specialPropKeyWarningShown;
380
- var didWarnAboutElementRef = {};
381
- var unknownOwnerDebugStack = React["react-stack-bottom-frame"].bind(
382
- React,
383
- UnknownOwner
384
- )();
385
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
386
- var didWarnAboutKeySpread = {};
387
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
388
- reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
389
- var trackActualOwner =
390
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
391
- return jsxDEVImpl(
392
- type,
393
- config,
394
- maybeKey,
395
- false,
396
- source,
397
- self,
398
- trackActualOwner
399
- ? Error("react-stack-top-frame")
400
- : unknownOwnerDebugStack,
401
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
402
- );
403
- };
404
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
405
- var trackActualOwner =
406
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
407
- return jsxDEVImpl(
408
- type,
409
- config,
410
- maybeKey,
411
- true,
412
- source,
413
- self,
414
- trackActualOwner
415
- ? Error("react-stack-top-frame")
416
- : unknownOwnerDebugStack,
417
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
418
- );
419
- };
420
- })();
421
- return reactJsxRuntime_development;
422
- }
423
-
424
- var hasRequiredJsxRuntime;
425
-
426
- function requireJsxRuntime () {
427
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
428
- hasRequiredJsxRuntime = 1;
429
-
430
- if (process.env.NODE_ENV === 'production') {
431
- jsxRuntime.exports = requireReactJsxRuntime_production();
432
- } else {
433
- jsxRuntime.exports = requireReactJsxRuntime_development();
434
- }
435
- return jsxRuntime.exports;
436
- }
437
-
438
- var jsxRuntimeExports = requireJsxRuntime();
439
-
440
14
  const clone = (obj) => {
441
15
  try {
442
16
  return structuredClone(obj);
@@ -486,8 +60,8 @@ function hexToRgb (hex) {
486
60
  var styles$1 = {"maintenanceHero":"C5KSPNF","httpStatusCode":"NhyRQts","centeredContainer":"nA4Uno6","errorTextGeneral":"yJAgaUs","errorKeys":"SRIoY4m","errorValues":"xQIsoNw","errorPre":"C6eWpJ3"};
487
61
 
488
62
  function OutsideClickHandler({ onOutsideClick, children, disabled, useCapture }) {
489
- const containerRef = require$$0.useRef(null);
490
- require$$0.useEffect(() => {
63
+ const containerRef = React.useRef(null);
64
+ React.useEffect(() => {
491
65
  if (disabled) {
492
66
  return;
493
67
  }
@@ -505,28 +79,28 @@ function OutsideClickHandler({ onOutsideClick, children, disabled, useCapture })
505
79
  document.removeEventListener('touchstart', handle, useCapture);
506
80
  };
507
81
  }, [onOutsideClick, disabled, useCapture]);
508
- return jsxRuntimeExports.jsx("div", { ref: containerRef, children: children });
82
+ return jsxRuntime.jsx("div", { ref: containerRef, children: children });
509
83
  }
510
84
 
511
85
  var BackendThrowable = (props) => {
512
86
  const { instance } = props;
513
87
  const currentThrowable = instance.state.backendThrowable[0];
514
88
  console.log([instance.state.backendThrowable, currentThrowable]);
515
- return jsxRuntimeExports.jsxs("div", { className: styles$1.maintenanceHero, children: [jsxRuntimeExports.jsx("h1", { className: styles$1.httpStatusCode, children: currentThrowable?.status || 500 }), jsxRuntimeExports.jsx(OutsideClickHandler, { onOutsideClick: () => instance.setState(currentState => ({ backendThrowable: currentState.backendThrowable.slice(1) })), children: jsxRuntimeExports.jsx("div", { className: styles$1.centeredContainer, children: Object.keys(currentThrowable).map((key, index) => {
89
+ return jsxRuntime.jsxs("div", { className: styles$1.maintenanceHero, children: [jsxRuntime.jsx("h1", { className: styles$1.httpStatusCode, children: currentThrowable?.status || 500 }), jsxRuntime.jsx(OutsideClickHandler, { onOutsideClick: () => instance.setState(currentState => ({ backendThrowable: currentState.backendThrowable.slice(1) })), children: jsxRuntime.jsx("div", { className: styles$1.centeredContainer, children: Object.keys(currentThrowable).map((key, index) => {
516
90
  const valueIsString = typeof currentThrowable[key] === 'string';
517
91
  const valueIsCode = 'THROWN NEAR' === key;
518
- return jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { className: styles$1.errorTextGeneral, children: [" > ", jsxRuntimeExports.jsx("span", { className: styles$1.errorKeys, children: key }), ":", valueIsString
519
- ? (valueIsCode ? jsxRuntimeExports.jsx("div", { style: { backgroundColor: 'black', fontSize: 'xx-small' }, dangerouslySetInnerHTML: { __html: currentThrowable[key] } }) :
520
- jsxRuntimeExports.jsxs("i", { className: styles$1.errorValues, children: ["\"", currentThrowable[key], "\""] }))
92
+ return jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs("div", { className: styles$1.errorTextGeneral, children: [" > ", jsxRuntime.jsx("span", { className: styles$1.errorKeys, children: key }), ":", valueIsString
93
+ ? (valueIsCode ? jsxRuntime.jsx("div", { style: { backgroundColor: 'black', fontSize: 'xx-small' }, dangerouslySetInnerHTML: { __html: currentThrowable[key] } }) :
94
+ jsxRuntime.jsxs("i", { className: styles$1.errorValues, children: ["\"", currentThrowable[key], "\""] }))
521
95
  : ''] }), valueIsString
522
96
  ? ''
523
- : jsxRuntimeExports.jsx("pre", { className: styles$1.errorPre, children: JSON.stringify(currentThrowable[key], undefined, 4) })] }, index);
97
+ : jsxRuntime.jsx("pre", { className: styles$1.errorPre, children: JSON.stringify(currentThrowable[key], undefined, 4) })] }, index);
524
98
  }) }) })] });
525
99
  };
526
100
 
527
101
  const range = n => new Array(n).fill(0).map((_, idx) => idx);
528
102
  // @link https://sites.google.com/site/webglbook/home/chapter-3
529
- class Nest extends require$$0.Component {
103
+ class Nest extends React.Component {
530
104
  static defaultProps = {
531
105
  backgroundColor: "white",
532
106
  display: "block",
@@ -642,7 +216,7 @@ class Nest extends require$$0.Component {
642
216
  cancelAnimationFrame(this.tid);
643
217
  }
644
218
  render() {
645
- return (jsxRuntimeExports.jsxs("div", { children: [this.props.children, jsxRuntimeExports.jsx("canvas", { id: "2d", width: window.innerWidth, height: window.innerHeight, style: {
219
+ return (jsxRuntime.jsxs("div", { children: [this.props.children, jsxRuntime.jsx("canvas", { id: "2d", width: window.innerWidth, height: window.innerHeight, style: {
646
220
  backgroundColor: this.props.backgroundColor,
647
221
  display: this.props.display,
648
222
  position: this.props.position,
@@ -3015,7 +2589,7 @@ function getStyles(overrides = {}) {
3015
2589
  // @link https://stackoverflow.com/questions/58399637/include-modal-functionality-in-react-higher-order-component
3016
2590
  function Popup({ open = true, handleClose, children, maxWidth, }) {
3017
2591
  const dig = getStyles();
3018
- return jsxRuntimeExports.jsx("div", { className: classNames(dig.modal, dig.fade, { [dig.show]: open }, dig.dBlock), style: { backgroundColor: "rgba(0,0,0,0.8)" }, id: "exampleModalCenter", tabIndex: -1, "aria-labelledby": "exampleModalCenterTitle", "aria-modal": "true", role: "dialog", children: jsxRuntimeExports.jsx("div", { style: { maxWidth: maxWidth }, className: classNames(dig.modalDialog, dig.modalDialogCentered), children: jsxRuntimeExports.jsx(OutsideClickHandler, { onOutsideClick: () => handleClose(), children: jsxRuntimeExports.jsx("div", { className: classNames(dig.modalContent, dig.bgTransparent, dig.modalDialogScrollable), children: children }) }) }) });
2592
+ return jsxRuntime.jsx("div", { className: classNames(dig.modal, dig.fade, { [dig.show]: open }, dig.dBlock), style: { backgroundColor: "rgba(0,0,0,0.8)" }, id: "exampleModalCenter", tabIndex: -1, "aria-labelledby": "exampleModalCenterTitle", "aria-modal": "true", role: "dialog", children: jsxRuntime.jsx("div", { style: { maxWidth: maxWidth }, className: classNames(dig.modalDialog, dig.modalDialogCentered), children: jsxRuntime.jsx(OutsideClickHandler, { onOutsideClick: () => handleClose(), children: jsxRuntime.jsx("div", { className: classNames(dig.modalContent, dig.bgTransparent, dig.modalDialogScrollable), children: children }) }) }) });
3019
2593
  }
3020
2594
 
3021
2595
  const isProduction = window.location.host.split(".")[0] === "www";
@@ -3105,20 +2679,20 @@ function Alert({ instance }) {
3105
2679
  handleClose();
3106
2680
  }, timeout);
3107
2681
  }
3108
- return jsxRuntimeExports.jsx(Popup, { handleClose: handleClose, children: jsxRuntimeExports.jsxs("div", { className: classNames("model-content", styles.rounded0, styles.border0), style: {
2682
+ return jsxRuntime.jsx(Popup, { handleClose: handleClose, children: jsxRuntime.jsxs("div", { className: classNames("model-content", styles.rounded0, styles.border0), style: {
3109
2683
  maxWidth: '75vw',
3110
2684
  maxHeight: '75vh',
3111
- }, children: [jsxRuntimeExports.jsxs("div", { className: classNames(styles.modalHeader, styles.rounded0, styles.border0, {
2685
+ }, children: [jsxRuntime.jsxs("div", { className: classNames(styles.modalHeader, styles.rounded0, styles.border0, {
3112
2686
  // icon?: "warning" | "error" | "success" | "info" | "question"
3113
2687
  [styles.bg_primary]: "info" === alert.icon || alert.icon === undefined || alert.icon === null,
3114
2688
  [styles.bg_success]: "success" === alert.icon,
3115
2689
  [styles.bg_warning]: "warning" === alert.icon,
3116
2690
  [styles.bg_danger]: "error" === alert.icon, // TODO - change to red
3117
2691
  [styles.bgPrimary]: "question" === alert.icon,
3118
- }), children: [jsxRuntimeExports.jsxs("h3", { className: classNames(styles.modalTitle, styles.textDark), id: "staticBackdropLabel", children: ["#", alertWaiting, " ", alert.title] }), jsxRuntimeExports.jsx("div", { onClick: handleClose, children: jsxRuntimeExports.jsx(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faClose, size: 'xl' }) })] }), jsxRuntimeExports.jsx("div", { className: classNames(styles.modalBody, styles.border0, styles.textWhite), children: jsxRuntimeExports.jsxs("div", { className: styles.textCenter, children: [alert.text, alert.component] }) }), undefined !== alert.buttons &&
3119
- jsxRuntimeExports.jsxs("div", { className: classNames(styles.modalFooter, styles.border0, styles.rounded0), children: [alert.footerText &&
3120
- jsxRuntimeExports.jsx("div", { className: classNames(styles.textCenter, styles.textWhite), children: alert.footerText }), alert.buttons?.map((button, index) => {
3121
- return jsxRuntimeExports.jsx("button", { className: classNames(styles.btn, styles.btnLg, {
2692
+ }), children: [jsxRuntime.jsxs("h3", { className: classNames(styles.modalTitle, styles.textDark), id: "staticBackdropLabel", children: ["#", alertWaiting, " ", alert.title] }), jsxRuntime.jsx("div", { onClick: handleClose, children: jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: freeSolidSvgIcons.faClose, size: 'xl' }) })] }), jsxRuntime.jsx("div", { className: classNames(styles.modalBody, styles.border0, styles.textWhite), children: jsxRuntime.jsxs("div", { className: styles.textCenter, children: [alert.text, alert.component] }) }), undefined !== alert.buttons &&
2693
+ jsxRuntime.jsxs("div", { className: classNames(styles.modalFooter, styles.border0, styles.rounded0), children: [alert.footerText &&
2694
+ jsxRuntime.jsx("div", { className: classNames(styles.textCenter, styles.textWhite), children: alert.footerText }), alert.buttons?.map((button, index) => {
2695
+ return jsxRuntime.jsx("button", { className: classNames(styles.btn, styles.btnLg, {
3122
2696
  // todo - color: "default" | "primary" | "secondary" | "inherit" | "danger" | "info" | "success" | "warning" | undefined,
3123
2697
  [styles.bg_success]: "success" === button.color,
3124
2698
  [styles.bg_danger]: "danger" === button.color,
@@ -3133,15 +2707,15 @@ function Alert({ instance }) {
3133
2707
 
3134
2708
  // @link https://dev.to/ag-grid/react-18-avoiding-use-effect-getting-called-twice-4i9e
3135
2709
  const useEffectOnce = (effect) => {
3136
- const effectFn = require$$0.useRef(effect);
3137
- const destroyFn = require$$0.useRef();
3138
- const effectCalled = require$$0.useRef(false);
3139
- const rendered = require$$0.useRef(false);
3140
- const [, setVal] = require$$0.useState(0);
2710
+ const effectFn = React.useRef(effect);
2711
+ const destroyFn = React.useRef(undefined);
2712
+ const effectCalled = React.useRef(false);
2713
+ const rendered = React.useRef(false);
2714
+ const [, setVal] = React.useState(0);
3141
2715
  if (effectCalled.current) {
3142
2716
  rendered.current = true;
3143
2717
  }
3144
- require$$0.useEffect(() => {
2718
+ React.useEffect(() => {
3145
2719
  if (!effectCalled.current) {
3146
2720
  destroyFn.current = effectFn.current();
3147
2721
  effectCalled.current = true;
@@ -3164,7 +2738,8 @@ const useEffectOnce = (effect) => {
3164
2738
  **/
3165
2739
  function initiateWebsocket(props) {
3166
2740
  let { instance, url = 'ws' + (window.location.protocol === 'https:' ? 's' : '') + '://' + window.location.host + '/carbonorm/websocket', timeoutSeconds = 250, heartbeatSeconds = 60, C6 } = props;
3167
- const { TABLES = undefined, IMPORT = undefined, } = C6 ?? {};
2741
+ const { TABLES = undefined, } = C6 ?? {};
2742
+ const verbose = carbonnode.isVerbose();
3168
2743
  const { websocket } = instance.state;
3169
2744
  if (!("WebSocket" in window)) {
3170
2745
  // todo - store that this has been shown in the state
@@ -3208,70 +2783,96 @@ function initiateWebsocket(props) {
3208
2783
  websocketData: prevState.websocketData.concat(parsedData), // JSON.parse no good - base64?
3209
2784
  }), () => {
3210
2785
  if (undefined === TABLES) {
3211
- console.log('WebSocket updates without the TABLES property passed will not automatically update the state.');
2786
+ if (verbose) {
2787
+ console.log('WebSocket updates without the TABLES property passed will not automatically update the state.');
2788
+ }
3212
2789
  return;
3213
2790
  }
3214
2791
  if (parsedData?.REST) {
3215
2792
  const TABLE_NAME = parsedData?.REST?.TABLE_NAME;
3216
- const TABLE_PREFIX = parsedData?.REST?.TABLE_PREFIX;
2793
+ const TABLE_PREFIX = parsedData?.REST?.TABLE_PREFIX ?? '';
3217
2794
  const METHOD = parsedData?.REST?.METHOD;
3218
2795
  const REQUEST = parsedData?.REST?.REQUEST;
3219
2796
  const REQUEST_PRIMARY_KEY = parsedData?.REST?.REQUEST_PRIMARY_KEY ?? null;
3220
2797
  if (null === REQUEST_PRIMARY_KEY) {
3221
- console.log('WebSocket updates without a primary key are not yet supported.');
2798
+ if (verbose) {
2799
+ console.log('WebSocket updates without a primary key are not yet supported.');
2800
+ }
3222
2801
  return;
3223
2802
  }
3224
- console.log('todo - going to impl REST', TABLE_NAME, METHOD, REQUEST_PRIMARY_KEY, parsedData?.REST);
3225
- const TABLE_NAME_SHORT = TABLE_NAME.substring(TABLE_PREFIX.length);
2803
+ if (verbose) {
2804
+ console.log('todo - going to impl REST', TABLE_NAME, METHOD, REQUEST_PRIMARY_KEY, parsedData?.REST);
2805
+ }
2806
+ const TABLE_NAME_SHORT = TABLE_NAME.startsWith(TABLE_PREFIX)
2807
+ ? TABLE_NAME.substring(TABLE_PREFIX.length)
2808
+ : TABLE_NAME;
3226
2809
  const currentCache = instance.state[TABLE_NAME_SHORT];
3227
2810
  // just because we have a websocket update, doesn't mean we need the update
3228
2811
  // check to see if the primary key is in the current cache
3229
2812
  const c6Table = TABLES[TABLE_NAME_SHORT] ?? null;
3230
2813
  if (null === c6Table) {
3231
- console.error('WebSocket update could not find (' + TABLE_NAME_SHORT + ') in the TABLES property passed.', TABLES);
2814
+ if (verbose) {
2815
+ console.error('WebSocket update could not find (' + TABLE_NAME_SHORT + ') in the TABLES property passed.', TABLES);
2816
+ }
3232
2817
  return;
3233
2818
  }
3234
- const primaryKeyKeys = Object.keys(REQUEST_PRIMARY_KEY);
3235
- // todo - which direction should we filter
3236
- const elementsToUpdate = currentCache?.filter((row) => {
3237
- for (const element of primaryKeyKeys) {
3238
- // remove the table name from the column name
3239
- const column = element.split('.')[1];
3240
- console.log('column', column, REQUEST_PRIMARY_KEY[element], row[column]);
3241
- if (REQUEST_PRIMARY_KEY[element] !== row[column]) {
3242
- return false;
2819
+ const columns = c6Table.COLUMNS;
2820
+ const validColumns = new Set(Object.values(columns));
2821
+ const normalizeRecord = (record) => {
2822
+ const normalized = {};
2823
+ for (const [key, value] of Object.entries(record ?? {})) {
2824
+ const shortKey = columns[key] ?? (key.includes('.') ? key.split('.').pop() : key);
2825
+ if (validColumns.has(shortKey)) {
2826
+ normalized[shortKey] = value;
3243
2827
  }
3244
2828
  }
3245
- return true;
3246
- }) ?? [];
3247
- console.log('elementsToUpdate', elementsToUpdate);
2829
+ return normalized;
2830
+ };
2831
+ const normalizedPrimaryKey = normalizeRecord(REQUEST_PRIMARY_KEY);
2832
+ const primaryKeyKeys = Object.keys(normalizedPrimaryKey);
2833
+ if (primaryKeyKeys.length === 0) {
2834
+ if (verbose) {
2835
+ console.error('WebSocket update could not map primary keys for', TABLE_NAME_SHORT, REQUEST_PRIMARY_KEY);
2836
+ }
2837
+ return;
2838
+ }
2839
+ // todo - which direction should we filter
2840
+ const elementsToUpdate = currentCache?.filter((row) => primaryKeyKeys.every((key) => normalizedPrimaryKey[key] === row[key])) ?? [];
2841
+ if (verbose) {
2842
+ console.log('elementsToUpdate', elementsToUpdate);
2843
+ }
3248
2844
  if (elementsToUpdate.length === 0) {
3249
- console.error('Could not find any elements to update in the cache.', elementsToUpdate, primaryKeyKeys, REQUEST_PRIMARY_KEY, currentCache);
2845
+ if (verbose) {
2846
+ console.error('Could not find any elements to update in the cache.', elementsToUpdate, primaryKeyKeys, REQUEST_PRIMARY_KEY, currentCache);
2847
+ }
3250
2848
  return;
3251
2849
  }
3252
- const updatedElements = elementsToUpdate.map((row) => {
3253
- return {
3254
- ...row,
3255
- ...REQUEST
3256
- };
3257
- });
3258
- updatedElements.forEach(async (row) => {
3259
- const RestRequests = await IMPORT?.(TABLE_NAME_SHORT);
3260
- const { postState, deleteState, putState, } = RestRequests;
3261
- switch (METHOD) {
3262
- case 'POST':
3263
- postState({}, row);
3264
- break;
3265
- case 'DELETE':
3266
- deleteState({}, row);
3267
- break;
3268
- case 'PUT':
3269
- putState({}, row);
3270
- break;
3271
- default:
2850
+ const normalizedRequest = normalizeRecord(REQUEST);
2851
+ const updatedElements = elementsToUpdate.map((row) => ({
2852
+ ...row,
2853
+ ...normalizedRequest,
2854
+ }));
2855
+ switch (METHOD) {
2856
+ case 'POST':
2857
+ case 'PUT':
2858
+ instance.updateRestfulObjectArrays({
2859
+ dataOrCallback: updatedElements,
2860
+ stateKey: TABLE_NAME_SHORT,
2861
+ uniqueObjectId: c6Table.PRIMARY_SHORT,
2862
+ });
2863
+ break;
2864
+ case 'DELETE':
2865
+ instance.deleteRestfulObjectArrays({
2866
+ dataOrCallback: elementsToUpdate,
2867
+ stateKey: TABLE_NAME_SHORT,
2868
+ uniqueObjectId: c6Table.PRIMARY_SHORT,
2869
+ });
2870
+ break;
2871
+ default:
2872
+ if (verbose) {
3272
2873
  console.error('Method not supported', METHOD);
3273
- }
3274
- });
2874
+ }
2875
+ }
3275
2876
  }
3276
2877
  });
3277
2878
  };
@@ -3474,9 +3075,9 @@ exports.eRouterType = void 0;
3474
3075
  eRouterType[eRouterType["HashRouter"] = 1] = "HashRouter";
3475
3076
  eRouterType[eRouterType["MemoryRouter"] = 2] = "MemoryRouter";
3476
3077
  })(exports.eRouterType || (exports.eRouterType = {}));
3477
- class CarbonReact extends require$$0.Component {
3078
+ class CarbonReact extends React.Component {
3478
3079
  static allInstances = new Map();
3479
- context = require$$0.createContext(this.state);
3080
+ context = React.createContext(this.state);
3480
3081
  target;
3481
3082
  static _instance;
3482
3083
  static getInstance(instanceId) {
@@ -3551,11 +3152,11 @@ class CarbonReact extends require$$0.Component {
3551
3152
  reactRouterContext(children) {
3552
3153
  switch (this.props.routerType ?? exports.eRouterType.BrowserRouter) {
3553
3154
  case exports.eRouterType.BrowserRouter:
3554
- return jsxRuntimeExports.jsx(reactRouterDom.BrowserRouter, { children: children });
3155
+ return jsxRuntime.jsx(reactRouterDom.BrowserRouter, { children: children });
3555
3156
  case exports.eRouterType.MemoryRouter:
3556
- return jsxRuntimeExports.jsx(reactRouterDom.MemoryRouter, { initialEntries: ['/'], children: children });
3157
+ return jsxRuntime.jsx(reactRouterDom.MemoryRouter, { initialEntries: ['/'], children: children });
3557
3158
  case exports.eRouterType.HashRouter:
3558
- return jsxRuntimeExports.jsx(reactRouterDom.HashRouter, { children: children });
3159
+ return jsxRuntime.jsx(reactRouterDom.HashRouter, { children: children });
3559
3160
  default:
3560
3161
  throw new Error('Invalid routerType');
3561
3162
  }
@@ -3564,14 +3165,14 @@ class CarbonReact extends require$$0.Component {
3564
3165
  console.log('CarbonORM TSX RENDER');
3565
3166
  const colorHex = '#' + Math.random().toString(16).slice(-6);
3566
3167
  console.log('%c color (' + colorHex + ')', 'color: ' + colorHex);
3567
- const nest = jsxRuntimeExports.jsx(Nest, { position: 'fixed', backgroundColor: '', color: hexToRgb(colorHex), count: 100 });
3168
+ const nest = jsxRuntime.jsx(Nest, { position: 'fixed', backgroundColor: '', color: hexToRgb(colorHex), count: 100 });
3568
3169
  if (this.state.backendThrowable.length > 0) {
3569
- return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [nest, jsxRuntimeExports.jsx(BackendThrowable, { instance: this })] });
3170
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [nest, jsxRuntime.jsx(BackendThrowable, { instance: this })] });
3570
3171
  }
3571
- this.context = require$$0.createContext(this.state);
3172
+ this.context = React.createContext(this.state);
3572
3173
  const Context = this.context.Provider;
3573
- return this.reactRouterContext(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalHistory, {}), this.props.websocket &&
3574
- jsxRuntimeExports.jsx(CarbonWebSocket, { ...(false !== this.props.websocket ? this.props.websocket : {}), instance: this }), jsxRuntimeExports.jsx(Context, { value: this.state, children: this.props.children }), jsxRuntimeExports.jsx(reactToastify.ToastContainer, {})] }));
3174
+ return this.reactRouterContext(jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(GlobalHistory, {}), this.props.websocket &&
3175
+ jsxRuntime.jsx(CarbonWebSocket, { ...(false !== this.props.websocket ? this.props.websocket : {}), instance: this }), jsxRuntime.jsx(Context, { value: this.state, children: this.props.children }), jsxRuntime.jsx(reactToastify.ToastContainer, {})] }));
3575
3176
  }
3576
3177
  }
3577
3178
 
@@ -3593,7 +3194,7 @@ function watchInputElementChangeEvent(event, cb, timeoutMs = 3000) {
3593
3194
  var styles = {"notfound":"_4yBvJ55","notfound_404":"WQ39uQo"};
3594
3195
 
3595
3196
  function AccessDenied({ children }) {
3596
- return (jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsx("div", { className: styles.notfound, children: jsxRuntimeExports.jsxs("div", { className: styles.notfound_404, children: [jsxRuntimeExports.jsx("h3", { children: "Oops! Access not granted" }), children, jsxRuntimeExports.jsxs("h1", { style: {
3197
+ return (jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", { className: styles.notfound, children: jsxRuntime.jsxs("div", { className: styles.notfound_404, children: [jsxRuntime.jsx("h3", { children: "Oops! Access not granted" }), children, jsxRuntime.jsxs("h1", { style: {
3597
3198
  position: "absolute",
3598
3199
  left: "50%",
3599
3200
  top: "50%",
@@ -3604,21 +3205,21 @@ function AccessDenied({ children }) {
3604
3205
  letterSpacing: "-40px",
3605
3206
  marginLeft: "-20px",
3606
3207
  marginTop: "20px"
3607
- }, children: [jsxRuntimeExports.jsx("span", { children: "4" }), jsxRuntimeExports.jsx("span", { children: "0" }), jsxRuntimeExports.jsx("span", { children: "3" })] })] }) }) }));
3208
+ }, children: [jsxRuntime.jsx("span", { children: "4" }), jsxRuntime.jsx("span", { children: "0" }), jsxRuntime.jsx("span", { children: "3" })] })] }) }) }));
3608
3209
  }
3609
3210
 
3610
3211
  function ErrorHttpCode({ code, title = 'Hey Gamer, we\'ve encountered an unexpected issue!', message = 'Our team has been alerted and is actively investigating the issue. Please continue playing or ask support for any questions.' }) {
3611
- return jsxRuntimeExports.jsx("main", { role: "main", children: jsxRuntimeExports.jsx("div", { className: classes.maintenance, children: jsxRuntimeExports.jsx("div", { className: classes.problemBox, children: jsxRuntimeExports.jsxs("div", { className: classes.notfound, children: [jsxRuntimeExports.jsxs("div", { className: classes.notfound_404, children: [jsxRuntimeExports.jsx("h3", { children: title }), jsxRuntimeExports.jsx("h1", { children: code })] }), jsxRuntimeExports.jsx("h2", { children: message })] }) }) }) });
3212
+ return jsxRuntime.jsx("main", { role: "main", children: jsxRuntime.jsx("div", { className: classes.maintenance, children: jsxRuntime.jsx("div", { className: classes.problemBox, children: jsxRuntime.jsxs("div", { className: classes.notfound, children: [jsxRuntime.jsxs("div", { className: classes.notfound_404, children: [jsxRuntime.jsx("h3", { children: title }), jsxRuntime.jsx("h1", { children: code })] }), jsxRuntime.jsx("h2", { children: message })] }) }) }) });
3612
3213
  }
3613
3214
 
3614
3215
  function PageNotFound() {
3615
- return jsxRuntimeExports.jsx("div", { children: jsxRuntimeExports.jsxs("div", { className: classes.notfound, children: [jsxRuntimeExports.jsxs("div", { className: classes.notfound_404, children: [jsxRuntimeExports.jsx("h3", { children: "Oops! Page not found" }), jsxRuntimeExports.jsxs("h1", { children: [jsxRuntimeExports.jsx("span", { children: "4" }), jsxRuntimeExports.jsx("span", { children: "0" }), jsxRuntimeExports.jsx("span", { children: "4" })] })] }), jsxRuntimeExports.jsx("h2", { children: "we are sorry, but the page you requested was not found" })] }) });
3216
+ return jsxRuntime.jsx("div", { children: jsxRuntime.jsxs("div", { className: classes.notfound, children: [jsxRuntime.jsxs("div", { className: classes.notfound_404, children: [jsxRuntime.jsx("h3", { children: "Oops! Page not found" }), jsxRuntime.jsxs("h1", { children: [jsxRuntime.jsx("span", { children: "4" }), jsxRuntime.jsx("span", { children: "0" }), jsxRuntime.jsx("span", { children: "4" })] })] }), jsxRuntime.jsx("h2", { children: "we are sorry, but the page you requested was not found" })] }) });
3616
3217
  }
3617
3218
 
3618
3219
  function Loading(props) {
3619
3220
  const dig = getStyles();
3620
3221
  const primaryColor = getRootStyleValue();
3621
- return jsxRuntimeExports.jsx("div", { className: classNames(dig.my5, dig.px3, dig.pb5, dig.container), style: { lineHeight: props.lineHeight || 4 }, children: jsxRuntimeExports.jsxs(Skeleton.SkeletonTheme, { baseColor: primaryColor, highlightColor: "#444", children: [jsxRuntimeExports.jsx(Skeleton, { className: classNames(dig.row, dig.my3, dig.justifyContentCenter, dig.mAuto), count: props.count || 1, height: 60, inline: true }), props.children, undefined !== props?.message && jsxRuntimeExports.jsx("h2", { style: {
3222
+ return jsxRuntime.jsx("div", { className: classNames(dig.my5, dig.px3, dig.pb5, dig.container), style: { lineHeight: props.lineHeight || 4 }, children: jsxRuntime.jsxs(Skeleton.SkeletonTheme, { baseColor: primaryColor, highlightColor: "#444", children: [jsxRuntime.jsx(Skeleton, { className: classNames(dig.row, dig.my3, dig.justifyContentCenter, dig.mAuto), count: props.count || 1, height: 60, inline: true }), props.children, undefined !== props?.message && jsxRuntime.jsx("h2", { style: {
3622
3223
  display: 'flex',
3623
3224
  alignItems: 'center',
3624
3225
  justifyContent: 'center',
@@ -3727,8 +3328,9 @@ function ValidSQL (sql) {
3727
3328
  function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/tests/' } = {}) {
3728
3329
  const fs = require("fs");
3729
3330
  const { inspect } = require("util");
3730
- const originalWindowLocation = window.location;
3331
+ const originalWindowLocation = window.location.href;
3731
3332
  const consoleOriginal = console;
3333
+ const isVerboseEnabled = carbonnode.isVerbose();
3732
3334
  const testName = () => expect.getState().currentTestName?.replaceAll(" ", "_").toLowerCase();
3733
3335
  const validSqlFile = () => sqlDirectory + testName() + '.json';
3734
3336
  const logsFile = () => logsDirectory + testName() + '.log';
@@ -3744,19 +3346,19 @@ function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/te
3744
3346
  global.console = {
3745
3347
  ...console,
3746
3348
  // use jest.fn() to silence, comment out to leave as it is
3747
- debug: (...args) => (carbonnode.isVerbose && consoleOriginal.debug(...args), asyncFileLogging('debug', ...args)),
3748
- error: (...args) => (carbonnode.isVerbose && consoleOriginal.error(...args), asyncFileLogging('error', ...args)),
3749
- group: (...args) => (carbonnode.isVerbose && consoleOriginal.group(...args), asyncFileLogging('group', ...args)),
3750
- groupCollapsed: (...args) => (carbonnode.isVerbose && consoleOriginal.groupCollapsed(args), asyncFileLogging('groupCollapsed', ...args)),
3751
- groupEnd: () => (carbonnode.isVerbose && consoleOriginal.groupEnd(), asyncFileLogging('groupEnd')),
3752
- info: (...args) => (carbonnode.isVerbose && consoleOriginal.info(...args), asyncFileLogging('info', ...args)),
3753
- log: (...args) => (carbonnode.isVerbose && consoleOriginal.log(...args), asyncFileLogging('log', ...args)),
3754
- table: (...args) => (carbonnode.isVerbose && consoleOriginal.table(...args), asyncFileLogging('table', ...args)),
3755
- trace: (...args) => (carbonnode.isVerbose && consoleOriginal.trace(...args), asyncFileLogging((() => {
3349
+ debug: (...args) => (isVerboseEnabled && consoleOriginal.debug(...args), asyncFileLogging('debug', ...args)),
3350
+ error: (...args) => (isVerboseEnabled && consoleOriginal.error(...args), asyncFileLogging('error', ...args)),
3351
+ group: (...args) => (isVerboseEnabled && consoleOriginal.group(...args), asyncFileLogging('group', ...args)),
3352
+ groupCollapsed: (...args) => (isVerboseEnabled && consoleOriginal.groupCollapsed(...args), asyncFileLogging('groupCollapsed', ...args)),
3353
+ groupEnd: () => (isVerboseEnabled && consoleOriginal.groupEnd(), asyncFileLogging('groupEnd')),
3354
+ info: (...args) => (isVerboseEnabled && consoleOriginal.info(...args), asyncFileLogging('info', ...args)),
3355
+ log: (...args) => (isVerboseEnabled && consoleOriginal.log(...args), asyncFileLogging('log', ...args)),
3356
+ table: (...args) => (isVerboseEnabled && consoleOriginal.table(...args), asyncFileLogging('table', ...args)),
3357
+ trace: (...args) => (isVerboseEnabled && consoleOriginal.trace(...args), asyncFileLogging((() => {
3756
3358
  const err = new Error();
3757
3359
  return err.stack;
3758
3360
  })())),
3759
- warn: (...args) => (carbonnode.isVerbose && consoleOriginal.warn(...args), asyncFileLogging('warn', ...args)),
3361
+ warn: (...args) => (isVerboseEnabled && consoleOriginal.warn(...args), asyncFileLogging('warn', ...args)),
3760
3362
  };
3761
3363
  afterEach(async () => {
3762
3364
  await react.waitFor(async () => {
@@ -3766,7 +3368,7 @@ function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/te
3766
3368
  console.log('After each Test (' + expect.getState().currentTestName + ')', validSQL, expect.getState());
3767
3369
  // restore `window.location` to the original `jsdom`
3768
3370
  // `Location` object
3769
- window.location = originalWindowLocation;
3371
+ window.location.href = originalWindowLocation;
3770
3372
  fs.writeFileSync(validSqlFile(), jsonSQL);
3771
3373
  }, 65000);
3772
3374
  }
@@ -3819,7 +3421,7 @@ async function uploadImageChange(event, uploadCallback) {
3819
3421
  if (isHeic) {
3820
3422
  // todo - this should be code split and lazy loaded, but doesn't work
3821
3423
  // look up code splitting, it could be an issue with rewired
3822
- file = (await require$$0.lazy(() => require("heic2any")))({
3424
+ file = (await React.lazy(() => require("heic2any")))({
3823
3425
  blob: file,
3824
3426
  toType: "image/webp",
3825
3427
  quality: 1.0, // 0.5 cuts the quality and size by half
@@ -3858,8 +3460,8 @@ function getWindowDimensions() {
3858
3460
  };
3859
3461
  }
3860
3462
  function useWindowDimensions() {
3861
- const [windowDimensions, setWindowDimensions] = require$$0.useState(getWindowDimensions());
3862
- require$$0.useEffect(() => {
3463
+ const [windowDimensions, setWindowDimensions] = React.useState(getWindowDimensions());
3464
+ React.useEffect(() => {
3863
3465
  function handleResize() {
3864
3466
  setWindowDimensions(getWindowDimensions());
3865
3467
  }
@@ -3943,4 +3545,4 @@ exports.wp_termmeta = wp_termmeta;
3943
3545
  exports.wp_terms = wp_terms;
3944
3546
  exports.wp_usermeta = wp_usermeta;
3945
3547
  exports.wp_users = wp_users;
3946
- //# sourceMappingURL=index.cjs.js.map
3548
+ //# sourceMappingURL=index.cjs.map