@ebertjendustries/cswrapper 1.0.10 → 1.0.13

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,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,
@@ -594,9 +704,25 @@ function CSToggle(props) {
594
704
  ) });
595
705
  }
596
706
 
707
+ // src/components/CSCopyToClipboard.tsx
708
+ var import_components20 = require("@cloudscape-design/components");
709
+ var import_jsx_runtime24 = require("react/jsx-runtime");
710
+ function CSCopyToClipboard(props) {
711
+ const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
712
+ const { formProps } = ChildUtils.getChildren(props, localisationObject);
713
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
714
+ import_components20.CopyToClipboard,
715
+ {
716
+ "data-testid": uniqueId,
717
+ ...props,
718
+ ...localisationObject
719
+ }
720
+ ) });
721
+ }
722
+
597
723
  // src/views/CSVEnumRatingView.tsx
598
- import { Rating } from "@smastrom/react-rating";
599
- import { useEffect, useState } from "react";
724
+ var import_react_rating = require("@smastrom/react-rating");
725
+ var import_react = require("react");
600
726
 
601
727
  // src/utils/EnumFactory.ts
602
728
  var EnumFactory = class {
@@ -750,6 +876,9 @@ var ViewElementSpec = class {
750
876
  }
751
877
  return this.keyHierarchy;
752
878
  }
879
+ log(prefix) {
880
+ LOGGER.info(`${prefix === void 0 ? "" : prefix}<${this.getDataTestId()}> = ${this.getLocalisationKey()}`);
881
+ }
753
882
  };
