@ebertjendustries/cswrapper 1.0.11 → 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 {
@@ -751,7 +877,7 @@ var ViewElementSpec = class {
751
877
  return this.keyHierarchy;
752
878
  }
753
879
  log(prefix) {
754
- LOGGER.info(`${prefix === void 0 ? "" : prefix}DT ID = ${this.getDataTestId()} ----> Loc Key = ${this.getLocalisationKey()}`);
880
+ LOGGER.info(`${prefix === void 0 ? "" : prefix}<${this.getDataTestId()}> = ${this.getLocalisationKey()}`);
755
881
  }
756
882
  };
757
883
  var FieldSpec = class _FieldSpec extends ViewElementSpec {
@@ -859,17 +985,17 @@ var ViewSpec = class _ViewSpec extends ViewElementSpec {
859
985
  return this.viewValidator(this, value);
860
986
  }
861
987
  logViewSpec() {
862
- this.log();
988
+ this.log("VIEW :::: ");
863
989
  for (const element of Object.values(this.elements)) {
864
990
  if (element instanceof ViewElementSpec) {
865
- element.log(" ");
991
+ element.log(" FIELD :::: ");
866
992
  }
867
993
  }
868
994
  }
869
995
  };
870
996
 
871
997
  // src/views/CSVEnumRatingView.tsx
