@carbonorm/carbonreact 4.0.24 → 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,9 +1,9 @@
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
- var OutsideClickHandler = require('react-outside-click-handler');
7
7
  var carbonnode = require('@carbonorm/carbonnode');
8
8
  var classNames = require('classnames');
9
9
  var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
@@ -11,433 +11,6 @@ var reactFontawesome = require('@fortawesome/react-fontawesome');
11
11
  var Skeleton = require('react-loading-skeleton');
12
12
  var react = require('@testing-library/react');
13
13
 
14
- var jsxRuntime = {exports: {}};
15
-
16
- var reactJsxRuntime_production = {};
17
-
18
- /**
19
- * @license React
20
- * react-jsx-runtime.production.js
21
- *
22
- * Copyright (c) Meta Platforms, Inc. and affiliates.
23
- *
24
- * This source code is licensed under the MIT license found in the
25
- * LICENSE file in the root directory of this source tree.
26
- */
27
-
28
- var hasRequiredReactJsxRuntime_production;
29
-
30
- function requireReactJsxRuntime_production () {
31
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
32
- hasRequiredReactJsxRuntime_production = 1;
33
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
34
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
35
- function jsxProd(type, config, maybeKey) {
36
- var key = null;
37
- void 0 !== maybeKey && (key = "" + maybeKey);
38
- void 0 !== config.key && (key = "" + config.key);
39
- if ("key" in config) {
40
- maybeKey = {};
41
- for (var propName in config)
42
- "key" !== propName && (maybeKey[propName] = config[propName]);
43
- } else maybeKey = config;
44
- config = maybeKey.ref;
45
- return {
46
- $$typeof: REACT_ELEMENT_TYPE,
47
- type: type,
48
- key: key,
49
- ref: void 0 !== config ? config : null,
50
- props: maybeKey
51
- };
52
- }
53
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
54
- reactJsxRuntime_production.jsx = jsxProd;
55
- reactJsxRuntime_production.jsxs = jsxProd;
56
- return reactJsxRuntime_production;
57
- }
58
-
59
- var reactJsxRuntime_development = {};
60
-
61
- /**
62
- * @license React
63
- * react-jsx-runtime.development.js
64
- *
65
- * Copyright (c) Meta Platforms, Inc. and affiliates.
66
- *
67
- * This source code is licensed under the MIT license found in the
68
- * LICENSE file in the root directory of this source tree.
69
- */
70
-
71
- var hasRequiredReactJsxRuntime_development;
72
-
73
- function requireReactJsxRuntime_development () {
74
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
75
- hasRequiredReactJsxRuntime_development = 1;
76
- "production" !== process.env.NODE_ENV &&
77
- (function () {
78
- function getComponentNameFromType(type) {
79
- if (null == type) return null;
80
- if ("function" === typeof type)
81
- return type.$$typeof === REACT_CLIENT_REFERENCE
82
- ? null
83
- : type.displayName || type.name || null;
84
- if ("string" === typeof type) return type;
85
- switch (type) {
86
- case REACT_FRAGMENT_TYPE:
87
- return "Fragment";
88
- case REACT_PROFILER_TYPE:
89
- return "Profiler";
90
- case REACT_STRICT_MODE_TYPE:
91
- return "StrictMode";
92
- case REACT_SUSPENSE_TYPE:
93
- return "Suspense";
94
- case REACT_SUSPENSE_LIST_TYPE:
95
- return "SuspenseList";
96
- case REACT_ACTIVITY_TYPE:
97
- return "Activity";
98
- }
99
- if ("object" === typeof type)
100
- switch (
101
- ("number" === typeof type.tag &&
102
- console.error(
103
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
104
- ),
105
- type.$$typeof)
106
- ) {
107
- case REACT_PORTAL_TYPE:
108
- return "Portal";
109
- case REACT_CONTEXT_TYPE:
110
- return (type.displayName || "Context") + ".Provider";
111
- case REACT_CONSUMER_TYPE:
112
- return (type._context.displayName || "Context") + ".Consumer";
113
- case REACT_FORWARD_REF_TYPE:
114
- var innerType = type.render;
115
- type = type.displayName;
116
- type ||
117
- ((type = innerType.displayName || innerType.name || ""),
118
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
119
- return type;
120
- case REACT_MEMO_TYPE:
121
- return (
122
- (innerType = type.displayName || null),
123
- null !== innerType
124
- ? innerType
125
- : getComponentNameFromType(type.type) || "Memo"
126
- );
127
- case REACT_LAZY_TYPE:
128
- innerType = type._payload;
129
- type = type._init;
130
- try {
131
- return getComponentNameFromType(type(innerType));
132
- } catch (x) {}
133
- }
134
- return null;
135
- }
136
- function testStringCoercion(value) {
137
- return "" + value;
138
- }
139
- function checkKeyStringCoercion(value) {
140
- try {
141
- testStringCoercion(value);
142
- var JSCompiler_inline_result = !1;
143
- } catch (e) {
144
- JSCompiler_inline_result = true;
145
- }
146
- if (JSCompiler_inline_result) {
147
- JSCompiler_inline_result = console;
148
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
149
- var JSCompiler_inline_result$jscomp$0 =
150
- ("function" === typeof Symbol &&
151
- Symbol.toStringTag &&
152
- value[Symbol.toStringTag]) ||
153
- value.constructor.name ||
154
- "Object";
155
- JSCompiler_temp_const.call(
156
- JSCompiler_inline_result,
157
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
158
- JSCompiler_inline_result$jscomp$0
159
- );
160
- return testStringCoercion(value);
161
- }
162
- }
163
- function getTaskName(type) {
164
- if (type === REACT_FRAGMENT_TYPE) return "<>";
165
- if (
166
- "object" === typeof type &&
167
- null !== type &&
168
- type.$$typeof === REACT_LAZY_TYPE
169
- )
170
- return "<...>";
171
- try {
172
- var name = getComponentNameFromType(type);
173
- return name ? "<" + name + ">" : "<...>";
174
- } catch (x) {
175
- return "<...>";
176
- }
177
- }
178
- function getOwner() {
179
- var dispatcher = ReactSharedInternals.A;
180
- return null === dispatcher ? null : dispatcher.getOwner();
181
- }
182
- function UnknownOwner() {
183
- return Error("react-stack-top-frame");
184
- }
185
- function hasValidKey(config) {
186
- if (hasOwnProperty.call(config, "key")) {
187
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
188
- if (getter && getter.isReactWarning) return false;
189
- }
190
- return void 0 !== config.key;
191
- }
192
- function defineKeyPropWarningGetter(props, displayName) {
193
- function warnAboutAccessingKey() {
194
- specialPropKeyWarningShown ||
195
- ((specialPropKeyWarningShown = true),
196
- console.error(
197
- "%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)",
198
- displayName
199
- ));
200
- }
201
- warnAboutAccessingKey.isReactWarning = true;
202
- Object.defineProperty(props, "key", {
203
- get: warnAboutAccessingKey,
204
- configurable: true
205
- });
206
- }
207
- function elementRefGetterWithDeprecationWarning() {
208
- var componentName = getComponentNameFromType(this.type);
209
- didWarnAboutElementRef[componentName] ||
210
- ((didWarnAboutElementRef[componentName] = true),
211
- console.error(
212
- "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."
213
- ));
214
- componentName = this.props.ref;
215
- return void 0 !== componentName ? componentName : null;
216
- }
217
- function ReactElement(
218
- type,
219
- key,
220
- self,
221
- source,
222
- owner,
223
- props,
224
- debugStack,
225
- debugTask
226
- ) {
227
- self = props.ref;
228
- type = {
229
- $$typeof: REACT_ELEMENT_TYPE,
230
- type: type,
231
- key: key,
232
- props: props,
233
- _owner: owner
234
- };
235
- null !== (void 0 !== self ? self : null)
236
- ? Object.defineProperty(type, "ref", {
237
- enumerable: false,
238
- get: elementRefGetterWithDeprecationWarning
239
- })
240
- : Object.defineProperty(type, "ref", { enumerable: false, value: null });
241
- type._store = {};
242
- Object.defineProperty(type._store, "validated", {
243
- configurable: false,
244
- enumerable: false,
245
- writable: true,
246
- value: 0
247
- });
248
- Object.defineProperty(type, "_debugInfo", {
249
- configurable: false,
250
- enumerable: false,
251
- writable: true,
252
- value: null
253
- });
254
- Object.defineProperty(type, "_debugStack", {
255
- configurable: false,
256
- enumerable: false,
257
- writable: true,
258
- value: debugStack
259
- });
260
- Object.defineProperty(type, "_debugTask", {
261
- configurable: false,
262
- enumerable: false,
263
- writable: true,
264
- value: debugTask
265
- });
266
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
267
- return type;
268
- }
269
- function jsxDEVImpl(
270
- type,
271
- config,
272
- maybeKey,
273
- isStaticChildren,
274
- source,
275
- self,
276
- debugStack,
277
- debugTask
278
- ) {
279
- var children = config.children;
280
- if (void 0 !== children)
281
- if (isStaticChildren)
282
- if (isArrayImpl(children)) {
283
- for (
284
- isStaticChildren = 0;
285
- isStaticChildren < children.length;
286
- isStaticChildren++
287
- )
288
- validateChildKeys(children[isStaticChildren]);
289
- Object.freeze && Object.freeze(children);
290
- } else
291
- console.error(
292
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
293
- );
294
- else validateChildKeys(children);
295
- if (hasOwnProperty.call(config, "key")) {
296
- children = getComponentNameFromType(type);
297
- var keys = Object.keys(config).filter(function (k) {
298
- return "key" !== k;
299
- });
300
- isStaticChildren =
301
- 0 < keys.length
302
- ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
303
- : "{key: someKey}";
304
- didWarnAboutKeySpread[children + isStaticChildren] ||
305
- ((keys =
306
- 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
307
- console.error(
308
- '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} />',
309
- isStaticChildren,
310
- children,
311
- keys,
312
- children
313
- ),
314
- (didWarnAboutKeySpread[children + isStaticChildren] = true));
315
- }
316
- children = null;
317
- void 0 !== maybeKey &&
318
- (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
319
- hasValidKey(config) &&
320
- (checkKeyStringCoercion(config.key), (children = "" + config.key));
321
- if ("key" in config) {
322
- maybeKey = {};
323
- for (var propName in config)
324
- "key" !== propName && (maybeKey[propName] = config[propName]);
325
- } else maybeKey = config;
326
- children &&
327
- defineKeyPropWarningGetter(
328
- maybeKey,
329
- "function" === typeof type
330
- ? type.displayName || type.name || "Unknown"
331
- : type
332
- );
333
- return ReactElement(
334
- type,
335
- children,
336
- self,
337
- source,
338
- getOwner(),
339
- maybeKey,
340
- debugStack,
341
- debugTask
342
- );
343
- }
344
- function validateChildKeys(node) {
345
- "object" === typeof node &&
346
- null !== node &&
347
- node.$$typeof === REACT_ELEMENT_TYPE &&
348
- node._store &&
349
- (node._store.validated = 1);
350
- }
351
- var React = require$$0,
352
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
353
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
354
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
355
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
356
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
357
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
358
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
359
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
360
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
361
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
362
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
363
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
364
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
365
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
366
- ReactSharedInternals =
367
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
368
- hasOwnProperty = Object.prototype.hasOwnProperty,
369
- isArrayImpl = Array.isArray,
370
- createTask = console.createTask
371
- ? console.createTask
372
- : function () {
373
- return null;
374
- };
375
- React = {
376
- "react-stack-bottom-frame": function (callStackForError) {
377
- return callStackForError();
378
- }
379
- };
380
- var specialPropKeyWarningShown;
381
- var didWarnAboutElementRef = {};
382
- var unknownOwnerDebugStack = React["react-stack-bottom-frame"].bind(
383
- React,
384
- UnknownOwner
385
- )();
386
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
387
- var didWarnAboutKeySpread = {};
388
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
389
- reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
390
- var trackActualOwner =
391
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
392
- return jsxDEVImpl(
393
- type,
394
- config,
395
- maybeKey,
396
- false,
397
- source,
398
- self,
399
- trackActualOwner
400
- ? Error("react-stack-top-frame")
401
- : unknownOwnerDebugStack,
402
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
403
- );
404
- };
405
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
406
- var trackActualOwner =
407
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
408
- return jsxDEVImpl(
409
- type,
410
- config,
411
- maybeKey,
412
- true,
413
- source,
414
- self,
415
- trackActualOwner
416
- ? Error("react-stack-top-frame")
417
- : unknownOwnerDebugStack,
418
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
419
- );
420
- };
421
- })();
422
- return reactJsxRuntime_development;
423
- }
424
-
425
- var hasRequiredJsxRuntime;
426
-
427
- function requireJsxRuntime () {
428
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
429
- hasRequiredJsxRuntime = 1;
430
-
431
- if (process.env.NODE_ENV === 'production') {
432
- jsxRuntime.exports = requireReactJsxRuntime_production();
433
- } else {
434
- jsxRuntime.exports = requireReactJsxRuntime_development();
435
- }
436
- return jsxRuntime.exports;
437
- }
438
-
439
- var jsxRuntimeExports = requireJsxRuntime();
440
-
441
14
  const clone = (obj) => {
442
15
  try {
443
16
  return structuredClone(obj);
@@ -486,25 +59,48 @@ function hexToRgb (hex) {
486
59
 
487
60
  var styles$1 = {"maintenanceHero":"C5KSPNF","httpStatusCode":"NhyRQts","centeredContainer":"nA4Uno6","errorTextGeneral":"yJAgaUs","errorKeys":"SRIoY4m","errorValues":"xQIsoNw","errorPre":"C6eWpJ3"};
488
61
 
62
+ function OutsideClickHandler({ onOutsideClick, children, disabled, useCapture }) {
63
+ const containerRef = React.useRef(null);
64
+ React.useEffect(() => {
65
+ if (disabled) {
66
+ return;
67
+ }
68
+ function handle(event) {
69
+ const element = containerRef.current;
70
+ if (!element || element.contains(event.target)) {
71
+ return;
72
+ }
73
+ onOutsideClick();
74
+ }
75
+ document.addEventListener('mousedown', handle, useCapture);
76
+ document.addEventListener('touchstart', handle, useCapture);
77
+ return () => {
78
+ document.removeEventListener('mousedown', handle, useCapture);
79
+ document.removeEventListener('touchstart', handle, useCapture);
80
+ };
81
+ }, [onOutsideClick, disabled, useCapture]);
82
+ return jsxRuntime.jsx("div", { ref: containerRef, children: children });
83
+ }
84
+
489
85
  var BackendThrowable = (props) => {
490
86
  const { instance } = props;
491
87
  const currentThrowable = instance.state.backendThrowable[0];
492
88
  console.log([instance.state.backendThrowable, currentThrowable]);
493
- 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) => {
494
90
  const valueIsString = typeof currentThrowable[key] === 'string';
495
91
  const valueIsCode = 'THROWN NEAR' === key;
496
- return jsxRuntimeExports.jsxs("div", { children: [jsxRuntimeExports.jsxs("div", { className: styles$1.errorTextGeneral, children: [" > ", jsxRuntimeExports.jsx("span", { className: styles$1.errorKeys, children: key }), ":", valueIsString
497
- ? (valueIsCode ? jsxRuntimeExports.jsx("div", { style: { backgroundColor: 'black', fontSize: 'xx-small' }, dangerouslySetInnerHTML: { __html: currentThrowable[key] } }) :
498
- 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], "\""] }))
499
95
  : ''] }), valueIsString
500
96
  ? ''
501
- : 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);
502
98
  }) }) })] });
