@ebertjendustries/cswrapper 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index.d.cts → index.d.mts} +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +293 -170
- package/dist/{index.cjs → index.mjs} +183 -282
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
CSAlert: () => CSAlert,
|
|
24
|
+
CSBox: () => CSBox,
|
|
25
|
+
CSButton: () => CSButton,
|
|
26
|
+
CSCheckbox: () => CSCheckbox,
|
|
27
|
+
CSCopyToClipboard: () => CSCopyToClipboard,
|
|
28
|
+
CSDatePicker: () => CSDatePicker,
|
|
29
|
+
CSEnumMultiselect: () => CSEnumMultiselect,
|
|
30
|
+
CSEnumSegmentedControl: () => CSEnumSegmentedControl,
|
|
31
|
+
CSEnumSelect: () => CSEnumSelect,
|
|
32
|
+
CSEnumTiles: () => CSEnumTiles,
|
|
33
|
+
CSExternalLink: () => CSExternalLink,
|
|
34
|
+
CSFormField: () => CSFormField,
|
|
35
|
+
CSHeader: () => CSHeader,
|
|
36
|
+
CSInput: () => CSInput,
|
|
37
|
+
CSLink: () => CSLink,
|
|
38
|
+
CSMultiselect: () => CSMultiselect,
|
|
39
|
+
CSNumericInput: () => CSNumericInput,
|
|
40
|
+
CSSegmentedControl: () => CSSegmentedControl,
|
|
41
|
+
CSSelect: () => CSSelect,
|
|
42
|
+
CSStatusIndicator: () => CSStatusIndicator,
|
|
43
|
+
CSTextContent: () => CSTextContent,
|
|
44
|
+
CSTextarea: () => CSTextarea,
|
|
45
|
+
CSTimeInput: () => CSTimeInput,
|
|
46
|
+
CSToggle: () => CSToggle,
|
|
47
|
+
CSVEnumRatingView: () => CSVEnumRatingView,
|
|
48
|
+
CSVNoItemsView: () => CSVNoItemsView,
|
|
49
|
+
CSVPriceInputView: () => CSVPriceInputView,
|
|
50
|
+
CSVSearchFilterView: () => CSVSearchFilterView,
|
|
51
|
+
CSVTextPromptModalView: () => CSVTextPromptModalView,
|
|
52
|
+
CSV_ENUM_RATING_VIEW_SPEC: () => CSV_ENUM_RATING_VIEW_SPEC,
|
|
53
|
+
CSV_NO_ITEMS_VIEW_SPEC: () => CSV_NO_ITEMS_VIEW_SPEC,
|
|
54
|
+
CSV_PRICE_INPUT_VIEW_SPEC: () => CSV_PRICE_INPUT_VIEW_SPEC,
|
|
55
|
+
CSV_SEARCH_FILTER_VIEW_SPEC: () => CSV_SEARCH_FILTER_VIEW_SPEC,
|
|
56
|
+
CSV_TEXT_PROMPT_MODAL_VIEW_SPEC: () => CSV_TEXT_PROMPT_MODAL_VIEW_SPEC,
|
|
57
|
+
ChildUtils: () => ChildUtils,
|
|
58
|
+
ControllerState: () => ControllerState,
|
|
59
|
+
DateUtils: () => DateUtils,
|
|
60
|
+
ELEMENT_VALIDITY_LEVEL_FACTORY: () => ELEMENT_VALIDITY_LEVEL_FACTORY,
|
|
61
|
+
ElementValidityLevel: () => ElementValidityLevel,
|
|
62
|
+
EnumFactory: () => EnumFactory,
|
|
63
|
+
FORM_FIELD_ID_SUFFIX: () => FORM_FIELD_ID_SUFFIX,
|
|
64
|
+
FieldProperties: () => FieldProperties,
|
|
65
|
+
FieldSpec: () => FieldSpec,
|
|
66
|
+
FixedWidth: () => FixedWidth,
|
|
67
|
+
FromPropsHelper: () => FromPropsHelper,
|
|
68
|
+
LocalStorageService: () => LocalStorageService,
|
|
69
|
+
LocalisationNamespace: () => LocalisationNamespace,
|
|
70
|
+
Localiser: () => Localiser,
|
|
71
|
+
Log: () => Log,
|
|
72
|
+
MESSAGE_SEVERITY_FACTORY: () => MESSAGE_SEVERITY_FACTORY,
|
|
73
|
+
MessageCTO: () => MessageCTO,
|
|
74
|
+
MessageCodeTO: () => MessageCodeTO,
|
|
75
|
+
MessageService: () => MessageService,
|
|
76
|
+
MessageSeverity: () => MessageSeverity,
|
|
77
|
+
NO_HTTP_CODE: () => NO_HTTP_CODE,
|
|
78
|
+
NSK_CONTENT: () => NSK_CONTENT,
|
|
79
|
+
ObjectWithId: () => ObjectWithId,
|
|
80
|
+
PriceUtils: () => PriceUtils,
|
|
81
|
+
QUERY_SEP: () => QUERY_SEP,
|
|
82
|
+
QUERY_START: () => QUERY_START,
|
|
83
|
+
QueryParamHelper: () => QueryParamHelper,
|
|
84
|
+
REST_CLIENT_LOGGER: () => REST_CLIENT_LOGGER,
|
|
85
|
+
RestClient: () => RestClient,
|
|
86
|
+
RunFunctionResult: () => RunFunctionResult,
|
|
87
|
+
SelectHelper: () => SelectHelper,
|
|
88
|
+
TECHNICAL_CONTROLLER_ID: () => TECHNICAL_CONTROLLER_ID,
|
|
89
|
+
ViewSpec: () => ViewSpec,
|
|
90
|
+
createRestClient: () => createRestClient,
|
|
91
|
+
fatalRunErrorFunction: () => fatalRunErrorFunction,
|
|
92
|
+
filterArrayByIndices: () => filterArrayByIndices,
|
|
93
|
+
getEnumRatingLabel: () => getEnumRatingLabel,
|
|
94
|
+
getEnumRatingValues: () => getEnumRatingValues,
|
|
95
|
+
indexRangeArray: () => indexRangeArray,
|
|
96
|
+
isContentWithMessages: () => isContentWithMessages,
|
|
97
|
+
openInNewTab: () => openInNewTab,
|
|
98
|
+
singleChangeHandlerToMulti: () => singleChangeHandlerToMulti,
|
|
99
|
+
sleep: () => sleep,
|
|
100
|
+
sortArrayByIndices: () => sortArrayByIndices,
|
|
101
|
+
useAWSUIRef: () => useAWSUIRef,
|
|
102
|
+
useControllerDisplayState: () => useControllerDisplayState,
|
|
103
|
+
useHotkey: () => useHotkey,
|
|
104
|
+
useMessages: () => useMessages,
|
|
105
|
+
useTOArrayChangeHandler: () => useTOArrayChangeHandler,
|
|
106
|
+
useTOChangeHandler: () => useTOChangeHandler,
|
|
107
|
+
warnWhenTabIsClosed: () => warnWhenTabIsClosed
|
|
108
|
+
});
|
|
109
|
+
module.exports = __toCommonJS(index_exports);
|
|
110
|
+
|
|
1
111
|
// src/components/CSAlert.tsx
|
|
2
|
-
|
|
112
|
+
var import_components2 = require("@cloudscape-design/components");
|
|
3
113
|
|
|
4
114
|
// src/types/CSFormProps.ts
|
|
5
115
|
var FromPropsHelper = class {
|
|
@@ -11,7 +121,7 @@ FromPropsHelper.getBasicProps = (props) => {
|
|
|
11
121
|
};
|
|
12
122
|
FromPropsHelper.usesFormField = (props) => {
|
|
13
123
|
const localisation = props.localiser.localiseField(props.fieldSpec.getLocalisationKey(), props.localisationVariables, props.alternateNs);
|
|
14
|
-
return props.formField !== void 0 || (localisation == null ? void 0 : localisation.formField) !== void 0;
|
|
124
|
+
return props.formField !== void 0 || (localisation == null ? void 0 : localisation.formField) !== void 0 || props.secondaryControl !== void 0;
|
|
15
125
|
};
|
|
16
126
|
FromPropsHelper.getLocalisedErrorText = (props, value, localiseValidity) => {
|
|
17
127
|
var _a, _b;
|
|
@@ -29,8 +139,13 @@ FromPropsHelper.sanitizeValueToString = (value) => {
|
|
|
29
139
|
};
|
|
30
140
|
|
|
31
141
|
// src/components/CSFormField.tsx
|
|
32
|
-
|
|
33
|
-
|
|
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,35 @@ function CSFormField(props) {
|
|
|
38
153
|
if (!FromPropsHelper.usesFormField(props)) {
|
|
39
154
|
return props.children;
|
|
40
155
|
}
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
157
|
+
import_components.FormField,
|
|
158
|
+
{
|
|
159
|
+
"data-testid": formFieldId,
|
|
160
|
+
...localisationObject == null ? void 0 : localisationObject.formField,
|
|
161
|
+
...props.formField,
|
|
162
|
+
secondaryControl: props.secondaryControl,
|
|
163
|
+
children: props.children
|
|
164
|
+
}
|
|
46
165
|
);
|
|
47
166
|
}
|
|
48
167
|
|
|
49
168
|
// src/components/ChildUtils.tsx
|
|
50
|
-
|
|
169
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
51
170
|
var ChildUtils = class {
|
|
52
171
|
};
|
|
53
172
|
ChildUtils.getChildren = (props, localisationObject) => {
|
|
54
173
|
var _a, _b;
|
|
55
174
|
const childrenRaw = (_a = props.children) != null ? _a : localisationObject == null ? void 0 : localisationObject.children;
|
|
56
175
|
const children = props.childrenWrapper ? props.childrenWrapper(childrenRaw) : childrenRaw;
|
|
57
|
-
let finalChildren = props.preventOverflow ? /* @__PURE__ */
|
|
176
|
+
let finalChildren = props.preventOverflow ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
|
|
58
177
|
whiteSpace: "nowrap",
|
|
59
178
|
overflow: "hidden",
|
|
60
179
|
textOverflow: "ellipsis"
|
|
61
180
|
}, children }) : children;
|
|
62
181
|
let formFieldProps = (_b = props.formField) != null ? _b : localisationObject == null ? void 0 : localisationObject.formField;
|
|
63
182
|
if (props.inlineLabel && FromPropsHelper.usesFormField(props)) {
|
|
64
|
-
finalChildren = /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexWrap: "nowrap" }, children: [
|
|
65
|
-
/* @__PURE__ */
|
|
183
|
+
finalChildren = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { display: "flex", flexWrap: "nowrap" }, children: [
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { style: {
|
|
66
185
|
flex: "none",
|
|
67
186
|
fontWeight: "bold",
|
|
68
187
|
paddingRight: "5px"
|
|
@@ -75,12 +194,12 @@ ChildUtils.getChildren = (props, localisationObject) => {
|
|
|
75
194
|
};
|
|
76
195
|
|
|
77
196
|
// src/components/CSAlert.tsx
|
|
78
|
-
|
|
197
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
79
198
|
function CSAlert(props) {
|
|
80
199
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
81
200
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
Alert,
|
|
201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
202
|
+
import_components2.Alert,
|
|
84
203
|
{
|
|
85
204
|
"data-testid": uniqueId,
|
|
86
205
|
...props,
|
|
@@ -91,13 +210,13 @@ function CSAlert(props) {
|
|
|
91
210
|
}
|
|
92
211
|
|
|
93
212
|
// src/components/CSBox.tsx
|
|
94
|
-
|
|
95
|
-
|
|
213
|
+
var import_components3 = require("@cloudscape-design/components");
|
|
214
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
96
215
|
function CSBox(props) {
|
|
97
216
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
98
217
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
99
|
-
return /* @__PURE__ */
|
|
100
|
-
Box,
|
|
218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
219
|
+
import_components3.Box,
|
|
101
220
|
{
|
|
102
221
|
"data-testid": uniqueId,
|
|
103
222
|
...props,
|
|
@@ -108,13 +227,13 @@ function CSBox(props) {
|
|
|
108
227
|
}
|
|
109
228
|
|
|
110
229
|
// src/components/CSButton.tsx
|
|
111
|
-
|
|
112
|
-
|
|
230
|
+
var import_components4 = require("@cloudscape-design/components");
|
|
231
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
113
232
|
function CSButton(props) {
|
|
114
233
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
115
234
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
-
Button,
|
|
235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
236
|
+
import_components4.Button,
|
|
118
237
|
{
|
|
119
238
|
"data-testid": uniqueId,
|
|
120
239
|
...props,
|
|
@@ -125,13 +244,13 @@ function CSButton(props) {
|
|
|
125
244
|
}
|
|
126
245
|
|
|
127
246
|
// src/components/CSCheckbox.tsx
|
|
128
|
-
|
|
129
|
-
|
|
247
|
+
var import_components5 = require("@cloudscape-design/components");
|
|
248
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
130
249
|
function CSCheckbox(props) {
|
|
131
250
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
132
251
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
Checkbox,
|
|
252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
253
|
+
import_components5.Checkbox,
|
|
135
254
|
{
|
|
136
255
|
"data-testid": uniqueId,
|
|
137
256
|
name: uniqueId,
|
|
@@ -145,15 +264,15 @@ function CSCheckbox(props) {
|
|
|
145
264
|
}
|
|
146
265
|
|
|
147
266
|
// src/components/CSDatePicker.tsx
|
|
148
|
-
|
|
149
|
-
|
|
267
|
+
var import_components6 = require("@cloudscape-design/components");
|
|
268
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
150
269
|
function CSDatePicker(props) {
|
|
151
270
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
152
271
|
const sanitizeValue = () => {
|
|
153
272
|
return new Date(FromPropsHelper.sanitizeValueToString(props.value)).toISOString().split("T")[0];
|
|
154
273
|
};
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
DatePicker,
|
|
274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CSFormField, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
275
|
+
import_components6.DatePicker,
|
|
157
276
|
{
|
|
158
277
|
"data-testid": uniqueId,
|
|
159
278
|
controlId: uniqueId,
|
|
@@ -166,8 +285,8 @@ function CSDatePicker(props) {
|
|
|
166
285
|
}
|
|
167
286
|
|
|
168
287
|
// src/components/CSMultiselect.tsx
|
|
169
|
-
|
|
170
|
-
|
|
288
|
+
var import_components7 = require("@cloudscape-design/components");
|
|
289
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
171
290
|
function CSMultiselect(props) {
|
|
172
291
|
var _a, _b;
|
|
173
292
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -184,8 +303,8 @@ function CSMultiselect(props) {
|
|
|
184
303
|
}
|
|
185
304
|
};
|
|
186
305
|
const hideTokens = (_a = props.hideTokens) != null ? _a : props.tokenLimit !== void 0 && props.tokenLimit === 0;
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
Multiselect,
|
|
306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
307
|
+
import_components7.Multiselect,
|
|
189
308
|
{
|
|
190
309
|
"data-testid": uniqueId,
|
|
191
310
|
controlId: uniqueId,
|
|
@@ -284,9 +403,9 @@ _SelectHelper.getSelectedEnumOptions = (options, selectedEnums) => {
|
|
|
284
403
|
var SelectHelper = _SelectHelper;
|
|
285
404
|
|
|
286
405
|
// src/components/CSEnumMultiselect.tsx
|
|
287
|
-
|
|
406
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
288
407
|
function CSEnumMultiselect(props) {
|
|
289
|
-
return /* @__PURE__ */
|
|
408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
290
409
|
CSMultiselect,
|
|
291
410
|
{
|
|
292
411
|
...SelectHelper.multiSelectEnums(props.factory, props.selectedEnums, props.localiser),
|
|
@@ -296,13 +415,13 @@ function CSEnumMultiselect(props) {
|
|
|
296
415
|
}
|
|
297
416
|
|
|
298
417
|
// src/components/CSSegmentedControl.tsx
|
|
299
|
-
|
|
300
|
-
|
|
418
|
+
var import_components8 = require("@cloudscape-design/components");
|
|
419
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
301
420
|
function CSSegmentedControl(props) {
|
|
302
421
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
303
422
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
304
|
-
return /* @__PURE__ */
|
|
305
|
-
SegmentedControl,
|
|
423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
424
|
+
import_components8.SegmentedControl,
|
|
306
425
|
{
|
|
307
426
|
"data-testid": uniqueId,
|
|
308
427
|
onChange: ({ detail }) => props.onChangeValue(props.fieldSpec.key, detail.selectedId),
|
|
@@ -313,13 +432,13 @@ function CSSegmentedControl(props) {
|
|
|
313
432
|
}
|
|
314
433
|
|
|
315
434
|
// src/components/CSEnumSegmentedControl.tsx
|
|
316
|
-
|
|
435
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
317
436
|
function CSEnumSegmentedControl(props) {
|
|
318
437
|
const options = props.factory.values.filter((e) => props.exclude === void 0 || !props.exclude.includes(e)).map((e) => ({
|
|
319
438
|
text: props.localiser.getEnumLabel(props.factory, e),
|
|
320
439
|
id: e.toString()
|
|
321
440
|
}));
|
|
322
|
-
return /* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
323
442
|
CSSegmentedControl,
|
|
324
443
|
{
|
|
325
444
|
selectedId: props.selectedEnum === void 0 ? null : props.selectedEnum.toString(),
|
|
@@ -331,13 +450,13 @@ function CSEnumSegmentedControl(props) {
|
|
|
331
450
|
}
|
|
332
451
|
|
|
333
452
|
// src/components/CSSelect.tsx
|
|
334
|
-
|
|
335
|
-
|
|
453
|
+
var import_components9 = require("@cloudscape-design/components");
|
|
454
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
336
455
|
function CSSelect(props) {
|
|
337
456
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
338
457
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
339
|
-
return /* @__PURE__ */
|
|
340
|
-
Select,
|
|
458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
459
|
+
import_components9.Select,
|
|
341
460
|
{
|
|
342
461
|
"data-testid": uniqueId,
|
|
343
462
|
controlId: uniqueId,
|
|
@@ -349,9 +468,9 @@ function CSSelect(props) {
|
|
|
349
468
|
}
|
|
350
469
|
|
|
351
470
|
// src/components/CSEnumSelect.tsx
|
|
352
|
-
|
|
471
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
353
472
|
function CSEnumSelect(props) {
|
|
354
|
-
return /* @__PURE__ */
|
|
473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
355
474
|
CSSelect,
|
|
356
475
|
{
|
|
357
476
|
...SelectHelper.singleSelectEnum(props.factory, props.selectedEnum, props.localiser, props.exclude),
|
|
@@ -361,8 +480,8 @@ function CSEnumSelect(props) {
|
|
|
361
480
|
}
|
|
362
481
|
|
|
363
482
|
// src/components/CSEnumTiles.tsx
|
|
364
|
-
|
|
365
|
-
|
|
483
|
+
var import_components10 = require("@cloudscape-design/components");
|
|
484
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
366
485
|
function CSEnumTiles(props) {
|
|
367
486
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
368
487
|
const items = props.factory.values.filter((enumInstance) => props.exclude === void 0 || !props.exclude.includes(enumInstance)).map((enumInstance) => {
|
|
@@ -373,8 +492,8 @@ function CSEnumTiles(props) {
|
|
|
373
492
|
description: enumTranslation.description
|
|
374
493
|
};
|
|
375
494
|
});
|
|
376
|
-
return /* @__PURE__ */
|
|
377
|
-
Tiles,
|
|
495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
496
|
+
import_components10.Tiles,
|
|
378
497
|
{
|
|
379
498
|
"data-testid": uniqueId,
|
|
380
499
|
controlId: uniqueId,
|
|
@@ -389,7 +508,7 @@ function CSEnumTiles(props) {
|
|
|
389
508
|
}
|
|
390
509
|
|
|
391
510
|
// src/components/CSLink.tsx
|
|
392
|
-
|
|
511
|
+
var import_components11 = require("@cloudscape-design/components");
|
|
393
512
|
|
|
394
513
|
// src/utils/BrowserUtils.ts
|
|
395
514
|
var openInNewTab = (link) => {
|
|
@@ -411,12 +530,12 @@ var warnWhenTabIsClosed = (isDirty) => {
|
|
|
411
530
|
};
|
|
412
531
|
|
|
413
532
|
// src/components/CSLink.tsx
|
|
414
|
-
|
|
533
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
415
534
|
function CSLink(props) {
|
|
416
535
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
417
536
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
418
|
-
return /* @__PURE__ */
|
|
419
|
-
Link,
|
|
537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
538
|
+
import_components11.Link,
|
|
420
539
|
{
|
|
421
540
|
"data-testid": uniqueId,
|
|
422
541
|
...props,
|
|
@@ -426,17 +545,17 @@ function CSLink(props) {
|
|
|
426
545
|
) });
|
|
427
546
|
}
|
|
428
547
|
function CSExternalLink(props) {
|
|
429
|
-
return /* @__PURE__ */
|
|
548
|
+
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
549
|
}
|
|
431
550
|
|
|
432
551
|
// src/components/CSHeader.tsx
|
|
433
|
-
|
|
434
|
-
|
|
552
|
+
var import_components12 = require("@cloudscape-design/components");
|
|
553
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
435
554
|
function CSHeader(props) {
|
|
436
555
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
437
556
|
const { children } = ChildUtils.getChildren(props, localisationObject);
|
|
438
|
-
return /* @__PURE__ */
|
|
439
|
-
Header,
|
|
557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
558
|
+
import_components12.Header,
|
|
440
559
|
{
|
|
441
560
|
"data-testid": uniqueId,
|
|
442
561
|
...props,
|
|
@@ -447,15 +566,15 @@ function CSHeader(props) {
|
|
|
447
566
|
}
|
|
448
567
|
|
|
449
568
|
// src/components/CSInput.tsx
|
|
450
|
-
|
|
451
|
-
|
|
569
|
+
var import_components13 = require("@cloudscape-design/components");
|
|
570
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
452
571
|
function CSInput(props) {
|
|
453
572
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
454
573
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
455
574
|
const sanitizedValue = FromPropsHelper.sanitizeValueToString(props.value);
|
|
456
575
|
const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
|
|
457
|
-
return /* @__PURE__ */
|
|
458
|
-
Input,
|
|
576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
577
|
+
import_components13.Input,
|
|
459
578
|
{
|
|
460
579
|
"data-testid": uniqueId,
|
|
461
580
|
controlId: uniqueId,
|
|
@@ -468,8 +587,8 @@ function CSInput(props) {
|
|
|
468
587
|
}
|
|
469
588
|
|
|
470
589
|
// src/components/CSNumericInput.tsx
|
|
471
|
-
|
|
472
|
-
|
|
590
|
+
var import_components14 = require("@cloudscape-design/components");
|
|
591
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
473
592
|
function CSNumericInput(props) {
|
|
474
593
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
475
594
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
@@ -481,8 +600,8 @@ function CSNumericInput(props) {
|
|
|
481
600
|
};
|
|
482
601
|
const sanitizedValue = sanitizeValue();
|
|
483
602
|
const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
|
|
484
|
-
return /* @__PURE__ */
|
|
485
|
-
|
|
603
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CSFormField, { ...formProps, formField: { ...props.formField, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
604
|
+
import_components14.Input,
|
|
486
605
|
{
|
|
487
606
|
"data-testid": uniqueId,
|
|
488
607
|
controlId: uniqueId,
|
|
@@ -499,13 +618,13 @@ function CSNumericInput(props) {
|
|
|
499
618
|
}
|
|
500
619
|
|
|
501
620
|
// src/components/CSStatusIndicator.tsx
|
|
502
|
-
|
|
503
|
-
|
|
621
|
+
var import_components15 = require("@cloudscape-design/components");
|
|
622
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
504
623
|
function CSStatusIndicator(props) {
|
|
505
624
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
506
625
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
507
|
-
return /* @__PURE__ */
|
|
508
|
-
StatusIndicator,
|
|
626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
627
|
+
import_components15.StatusIndicator,
|
|
509
628
|
{
|
|
510
629
|
"data-testid": uniqueId,
|
|
511
630
|
...props,
|
|
@@ -516,13 +635,13 @@ function CSStatusIndicator(props) {
|
|
|
516
635
|
}
|
|
517
636
|
|
|
518
637
|
// src/components/CSTextContent.tsx
|
|
519
|
-
|
|
520
|
-
|
|
638
|
+
var import_components16 = require("@cloudscape-design/components");
|
|
639
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
521
640
|
function CSTextContent(props) {
|
|
522
641
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
523
642
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
524
|
-
return /* @__PURE__ */
|
|
525
|
-
TextContent,
|
|
643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
644
|
+
import_components16.TextContent,
|
|
526
645
|
{
|
|
527
646
|
"data-testid": uniqueId,
|
|
528
647
|
...props,
|
|
@@ -533,15 +652,15 @@ function CSTextContent(props) {
|
|
|
533
652
|
}
|
|
534
653
|
|
|
535
654
|
// src/components/CSTextarea.tsx
|
|
536
|
-
|
|
537
|
-
|
|
655
|
+
var import_components17 = require("@cloudscape-design/components");
|
|
656
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
538
657
|
function CSTextarea(props) {
|
|
539
658
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
540
659
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
541
660
|
const sanitizedValue = FromPropsHelper.sanitizeValueToString(props.value);
|
|
542
661
|
const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
|
|
543
|
-
return /* @__PURE__ */
|
|
544
|
-
Textarea,
|
|
662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
663
|
+
import_components17.Textarea,
|
|
545
664
|
{
|
|
546
665
|
"data-testid": uniqueId,
|
|
547
666
|
controlId: uniqueId,
|
|
@@ -554,14 +673,14 @@ function CSTextarea(props) {
|
|
|
554
673
|
}
|
|
555
674
|
|
|
556
675
|
// src/components/CSTimeInput.tsx
|
|
557
|
-
|
|
558
|
-
|
|
676
|
+
var import_components18 = require("@cloudscape-design/components");
|
|
677
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
559
678
|
function CSTimeInput(props) {
|
|
560
679
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
561
680
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
562
681
|
const defaultFormat = "hh:mm";
|
|
563
|
-
return /* @__PURE__ */
|
|
564
|
-
TimeInput,
|
|
682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
683
|
+
import_components18.TimeInput,
|
|
565
684
|
{
|
|
566
685
|
"data-testid": uniqueId,
|
|
567
686
|
autoFocus: props.autoFocus,
|
|
@@ -575,13 +694,13 @@ function CSTimeInput(props) {
|
|
|
575
694
|
}
|
|
576
695
|
|
|
577
696
|
// src/components/CSToggle.tsx
|
|
578
|
-
|
|
579
|
-
|
|
697
|
+
var import_components19 = require("@cloudscape-design/components");
|
|
698
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
580
699
|
function CSToggle(props) {
|
|
581
700
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
582
701
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
583
|
-
return /* @__PURE__ */
|
|
584
|
-
Toggle,
|
|
702
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
703
|
+
import_components19.Toggle,
|
|
585
704
|
{
|
|
586
705
|
"data-testid": uniqueId,
|
|
587
706
|
name: uniqueId,
|
|
@@ -595,24 +714,27 @@ function CSToggle(props) {
|
|
|
595
714
|
}
|
|
596
715
|
|
|
597
716
|
// src/components/CSCopyToClipboard.tsx
|
|
598
|
-
|
|
599
|
-
|
|
717
|
+
var import_components20 = require("@cloudscape-design/components");
|
|
718
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
600
719
|
function CSCopyToClipboard(props) {
|
|
720
|
+
var _a, _b;
|
|
601
721
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
602
722
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
603
|
-
return /* @__PURE__ */
|
|
604
|
-
CopyToClipboard,
|
|
723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
724
|
+
import_components20.CopyToClipboard,
|
|
605
725
|
{
|
|
606
726
|
"data-testid": uniqueId,
|
|
607
727
|
...props,
|
|
728
|
+
copySuccessText: (_a = props.copySuccessText) != null ? _a : "",
|
|
729
|
+
copyErrorText: (_b = props.copyErrorText) != null ? _b : "",
|
|
608
730
|
...localisationObject
|
|
609
731
|
}
|
|
610
732
|
) });
|
|
611
733
|
}
|
|
612
734
|
|
|
613
735
|
// src/views/CSVEnumRatingView.tsx
|
|
614
|
-
|
|
615
|
-
|
|
736
|
+
var import_react_rating = require("@smastrom/react-rating");
|
|
737
|
+
var import_react = require("react");
|
|
616
738
|
|
|
617
739
|
// src/utils/EnumFactory.ts
|
|
618
740
|
var EnumFactory = class {
|
|
@@ -885,7 +1007,7 @@ var ViewSpec = class _ViewSpec extends ViewElementSpec {
|
|
|
885
1007
|
};
|
|
886
1008
|
|
|
887
1009
|
// src/views/CSVEnumRatingView.tsx
|
|
888
|
-
|
|
1010
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
889
1011
|
var CSV_ENUM_RATING_VIEW_SPEC = (parent, key, instanceId) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
890
1012
|
rating: spec.addField(new FieldSpec("rating")),
|
|
891
1013
|
boxRatingName: spec.addField(new FieldSpec("boxRatingName"))
|
|
@@ -899,7 +1021,7 @@ function getEnumRatingLabel(enumInstance, instanceId) {
|
|
|
899
1021
|
function CSVEnumRatingView(props) {
|
|
900
1022
|
const spec = props.viewSpec;
|
|
901
1023
|
const { elements } = spec;
|
|
902
|
-
const [hoveredValue, setHoveredValue] = useState(props.selectedEnum);
|
|
1024
|
+
const [hoveredValue, setHoveredValue] = (0, import_react.useState)(props.selectedEnum);
|
|
903
1025
|
const valuesInOrder = getEnumRatingValues(props.factory, props.toOrderNumber);
|
|
904
1026
|
const onHover = (hoveredIndex) => {
|
|
905
1027
|
if (hoveredIndex === 0) {
|
|
@@ -909,12 +1031,12 @@ function CSVEnumRatingView(props) {
|
|
|
909
1031
|
}
|
|
910
1032
|
};
|
|
911
1033
|
const itemCount = Math.max(1, Math.min(valuesInOrder.length - 1, 10));
|
|
912
|
-
useEffect(() => {
|
|
1034
|
+
(0, import_react.useEffect)(() => {
|
|
913
1035
|
setHoveredValue(props.selectedEnum);
|
|
914
1036
|
}, [props.selectedEnum]);
|
|
915
|
-
return /* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
Rating,
|
|
1037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(CSFormField, { fieldSpec: elements.rating, localiser: props.localiser, children: [
|
|
1038
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1039
|
+
import_react_rating.Rating,
|
|
918
1040
|
{
|
|
919
1041
|
"data-testid": elements.rating.getDataTestId(),
|
|
920
1042
|
isDisabled: props.disabled,
|
|
@@ -926,7 +1048,7 @@ function CSVEnumRatingView(props) {
|
|
|
926
1048
|
invisibleItemLabels: valuesInOrder.slice(1).map((e) => getEnumRatingLabel(e, spec.instanceId))
|
|
927
1049
|
}
|
|
928
1050
|
),
|
|
929
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { textAlign: "left", paddingLeft: "5px" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
930
1052
|
CSBox,
|
|
931
1053
|
{
|
|
932
1054
|
fieldSpec: elements.boxRatingName,
|
|
@@ -939,8 +1061,8 @@ function CSVEnumRatingView(props) {
|
|
|
939
1061
|
}
|
|
940
1062
|
|
|
941
1063
|
// src/views/CSVNoItemsView.tsx
|
|
942
|
-
|
|
943
|
-
|
|
1064
|
+
var import_components21 = require("@cloudscape-design/components");
|
|
1065
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
944
1066
|
var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec) => ({
|
|
945
1067
|
boxHeading: spec.addField(new FieldSpec("boxHeading")),
|
|
946
1068
|
boxBody: spec.addField(new FieldSpec("boxBody"))
|
|
@@ -948,8 +1070,8 @@ var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec
|
|
|
948
1070
|
function CSVNoItemsView(props) {
|
|
949
1071
|
const spec = props.viewSpec;
|
|
950
1072
|
const { elements } = spec;
|
|
951
|
-
return /* @__PURE__ */
|
|
952
|
-
/* @__PURE__ */
|
|
1073
|
+
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: [
|
|
1074
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
953
1075
|
CSBox,
|
|
954
1076
|
{
|
|
955
1077
|
fieldSpec: elements.boxHeading,
|
|
@@ -960,7 +1082,7 @@ function CSVNoItemsView(props) {
|
|
|
960
1082
|
children: props.headingText
|
|
961
1083
|
}
|
|
962
1084
|
),
|
|
963
|
-
/* @__PURE__ */
|
|
1085
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
964
1086
|
CSBox,
|
|
965
1087
|
{
|
|
966
1088
|
fieldSpec: elements.boxBody,
|
|
@@ -977,7 +1099,7 @@ function CSVNoItemsView(props) {
|
|
|
977
1099
|
}
|
|
978
1100
|
|
|
979
1101
|
// src/views/CSVPriceInputView.tsx
|
|
980
|
-
|
|
1102
|
+
var import_components22 = require("@cloudscape-design/components");
|
|
981
1103
|
|
|
982
1104
|
// src/utils/PriceUtils.ts
|
|
983
1105
|
var LOGGER2 = new Log("PriceUtils");
|
|
@@ -1040,7 +1162,7 @@ _PriceUtils.parseFormattedPriceWithCurrency = (locale, formattedPrice, currencyS
|
|
|
1040
1162
|
var PriceUtils = _PriceUtils;
|
|
1041
1163
|
|
|
1042
1164
|
// src/views/CSVPriceInputView.tsx
|
|
1043
|
-
|
|
1165
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1044
1166
|
var CSV_PRICE_INPUT_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1045
1167
|
inputPrice: spec.addField(new FieldSpec("inputPrice", true, void 0, 0)),
|
|
1046
1168
|
selectCurrency: spec.addField(new FieldSpec("currency", true)),
|
|
@@ -1051,13 +1173,13 @@ function CSVPriceInputView(props) {
|
|
|
1051
1173
|
const { elements } = spec;
|
|
1052
1174
|
const priceInCents = props.value ? props.value.priceInCents : 0;
|
|
1053
1175
|
const currency = props.value ? props.value.currency : props.defaultCurrency;
|
|
1054
|
-
return /* @__PURE__ */
|
|
1055
|
-
Grid,
|
|
1176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1177
|
+
import_components22.Grid,
|
|
1056
1178
|
{
|
|
1057
1179
|
gridDefinition: [{ colspan: 4 }, { colspan: { default: 4, xxs: 3 } }, { colspan: { default: 4, xxs: 5 } }],
|
|
1058
1180
|
disableGutters: true,
|
|
1059
1181
|
children: [
|
|
1060
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1061
1183
|
CSNumericInput,
|
|
1062
1184
|
{
|
|
1063
1185
|
fieldSpec: elements.inputPrice,
|
|
@@ -1071,7 +1193,7 @@ function CSVPriceInputView(props) {
|
|
|
1071
1193
|
})
|
|
1072
1194
|
}
|
|
1073
1195
|
),
|
|
1074
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1075
1197
|
CSEnumSelect,
|
|
1076
1198
|
{
|
|
1077
1199
|
fieldSpec: elements.selectCurrency,
|
|
@@ -1086,7 +1208,7 @@ function CSVPriceInputView(props) {
|
|
|
1086
1208
|
expandToViewport: props.expandToViewport
|
|
1087
1209
|
}
|
|
1088
1210
|
) }),
|
|
1089
|
-
/* @__PURE__ */
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingTop: "30px", paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1090
1212
|
CSBox,
|
|
1091
1213
|
{
|
|
1092
1214
|
fieldSpec: elements.boxPriceDisplay,
|
|
@@ -1103,8 +1225,8 @@ function CSVPriceInputView(props) {
|
|
|
1103
1225
|
}
|
|
1104
1226
|
|
|
1105
1227
|
// src/views/CSVSearchFilterView.tsx
|
|
1106
|
-
|
|
1107
|
-
|
|
1228
|
+
var import_components23 = require("@cloudscape-design/components");
|
|
1229
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1108
1230
|
var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1109
1231
|
inputSearch: spec.addField(new FieldSpec("inputSearch")),
|
|
1110
1232
|
buttonSearch: spec.addField(new FieldSpec("buttonSearch"))
|
|
@@ -1112,8 +1234,8 @@ var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.n
|
|
|
1112
1234
|
function CSVSearchFilterView(props) {
|
|
1113
1235
|
const spec = props.viewSpec;
|
|
1114
1236
|
const { elements } = spec;
|
|
1115
|
-
return /* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components23.SpaceBetween, { size: "s", direction: "horizontal", children: [
|
|
1238
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { minWidth: "320px" }, children: props.inputSearch === void 0 || typeof props.inputSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1117
1239
|
CSInput,
|
|
1118
1240
|
{
|
|
1119
1241
|
fieldSpec: elements.inputSearch,
|
|
@@ -1125,7 +1247,7 @@ function CSVSearchFilterView(props) {
|
|
|
1125
1247
|
type: "search"
|
|
1126
1248
|
}
|
|
1127
1249
|
) : props.inputSearch }),
|
|
1128
|
-
props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */
|
|
1250
|
+
props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1129
1251
|
CSButton,
|
|
1130
1252
|
{
|
|
1131
1253
|
fieldSpec: elements.buttonSearch,
|
|
@@ -1143,8 +1265,8 @@ function CSVSearchFilterView(props) {
|
|
|
1143
1265
|
}
|
|
1144
1266
|
|
|
1145
1267
|
// src/views/CSVTextPromptModalView.tsx
|
|
1146
|
-
|
|
1147
|
-
|
|
1268
|
+
var import_components24 = require("@cloudscape-design/components");
|
|
1269
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1148
1270
|
var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1149
1271
|
headerHeading: spec.addField(new FieldSpec("headerHeading")),
|
|
1150
1272
|
boxBodyText: spec.addField(new FieldSpec("boxBodyText")),
|
|
@@ -1154,7 +1276,7 @@ var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, pare
|
|
|
1154
1276
|
function CSVTextPromptModalView(props) {
|
|
1155
1277
|
const spec = props.viewSpec;
|
|
1156
1278
|
const { elements } = spec;
|
|
1157
|
-
const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */
|
|
1279
|
+
const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1158
1280
|
CSButton,
|
|
1159
1281
|
{
|
|
1160
1282
|
fieldSpec: elements.buttonSecondary,
|
|
@@ -1163,14 +1285,14 @@ function CSVTextPromptModalView(props) {
|
|
|
1163
1285
|
onClick: props.onSecondaryAction,
|
|
1164
1286
|
children: props.buttonSecondary
|
|
1165
1287
|
}
|
|
1166
|
-
) : props.buttonSecondary : /* @__PURE__ */
|
|
1167
|
-
return /* @__PURE__ */
|
|
1168
|
-
Modal,
|
|
1288
|
+
) : props.buttonSecondary : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, {});
|
|
1289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1290
|
+
import_components24.Modal,
|
|
1169
1291
|
{
|
|
1170
1292
|
"data-testid": props.viewSpec.getDataTestId(),
|
|
1171
1293
|
onDismiss: props.onDismiss,
|
|
1172
1294
|
visible: props.visible,
|
|
1173
|
-
header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */
|
|
1295
|
+
header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1174
1296
|
CSHeader,
|
|
1175
1297
|
{
|
|
1176
1298
|
fieldSpec: elements.headerHeading,
|
|
@@ -1178,8 +1300,8 @@ function CSVTextPromptModalView(props) {
|
|
|
1178
1300
|
children: props.headerHeading
|
|
1179
1301
|
}
|
|
1180
1302
|
) : props.headerHeading,
|
|
1181
|
-
footer: /* @__PURE__ */
|
|
1182
|
-
props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */
|
|
1303
|
+
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: [
|
|
1304
|
+
props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1183
1305
|
CSButton,
|
|
1184
1306
|
{
|
|
1185
1307
|
fieldSpec: elements.buttonPrimary,
|
|
@@ -1191,7 +1313,7 @@ function CSVTextPromptModalView(props) {
|
|
|
1191
1313
|
) : props.buttonPrimary,
|
|
1192
1314
|
secondaryAction
|
|
1193
1315
|
] }) }),
|
|
1194
|
-
children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */
|
|
1316
|
+
children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CSBox, { fieldSpec: elements.boxBodyText, localiser: props.localiser, children: props.boxBodyText }) : props.boxBodyText
|
|
1195
1317
|
}
|
|
1196
1318
|
);
|
|
1197
1319
|
}
|
|
@@ -1269,9 +1391,9 @@ var FieldProperties = class {
|
|
|
1269
1391
|
};
|
|
1270
1392
|
|
|
1271
1393
|
// src/utils/FixedWidth.tsx
|
|
1272
|
-
|
|
1394
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1273
1395
|
function FixedWidth(props) {
|
|
1274
|
-
return /* @__PURE__ */
|
|
1396
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { minWidth: props.minWidth, maxWidth: props.maxWidth }, children: props.children });
|
|
1275
1397
|
}
|
|
1276
1398
|
|
|
1277
1399
|
// src/utils/LocalStorageService.ts
|
|
@@ -1666,7 +1788,7 @@ var RestClient = class {
|
|
|
1666
1788
|
};
|
|
1667
1789
|
|
|
1668
1790
|
// src/hooks/useControllerDisplayState.ts
|
|
1669
|
-
|
|
1791
|
+
var import_react2 = require("react");
|
|
1670
1792
|
var RunFunctionResult = class {
|
|
1671
1793
|
constructor(success, messages, result, resultHistory) {
|
|
1672
1794
|
this.success = success;
|
|
@@ -1679,27 +1801,27 @@ var fatalRunErrorFunction = (reason) => {
|
|
|
1679
1801
|
throw new Error(`Fatal error - could not handle run failure - reason: ${reason}`);
|
|
1680
1802
|
};
|
|
1681
1803
|
function useControllerDisplayState(initialDisplayMode, messages, logger) {
|
|
1682
|
-
const [state, setState] =
|
|
1683
|
-
const [loadingIndication, setLoadingIndication] =
|
|
1684
|
-
const [modified, setModified] =
|
|
1685
|
-
const [displayMode, setDisplayMode] =
|
|
1686
|
-
const [modalState, setModalState] =
|
|
1804
|
+
const [state, setState] = (0, import_react2.useState)(0 /* UNMOUNTED */);
|
|
1805
|
+
const [loadingIndication, setLoadingIndication] = (0, import_react2.useState)({});
|
|
1806
|
+
const [modified, setModified] = (0, import_react2.useState)(false);
|
|
1807
|
+
const [displayMode, setDisplayMode] = (0, import_react2.useState)(initialDisplayMode);
|
|
1808
|
+
const [modalState, setModalState] = (0, import_react2.useState)({
|
|
1687
1809
|
show: (modalId, confirmFunction) => showModal(modalId, true, confirmFunction),
|
|
1688
1810
|
hide: (modalId) => showModal(modalId, false)
|
|
1689
1811
|
});
|
|
1690
1812
|
const { addMessages } = messages;
|
|
1691
|
-
const isLoading = useCallback((service) => {
|
|
1813
|
+
const isLoading = (0, import_react2.useCallback)((service) => {
|
|
1692
1814
|
return loadingIndication.hasOwnProperty(service.name) && loadingIndication[service.name] === true;
|
|
1693
1815
|
}, [loadingIndication]);
|
|
1694
|
-
const load = useCallback((service) => {
|
|
1816
|
+
const load = (0, import_react2.useCallback)((service) => {
|
|
1695
1817
|
setLoadingIndication((oldIndication) => ({ ...oldIndication, [service.name]: true }));
|
|
1696
1818
|
}, []);
|
|
1697
|
-
const doneLoading = useCallback((service) => {
|
|
1819
|
+
const doneLoading = (0, import_react2.useCallback)((service) => {
|
|
1698
1820
|
setLoadingIndication((oldIndication) => {
|
|
1699
1821
|
return { ...oldIndication, [service.name]: false };
|
|
1700
1822
|
});
|
|
1701
1823
|
}, []);
|
|
1702
|
-
const enterDisplayMode = useCallback((mode) => {
|
|
1824
|
+
const enterDisplayMode = (0, import_react2.useCallback)((mode) => {
|
|
1703
1825
|
setDisplayMode((previousMode) => {
|
|
1704
1826
|
if (mode !== displayMode) {
|
|
1705
1827
|
logger.info("Entering display mode: ", mode);
|
|
@@ -1708,7 +1830,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
|
|
|
1708
1830
|
return previousMode;
|
|
1709
1831
|
});
|
|
1710
1832
|
}, [displayMode, logger]);
|
|
1711
|
-
const showModal = useCallback((modalId, show, confirmFunction) => {
|
|
1833
|
+
const showModal = (0, import_react2.useCallback)((modalId, show, confirmFunction) => {
|
|
1712
1834
|
if (show) {
|
|
1713
1835
|
setModalState((originalModalState) => {
|
|
1714
1836
|
if (originalModalState.modalId !== void 0) {
|
|
@@ -1725,7 +1847,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
|
|
|
1725
1847
|
});
|
|
1726
1848
|
}
|
|
1727
1849
|
}, []);
|
|
1728
|
-
const run = useCallback(function(service, execute, failureIsFatal, resultHistory) {
|
|
1850
|
+
const run = (0, import_react2.useCallback)(function(service, execute, failureIsFatal, resultHistory) {
|
|
1729
1851
|
load(service);
|
|
1730
1852
|
return execute().then((result) => {
|
|
1731
1853
|
addMessages(result);
|
|
@@ -1746,7 +1868,7 @@ function useControllerDisplayState(initialDisplayMode, messages, logger) {
|
|
|
1746
1868
|
return {
|
|
1747
1869
|
state,
|
|
1748
1870
|
setState,
|
|
1749
|
-
setDirty: useCallback(setModified, [setModified]),
|
|
1871
|
+
setDirty: (0, import_react2.useCallback)(setModified, [setModified]),
|
|
1750
1872
|
isDirty: () => modified,
|
|
1751
1873
|
isLoading,
|
|
1752
1874
|
displayMode,
|
|
@@ -1774,7 +1896,7 @@ function isContentWithMessages(object) {
|
|
|
1774
1896
|
}
|
|
1775
1897
|
|
|
1776
1898
|
// src/hooks/useTOChangeHandler.ts
|
|
1777
|
-
|
|
1899
|
+
var import_react3 = require("react");
|
|
1778
1900
|
var ArrayStateHandler = class {
|
|
1779
1901
|
static updateFieldsOfArrayElement(elementToUpdate, currentArrayContent, properties, onChangedArrayElement) {
|
|
1780
1902
|
const newArrayValue = [...currentArrayContent];
|
|
@@ -1801,7 +1923,7 @@ var ArrayStateHandler = class {
|
|
|
1801
1923
|
}
|
|
1802
1924
|
};
|
|
1803
1925
|
function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty) {
|
|
1804
|
-
const onPropertyChangeMulti =
|
|
1926
|
+
const onPropertyChangeMulti = (0, import_react3.useCallback)((properties, automaticChange) => {
|
|
1805
1927
|
logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
|
|
1806
1928
|
setTOState((previousValue) => {
|
|
1807
1929
|
const newValue = { ...previousValue, ...properties };
|
|
@@ -1817,7 +1939,7 @@ function useTOChangeHandler(logger, toName, setTOState, notifications, setDirty)
|
|
|
1817
1939
|
return newValue;
|
|
1818
1940
|
});
|
|
1819
1941
|
}, [logger, notifications, setDirty, setTOState, toName]);
|
|
1820
|
-
const onPropertyChange =
|
|
1942
|
+
const onPropertyChange = (0, import_react3.useCallback)((propertyName, changedValue, automaticChange) => {
|
|
1821
1943
|
onPropertyChangeMulti({ [propertyName]: changedValue }, automaticChange);
|
|
1822
1944
|
}, [onPropertyChangeMulti]);
|
|
1823
1945
|
return { onPropertyChange, onPropertyChangeMulti };
|
|
@@ -1826,7 +1948,7 @@ var singleChangeHandlerToMulti = (onPropertyChangeMulti) => {
|
|
|
1826
1948
|
return (propertyName, changedValue) => onPropertyChangeMulti({ [propertyName]: changedValue });
|
|
1827
1949
|
};
|
|
1828
1950
|
function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDirty) {
|
|
1829
|
-
const onChangeElement =
|
|
1951
|
+
const onChangeElement = (0, import_react3.useCallback)((element, properties) => {
|
|
1830
1952
|
if (element !== void 0) {
|
|
1831
1953
|
logger.debug(`Changing state of the ${toName} Elements ${Object.keys(properties)} for affected element, using change object:`, JSON.stringify(properties));
|
|
1832
1954
|
setArrayState((previousValue) => ArrayStateHandler.updateFieldsOfArrayElement(
|
|
@@ -1840,7 +1962,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
|
|
|
1840
1962
|
}
|
|
1841
1963
|
}
|
|
1842
1964
|
}, [logger, toName, setArrayState, setDirty, handlers.onChange]);
|
|
1843
|
-
const onRemoveElements =
|
|
1965
|
+
const onRemoveElements = (0, import_react3.useCallback)((removedElements) => {
|
|
1844
1966
|
if (removedElements.length > 0) {
|
|
1845
1967
|
logger.debug(`Removing ${removedElements.length} elements from array`);
|
|
1846
1968
|
setArrayState((previousValue) => ArrayStateHandler.removeArrayElements(
|
|
@@ -1853,7 +1975,7 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
|
|
|
1853
1975
|
}
|
|
1854
1976
|
}
|
|
1855
1977
|
}, [logger, setArrayState, setDirty, handlers.onRemove]);
|
|
1856
|
-
const onAddElements =
|
|
1978
|
+
const onAddElements = (0, import_react3.useCallback)((newElements) => {
|
|
1857
1979
|
if (newElements.length === 0) {
|
|
1858
1980
|
logger.debug(`Adding no new elements to array`);
|
|
1859
1981
|
} else {
|
|
@@ -1872,23 +1994,23 @@ function useTOArrayChangeHandler(logger, toName, setArrayState, handlers, setDir
|
|
|
1872
1994
|
}
|
|
1873
1995
|
|
|
1874
1996
|
// src/hooks/useAWSUIRef.ts
|
|
1875
|
-
|
|
1997
|
+
var import_react4 = require("react");
|
|
1876
1998
|
function useAWSUIRef() {
|
|
1877
|
-
const customRef = useRef(null);
|
|
1999
|
+
const customRef = (0, import_react4.useRef)(null);
|
|
1878
2000
|
const isValidRef = () => {
|
|
1879
2001
|
return customRef !== void 0 && customRef !== null && customRef.current !== void 0 && customRef.current !== null;
|
|
1880
2002
|
};
|
|
1881
|
-
const focus =
|
|
2003
|
+
const focus = (0, import_react4.useCallback)(() => {
|
|
1882
2004
|
if (isValidRef() && customRef.current.focus) {
|
|
1883
2005
|
customRef.current.focus();
|
|
1884
2006
|
}
|
|
1885
2007
|
}, [customRef]);
|
|
1886
|
-
const scrollToView =
|
|
2008
|
+
const scrollToView = (0, import_react4.useCallback)(() => {
|
|
1887
2009
|
if (isValidRef() && customRef.current.scrollIntoView) {
|
|
1888
2010
|
customRef.current.scrollIntoView(true);
|
|
1889
2011
|
}
|
|
1890
2012
|
}, [customRef]);
|
|
1891
|
-
const scrollToViewRef =
|
|
2013
|
+
const scrollToViewRef = (0, import_react4.useCallback)((element) => {
|
|
1892
2014
|
if (element !== void 0 && element !== null && element.scrollIntoView) {
|
|
1893
2015
|
element.scrollIntoView({ block: "nearest", behavior: "smooth" });
|
|
1894
2016
|
}
|
|
@@ -1902,13 +2024,13 @@ function useAWSUIRef() {
|
|
|
1902
2024
|
}
|
|
1903
2025
|
|
|
1904
2026
|
// src/hooks/useHotkeys.ts
|
|
1905
|
-
|
|
2027
|
+
var import_react5 = require("react");
|
|
1906
2028
|
var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
|
|
1907
|
-
const callbackRef =
|
|
1908
|
-
useLayoutEffect(() => {
|
|
2029
|
+
const callbackRef = (0, import_react5.useRef)(callback);
|
|
2030
|
+
(0, import_react5.useLayoutEffect)(() => {
|
|
1909
2031
|
callbackRef.current = callback;
|
|
1910
2032
|
});
|
|
1911
|
-
const handleKeyPress =
|
|
2033
|
+
const handleKeyPress = (0, import_react5.useCallback)(
|
|
1912
2034
|
(event) => {
|
|
1913
2035
|
if (event.key === key && (!shift || event.shiftKey) && (!ctrl || event.ctrlKey) && (!alt || event.altKey)) {
|
|
1914
2036
|
callbackRef.current(event);
|
|
@@ -1916,7 +2038,7 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
|
|
|
1916
2038
|
},
|
|
1917
2039
|
[alt, ctrl, key, shift]
|
|
1918
2040
|
);
|
|
1919
|
-
|
|
2041
|
+
(0, import_react5.useEffect)(() => {
|
|
1920
2042
|
const targetNode = node != null ? node : document;
|
|
1921
2043
|
targetNode && targetNode.addEventListener("keydown", handleKeyPress);
|
|
1922
2044
|
return () => targetNode && targetNode.removeEventListener("keydown", handleKeyPress);
|
|
@@ -1924,20 +2046,20 @@ var useHotkey = (key, shift, ctrl, alt, callback, node = null) => {
|
|
|
1924
2046
|
};
|
|
1925
2047
|
|
|
1926
2048
|
// src/hooks/useMessages.ts
|
|
1927
|
-
|
|
2049
|
+
var import_react6 = require("react");
|
|
1928
2050
|
function useMessages(LOGGER3) {
|
|
1929
|
-
const [messages, setMessages] =
|
|
1930
|
-
const onDismissMessage =
|
|
2051
|
+
const [messages, setMessages] = (0, import_react6.useState)([]);
|
|
2052
|
+
const onDismissMessage = (0, import_react6.useCallback)((message) => {
|
|
1931
2053
|
const newMessages = messages.filter((existingMsg) => message !== existingMsg);
|
|
1932
2054
|
setMessages(newMessages);
|
|
1933
2055
|
}, [messages]);
|
|
1934
|
-
const onToggleMessageDetail =
|
|
2056
|
+
const onToggleMessageDetail = (0, import_react6.useCallback)((message) => {
|
|
1935
2057
|
const idx = messages.indexOf(message);
|
|
1936
2058
|
const newMessages = [...messages];
|
|
1937
2059
|
newMessages[idx].showDetails = !newMessages[idx].showDetails;
|
|
1938
2060
|
setMessages(newMessages);
|
|
1939
2061
|
}, [messages]);
|
|
1940
|
-
const addMessages =
|
|
2062
|
+
const addMessages = (0, import_react6.useCallback)((newMessages) => {
|
|
1941
2063
|
if (!newMessages.hasOwnProperty("messages")) {
|
|
1942
2064
|
LOGGER3.error("Given response data structure does not contain messages - probably another runtime error occurred: ", newMessages);
|
|
1943
2065
|
if (newMessages.hasOwnProperty("stack")) {
|
|
@@ -1951,7 +2073,7 @@ function useMessages(LOGGER3) {
|
|
|
1951
2073
|
setMessages((oldMessages) => [...oldMessages, ...addedMessages]);
|
|
1952
2074
|
}
|
|
1953
2075
|
}, [LOGGER3]);
|
|
1954
|
-
const clearMessages =
|
|
2076
|
+
const clearMessages = (0, import_react6.useCallback)(() => {
|
|
1955
2077
|
setMessages([]);
|
|
1956
2078
|
}, []);
|
|
1957
2079
|
return {
|
|
@@ -1962,7 +2084,8 @@ function useMessages(LOGGER3) {
|
|
|
1962
2084
|
clearMessages
|
|
1963
2085
|
};
|
|
1964
2086
|
}
|
|
1965
|
-
export
|
|
2087
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
2088
|
+
0 && (module.exports = {
|
|
1966
2089
|
CSAlert,
|
|
1967
2090
|
CSBox,
|
|
1968
2091
|
CSButton,
|
|
@@ -2048,4 +2171,4 @@ export {
|
|
|
2048
2171
|
useTOArrayChangeHandler,
|
|
2049
2172
|
useTOChangeHandler,
|
|
2050
2173
|
warnWhenTabIsClosed
|
|
2051
|
-
};
|
|
2174
|
+
});
|