872
- import { jsx as jsx24, jsxs as jsxs2 } from "react/jsx-runtime";
998
+ var import_jsx_runtime25 = require("react/jsx-runtime");
873
999
  var CSV_ENUM_RATING_VIEW_SPEC = (parent, key, instanceId) => ViewSpec.create(key, parent.ns, (spec) => ({
874
1000
  rating: spec.addField(new FieldSpec("rating")),
875
1001
  boxRatingName: spec.addField(new FieldSpec("boxRatingName"))
@@ -883,7 +1009,7 @@ function getEnumRatingLabel(enumInstance, instanceId) {
883
1009
  function CSVEnumRatingView(props) {
884
1010
  const spec = props.viewSpec;
885
1011
  const { elements } = spec;
886
- const [hoveredValue, setHoveredValue] = useState(props.selectedEnum);
1012
+ const [hoveredValue, setHoveredValue] = (0, import_react.useState)(props.selectedEnum);
887
1013
  const valuesInOrder = getEnumRatingValues(props.factory, props.toOrderNumber);
888
1014
  const onHover = (hoveredIndex) => {
889
1015
  if (hoveredIndex === 0) {
@@ -893,12 +1019,12 @@ function CSVEnumRatingView(props) {
893
1019
  }
894
1020
  };
895
1021
  const itemCount = Math.max(1, Math.min(valuesInOrder.length - 1, 10));
896
- useEffect(() => {
1022
+ (0, import_react.useEffect)(() => {
897
1023
  setHoveredValue(props.selectedEnum);
898
1024
  }, [props.selectedEnum]);
899
- return /* @__PURE__ */ jsxs2(CSFormField, { fieldSpec: elements.rating, localiser: props.localiser, children: [
900
- /* @__PURE__ */ jsx24(
901
- 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,
902
1028
  {
903
1029
  "data-testid": elements.rating.getDataTestId(),
904
1030
  isDisabled: props.disabled,
@@ -910,7 +1036,7 @@ function CSVEnumRatingView(props) {
910
1036
  invisibleItemLabels: valuesInOrder.slice(1).map((e) => getEnumRatingLabel(e, spec.instanceId))
911
1037
  }
912
1038
  ),
913
- /* @__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)(
914
1040
  CSBox,
915
1041
  {
916
1042
  fieldSpec: elements.boxRatingName,
@@ -923,8 +1049,8 @@ function CSVEnumRatingView(props) {
923
1049
  }
924
1050
 
925
1051
  // src/views/CSVNoItemsView.tsx
926
- import { Box as Box2, SpaceBetween } from "@cloudscape-design/components";
927
- 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");
928
1054
  var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec) => ({
929
1055
  boxHeading: spec.addField(new FieldSpec("boxHeading")),
930
1056
  boxBody: spec.addField(new FieldSpec("boxBody"))
@@ -932,8 +1058,8 @@ var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec
932
1058
  function CSVNoItemsView(props) {
933
1059
  const spec = props.viewSpec;
934
1060
  const { elements } = spec;
935
- 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: [
936
- /* @__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)(
937
1063
  CSBox,
938
1064
  {
939
1065
  fieldSpec: elements.boxHeading,
@@ -944,7 +1070,7 @@ function CSVNoItemsView(props) {
944
1070
  children: props.headingText
945
1071
  }
946
1072
  ),
947
- /* @__PURE__ */ jsx25(
1073
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
948
1074
  CSBox,
949
1075
  {
950
1076
  fieldSpec: elements.boxBody,
@@ -961,7 +1087,7 @@ function CSVNoItemsView(props) {
961
1087
  }
962
1088
 
963
1089
  // src/views/CSVPriceInputView.tsx
964
- import { Grid } from "@cloudscape-design/components";
1090
+ var import_components22 = require("@cloudscape-design/components");
965
1091
 
966
1092
  // src/utils/PriceUtils.ts
967
1093
  var LOGGER2 = new Log("PriceUtils");
@@ -1024,7 +1150,7 @@ _PriceUtils.parseFormattedPriceWithCurrency = (locale, formattedPrice, currencyS
1024
1150
  var PriceUtils = _PriceUtils;
1025
1151
 
1026
1152
  // src/views/CSVPriceInputView.tsx
1027
- import { jsx as jsx26, jsxs as jsxs4 } from "react/jsx-runtime";
1153
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1028
1154
  var CSV_PRICE_INPUT_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1029
1155
  inputPrice: spec.addField(new FieldSpec("inputPrice", true, void 0, 0)),
1030
1156
  selectCurrency: spec.addField(new FieldSpec("currency", true)),
@@ -1035,13 +1161,13 @@ function CSVPriceInputView(props) {
1035
1161
  const { elements } = spec;
1036
1162
  const priceInCents = props.value ? props.value.priceInCents : 0;
1037
1163
  const currency = props.value ? props.value.currency : props.defaultCurrency;
1038
- return /* @__PURE__ */ jsxs4(
1039
- Grid,
1164
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
1165
+ import_components22.Grid,
1040
1166
  {
1041
1167
  gridDefinition: [{ colspan: 4 }, { colspan: { default: 4, xxs: 3 } }, { colspan: { default: 4, xxs: 5 } }],
1042
1168
  disableGutters: true,
1043
1169
  children: [
1044
- /* @__PURE__ */ jsx26(
1170
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1045
1171
  CSNumericInput,
1046
1172
  {
1047
1173
  fieldSpec: elements.inputPrice,
@@ -1055,7 +1181,7 @@ function CSVPriceInputView(props) {
1055
1181
  })
1056
1182
  }
1057
1183
  ),
1058
- /* @__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)(
1059
1185
  CSEnumSelect,
1060
1186
  {
1061
1187
  fieldSpec: elements.selectCurrency,
@@ -1070,7 +1196,7 @@ function CSVPriceInputView(props) {
1070
1196
  expandToViewport: props.expandToViewport
1071
1197
  }
1072
1198
  ) }),
1073
- /* @__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)(
1074
1200
  CSBox,
1075
1201
  {
1076
1202
  fieldSpec: elements.boxPriceDisplay,
@@ -1087,8 +1213,8 @@ function CSVPriceInputView(props) {
1087
1213
  }
1088
1214
 
1089
1215
  // src/views/CSVSearchFilterView.tsx
1090
- import { SpaceBetween as SpaceBetween2 } from "@cloudscape-design/components";
1091
- 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");
1092
1218
  var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1093
1219
  inputSearch: spec.addField(new FieldSpec("inputSearch")),
1094
1220
  buttonSearch: spec.addField(new FieldSpec("buttonSearch"))
@@ -1096,8 +1222,8 @@ var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.n
1096
1222
  function CSVSearchFilterView(props) {
1097
1223
  const spec = props.viewSpec;
1098
1224
  const { elements } = spec;
1099
- return /* @__PURE__ */ jsxs5(SpaceBetween2, { size: "s", direction: "horizontal", children: [
1100
- /* @__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)(
1101
1227
  CSInput,
1102
1228
  {
1103
1229
  fieldSpec: elements.inputSearch,
@@ -1109,7 +1235,7 @@ function CSVSearchFilterView(props) {
1109
1235
  type: "search"
1110
1236
  }
1111
1237
  ) : props.inputSearch }),
1112
- 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)(
1113
1239
  CSButton,
1114
1240
  {
1115
1241
  fieldSpec: elements.buttonSearch,
@@ -1127,8 +1253,8 @@ function CSVSearchFilterView(props) {
1127
1253
  }
1128
1254
 
1129
1255
  // src/views/CSVTextPromptModalView.tsx
1130
- import { Box as Box3, Modal, SpaceBetween as SpaceBetween3 } from "@cloudscape-design/components";
1131
- 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");
1132
1258
  var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
1133
1259
  headerHeading: spec.addField(new FieldSpec("headerHeading")),
1134
1260
  boxBodyText: spec.addField(new FieldSpec("boxBodyText")),
@@ -1138,7 +1264,7 @@ var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, pare
1138
1264
  function CSVTextPromptModalView(props) {
1139
1265
  const spec = props.viewSpec;
1140
1266
  const { elements } = spec;
1141
- 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)(
1142
1268
  CSButton,
1143
1269
  {
1144
1270
  fieldSpec: elements.buttonSecondary,
@@ -1147,14 +1273,14 @@ function CSVTextPromptModalView(props) {
1147
1273
  onClick: props.onSecondaryAction,
1148
1274
  children: props.buttonSecondary
1149
1275
  }
1150
- ) : props.buttonSecondary : /* @__PURE__ */ jsx28(Fragment, {});
1151
- return /* @__PURE__ */ jsx28(
1152
- 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,
1153
1279
  {
1154
1280
  "data-testid": props.viewSpec.getDataTestId(),
1155
1281
  onDismiss: props.onDismiss,
1156
1282
  visible: props.visible,
1157
- 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)(
1158
1284
  CSHeader,
1159
1285
  {
1160
1286
  fieldSpec: elements.headerHeading,
@@ -1162,8 +1288,8 @@ function CSVTextPromptModalView(props) {
1162
1288
  children: props.headerHeading
1163
1289
  }
1164
1290
  ) : props.headerHeading,
1165
- footer: /* @__PURE__ */ jsx28(Box3, { float: "right", children: /* @__PURE__ */ jsxs6(SpaceBetween3, { direction: "horizontal", size: "l", children: [
1166
- 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)(
1167
1293
  CSButton,
1168
1294
  {
1169
1295
  fieldSpec: elements.buttonPrimary,
@@ -1175,7 +1301,7 @@ function CSVTextPromptModalView(props) {
1175
1301
  ) : props.buttonPrimary,
1176
1302
  secondaryAction
1177
1303
  ] }) }),
1178
- 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
1179
1305
  }
1180
1306
  );
1181
1307
  }
@@ -1253,9 +1379,9 @@ var FieldProperties = class {
1253
1379
  };
1254
1380
 
1255
1381
  // src/utils/FixedWidth.tsx
1256
- import { jsx as jsx29 } from "react/jsx-runtime";
1382
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1257
1383
  function FixedWidth(props) {
1258
- 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 });
1259
1385
  }
1260
1386
 
1261
1387
  // src/utils/LocalStorageService.ts
@@ -1650,7 +1776,7 @@ var RestClient = class {
1650
1776
  };
1651
1777
 
1652
1778
  // src/hooks/useControllerDisplayState.ts
1653
- import { useCallback, useState as useState2 } from "react";
1779
+ var import_react2 = require("react");
1654
1780
  var RunFunctionResult = class {
1655
1781
  constructor(success, messages, result, resultHistory) {
1656
1782
  this.success = success;
@@ -1663,27 +1789,27 @@ var fatalRunErrorFunction = (reason) => {
1663
1789
  throw new Error(`Fatal error - could not handle run failure - reason: ${reason}`);
1664
1790
  };
1665
1791
  function useControllerDisplayState(initialDisplayMode, messages, logger) {
1666
- const [state, setState] = useState2(0 /* UNMOUNTED */);
1667
- const [loadingIndication, setLoadingIndication] = useState2({});
1668
- const [modified, setModified] = useState2(false);
1669
- const [displayMode, setDisplayMode] = useState2(initialDisplayMode);
1670
- 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)({
1671
1797
  show: (modalId, confirmFunction) => showModal(modalId, true, confirmFunction),
1672
1798
  hide: (modalId) => showModal(modalId, false)
1673
1799
  });
1674
1800
  const { addMessages } = messages;
1675
- const isLoading = useCallback((service) => {
1801
+ const isLoading = (0, import_react2.useCallback)((service) => {
1676
1802
  return loadingIndication.hasOwnProperty(service.name) && loadingIndication[service.name] === true;
1677
1803
  }, [loadingIndication]);
1678
- const load = useCallback((service) => {
1804
+ const load = (0, import_react2.useCallback)((service) => {
1679
1805
  setLoadingIndication((oldIndication) => ({ ...oldIndication, [service.name]: true }));
1680
1806
  }, []);
1681
- const doneLoading = useCallback((service) => {
1807
+ const doneLoading = (0, import_react2.useCallback)((service) => {
1682
1808
  setLoadingIndication((oldIndication) => {
1683
1809
  return { ...oldIndication, [service.name]: false };
1684
1810
  });
1685
1811
  }, []);
1686
- const enterDisplayMode = useCallback((mode) => {
1812
+ const enterDisplayMode = (0, import_react2.useCallback)((mode) => {
1687
1813
  setDisplayMode((previousMode) => {
1688
1814
  if (mode !== displayMode) {
1689
1815
  logger.info("Entering display mode: ", mode);
@@ -1692,7 +1818,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1692
1818
  return previousMode;
1693
1819
  });
1694
1820
  }, [displayMode, logger]);
1695
- const showModal = useCallback((modalId, show, confirmFunction) => {
1821
+ const showModal = (0, import_react2.useCallback)((modalId, show, confirmFunction) => {
1696
1822
  if (show) {
1697
1823
  setModalState((originalModalState) => {
1698
1824
  if (originalModalState.modalId !== void 0) {
@@ -1709,7 +1835,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1709
1835
  });
1710
1836
  }
1711
1837
  }, []);
1712
- const run = useCallback(function(service, execute, failureIsFatal, resultHistory) {
1838
+ const run = (0, import_react2.useCallback)(function(service, execute, failureIsFatal, resultHistory) {
1713
1839
  load(service);
1714
1840
  return execute().then((result) => {
1715
1841
  addMessages(result);
@@ -1730,7 +1856,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
1730
1856
  return {
1731
1857
  state,
1732
1858
  setState,
1733
- setDirty: useCallback(setModified, [setModified]),
1859
+ setDirty: (0, import_react2.useCallback)(setModified, [setModified]),
1734
1860
  isDirty: () => modified,
1735
1861
  isLoading,
1736
1862
  displayMode,
@@ -1758,7 +1884,7 @@ function isContentWithMessages(object) {
1758
1884
  }
1759
1885
 
1760
1886
  // src/hooks/useTOChangeHandler.ts
1761
- import { useCallback as useCallback2 } from "react";
1887
+ var import_react3 = require("react");
1762
1888
  var ArrayStateHandler = class {
1763
1889
  static updateFieldsOfArrayElement(elementToUpdate, currentArrayContent, properties, onChangedArrayElement) {
1764
1890
  const newArrayValue = [...currentArrayContent];
@@ -1785,7 +1911,7 @@ var ArrayStateHandler = class {
1785
1911
  }
1786
1912
  };
1787
1913
  function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty) {
1788
- const onPropertyChangeMulti = useCallback2((properties, automaticChange) => {
1914
+ const onPropertyChangeMulti = (0, import_react3.useCallback)((properties, automaticChange) => {
1789
1915
  logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
1790
1916
  setTOState((previousValue) => {
1791
1917
  const newValue = { ...previousValue, ...properties };
@@ -1801,7 +1927,7 @@ function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty)
1801
1927
  return newValue;
1802
1928
  });
1803
1929
  }, [logger, notifications, setDirty, setTOState, toName]);
1804
- const onPropertyChange = useCallback2((propertyName, changedValue, automaticChange) => {
1930
+ const onPropertyChange = (0, import_react3.useCallback)((propertyName, changedValue, automaticChange) => {
1805
1931
  onPropertyChangeMulti({ [propertyName]: changedValue }, automaticChange);
1806
1932
  }, [onPropertyChangeMulti]);
1807
1933
  return { onPropertyChange, onPropertyChangeMulti };
@@ -1810,7 +1936,7 @@ var singleChangeHandlerToMulti = (onPropertyChangeMulti) => {
1810
1936
  return (propertyName, changedValue) => onPropertyChangeMulti({ [propertyName]: changedValue });
1811
1937
  };
1812
1938
  function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDirty) {
1813
- const onChangeElement = useCallback2((element, properties) => {
1939
+ const onChangeElement = (0, import_react3.useCallback)((element, properties) => {
1814
1940
  if (element !== void 0) {
1815
1941
  logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
1816
1942
  setArrayState((previousValue) => ArrayStateHandler.updateFieldsOfArrayElement(
@@ -1824,7 +1950,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1824
1950
  }
1825
1951
  }
1826
1952
  }, [logger, toName, setArrayState, setDirty, handlers.onChange]);
1827
- const onRemoveElements = useCallback2((removedElements) => {
1953
+ const onRemoveElements = (0, import_react3.useCallback)((removedElements) => {
1828
1954
  if (removedElements.length > 0) {
1829
1955
  logger.debug(`Removing ${removedElements.length} elements from array`);
1830
1956
  setArrayState((previousValue) => ArrayStateHandler.removeArrayElements(
@@ -1837,7 +1963,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1837
1963
  }
1838
1964
  }
1839
1965
  }, [logger, setArrayState, setDirty, handlers.onRemove]);
1840
- const onAddElements = useCallback2((newElements) => {
1966
+ const onAddElements = (0, import_react3.useCallback)((newElements) => {
1841
1967
  if (newElements.length === 0) {
1842
1968
  logger.debug(`Adding no new elements to array`);
1843
1969
  } else {
@@ -1856,23 +1982,23 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
1856
1982
  }
1857
1983
 
1858
1984
  // src/hooks/useAWSUIRef.ts
1859
- import { useCallback as useCallback3, useRef } from "react";
1985
+ var import_react4 = require("react");
1860
1986
  function useAWSUIRef() {
1861
- const customRef = useRef(null);
1987
+ const customRef = (0, import_react4.useRef)(null);
1862
1988
  const isValidRef = () => {
1863
1989
  return customRef !== void 0 && customRef !== null && customRef.current !== void 0 && customRef.current !== null;
1864
1990
  };
1865
- const focus = useCallback3(() => {
1991
+ const focus = (0, import_react4.useCallback)(() => {
1866
1992
  if (isValidRef() && customRef.current.focus) {
1867
1993
  customRef.current.focus();
1868
1994
  }
1869
1995
  }, [customRef]);
1870
- const scrollToView = useCallback3(() => {
1996
+ const scrollToView = (0, import_react4.useCallback)(() => {
1871
1997
  if (isValidRef() && customRef.current.scrollIntoView) {
1872
1998
  customRef.current.scrollIntoView(true);
1873
1999
  }
1874
2000
  }, [customRef]);
1875
- const scrollToViewRef = useCallback3((element) => {
2001
+ const scrollToViewRef = (0, import_react4.useCallback)((element) => {
1876
2002
  if (element !== void 0 && element !== null && element.scrollIntoView) {
1877
2003
  element.scrollIntoView({ block: "nearest", behavior: "smooth" });
1878
2004
  }
@@ -1886,13 +2012,13 @@ function useAWSUIRef() {
1886
2012
  }
1887
2013
 
1888
2014
  // src/hooks/useHotkeys.ts
1889
- import { useCallback as useCallback4, useEffect as useEffect2, useLayoutEffect, useRef as useRef2 } from "react";
2015
+ var import_react5 = require("react");
1890
2016
  var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1891
- const callbackRef = useRef2(callback);
1892
- useLayoutEffect(() => {
2017
+ const callbackRef = (0, import_react5.useRef)(callback);
2018
+ (0, import_react5.useLayoutEffect)(() => {
1893
2019
  callbackRef.current = callback;
1894
2020
  });
1895
- const handleKeyPress = useCallback4(
2021
+ const handleKeyPress = (0, import_react5.useCallback)(
1896
2022
  (event) => {
1897
2023
  if (event.key === key && (!shift || event.shiftKey) && (!ctrl || event.ctrlKey) && (!alt || event.altKey)) {
1898
2024
  callbackRef.current(event);
@@ -1900,7 +2026,7 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1900
2026
  },
1901
2027
  [alt, ctrl, key, shift]
1902
2028
  );
1903
- useEffect2(() => {
2029
+ (0, import_react5.useEffect)(() => {
1904
2030
  const targetNode = node != null ? node : document;
1905
2031
  targetNode && targetNode.addEventListener("keydown", handleKeyPress);
1906
2032
  return () => targetNode && targetNode.removeEventListener("keydown", handleKeyPress);
@@ -1908,20 +2034,20 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
1908
2034
  };
1909
2035
 
1910
2036
  // src/hooks/useMessages.ts
1911
- import { useCallback as useCallback5, useState as useState3 } from "react";
2037
+ var import_react6 = require("react");
1912
2038
  function useMessages(LOGGER3) {
1913
- const [messages, setMessages] = useState3([]);
1914
- const onDismissMessage = useCallback5((message) => {
2039
+ const [messages, setMessages] = (0, import_react6.useState)([]);
2040
+ const onDismissMessage = (0, import_react6.useCallback)((message) => {
1915
2041
  const newMessages = messages.filter((existingMsg) => message !== existingMsg);
1916
2042
  setMessages(newMessages);
1917
2043
  }, [messages]);
1918
- const onToggleMessageDetail = useCallback5((message) => {
2044
+ const onToggleMessageDetail = (0, import_react6.useCallback)((message) => {
1919
2045
  const idx = messages.indexOf(message);
1920
2046
  const newMessages = [...messages];
1921
2047
  newMessages[idx].showDetails = !newMessages[idx].showDetails;
1922
2048
  setMessages(newMessages);
1923
2049
  }, [messages]);
1924
- const addMessages = useCallback5((newMessages) => {
2050
+ const addMessages = (0, import_react6.useCallback)((newMessages) => {
1925
2051
  if (!newMessages.hasOwnProperty("messages")) {
1926
2052
  LOGGER3.error("Given response data structure does not contain messages - probably another runtime error occurred: ", newMessages);
1927
2053
  if (newMessages.hasOwnProperty("stack")) {
@@ -1935,7 +2061,7 @@ function useMessages(LOGGER3) {
1935
2061
  setMessages((oldMessages) => [...oldMessages, ...addedMessages]);
1936
2062
  }
1937
2063
  }, [LOGGER3]);
1938
- const clearMessages = useCallback5(() => {
2064
+ const clearMessages = (0, import_react6.useCallback)(() => {
1939
2065
  setMessages([]);
1940
2066
  }, []);
1941
2067
  return {
@@ -1946,11 +2072,13 @@ function useMessages(LOGGER3) {
1946
2072
  clearMessages
1947
2073
  };
1948
2074
  }
1949
- export {
2075
+ // Annotate the CommonJS export names for ESM import in node:
2076
+ 0 && (module.exports = {
1950
2077
  CSAlert,
1951
2078
  CSBox,
1952
2079
  CSButton,
1953
2080
  CSCheckbox,
2081
+ CSCopyToClipboard,
1954
2082
  CSDatePicker,
1955
2083
  CSEnumMultiselect,
1956
2084
  CSEnumSegmentedControl,
@@ -2031,4 +2159,4 @@ export {
2031
2159
  useTOArrayChangeHandler,
2032
2160
  useTOChangeHandler,
2033
2161
  warnWhenTabIsClosed
2034
- };
2162
+ });