@ebertjendustries/cswrapper 1.0.11 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +9 -2
- package/dist/index.d.ts +9 -2
- package/dist/index.js +54 -36
- package/dist/index.mjs +44 -27
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, BoxProps, ButtonProps, DatePickerProps, MultiselectProps, SegmentedControlProps, SelectProps, TilesProps, LinkProps, HeaderProps, InputProps, StatusIndicatorProps, TextContentProps, TextareaProps, TimeInputProps, ToggleProps } from '@cloudscape-design/components';
|
|
4
|
+
import { AlertProps, BoxProps, ButtonProps, DatePickerProps, MultiselectProps, SegmentedControlProps, SelectProps, TilesProps, LinkProps, HeaderProps, InputProps, StatusIndicatorProps, TextContentProps, TextareaProps, TimeInputProps, ToggleProps, CopyToClipboardProps } from '@cloudscape-design/components';
|
|
5
5
|
import { CheckboxProps } from '@cloudscape-design/components/checkbox/interfaces';
|
|
6
6
|
import { OptionDefinition } from '@cloudscape-design/components/internal/components/option/interfaces';
|
|
7
7
|
|
|
@@ -677,6 +677,13 @@ interface CSToggleProps extends CSFormProps, ToggleProps {
|
|
|
677
677
|
*/
|
|
678
678
|
declare function CSToggle(props: CSToggleProps): react_jsx_runtime.JSX.Element;
|
|
679
679
|
|
|
680
|
+
interface CSCopyToClipboardProps extends CSReadOnlyFormProps, CopyToClipboardProps {
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Represents a {@link CopyToClipboard} with extra features.
|
|
684
|
+
*/
|
|
685
|
+
declare function CSCopyToClipboard(props: CSCopyToClipboardProps): react_jsx_runtime.JSX.Element;
|
|
686
|
+
|
|
680
687
|
interface CSPropsType extends CSReadOnlyFormProps {
|
|
681
688
|
children?: any;
|
|
682
689
|
preventOverflow?: boolean;
|
|
@@ -786,4 +793,4 @@ declare const warnWhenTabIsClosed: (isDirty?: () => boolean) => () => void;
|
|
|
786
793
|
|
|
787
794
|
declare const useHotkey: (key: string, shift: boolean, ctrl: boolean, alt: boolean, callback: Function, node?: null) => void;
|
|
788
795
|
|
|
789
|
-
export { type BooleanStateIndication, CSAlert, CSBox, CSButton, CSCheckbox, CSDatePicker, CSEnumMultiselect, CSEnumSegmentedControl, CSEnumSelect, CSEnumTiles, CSExternalLink, CSFormField, type CSFormProps, CSHeader, CSInput, CSLink, CSMultiselect, CSNumericInput, type CSReadOnlyFormProps, CSSegmentedControl, CSSelect, CSStatusIndicator, CSTextContent, CSTextarea, CSTimeInput, CSToggle, CSVEnumRatingView, type CSVEnumRatingViewElements, CSVNoItemsView, type CSVNoItemsViewElements, CSVPriceInputView, type CSVPriceInputViewElements, CSVSearchFilterView, type CSVSearchFilterViewElements, CSVTextPromptModalView, type CSVTextPromptModalViewElements, type CSVTextPromptModalViewProps, CSV_ENUM_RATING_VIEW_SPEC, CSV_NO_ITEMS_VIEW_SPEC, CSV_PRICE_INPUT_VIEW_SPEC, CSV_SEARCH_FILTER_VIEW_SPEC, CSV_TEXT_PROMPT_MODAL_VIEW_SPEC, type CSViewProps, ChildUtils, type CommandFunction, type ContentWithMessagesCTO, ControllerState, DateUtils, ELEMENT_VALIDITY_LEVEL_FACTORY, ElementValidityLevel, EnumFactory, FORM_FIELD_ID_SUFFIX, FieldProperties, FieldSpec, type FieldValidatorFunctionType, type FieldValidityLocalisationFunction, FixedWidth, FromPropsHelper, type IFieldSpec, type IPrice, type IRestClient, type IViewElementSpec, type IdType, type Indexable, type InputChangedFunction, LocalStorageService, LocalisationNamespace, type LocalisationVariableType, type LocalisedElements, type LocalisedEnumDetails, Localiser, Log, MESSAGE_SEVERITY_FACTORY, MessageCTO, MessageCodeTO, MessageService, MessageSeverity, type MessageWithDetailToggle, type ModalState, type MultiPropertyChangeFunction, NO_HTTP_CODE, NSK_CONTENT, ObjectWithId, PriceUtils, type PropertyChangeFunction, QUERY_SEP, QUERY_START, type QueryKeyValueParams, QueryParamHelper, REST_CLIENT_LOGGER, RestClient, type RunFunction, RunFunctionResult, SelectHelper, TECHNICAL_CONTROLLER_ID, type UseAWSUIRefHook, type UseControllerDisplayStateHook, type UseMessagesHook, type UseTOArrayChangeHandlerHook, type UseTOChangeHandlerHook, ViewSpec, type ViewValidatorFunctionType, createRestClient, fatalRunErrorFunction, filterArrayByIndices, getEnumRatingLabel, getEnumRatingValues, indexRangeArray, isContentWithMessages, openInNewTab, singleChangeHandlerToMulti, sleep, sortArrayByIndices, useAWSUIRef, useControllerDisplayState, useHotkey, useMessages, useTOArrayChangeHandler, useTOChangeHandler, warnWhenTabIsClosed };
|
|
796
|
+
export { type BooleanStateIndication, CSAlert, CSBox, CSButton, CSCheckbox, CSCopyToClipboard, CSDatePicker, CSEnumMultiselect, CSEnumSegmentedControl, CSEnumSelect, CSEnumTiles, CSExternalLink, CSFormField, type CSFormProps, CSHeader, CSInput, CSLink, CSMultiselect, CSNumericInput, type CSReadOnlyFormProps, CSSegmentedControl, CSSelect, CSStatusIndicator, CSTextContent, CSTextarea, CSTimeInput, CSToggle, CSVEnumRatingView, type CSVEnumRatingViewElements, CSVNoItemsView, type CSVNoItemsViewElements, CSVPriceInputView, type CSVPriceInputViewElements, CSVSearchFilterView, type CSVSearchFilterViewElements, CSVTextPromptModalView, type CSVTextPromptModalViewElements, type CSVTextPromptModalViewProps, CSV_ENUM_RATING_VIEW_SPEC, CSV_NO_ITEMS_VIEW_SPEC, CSV_PRICE_INPUT_VIEW_SPEC, CSV_SEARCH_FILTER_VIEW_SPEC, CSV_TEXT_PROMPT_MODAL_VIEW_SPEC, type CSViewProps, ChildUtils, type CommandFunction, type ContentWithMessagesCTO, ControllerState, DateUtils, ELEMENT_VALIDITY_LEVEL_FACTORY, ElementValidityLevel, EnumFactory, FORM_FIELD_ID_SUFFIX, FieldProperties, FieldSpec, type FieldValidatorFunctionType, type FieldValidityLocalisationFunction, FixedWidth, FromPropsHelper, type IFieldSpec, type IPrice, type IRestClient, type IViewElementSpec, type IdType, type Indexable, type InputChangedFunction, LocalStorageService, LocalisationNamespace, type LocalisationVariableType, type LocalisedElements, type LocalisedEnumDetails, Localiser, Log, MESSAGE_SEVERITY_FACTORY, MessageCTO, MessageCodeTO, MessageService, MessageSeverity, type MessageWithDetailToggle, type ModalState, type MultiPropertyChangeFunction, NO_HTTP_CODE, NSK_CONTENT, ObjectWithId, PriceUtils, type PropertyChangeFunction, QUERY_SEP, QUERY_START, type QueryKeyValueParams, QueryParamHelper, REST_CLIENT_LOGGER, RestClient, type RunFunction, RunFunctionResult, SelectHelper, TECHNICAL_CONTROLLER_ID, type UseAWSUIRefHook, type UseControllerDisplayStateHook, type UseMessagesHook, type UseTOArrayChangeHandlerHook, type UseTOChangeHandlerHook, ViewSpec, type ViewValidatorFunctionType, createRestClient, fatalRunErrorFunction, filterArrayByIndices, getEnumRatingLabel, getEnumRatingValues, indexRangeArray, isContentWithMessages, openInNewTab, singleChangeHandlerToMulti, sleep, sortArrayByIndices, useAWSUIRef, useControllerDisplayState, useHotkey, useMessages, useTOArrayChangeHandler, useTOChangeHandler, warnWhenTabIsClosed };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, BoxProps, ButtonProps, DatePickerProps, MultiselectProps, SegmentedControlProps, SelectProps, TilesProps, LinkProps, HeaderProps, InputProps, StatusIndicatorProps, TextContentProps, TextareaProps, TimeInputProps, ToggleProps } from '@cloudscape-design/components';
|
|
4
|
+
import { AlertProps, BoxProps, ButtonProps, DatePickerProps, MultiselectProps, SegmentedControlProps, SelectProps, TilesProps, LinkProps, HeaderProps, InputProps, StatusIndicatorProps, TextContentProps, TextareaProps, TimeInputProps, ToggleProps, CopyToClipboardProps } from '@cloudscape-design/components';
|
|
5
5
|
import { CheckboxProps } from '@cloudscape-design/components/checkbox/interfaces';
|
|
6
6
|
import { OptionDefinition } from '@cloudscape-design/components/internal/components/option/interfaces';
|
|
7
7
|
|
|
@@ -677,6 +677,13 @@ interface CSToggleProps extends CSFormProps, ToggleProps {
|
|
|
677
677
|
*/
|
|
678
678
|
declare function CSToggle(props: CSToggleProps): react_jsx_runtime.JSX.Element;
|
|
679
679
|
|
|
680
|
+
interface CSCopyToClipboardProps extends CSReadOnlyFormProps, CopyToClipboardProps {
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* Represents a {@link CopyToClipboard} with extra features.
|
|
684
|
+
*/
|
|
685
|
+
declare function CSCopyToClipboard(props: CSCopyToClipboardProps): react_jsx_runtime.JSX.Element;
|
|
686
|
+
|
|
680
687
|
interface CSPropsType extends CSReadOnlyFormProps {
|
|
681
688
|
children?: any;
|
|
682
689
|
preventOverflow?: boolean;
|
|
@@ -786,4 +793,4 @@ declare const warnWhenTabIsClosed: (isDirty?: () => boolean) => () => void;
|
|
|
786
793
|
|
|
787
794
|
declare const useHotkey: (key: string, shift: boolean, ctrl: boolean, alt: boolean, callback: Function, node?: null) => void;
|
|
788
795
|
|
|
789
|
-
export { type BooleanStateIndication, CSAlert, CSBox, CSButton, CSCheckbox, CSDatePicker, CSEnumMultiselect, CSEnumSegmentedControl, CSEnumSelect, CSEnumTiles, CSExternalLink, CSFormField, type CSFormProps, CSHeader, CSInput, CSLink, CSMultiselect, CSNumericInput, type CSReadOnlyFormProps, CSSegmentedControl, CSSelect, CSStatusIndicator, CSTextContent, CSTextarea, CSTimeInput, CSToggle, CSVEnumRatingView, type CSVEnumRatingViewElements, CSVNoItemsView, type CSVNoItemsViewElements, CSVPriceInputView, type CSVPriceInputViewElements, CSVSearchFilterView, type CSVSearchFilterViewElements, CSVTextPromptModalView, type CSVTextPromptModalViewElements, type CSVTextPromptModalViewProps, CSV_ENUM_RATING_VIEW_SPEC, CSV_NO_ITEMS_VIEW_SPEC, CSV_PRICE_INPUT_VIEW_SPEC, CSV_SEARCH_FILTER_VIEW_SPEC, CSV_TEXT_PROMPT_MODAL_VIEW_SPEC, type CSViewProps, ChildUtils, type CommandFunction, type ContentWithMessagesCTO, ControllerState, DateUtils, ELEMENT_VALIDITY_LEVEL_FACTORY, ElementValidityLevel, EnumFactory, FORM_FIELD_ID_SUFFIX, FieldProperties, FieldSpec, type FieldValidatorFunctionType, type FieldValidityLocalisationFunction, FixedWidth, FromPropsHelper, type IFieldSpec, type IPrice, type IRestClient, type IViewElementSpec, type IdType, type Indexable, type InputChangedFunction, LocalStorageService, LocalisationNamespace, type LocalisationVariableType, type LocalisedElements, type LocalisedEnumDetails, Localiser, Log, MESSAGE_SEVERITY_FACTORY, MessageCTO, MessageCodeTO, MessageService, MessageSeverity, type MessageWithDetailToggle, type ModalState, type MultiPropertyChangeFunction, NO_HTTP_CODE, NSK_CONTENT, ObjectWithId, PriceUtils, type PropertyChangeFunction, QUERY_SEP, QUERY_START, type QueryKeyValueParams, QueryParamHelper, REST_CLIENT_LOGGER, RestClient, type RunFunction, RunFunctionResult, SelectHelper, TECHNICAL_CONTROLLER_ID, type UseAWSUIRefHook, type UseControllerDisplayStateHook, type UseMessagesHook, type UseTOArrayChangeHandlerHook, type UseTOChangeHandlerHook, ViewSpec, type ViewValidatorFunctionType, createRestClient, fatalRunErrorFunction, filterArrayByIndices, getEnumRatingLabel, getEnumRatingValues, indexRangeArray, isContentWithMessages, openInNewTab, singleChangeHandlerToMulti, sleep, sortArrayByIndices, useAWSUIRef, useControllerDisplayState, useHotkey, useMessages, useTOArrayChangeHandler, useTOChangeHandler, warnWhenTabIsClosed };
|
|
796
|
+
export { type BooleanStateIndication, CSAlert, CSBox, CSButton, CSCheckbox, CSCopyToClipboard, CSDatePicker, CSEnumMultiselect, CSEnumSegmentedControl, CSEnumSelect, CSEnumTiles, CSExternalLink, CSFormField, type CSFormProps, CSHeader, CSInput, CSLink, CSMultiselect, CSNumericInput, type CSReadOnlyFormProps, CSSegmentedControl, CSSelect, CSStatusIndicator, CSTextContent, CSTextarea, CSTimeInput, CSToggle, CSVEnumRatingView, type CSVEnumRatingViewElements, CSVNoItemsView, type CSVNoItemsViewElements, CSVPriceInputView, type CSVPriceInputViewElements, CSVSearchFilterView, type CSVSearchFilterViewElements, CSVTextPromptModalView, type CSVTextPromptModalViewElements, type CSVTextPromptModalViewProps, CSV_ENUM_RATING_VIEW_SPEC, CSV_NO_ITEMS_VIEW_SPEC, CSV_PRICE_INPUT_VIEW_SPEC, CSV_SEARCH_FILTER_VIEW_SPEC, CSV_TEXT_PROMPT_MODAL_VIEW_SPEC, type CSViewProps, ChildUtils, type CommandFunction, type ContentWithMessagesCTO, ControllerState, DateUtils, ELEMENT_VALIDITY_LEVEL_FACTORY, ElementValidityLevel, EnumFactory, FORM_FIELD_ID_SUFFIX, FieldProperties, FieldSpec, type FieldValidatorFunctionType, type FieldValidityLocalisationFunction, FixedWidth, FromPropsHelper, type IFieldSpec, type IPrice, type IRestClient, type IViewElementSpec, type IdType, type Indexable, type InputChangedFunction, LocalStorageService, LocalisationNamespace, type LocalisationVariableType, type LocalisedElements, type LocalisedEnumDetails, Localiser, Log, MESSAGE_SEVERITY_FACTORY, MessageCTO, MessageCodeTO, MessageService, MessageSeverity, type MessageWithDetailToggle, type ModalState, type MultiPropertyChangeFunction, NO_HTTP_CODE, NSK_CONTENT, ObjectWithId, PriceUtils, type PropertyChangeFunction, QUERY_SEP, QUERY_START, type QueryKeyValueParams, QueryParamHelper, REST_CLIENT_LOGGER, RestClient, type RunFunction, RunFunctionResult, SelectHelper, TECHNICAL_CONTROLLER_ID, type UseAWSUIRefHook, type UseControllerDisplayStateHook, type UseMessagesHook, type UseTOArrayChangeHandlerHook, type UseTOChangeHandlerHook, ViewSpec, type ViewValidatorFunctionType, createRestClient, fatalRunErrorFunction, filterArrayByIndices, getEnumRatingLabel, getEnumRatingValues, indexRangeArray, isContentWithMessages, openInNewTab, singleChangeHandlerToMulti, sleep, sortArrayByIndices, useAWSUIRef, useControllerDisplayState, useHotkey, useMessages, useTOArrayChangeHandler, useTOChangeHandler, warnWhenTabIsClosed };
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __export(index_exports, {
|
|
|
24
24
|
CSBox: () => CSBox,
|
|
25
25
|
CSButton: () => CSButton,
|
|
26
26
|
CSCheckbox: () => CSCheckbox,
|
|
27
|
+
CSCopyToClipboard: () => CSCopyToClipboard,
|
|
27
28
|
CSDatePicker: () => CSDatePicker,
|
|
28
29
|
CSEnumMultiselect: () => CSEnumMultiselect,
|
|
29
30
|
CSEnumSegmentedControl: () => CSEnumSegmentedControl,
|
|
@@ -703,6 +704,22 @@ function CSToggle(props) {
|
|
|
703
704
|
) });
|
|
704
705
|
}
|
|
705
706
|
|
|
707
|
+
// src/components/CSCopyToClipboard.tsx
|
|
708
|
+
var import_components20 = require("@cloudscape-design/components");
|
|
709
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
710
|
+
function CSCopyToClipboard(props) {
|
|
711
|
+
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
712
|
+
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(CSFormField, { ...formProps, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
714
|
+
import_components20.CopyToClipboard,
|
|
715
|
+
{
|
|
716
|
+
"data-testid": uniqueId,
|
|
717
|
+
...props,
|
|
718
|
+
...localisationObject
|
|
719
|
+
}
|
|
720
|
+
) });
|
|
721
|
+
}
|
|
722
|
+
|
|
706
723
|
// src/views/CSVEnumRatingView.tsx
|
|
707
724
|
var import_react_rating = require("@smastrom/react-rating");
|
|
708
725
|
var import_react = require("react");
|
|
@@ -860,7 +877,7 @@ var ViewElementSpec = class {
|
|
|
860
877
|
return this.keyHierarchy;
|
|
861
878
|
}
|
|
862
879
|
log(prefix) {
|
|
863
|
-
LOGGER.info(`${prefix === void 0 ? "" : prefix}
|
|
880
|
+
LOGGER.info(`${prefix === void 0 ? "" : prefix}<${this.getDataTestId()}> = ${this.getLocalisationKey()}`);
|
|
864
881
|
}
|
|
865
882
|
};
|
|
866
883
|
var FieldSpec = class _FieldSpec extends ViewElementSpec {
|
|
@@ -968,17 +985,17 @@ var ViewSpec = class _ViewSpec extends ViewElementSpec {
|
|
|
968
985
|
return this.viewValidator(this, value);
|
|
969
986
|
}
|
|
970
987
|
logViewSpec() {
|
|
971
|
-
this.log();
|
|
988
|
+
this.log("VIEW :::: ");
|
|
972
989
|
for (const element of Object.values(this.elements)) {
|
|
973
990
|
if (element instanceof ViewElementSpec) {
|
|
974
|
-
element.log("
|
|
991
|
+
element.log(" FIELD :::: ");
|
|
975
992
|
}
|
|
976
993
|
}
|
|
977
994
|
}
|
|
978
995
|
};
|
|
979
996
|
|
|
980
997
|
// src/views/CSVEnumRatingView.tsx
|
|
981
|
-
var
|
|
998
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
982
999
|
var CSV_ENUM_RATING_VIEW_SPEC = (parent, key, instanceId) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
983
1000
|
rating: spec.addField(new FieldSpec("rating")),
|
|
984
1001
|
boxRatingName: spec.addField(new FieldSpec("boxRatingName"))
|
|
@@ -1005,8 +1022,8 @@ function CSVEnumRatingView(props) {
|
|
|
1005
1022
|
(0, import_react.useEffect)(() => {
|
|
1006
1023
|
setHoveredValue(props.selectedEnum);
|
|
1007
1024
|
}, [props.selectedEnum]);
|
|
1008
|
-
return /* @__PURE__ */ (0,
|
|
1009
|
-
/* @__PURE__ */ (0,
|
|
1025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(CSFormField, { fieldSpec: elements.rating, localiser: props.localiser, children: [
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1010
1027
|
import_react_rating.Rating,
|
|
1011
1028
|
{
|
|
1012
1029
|
"data-testid": elements.rating.getDataTestId(),
|
|
@@ -1019,7 +1036,7 @@ function CSVEnumRatingView(props) {
|
|
|
1019
1036
|
invisibleItemLabels: valuesInOrder.slice(1).map((e) => getEnumRatingLabel(e, spec.instanceId))
|
|
1020
1037
|
}
|
|
1021
1038
|
),
|
|
1022
|
-
/* @__PURE__ */ (0,
|
|
1039
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { textAlign: "left", paddingLeft: "5px" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1023
1040
|
CSBox,
|
|
1024
1041
|
{
|
|
1025
1042
|
fieldSpec: elements.boxRatingName,
|
|
@@ -1032,8 +1049,8 @@ function CSVEnumRatingView(props) {
|
|
|
1032
1049
|
}
|
|
1033
1050
|
|
|
1034
1051
|
// src/views/CSVNoItemsView.tsx
|
|
1035
|
-
var
|
|
1036
|
-
var
|
|
1052
|
+
var import_components21 = require("@cloudscape-design/components");
|
|
1053
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1037
1054
|
var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec) => ({
|
|
1038
1055
|
boxHeading: spec.addField(new FieldSpec("boxHeading")),
|
|
1039
1056
|
boxBody: spec.addField(new FieldSpec("boxBody"))
|
|
@@ -1041,8 +1058,8 @@ var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec
|
|
|
1041
1058
|
function CSVNoItemsView(props) {
|
|
1042
1059
|
const spec = props.viewSpec;
|
|
1043
1060
|
const { elements } = spec;
|
|
1044
|
-
return /* @__PURE__ */ (0,
|
|
1045
|
-
/* @__PURE__ */ (0,
|
|
1061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { "data-testid": spec.getDataTestId(), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_components21.Box, { textAlign: "center", color: "inherit", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_components21.SpaceBetween, { size: "xxs", direction: "vertical", children: [
|
|
1062
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1046
1063
|
CSBox,
|
|
1047
1064
|
{
|
|
1048
1065
|
fieldSpec: elements.boxHeading,
|
|
@@ -1053,7 +1070,7 @@ function CSVNoItemsView(props) {
|
|
|
1053
1070
|
children: props.headingText
|
|
1054
1071
|
}
|
|
1055
1072
|
),
|
|
1056
|
-
/* @__PURE__ */ (0,
|
|
1073
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1057
1074
|
CSBox,
|
|
1058
1075
|
{
|
|
1059
1076
|
fieldSpec: elements.boxBody,
|
|
@@ -1070,7 +1087,7 @@ function CSVNoItemsView(props) {
|
|
|
1070
1087
|
}
|
|
1071
1088
|
|
|
1072
1089
|
// src/views/CSVPriceInputView.tsx
|
|
1073
|
-
var
|
|
1090
|
+
var import_components22 = require("@cloudscape-design/components");
|
|
1074
1091
|
|
|
1075
1092
|
// src/utils/PriceUtils.ts
|
|
1076
1093
|
var LOGGER2 = new Log("PriceUtils");
|
|
@@ -1133,7 +1150,7 @@ _PriceUtils.parseFormattedPriceWithCurrency = (locale, formattedPrice, currencyS
|
|
|
1133
1150
|
var PriceUtils = _PriceUtils;
|
|
1134
1151
|
|
|
1135
1152
|
// src/views/CSVPriceInputView.tsx
|
|
1136
|
-
var
|
|
1153
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1137
1154
|
var CSV_PRICE_INPUT_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1138
1155
|
inputPrice: spec.addField(new FieldSpec("inputPrice", true, void 0, 0)),
|
|
1139
1156
|
selectCurrency: spec.addField(new FieldSpec("currency", true)),
|
|
@@ -1144,13 +1161,13 @@ function CSVPriceInputView(props) {
|
|
|
1144
1161
|
const { elements } = spec;
|
|
1145
1162
|
const priceInCents = props.value ? props.value.priceInCents : 0;
|
|
1146
1163
|
const currency = props.value ? props.value.currency : props.defaultCurrency;
|
|
1147
|
-
return /* @__PURE__ */ (0,
|
|
1148
|
-
|
|
1164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
1165
|
+
import_components22.Grid,
|
|
1149
1166
|
{
|
|
1150
1167
|
gridDefinition: [{ colspan: 4 }, { colspan: { default: 4, xxs: 3 } }, { colspan: { default: 4, xxs: 5 } }],
|
|
1151
1168
|
disableGutters: true,
|
|
1152
1169
|
children: [
|
|
1153
|
-
/* @__PURE__ */ (0,
|
|
1170
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1154
1171
|
CSNumericInput,
|
|
1155
1172
|
{
|
|
1156
1173
|
fieldSpec: elements.inputPrice,
|
|
@@ -1164,7 +1181,7 @@ function CSVPriceInputView(props) {
|
|
|
1164
1181
|
})
|
|
1165
1182
|
}
|
|
1166
1183
|
),
|
|
1167
|
-
/* @__PURE__ */ (0,
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1168
1185
|
CSEnumSelect,
|
|
1169
1186
|
{
|
|
1170
1187
|
fieldSpec: elements.selectCurrency,
|
|
@@ -1179,7 +1196,7 @@ function CSVPriceInputView(props) {
|
|
|
1179
1196
|
expandToViewport: props.expandToViewport
|
|
1180
1197
|
}
|
|
1181
1198
|
) }),
|
|
1182
|
-
/* @__PURE__ */ (0,
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { paddingTop: "30px", paddingLeft: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1183
1200
|
CSBox,
|
|
1184
1201
|
{
|
|
1185
1202
|
fieldSpec: elements.boxPriceDisplay,
|
|
@@ -1196,8 +1213,8 @@ function CSVPriceInputView(props) {
|
|
|
1196
1213
|
}
|
|
1197
1214
|
|
|
1198
1215
|
// src/views/CSVSearchFilterView.tsx
|
|
1199
|
-
var
|
|
1200
|
-
var
|
|
1216
|
+
var import_components23 = require("@cloudscape-design/components");
|
|
1217
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1201
1218
|
var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1202
1219
|
inputSearch: spec.addField(new FieldSpec("inputSearch")),
|
|
1203
1220
|
buttonSearch: spec.addField(new FieldSpec("buttonSearch"))
|
|
@@ -1205,8 +1222,8 @@ var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.n
|
|
|
1205
1222
|
function CSVSearchFilterView(props) {
|
|
1206
1223
|
const spec = props.viewSpec;
|
|
1207
1224
|
const { elements } = spec;
|
|
1208
|
-
return /* @__PURE__ */ (0,
|
|
1209
|
-
/* @__PURE__ */ (0,
|
|
1225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_components23.SpaceBetween, { size: "s", direction: "horizontal", children: [
|
|
1226
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { minWidth: "320px" }, children: props.inputSearch === void 0 || typeof props.inputSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1210
1227
|
CSInput,
|
|
1211
1228
|
{
|
|
1212
1229
|
fieldSpec: elements.inputSearch,
|
|
@@ -1218,7 +1235,7 @@ function CSVSearchFilterView(props) {
|
|
|
1218
1235
|
type: "search"
|
|
1219
1236
|
}
|
|
1220
1237
|
) : props.inputSearch }),
|
|
1221
|
-
props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ (0,
|
|
1238
|
+
props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1222
1239
|
CSButton,
|
|
1223
1240
|
{
|
|
1224
1241
|
fieldSpec: elements.buttonSearch,
|
|
@@ -1236,8 +1253,8 @@ function CSVSearchFilterView(props) {
|
|
|
1236
1253
|
}
|
|
1237
1254
|
|
|
1238
1255
|
// src/views/CSVTextPromptModalView.tsx
|
|
1239
|
-
var
|
|
1240
|
-
var
|
|
1256
|
+
var import_components24 = require("@cloudscape-design/components");
|
|
1257
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1241
1258
|
var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1242
1259
|
headerHeading: spec.addField(new FieldSpec("headerHeading")),
|
|
1243
1260
|
boxBodyText: spec.addField(new FieldSpec("boxBodyText")),
|
|
@@ -1247,7 +1264,7 @@ var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, pare
|
|
|
1247
1264
|
function CSVTextPromptModalView(props) {
|
|
1248
1265
|
const spec = props.viewSpec;
|
|
1249
1266
|
const { elements } = spec;
|
|
1250
|
-
const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ (0,
|
|
1267
|
+
const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1251
1268
|
CSButton,
|
|
1252
1269
|
{
|
|
1253
1270
|
fieldSpec: elements.buttonSecondary,
|
|
@@ -1256,14 +1273,14 @@ function CSVTextPromptModalView(props) {
|
|
|
1256
1273
|
onClick: props.onSecondaryAction,
|
|
1257
1274
|
children: props.buttonSecondary
|
|
1258
1275
|
}
|
|
1259
|
-
) : props.buttonSecondary : /* @__PURE__ */ (0,
|
|
1260
|
-
return /* @__PURE__ */ (0,
|
|
1261
|
-
|
|
1276
|
+
) : props.buttonSecondary : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, {});
|
|
1277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1278
|
+
import_components24.Modal,
|
|
1262
1279
|
{
|
|
1263
1280
|
"data-testid": props.viewSpec.getDataTestId(),
|
|
1264
1281
|
onDismiss: props.onDismiss,
|
|
1265
1282
|
visible: props.visible,
|
|
1266
|
-
header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ (0,
|
|
1283
|
+
header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1267
1284
|
CSHeader,
|
|
1268
1285
|
{
|
|
1269
1286
|
fieldSpec: elements.headerHeading,
|
|
@@ -1271,8 +1288,8 @@ function CSVTextPromptModalView(props) {
|
|
|
1271
1288
|
children: props.headerHeading
|
|
1272
1289
|
}
|
|
1273
1290
|
) : props.headerHeading,
|
|
1274
|
-
footer: /* @__PURE__ */ (0,
|
|
1275
|
-
props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ (0,
|
|
1291
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_components24.Box, { float: "right", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_components24.SpaceBetween, { direction: "horizontal", size: "l", children: [
|
|
1292
|
+
props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1276
1293
|
CSButton,
|
|
1277
1294
|
{
|
|
1278
1295
|
fieldSpec: elements.buttonPrimary,
|
|
@@ -1284,7 +1301,7 @@ function CSVTextPromptModalView(props) {
|
|
|
1284
1301
|
) : props.buttonPrimary,
|
|
1285
1302
|
secondaryAction
|
|
1286
1303
|
] }) }),
|
|
1287
|
-
children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */ (0,
|
|
1304
|
+
children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CSBox, { fieldSpec: elements.boxBodyText, localiser: props.localiser, children: props.boxBodyText }) : props.boxBodyText
|
|
1288
1305
|
}
|
|
1289
1306
|
);
|
|
1290
1307
|
}
|
|
@@ -1362,9 +1379,9 @@ var FieldProperties = class {
|
|
|
1362
1379
|
};
|
|
1363
1380
|
|
|
1364
1381
|
// src/utils/FixedWidth.tsx
|
|
1365
|
-
var
|
|
1382
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1366
1383
|
function FixedWidth(props) {
|
|
1367
|
-
return /* @__PURE__ */ (0,
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { minWidth: props.minWidth, maxWidth: props.maxWidth }, children: props.children });
|
|
1368
1385
|
}
|
|
1369
1386
|
|
|
1370
1387
|
// src/utils/LocalStorageService.ts
|
|
@@ -2061,6 +2078,7 @@ function useMessages(LOGGER3) {
|
|
|
2061
2078
|
CSBox,
|
|
2062
2079
|
CSButton,
|
|
2063
2080
|
CSCheckbox,
|
|
2081
|
+
CSCopyToClipboard,
|
|
2064
2082
|
CSDatePicker,
|
|
2065
2083
|
CSEnumMultiselect,
|
|
2066
2084
|
CSEnumSegmentedControl,
|
package/dist/index.mjs
CHANGED
|
@@ -594,6 +594,22 @@ function CSToggle(props) {
|
|
|
594
594
|
) });
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
+
// src/components/CSCopyToClipboard.tsx
|
|
598
|
+
import { CopyToClipboard } from "@cloudscape-design/components";
|
|
599
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
600
|
+
function CSCopyToClipboard(props) {
|
|
601
|
+
const { localisationObject, uniqueId } = FromPropsHelper.getBasicProps(props);
|
|
602
|
+
const { formProps } = ChildUtils.getChildren(props, localisationObject);
|
|
603
|
+
return /* @__PURE__ */ jsx24(CSFormField, { ...formProps, children: /* @__PURE__ */ jsx24(
|
|
604
|
+
CopyToClipboard,
|
|
605
|
+
{
|
|
606
|
+
"data-testid": uniqueId,
|
|
607
|
+
...props,
|
|
608
|
+
...localisationObject
|
|
609
|
+
}
|
|
610
|
+
) });
|
|
611
|
+
}
|
|
612
|
+
|
|
597
613
|
// src/views/CSVEnumRatingView.tsx
|
|
598
614
|
import { Rating } from "@smastrom/react-rating";
|
|
599
615
|
import { useEffect, useState } from "react";
|
|
@@ -751,7 +767,7 @@ var ViewElementSpec = class {
|
|
|
751
767
|
return this.keyHierarchy;
|
|
752
768
|
}
|
|
753
769
|
log(prefix) {
|
|
754
|
-
LOGGER.info(`${prefix === void 0 ? "" : prefix}
|
|
770
|
+
LOGGER.info(`${prefix === void 0 ? "" : prefix}<${this.getDataTestId()}> = ${this.getLocalisationKey()}`);
|
|
755
771
|
}
|
|
756
772
|
};
|
|
757
773
|
var FieldSpec = class _FieldSpec extends ViewElementSpec {
|
|
@@ -859,17 +875,17 @@ var ViewSpec = class _ViewSpec extends ViewElementSpec {
|
|
|
859
875
|
return this.viewValidator(this, value);
|
|
860
876
|
}
|
|
861
877
|
logViewSpec() {
|
|
862
|
-
this.log();
|
|
878
|
+
this.log("VIEW :::: ");
|
|
863
879
|
for (const element of Object.values(this.elements)) {
|
|
864
880
|
if (element instanceof ViewElementSpec) {
|
|
865
|
-
element.log("
|
|
881
|
+
element.log(" FIELD :::: ");
|
|
866
882
|
}
|
|
867
883
|
}
|
|
868
884
|
}
|
|
869
885
|
};
|
|
870
886
|
|
|
871
887
|
// src/views/CSVEnumRatingView.tsx
|
|
872
|
-
import { jsx as
|
|
888
|
+
import { jsx as jsx25, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
873
889
|
var CSV_ENUM_RATING_VIEW_SPEC = (parent, key, instanceId) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
874
890
|
rating: spec.addField(new FieldSpec("rating")),
|
|
875
891
|
boxRatingName: spec.addField(new FieldSpec("boxRatingName"))
|
|
@@ -897,7 +913,7 @@ function CSVEnumRatingView(props) {
|
|
|
897
913
|
setHoveredValue(props.selectedEnum);
|
|
898
914
|
}, [props.selectedEnum]);
|
|
899
915
|
return /* @__PURE__ */ jsxs2(CSFormField, { fieldSpec: elements.rating, localiser: props.localiser, children: [
|
|
900
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ jsx25(
|
|
901
917
|
Rating,
|
|
902
918
|
{
|
|
903
919
|
"data-testid": elements.rating.getDataTestId(),
|
|
@@ -910,7 +926,7 @@ function CSVEnumRatingView(props) {
|
|
|
910
926
|
invisibleItemLabels: valuesInOrder.slice(1).map((e) => getEnumRatingLabel(e, spec.instanceId))
|
|
911
927
|
}
|
|
912
928
|
),
|
|
913
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ jsx25("div", { style: { textAlign: "left", paddingLeft: "5px" }, children: /* @__PURE__ */ jsx25(
|
|
914
930
|
CSBox,
|
|
915
931
|
{
|
|
916
932
|
fieldSpec: elements.boxRatingName,
|
|
@@ -924,7 +940,7 @@ function CSVEnumRatingView(props) {
|
|
|
924
940
|
|
|
925
941
|
// src/views/CSVNoItemsView.tsx
|
|
926
942
|
import { Box as Box2, SpaceBetween } from "@cloudscape-design/components";
|
|
927
|
-
import { jsx as
|
|
943
|
+
import { jsx as jsx26, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
928
944
|
var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec) => ({
|
|
929
945
|
boxHeading: spec.addField(new FieldSpec("boxHeading")),
|
|
930
946
|
boxBody: spec.addField(new FieldSpec("boxBody"))
|
|
@@ -932,8 +948,8 @@ var CSV_NO_ITEMS_VIEW_SPEC = (ns) => ViewSpec.create("CSVNoItemsView", ns, (spec
|
|
|
932
948
|
function CSVNoItemsView(props) {
|
|
933
949
|
const spec = props.viewSpec;
|
|
934
950
|
const { elements } = spec;
|
|
935
|
-
return /* @__PURE__ */
|
|
936
|
-
/* @__PURE__ */
|
|
951
|
+
return /* @__PURE__ */ jsx26("div", { "data-testid": spec.getDataTestId(), children: /* @__PURE__ */ jsx26(Box2, { textAlign: "center", color: "inherit", children: /* @__PURE__ */ jsxs3(SpaceBetween, { size: "xxs", direction: "vertical", children: [
|
|
952
|
+
/* @__PURE__ */ jsx26(
|
|
937
953
|
CSBox,
|
|
938
954
|
{
|
|
939
955
|
fieldSpec: elements.boxHeading,
|
|
@@ -944,7 +960,7 @@ function CSVNoItemsView(props) {
|
|
|
944
960
|
children: props.headingText
|
|
945
961
|
}
|
|
946
962
|
),
|
|
947
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ jsx26(
|
|
948
964
|
CSBox,
|
|
949
965
|
{
|
|
950
966
|
fieldSpec: elements.boxBody,
|
|
@@ -1024,7 +1040,7 @@ _PriceUtils.parseFormattedPriceWithCurrency = (locale, formattedPrice, currencyS
|
|
|
1024
1040
|
var PriceUtils = _PriceUtils;
|
|
1025
1041
|
|
|
1026
1042
|
// src/views/CSVPriceInputView.tsx
|
|
1027
|
-
import { jsx as
|
|
1043
|
+
import { jsx as jsx27, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1028
1044
|
var CSV_PRICE_INPUT_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1029
1045
|
inputPrice: spec.addField(new FieldSpec("inputPrice", true, void 0, 0)),
|
|
1030
1046
|
selectCurrency: spec.addField(new FieldSpec("currency", true)),
|
|
@@ -1041,7 +1057,7 @@ function CSVPriceInputView(props) {
|
|
|
1041
1057
|
gridDefinition: [{ colspan: 4 }, { colspan: { default: 4, xxs: 3 } }, { colspan: { default: 4, xxs: 5 } }],
|
|
1042
1058
|
disableGutters: true,
|
|
1043
1059
|
children: [
|
|
1044
|
-
/* @__PURE__ */
|
|
1060
|
+
/* @__PURE__ */ jsx27(
|
|
1045
1061
|
CSNumericInput,
|
|
1046
1062
|
{
|
|
1047
1063
|
fieldSpec: elements.inputPrice,
|
|
@@ -1055,7 +1071,7 @@ function CSVPriceInputView(props) {
|
|
|
1055
1071
|
})
|
|
1056
1072
|
}
|
|
1057
1073
|
),
|
|
1058
|
-
/* @__PURE__ */
|
|
1074
|
+
/* @__PURE__ */ jsx27("div", { style: { paddingLeft: "8px" }, children: /* @__PURE__ */ jsx27(
|
|
1059
1075
|
CSEnumSelect,
|
|
1060
1076
|
{
|
|
1061
1077
|
fieldSpec: elements.selectCurrency,
|
|
@@ -1070,7 +1086,7 @@ function CSVPriceInputView(props) {
|
|
|
1070
1086
|
expandToViewport: props.expandToViewport
|
|
1071
1087
|
}
|
|
1072
1088
|
) }),
|
|
1073
|
-
/* @__PURE__ */
|
|
1089
|
+
/* @__PURE__ */ jsx27("div", { style: { paddingTop: "30px", paddingLeft: "8px" }, children: /* @__PURE__ */ jsx27(
|
|
1074
1090
|
CSBox,
|
|
1075
1091
|
{
|
|
1076
1092
|
fieldSpec: elements.boxPriceDisplay,
|
|
@@ -1088,7 +1104,7 @@ function CSVPriceInputView(props) {
|
|
|
1088
1104
|
|
|
1089
1105
|
// src/views/CSVSearchFilterView.tsx
|
|
1090
1106
|
import { SpaceBetween as SpaceBetween2 } from "@cloudscape-design/components";
|
|
1091
|
-
import { jsx as
|
|
1107
|
+
import { jsx as jsx28, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1092
1108
|
var CSV_SEARCH_FILTER_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1093
1109
|
inputSearch: spec.addField(new FieldSpec("inputSearch")),
|
|
1094
1110
|
buttonSearch: spec.addField(new FieldSpec("buttonSearch"))
|
|
@@ -1097,7 +1113,7 @@ function CSVSearchFilterView(props) {
|
|
|
1097
1113
|
const spec = props.viewSpec;
|
|
1098
1114
|
const { elements } = spec;
|
|
1099
1115
|
return /* @__PURE__ */ jsxs5(SpaceBetween2, { size: "s", direction: "horizontal", children: [
|
|
1100
|
-
/* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ jsx28("div", { style: { minWidth: "320px" }, children: props.inputSearch === void 0 || typeof props.inputSearch === "string" ? /* @__PURE__ */ jsx28(
|
|
1101
1117
|
CSInput,
|
|
1102
1118
|
{
|
|
1103
1119
|
fieldSpec: elements.inputSearch,
|
|
@@ -1109,7 +1125,7 @@ function CSVSearchFilterView(props) {
|
|
|
1109
1125
|
type: "search"
|
|
1110
1126
|
}
|
|
1111
1127
|
) : props.inputSearch }),
|
|
1112
|
-
props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */
|
|
1128
|
+
props.buttonSearch === void 0 || typeof props.buttonSearch === "string" ? /* @__PURE__ */ jsx28(
|
|
1113
1129
|
CSButton,
|
|
1114
1130
|
{
|
|
1115
1131
|
fieldSpec: elements.buttonSearch,
|
|
@@ -1128,7 +1144,7 @@ function CSVSearchFilterView(props) {
|
|
|
1128
1144
|
|
|
1129
1145
|
// src/views/CSVTextPromptModalView.tsx
|
|
1130
1146
|
import { Box as Box3, Modal, SpaceBetween as SpaceBetween3 } from "@cloudscape-design/components";
|
|
1131
|
-
import { Fragment, jsx as
|
|
1147
|
+
import { Fragment, jsx as jsx29, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1132
1148
|
var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, parent.ns, (spec) => ({
|
|
1133
1149
|
headerHeading: spec.addField(new FieldSpec("headerHeading")),
|
|
1134
1150
|
boxBodyText: spec.addField(new FieldSpec("boxBodyText")),
|
|
@@ -1138,7 +1154,7 @@ var CSV_TEXT_PROMPT_MODAL_VIEW_SPEC = (parent, key) => ViewSpec.create(key, pare
|
|
|
1138
1154
|
function CSVTextPromptModalView(props) {
|
|
1139
1155
|
const spec = props.viewSpec;
|
|
1140
1156
|
const { elements } = spec;
|
|
1141
|
-
const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */
|
|
1157
|
+
const secondaryAction = props.onSecondaryAction ? props.buttonSecondary === void 0 || typeof props.buttonSecondary === "string" ? /* @__PURE__ */ jsx29(
|
|
1142
1158
|
CSButton,
|
|
1143
1159
|
{
|
|
1144
1160
|
fieldSpec: elements.buttonSecondary,
|
|
@@ -1147,14 +1163,14 @@ function CSVTextPromptModalView(props) {
|
|
|
1147
1163
|
onClick: props.onSecondaryAction,
|
|
1148
1164
|
children: props.buttonSecondary
|
|
1149
1165
|
}
|
|
1150
|
-
) : props.buttonSecondary : /* @__PURE__ */
|
|
1151
|
-
return /* @__PURE__ */
|
|
1166
|
+
) : props.buttonSecondary : /* @__PURE__ */ jsx29(Fragment, {});
|
|
1167
|
+
return /* @__PURE__ */ jsx29(
|
|
1152
1168
|
Modal,
|
|
1153
1169
|
{
|
|
1154
1170
|
"data-testid": props.viewSpec.getDataTestId(),
|
|
1155
1171
|
onDismiss: props.onDismiss,
|
|
1156
1172
|
visible: props.visible,
|
|
1157
|
-
header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */
|
|
1173
|
+
header: props.headerHeading === void 0 || typeof props.headerHeading === "string" ? /* @__PURE__ */ jsx29(
|
|
1158
1174
|
CSHeader,
|
|
1159
1175
|
{
|
|
1160
1176
|
fieldSpec: elements.headerHeading,
|
|
@@ -1162,8 +1178,8 @@ function CSVTextPromptModalView(props) {
|
|
|
1162
1178
|
children: props.headerHeading
|
|
1163
1179
|
}
|
|
1164
1180
|
) : props.headerHeading,
|
|
1165
|
-
footer: /* @__PURE__ */
|
|
1166
|
-
props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */
|
|
1181
|
+
footer: /* @__PURE__ */ jsx29(Box3, { float: "right", children: /* @__PURE__ */ jsxs6(SpaceBetween3, { direction: "horizontal", size: "l", children: [
|
|
1182
|
+
props.buttonPrimary === void 0 || typeof props.buttonPrimary === "string" ? /* @__PURE__ */ jsx29(
|
|
1167
1183
|
CSButton,
|
|
1168
1184
|
{
|
|
1169
1185
|
fieldSpec: elements.buttonPrimary,
|
|
@@ -1175,7 +1191,7 @@ function CSVTextPromptModalView(props) {
|
|
|
1175
1191
|
) : props.buttonPrimary,
|
|
1176
1192
|
secondaryAction
|
|
1177
1193
|
] }) }),
|
|
1178
|
-
children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */
|
|
1194
|
+
children: props.boxBodyText === void 0 || typeof props.boxBodyText === "string" ? /* @__PURE__ */ jsx29(CSBox, { fieldSpec: elements.boxBodyText, localiser: props.localiser, children: props.boxBodyText }) : props.boxBodyText
|
|
1179
1195
|
}
|
|
1180
1196
|
);
|
|
1181
1197
|
}
|
|
@@ -1253,9 +1269,9 @@ var FieldProperties = class {
|
|
|
1253
1269
|
};
|
|
1254
1270
|
|
|
1255
1271
|
// src/utils/FixedWidth.tsx
|
|
1256
|
-
import { jsx as
|
|
1272
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1257
1273
|
function FixedWidth(props) {
|
|
1258
|
-
return /* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ jsx30("div", { style: { minWidth: props.minWidth, maxWidth: props.maxWidth }, children: props.children });
|
|
1259
1275
|
}
|
|
1260
1276
|
|
|
1261
1277
|
// src/utils/LocalStorageService.ts
|
|
@@ -1951,6 +1967,7 @@ export {
|
|
|
1951
1967
|
CSBox,
|
|
1952
1968
|
CSButton,
|
|
1953
1969
|
CSCheckbox,
|
|
1970
|
+
CSCopyToClipboard,
|
|
1954
1971
|
CSDatePicker,
|
|
1955
1972
|
CSEnumMultiselect,
|
|
1956
1973
|
CSEnumSegmentedControl,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebertjendustries/cswrapper",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"main": "dist/index.cjs",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"ts-node": "^10.9.2",
|
|
54
54
|
"tsup": "^8.5.0",
|
|
55
55
|
"typescript": "^5.8.3",
|
|
56
|
+
"vite": "5.1.6",
|
|
56
57
|
"vitest": "^3.1.4"
|
|
57
58
|
},
|
|
58
59
|
"scripts": {
|