@ebertjendustries/cswrapper 1.0.2 → 1.0.3
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.mts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +57 -47
- package/dist/index.mjs +21 -21
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { FormFieldProps } from '@cloudscape-design/components/form-field/interfaces';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { AlertProps
|
|
4
|
+
import { AlertProps } from '@cloudscape-design/components/alert';
|
|
5
|
+
import { BoxProps } from '@cloudscape-design/components/box';
|
|
6
|
+
import { ButtonProps } from '@cloudscape-design/components/button';
|
|
5
7
|
import { CheckboxProps } from '@cloudscape-design/components/checkbox/interfaces';
|
|
8
|
+
import { DatePickerProps } from '@cloudscape-design/components/date-picker';
|
|
9
|
+
import { MultiselectProps } from '@cloudscape-design/components/multiselect';
|
|
10
|
+
import { SegmentedControlProps } from '@cloudscape-design/components/segmented-control';
|
|
11
|
+
import { SelectProps } from '@cloudscape-design/components/select';
|
|
12
|
+
import { TilesProps } from '@cloudscape-design/components/tiles';
|
|
13
|
+
import { LinkProps } from '@cloudscape-design/components/link';
|
|
14
|
+
import { HeaderProps } from '@cloudscape-design/components/header';
|
|
15
|
+
import { InputProps } from '@cloudscape-design/components/input';
|
|
16
|
+
import { StatusIndicatorProps } from '@cloudscape-design/components/status-indicator';
|
|
17
|
+
import { TextContentProps } from '@cloudscape-design/components/text-content';
|
|
18
|
+
import { TextareaProps } from '@cloudscape-design/components/textarea';
|
|
19
|
+
import { TimeInputProps } from '@cloudscape-design/components/time-input';
|
|
20
|
+
import { ToggleProps } from '@cloudscape-design/components/toggle';
|
|
6
21
|
import { OptionDefinition } from '@cloudscape-design/components/internal/components/option/interfaces';
|
|
7
22
|
|
|
8
23
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { FormFieldProps } from '@cloudscape-design/components/form-field/interfaces';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { AlertProps
|
|
4
|
+
import { AlertProps } from '@cloudscape-design/components/alert';
|
|
5
|
+
import { BoxProps } from '@cloudscape-design/components/box';
|
|
6
|
+
import { ButtonProps } from '@cloudscape-design/components/button';
|
|
5
7
|
import { CheckboxProps } from '@cloudscape-design/components/checkbox/interfaces';
|
|
8
|
+
import { DatePickerProps } from '@cloudscape-design/components/date-picker';
|
|
9
|
+
import { MultiselectProps } from '@cloudscape-design/components/multiselect';
|
|
10
|
+
import { SegmentedControlProps } from '@cloudscape-design/components/segmented-control';
|
|
11
|
+
import { SelectProps } from '@cloudscape-design/components/select';
|
|
12
|
+
import { TilesProps } from '@cloudscape-design/components/tiles';
|
|
13
|
+
import { LinkProps } from '@cloudscape-design/components/link';
|
|
14
|
+
import { HeaderProps } from '@cloudscape-design/components/header';
|
|
15
|
+
import { InputProps } from '@cloudscape-design/components/input';
|
|
16
|
+
import { StatusIndicatorProps } from '@cloudscape-design/components/status-indicator';
|
|
17
|
+
import { TextContentProps } from '@cloudscape-design/components/text-content';
|
|
18
|
+
import { TextareaProps } from '@cloudscape-design/components/textarea';
|
|
19
|
+
import { TimeInputProps } from '@cloudscape-design/components/time-input';
|
|
20
|
+
import { ToggleProps } from '@cloudscape-design/components/toggle';
|
|
6
21
|
import { OptionDefinition } from '@cloudscape-design/components/internal/components/option/interfaces';
|
|
7
22
|
|
|
8
23
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/index.ts
|
|
@@ -108,7 +118,7 @@ __export(index_exports, {
|
|
|
108
118
|
module.exports = __toCommonJS(index_exports);
|
|
109
119
|
|
|
110
120
|
// src/components/CSAlert.tsx
|
|
111
|
-
var
|
|
121
|
+
var import_alert = __toESM(require("@cloudscape-design/components/alert"));
|
|
112
122
|
|
|
113
123
|
// src/types/CSFormProps.ts
|
|
114
124
|
var FromPropsHelper = class {
|
|
@@ -138,7 +148,7 @@ FromPropsHelper.sanitizeValueToString = (value) => {
|
|
|
138
148
|
};
|
|
139
149
|
|
|
140
150
|
// src/components/CSFormField.tsx
|
|
141
|
-
var
|
|
151
|
+
var import_form_field = __toESM(require("@cloudscape-design/components/form-field"));
|
|
142
152
|
var import_jsx_runtime = (
|
|
143
153
|
// IMPORTANT: Order of props determines which one "wins". You can override Elements that are present in the
|
|
144
154
|
// localisation texts via the additional props. For instance, you can pass in
|
|
@@ -152,7 +162,7 @@ function CSFormField(props) {
|
|
|
152
162
|
if (!FromPropsHelper.usesFormField(props)) {
|
|
153
163
|
return props.children;
|
|
154
164
|
}
|
|
155
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_field.default, { "data-testid": formFieldId, ...localisationObject == null ? void 0 : localisationObject.formField, ...props.formField, children: props.children });
|
|
156
166
|
}
|
|
157
167
|
|
|
158
168
|
// src/components/ChildUtils.tsx
|
|
@@ -189,7 +199,7 @@ function CSAlert(props) {
|
|
|
189
199
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
190
200
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
191
201
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
192
|
-
|
|
202
|
+
import_alert.default,
|
|
193
203
|
{
|
|
194
204
|
"data-testid": uniqueId,
|
|
195
205
|
...props,
|
|
@@ -200,13 +210,13 @@ function CSAlert(props) {
|
|
|
200
210
|
}
|
|
201
211
|
|
|
202
212
|
// src/components/CSBox.tsx
|
|
203
|
-
var
|
|
213
|
+
var import_box = __toESM(require("@cloudscape-design/components/box"));
|
|
204
214
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
205
215
|
function CSBox(props) {
|
|
206
216
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
207
217
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
208
218
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
209
|
-
|
|
219
|
+
import_box.default,
|
|
210
220
|
{
|
|
211
221
|
"data-testid": uniqueId,
|
|
212
222
|
...props,
|
|
@@ -217,13 +227,13 @@ function CSBox(props) {
|
|
|
217
227
|
}
|
|
218
228
|
|
|
219
229
|
// src/components/CSButton.tsx
|
|
220
|
-
var
|
|
230
|
+
var import_button = __toESM(require("@cloudscape-design/components/button"));
|
|
221
231
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
222
232
|
function CSButton(props) {
|
|
223
233
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
224
234
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
225
235
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
226
|
-
|
|
236
|
+
import_button.default,
|
|
227
237
|
{
|
|
228
238
|
"data-testid": uniqueId,
|
|
229
239
|
...props,
|
|
@@ -234,13 +244,13 @@ function CSButton(props) {
|
|
|
234
244
|
}
|
|
235
245
|
|
|
236
246
|
// src/components/CSCheckbox.tsx
|
|
237
|
-
var
|
|
247
|
+
var import_checkbox = __toESM(require("@cloudscape-design/components/checkbox"));
|
|
238
248
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
239
249
|
function CSCheckbox(props) {
|
|
240
250
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
241
251
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
242
252
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
243
|
-
|
|
253
|
+
import_checkbox.default,
|
|
244
254
|
{
|
|
245
255
|
"data-testid": uniqueId,
|
|
246
256
|
name: uniqueId,
|
|
@@ -254,7 +264,7 @@ function CSCheckbox(props) {
|
|
|
254
264
|
}
|
|
255
265
|
|
|
256
266
|
// src/components/CSDatePicker.tsx
|
|
257
|
-
var
|
|
267
|
+
var import_date_picker = __toESM(require("@cloudscape-design/components/date-picker"));
|
|
258
268
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
259
269
|
function CSDatePicker(props) {
|
|
260
270
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -262,7 +272,7 @@ function CSDatePicker(props) {
|
|
|
262
272
|
return new Date(FromPropsHelper.sanitizeValueToString(props.value)).toISOString().split("T")[0];
|
|
263
273
|
};
|
|
264
274
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CSFormField, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
265
|
-
|
|
275
|
+
import_date_picker.default,
|
|
266
276
|
{
|
|
267
277
|
"data-testid": uniqueId,
|
|
268
278
|
controlId: uniqueId,
|
|
@@ -275,7 +285,7 @@ function CSDatePicker(props) {
|
|
|
275
285
|
}
|
|
276
286
|
|
|
277
287
|
// src/components/CSMultiselect.tsx
|
|
278
|
-
var
|
|
288
|
+
var import_multiselect = __toESM(require("@cloudscape-design/components/multiselect"));
|
|
279
289
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
280
290
|
function CSMultiselect(props) {
|
|
281
291
|
var _a, _b;
|
|
@@ -294,7 +304,7 @@ function CSMultiselect(props) {
|
|
|
294
304
|
};
|
|
295
305
|
const hideTokens = (_a = props.hideTokens) != null ? _a : props.tokenLimit !== void 0 && props.tokenLimit === 0;
|
|
296
306
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
297
|
-
|
|
307
|
+
import_multiselect.default,
|
|
298
308
|
{
|
|
299
309
|
"data-testid": uniqueId,
|
|
300
310
|
controlId: uniqueId,
|
|
@@ -405,13 +415,13 @@ function CSEnumMultiselect(props) {
|
|
|
405
415
|
}
|
|
406
416
|
|
|
407
417
|
// src/components/CSSegmentedControl.tsx
|
|
408
|
-
var
|
|
418
|
+
var import_segmented_control = __toESM(require("@cloudscape-design/components/segmented-control"));
|
|
409
419
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
410
420
|
function CSSegmentedControl(props) {
|
|
411
421
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
412
422
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
413
423
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
414
|
-
|
|
424
|
+
import_segmented_control.default,
|
|
415
425
|
{
|
|
416
426
|
"data-testid": uniqueId,
|
|
417
427
|
onChange: ({ detail }) => props.onChangeValue(props.fieldSpec.key, detail.selectedId),
|
|
@@ -440,13 +450,13 @@ function CSEnumSegmentedControl(props) {
|
|
|
440
450
|
}
|
|
441
451
|
|
|
442
452
|
// src/components/CSSelect.tsx
|
|
443
|
-
var
|
|
453
|
+
var import_select = __toESM(require("@cloudscape-design/components/select"));
|
|
444
454
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
445
455
|
function CSSelect(props) {
|
|
446
456
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
447
457
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
448
458
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
449
|
-
|
|
459
|
+
import_select.default,
|
|
450
460
|
{
|
|
451
461
|
"data-testid": uniqueId,
|
|
452
462
|
controlId: uniqueId,
|
|
@@ -470,7 +480,7 @@ function CSEnumSelect(props) {
|
|
|
470
480
|
}
|
|
471
481
|
|
|
472
482
|
// src/components/CSEnumTiles.tsx
|
|
473
|
-
var
|
|
483
|
+
var import_tiles = __toESM(require("@cloudscape-design/components/tiles"));
|
|
474
484
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
475
485
|
function CSEnumTiles(props) {
|
|
476
486
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -483,7 +493,7 @@ function CSEnumTiles(props) {
|
|
|
483
493
|
};
|
|
484
494
|
});
|
|
485
495
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
486
|
-
|
|
496
|
+
import_tiles.default,
|
|
487
497
|
{
|
|
488
498
|
"data-testid": uniqueId,
|
|
489
499
|
controlId: uniqueId,
|
|
@@ -498,7 +508,7 @@ function CSEnumTiles(props) {
|
|
|
498
508
|
}
|
|
499
509
|
|
|
500
510
|
// src/components/CSLink.tsx
|
|
501
|
-
var
|
|
511
|
+
var import_link = __toESM(require("@cloudscape-design/components/link"));
|
|
502
512
|
|
|
503
513
|
// src/utils/BrowserUtils.ts
|
|
504
514
|
var openInNewTab = (link) => {
|
|
@@ -525,7 +535,7 @@ function CSLink(props) {
|
|
|
525
535
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
526
536
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
527
537
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
528
|
-
|
|
538
|
+
import_link.default,
|
|
529
539
|
{
|
|
530
540
|
"data-testid": uniqueId,
|
|
531
541
|
...props,
|
|
@@ -539,13 +549,13 @@ function CSExternalLink(props) {
|
|
|
539
549
|
}
|
|
540
550
|
|
|
541
551
|
// src/components/CSHeader.tsx
|
|
542
|
-
var
|
|
552
|
+
var import_header = __toESM(require("@cloudscape-design/components/header"));
|
|
543
553
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
544
554
|
function CSHeader(props) {
|
|
545
555
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
546
556
|
const { children } = ChildUtils.getChildren(props, localisationObject);
|
|
547
557
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
548
|
-
|
|
558
|
+
import_header.default,
|
|
549
559
|
{
|
|
550
560
|
"data-testid": uniqueId,
|
|
551
561
|
...props,
|
|
@@ -556,7 +566,7 @@ function CSHeader(props) {
|
|
|
556
566
|
}
|
|
557
567
|
|
|
558
568
|
// src/components/CSInput.tsx
|
|
559
|
-
var
|
|
569
|
+
var import_input = __toESM(require("@cloudscape-design/components/input"));
|
|
560
570
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
561
571
|
function CSInput(props) {
|
|
562
572
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -564,7 +574,7 @@ function CSInput(props) {
|
|
|
564
574
|
const sanitizedValue = FromPropsHelper.sanitizeValueToString(props.value);
|
|
565
575
|
const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
|
|
566
576
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
567
|
-
|
|
577
|
+
import_input.default,
|
|
568
578
|
{
|
|
569
579
|
"data-testid": uniqueId,
|
|
570
580
|
controlId: uniqueId,
|
|
@@ -577,7 +587,7 @@ function CSInput(props) {
|
|
|
577
587
|
}
|
|
578
588
|
|
|
579
589
|
// src/components/CSNumericInput.tsx
|
|
580
|
-
var
|
|
590
|
+
var import_input2 = __toESM(require("@cloudscape-design/components/input"));
|
|
581
591
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
582
592
|
function CSNumericInput(props) {
|
|
583
593
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -591,7 +601,7 @@ function CSNumericInput(props) {
|
|
|
591
601
|
const sanitizedValue = sanitizeValue();
|
|
592
602
|
const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
|
|
593
603
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(CSFormField, { ...formProps, formField: { ...props.formField, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
594
|
-
|
|
604
|
+
import_input2.default,
|
|
595
605
|
{
|
|
596
606
|
"data-testid": uniqueId,
|
|
597
607
|
controlId: uniqueId,
|
|
@@ -608,13 +618,13 @@ function CSNumericInput(props) {
|
|
|
608
618
|
}
|
|
609
619
|
|
|
610
620
|
// src/components/CSStatusIndicator.tsx
|
|
611
|
-
var
|
|
621
|
+
var import_status_indicator = __toESM(require("@cloudscape-design/components/status-indicator"));
|
|
612
622
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
613
623
|
function CSStatusIndicator(props) {
|
|
614
624
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
615
625
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
616
626
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
617
|
-
|
|
627
|
+
import_status_indicator.default,
|
|
618
628
|
{
|
|
619
629
|
"data-testid": uniqueId,
|
|
620
630
|
...props,
|
|
@@ -625,13 +635,13 @@ function CSStatusIndicator(props) {
|
|
|
625
635
|
}
|
|
626
636
|
|
|
627
637
|
// src/components/CSTextContent.tsx
|
|
628
|
-
var
|
|
638
|
+
var import_text_content = __toESM(require("@cloudscape-design/components/text-content"));
|
|
629
639
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
630
640
|
function CSTextContent(props) {
|
|
631
641
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
632
642
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
633
643
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
634
|
-
|
|
644
|
+
import_text_content.default,
|
|
635
645
|
{
|
|
636
646
|
"data-testid": uniqueId,
|
|
637
647
|
...props,
|
|
@@ -642,7 +652,7 @@ function CSTextContent(props) {
|
|
|
642
652
|
}
|
|
643
653
|
|
|
644
654
|
// src/components/CSTextarea.tsx
|
|
645
|
-
var
|
|
655
|
+
var import_textarea = __toESM(require("@cloudscape-design/components/textarea"));
|
|
646
656
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
647
657
|
function CSTextarea(props) {
|
|
648
658
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -650,7 +660,7 @@ function CSTextarea(props) {
|
|
|
650
660
|
const sanitizedValue = FromPropsHelper.sanitizeValueToString(props.value);
|
|
651
661
|
const errorText = FromPropsHelper.getLocalisedErrorText(props, sanitizedValue, props.localiser.getFieldValidityLocalisationFunction());
|
|
652
662
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CSFormField, { ...props, formField: { ...formProps, errorText }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
653
|
-
|
|
663
|
+
import_textarea.default,
|
|
654
664
|
{
|
|
655
665
|
"data-testid": uniqueId,
|
|
656
666
|
controlId: uniqueId,
|
|
@@ -663,14 +673,14 @@ function CSTextarea(props) {
|
|
|
663
673
|
}
|
|
664
674
|
|
|
665
675
|
// src/components/CSTimeInput.tsx
|
|
666
|
-
var
|
|
676
|
+
var import_time_input = __toESM(require("@cloudscape-design/components/time-input"));
|
|
667
677
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
668
678
|
function CSTimeInput(props) {
|
|
669
679
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
670
680
|
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
671
681
|
const defaultFormat = "hh:mm";
|
|
672
682
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
673
|
-
|
|
683
|
+
import_time_input.default,
|
|
674
684
|
{
|
|
675
685
|
"data-testid": uniqueId,
|
|
676
686
|
autoFocus: props.autoFocus,
|
|
@@ -684,13 +694,13 @@ function CSTimeInput(props) {
|
|
|
684
694
|
}
|
|
685
695
|
|
|
686
696
|
// src/components/CSToggle.tsx
|
|
687
|
-
var
|
|
697
|
+
var import_toggle = __toESM(require("@cloudscape-design/components/toggle"));
|
|
688
698
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
689
699
|
function CSToggle(props) {
|
|
690
700
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
691
701
|
const { children, formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
692
702
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
693
|
-
|
|
703
|
+
import_toggle.default,
|
|
694
704
|
{
|
|
695
705
|
"data-testid": uniqueId,
|
|
696
706
|
name: uniqueId,
|
|
@@ -1021,7 +1031,7 @@ function CSVEnumRatingView(props) {
|
|
|
1021
1031
|
}
|
|
1022
1032
|
|
|
1023
1033
|
// src/views/CSVNoItemsView.tsx
|
|
1024
|
-
var
|
|
1034
|
+
var import_components = require("@cloudscape-design/components");
|
|
1025
1035
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1026
1036
|
var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec) => ({
|
|
1027
1037
|
boxHeading: spec.addField(new FieldSpec("boxHeading")),
|
|
@@ -1030,7 +1040,7 @@ var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec
|
|
|
1030
1040
|
function CSVNoItemsView(props) {
|
|
1031
1041
|
const spec = props.viewSpec;
|
|
1032
1042
|
const { elements } = spec;
|
|
1033
|
-
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { "data-testid": spec.getDataTestId(), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1043
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { "data-testid": spec.getDataTestId(), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_components.Box, { textAlign: "center", color: "inherit", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_components.SpaceBetween, { size: "xxs", direction: "vertical", children: [
|
|
1034
1044
|
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1035
1045
|
CSBox,
|
|
1036
1046
|
{
|
|
@@ -1059,7 +1069,7 @@ function CSVNoItemsView(props) {
|
|
|
1059
1069
|
}
|
|
1060
1070
|
|
|
1061
1071
|
// src/views/CSVPriceInputView.tsx
|
|
1062
|
-
var
|
|
1072
|
+
var import_grid = __toESM(require("@cloudscape-design/components/grid"));
|
|
1063
1073
|
|
|
1064
1074
|
// src/utils/PriceUtils.ts
|
|
1065
1075
|
var LOGGER2 = new Log("PriceUtils");
|
|
@@ -1134,7 +1144,7 @@ function CSVPriceInputView(props) {
|
|
|
1134
1144
|
const priceInCents = props.value ? props.value.priceInCents : 0;
|
|
1135
1145
|
const currency = props.value ? props.value.currency : props.defaultCurrency;
|
|
1136
1146
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1137
|
-
|
|
1147
|
+
import_grid.default,
|
|
1138
1148
|
{
|
|
1139
1149
|
gridDefinition: [{ colspan: 4 }, { colspan: { default: 4, xxs: 3 } }, { colspan: { default: 4, xxs: 5 } }],
|
|
1140
1150
|
disableGutters: true,
|
|
@@ -1185,7 +1195,7 @@ function CSVPriceInputView(props) {
|
|
|
1185
1195
|
}
|
|
1186
1196
|
|
|
1187
1197
|
// src/views/CSVSearchFilterView.tsx
|
|
1188
|
-
var
|
|
1198
|
+
var import_space_between = __toESM(require("@cloudscape-design/components/space-between"));
|
|
1189
1199
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1190
1200
|
var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1191
1201
|
inputSearch: spec.addField(new FieldSpec("inputSearch")),
|
|
@@ -1194,7 +1204,7 @@ var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.n
|
|
|
1194
1204
|
function CSVSearchFilterView(props) {
|
|
1195
1205
|
const spec = props.viewSpec;
|
|
1196
1206
|
const { elements } = spec;
|
|
1197
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_space_between.default, { size: "s", direction: "horizontal", children: [
|
|
1198
1208
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { minWidth: "320px" }, children: props.inputSearch === void 0 || typeof props.inputSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1199
1209
|
CSInput,
|
|
1200
1210
|
{
|
|
@@ -1225,7 +1235,7 @@ function CSVSearchFilterView(props) {
|
|
|
1225
1235
|
}
|
|
1226
1236
|
|
|
1227
1237
|
// src/views/CSVTextPromptModalView.tsx
|
|
1228
|
-
var
|
|
1238
|
+
var import_components2 = require("@cloudscape-design/components");
|
|
1229
1239
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1230
1240
|
var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1231
1241
|
headerHeading: spec.addField(new FieldSpec("headerHeading")),
|
|
@@ -1247,7 +1257,7 @@ function CSVTextPromptModalView(props) {
|
|
|
1247
1257
|
}
|
|
1248
1258
|
) : props.buttonSecondary : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, {});
|
|
1249
1259
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1250
|
-
|
|
1260
|
+
import_components2.Modal,
|
|
1251
1261
|
{
|
|
1252
1262
|
"data-testid": props.viewSpec.getDataTestId(),
|
|
1253
1263
|
onDismiss: props.onDismiss,
|
|
@@ -1260,7 +1270,7 @@ function CSVTextPromptModalView(props) {
|
|
|
1260
1270
|
children: props.headerHeading
|
|
1261
1271
|
}
|
|
1262
1272
|
) : props.headerHeading,
|
|
1263
|
-
footer: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1273
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_components2.Box, { float: "right", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components2.SpaceBetween, { direction: "horizontal", size: "l", children: [
|
|
1264
1274
|
props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1265
1275
|
CSButton,
|
|
1266
1276
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/CSAlert.tsx
|
|
2
|
-
import
|
|
2
|
+
import Alert from "@cloudscape-design/components/alert";
|
|
3
3
|
|
|
4
4
|
// src/types/CSFormProps.ts
|
|
5
5
|
var FromPropsHelper = class {
|
|
@@ -29,7 +29,7 @@ FromPropsHelper.sanitizeValueToString = (value) => {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/components/CSFormField.tsx
|
|
32
|
-
import
|
|
32
|
+
import FormField from "@cloudscape-design/components/form-field";
|
|
33
33
|
import { jsx } from "react/jsx-runtime";
|
|
34
34
|
var FORM_FIELD_ID_SUFFIX = "_FORM_FIELD";
|
|
35
35
|
function CSFormField(props) {
|
|
@@ -91,7 +91,7 @@ function CSAlert(props) {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// src/components/CSBox.tsx
|
|
94
|
-
import
|
|
94
|
+
import Box from "@cloudscape-design/components/box";
|
|
95
95
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
96
96
|
function CSBox(props) {
|
|
97
97
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -108,7 +108,7 @@ function CSBox(props) {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
// src/components/CSButton.tsx
|
|
111
|
-
import
|
|
111
|
+
import Button from "@cloudscape-design/components/button";
|
|
112
112
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
113
113
|
function CSButton(props) {
|
|
114
114
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -125,7 +125,7 @@ function CSButton(props) {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
// src/components/CSCheckbox.tsx
|
|
128
|
-
import
|
|
128
|
+
import Checkbox from "@cloudscape-design/components/checkbox";
|
|
129
129
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
130
130
|
function CSCheckbox(props) {
|
|
131
131
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -145,7 +145,7 @@ function CSCheckbox(props) {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// src/components/CSDatePicker.tsx
|
|
148
|
-
import
|
|
148
|
+
import DatePicker from "@cloudscape-design/components/date-picker";
|
|
149
149
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
150
150
|
function CSDatePicker(props) {
|
|
151
151
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -166,7 +166,7 @@ function CSDatePicker(props) {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
// src/components/CSMultiselect.tsx
|
|
169
|
-
import
|
|
169
|
+
import Multiselect from "@cloudscape-design/components/multiselect";
|
|
170
170
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
171
171
|
function CSMultiselect(props) {
|
|
172
172
|
var _a, _b;
|
|
@@ -296,7 +296,7 @@ function CSEnumMultiselect(props) {
|
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
// src/components/CSSegmentedControl.tsx
|
|
299
|
-
import
|
|
299
|
+
import SegmentedControl from "@cloudscape-design/components/segmented-control";
|
|
300
300
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
301
301
|
function CSSegmentedControl(props) {
|
|
302
302
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -331,7 +331,7 @@ function CSEnumSegmentedControl(props) {
|
|
|
331
331
|
}
|
|
332
332
|
|
|
333
333
|
// src/components/CSSelect.tsx
|
|
334
|
-
import
|
|
334
|
+
import Select from "@cloudscape-design/components/select";
|
|
335
335
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
336
336
|
function CSSelect(props) {
|
|
337
337
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -361,7 +361,7 @@ function CSEnumSelect(props) {
|
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
// src/components/CSEnumTiles.tsx
|
|
364
|
-
import
|
|
364
|
+
import Tiles from "@cloudscape-design/components/tiles";
|
|
365
365
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
366
366
|
function CSEnumTiles(props) {
|
|
367
367
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -389,7 +389,7 @@ function CSEnumTiles(props) {
|
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
// src/components/CSLink.tsx
|
|
392
|
-
import
|
|
392
|
+
import Link from "@cloudscape-design/components/link";
|
|
393
393
|
|
|
394
394
|
// src/utils/BrowserUtils.ts
|
|
395
395
|
var openInNewTab = (link) => {
|
|
@@ -430,7 +430,7 @@ function CSExternalLink(props) {
|
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
// src/components/CSHeader.tsx
|
|
433
|
-
import
|
|
433
|
+
import Header from "@cloudscape-design/components/header";
|
|
434
434
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
435
435
|
function CSHeader(props) {
|
|
436
436
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -447,7 +447,7 @@ function CSHeader(props) {
|
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
// src/components/CSInput.tsx
|
|
450
|
-
import
|
|
450
|
+
import Input from "@cloudscape-design/components/input";
|
|
451
451
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
452
452
|
function CSInput(props) {
|
|
453
453
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -468,7 +468,7 @@ function CSInput(props) {
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
// src/components/CSNumericInput.tsx
|
|
471
|
-
import
|
|
471
|
+
import Input2 from "@cloudscape-design/components/input";
|
|
472
472
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
473
473
|
function CSNumericInput(props) {
|
|
474
474
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -499,7 +499,7 @@ function CSNumericInput(props) {
|
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
// src/components/CSStatusIndicator.tsx
|
|
502
|
-
import
|
|
502
|
+
import StatusIndicator from "@cloudscape-design/components/status-indicator";
|
|
503
503
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
504
504
|
function CSStatusIndicator(props) {
|
|
505
505
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -516,7 +516,7 @@ function CSStatusIndicator(props) {
|
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
// src/components/CSTextContent.tsx
|
|
519
|
-
import
|
|
519
|
+
import TextContent from "@cloudscape-design/components/text-content";
|
|
520
520
|
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
521
521
|
function CSTextContent(props) {
|
|
522
522
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -533,7 +533,7 @@ function CSTextContent(props) {
|
|
|
533
533
|
}
|
|
534
534
|
|
|
535
535
|
// src/components/CSTextarea.tsx
|
|
536
|
-
import
|
|
536
|
+
import Textarea from "@cloudscape-design/components/textarea";
|
|
537
537
|
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
538
538
|
function CSTextarea(props) {
|
|
539
539
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -554,7 +554,7 @@ function CSTextarea(props) {
|
|
|
554
554
|
}
|
|
555
555
|
|
|
556
556
|
// src/components/CSTimeInput.tsx
|
|
557
|
-
import
|
|
557
|
+
import TimeInput from "@cloudscape-design/components/time-input";
|
|
558
558
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
559
559
|
function CSTimeInput(props) {
|
|
560
560
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -575,7 +575,7 @@ function CSTimeInput(props) {
|
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
// src/components/CSToggle.tsx
|
|
578
|
-
import
|
|
578
|
+
import Toggle from "@cloudscape-design/components/toggle";
|
|
579
579
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
580
580
|
function CSToggle(props) {
|
|
581
581
|
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
@@ -950,7 +950,7 @@ function CSVNoItemsView(props) {
|
|
|
950
950
|
}
|
|
951
951
|
|
|
952
952
|
// src/views/CSVPriceInputView.tsx
|
|
953
|
-
import
|
|
953
|
+
import Grid from "@cloudscape-design/components/grid";
|
|
954
954
|
|
|
955
955
|
// src/utils/PriceUtils.ts
|
|
956
956
|
var LOGGER2 = new Log("PriceUtils");
|
|
@@ -1076,7 +1076,7 @@ function CSVPriceInputView(props) {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
|
|
1078
1078
|
// src/views/CSVSearchFilterView.tsx
|
|
1079
|
-
import
|
|
1079
|
+
import SpaceBetween2 from "@cloudscape-design/components/space-between";
|
|
1080
1080
|
import { jsx as jsx27, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1081
1081
|
var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1082
1082
|
inputSearch: spec.addField(new FieldSpec("inputSearch")),
|