754
883
  var FieldSpec = class _FieldSpec extends ViewElementSpec {
755
884
  constructor(key, required, maxLength, minValue, maxValue, customFieldValidator, instanceId) {
@@ -855,10 +984,18 @@ var ViewSpec = class _ViewSpec extends ViewElementSpec {
855
984
  getValueValidityLevel(value) {
856
985
  return this.viewValidator(this, value);
857
986
  }
987
+ logViewSpec() {
988
+ this.log("VIEW :::: ");
989
+ for (const element of Object.values(this.elements)) {
990
+ if (element instanceof ViewElementSpec) {
991
+ element.log(" FIELD :::: ");
992
+ }
993
+ }
994
+ }
858
995
  };
859
996
 
860
997
  // src/views/CSVEnumRatingView.tsx
861
- import { jsx as jsx24, jsxs as jsxs2 } from "react/jsx-runtime";
998
+ var import_jsx_runtime25 = require("react/jsx-runtime");
862
999
  var CSV_ENUM_RATING_VIEW_SPEC = (parent, key, instanceId) => ViewSpec.create(key, parent.ns, (spec) => ({
863
1000
  rating: spec.addField(new FieldSpec("rating")),
864
1001
  boxRatingName: spec.addField(new FieldSpec("boxRatingName"))
@@ -872,7 +1009,7 @@ function getEnumRatingLabel(enumInstance, instanceId) {
872
1009
  function CSVEnumRatingView(props) {
873
1010
  const spec = props.viewSpec;
874
1011
  const { elements } = spec;
875
- const [hoveredValue, setHoveredValue] = useState(props.selectedEnum);
1012
+ const [hoveredValue, setHoveredValue] = (0, import_react.useState)(props.selectedEnum);
876
1013
  const valuesInOrder = getEnumRatingValues(props.factory, props.toOrderNumber);
877
1014
  const onHover = (hoveredIndex) => {
878
1015
  if (hoveredIndex === 0) {
@@ -882,12 +1019,12 @@ function CSVEnumRatingView(props) {
882
1019
  }
883
1020
  };
884
1021
  const itemCount = Math.max(1, Math.min(valuesInOrder.length - 1, 10));
885
- useEffect(() => {
1022
+ (0, import_react.useEffect)(() => {
886
1023
  setHoveredValue(props.selectedEnum);
887
1024
  }, [props.selectedEnum]);
888
- return /* @__PURE__ */ jsxs2(CSFormField, { fieldSpec: elements.rating, localiser: props.localiser, children: [
889
- /* @__PURE__ */ jsx24(
890
- 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,
891
1028
  {
892
1029
  "data-testid": elements.rating.getDataTestId(),
893
1030
  isDisabled: props.disabled,
@@ -899,7 +1036,7 @@ function CSVEnumRatingView(props) {
899
1036
  invisibleItemLabels: valuesInOrder.slice(1).map((e) => getEnumRatingLabel(e, spec.instanceId))
900
1037
  }
901
1038
  ),
902
- /* @__PURE__ */ jsx24("div", { style: { textAlign: "left", paddingLeft: "5px" }, children: /* @__PURE__ */ jsx24(
1039
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { textAlign: "left", paddingLeft: "5px" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
903
1040
  CSBox,
904
1041
  {
905
1042
  fieldSpec: elements.boxRatingName,
@@ -912,8 +1049,8 @@ function CSVEnumRatingView(props) {
912
1049
  }
913
1050
 
914
1051
  // src/views/CSVNoItemsView.tsx
915
- import { Box as Box2, SpaceBetween } from "@cloudscape-design/components";
916
- import { jsx as jsx25, jsxs as jsxs3 } from "react/jsx-runtime";
1052
+ var import_components21 = require("@cloudscape-design/components");
1053
+ var import_jsx_runtime26 = require("react/jsx-runtime");
917
1054
  var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec) => ({
918
1055
  boxHeading: spec.addField(new FieldSpec("boxHeading")),
919
1056
  boxBody: spec.addField(new FieldSpec("boxBody"))
@@ -921,8 +1058,8 @@ var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec
921
1058
  function CSVNoItemsView(props) {
922
1059
  const spec = props.viewSpec;
923
1060
  const { elements } = spec;
924
- return /* @__PURE__ */ jsx25("div", { "data-testid": spec.getDataTestId(), children: /* @__PURE__ */ jsx25(Box2, { textAlign: "center", color: "inherit", children: /* @__PURE__ */ jsxs3(SpaceBetween, { size: "xxs", direction: "vertical", children: [
925
- /* @__PURE__ */ jsx25(
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)(
926
1063
  CSBox,
927
1064
  {
928
1065
  fieldSpec: elements.boxHeading,
@@ -933,7 +1070,7 @@ function CSVNoItemsView(props) {
933
1070
  children: props.headingText
934
1071
  }
935
1072
  ),
936
- /* @__PURE__ */ jsx25(
1073
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
937
1074
  CSBox,
938
1075
  {
939
1076
  fieldSpec: elements.boxBody,
@@ -950,7 +1087,7 @@ function CSVNoItemsView(props) {
950
1087
  }
951
1088
 
952
1089
  // src/views/CSVPriceInputView.tsx
953
- import { Grid } from "@cloudscape-design/components";
1090
+ var import_components22 = require("@cloudscape-design/components");
954
1091
 
955
1092
  // src/utils/PriceUtils.ts
956
1093
  var LOGGER2 = new Log("PriceUtils");
@@ -1013,7 +1150,7 @@ _PriceUtils.parseFormattedPriceWithCurrency = (locale, formattedPrice, currencyS
1013
1150
  var PriceUtils = _PriceUtils;
1014
1151
 
1015
1152
  // src/views/CSVPriceInputView.tsx
1016
- import { jsx as jsx26, jsxs as jsxs4 } from "react/jsx-runtime";
1153
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1017
1154
  var CSV_PRICE_INPUT_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1018
1155
  inputPrice: spec.addField(new FieldSpec("inputPrice", true, void 0, 0)),
1019
1156
  selectCurrency: spec.addField(new FieldSpec("currency", true)),
@@ -1024,13 +1161,13 @@ function CSVPriceInputView(props) {
1024
1161
  const { elements } = spec;
1025
1162
  const priceInCents = props.value ? props.value.priceInCents : 0;
1026
1163
  const currency = props.value ? props.value.currency : props.defaultCurrency;
1027
- return /* @__PURE__ */ jsxs4(
1028
- Grid,
1164
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1165
+ import_components22.Grid,
1029
1166
  {
1030
1167
  gridDefinition: [{ colspan: 4 }, { colspan: { default: 4, xxs: 3 } }, { colspan: { default: 4, xxs: 5 } }],
1031
1168
  disableGutters: true,
1032
1169
  children: [
1033
- /* @__PURE__ */ jsx26(
1170
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1034
1171
  CSNumericInput,
1035
1172
  {
1036
1173
  fieldSpec: elements.inputPrice,
@@ -1044,7 +1181,7 @@ function CSVPriceInputView(props) {
1044
1181
  })
1045
1182
  }
1046
1183
  ),
1047
- /* @__PURE__ */ jsx26("div", { style: { paddingLeft: "8px" }, children: /* @__PURE__ */ jsx26(
1184
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1048
1185
  CSEnumSelect,
1049
1186
  {
1050
1187
  fieldSpec: elements.selectCurrency,
@@ -1059,7 +1196,7 @@ function CSVPriceInputView(props) {
1059
1196
  expandToViewport: props.expandToViewport
1060
1197
  }
1061
1198
  ) }),
1062
- /* @__PURE__ */ jsx26("div", { style: { paddingTop: "30px", paddingLeft: "8px" }, children: /* @__PURE__ */ jsx26(
1199
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingTop: "30px", paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1063
1200
  CSBox,
1064
1201
  {
1065
1202
  fieldSpec: elements.boxPriceDisplay,
@@ -1076,8 +1213,8 @@ function CSVPriceInputView(props) {
1076
1213
  }
1077
1214
 
1078
1215
  // src/views/CSVSearchFilterView.tsx
1079
- import { SpaceBetween as SpaceBetween2 } from "@cloudscape-design/components";
1080
- import { jsx as jsx27, jsxs as jsxs5 } from "react/jsx-runtime";
1216
+ var import_components23 = require("@cloudscape-design/components");
1217
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1081
1218
  var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1082
1219
  inputSearch: spec.addField(new FieldSpec("inputSearch")),
1083
1220
  buttonSearch: spec.addField(new FieldSpec("buttonSearch"))
@@ -1085,8 +1222,8 @@ var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.n
1085
1222
  function CSVSearchFilterView(props) {
1086
1223
  const spec = props.viewSpec;
1087
1224
  const { elements } = spec;
1088
- return /* @__PURE__ */ jsxs5(SpaceBetween2, { size: "s", direction: "horizontal", children: [
1089
- /* @__PURE__ */ jsx27("div", { style: { minWidth: "320px" }, children: props.inputSearch === void 0 || typeof props.inputSearch === "string" ? /* @__PURE__ */ jsx27(
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)(
1090
1227
  CSInput,
1091
1228
  {
1092
1229
  fieldSpec: elements.inputSearch,
@@ -1098,7 +1235,7 @@ function CSVSearchFilterView(props) {
1098
1235
  type: "search"
1099
1236
  }
1100
1237
  ) : props.inputSearch }),
1101
- props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ jsx27(
1238
+ props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1102
1239
  CSButton,
1103
1240
  {
1104
1241
  fieldSpec: elements.buttonSearch,
@@ -1116,8 +1253,8 @@ function CSVSearchFilterView(props) {
1116
1253
  }
1117
1254
 
1118
1255
  // src/views/CSVTextPromptModalView.tsx
1119
- import { Box as Box3, Modal, SpaceBetween as SpaceBetween3 } from "@cloudscape-design/components";
1120
- import { Fragment, jsx as jsx28, jsxs as jsxs6 } from "react/jsx-runtime";
1256
+ var import_components24 = require("@cloudscape-design/components");
1257
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1121
1258
  var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1122
1259
  headerHeading: spec.addField(new FieldSpec("headerHeading")),
1123
1260
  boxBodyText: spec.addField(new FieldSpec("boxBodyText")),
@@ -1127,7 +1264,7 @@ var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, pare
1127
1264
  function CSVTextPromptModalView(props) {
1128
1265
  const spec = props.viewSpec;
1129
1266
  const { elements } = spec;
1130
- const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ jsx28(
1267
+ const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1131
1268
  CSButton,
1132
1269
  {
1133
1270
  fieldSpec: elements.buttonSecondary,
@@ -1136,14 +1273,14 @@ function CSVTextPromptModalView(props) {
1136
1273
  onClick: props.onSecondaryAction,
1137
1274
  children: props.buttonSecondary
1138
1275
  }
1139
- ) : props.buttonSecondary : /* @__PURE__ */ jsx28(Fragment, {});
1140
- return /* @__PURE__ */ jsx28(
1141
- 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,
1142
1279
  {
1143
1280
  "data-testid": props.viewSpec.getDataTestId(),
1144
1281
  onDismiss: props.onDismiss,
1145
1282
  visible: props.visible,
1146
- header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ jsx28(
1283
+ header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1147
1284
  CSHeader,
1148
1285
  {
1149
1286
  fieldSpec: elements.headerHeading,
@@ -1151,8 +1288,8 @@ function CSVTextPromptModalView(props) {
1151
1288
  children: props.headerHeading
1152
1289
  }
1153
1290
  ) : props.headerHeading,
1154
- footer: /* @__PURE__ */ jsx28(Box3, { float: "right", children: /* @__PURE__ */ jsxs6(SpaceBetween3, { direction: "horizontal", size: "l", children: [
1155
- props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ jsx28(
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)(
1156
1293
  CSButton,
1157
1294
  {
1158
1295
  fieldSpec: elements.buttonPrimary,
@@ -1164,7 +1301,7 @@ function CSVTextPromptModalView(props) {
1164
1301
  ) : props.buttonPrimary,
1165
1302
  secondaryAction
1166
1303
  ] }) }),
1167
- children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */ jsx28(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
1168
1305
  }
1169
1306
  );
1170
1307
  }
@@ -1242,9 +1379,9 @@ var FieldProperties = class {
1242
1379
  };
1243
1380
 
1244
1381
  // src/utils/FixedWidth.tsx
1245
- import { jsx as jsx29 } from "react/jsx-runtime";
1382
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1246
1383
  function FixedWidth(props) {
1247
- return /* @__PURE__ */ jsx29("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 });
1248
1385
  }
1249
1386
 
1250
1387
  // src/utils/LocalStorageService.ts
@@ -1639,7 +1776,7 @@ var RestClient = class {
1639
1776
  };
1640
1777
 
1641
1778
  // src/hooks/useControllerDisplayState.ts
1642
- import { useCallback, useState as useState2 } from "react";
1779
+ var import_react2 = require("react");
1643
1780
  var RunFunctionResult = class {
1644
1781
  constructor(success, messages, result, resultHistory) {
1645
1782
  this.success = success;
@@ -1652,27 +1789,27 @@ var fatalRunErrorFunction = (reason) => {
1652
1789
  throw new Error(`Fatal error - could not handle run failure - reason: ${reason}`);
1653
1790
  };
1654
1791
  function useControllerDisplayState(initialDisplayMode, messages, logger) {
1655
- const [state, setState] = useState2(0 /* UNMOUNTED */);
1656
- const [loadingIndication, setLoadingIndication] = useState2({});
1657
- const [modified, setModified] = useState2(false);
1658
- const [displayMode, setDisplayMode] = useState2(initialDisplayMode);
1659
- 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)({
1660
1797
  show: (modalId, confirmFunction) => showModal(modalId, true, confirmFunction),
1661
1798
  hide: (modalId) => showModal(modalId, false)
1662
1799
  });
1663
1800
  const { addMessages } = messages;
1664
- const isLoading = useCallback((service) => {
1801
+ const isLoading = (0, import_react2.useCallback)((service) => {
1665
1802
  return loadingIndication.hasOwnProperty(service.name) && loadingIndication[service.name] === true;
1666
1803
  }, [loadingIndication]);
1667
- const load = useCallback((service) => {
1804
+ const load = (0, import_react2.useCallback)((service) => {
1668
1805
  setLoadingIndication((oldIndication) => ({ ...oldIndication, [service.name]: true }));
1669
1806
  }, []);
1670
- const doneLoading = useCallback((service) => {
1807
+ const doneLoading = (0, import_react2.useCallback)((service) => {
1671
1808
  setLoadingIndication((oldIndication) => {
1672
1809
  return { ...oldIndication, [service.name]: false };
1673
1810
  });
1674
1811
  }, []);
1675
- const enterDisplayMode = useCallback((mode) => {
1812
+ const enterDisplayMode = (0, import_react2.useCallback)((mode) => {
1676
1813
  setDisplayMode((previousMode) => {
1677
1814
  if (mode !== displayMode) {
1678
1815
  logger.info("Entering display mode: ", mode);
@@ -1681,7 +1818,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1681
1818
  return previousMode;
1682
1819
  });
1683
1820
  }, [displayMode, logger]);
1684
- const showModal = useCallback((modalId, show, confirmFunction) => {
1821
+ const showModal = (0, import_react2.useCallback)((modalId, show, confirmFunction) => {
1685
1822
  if (show) {
1686
1823
  setModalState((originalModalState) => {
1687
1824
  if (originalModalState.modalId !== void 0) {
@@ -1698,7 +1835,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1698
1835
  });
1699
1836
  }
1700
1837
  }, []);
1701
- const run = useCallback(function(service, execute, failureIsFatal, resultHistory) {
1838
+ const run = (0, import_react2.useCallback)(function(service, execute, failureIsFatal, resultHistory) {
1702
1839
  load(service);
1703
1840
  return execute().then((result) => {
1704
1841
  addMessages(result);
@@ -1719,7 +1856,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1719
1856
  return {
1720
1857
  state,
1721
1858
  setState,
1722
- setDirty: useCallback(setModified, [setModified]),
1859
+ setDirty: (0, import_react2.useCallback)(setModified, [setModified]),
1723
1860
  isDirty: () => modified,
1724
1861
  isLoading,
1725
1862
  displayMode,
@@ -1747,7 +1884,7 @@ function isContentWithMessages(object) {
1747
1884
  }
1748
1885
 
1749
1886
  // src/hooks/useTOChangeHandler.ts
1750
- import { useCallback as useCallback2 } from "react";
1887
+ var import_react3 = require("react");
1751
1888
  var ArrayStateHandler = class {
1752
1889
  static updateFieldsOfArrayElement(elementToUpdate, currentArrayContent, properties, onChangedArrayElement) {
1753
1890
  const newArrayValue = [...currentArrayContent];
@@ -1774,7 +1911,7 @@ var ArrayStateHandler = class {
1774
1911
  }
1775
1912
  };
1776
1913
  function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty) {
1777
- const onPropertyChangeMulti = useCallback2((properties, automaticChange) => {
1914
+ const onPropertyChangeMulti = (0, import_react3.useCallback)((properties, automaticChange) => {
1778
1915
  logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
1779
1916
  setTOState((previousValue) => {
1780
1917
  const newValue = { ...previousValue, ...properties };
@@ -1790,7 +1927,7 @@ function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty)
1790
1927
  return newValue;
1791
1928
  });
1792
1929
  }, [logger, notifications, setDirty, setTOState, toName]);
1793
- const onPropertyChange = useCallback2((propertyName, changedValue, automaticChange) => {
1930
+ const onPropertyChange = (0, import_react3.useCallback)((propertyName, changedValue, automaticChange) => {
1794
1931
  onPropertyChangeMulti({ [propertyName]: changedValue }, automaticChange);
1795
1932
  }, [onPropertyChangeMulti]);
1796
1933
  return { onPropertyChange, onPropertyChangeMulti };
@@ -1799,7 +1936,7 @@ var singleChangeHandlerToMulti = (onPropertyChangeMulti) => {
1799
1936
  return (propertyName, changedValue) => onPropertyChangeMulti({ [propertyName]: changedValue });
1800
1937
  };
1801
1938
  function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDirty) {
1802
- const onChangeElement = useCallback2((element, properties) => {
1939
+ const onChangeElement = (0, import_react3.useCallback)((element, properties) => {
1803
1940
  if (element !== void 0) {
1804
1941
  logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
1805
1942
  setArrayState((previousValue) => ArrayStateHandler.updateFieldsOfArrayElement(
@@ -1813,7 +1950,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1813
1950
  }
1814
1951
  }
1815
1952
  }, [logger, toName, setArrayState, setDirty, handlers.onChange]);
1816
- const onRemoveElements = useCallback2((removedElements) => {
1953
+ const onRemoveElements = (0, import_react3.useCallback)((removedElements) => {
1817
1954
  if (removedElements.length > 0) {
1818
1955
  logger.debug(`Removing ${removedElements.length} elements from array`);
1819
1956
  setArrayState((previousValue) => ArrayStateHandler.removeArrayElements(
@@ -1826,7 +1963,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1826
1963
  }
1827
1964
  }
1828
1965
  }, [logger, setArrayState, setDirty, handlers.onRemove]);
1829
- const onAddElements = useCallback2((newElements) => {
1966
+ const onAddElements = (0, import_react3.useCallback)((newElements) => {
1830
1967
  if (newElements.length === 0) {
1831
1968
  logger.debug(`Adding no new elements to array`);
1832
1969
  } else {
@@ -1845,23 +1982,23 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1845
1982
  }
1846
1983
 
1847
1984
  // src/hooks/useAWSUIRef.ts
1848
- import { useCallback as useCallback3, useRef } from "react";
1985
+ var import_react4 = require("react");
1849
1986
  function useAWSUIRef() {
1850
- const customRef = useRef(null);
1987
+ const customRef = (0, import_react4.useRef)(null);
1851
1988
  const isValidRef = () => {
1852
1989
  return customRef !== void 0 && customRef !== null && customRef.current !== void 0 && customRef.current !== null;
1853
1990
  };
1854
- const focus = useCallback3(() => {
1991
+ const focus = (0, import_react4.useCallback)(() => {
1855
1992
  if (isValidRef() && customRef.current.focus) {
1856
1993
  customRef.current.focus();
1857
1994
  }
1858
1995
  }, [customRef]);
1859
- const scrollToView = useCallback3(() => {
1996
+ const scrollToView = (0, import_react4.useCallback)(() => {
1860
1997
  if (isValidRef() && customRef.current.scrollIntoView) {
1861
1998
  customRef.current.scrollIntoView(true);
1862
1999
  }
1863
2000
  }, [customRef]);
1864
- const scrollToViewRef = useCallback3((element) => {
2001
+ const scrollToViewRef = (0, import_react4.useCallback)((element) => {
1865
2002
  if (element !== void 0 && element !== null && element.scrollIntoView) {
1866
2003
  element.scrollIntoView({ block: "nearest", behavior: "smooth" });
1867
2004
  }
@@ -1875,13 +2012,13 @@ function useAWSUIRef() {
1875
2012
  }
1876
2013
 
1877
2014
  // src/hooks/useHotkeys.ts
1878
- import { useCallback as useCallback4, useEffect as useEffect2, useLayoutEffect, useRef as useRef2 } from "react";
2015
+ var import_react5 = require("react");
1879
2016
  var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1880
- const callbackRef = useRef2(callback);
1881
- useLayoutEffect(() => {
2017
+ const callbackRef = (0, import_react5.useRef)(callback);
2018
+ (0, import_react5.useLayoutEffect)(() => {
1882
2019
  callbackRef.current = callback;
1883
2020
  });
1884
- const handleKeyPress = useCallback4(
2021
+ const handleKeyPress = (0, import_react5.useCallback)(
1885
2022
  (event) => {
1886
2023
  if (event.key === key && (!shift || event.shiftKey) && (!ctrl || event.ctrlKey) && (!alt || event.altKey)) {
1887
2024
  callbackRef.current(event);
@@ -1889,7 +2026,7 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1889
2026
  },
1890
2027
  [alt, ctrl, key, shift]
1891
2028
  );
1892
- useEffect2(() => {
2029
+ (0, import_react5.useEffect)(() => {
1893
2030
  const targetNode = node != null ? node : document;
1894
2031
  targetNode && targetNode.addEventListener("keydown", handleKeyPress);
1895
2032
  return () => targetNode && targetNode.removeEventListener("keydown", handleKeyPress);
@@ -1897,20 +2034,20 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1897
2034
  };
1898
2035
 
1899
2036
  // src/hooks/useMessages.ts
1900
- import { useCallback as useCallback5, useState as useState3 } from "react";
2037
+ var import_react6 = require("react");
1901
2038
  function useMessages(LOGGER3) {
1902
- const [messages, setMessages] = useState3([]);
1903
- const onDismissMessage = useCallback5((message) => {
2039
+ const [messages, setMessages] = (0, import_react6.useState)([]);
2040
+ const onDismissMessage = (0, import_react6.useCallback)((message) => {
1904
2041
  const newMessages = messages.filter((existingMsg) => message !== existingMsg);
1905
2042
  setMessages(newMessages);
1906
2043
  }, [messages]);
1907
- const onToggleMessageDetail = useCallback5((message) => {
2044
+ const onToggleMessageDetail = (0, import_react6.useCallback)((message) => {
1908
2045
  const idx = messages.indexOf(message);
1909
2046
  const newMessages = [...messages];
1910
2047
  newMessages[idx].showDetails = !newMessages[idx].showDetails;
1911
2048
  setMessages(newMessages);
1912
2049
  }, [messages]);
1913
- const addMessages = useCallback5((newMessages) => {
2050
+ const addMessages = (0, import_react6.useCallback)((newMessages) => {
1914
2051
  if (!newMessages.hasOwnProperty("messages")) {
1915
2052
  LOGGER3.error("Given response data structure does not contain messages - probably another runtime error occurred: ", newMessages);
1916
2053
  if (newMessages.hasOwnProperty("stack")) {
@@ -1924,7 +2061,7 @@ function useMessages(LOGGER3) {
1924
2061
  setMessages((oldMessages) => [...oldMessages, ...addedMessages]);
1925
2062
  }
1926
2063
  }, [LOGGER3]);
1927
- const clearMessages = useCallback5(() => {
2064
+ const clearMessages = (0, import_react6.useCallback)(() => {
1928
2065
  setMessages([]);
1929
2066
  }, []);
1930
2067
  return {
@@ -1935,11 +2072,13 @@ function useMessages(LOGGER3) {
1935
2072
  clearMessages
1936
2073
  };
1937
2074
  }
1938
- export {
2075
+ // Annotate the CommonJS export names for ESM import in node:
2076
+ 0 && (module.exports = {
1939
2077
  CSAlert,
1940
2078
  CSBox,
1941
2079
  CSButton,
1942
2080
  CSCheckbox,
2081
+ CSCopyToClipboard,
1943
2082
  CSDatePicker,
1944
2083
  CSEnumMultiselect,
1945
2084
  CSEnumSegmentedControl,
@@ -2020,4 +2159,4 @@ export {
2020
2159
  useTOArrayChangeHandler,
2021
2160
  useTOChangeHandler,
2022
2161
  warnWhenTabIsClosed
2023
- };
2162
+ });