@ebertjendustries/cswrapper 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,115 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ CSAlert: () => CSAlert,
24
+ CSBox: () => CSBox,
25
+ CSButton: () => CSButton,
26
+ CSCheckbox: () => CSCheckbox,
27
+ CSCopyToClipboard: () => CSCopyToClipboard,
28
+ CSDatePicker: () => CSDatePicker,
29
+ CSEnumMultiselect: () => CSEnumMultiselect,
30
+ CSEnumSegmentedControl: () => CSEnumSegmentedControl,
31
+ CSEnumSelect: () => CSEnumSelect,
32
+ CSEnumTiles: () => CSEnumTiles,
33
+ CSExternalLink: () => CSExternalLink,
34
+ CSFormField: () => CSFormField,
35
+ CSHeader: () => CSHeader,
36
+ CSInput: () => CSInput,
37
+ CSLink: () => CSLink,
38
+ CSMultiselect: () => CSMultiselect,
39
+ CSNumericInput: () => CSNumericInput,
40
+ CSSegmentedControl: () => CSSegmentedControl,
41
+ CSSelect: () => CSSelect,
42
+ CSStatusIndicator: () => CSStatusIndicator,
43
+ CSTextContent: () => CSTextContent,
44
+ CSTextarea: () => CSTextarea,
45
+ CSTimeInput: () => CSTimeInput,
46
+ CSToggle: () => CSToggle,
47
+ CSVEnumRatingView: () => CSVEnumRatingView,
48
+ CSVNoItemsView: () => CSVNoItemsView,
49
+ CSVPriceInputView: () => CSVPriceInputView,
50
+ CSVSearchFilterView: () => CSVSearchFilterView,
51
+ CSVTextPromptModalView: () => CSVTextPromptModalView,
52
+ CSV_ENUM_RATING_VIEW_SPEC: () => CSV_ENUM_RATING_VIEW_SPEC,
53
+ CSV_NO_ITEMS_VIEW_SPEC: () => CSV_NO_ITEMS_VIEW_SPEC,
54
+ CSV_PRICE_INPUT_VIEW_SPEC: () => CSV_PRICE_INPUT_VIEW_SPEC,
55
+ CSV_SEARCH_FILTER_VIEW_SPEC: () => CSV_SEARCH_FILTER_VIEW_SPEC,
56
+ CSV_TEXT_PROMPT_MODAL_VIEW_SPEC: () => CSV_TEXT_PROMPT_MODAL_VIEW_SPEC,
57
+ ChildUtils: () => ChildUtils,
58
+ ControllerState: () => ControllerState,
59
+ DateUtils: () => DateUtils,
60
+ ELEMENT_VALIDITY_LEVEL_FACTORY: () => ELEMENT_VALIDITY_LEVEL_FACTORY,
61
+ ElementValidityLevel: () => ElementValidityLevel,
62
+ EnumFactory: () => EnumFactory,
63
+ FORM_FIELD_ID_SUFFIX: () => FORM_FIELD_ID_SUFFIX,
64
+ FieldProperties: () => FieldProperties,
65
+ FieldSpec: () => FieldSpec,
66
+ FixedWidth: () => FixedWidth,
67
+ FromPropsHelper: () => FromPropsHelper,
68
+ LocalStorageService: () => LocalStorageService,
69
+ LocalisationNamespace: () => LocalisationNamespace,
70
+ Localiser: () => Localiser,
71
+ Log: () => Log,
72
+ MESSAGE_SEVERITY_FACTORY: () => MESSAGE_SEVERITY_FACTORY,
73
+ MessageCTO: () => MessageCTO,
74
+ MessageCodeTO: () => MessageCodeTO,
75
+ MessageService: () => MessageService,
76
+ MessageSeverity: () => MessageSeverity,
77
+ NO_HTTP_CODE: () => NO_HTTP_CODE,
78
+ NSK_CONTENT: () => NSK_CONTENT,
79
+ ObjectWithId: () => ObjectWithId,
80
+ PriceUtils: () => PriceUtils,
81
+ QUERY_SEP: () => QUERY_SEP,
82
+ QUERY_START: () => QUERY_START,
83
+ QueryParamHelper: () => QueryParamHelper,
84
+ REST_CLIENT_LOGGER: () => REST_CLIENT_LOGGER,
85
+ RestClient: () => RestClient,
86
+ RunFunctionResult: () => RunFunctionResult,
87
+ SelectHelper: () => SelectHelper,
88
+ TECHNICAL_CONTROLLER_ID: () => TECHNICAL_CONTROLLER_ID,
89
+ ViewSpec: () => ViewSpec,
90
+ createRestClient: () => createRestClient,
91
+ fatalRunErrorFunction: () => fatalRunErrorFunction,
92
+ filterArrayByIndices: () => filterArrayByIndices,
93
+ getEnumRatingLabel: () => getEnumRatingLabel,
94
+ getEnumRatingValues: () => getEnumRatingValues,
95
+ indexRangeArray: () => indexRangeArray,
96
+ isContentWithMessages: () => isContentWithMessages,
97
+ openInNewTab: () => openInNewTab,
98
+ singleChangeHandlerToMulti: () => singleChangeHandlerToMulti,
99
+ sleep: () => sleep,
100
+ sortArrayByIndices: () => sortArrayByIndices,
101
+ useAWSUIRef: () => useAWSUIRef,
102
+ useControllerDisplayState: () => useControllerDisplayState,
103
+ useHotkey: () => useHotkey,
104
+ useMessages: () => useMessages,
105
+ useTOArrayChangeHandler: () => useTOArrayChangeHandler,
106
+ useTOChangeHandler: () => useTOChangeHandler,
107
+ warnWhenTabIsClosed: () => warnWhenTabIsClosed
108
+ });
109
+ module.exports = __toCommonJS(index_exports);
110
+
1
111
  // src/components/CSAlert.tsx
2
- import { Alert } from "@cloudscape-design/components";
112
+ var import_components2 = require("@cloudscape-design/components");
3
113
 
4
114
  // src/types/CSFormProps.ts