503
99
  };
504
100
 
505
101
  const range = n => new Array(n).fill(0).map((_, idx) => idx);
506
102
  // @link https://sites.google.com/site/webglbook/home/chapter-3
507
- class Nest extends require$$0.Component {
103
+ class Nest extends React.Component {
508
104
  static defaultProps = {
509
105
  backgroundColor: "white",
510
106
  display: "block",
@@ -620,7 +216,7 @@ class Nest extends require$$0.Component {
620
216
  cancelAnimationFrame(this.tid);
621
217
  }
622
218
  render() {
623
- 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: {
624
220
  backgroundColor: this.props.backgroundColor,
625
221
  display: this.props.display,
626
222
  position: this.props.position,
@@ -2993,7 +2589,7 @@ function getStyles(overrides = {}) {
2993
2589
  // @link https://stackoverflow.com/questions/58399637/include-modal-functionality-in-react-higher-order-component
2994
2590
  function Popup({ open = true, handleClose, children, maxWidth, }) {
2995
2591
  const dig = getStyles();
2996
- 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 }) }) }) });
2997
2593
  }
2998
2594
 
2999
2595
  const isProduction = window.location.host.split(".")[0] === "www";
@@ -3083,20 +2679,20 @@ function Alert({ instance }) {
3083
2679
  handleClose();
3084
2680
  }, timeout);