5
115
  var FromPropsHelper = class {
@@ -29,8 +139,13 @@ FromPropsHelper.sanitizeValueToString = (value) => {
29
139
  };
30
140
 
31
141
  // src/components/CSFormField.tsx
32
- import { FormField } from "@cloudscape-design/components";
33
- import { jsx } from "react/jsx-runtime";
142
+ var import_components = require("@cloudscape-design/components");
143
+ var import_jsx_runtime = (
144
+ // IMPORTANT: Order of props determines which one "wins". You can override Elements that are present in the
145
+ // localisation texts via the additional props. For instance, you can pass in
146
+ // non-static localisations that require variable values dynamically.
147
+ require("react/jsx-runtime")
148
+ );
34
149
  var FORM_FIELD_ID_SUFFIX = "_FORM_FIELD";
35
150
  function CSFormField(props) {
36
151
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
@@ -38,31 +153,26 @@ function CSFormField(props) {
38
153
  if (!FromPropsHelper.usesFormField(props)) {
39
154
  return props.children;
40
155
  }
41
- return (
42
- // IMPORTANT: Order of props determines which one "wins". You can override Elements that are present in the
43
- // localisation texts via the additional props. For instance, you can pass in
44
- // non-static localisations that require variable values dynamically.
45
- /* @__PURE__ */ jsx(FormField, { "data-testid": formFieldId, ...localisationObject == null ? void 0 : localisationObject.formField, ...props.formField, children: props.children })
46
- );
156
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components.FormField, { "data-testid": formFieldId, ...localisationObject == null ? void 0 : localisationObject.formField, ...props.formField, children: props.children });
47
157
  }
48
158
 
49
159
  // src/components/ChildUtils.tsx
50
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
160
+ var import_jsx_runtime2 = require("react/jsx-runtime");
51
161
  var ChildUtils = class {
52
162
  };
53
163
  ChildUtils.getChildren = (props, localisationObject) => {
54
164
  var _a, _b;
55
165
  const childrenRaw = (_a = props.children) != null ? _a : localisationObject == null ? void 0 : localisationObject.children;
56
166
  const children = props.childrenWrapper ? props.childrenWrapper(childrenRaw) : childrenRaw;
57
- let finalChildren = props.preventOverflow ? /* @__PURE__ */ jsx2("div", { style: {
167
+ let finalChildren = props.preventOverflow ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
58
168
  whiteSpace: "nowrap",
59
169
  overflow: "hidden",
60
170
  textOverflow: "ellipsis"
61
171
  }, children }) : children;
62
172
  let formFieldProps = (_b = props.formField) != null ? _b : localisationObject == null ? void 0 : localisationObject.formField;
63
173
  if (props.inlineLabel && FromPropsHelper.usesFormField(props)) {
64
- finalChildren = /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexWrap: "nowrap" }, children: [
65
- /* @__PURE__ */ jsx2("div", { style: {
174
+ finalChildren = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexWrap: "nowrap" }, children: [
175
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
66
176
  flex: "none",
67
177
  fontWeight: "bold",
68
178
  paddingRight: "5px"
@@ -75,12 +185,12 @@ ChildUtils.getChildren = (props, localisationObject) => {
75
185
  };
76
186
 
77
187
  // src/components/CSAlert.tsx
78
- import { jsx as jsx3 } from "react/jsx-runtime";
188
+ var import_jsx_runtime3 = require("react/jsx-runtime");
79
189
  function CSAlert(props) {
80
190
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
81
191
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
82
- return /* @__PURE__ */ jsx3(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx3(
83
- Alert,
192
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
193
+ import_components2.Alert,
84
194
  {
85
195
  "data-testid": uniqueId,
86
196
  ...props,
@@ -91,13 +201,13 @@ function CSAlert(props) {
91
201
  }
92
202
 
93
203
  // src/components/CSBox.tsx
94
- import { Box } from "@cloudscape-design/components";
95
- import { jsx as jsx4 } from "react/jsx-runtime";
204
+ var import_components3 = require("@cloudscape-design/components");
205
+ var import_jsx_runtime4 = require("react/jsx-runtime");
96
206
  function CSBox(props) {
97
207
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
98
208
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
99
- return /* @__PURE__ */ jsx4(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx4(
100
- Box,
209
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
210
+ import_components3.Box,
101
211
  {
102
212
  "data-testid": uniqueId,
103
213
  ...props,
@@ -108,13 +218,13 @@ function CSBox(props) {
108
218
  }
109
219
 
110
220
  // src/components/CSButton.tsx
111
- import { Button } from "@cloudscape-design/components";
112
- import { jsx as jsx5 } from "react/jsx-runtime";
221
+ var import_components4 = require("@cloudscape-design/components");
222
+ var import_jsx_runtime5 = require("react/jsx-runtime");
113
223
  function CSButton(props) {
114
224
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
115
225
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
116
- return /* @__PURE__ */ jsx5(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx5(
117
- Button,
226
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
227
+ import_components4.Button,
118
228
  {
119
229
  "data-testid": uniqueId,
120
230
  ...props,
@@ -125,13 +235,13 @@ function CSButton(props) {
125
235
  }
126
236
 
127
237
  // src/components/CSCheckbox.tsx
128
- import { Checkbox } from "@cloudscape-design/components";
129
- import { jsx as jsx6 } from "react/jsx-runtime";
238
+ var import_components5 = require("@cloudscape-design/components");
239
+ var import_jsx_runtime6 = require("react/jsx-runtime");
130
240
  function CSCheckbox(props) {
131
241
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
132
242
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
133
- return /* @__PURE__ */ jsx6(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx6(
134
- Checkbox,
243
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
244
+ import_components5.Checkbox,
135
245
  {
136
246
  "data-testid": uniqueId,
137
247
  name: uniqueId,
@@ -145,15 +255,15 @@ function CSCheckbox(props) {
145
255
  }
146
256
 
147
257
  // src/components/CSDatePicker.tsx
148
- import { DatePicker } from "@cloudscape-design/components";
149
- import { jsx as jsx7 } from "react/jsx-runtime";
258
+ var import_components6 = require("@cloudscape-design/components");
259
+ var import_jsx_runtime7 = require("react/jsx-runtime");
150
260
  function CSDatePicker(props) {
151
261
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
152
262
  const sanitizeValue = () => {
153
263
  return new Date(FromPropsHelper.sanitizeValueToString(props.value)).toISOString().split("T")[0];
154
264
  };
155
- return /* @__PURE__ */ jsx7(CSFormField, { ...props, children: /* @__PURE__ */ jsx7(
156
- DatePicker,
265
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CSFormField, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
266
+ import_components6.DatePicker,
157
267
  {
158
268
  "data-testid": uniqueId,
159
269
  controlId: uniqueId,
@@ -166,8 +276,8 @@ function CSDatePicker(props) {
166
276
  }
167
277
 
168
278
  // src/components/CSMultiselect.tsx
169
- import { Multiselect } from "@cloudscape-design/components";
170
- import { jsx as jsx8 } from "react/jsx-runtime";
279
+ var import_components7 = require("@cloudscape-design/components");
280
+ var import_jsx_runtime8 = require("react/jsx-runtime");
171
281
  function CSMultiselect(props) {
172
282
  var _a, _b;
173
283
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
@@ -184,8 +294,8 @@ function CSMultiselect(props) {
184
294
  }
185
295
  };
186
296
  const hideTokens = (_a = props.hideTokens) != null ? _a : props.tokenLimit !== void 0 && props.tokenLimit === 0;
187
- return /* @__PURE__ */ jsx8(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx8(
188
- Multiselect,
297
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
298
+ import_components7.Multiselect,
189
299
  {
190
300
  "data-testid": uniqueId,
191
301
  controlId: uniqueId,
@@ -284,9 +394,9 @@ _SelectHelper.getSelectedEnumOptions = (options, selectedEnums) => {
284
394
  var SelectHelper = _SelectHelper;
285
395
 
286
396
  // src/components/CSEnumMultiselect.tsx
287
- import { jsx as jsx9 } from "react/jsx-runtime";
397
+ var import_jsx_runtime9 = require("react/jsx-runtime");
288
398
  function CSEnumMultiselect(props) {
289
- return /* @__PURE__ */ jsx9(
399
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
290
400
  CSMultiselect,
291
401
  {
292
402
  ...SelectHelper.multiSelectEnums(props.factory, props.selectedEnums, props.localiser),
@@ -296,13 +406,13 @@ function CSEnumMultiselect(props) {
296
406
  }
297
407
 
298
408
  // src/components/CSSegmentedControl.tsx
299
- import { SegmentedControl } from "@cloudscape-design/components";
300
- import { jsx as jsx10 } from "react/jsx-runtime";
409
+ var import_components8 = require("@cloudscape-design/components");
410
+ var import_jsx_runtime10 = require("react/jsx-runtime");
301
411
  function CSSegmentedControl(props) {
302
412
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
303
413
  const { formProps } = ChildUtils.getChildren(props, localisationObject);
304
- return /* @__PURE__ */ jsx10(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx10(
305
- SegmentedControl,
414
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
415
+ import_components8.SegmentedControl,
306
416
  {
307
417
  "data-testid": uniqueId,
308
418
  onChange: ({ detail }) => props.onChangeValue(props.fieldSpec.key, detail.selectedId),
@@ -313,13 +423,13 @@ function CSSegmentedControl(props) {
313
423
  }
314
424
 
315
425
  // src/components/CSEnumSegmentedControl.tsx
316
- import { jsx as jsx11 } from "react/jsx-runtime";
426
+ var import_jsx_runtime11 = require("react/jsx-runtime");
317
427
  function CSEnumSegmentedControl(props) {
318
428
  const options = props.factory.values.filter((e) => props.exclude === void 0 || !props.exclude.includes(e)).map((e) => ({
319
429
  text: props.localiser.getEnumLabel(props.factory, e),
320
430
  id: e.toString()
321
431
  }));
322
- return /* @__PURE__ */ jsx11(
432
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
323
433
  CSSegmentedControl,
324
434
  {
325
435
  selectedId: props.selectedEnum === void 0 ? null : props.selectedEnum.toString(),
@@ -331,13 +441,13 @@ function CSEnumSegmentedControl(props) {
331
441
  }
332
442
 
333
443
  // src/components/CSSelect.tsx
334
- import { Select } from "@cloudscape-design/components";
335
- import { jsx as jsx12 } from "react/jsx-runtime";
444
+ var import_components9 = require("@cloudscape-design/components");
445
+ var import_jsx_runtime12 = require("react/jsx-runtime");
336
446
  function CSSelect(props) {
337
447
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
338
448
  const { formProps } = ChildUtils.getChildren(props, localisationObject);
339
- return /* @__PURE__ */ jsx12(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx12(
340
- Select,
449
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
450
+ import_components9.Select,
341
451
  {
342
452
  "data-testid": uniqueId,
343
453
  controlId: uniqueId,
@@ -349,9 +459,9 @@ function CSSelect(props) {
349
459
  }
350
460
 
351
461
  // src/components/CSEnumSelect.tsx
352
- import { jsx as jsx13 } from "react/jsx-runtime";
462
+ var import_jsx_runtime13 = require("react/jsx-runtime");
353
463
  function CSEnumSelect(props) {
354
- return /* @__PURE__ */ jsx13(
464
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
355
465
  CSSelect,
356
466
  {
357
467
  ...SelectHelper.singleSelectEnum(props.factory, props.selectedEnum, props.localiser, props.exclude),
@@ -361,8 +471,8 @@ function CSEnumSelect(props) {
361
471
  }
362
472
 
363
473
  // src/components/CSEnumTiles.tsx
364
- import { Tiles } from "@cloudscape-design/components";
365
- import { jsx as jsx14 } from "react/jsx-runtime";
474
+ var import_components10 = require("@cloudscape-design/components");
475
+ var import_jsx_runtime14 = require("react/jsx-runtime");
366
476
  function CSEnumTiles(props) {
367
477
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
368
478
  const items = props.factory.values.filter((enumInstance) => props.exclude === void 0 || !props.exclude.includes(enumInstance)).map((enumInstance) => {
@@ -373,8 +483,8 @@ function CSEnumTiles(props) {
373
483
  description: enumTranslation.description
374
484
  };
375
485
  });
376
- return /* @__PURE__ */ jsx14(
377
- Tiles,
486
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
487
+ import_components10.Tiles,
378
488
  {
379
489
  "data-testid": uniqueId,
380
490
  controlId: uniqueId,
@@ -389,7 +499,7 @@ function CSEnumTiles(props) {
389
499
  }
390
500
 
391
501
  // src/components/CSLink.tsx
392
- import { Link } from "@cloudscape-design/components";
502
+ var import_components11 = require("@cloudscape-design/components");
393
503
 
394
504
  // src/utils/BrowserUtils.ts
395
505
  var openInNewTab = (link) => {
@@ -411,12 +521,12 @@ var warnWhenTabIsClosed = (isDirty) => {
411
521
  };
412
522
 
413
523
  // src/components/CSLink.tsx
414
- import { jsx as jsx15 } from "react/jsx-runtime";
524
+ var import_jsx_runtime15 = require("react/jsx-runtime");
415
525
  function CSLink(props) {
416
526
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
417
527
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
418
- return /* @__PURE__ */ jsx15(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx15(
419
- Link,
528
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
529
+ import_components11.Link,
420
530
  {
421
531
  "data-testid": uniqueId,
422
532
  ...props,
@@ -426,17 +536,17 @@ function CSLink(props) {
426
536
  ) });
427
537
  }
428
538
  function CSExternalLink(props) {
429
- return /* @__PURE__ */ jsx15(CSLink, { ...props, external: true, onFollow: (detail) => detail.preventDefault(), children: /* @__PURE__ */ jsx15("span", { onClick: () => openInNewTab(props.link), children: props.children }) });
539
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CSLink, { ...props, external: true, onFollow: (detail) => detail.preventDefault(), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { onClick: () => openInNewTab(props.link), children: props.children }) });
430
540
  }
431
541
 
432
542
  // src/components/CSHeader.tsx
433
- import { Header } from "@cloudscape-design/components";
434
- import { jsx as jsx16 } from "react/jsx-runtime";
543
+ var import_components12 = require("@cloudscape-design/components");
544
+ var import_jsx_runtime16 = require("react/jsx-runtime");
435
545
  function CSHeader(props) {
436
546
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
437
547
  const { children } = ChildUtils.getChildren(props, localisationObject);
438
- return /* @__PURE__ */ jsx16(
439
- Header,
548
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
549
+ import_components12.Header,
440
550
  {
441
551
  "data-testid": uniqueId,
442
552
  ...props,
@@ -447,15 +557,15 @@ function CSHeader(props) {
447
557
  }
448
558
 
449
559
  // src/components/CSInput.tsx
450
- import { Input } from "@cloudscape-design/components";
451
- import { jsx as jsx17 } from "react/jsx-runtime";
560
+ var import_components13 = require("@cloudscape-design/components");
561
+ var import_jsx_runtime17 = require("react/jsx-runtime");
452
562
  function CSInput(props) {
453
563
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
454
564
  const { formProps } = ChildUtils.getChildren(props, localisationObject);
455
565
  const sanitizedValue = FromPropsHelper.sanitizeValueToString(props.value);
456
566
  const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
457
- return /* @__PURE__ */ jsx17(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ jsx17(
458
- Input,
567
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
568
+ import_components13.Input,
459
569
  {
460
570
  "data-testid": uniqueId,
461
571
  controlId: uniqueId,
@@ -468,8 +578,8 @@ function CSInput(props) {
468
578
  }
469
579
 
470
580
  // src/components/CSNumericInput.tsx
471
- import { Input as Input2 } from "@cloudscape-design/components";
472
- import { jsx as jsx18 } from "react/jsx-runtime";
581
+ var import_components14 = require("@cloudscape-design/components");
582
+ var import_jsx_runtime18 = require("react/jsx-runtime");
473
583
  function CSNumericInput(props) {
474
584
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
475
585
  const { formProps } = ChildUtils.getChildren(props, localisationObject);
@@ -481,8 +591,8 @@ function CSNumericInput(props) {
481
591
  };
482
592
  const sanitizedValue = sanitizeValue();
483
593
  const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
484
- return /* @__PURE__ */ jsx18(CSFormField, { ...formProps, formField: { ...props.formField, errorText }, children: /* @__PURE__ */ jsx18(
485
- Input2,
594
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CSFormField, { ...formProps, formField: { ...props.formField, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
595
+ import_components14.Input,
486
596
  {
487
597
  "data-testid": uniqueId,
488
598
  controlId: uniqueId,
@@ -499,13 +609,13 @@ function CSNumericInput(props) {
499
609
  }
500
610
 
501
611
  // src/components/CSStatusIndicator.tsx
502
- import { StatusIndicator } from "@cloudscape-design/components";
503
- import { jsx as jsx19 } from "react/jsx-runtime";
612
+ var import_components15 = require("@cloudscape-design/components");
613
+ var import_jsx_runtime19 = require("react/jsx-runtime");
504
614
  function CSStatusIndicator(props) {
505
615
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
506
616
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
507
- return /* @__PURE__ */ jsx19(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx19(
508
- StatusIndicator,
617
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
618
+ import_components15.StatusIndicator,
509
619
  {
510
620
  "data-testid": uniqueId,
511
621
  ...props,
@@ -516,13 +626,13 @@ function CSStatusIndicator(props) {
516
626
  }
517
627
 
518
628
  // src/components/CSTextContent.tsx
519
- import { TextContent } from "@cloudscape-design/components";
520
- import { jsx as jsx20 } from "react/jsx-runtime";
629
+ var import_components16 = require("@cloudscape-design/components");
630
+ var import_jsx_runtime20 = require("react/jsx-runtime");
521
631
  function CSTextContent(props) {
522
632
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
523
633
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
524
- return /* @__PURE__ */ jsx20(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx20(
525
- TextContent,
634
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
635
+ import_components16.TextContent,
526
636
  {
527
637
  "data-testid": uniqueId,
528
638
  ...props,
@@ -533,15 +643,15 @@ function CSTextContent(props) {
533
643
  }
534
644
 
535
645
  // src/components/CSTextarea.tsx
536
- import { Textarea } from "@cloudscape-design/components";
537
- import { jsx as jsx21 } from "react/jsx-runtime";
646
+ var import_components17 = require("@cloudscape-design/components");
647
+ var import_jsx_runtime21 = require("react/jsx-runtime");
538
648
  function CSTextarea(props) {
539
649
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
540
650
  const { formProps } = ChildUtils.getChildren(props, localisationObject);
541
651
  const sanitizedValue = FromPropsHelper.sanitizeValueToString(props.value);
542
652
  const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
543
- return /* @__PURE__ */ jsx21(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ jsx21(
544
- Textarea,
653
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
654
+ import_components17.Textarea,
545
655
  {
546
656
  "data-testid": uniqueId,
547
657
  controlId: uniqueId,
@@ -554,14 +664,14 @@ function CSTextarea(props) {
554
664
  }
555
665
 
556
666
  // src/components/CSTimeInput.tsx
557
- import { TimeInput } from "@cloudscape-design/components";
558
- import { jsx as jsx22 } from "react/jsx-runtime";
667
+ var import_components18 = require("@cloudscape-design/components");
668
+ var import_jsx_runtime22 = require("react/jsx-runtime");
559
669
  function CSTimeInput(props) {
560
670
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
561
671
  const { formProps } = ChildUtils.getChildren(props, localisationObject);
562
672
  const defaultFormat = "hh:mm";
563
- return /* @__PURE__ */ jsx22(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx22(
564
- TimeInput,
673
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
674
+ import_components18.TimeInput,
565
675
  {
566
676
  "data-testid": uniqueId,
567
677
  autoFocus: props.autoFocus,
@@ -575,13 +685,13 @@ function CSTimeInput(props) {
575
685
  }
576
686
 
577
687
  // src/components/CSToggle.tsx
578
- import { Toggle } from "@cloudscape-design/components";
579
- import { jsx as jsx23 } from "react/jsx-runtime";
688
+ var import_components19 = require("@cloudscape-design/components");
689
+ var import_jsx_runtime23 = require("react/jsx-runtime");
580
690
  function CSToggle(props) {
581
691
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
582
692
  const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
583
- return /* @__PURE__ */ jsx23(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx23(
584
- Toggle,
693
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
694
+ import_components19.Toggle,
585
695
  {
586
696
  "data-testid": uniqueId,
587
697
  name: uniqueId,
@@ -595,13 +705,13 @@ function CSToggle(props) {
595
705
  }
596
706
 
597
707
  // src/components/CSCopyToClipboard.tsx
598
- import { CopyToClipboard } from "@cloudscape-design/components";
599
- import { jsx as jsx24 } from "react/jsx-runtime";
708
+ var import_components20 = require("@cloudscape-design/components");
709
+ var import_jsx_runtime24 = require("react/jsx-runtime");
600
710
  function CSCopyToClipboard(props) {
601
711
  const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
602
712
  const { formProps } = ChildUtils.getChildren(props, localisationObject);
603
- return /* @__PURE__ */ jsx24(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx24(
604
- CopyToClipboard,
713
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
714
+ import_components20.CopyToClipboard,
605
715
  {
606
716
  "data-testid": uniqueId,
607
717
  ...props,
@@ -611,8 +721,8 @@ function CSCopyToClipboard(props) {
611
721
  }
612
722
 
613
723
  // src/views/CSVEnumRatingView.tsx
614
- import { Rating } from "@smastrom/react-rating";
615
- import { useEffect, useState } from "react";
724
+ var import_react_rating = require("@smastrom/react-rating");
725
+ var import_react = require("react");
616
726
 
617
727
  // src/utils/EnumFactory.ts
618
728
  var EnumFactory = class {
@@ -885,7 +995,7 @@ var ViewSpec = class _ViewSpec extends ViewElementSpec {
885
995
  };
886
996
 
887
997
  // src/views/CSVEnumRatingView.tsx
888
- import { jsx as jsx25, jsxs as jsxs2 } from "react/jsx-runtime";
998
+ var import_jsx_runtime25 = require("react/jsx-runtime");
889
999
  var CSV_ENUM_RATING_VIEW_SPEC = (parent, key, instanceId) => ViewSpec.create(key, parent.ns, (spec) => ({
890
1000
  rating: spec.addField(new FieldSpec("rating")),
891
1001
  boxRatingName: spec.addField(new FieldSpec("boxRatingName"))
@@ -899,7 +1009,7 @@ function getEnumRatingLabel(enumInstance, instanceId) {
899
1009
  function CSVEnumRatingView(props) {
900
1010
  const spec = props.viewSpec;
901
1011
  const { elements } = spec;
902
- const [hoveredValue, setHoveredValue] = useState(props.selectedEnum);
1012
+ const [hoveredValue, setHoveredValue] = (0, import_react.useState)(props.selectedEnum);
903
1013
  const valuesInOrder = getEnumRatingValues(props.factory, props.toOrderNumber);
904
1014
  const onHover = (hoveredIndex) => {
905
1015
  if (hoveredIndex === 0) {
@@ -909,12 +1019,12 @@ function CSVEnumRatingView(props) {
909
1019
  }
910
1020
  };
911
1021
  const itemCount = Math.max(1, Math.min(valuesInOrder.length - 1, 10));
912
- useEffect(() => {
1022
+ (0, import_react.useEffect)(() => {
913
1023
  setHoveredValue(props.selectedEnum);
914
1024
  }, [props.selectedEnum]);
915
- return /* @__PURE__ */ jsxs2(CSFormField, { fieldSpec: elements.rating, localiser: props.localiser, children: [
916
- /* @__PURE__ */ jsx25(
917
- Rating,
1025
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(CSFormField, { fieldSpec: elements.rating, localiser: props.localiser, children: [
1026
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1027
+ import_react_rating.Rating,
918
1028
  {
919
1029
  "data-testid": elements.rating.getDataTestId(),
920
1030
  isDisabled: props.disabled,
@@ -926,7 +1036,7 @@ function CSVEnumRatingView(props) {
926
1036
  invisibleItemLabels: valuesInOrder.slice(1).map((e) => getEnumRatingLabel(e, spec.instanceId))
927
1037
  }
928
1038
  ),
929
- /* @__PURE__ */ jsx25("div", { style: { textAlign: "left", paddingLeft: "5px" }, children: /* @__PURE__ */ jsx25(
1039
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { textAlign: "left", paddingLeft: "5px" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
930
1040
  CSBox,
931
1041
  {
932
1042
  fieldSpec: elements.boxRatingName,
@@ -939,8 +1049,8 @@ function CSVEnumRatingView(props) {
939
1049
  }
940
1050
 
941
1051
  // src/views/CSVNoItemsView.tsx
942
- import { Box as Box2, SpaceBetween } from "@cloudscape-design/components";
943
- import { jsx as jsx26, jsxs as jsxs3 } from "react/jsx-runtime";
1052
+ var import_components21 = require("@cloudscape-design/components");
1053
+ var import_jsx_runtime26 = require("react/jsx-runtime");
944
1054
  var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec) => ({
945
1055
  boxHeading: spec.addField(new FieldSpec("boxHeading")),
946
1056
  boxBody: spec.addField(new FieldSpec("boxBody"))
@@ -948,8 +1058,8 @@ var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec
948
1058
  function CSVNoItemsView(props) {
949
1059
  const spec = props.viewSpec;
950
1060
  const { elements } = spec;
951
- return /* @__PURE__ */ jsx26("div", { "data-testid": spec.getDataTestId(), children: /* @__PURE__ */ jsx26(Box2, { textAlign: "center", color: "inherit", children: /* @__PURE__ */ jsxs3(SpaceBetween, { size: "xxs", direction: "vertical", children: [
952
- /* @__PURE__ */ jsx26(
1061
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "data-testid": spec.getDataTestId(), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components21.Box, { textAlign: "center", color: "inherit", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_components21.SpaceBetween, { size: "xxs", direction: "vertical", children: [
1062
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
953
1063
  CSBox,
954
1064
  {
955
1065
  fieldSpec: elements.boxHeading,
@@ -960,7 +1070,7 @@ function CSVNoItemsView(props) {
960
1070
  children: props.headingText
961
1071
  }
962
1072
  ),
963
- /* @__PURE__ */ jsx26(
1073
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
964
1074
  CSBox,
965
1075
  {
966
1076
  fieldSpec: elements.boxBody,
@@ -977,7 +1087,7 @@ function CSVNoItemsView(props) {
977
1087
  }
978
1088
 
979
1089
  // src/views/CSVPriceInputView.tsx
980
- import { Grid } from "@cloudscape-design/components";
1090
+ var import_components22 = require("@cloudscape-design/components");
981
1091
 
982
1092
  // src/utils/PriceUtils.ts
983
1093
  var LOGGER2 = new Log("PriceUtils");
@@ -1040,7 +1150,7 @@ _PriceUtils.parseFormattedPriceWithCurrency = (locale, formattedPrice, currencyS
1040
1150
  var PriceUtils = _PriceUtils;
1041
1151
 
1042
1152
  // src/views/CSVPriceInputView.tsx
1043
- import { jsx as jsx27, jsxs as jsxs4 } from "react/jsx-runtime";
1153
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1044
1154
  var CSV_PRICE_INPUT_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1045
1155
  inputPrice: spec.addField(new FieldSpec("inputPrice", true, void 0, 0)),
1046
1156
  selectCurrency: spec.addField(new FieldSpec("currency", true)),
@@ -1051,13 +1161,13 @@ function CSVPriceInputView(props) {
1051
1161
  const { elements } = spec;
1052
1162
  const priceInCents = props.value ? props.value.priceInCents : 0;
1053
1163
  const currency = props.value ? props.value.currency : props.defaultCurrency;
1054
- return /* @__PURE__ */ jsxs4(
1055
- Grid,
1164
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1165
+ import_components22.Grid,
1056
1166
  {
1057
1167
  gridDefinition: [{ colspan: 4 }, { colspan: { default: 4, xxs: 3 } }, { colspan: { default: 4, xxs: 5 } }],
1058
1168
  disableGutters: true,
1059
1169
  children: [
1060
- /* @__PURE__ */ jsx27(
1170
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1061
1171
  CSNumericInput,
1062
1172
  {
1063
1173
  fieldSpec: elements.inputPrice,
@@ -1071,7 +1181,7 @@ function CSVPriceInputView(props) {
1071
1181
  })
1072
1182
  }
1073
1183
  ),
1074
- /* @__PURE__ */ jsx27("div", { style: { paddingLeft: "8px" }, children: /* @__PURE__ */ jsx27(
1184
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1075
1185
  CSEnumSelect,
1076
1186
  {
1077
1187
  fieldSpec: elements.selectCurrency,
@@ -1086,7 +1196,7 @@ function CSVPriceInputView(props) {
1086
1196
  expandToViewport: props.expandToViewport
1087
1197
  }
1088
1198
  ) }),
1089
- /* @__PURE__ */ jsx27("div", { style: { paddingTop: "30px", paddingLeft: "8px" }, children: /* @__PURE__ */ jsx27(
1199
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingTop: "30px", paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1090
1200
  CSBox,
1091
1201
  {
1092
1202
  fieldSpec: elements.boxPriceDisplay,
@@ -1103,8 +1213,8 @@ function CSVPriceInputView(props) {
1103
1213
  }
1104
1214
 
1105
1215
  // src/views/CSVSearchFilterView.tsx
1106
- import { SpaceBetween as SpaceBetween2 } from "@cloudscape-design/components";
1107
- import { jsx as jsx28, jsxs as jsxs5 } from "react/jsx-runtime";
1216
+ var import_components23 = require("@cloudscape-design/components");
1217
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1108
1218
  var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1109
1219
  inputSearch: spec.addField(new FieldSpec("inputSearch")),
1110
1220
  buttonSearch: spec.addField(new FieldSpec("buttonSearch"))
@@ -1112,8 +1222,8 @@ var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.n
1112
1222
  function CSVSearchFilterView(props) {
1113
1223
  const spec = props.viewSpec;
1114
1224
  const { elements } = spec;
1115
- return /* @__PURE__ */ jsxs5(SpaceBetween2, { size: "s", direction: "horizontal", children: [
1116
- /* @__PURE__ */ jsx28("div", { style: { minWidth: "320px" }, children: props.inputSearch === void 0 || typeof props.inputSearch === "string" ? /* @__PURE__ */ jsx28(
1225
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components23.SpaceBetween, { size: "s", direction: "horizontal", children: [
1226
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { minWidth: "320px" }, children: props.inputSearch === void 0 || typeof props.inputSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1117
1227
  CSInput,
1118
1228
  {
1119
1229
  fieldSpec: elements.inputSearch,
@@ -1125,7 +1235,7 @@ function CSVSearchFilterView(props) {
1125
1235
  type: "search"
1126
1236
  }
1127
1237
  ) : props.inputSearch }),
1128
- props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ jsx28(
1238
+ props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1129
1239
  CSButton,
1130
1240
  {
1131
1241
  fieldSpec: elements.buttonSearch,
@@ -1143,8 +1253,8 @@ function CSVSearchFilterView(props) {
1143
1253
  }
1144
1254
 
1145
1255
  // src/views/CSVTextPromptModalView.tsx
1146
- import { Box as Box3, Modal, SpaceBetween as SpaceBetween3 } from "@cloudscape-design/components";
1147
- import { Fragment, jsx as jsx29, jsxs as jsxs6 } from "react/jsx-runtime";
1256
+ var import_components24 = require("@cloudscape-design/components");
1257
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1148
1258
  var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1149
1259
  headerHeading: spec.addField(new FieldSpec("headerHeading")),
1150
1260
  boxBodyText: spec.addField(new FieldSpec("boxBodyText")),
@@ -1154,7 +1264,7 @@ var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, pare
1154
1264
  function CSVTextPromptModalView(props) {
1155
1265
  const spec = props.viewSpec;
1156
1266
  const { elements } = spec;
1157
- const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ jsx29(
1267
+ const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1158
1268
  CSButton,
1159
1269
  {
1160
1270
  fieldSpec: elements.buttonSecondary,
@@ -1163,14 +1273,14 @@ function CSVTextPromptModalView(props) {
1163
1273
  onClick: props.onSecondaryAction,
1164
1274
  children: props.buttonSecondary
1165
1275
  }
1166
- ) : props.buttonSecondary : /* @__PURE__ */ jsx29(Fragment, {});
1167
- return /* @__PURE__ */ jsx29(
1168
- Modal,
1276
+ ) : props.buttonSecondary : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, {});
1277
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1278
+ import_components24.Modal,
1169
1279
  {
1170
1280
  "data-testid": props.viewSpec.getDataTestId(),
1171
1281
  onDismiss: props.onDismiss,
1172
1282
  visible: props.visible,
1173
- header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ jsx29(
1283
+ header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1174
1284
  CSHeader,
1175
1285
  {
1176
1286
  fieldSpec: elements.headerHeading,
@@ -1178,8 +1288,8 @@ function CSVTextPromptModalView(props) {
1178
1288
  children: props.headerHeading
1179
1289
  }
1180
1290
  ) : props.headerHeading,
1181
- footer: /* @__PURE__ */ jsx29(Box3, { float: "right", children: /* @__PURE__ */ jsxs6(SpaceBetween3, { direction: "horizontal", size: "l", children: [
1182
- props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ jsx29(
1291
+ footer: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components24.Box, { float: "right", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_components24.SpaceBetween, { direction: "horizontal", size: "l", children: [
1292
+ props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1183
1293
  CSButton,
1184
1294
  {
1185
1295
  fieldSpec: elements.buttonPrimary,
@@ -1191,7 +1301,7 @@ function CSVTextPromptModalView(props) {
1191
1301
  ) : props.buttonPrimary,
1192
1302
  secondaryAction
1193
1303
  ] }) }),
1194
- children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */ jsx29(CSBox, { fieldSpec: elements.boxBodyText, localiser: props.localiser, children: props.boxBodyText }) : props.boxBodyText
1304
+ children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CSBox, { fieldSpec: elements.boxBodyText, localiser: props.localiser, children: props.boxBodyText }) : props.boxBodyText
1195
1305
  }
1196
1306
  );
1197
1307
  }
@@ -1269,9 +1379,9 @@ var FieldProperties = class {
1269
1379
  };
1270
1380
 
1271
1381
  // src/utils/FixedWidth.tsx
1272
- import { jsx as jsx30 } from "react/jsx-runtime";
1382
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1273
1383
  function FixedWidth(props) {
1274
- return /* @__PURE__ */ jsx30("div", { style: { minWidth: props.minWidth, maxWidth: props.maxWidth }, children: props.children });
1384
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { minWidth: props.minWidth, maxWidth: props.maxWidth }, children: props.children });
1275
1385
  }
1276
1386
 
1277
1387
  // src/utils/LocalStorageService.ts
@@ -1666,7 +1776,7 @@ var RestClient = class {
1666
1776
  };
1667
1777
 
1668
1778
  // src/hooks/useControllerDisplayState.ts
1669
- import { useCallback, useState as useState2 } from "react";
1779
+ var import_react2 = require("react");
1670
1780
  var RunFunctionResult = class {
1671
1781
  constructor(success, messages, result, resultHistory) {
1672
1782
  this.success = success;
@@ -1679,27 +1789,27 @@ var fatalRunErrorFunction = (reason) => {
1679
1789
  throw new Error(`Fatal error - could not handle run failure - reason: ${reason}`);
1680
1790
  };
1681
1791
  function useControllerDisplayState(initialDisplayMode, messages, logger) {
1682
- const [state, setState] = useState2(0 /* UNMOUNTED */);
1683
- const [loadingIndication, setLoadingIndication] = useState2({});
1684
- const [modified, setModified] = useState2(false);
1685
- const [displayMode, setDisplayMode] = useState2(initialDisplayMode);
1686
- const [modalState, setModalState] = useState2({
1792
+ const [state, setState] = (0, import_react2.useState)(0 /* UNMOUNTED */);
1793
+ const [loadingIndication, setLoadingIndication] = (0, import_react2.useState)({});
1794
+ const [modified, setModified] = (0, import_react2.useState)(false);
1795
+ const [displayMode, setDisplayMode] = (0, import_react2.useState)(initialDisplayMode);
1796
+ const [modalState, setModalState] = (0, import_react2.useState)({
1687
1797
  show: (modalId, confirmFunction) => showModal(modalId, true, confirmFunction),
1688
1798
  hide: (modalId) => showModal(modalId, false)
1689
1799
  });
1690
1800
  const { addMessages } = messages;
1691
- const isLoading = useCallback((service) => {
1801
+ const isLoading = (0, import_react2.useCallback)((service) => {
1692
1802
  return loadingIndication.hasOwnProperty(service.name) && loadingIndication[service.name] === true;
1693
1803
  }, [loadingIndication]);
1694
- const load = useCallback((service) => {
1804
+ const load = (0, import_react2.useCallback)((service) => {
1695
1805
  setLoadingIndication((oldIndication) => ({ ...oldIndication, [service.name]: true }));
1696
1806
  }, []);
1697
- const doneLoading = useCallback((service) => {
1807
+ const doneLoading = (0, import_react2.useCallback)((service) => {
1698
1808
  setLoadingIndication((oldIndication) => {
1699
1809
  return { ...oldIndication, [service.name]: false };
1700
1810
  });
1701
1811
  }, []);
1702
- const enterDisplayMode = useCallback((mode) => {
1812
+ const enterDisplayMode = (0, import_react2.useCallback)((mode) => {
1703
1813
  setDisplayMode((previousMode) => {
1704
1814
  if (mode !== displayMode) {
1705
1815
  logger.info("Entering display mode: ", mode);
@@ -1708,7 +1818,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1708
1818
  return previousMode;
1709
1819
  });
1710
1820
  }, [displayMode, logger]);
1711
- const showModal = useCallback((modalId, show, confirmFunction) => {
1821
+ const showModal = (0, import_react2.useCallback)((modalId, show, confirmFunction) => {
1712
1822
  if (show) {
1713
1823
  setModalState((originalModalState) => {
1714
1824
  if (originalModalState.modalId !== void 0) {
@@ -1725,7 +1835,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1725
1835
  });
1726
1836
  }
1727
1837
  }, []);
1728
- const run = useCallback(function(service, execute, failureIsFatal, resultHistory) {
1838
+ const run = (0, import_react2.useCallback)(function(service, execute, failureIsFatal, resultHistory) {
1729
1839
  load(service);
1730
1840
  return execute().then((result) => {
1731
1841
  addMessages(result);
@@ -1746,7 +1856,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1746
1856
  return {
1747
1857
  state,
1748
1858
  setState,
1749
- setDirty: useCallback(setModified, [setModified]),
1859
+ setDirty: (0, import_react2.useCallback)(setModified, [setModified]),
1750
1860
  isDirty: () => modified,
1751
1861
  isLoading,
1752
1862
  displayMode,
@@ -1774,7 +1884,7 @@ function isContentWithMessages(object) {
1774
1884
  }
1775
1885
 
1776
1886
  // src/hooks/useTOChangeHandler.ts
1777
- import { useCallback as useCallback2 } from "react";
1887
+ var import_react3 = require("react");
1778
1888
  var ArrayStateHandler = class {
1779
1889
  static updateFieldsOfArrayElement(elementToUpdate, currentArrayContent, properties, onChangedArrayElement) {
1780
1890
  const newArrayValue = [...currentArrayContent];
@@ -1801,7 +1911,7 @@ var ArrayStateHandler = class {
1801
1911
  }
1802
1912
  };
1803
1913
  function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty) {
1804
- const onPropertyChangeMulti = useCallback2((properties, automaticChange) => {
1914
+ const onPropertyChangeMulti = (0, import_react3.useCallback)((properties, automaticChange) => {
1805
1915
  logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
1806
1916
  setTOState((previousValue) => {
1807
1917
  const newValue = { ...previousValue, ...properties };
@@ -1817,7 +1927,7 @@ function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty)
1817
1927
  return newValue;
1818
1928
  });
1819
1929
  }, [logger, notifications, setDirty, setTOState, toName]);
1820
- const onPropertyChange = useCallback2((propertyName, changedValue, automaticChange) => {
1930
+ const onPropertyChange = (0, import_react3.useCallback)((propertyName, changedValue, automaticChange) => {
1821
1931
  onPropertyChangeMulti({ [propertyName]: changedValue }, automaticChange);
1822
1932
  }, [onPropertyChangeMulti]);
1823
1933
  return { onPropertyChange, onPropertyChangeMulti };
@@ -1826,7 +1936,7 @@ var singleChangeHandlerToMulti = (onPropertyChangeMulti) => {
1826
1936
  return (propertyName, changedValue) => onPropertyChangeMulti({ [propertyName]: changedValue });
1827
1937
  };
1828
1938
  function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDirty) {
1829
- const onChangeElement = useCallback2((element, properties) => {
1939
+ const onChangeElement = (0, import_react3.useCallback)((element, properties) => {
1830
1940
  if (element !== void 0) {
1831
1941
  logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
1832
1942
  setArrayState((previousValue) => ArrayStateHandler.updateFieldsOfArrayElement(
@@ -1840,7 +1950,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1840
1950
  }
1841
1951
  }
1842
1952
  }, [logger, toName, setArrayState, setDirty, handlers.onChange]);
1843
- const onRemoveElements = useCallback2((removedElements) => {
1953
+ const onRemoveElements = (0, import_react3.useCallback)((removedElements) => {
1844
1954
  if (removedElements.length > 0) {
1845
1955
  logger.debug(`Removing ${removedElements.length} elements from array`);
1846
1956
  setArrayState((previousValue) => ArrayStateHandler.removeArrayElements(
@@ -1853,7 +1963,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1853
1963
  }
1854
1964
  }
1855
1965
  }, [logger, setArrayState, setDirty, handlers.onRemove]);
1856
- const onAddElements = useCallback2((newElements) => {
1966
+ const onAddElements = (0, import_react3.useCallback)((newElements) => {
1857
1967
  if (newElements.length === 0) {
1858
1968
  logger.debug(`Adding no new elements to array`);
1859
1969
  } else {
@@ -1872,23 +1982,23 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1872
1982
  }
1873
1983
 
1874
1984
  // src/hooks/useAWSUIRef.ts
1875
- import { useCallback as useCallback3, useRef } from "react";
1985
+ var import_react4 = require("react");
1876
1986
  function useAWSUIRef() {
1877
- const customRef = useRef(null);
1987
+ const customRef = (0, import_react4.useRef)(null);
1878
1988
  const isValidRef = () => {
1879
1989
  return customRef !== void 0 && customRef !== null && customRef.current !== void 0 && customRef.current !== null;
1880
1990
  };
1881
- const focus = useCallback3(() => {
1991
+ const focus = (0, import_react4.useCallback)(() => {
1882
1992
  if (isValidRef() && customRef.current.focus) {
1883
1993
  customRef.current.focus();
1884
1994
  }
1885
1995
  }, [customRef]);
1886
- const scrollToView = useCallback3(() => {
1996
+ const scrollToView = (0, import_react4.useCallback)(() => {
1887
1997
  if (isValidRef() && customRef.current.scrollIntoView) {
1888
1998
  customRef.current.scrollIntoView(true);
1889
1999
  }
1890
2000
  }, [customRef]);
1891
- const scrollToViewRef = useCallback3((element) => {
2001
+ const scrollToViewRef = (0, import_react4.useCallback)((element) => {
1892
2002
  if (element !== void 0 && element !== null && element.scrollIntoView) {
1893
2003
  element.scrollIntoView({ block: "nearest", behavior: "smooth" });
1894
2004
  }
@@ -1902,13 +2012,13 @@ function useAWSUIRef() {
1902
2012
  }
1903
2013
 
1904
2014
  // src/hooks/useHotkeys.ts
1905
- import { useCallback as useCallback4, useEffect as useEffect2, useLayoutEffect, useRef as useRef2 } from "react";
2015
+ var import_react5 = require("react");
1906
2016
  var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1907
- const callbackRef = useRef2(callback);
1908
- useLayoutEffect(() => {
2017
+ const callbackRef = (0, import_react5.useRef)(callback);
2018
+ (0, import_react5.useLayoutEffect)(() => {
1909
2019
  callbackRef.current = callback;
1910
2020
  });
1911
- const handleKeyPress = useCallback4(
2021
+ const handleKeyPress = (0, import_react5.useCallback)(
1912
2022
  (event) => {
1913
2023
  if (event.key === key && (!shift || event.shiftKey) && (!ctrl || event.ctrlKey) && (!alt || event.altKey)) {
1914
2024
  callbackRef.current(event);
@@ -1916,7 +2026,7 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1916
2026
  },
1917
2027
  [alt, ctrl, key, shift]
1918
2028
  );
1919
- useEffect2(() => {
2029
+ (0, import_react5.useEffect)(() => {
1920
2030
  const targetNode = node != null ? node : document;
1921
2031
  targetNode && targetNode.addEventListener("keydown", handleKeyPress);
1922
2032
  return () => targetNode && targetNode.removeEventListener("keydown", handleKeyPress);
@@ -1924,20 +2034,20 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1924
2034
  };
1925
2035
 
1926
2036
  // src/hooks/useMessages.ts
1927
- import { useCallback as useCallback5, useState as useState3 } from "react";
2037
+ var import_react6 = require("react");
1928
2038
  function useMessages(LOGGER3) {
1929
- const [messages, setMessages] = useState3([]);
1930
- const onDismissMessage = useCallback5((message) => {
2039
+ const [messages, setMessages] = (0, import_react6.useState)([]);
2040
+ const onDismissMessage = (0, import_react6.useCallback)((message) => {
1931
2041
  const newMessages = messages.filter((existingMsg) => message !== existingMsg);
1932
2042
  setMessages(newMessages);
1933
2043
  }, [messages]);
1934
- const onToggleMessageDetail = useCallback5((message) => {
2044
+ const onToggleMessageDetail = (0, import_react6.useCallback)((message) => {
1935
2045
  const idx = messages.indexOf(message);
1936
2046
  const newMessages = [...messages];
1937
2047
  newMessages[idx].showDetails = !newMessages[idx].showDetails;
1938
2048
  setMessages(newMessages);
1939
2049
  }, [messages]);
1940
- const addMessages = useCallback5((newMessages) => {
2050
+ const addMessages = (0, import_react6.useCallback)((newMessages) => {
1941
2051
  if (!newMessages.hasOwnProperty("messages")) {
1942
2052
  LOGGER3.error("Given response data structure does not contain messages - probably another runtime error occurred: ", newMessages);
1943
2053
  if (newMessages.hasOwnProperty("stack")) {
@@ -1951,7 +2061,7 @@ function useMessages(LOGGER3) {
1951
2061
  setMessages((oldMessages) => [...oldMessages, ...addedMessages]);
1952
2062
  }
1953
2063
  }, [LOGGER3]);
1954
- const clearMessages = useCallback5(() => {
2064
+ const clearMessages = (0, import_react6.useCallback)(() => {
1955
2065
  setMessages([]);
1956
2066
  }, []);
1957
2067
  return {
@@ -1962,7 +2072,8 @@ function useMessages(LOGGER3) {
1962
2072
  clearMessages
1963
2073
  };
1964
2074
  }
1965
- export {
2075
+ // Annotate the CommonJS export names for ESM import in node:
2076
+ 0 && (module.exports = {
1966
2077
  CSAlert,
1967
2078
  CSBox,
1968
2079
  CSButton,
@@ -2048,4 +2159,4 @@ export {
2048
2159
  useTOArrayChangeHandler,
2049
2160
  useTOChangeHandler,
2050
2161
  warnWhenTabIsClosed
2051
- };
2162
+ });