3085
2681
  }
3086
- 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: {
3087
2683
  maxWidth: '75vw',
3088
2684
  maxHeight: '75vh',
3089
- }, 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, {
3090
2686
  // icon?: "warning" | "error" | "success" | "info" | "question"
3091
2687
  [styles.bg_primary]: "info" === alert.icon || alert.icon === undefined || alert.icon === null,
3092
2688
  [styles.bg_success]: "success" === alert.icon,
3093
2689
  [styles.bg_warning]: "warning" === alert.icon,
3094
2690
  [styles.bg_danger]: "error" === alert.icon, // TODO - change to red
3095
2691
  [styles.bgPrimary]: "question" === alert.icon,
3096
- }), 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 &&
3097
- jsxRuntimeExports.jsxs("div", { className: classNames(styles.modalFooter, styles.border0, styles.rounded0), children: [alert.footerText &&
3098
- jsxRuntimeExports.jsx("div", { className: classNames(styles.textCenter, styles.textWhite), children: alert.footerText }), alert.buttons?.map((button, index) => {
3099
- 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, {
3100
2696
  // todo - color: "default" | "primary" | "secondary" | "inherit" | "danger" | "info" | "success" | "warning" | undefined,
3101
2697
  [styles.bg_success]: "success" === button.color,
3102
2698
  [styles.bg_danger]: "danger" === button.color,
@@ -3111,15 +2707,15 @@ function Alert({ instance }) {
3111
2707
 
3112
2708
  // @link https://dev.to/ag-grid/react-18-avoiding-use-effect-getting-called-twice-4i9e
3113
2709
  const useEffectOnce = (effect) => {
3114
- const effectFn = require$$0.useRef(effect);
3115
- const destroyFn = require$$0.useRef();
3116
- const effectCalled = require$$0.useRef(false);
3117
- const rendered = require$$0.useRef(false);
3118
- 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);
3119
2715
  if (effectCalled.current) {
3120
2716
  rendered.current = true;
3121
2717
  }
3122
- require$$0.useEffect(() => {
2718
+ React.useEffect(() => {
3123
2719
  if (!effectCalled.current) {
3124
2720
  destroyFn.current = effectFn.current();
3125
2721
  effectCalled.current = true;
@@ -3142,7 +2738,8 @@ const useEffectOnce = (effect) => {
3142
2738
  **/
3143
2739
  function initiateWebsocket(props) {
3144
2740
  let { instance, url = 'ws' + (window.location.protocol === 'https:' ? 's' : '') + '://' + window.location.host + '/carbonorm/websocket', timeoutSeconds = 250, heartbeatSeconds = 60, C6 } = props;
3145
- const { TABLES = undefined, IMPORT = undefined, } = C6 ?? {};
2741
+ const { TABLES = undefined, } = C6 ?? {};
2742
+ const verbose = carbonnode.isVerbose();
3146
2743
  const { websocket } = instance.state;
3147
2744
  if (!("WebSocket" in window)) {
3148
2745
  // todo - store that this has been shown in the state
@@ -3186,70 +2783,96 @@ function initiateWebsocket(props) {
3186
2783
  websocketData: prevState.websocketData.concat(parsedData), // JSON.parse no good - base64?
3187
2784
  }), () => {
3188
2785
  if (undefined === TABLES) {
3189
- 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
+ }
3190
2789
  return;
3191
2790
  }
3192
2791
  if (parsedData?.REST) {
3193
2792
  const TABLE_NAME = parsedData?.REST?.TABLE_NAME;
3194
- const TABLE_PREFIX = parsedData?.REST?.TABLE_PREFIX;
2793
+ const TABLE_PREFIX = parsedData?.REST?.TABLE_PREFIX ?? '';
3195
2794
  const METHOD = parsedData?.REST?.METHOD;
3196
2795
  const REQUEST = parsedData?.REST?.REQUEST;
3197
2796
  const REQUEST_PRIMARY_KEY = parsedData?.REST?.REQUEST_PRIMARY_KEY ?? null;
3198
2797
  if (null === REQUEST_PRIMARY_KEY) {
3199
- 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
+ }
3200
2801
  return;
3201
2802
  }
3202
- console.log('todo - going to impl REST', TABLE_NAME, METHOD, REQUEST_PRIMARY_KEY, parsedData?.REST);
3203
- 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;
3204
2809
  const currentCache = instance.state[TABLE_NAME_SHORT];
3205
2810
  // just because we have a websocket update, doesn't mean we need the update
3206
2811
  // check to see if the primary key is in the current cache
3207
2812
  const c6Table = TABLES[TABLE_NAME_SHORT] ?? null;
3208
2813
  if (null === c6Table) {
3209
- 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
+ }
3210
2817
  return;
3211
2818
  }
3212
- const primaryKeyKeys = Object.keys(REQUEST_PRIMARY_KEY);
3213
- // todo - which direction should we filter
3214
- const elementsToUpdate = currentCache?.filter((row) => {
3215
- for (const element of primaryKeyKeys) {
3216
- // remove the table name from the column name
3217
- const column = element.split('.')[1];
3218
- console.log('column', column, REQUEST_PRIMARY_KEY[element], row[column]);
3219
- if (REQUEST_PRIMARY_KEY[element] !== row[column]) {
3220
- 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;
3221
2827
  }
3222
2828
  }
3223
- return true;
3224
- }) ?? [];
3225
- 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
+ }
3226
2844
  if (elementsToUpdate.length === 0) {
3227
- 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
+ }
3228
2848
  return;
3229
2849
  }
3230
- const updatedElements = elementsToUpdate.map((row) => {
3231
- return {
3232
- ...row,
3233
- ...REQUEST
3234
- };
3235
- });
3236
- updatedElements.forEach(async (row) => {
3237
- const RestRequests = await IMPORT?.(TABLE_NAME_SHORT);
3238
- const { postState, deleteState, putState, } = RestRequests;
3239
- switch (METHOD) {
3240
- case 'POST':
3241
- postState({}, row);
3242
- break;
3243
- case 'DELETE':
3244
- deleteState({}, row);
3245
- break;
3246
- case 'PUT':
3247
- putState({}, row);
3248
- break;
3249
- 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) {
3250
2873
  console.error('Method not supported', METHOD);
3251
- }
3252
- });
2874
+ }
2875
+ }
3253
2876
  }
3254
2877
  });
3255
2878
  };
@@ -3452,9 +3075,9 @@ exports.eRouterType = void 0;
3452
3075
  eRouterType[eRouterType["HashRouter"] = 1] = "HashRouter";
3453
3076
  eRouterType[eRouterType["MemoryRouter"] = 2] = "MemoryRouter";
3454
3077
  })(exports.eRouterType || (exports.eRouterType = {}));
3455
- class CarbonReact extends require$$0.Component {
3078
+ class CarbonReact extends React.Component {
3456
3079
  static allInstances = new Map();
3457
- context = require$$0.createContext(this.state);
3080
+ context = React.createContext(this.state);
3458
3081
  target;
3459
3082
  static _instance;
3460
3083
  static getInstance(instanceId) {
@@ -3529,11 +3152,11 @@ class CarbonReact extends require$$0.Component {
3529
3152
  reactRouterContext(children) {
3530
3153
  switch (this.props.routerType ?? exports.eRouterType.BrowserRouter) {
3531
3154
  case exports.eRouterType.BrowserRouter:
3532
- return jsxRuntimeExports.jsx(reactRouterDom.BrowserRouter, { children: children });
3155
+ return jsxRuntime.jsx(reactRouterDom.BrowserRouter, { children: children });
3533
3156
  case exports.eRouterType.MemoryRouter:
3534
- return jsxRuntimeExports.jsx(reactRouterDom.MemoryRouter, { initialEntries: ['/'], children: children });
3157
+ return jsxRuntime.jsx(reactRouterDom.MemoryRouter, { initialEntries: ['/'], children: children });
3535
3158
  case exports.eRouterType.HashRouter:
3536
- return jsxRuntimeExports.jsx(reactRouterDom.HashRouter, { children: children });
3159
+ return jsxRuntime.jsx(reactRouterDom.HashRouter, { children: children });
3537
3160
  default:
3538
3161
  throw new Error('Invalid routerType');
3539
3162
  }
@@ -3542,14 +3165,14 @@ class CarbonReact extends require$$0.Component {
3542
3165
  console.log('CarbonORM TSX RENDER');
3543
3166
  const colorHex = '#' + Math.random().toString(16).slice(-6);
3544
3167
  console.log('%c color (' + colorHex + ')', 'color: ' + colorHex);
3545
- 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 });
3546
3169
  if (this.state.backendThrowable.length > 0) {
3547
- 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 })] });
3548
3171
  }
3549
- this.context = require$$0.createContext(this.state);
3172
+ this.context = React.createContext(this.state);
3550
3173
  const Context = this.context.Provider;
3551
- return this.reactRouterContext(jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsx(GlobalHistory, {}), this.props.websocket &&
3552
- 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, {})] }));
3553
3176
  }
3554
3177
  }
3555
3178
 
@@ -3571,7 +3194,7 @@ function watchInputElementChangeEvent(event, cb, timeoutMs = 3000) {
3571
3194
  var styles = {"notfound":"_4yBvJ55","notfound_404":"WQ39uQo"};
3572
3195
 
3573
3196
  function AccessDenied({ children }) {
3574
- 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: {
3575
3198
  position: "absolute",
3576
3199
  left: "50%",
3577
3200
  top: "50%",
@@ -3582,21 +3205,21 @@ function AccessDenied({ children }) {
3582
3205
  letterSpacing: "-40px",
3583
3206
  marginLeft: "-20px",
3584
3207
  marginTop: "20px"
3585
- }, 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" })] })] }) }) }));
3586
3209
  }
3587
3210
 
3588
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.' }) {
3589
- 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 })] }) }) }) });
3590
3213
  }
3591
3214
 
3592
3215
  function PageNotFound() {
3593
- 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" })] }) });
3594
3217
  }
3595
3218
 
3596
3219
  function Loading(props) {
3597
3220
  const dig = getStyles();
3598
3221
  const primaryColor = getRootStyleValue();
3599
- 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: {
3600
3223
  display: 'flex',
3601
3224
  alignItems: 'center',
3602
3225
  justifyContent: 'center',
@@ -3705,8 +3328,9 @@ function ValidSQL (sql) {
3705
3328
  function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/tests/' } = {}) {
3706
3329
  const fs = require("fs");
3707
3330
  const { inspect } = require("util");
3708
- const originalWindowLocation = window.location;
3331
+ const originalWindowLocation = window.location.href;
3709
3332
  const consoleOriginal = console;
3333
+ const isVerboseEnabled = carbonnode.isVerbose();
3710
3334
  const testName = () => expect.getState().currentTestName?.replaceAll(" ", "_").toLowerCase();
3711
3335
  const validSqlFile = () => sqlDirectory + testName() + '.json';
3712
3336
  const logsFile = () => logsDirectory + testName() + '.log';
@@ -3722,19 +3346,19 @@ function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/te
3722
3346
  global.console = {
3723
3347
  ...console,
3724
3348
  // use jest.fn() to silence, comment out to leave as it is
3725
- debug: (...args) => (carbonnode.isVerbose && consoleOriginal.debug(...args), asyncFileLogging('debug', ...args)),
3726
- error: (...args) => (carbonnode.isVerbose && consoleOriginal.error(...args), asyncFileLogging('error', ...args)),
3727
- group: (...args) => (carbonnode.isVerbose && consoleOriginal.group(...args), asyncFileLogging('group', ...args)),
3728
- groupCollapsed: (...args) => (carbonnode.isVerbose && consoleOriginal.groupCollapsed(args), asyncFileLogging('groupCollapsed', ...args)),
3729
- groupEnd: () => (carbonnode.isVerbose && consoleOriginal.groupEnd(), asyncFileLogging('groupEnd')),
3730
- info: (...args) => (carbonnode.isVerbose && consoleOriginal.info(...args), asyncFileLogging('info', ...args)),
3731
- log: (...args) => (carbonnode.isVerbose && consoleOriginal.log(...args), asyncFileLogging('log', ...args)),
3732
- table: (...args) => (carbonnode.isVerbose && consoleOriginal.table(...args), asyncFileLogging('table', ...args)),
3733
- 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((() => {
3734
3358
  const err = new Error();
3735
3359
  return err.stack;
3736
3360
  })())),
3737
- warn: (...args) => (carbonnode.isVerbose && consoleOriginal.warn(...args), asyncFileLogging('warn', ...args)),
3361
+ warn: (...args) => (isVerboseEnabled && consoleOriginal.warn(...args), asyncFileLogging('warn', ...args)),
3738
3362
  };
3739
3363
  afterEach(async () => {
3740
3364
  await react.waitFor(async () => {
@@ -3744,7 +3368,7 @@ function setupTests ({ sqlDirectory = './logs/rest/', logsDirectory = './logs/te
3744
3368
  console.log('After each Test (' + expect.getState().currentTestName + ')', validSQL, expect.getState());
3745
3369
  // restore `window.location` to the original `jsdom`
3746
3370
  // `Location` object
3747
- window.location = originalWindowLocation;
3371
+ window.location.href = originalWindowLocation;
3748
3372
  fs.writeFileSync(validSqlFile(), jsonSQL);
3749
3373
  }, 65000);
3750
3374
  }
@@ -3797,7 +3421,7 @@ async function uploadImageChange(event, uploadCallback) {
3797
3421
  if (isHeic) {
3798
3422
  // todo - this should be code split and lazy loaded, but doesn't work
3799
3423
  // look up code splitting, it could be an issue with rewired
3800
- file = (await require$$0.lazy(() => require("heic2any")))({
3424
+ file = (await React.lazy(() => require("heic2any")))({
3801
3425
  blob: file,
3802
3426
  toType: "image/webp",
3803
3427
  quality: 1.0, // 0.5 cuts the quality and size by half
@@ -3836,8 +3460,8 @@ function getWindowDimensions() {
3836
3460
  };
3837
3461
  }
3838
3462
  function useWindowDimensions() {
3839
- const [windowDimensions, setWindowDimensions] = require$$0.useState(getWindowDimensions());
3840
- require$$0.useEffect(() => {
3463
+ const [windowDimensions, setWindowDimensions] = React.useState(getWindowDimensions());
3464
+ React.useEffect(() => {
3841
3465
  function handleResize() {
3842
3466
  setWindowDimensions(getWindowDimensions());
3843
3467
  }
@@ -3858,6 +3482,7 @@ exports.ErrorHttpCode = ErrorHttpCode;
3858
3482
  exports.GlobalHistory = GlobalHistory;
3859
3483
  exports.Loading = Loading;
3860
3484
  exports.Nest = Nest;
3485
+ exports.OutsideClickHandler = OutsideClickHandler;
3861
3486
  exports.PageNotFound = PageNotFound;
3862
3487
  exports.Popup = Popup;
3863
3488
  exports.TABLES = TABLES;
@@ -3920,4 +3545,4 @@ exports.wp_termmeta = wp_termmeta;
3920
3545
  exports.wp_terms = wp_terms;
3921
3546
  exports.wp_usermeta = wp_usermeta;
3922
3547
  exports.wp_users = wp_users;
3923
- //# sourceMappingURL=index.cjs.js.map
3548
+ //# sourceMappingURL=index.cjs.map