@cloudscape-design/components 3.0.310 → 3.0.312
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/button/internal.d.ts +6 -0
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +6 -8
- package/button/internal.js.map +1 -1
- package/code-editor/resizable-box/styles.css.js +3 -3
- package/code-editor/resizable-box/styles.scoped.css +10 -8
- package/code-editor/resizable-box/styles.selectors.js +3 -3
- package/code-editor/styles.css.js +32 -32
- package/code-editor/styles.scoped.css +189 -157
- package/code-editor/styles.selectors.js +32 -32
- package/collection-preferences/content-display/index.js +1 -1
- package/collection-preferences/content-display/index.js.map +1 -1
- package/container/interfaces.d.ts +50 -0
- package/container/interfaces.d.ts.map +1 -1
- package/container/interfaces.js.map +1 -1
- package/container/internal.d.ts +1 -1
- package/container/internal.d.ts.map +1 -1
- package/container/internal.js +24 -18
- package/container/internal.js.map +1 -1
- package/container/styles.css.js +28 -18
- package/container/styles.scoped.css +93 -36
- package/container/styles.selectors.js +28 -18
- package/date-range-picker/calendar/header/index.d.ts.map +1 -1
- package/date-range-picker/calendar/header/index.js +4 -2
- package/date-range-picker/calendar/header/index.js.map +1 -1
- package/date-range-picker/calendar/index.js +1 -1
- package/date-range-picker/calendar/index.js.map +1 -1
- package/expandable-section/expandable-section-header.d.ts +2 -1
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +6 -16
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js +3 -2
- package/expandable-section/internal.js.map +1 -1
- package/form/index.d.ts.map +1 -1
- package/form/index.js +14 -1
- package/form/index.js.map +1 -1
- package/form/internal.d.ts.map +1 -1
- package/form/internal.js +3 -4
- package/form/internal.js.map +1 -1
- package/form-field/internal.js +2 -3
- package/form-field/internal.js.map +1 -1
- package/help-panel/styles.css.js +4 -4
- package/help-panel/styles.scoped.css +135 -95
- package/help-panel/styles.selectors.js +4 -4
- package/i18n/context.d.ts +14 -7
- package/i18n/context.d.ts.map +1 -1
- package/i18n/context.js.map +1 -1
- package/i18n/messages/all.all.js +3692 -538
- package/i18n/messages/all.all.json +3756 -577
- package/i18n/messages/all.de.js +317 -22
- package/i18n/messages/all.de.json +324 -27
- package/i18n/messages/all.en-GB.js +306 -21
- package/i18n/messages/all.en-GB.json +309 -24
- package/i18n/messages/all.en.js +11 -11
- package/i18n/messages/all.en.json +11 -11
- package/i18n/messages/all.es.js +311 -22
- package/i18n/messages/all.es.json +318 -25
- package/i18n/messages/all.fr.js +335 -27
- package/i18n/messages/all.fr.json +343 -30
- package/i18n/messages/all.id.js +319 -28
- package/i18n/messages/all.id.json +322 -31
- package/i18n/messages/all.it.js +320 -27
- package/i18n/messages/all.it.json +326 -30
- package/i18n/messages/all.ja.js +312 -28
- package/i18n/messages/all.ja.json +315 -30
- package/i18n/messages/all.ko.js +304 -24
- package/i18n/messages/all.ko.json +312 -25
- package/i18n/messages/all.pt-BR.js +313 -28
- package/i18n/messages/all.pt-BR.json +325 -31
- package/i18n/messages/all.zh-CN.js +301 -29
- package/i18n/messages/all.zh-CN.json +300 -31
- package/i18n/messages/all.zh-TW.js +295 -23
- package/i18n/messages/all.zh-TW.json +294 -25
- package/i18n/messages-types.d.ts +435 -0
- package/i18n/messages-types.d.ts.map +1 -0
- package/i18n/messages-types.js +5 -0
- package/i18n/messages-types.js.map +1 -0
- package/i18n/provider.d.ts.map +1 -1
- package/i18n/provider.js +2 -0
- package/i18n/provider.js.map +1 -1
- package/internal/analytics/components/analytics-funnel.d.ts +2 -1
- package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/internal/analytics/components/analytics-funnel.js +6 -4
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/context/analytics-context.d.ts +2 -0
- package/internal/analytics/context/analytics-context.d.ts.map +1 -1
- package/internal/analytics/context/analytics-context.js +2 -0
- package/internal/analytics/context/analytics-context.js.map +1 -1
- package/internal/analytics/hooks/use-funnel.d.ts +3 -7
- package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
- package/internal/analytics/hooks/use-funnel.js +2 -7
- package/internal/analytics/hooks/use-funnel.js.map +1 -1
- package/internal/base-component/styles.scoped.css +382 -379
- package/internal/components/cartesian-chart/bottom-labels.js +1 -1
- package/internal/components/cartesian-chart/bottom-labels.js.map +1 -1
- package/internal/components/cartesian-chart/left-labels.js +1 -1
- package/internal/components/cartesian-chart/left-labels.js.map +1 -1
- package/internal/components/focus-lock/index.js +20 -19
- package/internal/components/focus-lock/index.js.map +1 -1
- package/internal/context/button-context.d.ts +10 -0
- package/internal/context/button-context.d.ts.map +1 -0
- package/internal/context/button-context.js +10 -0
- package/internal/context/button-context.js.map +1 -0
- package/internal/environment.js +1 -1
- package/internal/generated/theming/index.cjs +2 -1
- package/internal/generated/theming/index.js +2 -1
- package/internal/hooks/use-visual-mode/index.d.ts.map +1 -1
- package/internal/hooks/use-visual-mode/index.js +3 -0
- package/internal/hooks/use-visual-mode/index.js.map +1 -1
- package/internal/i18n/messages/all.all.js +3692 -538
- package/internal/i18n/messages/all.all.json +3756 -577
- package/internal/i18n/messages/all.de.js +317 -22
- package/internal/i18n/messages/all.de.json +324 -27
- package/internal/i18n/messages/all.en-GB.js +306 -21
- package/internal/i18n/messages/all.en-GB.json +309 -24
- package/internal/i18n/messages/all.en.js +11 -11
- package/internal/i18n/messages/all.en.json +11 -11
- package/internal/i18n/messages/all.es.js +311 -22
- package/internal/i18n/messages/all.es.json +318 -25
- package/internal/i18n/messages/all.fr.js +335 -27
- package/internal/i18n/messages/all.fr.json +343 -30
- package/internal/i18n/messages/all.id.js +319 -28
- package/internal/i18n/messages/all.id.json +322 -31
- package/internal/i18n/messages/all.it.js +320 -27
- package/internal/i18n/messages/all.it.json +326 -30
- package/internal/i18n/messages/all.ja.js +312 -28
- package/internal/i18n/messages/all.ja.json +315 -30
- package/internal/i18n/messages/all.ko.js +304 -24
- package/internal/i18n/messages/all.ko.json +312 -25
- package/internal/i18n/messages/all.pt-BR.js +313 -28
- package/internal/i18n/messages/all.pt-BR.json +325 -31
- package/internal/i18n/messages/all.zh-CN.js +301 -29
- package/internal/i18n/messages/all.zh-CN.json +300 -31
- package/internal/i18n/messages/all.zh-TW.js +295 -23
- package/internal/i18n/messages/all.zh-TW.json +294 -25
- package/internal/manifest.json +1 -1
- package/package.json +1 -2
- package/pagination/internal.d.ts.map +1 -1
- package/pagination/internal.js +4 -4
- package/pagination/internal.js.map +1 -1
- package/pie-chart/utils.d.ts +1 -1
- package/pie-chart/utils.d.ts.map +1 -1
- package/pie-chart/utils.js.map +1 -1
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +1 -1
- package/property-filter/index.js.map +1 -1
- package/s3-resource-selector/interfaces.d.ts +3 -0
- package/s3-resource-selector/interfaces.d.ts.map +1 -1
- package/s3-resource-selector/interfaces.js.map +1 -1
- package/s3-resource-selector/s3-in-context/index.js +1 -1
- package/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/s3-resource-selector/s3-in-context/validation.d.ts +1 -1
- package/s3-resource-selector/s3-in-context/validation.d.ts.map +1 -1
- package/s3-resource-selector/s3-in-context/validation.js.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.d.ts +3 -1
- package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.js +2 -1
- package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/index.js +1 -1
- package/s3-resource-selector/s3-modal/index.js.map +1 -1
- package/s3-resource-selector/s3-modal/table-utils.d.ts +1 -1
- package/s3-resource-selector/s3-modal/table-utils.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/table-utils.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/space-between/interfaces.d.ts +5 -0
- package/space-between/interfaces.d.ts.map +1 -1
- package/space-between/interfaces.js.map +1 -1
- package/space-between/internal.d.ts +1 -1
- package/space-between/internal.d.ts.map +1 -1
- package/space-between/internal.js +2 -2
- package/space-between/internal.js.map +1 -1
- package/space-between/styles.css.js +21 -20
- package/space-between/styles.scoped.css +25 -21
- package/space-between/styles.selectors.js +21 -20
- package/tag-editor/interfaces.d.ts +1 -0
- package/tag-editor/interfaces.d.ts.map +1 -1
- package/tag-editor/interfaces.js.map +1 -1
- package/tag-editor/validation.d.ts +1 -1
- package/tag-editor/validation.d.ts.map +1 -1
- package/tag-editor/validation.js.map +1 -1
- package/test-utils/dom/container/index.d.ts +1 -0
- package/test-utils/dom/container/index.js +3 -0
- package/test-utils/dom/container/index.js.map +1 -1
- package/test-utils/dom/expandable-section/index.js +1 -1
- package/test-utils/dom/expandable-section/index.js.map +1 -1
- package/test-utils/selectors/container/index.d.ts +1 -0
- package/test-utils/selectors/container/index.js +3 -0
- package/test-utils/selectors/container/index.js.map +1 -1
- package/test-utils/selectors/expandable-section/index.js +1 -1
- package/test-utils/selectors/expandable-section/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +65 -64
- package/text-content/styles.selectors.js +1 -1
- package/top-navigation/parts/overflow-menu/views/submenu.js +2 -2
- package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
- package/top-navigation/parts/overflow-menu/views/utilities.js +2 -2
- package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
- package/wizard/internal.d.ts.map +1 -1
- package/wizard/internal.js +4 -2
- package/wizard/internal.js.map +1 -1
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +1 -2
- package/wizard/wizard-form.js.map +1 -1
package/select/parts/filter.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export interface FilterProps extends InternalInputProps {
|
|
|
5
5
|
ref?: React.Ref<HTMLInputElement>;
|
|
6
6
|
filteringType: SelectProps.FilteringType;
|
|
7
7
|
}
|
|
8
|
-
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "disabled" | "autoComplete" | "autoFocus" | "name" | "className" | "id" | "placeholder" | "inputMode" | "type" | "readOnly" | "step" | "value" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "invalid" | "__internalRootRef" | "ariaLabel" | "ariaDescribedby" | "__nativeAttributes" | "ariaLabelledby" | "controlId" | "filteringType" | "ariaRequired" | "disableBrowserAutocorrect" | "spellcheck" | "
|
|
8
|
+
declare const Filter: React.ForwardRefExoticComponent<Pick<FilterProps, "disabled" | "autoComplete" | "autoFocus" | "name" | "className" | "id" | "placeholder" | "inputMode" | "type" | "readOnly" | "step" | "value" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "invalid" | "__internalRootRef" | "ariaLabel" | "ariaDescribedby" | "__nativeAttributes" | "clearAriaLabel" | "ariaLabelledby" | "controlId" | "filteringType" | "ariaRequired" | "disableBrowserAutocorrect" | "spellcheck" | "__leftIcon" | "__leftIconVariant" | "__onLeftIconClick" | "__rightIcon" | "__onRightIconClick" | "__noBorderRadius" | "__onDelayedInput" | "__onBlurWithDetail" | "__inheritFormFieldProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
9
9
|
export default Filter;
|
|
10
10
|
//# sourceMappingURL=filter.d.ts.map
|
|
@@ -13,9 +13,14 @@ export interface SpaceBetweenProps extends BaseComponentProps {
|
|
|
13
13
|
* Content of this component.
|
|
14
14
|
*/
|
|
15
15
|
children?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Determines how the child elements will be aligned based on the [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) property of the CSS Flexbox.
|
|
18
|
+
*/
|
|
19
|
+
alignItems?: SpaceBetweenProps.AlignItems;
|
|
16
20
|
}
|
|
17
21
|
export declare namespace SpaceBetweenProps {
|
|
18
22
|
type Direction = 'vertical' | 'horizontal';
|
|
19
23
|
type Size = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
24
|
+
type AlignItems = 'center';
|
|
20
25
|
}
|
|
21
26
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["space-between/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D;;OAEG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC;IAExC;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["space-between/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D;;OAEG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC;IAExC;;OAEG;IACH,IAAI,EAAE,iBAAiB,CAAC,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC;CAC3C;AAED,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;IAElD,KAAY,IAAI,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAE1E,KAAY,UAAU,GAAG,QAAQ,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["space-between/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SpaceBetweenProps extends BaseComponentProps {\n /**\n * Defines the direction in which the content is laid out.\n */\n direction?: SpaceBetweenProps.Direction;\n\n /**\n * Defines the spacing between the individual items of the content.\n */\n size: SpaceBetweenProps.Size;\n\n /**\n * Content of this component.\n */\n children?: React.ReactNode;\n}\n\nexport namespace SpaceBetweenProps {\n export type Direction = 'vertical' | 'horizontal';\n\n export type Size = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["space-between/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\n\nexport interface SpaceBetweenProps extends BaseComponentProps {\n /**\n * Defines the direction in which the content is laid out.\n */\n direction?: SpaceBetweenProps.Direction;\n\n /**\n * Defines the spacing between the individual items of the content.\n */\n size: SpaceBetweenProps.Size;\n\n /**\n * Content of this component.\n */\n children?: React.ReactNode;\n\n /**\n * Determines how the child elements will be aligned based on the [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) property of the CSS Flexbox.\n */\n alignItems?: SpaceBetweenProps.AlignItems;\n}\n\nexport namespace SpaceBetweenProps {\n export type Direction = 'vertical' | 'horizontal';\n\n export type Size = 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\n\n export type AlignItems = 'center';\n}\n"]}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { SpaceBetweenProps } from './interfaces';
|
|
3
3
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
4
4
|
type InternalSpaceBetweenProps = SpaceBetweenProps & InternalBaseComponentProps;
|
|
5
|
-
export default function InternalSpaceBetween({ direction, size, children, __internalRootRef, ...props }: InternalSpaceBetweenProps): JSX.Element;
|
|
5
|
+
export default function InternalSpaceBetween({ direction, size, children, alignItems, __internalRootRef, ...props }: InternalSpaceBetweenProps): JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["space-between/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,KAAK,yBAAyB,GAAG,iBAAiB,GAAG,0BAA0B,CAAC;AAEhF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,SAAsB,EACtB,IAAI,EACJ,QAAQ,EACR,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["space-between/internal.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,KAAK,yBAAyB,GAAG,iBAAiB,GAAG,0BAA0B,CAAC;AAEhF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,SAAsB,EACtB,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,yBAAyB,eA+B3B"}
|
|
@@ -7,13 +7,13 @@ import { getBaseProps } from '../internal/base-component';
|
|
|
7
7
|
import styles from './styles.css.js';
|
|
8
8
|
import flattenChildren from 'react-keyed-flatten-children';
|
|
9
9
|
export default function InternalSpaceBetween(_a) {
|
|
10
|
-
var { direction = 'vertical', size, children, __internalRootRef } = _a, props = __rest(_a, ["direction", "size", "children", "__internalRootRef"]);
|
|
10
|
+
var { direction = 'vertical', size, children, alignItems, __internalRootRef } = _a, props = __rest(_a, ["direction", "size", "children", "alignItems", "__internalRootRef"]);
|
|
11
11
|
const baseProps = getBaseProps(props);
|
|
12
12
|
/*
|
|
13
13
|
Flattening the children allows us to "see through" React Fragments and nested arrays.
|
|
14
14
|
*/
|
|
15
15
|
const flattenedChildren = flattenChildren(children);
|
|
16
|
-
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles[direction], styles[`${direction}-${size}`]), ref: __internalRootRef }), flattenedChildren.map(child => {
|
|
16
|
+
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles.root, styles[direction], styles[`${direction}-${size}`], alignItems && styles[`align-${alignItems}`]), ref: __internalRootRef }), flattenedChildren.map(child => {
|
|
17
17
|
const key = typeof child === 'object' ? child.key : undefined;
|
|
18
18
|
return (React.createElement("div", { key: key, className: styles.child }, child));
|
|
19
19
|
})));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["space-between/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAM3D,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["space-between/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAM3D,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAOjB;QAPiB,EAC3C,SAAS,GAAG,UAAU,EACtB,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,iBAAiB,OAES,EADvB,KAAK,cANmC,oEAO5C,CADS;IAER,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IAEtC;;OAEG;IACH,MAAM,iBAAiB,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;IAEpD,OAAO,CACL,6CACM,SAAS,IACb,SAAS,EAAE,IAAI,CACb,SAAS,CAAC,SAAS,EACnB,MAAM,CAAC,IAAI,EACX,MAAM,CAAC,SAAS,CAAC,EACjB,MAAM,CAAC,GAAG,SAAS,IAAI,IAAI,EAAE,CAAC,EAC9B,UAAU,IAAI,MAAM,CAAC,SAAS,UAAU,EAAE,CAAC,CAC5C,EACD,GAAG,EAAE,iBAAiB,KAErB,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAC7B,MAAM,GAAG,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9D,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,KAAK,IACnC,KAAK,CACF,CACP,CAAC;IACJ,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport styles from './styles.css.js';\nimport flattenChildren from 'react-keyed-flatten-children';\nimport { SpaceBetweenProps } from './interfaces';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\ntype InternalSpaceBetweenProps = SpaceBetweenProps & InternalBaseComponentProps;\n\nexport default function InternalSpaceBetween({\n direction = 'vertical',\n size,\n children,\n alignItems,\n __internalRootRef,\n ...props\n}: InternalSpaceBetweenProps) {\n const baseProps = getBaseProps(props);\n\n /*\n Flattening the children allows us to \"see through\" React Fragments and nested arrays.\n */\n const flattenedChildren = flattenChildren(children);\n\n return (\n <div\n {...baseProps}\n className={clsx(\n baseProps.className,\n styles.root,\n styles[direction],\n styles[`${direction}-${size}`],\n alignItems && styles[`align-${alignItems}`]\n )}\n ref={__internalRootRef}\n >\n {flattenedChildren.map(child => {\n const key = typeof child === 'object' ? child.key : undefined;\n\n return (\n <div key={key} className={styles.child}>\n {child}\n </div>\n );\n })}\n </div>\n );\n}\n"]}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"child": "
|
|
6
|
-
"horizontal": "
|
|
7
|
-
"horizontal-xxxs": "awsui_horizontal-
|
|
8
|
-
"horizontal-xxs": "awsui_horizontal-
|
|
9
|
-
"horizontal-xs": "awsui_horizontal-
|
|
10
|
-
"horizontal-s": "awsui_horizontal-
|
|
11
|
-
"horizontal-m": "awsui_horizontal-
|
|
12
|
-
"horizontal-l": "awsui_horizontal-
|
|
13
|
-
"horizontal-xl": "awsui_horizontal-
|
|
14
|
-
"horizontal-xxl": "awsui_horizontal-
|
|
15
|
-
"vertical": "
|
|
16
|
-
"vertical-xxxs": "awsui_vertical-
|
|
17
|
-
"vertical-xxs": "awsui_vertical-
|
|
18
|
-
"vertical-xs": "awsui_vertical-
|
|
19
|
-
"vertical-s": "awsui_vertical-
|
|
20
|
-
"vertical-m": "awsui_vertical-
|
|
21
|
-
"vertical-l": "awsui_vertical-
|
|
22
|
-
"vertical-xl": "awsui_vertical-
|
|
23
|
-
"vertical-xxl": "awsui_vertical-
|
|
4
|
+
"root": "awsui_root_18582_18i5a_93",
|
|
5
|
+
"child": "awsui_child_18582_18i5a_97",
|
|
6
|
+
"horizontal": "awsui_horizontal_18582_18i5a_108",
|
|
7
|
+
"horizontal-xxxs": "awsui_horizontal-xxxs_18582_18i5a_112",
|
|
8
|
+
"horizontal-xxs": "awsui_horizontal-xxs_18582_18i5a_115",
|
|
9
|
+
"horizontal-xs": "awsui_horizontal-xs_18582_18i5a_118",
|
|
10
|
+
"horizontal-s": "awsui_horizontal-s_18582_18i5a_121",
|
|
11
|
+
"horizontal-m": "awsui_horizontal-m_18582_18i5a_124",
|
|
12
|
+
"horizontal-l": "awsui_horizontal-l_18582_18i5a_127",
|
|
13
|
+
"horizontal-xl": "awsui_horizontal-xl_18582_18i5a_130",
|
|
14
|
+
"horizontal-xxl": "awsui_horizontal-xxl_18582_18i5a_133",
|
|
15
|
+
"vertical": "awsui_vertical_18582_18i5a_140",
|
|
16
|
+
"vertical-xxxs": "awsui_vertical-xxxs_18582_18i5a_143",
|
|
17
|
+
"vertical-xxs": "awsui_vertical-xxs_18582_18i5a_146",
|
|
18
|
+
"vertical-xs": "awsui_vertical-xs_18582_18i5a_149",
|
|
19
|
+
"vertical-s": "awsui_vertical-s_18582_18i5a_152",
|
|
20
|
+
"vertical-m": "awsui_vertical-m_18582_18i5a_155",
|
|
21
|
+
"vertical-l": "awsui_vertical-l_18582_18i5a_158",
|
|
22
|
+
"vertical-xl": "awsui_vertical-xl_18582_18i5a_161",
|
|
23
|
+
"vertical-xxl": "awsui_vertical-xxl_18582_18i5a_164",
|
|
24
|
+
"align-center": "awsui_align-center_18582_18i5a_168"
|
|
24
25
|
};
|
|
25
26
|
|
|
@@ -90,77 +90,81 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.
|
|
93
|
+
.awsui_root_18582_18i5a_93:not(#\9) {
|
|
94
94
|
display: flex;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.
|
|
97
|
+
.awsui_child_18582_18i5a_97:not(#\9) {
|
|
98
98
|
/* used in test-utils */
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.
|
|
101
|
+
.awsui_child_18582_18i5a_97:not(#\9):empty {
|
|
102
102
|
display: none;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/*
|
|
106
106
|
* Horizontal variant
|
|
107
107
|
*/
|
|
108
|
-
.
|
|
108
|
+
.awsui_horizontal_18582_18i5a_108:not(#\9) {
|
|
109
109
|
flex-direction: row;
|
|
110
110
|
flex-wrap: wrap;
|
|
111
111
|
}
|
|
112
|
-
.awsui_horizontal-
|
|
112
|
+
.awsui_horizontal-xxxs_18582_18i5a_112:not(#\9) {
|
|
113
113
|
gap: var(--space-xxxs-j6dpcy, 2px);
|
|
114
114
|
}
|
|
115
|
-
.awsui_horizontal-
|
|
115
|
+
.awsui_horizontal-xxs_18582_18i5a_115:not(#\9) {
|
|
116
116
|
gap: var(--space-xxs-ja5cp8, 4px);
|
|
117
117
|
}
|
|
118
|
-
.awsui_horizontal-
|
|
118
|
+
.awsui_horizontal-xs_18582_18i5a_118:not(#\9) {
|
|
119
119
|
gap: var(--space-xs-edba2s, 8px);
|
|
120
120
|
}
|
|
121
|
-
.awsui_horizontal-
|
|
121
|
+
.awsui_horizontal-s_18582_18i5a_121:not(#\9) {
|
|
122
122
|
gap: var(--space-s-hdd878, 12px);
|
|
123
123
|
}
|
|
124
|
-
.awsui_horizontal-
|
|
124
|
+
.awsui_horizontal-m_18582_18i5a_124:not(#\9) {
|
|
125
125
|
gap: var(--space-m-h2th94, 16px);
|
|
126
126
|
}
|
|
127
|
-
.awsui_horizontal-
|
|
127
|
+
.awsui_horizontal-l_18582_18i5a_127:not(#\9) {
|
|
128
128
|
gap: var(--space-l-f4l5gr, 20px);
|
|
129
129
|
}
|
|
130
|
-
.awsui_horizontal-
|
|
130
|
+
.awsui_horizontal-xl_18582_18i5a_130:not(#\9) {
|
|
131
131
|
gap: var(--space-xl-gsucfg, 24px);
|
|
132
132
|
}
|
|
133
|
-
.awsui_horizontal-
|
|
133
|
+
.awsui_horizontal-xxl_18582_18i5a_133:not(#\9) {
|
|
134
134
|
gap: var(--space-xxl-sgg5p8, 32px);
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/*
|
|
138
138
|
* Vertical variant
|
|
139
139
|
*/
|
|
140
|
-
.
|
|
140
|
+
.awsui_vertical_18582_18i5a_140:not(#\9) {
|
|
141
141
|
flex-direction: column;
|
|
142
142
|
}
|
|
143
|
-
.awsui_vertical-
|
|
143
|
+
.awsui_vertical-xxxs_18582_18i5a_143:not(#\9) {
|
|
144
144
|
row-gap: var(--space-xxxs-j6dpcy, 2px);
|
|
145
145
|
}
|
|
146
|
-
.awsui_vertical-
|
|
146
|
+
.awsui_vertical-xxs_18582_18i5a_146:not(#\9) {
|
|
147
147
|
row-gap: var(--space-xxs-ja5cp8, 4px);
|
|
148
148
|
}
|
|
149
|
-
.awsui_vertical-
|
|
149
|
+
.awsui_vertical-xs_18582_18i5a_149:not(#\9) {
|
|
150
150
|
row-gap: var(--space-xs-edba2s, 8px);
|
|
151
151
|
}
|
|
152
|
-
.awsui_vertical-
|
|
152
|
+
.awsui_vertical-s_18582_18i5a_152:not(#\9) {
|
|
153
153
|
row-gap: var(--space-scaled-s-913kwi, 12px);
|
|
154
154
|
}
|
|
155
|
-
.awsui_vertical-
|
|
155
|
+
.awsui_vertical-m_18582_18i5a_155:not(#\9) {
|
|
156
156
|
row-gap: var(--space-scaled-m-gxhdpl, 16px);
|
|
157
157
|
}
|
|
158
|
-
.awsui_vertical-
|
|
158
|
+
.awsui_vertical-l_18582_18i5a_158:not(#\9) {
|
|
159
159
|
row-gap: var(--space-scaled-l-2rs0gk, 20px);
|
|
160
160
|
}
|
|
161
|
-
.awsui_vertical-
|
|
161
|
+
.awsui_vertical-xl_18582_18i5a_161:not(#\9) {
|
|
162
162
|
row-gap: var(--space-scaled-xl-jawob6, 24px);
|
|
163
163
|
}
|
|
164
|
-
.awsui_vertical-
|
|
164
|
+
.awsui_vertical-xxl_18582_18i5a_164:not(#\9) {
|
|
165
165
|
row-gap: var(--space-scaled-xxl-fzmynl, 32px);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.awsui_align-center_18582_18i5a_168:not(#\9) {
|
|
169
|
+
align-items: center;
|
|
166
170
|
}
|
|
@@ -2,25 +2,26 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"child": "
|
|
7
|
-
"horizontal": "
|
|
8
|
-
"horizontal-xxxs": "awsui_horizontal-
|
|
9
|
-
"horizontal-xxs": "awsui_horizontal-
|
|
10
|
-
"horizontal-xs": "awsui_horizontal-
|
|
11
|
-
"horizontal-s": "awsui_horizontal-
|
|
12
|
-
"horizontal-m": "awsui_horizontal-
|
|
13
|
-
"horizontal-l": "awsui_horizontal-
|
|
14
|
-
"horizontal-xl": "awsui_horizontal-
|
|
15
|
-
"horizontal-xxl": "awsui_horizontal-
|
|
16
|
-
"vertical": "
|
|
17
|
-
"vertical-xxxs": "awsui_vertical-
|
|
18
|
-
"vertical-xxs": "awsui_vertical-
|
|
19
|
-
"vertical-xs": "awsui_vertical-
|
|
20
|
-
"vertical-s": "awsui_vertical-
|
|
21
|
-
"vertical-m": "awsui_vertical-
|
|
22
|
-
"vertical-l": "awsui_vertical-
|
|
23
|
-
"vertical-xl": "awsui_vertical-
|
|
24
|
-
"vertical-xxl": "awsui_vertical-
|
|
5
|
+
"root": "awsui_root_18582_18i5a_93",
|
|
6
|
+
"child": "awsui_child_18582_18i5a_97",
|
|
7
|
+
"horizontal": "awsui_horizontal_18582_18i5a_108",
|
|
8
|
+
"horizontal-xxxs": "awsui_horizontal-xxxs_18582_18i5a_112",
|
|
9
|
+
"horizontal-xxs": "awsui_horizontal-xxs_18582_18i5a_115",
|
|
10
|
+
"horizontal-xs": "awsui_horizontal-xs_18582_18i5a_118",
|
|
11
|
+
"horizontal-s": "awsui_horizontal-s_18582_18i5a_121",
|
|
12
|
+
"horizontal-m": "awsui_horizontal-m_18582_18i5a_124",
|
|
13
|
+
"horizontal-l": "awsui_horizontal-l_18582_18i5a_127",
|
|
14
|
+
"horizontal-xl": "awsui_horizontal-xl_18582_18i5a_130",
|
|
15
|
+
"horizontal-xxl": "awsui_horizontal-xxl_18582_18i5a_133",
|
|
16
|
+
"vertical": "awsui_vertical_18582_18i5a_140",
|
|
17
|
+
"vertical-xxxs": "awsui_vertical-xxxs_18582_18i5a_143",
|
|
18
|
+
"vertical-xxs": "awsui_vertical-xxs_18582_18i5a_146",
|
|
19
|
+
"vertical-xs": "awsui_vertical-xs_18582_18i5a_149",
|
|
20
|
+
"vertical-s": "awsui_vertical-s_18582_18i5a_152",
|
|
21
|
+
"vertical-m": "awsui_vertical-m_18582_18i5a_155",
|
|
22
|
+
"vertical-l": "awsui_vertical-l_18582_18i5a_158",
|
|
23
|
+
"vertical-xl": "awsui_vertical-xl_18582_18i5a_161",
|
|
24
|
+
"vertical-xxl": "awsui_vertical-xxl_18582_18i5a_164",
|
|
25
|
+
"align-center": "awsui_align-center_18582_18i5a_168"
|
|
25
26
|
};
|
|
26
27
|
|
|
@@ -17,6 +17,7 @@ export interface TagEditorProps extends BaseComponentProps {
|
|
|
17
17
|
tags?: ReadonlyArray<TagEditorProps.Tag>;
|
|
18
18
|
/**
|
|
19
19
|
* An object containing all the necessary localized strings required by the component.
|
|
20
|
+
* @i18n
|
|
20
21
|
*/
|
|
21
22
|
i18nStrings?: TagEditorProps.I18nStrings;
|
|
22
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["tag-editor/interfaces.t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C,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;QAC/D,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;QAC/C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;QAChD,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;QAClD,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;QACpD,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,GAAG,KAAK,MAAM,CAAC;KAC9D;IAED,UAAiB,YAAY;QAC3B,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;QACxC,KAAK,EAAE,OAAO,CAAC;KAChB;IAED,UAAiB,GAAG;QAClB;;;WAGG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["tag-editor/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface TagEditorProps extends BaseComponentProps {\n /**\n * Specifies an array of tags that are displayed to the user. Each tag item has the following properties:\n * - `key` (string) - The key of the tag that's displayed in the corresponding key field.\n * - `value` (string) - The value of the tag that's displayed in the corresponding value field.\n * - `existing` (boolean) - Specifies if this is an existing tag for the resource.\n * When set to `true`, if the tag is deleted its `markedForRemoval` property is to `true`.\n * When set to `false`, deletion of the tag removes the tag from the `tags` list.\n * - `markedForRemoval` (boolean) - Specifies if this tag has been marked for removal.\n * This property is set to `true` by the component when a user removes an existing tag.\n * The item will remain in the `tags` list. When set to `true`, the user is presented with the option to undo the removal operation.\n * - `valueSuggestionOptions` (Array<AutosuggestProps.Option>) - An array of autosuggest suggestion options associated with the specified tag key.\n */\n tags?: ReadonlyArray<TagEditorProps.Tag>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n */\n i18nStrings?: TagEditorProps.I18nStrings;\n\n /**\n * Renders the component in a loading state.\n */\n loading?: boolean;\n\n /**\n * Specifies the maximum number of tags that a customer can add.\n */\n tagLimit?: number;\n\n /**\n * Specifies a regular expression string that overrides the default acceptable\n * character validation. You should use this property only when absolutely necessary.\n */\n allowedCharacterPattern?: string;\n\n /**\n * Specifies a function that returns all the keys for a resource.\n * The expected return type of the function should be a promise that\n * resolves to a list of strings of all the keys (for example, `['key1', 'key2']`).\n */\n keysRequest?: (key: string) => Promise<ReadonlyArray<string>>;\n\n /**\n * Specifies a function that returns all the values for a specified key\n * of a resource. The expected return type of the function should be a promise\n * that resolves to a list of strings of all the values (for example, `['value1', 'value2']`).\n *\n * You should return a rejected promise when the `key` parameter is an empty string.\n */\n valuesRequest?: (key: string, value: string) => Promise<ReadonlyArray<string>>;\n\n /**\n * Called when any tag operation occurs.\n * The event `detail` object contains the full updated state of `tags`,\n * and whether the component is in a `valid` state.\n */\n onChange?: NonCancelableEventHandler<TagEditorProps.ChangeDetail>;\n}\n\nexport namespace TagEditorProps {\n export interface Tag {\n /**\n * The key of the tag that will be displayed in the corresponding key field.\n */\n key: string;\n\n /**\n * The value of the tag that will be displayed in the corresponding value field.\n */\n value: string;\n\n /**\n * Whether this is an existing tag for the resource. If set to `true`, deletion of the tag will set the `markedForRemoval` property to `true`. If set to `false`, deletion of the tag will remove the tag from the `tags` list.\n */\n existing: boolean;\n\n /**\n * Whether this tag has been marked for removal. This property will be set to `true` by the component when a user tries to remove an existing tag. The item will remain in the `tags` list. When set to `true`, the user will be presented with the option to undo the removal operation.\n */\n markedForRemoval?: boolean;\n\n /**\n * An array of suggested values for the specified tag key.\n */\n valueSuggestionOptions?: ReadonlyArray<AutosuggestProps.Option>;\n }\n\n export interface I18nStrings {\n keyPlaceholder?: string;\n valuePlaceholder?: string;\n addButton?: string;\n removeButton?: string;\n undoButton?: string;\n undoPrompt?: string;\n loading?: string;\n keyHeader?: string;\n valueHeader?: string;\n optional?: string;\n keySuggestion?: string;\n valueSuggestion?: string;\n tooManyKeysSuggestion?: string;\n tooManyValuesSuggestion?: string;\n emptyTags?: string;\n errorIconAriaLabel?: string;\n keysSuggestionLoading?: string;\n keysSuggestionError?: string;\n valuesSuggestionError?: string;\n valuesSuggestionLoading?: string;\n emptyKeyError?: string;\n maxKeyCharLengthError?: string;\n maxValueCharLengthError?: string;\n duplicateKeyError?: string;\n invalidKeyError?: string;\n invalidValueError?: string;\n awsPrefixError?: string;\n clearAriaLabel?: string;\n itemRemovedAriaLive?: string;\n tagLimit?: (availableTags: number, tagLimit: number) => string;\n tagLimitReached?: (tagLimit: number) => string;\n tagLimitExceeded?: (tagLimit: number) => string;\n enteredKeyLabel?: (enteredText: string) => string;\n enteredValueLabel?: (enteredText: string) => string;\n removeButtonAriaLabel?: (item: TagEditorProps.Tag) => string;\n }\n\n export interface ChangeDetail {\n tags: ReadonlyArray<TagEditorProps.Tag>;\n valid: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the first error within the component.\n * If no error is present, no element is focused.\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["tag-editor/interfaces.tsx"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { AutosuggestProps } from '../autosuggest/interfaces';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface TagEditorProps extends BaseComponentProps {\n /**\n * Specifies an array of tags that are displayed to the user. Each tag item has the following properties:\n * - `key` (string) - The key of the tag that's displayed in the corresponding key field.\n * - `value` (string) - The value of the tag that's displayed in the corresponding value field.\n * - `existing` (boolean) - Specifies if this is an existing tag for the resource.\n * When set to `true`, if the tag is deleted its `markedForRemoval` property is to `true`.\n * When set to `false`, deletion of the tag removes the tag from the `tags` list.\n * - `markedForRemoval` (boolean) - Specifies if this tag has been marked for removal.\n * This property is set to `true` by the component when a user removes an existing tag.\n * The item will remain in the `tags` list. When set to `true`, the user is presented with the option to undo the removal operation.\n * - `valueSuggestionOptions` (Array<AutosuggestProps.Option>) - An array of autosuggest suggestion options associated with the specified tag key.\n */\n tags?: ReadonlyArray<TagEditorProps.Tag>;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: TagEditorProps.I18nStrings;\n\n /**\n * Renders the component in a loading state.\n */\n loading?: boolean;\n\n /**\n * Specifies the maximum number of tags that a customer can add.\n */\n tagLimit?: number;\n\n /**\n * Specifies a regular expression string that overrides the default acceptable\n * character validation. You should use this property only when absolutely necessary.\n */\n allowedCharacterPattern?: string;\n\n /**\n * Specifies a function that returns all the keys for a resource.\n * The expected return type of the function should be a promise that\n * resolves to a list of strings of all the keys (for example, `['key1', 'key2']`).\n */\n keysRequest?: (key: string) => Promise<ReadonlyArray<string>>;\n\n /**\n * Specifies a function that returns all the values for a specified key\n * of a resource. The expected return type of the function should be a promise\n * that resolves to a list of strings of all the values (for example, `['value1', 'value2']`).\n *\n * You should return a rejected promise when the `key` parameter is an empty string.\n */\n valuesRequest?: (key: string, value: string) => Promise<ReadonlyArray<string>>;\n\n /**\n * Called when any tag operation occurs.\n * The event `detail` object contains the full updated state of `tags`,\n * and whether the component is in a `valid` state.\n */\n onChange?: NonCancelableEventHandler<TagEditorProps.ChangeDetail>;\n}\n\nexport namespace TagEditorProps {\n export interface Tag {\n /**\n * The key of the tag that will be displayed in the corresponding key field.\n */\n key: string;\n\n /**\n * The value of the tag that will be displayed in the corresponding value field.\n */\n value: string;\n\n /**\n * Whether this is an existing tag for the resource. If set to `true`, deletion of the tag will set the `markedForRemoval` property to `true`. If set to `false`, deletion of the tag will remove the tag from the `tags` list.\n */\n existing: boolean;\n\n /**\n * Whether this tag has been marked for removal. This property will be set to `true` by the component when a user tries to remove an existing tag. The item will remain in the `tags` list. When set to `true`, the user will be presented with the option to undo the removal operation.\n */\n markedForRemoval?: boolean;\n\n /**\n * An array of suggested values for the specified tag key.\n */\n valueSuggestionOptions?: ReadonlyArray<AutosuggestProps.Option>;\n }\n\n export interface I18nStrings {\n keyPlaceholder?: string;\n valuePlaceholder?: string;\n addButton?: string;\n removeButton?: string;\n undoButton?: string;\n undoPrompt?: string;\n loading?: string;\n keyHeader?: string;\n valueHeader?: string;\n optional?: string;\n keySuggestion?: string;\n valueSuggestion?: string;\n tooManyKeysSuggestion?: string;\n tooManyValuesSuggestion?: string;\n emptyTags?: string;\n errorIconAriaLabel?: string;\n keysSuggestionLoading?: string;\n keysSuggestionError?: string;\n valuesSuggestionError?: string;\n valuesSuggestionLoading?: string;\n emptyKeyError?: string;\n maxKeyCharLengthError?: string;\n maxValueCharLengthError?: string;\n duplicateKeyError?: string;\n invalidKeyError?: string;\n invalidValueError?: string;\n awsPrefixError?: string;\n clearAriaLabel?: string;\n itemRemovedAriaLive?: string;\n tagLimit?: (availableTags: number, tagLimit: number) => string;\n tagLimitReached?: (tagLimit: number) => string;\n tagLimitExceeded?: (tagLimit: number) => string;\n enteredKeyLabel?: (enteredText: string) => string;\n enteredValueLabel?: (enteredText: string) => string;\n removeButtonAriaLabel?: (item: TagEditorProps.Tag) => string;\n }\n\n export interface ChangeDetail {\n tags: ReadonlyArray<TagEditorProps.Tag>;\n valid: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the first error within the component.\n * If no error is present, no element is focused.\n */\n focus(): void;\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ export interface ValidationError {
|
|
|
4
4
|
key?: string;
|
|
5
5
|
value?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function validate(tags: ReadonlyArray<TagEditorProps.Tag>, keyDirtyState: ReadonlyArray<boolean>, i18n: ComponentFormatFunction
|
|
7
|
+
export declare function validate(tags: ReadonlyArray<TagEditorProps.Tag>, keyDirtyState: ReadonlyArray<boolean>, i18n: ComponentFormatFunction<'tag-editor'>, i18nStrings: TagEditorProps.I18nStrings | undefined, charRegex?: RegExp): ReadonlyArray<ValidationError | undefined>;
|
|
8
8
|
export declare const awsPrefixCheck: (value: string) => boolean;
|
|
9
9
|
export declare const emptyKeyCheck: (value: string) => boolean;
|
|
10
10
|
export declare const maxKeyLengthCheck: (value: string) => boolean | "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"lib/default/","sources":["tag-editor/validation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAuB9C,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,QAAQ,CACtB,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,GAAG,CAAC,EACvC,aAAa,EAAE,aAAa,CAAC,OAAO,CAAC,EACrC,IAAI,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"lib/default/","sources":["tag-editor/validation.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM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,aAAR,QAAQ,uBAAR,QAAQ,CAAG,KAAK,CAAC,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAE;IACnD,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,gBAAgB,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,iBAAyB,kBAAkB,EAAE,EAAE;IAC7F,yBAAyB;IACzB,IAAI,CAAC,KAAK,IAAI,CAAC,cAAc,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ComponentFormatFunction } from '../internal/i18n/context';\nimport { TagEditorProps } from './interfaces';\n\n/**\n * RegEx for tags.\n * As < ES6 does not support Unicode groups this regex string was generated\n * using a 3rd party library (XRegExp) with the following command:\n *\n * new XRegExp('^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-@]*)$').toString().\n *\n * The output was then converted to escaped unicode to help prevent corruption\n * during transfer to clients. This was done as the XRegExp library is ~90KB\n * minified and we do not want to include this to our bundle size.\n *\n * @see http://xregexp.com/\n */\nconst ALLOWED_UNICODE_CHARS =\n '\\\\xAA\\\\xB5\\\\xBA\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\u02C1\\\\u02C6-\\\\u02D1\\\\u02E0-\\\\u02E4\\\\u02EC\\\\u02EE\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037A-\\\\u037D\\\\u037F\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03F5\\\\u03F7-\\\\u0481\\\\u048A-\\\\u052F\\\\u0531-\\\\u0556\\\\u0559\\\\u0560-\\\\u0588\\\\u05D0-\\\\u05EA\\\\u05EF-\\\\u05F2\\\\u0620-\\\\u064A\\\\u066E\\\\u066F\\\\u0671-\\\\u06D3\\\\u06D5\\\\u06E5\\\\u06E6\\\\u06EE\\\\u06EF\\\\u06FA-\\\\u06FC\\\\u06FF\\\\u0710\\\\u0712-\\\\u072F\\\\u074D-\\\\u07A5\\\\u07B1\\\\u07CA-\\\\u07EA\\\\u07F4\\\\u07F5\\\\u07FA\\\\u0800-\\\\u0815\\\\u081A\\\\u0824\\\\u0828\\\\u0840-\\\\u0858\\\\u0860-\\\\u086A\\\\u08A0-\\\\u08B4\\\\u08B6-\\\\u08BD\\\\u0904-\\\\u0939\\\\u093D\\\\u0950\\\\u0958-\\\\u0961\\\\u0971-\\\\u0980\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\\\u09BD\\\\u09CE\\\\u09DC\\\\u09DD\\\\u09DF-\\\\u09E1\\\\u09F0\\\\u09F1\\\\u09FC\\\\u0A05-\\\\u0A0A\\\\u0A0F\\\\u0A10\\\\u0A13-\\\\u0A28\\\\u0A2A-\\\\u0A30\\\\u0A32\\\\u0A33\\\\u0A35\\\\u0A36\\\\u0A38\\\\u0A39\\\\u0A59-\\\\u0A5C\\\\u0A5E\\\\u0A72-\\\\u0A74\\\\u0A85-\\\\u0A8D\\\\u0A8F-\\\\u0A91\\\\u0A93-\\\\u0AA8\\\\u0AAA-\\\\u0AB0\\\\u0AB2\\\\u0AB3\\\\u0AB5-\\\\u0AB9\\\\u0ABD\\\\u0AD0\\\\u0AE0\\\\u0AE1\\\\u0AF9\\\\u0B05-\\\\u0B0C\\\\u0B0F\\\\u0B10\\\\u0B13-\\\\u0B28\\\\u0B2A-\\\\u0B30\\\\u0B32\\\\u0B33\\\\u0B35-\\\\u0B39\\\\u0B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F6C\\\\u0F88-\\\\u0F8C\\\\u1000-\\\\u102A\\\\u103F\\\\u1050-\\\\u1055\\\\u105A-\\\\u105D\\\\u1061\\\\u1065\\\\u1066\\\\u106E-\\\\u1070\\\\u1075-\\\\u1081\\\\u108E\\\\u10A0-\\\\u10C5\\\\u10C7\\\\u10CD\\\\u10D0-\\\\u10FA\\\\u10FC-\\\\u1248\\\\u124A-\\\\u124D\\\\u1250-\\\\u1256\\\\u1258\\\\u125A-\\\\u125D\\\\u1260-\\\\u1288\\\\u128A-\\\\u128D\\\\u1290-\\\\u12B0\\\\u12B2-\\\\u12B5\\\\u12B8-\\\\u12BE\\\\u12C0\\\\u12C2-\\\\u12C5\\\\u12C8-\\\\u12D6\\\\u12D8-\\\\u1310\\\\u1312-\\\\u1315\\\\u1318-\\\\u135A\\\\u1380-\\\\u138F\\\\u13A0-\\\\u13F5\\\\u13F8-\\\\u13FD\\\\u1401-\\\\u166C\\\\u166F-\\\\u167F\\\\u1681-\\\\u169A\\\\u16A0-\\\\u16EA\\\\u16F1-\\\\u16F8\\\\u1700-\\\\u170C\\\\u170E-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176C\\\\u176E-\\\\u1770\\\\u1780-\\\\u17B3\\\\u17D7\\\\u17DC\\\\u1820-\\\\u1878\\\\u1880-\\\\u1884\\\\u1887-\\\\u18A8\\\\u18AA\\\\u18B0-\\\\u18F5\\\\u1900-\\\\u191E\\\\u1950-\\\\u196D\\\\u1970-\\\\u1974\\\\u1980-\\\\u19AB\\\\u19B0-\\\\u19C9\\\\u1A00-\\\\u1A16\\\\u1A20-\\\\u1A54\\\\u1AA7\\\\u1B05-\\\\u1B33\\\\u1B45-\\\\u1B4B\\\\u1B83-\\\\u1BA0\\\\u1BAE\\\\u1BAF\\\\u1BBA-\\\\u1BE5\\\\u1C00-\\\\u1C23\\\\u1C4D-\\\\u1C4F\\\\u1C5A-\\\\u1C7D\\\\u1C80-\\\\u1C88\\\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\\\\u1B59\\\\u1BB0-\\\\u1BB9\\\\u1C40-\\\\u1C49\\\\u1C50-\\\\u1C59\\\\u2070\\\\u2074-\\\\u2079\\\\u2080-\\\\u2089\\\\u2150-\\\\u2182\\\\u2185-\\\\u2189\\\\u2460-\\\\u249B\\\\u24EA-\\\\u24FF\\\\u2776-\\\\u2793\\\\u2CFD\\\\u3007\\\\u3021-\\\\u3029\\\\u3038-\\\\u303A\\\\u3192-\\\\u3195\\\\u3220-\\\\u3229\\\\u3248-\\\\u324F\\\\u3251-\\\\u325F\\\\u3280-\\\\u3289\\\\u32B1-\\\\u32BF\\\\uA620-\\\\uA629\\\\uA6E6-\\\\uA6EF\\\\uA830-\\\\uA835\\\\uA8D0-\\\\uA8D9\\\\uA900-\\\\uA909\\\\uA9D0-\\\\uA9D9\\\\uA9F0-\\\\uA9F9\\\\uAA50-\\\\uAA59\\\\uABF0-\\\\uABF9\\\\uFF10-\\\\uFF19';\nconst DEFAULT_CHAR_REGEX = new RegExp(`^([A-Za-z${ALLOWED_UNICODE_CHARS}_.:/=+\\\\-@]*)$`);\n\nconst SYSTEM_TAG_PREFIX = 'aws:';\nconst MAX_KEY_LENGTH = 128;\nconst MAX_VALUE_LENGTH = 256;\n\nexport interface ValidationError {\n key?: string;\n value?: string;\n}\n\nexport function validate(\n tags: ReadonlyArray<TagEditorProps.Tag>,\n keyDirtyState: ReadonlyArray<boolean>,\n i18n: ComponentFormatFunction,\n i18nStrings: TagEditorProps.I18nStrings | undefined,\n charRegex: RegExp = DEFAULT_CHAR_REGEX\n): ReadonlyArray<ValidationError | undefined> {\n // Create cache to use for duplicate key check\n const tagKeysCache: Record<string, number | undefined> = {};\n tags.forEach(tag => {\n if (tag.key && !tag.markedForRemoval) {\n tagKeysCache[tag.key] = (tagKeysCache[tag.key] ?? 0) + 1;\n }\n });\n\n return tags.map((tag, i) => {\n let keyError: string | undefined, valueError: string | undefined;\n\n if (keyDirtyState[i] && emptyKeyCheck(tag.key)) {\n keyError = i18n('i18nStrings.emptyKeyError', i18nStrings?.emptyKeyError);\n } else if (awsPrefixCheck(tag.key)) {\n keyError = i18n('i18nStrings.awsPrefixError', i18nStrings?.awsPrefixError);\n } else if (invalidCharCheck(tag.key, charRegex)) {\n keyError = i18n('i18nStrings.invalidKeyError', i18nStrings?.invalidKeyError);\n } else if (maxKeyLengthCheck(tag.key)) {\n keyError = i18n('i18nStrings.maxKeyCharLengthError', i18nStrings?.maxKeyCharLengthError);\n } else if (duplicateKeyCheck(tag.key, tagKeysCache)) {\n keyError = i18n('i18nStrings.duplicateKeyError', i18nStrings?.duplicateKeyError);\n }\n\n if (!tag.markedForRemoval) {\n if (invalidCharCheck(tag.value, charRegex)) {\n valueError = i18n('i18nStrings.invalidValueError', i18nStrings?.invalidValueError);\n } else if (maxValueLengthCheck(tag.value)) {\n valueError = i18n('i18nStrings.maxValueCharLengthError', i18nStrings?.maxValueCharLengthError);\n }\n }\n\n if (keyError || valueError) {\n return { key: keyError, value: valueError };\n }\n });\n}\n\nexport const awsPrefixCheck = (value: string) => {\n return value.toLowerCase().indexOf(SYSTEM_TAG_PREFIX) === 0;\n};\n\nexport const emptyKeyCheck = (value: string) => {\n return !value || value.trim().length === 0;\n};\n\nexport const maxKeyLengthCheck = (value: string) => {\n return value && value.length > MAX_KEY_LENGTH;\n};\n\nexport const duplicateKeyCheck = (value: string, keyCache?: Record<string, number | undefined>) => {\n return (keyCache?.[value] ?? 0) > 1;\n};\n\nexport const maxValueLengthCheck = (value: string) => {\n return value && value.length > MAX_VALUE_LENGTH;\n};\n\nexport const invalidCharCheck = (value: string, validCharRegex: RegExp = DEFAULT_CHAR_REGEX) => {\n // Empty values are valid\n if (!value || !validCharRegex) {\n return false;\n }\n return !validCharRegex.test(value);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"lib/default/","sources":["tag-editor/validation.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,MAAM,qBAAqB,GACzB,y4LAAy4L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AC,MAAM,KAAK,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE;IACjD,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,QAA6C,EAAE,EAAE;;IAChG,OAAO,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,KAAK,CAAC,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;AACtC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAE;IACnD,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,gBAAgB,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAE,iBAAyB,kBAAkB,EAAE,EAAE;IAC7F,yBAAyB;IACzB,IAAI,CAAC,KAAK,IAAI,CAAC,cAAc,EAAE;QAC7B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ComponentFormatFunction } from '../internal/i18n/context';\nimport { TagEditorProps } from './interfaces';\n\n/**\n * RegEx for tags.\n * As < ES6 does not support Unicode groups this regex string was generated\n * using a 3rd party library (XRegExp) with the following command:\n *\n * new XRegExp('^([\\\\p{L}\\\\p{Z}\\\\p{N}_.:/=+\\\\-@]*)$').toString().\n *\n * The output was then converted to escaped unicode to help prevent corruption\n * during transfer to clients. This was done as the XRegExp library is ~90KB\n * minified and we do not want to include this to our bundle size.\n *\n * @see http://xregexp.com/\n */\nconst ALLOWED_UNICODE_CHARS =\n '\\\\xAA\\\\xB5\\\\xBA\\\\xC0-\\\\xD6\\\\xD8-\\\\xF6\\\\xF8-\\\\u02C1\\\\u02C6-\\\\u02D1\\\\u02E0-\\\\u02E4\\\\u02EC\\\\u02EE\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037A-\\\\u037D\\\\u037F\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03F5\\\\u03F7-\\\\u0481\\\\u048A-\\\\u052F\\\\u0531-\\\\u0556\\\\u0559\\\\u0560-\\\\u0588\\\\u05D0-\\\\u05EA\\\\u05EF-\\\\u05F2\\\\u0620-\\\\u064A\\\\u066E\\\\u066F\\\\u0671-\\\\u06D3\\\\u06D5\\\\u06E5\\\\u06E6\\\\u06EE\\\\u06EF\\\\u06FA-\\\\u06FC\\\\u06FF\\\\u0710\\\\u0712-\\\\u072F\\\\u074D-\\\\u07A5\\\\u07B1\\\\u07CA-\\\\u07EA\\\\u07F4\\\\u07F5\\\\u07FA\\\\u0800-\\\\u0815\\\\u081A\\\\u0824\\\\u0828\\\\u0840-\\\\u0858\\\\u0860-\\\\u086A\\\\u08A0-\\\\u08B4\\\\u08B6-\\\\u08BD\\\\u0904-\\\\u0939\\\\u093D\\\\u0950\\\\u0958-\\\\u0961\\\\u0971-\\\\u0980\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\\\u09BD\\\\u09CE\\\\u09DC\\\\u09DD\\\\u09DF-\\\\u09E1\\\\u09F0\\\\u09F1\\\\u09FC\\\\u0A05-\\\\u0A0A\\\\u0A0F\\\\u0A10\\\\u0A13-\\\\u0A28\\\\u0A2A-\\\\u0A30\\\\u0A32\\\\u0A33\\\\u0A35\\\\u0A36\\\\u0A38\\\\u0A39\\\\u0A59-\\\\u0A5C\\\\u0A5E\\\\u0A72-\\\\u0A74\\\\u0A85-\\\\u0A8D\\\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0E88\\\\u0E8A\\\\u0E8D\\\\u0E94-\\\\u0E97\\\\u0E99-\\\\u0E9F\\\\u0EA1-\\\\u0EA3\\\\u0EA5\\\\u0EA7\\\\u0EAA\\\\u0EAB\\\\u0EAD-\\\\u0EB0\\\\u0EB2\\\\u0EB3\\\\u0EBD\\\\u0EC0-\\\\u0EC4\\\\u0EC6\\\\u0EDC-\\\\u0EDF\\\\u0F00\\\\u0F40-\\\\u0F47\\\\u0F49-\\\\u0F6C\\\\u0F88-\\\\u0F8C\\\\u1000-\\\\u102A\\\\u103F\\\\u1050-\\\\u1055\\\\u105A-\\\\u105D\\\\u1061\\\\u1065\\\\u1066\\\\u106E-\\\\u1070\\\\u1075-\\\\u1081\\\\u108E\\\\u10A0-\\\\u10C5\\\\u10C7\\\\u10CD\\\\u10D0-\\\\u10FA\\\\u10FC-\\\\u1248\\\\u124A-\\\\u124D\\\\u1250-\\\\u1256\\\\u1258\\\\u125A-\\\\u125D\\\\u1260-\\\\u1288\\\\u128A-\\\\u128D\\\\u1290-\\\\u12B0\\\\u12B2-\\\\u12B5\\\\u12B8-\\\\u12BE\\\\u12C0\\\\u12C2-\\\\u12C5\\\\u12C8-\\\\u12D6\\\\u12D8-\\\\u1310\\\\u1312-\\\\u1315\\\\u1318-\\\\u135A\\\\u1380-\\\\u138F\\\\u13A0-\\\\u13F5\\\\u13F8-\\\\u13FD\\\\u1401-\\\\u166C\\\\u166F-\\\\u167F\\\\u1681-\\\\u169A\\\\u16A0-\\\\u16EA\\\\u16F1-\\\\u16F8\\\\u1700-\\\\u170C\\\\u170E-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176C\\\\u176E-\\\\u1770\\\\u1780-\\\\u17B3\\\\u17D7\\\\u17DC\\\\u1820-\\\\u1878\\\\u1880-\\\\u1884\\\\u1887-\\\\u18A8\\\\u18AA\\\\u18B0-\\\\u18F5\\\\u1900-\\\\u191E\\\\u1950-\\\\u196D\\\\u1970-\\\\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\\\u2DA6\\\\u2DA8-\\\\u2DAE\\\\u2DB0-\\\\u2DB6\\\\u2DB8-\\\\u2DBE\\\\u2DC0-\\\\u2DC6\\\\u2DC8-\\\\u2DCE\\\\u2DD0-\\\\u2DD6\\\\u2DD8-\\\\u2DDE\\\\u2E2F\\\\u3005\\\\u3006\\\\u3031-\\\\u3035\\\\u303B\\\\u303C\\\\u3041-\\\\u3096\\\\u309D-\\\\u309F\\\\u30A1-\\\\u30FA\\\\u30FC-\\\\u30FF\\\\u3105-\\\\u312F\\\\u3131-\\\\u318E\\\\u31A0-\\\\u31BA\\\\u31F0-\\\\u31FF\\\\u3400-\\\\u4DB5\\\\u4E00-\\\\u9FEF\\\\uA000-\\\\uA48C\\\\uA4D0-\\\\uA4FD\\\\uA500-\\\\uA60C\\\\uA610-\\\\uA61F\\\\uA62A\\\\uA62B\\\\uA640-\\\\uA66E\\\\uA67F-\\\\uA69D\\\\uA6A0-\\\\uA6E5\\\\uA717-\\\\uA71F\\\\uA722-\\\\uA788\\\\uA78B-\\\\uA7B9\\\\uA7F7-\\\\uA801\\\\uA803-\\\\uA805\\\\uA807-\\\\uA80A\\\\uA80C-\\\\uA822\\\\uA840-\\\\uA873\\\\uA882-\\\\uA8B3\\\\uA8F2-\\\\uA8F7\\\\uA8FB\\\\uA8FD\\\\uA8FE\\\\uA90A-\\\\uA925\\\\uA930-\\\\uA946\\\\uA960-\\\\uA97C\\\\uA984-\\\\uA9B2\\\\uA9CF\\\\uA9E0-\\\\uA9E4\\\\uA9E6-\\\\uA9EF\\\\uA9FA-\\\\uA9FE\\\\uAA00-\\\\uAA28\\\\uAA40-\\\\uAA42\\\\uAA44-\\\\uAA4B\\\\uAA60-\\\\uAA76\\\\uAA7A\\\\uAA7E-\\\\uAAAF\\\\uAAB1\\\\uAAB5\\\\uAAB6\\\\uAAB9-\\\\uAABD\\\\uAAC0\\\\uAAC2\\\\uAADB-\\\\uAADD\\\\uAAE0-\\\\uAAEA\\\\uAAF2-\\\\uA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u0DEF\\\\u0E50-\\\\u0E59\\\\u0ED0-\\\\u0ED9\\\\u0F20-\\\\u0F33\\\\u1040-\\\\u1049\\\\u1090-\\\\u1099\\\\u1369-\\\\u137C\\\\u16EE-\\\\u16F0\\\\u17E0-\\\\u17E9\\\\u17F0-\\\\u17F9\\\\u1810-\\\\u1819\\\\u1946-\\\\u194F\\\\u19D0-\\\\u19DA\\\\u1A80-\\\\u1A89\\\\u1A90-\\\\u1A99\\\\u1B50-\\\\u1B59\\\\u1BB0-\\\\u1BB9\\\\u1C40-\\\\u1C49\\\\u1C50-\\\\u1C59\\\\u2070\\\\u2074-\\\\u2079\\\\u2080-\\\\u2089\\\\u2150-\\\\u2182\\\\u2185-\\\\u2189\\\\u2460-\\\\u249B\\\\u24EA-\\\\u24FF\\\\u2776-\\\\u2793\\\\u2CFD\\\\u3007\\\\u3021-\\\\u3029\\\\u3038-\\\\u303A\\\\u3192-\\\\u3195\\\\u3220-\\\\u3229\\\\u3248-\\\\u324F\\\\u3251-\\\\u325F\\\\u3280-\\\\u3289\\\\u32B1-\\\\u32BF\\\\uA620-\\\\uA629\\\\uA6E6-\\\\uA6EF\\\\uA830-\\\\uA835\\\\uA8D0-\\\\uA8D9\\\\uA900-\\\\uA909\\\\uA9D0-\\\\uA9D9\\\\uA9F0-\\\\uA9F9\\\\uAA50-\\\\uAA59\\\\uABF0-\\\\uABF9\\\\uFF10-\\\\uFF19';\nconst DEFAULT_CHAR_REGEX = new RegExp(`^([A-Za-z${ALLOWED_UNICODE_CHARS}_.:/=+\\\\-@]*)$`);\n\nconst SYSTEM_TAG_PREFIX = 'aws:';\nconst MAX_KEY_LENGTH = 128;\nconst MAX_VALUE_LENGTH = 256;\n\nexport interface ValidationError {\n key?: string;\n value?: string;\n}\n\nexport function validate(\n tags: ReadonlyArray<TagEditorProps.Tag>,\n keyDirtyState: ReadonlyArray<boolean>,\n i18n: ComponentFormatFunction<'tag-editor'>,\n i18nStrings: TagEditorProps.I18nStrings | undefined,\n charRegex: RegExp = DEFAULT_CHAR_REGEX\n): ReadonlyArray<ValidationError | undefined> {\n // Create cache to use for duplicate key check\n const tagKeysCache: Record<string, number | undefined> = {};\n tags.forEach(tag => {\n if (tag.key && !tag.markedForRemoval) {\n tagKeysCache[tag.key] = (tagKeysCache[tag.key] ?? 0) + 1;\n }\n });\n\n return tags.map((tag, i) => {\n let keyError: string | undefined, valueError: string | undefined;\n\n if (keyDirtyState[i] && emptyKeyCheck(tag.key)) {\n keyError = i18n('i18nStrings.emptyKeyError', i18nStrings?.emptyKeyError);\n } else if (awsPrefixCheck(tag.key)) {\n keyError = i18n('i18nStrings.awsPrefixError', i18nStrings?.awsPrefixError);\n } else if (invalidCharCheck(tag.key, charRegex)) {\n keyError = i18n('i18nStrings.invalidKeyError', i18nStrings?.invalidKeyError);\n } else if (maxKeyLengthCheck(tag.key)) {\n keyError = i18n('i18nStrings.maxKeyCharLengthError', i18nStrings?.maxKeyCharLengthError);\n } else if (duplicateKeyCheck(tag.key, tagKeysCache)) {\n keyError = i18n('i18nStrings.duplicateKeyError', i18nStrings?.duplicateKeyError);\n }\n\n if (!tag.markedForRemoval) {\n if (invalidCharCheck(tag.value, charRegex)) {\n valueError = i18n('i18nStrings.invalidValueError', i18nStrings?.invalidValueError);\n } else if (maxValueLengthCheck(tag.value)) {\n valueError = i18n('i18nStrings.maxValueCharLengthError', i18nStrings?.maxValueCharLengthError);\n }\n }\n\n if (keyError || valueError) {\n return { key: keyError, value: valueError };\n }\n });\n}\n\nexport const awsPrefixCheck = (value: string) => {\n return value.toLowerCase().indexOf(SYSTEM_TAG_PREFIX) === 0;\n};\n\nexport const emptyKeyCheck = (value: string) => {\n return !value || value.trim().length === 0;\n};\n\nexport const maxKeyLengthCheck = (value: string) => {\n return value && value.length > MAX_KEY_LENGTH;\n};\n\nexport const duplicateKeyCheck = (value: string, keyCache?: Record<string, number | undefined>) => {\n return (keyCache?.[value] ?? 0) > 1;\n};\n\nexport const maxValueLengthCheck = (value: string) => {\n return value && value.length > MAX_VALUE_LENGTH;\n};\n\nexport const invalidCharCheck = (value: string, validCharRegex: RegExp = DEFAULT_CHAR_REGEX) => {\n // Empty values are valid\n if (!value || !validCharRegex) {\n return false;\n }\n return !validCharRegex.test(value);\n};\n"]}
|
|
@@ -11,6 +11,9 @@ class ContainerWrapper extends dom_1.ComponentWrapper {
|
|
|
11
11
|
findContent() {
|
|
12
12
|
return this.findByClassName(styles_selectors_js_1.default.content);
|
|
13
13
|
}
|
|
14
|
+
findMedia() {
|
|
15
|
+
return this.findByClassName(styles_selectors_js_1.default.media);
|
|
16
|
+
}
|
|
14
17
|
findFooter() {
|
|
15
18
|
return this.findByClassName(styles_selectors_js_1.default.footer);
|
|
16
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/container/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,gFAA4D;AAE5D,MAAqB,gBAAiB,SAAQ,sBAAgB;IAG5D,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/container/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,gFAA4D;AAE5D,MAAqB,gBAAiB,SAAQ,sBAAgB;IAG5D,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,KAAK,CAAE,CAAC;IAC7C,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;;AAjBH,mCAkBC;AAjBQ,6BAAY,GAAW,6BAAM,CAAC,IAAI,CAAC"}
|
|
@@ -19,7 +19,7 @@ class ExpandableSectionWrapper extends dom_1.ComponentWrapper {
|
|
|
19
19
|
return this.findByClassName(styles_selectors_js_1.default['expand-button']);
|
|
20
20
|
}
|
|
21
21
|
findExpandedContent() {
|
|
22
|
-
return this.find(`:scope > .${styles_selectors_js_1.default['content-expanded']}, :scope > .${styles_selectors_js_2.default.content} > .${styles_selectors_js_1.default['content-expanded']}`);
|
|
22
|
+
return this.find(`:scope > .${styles_selectors_js_1.default['content-expanded']}, :scope > .${styles_selectors_js_2.default['content-wrapper']} > .${styles_selectors_js_2.default.content} > .${styles_selectors_js_1.default['content-expanded']}`);
|
|
23
23
|
}
|
|
24
24
|
findExpandIcon() {
|
|
25
25
|
return this.findByClassName(styles_selectors_js_1.default['icon-container']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/expandable-section/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,yFAAqE;AACrE,gFAAqE;AAErE,MAAqB,wBAAyB,SAAQ,sBAAgB;IAGpE,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAE,CAAC;IAC9C,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,eAAe,CAAC,CAAE,CAAC;IACxD,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,IAAI,CACd,aAAa,6BAAM,CAAC,kBAAkB,CAAC,eAAe,6BAAe,CAAC,OAAO,OAAO,6BAAM,CAAC,kBAAkB,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/expandable-section/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,yFAAqE;AACrE,gFAAqE;AAErE,MAAqB,wBAAyB,SAAQ,sBAAgB;IAGpE,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAE,CAAC;IAC9C,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,eAAe,CAAC,CAAE,CAAC;IACxD,CAAC;IAED,mBAAmB;QACjB,OAAO,IAAI,CAAC,IAAI,CACd,aAAa,6BAAM,CAAC,kBAAkB,CAAC,eAAe,6BAAe,CAAC,iBAAiB,CAAC,OAAO,6BAAe,CAAC,OAAO,OAAO,6BAAM,CAAC,kBAAkB,CAAC,EAAE,CAC1J,CAAC;IACJ,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,gBAAgB,CAAC,CAAE,CAAC;IACzD,CAAC;;AA1BH,2CA2BC;AA1BQ,qCAAY,GAAG,6BAAM,CAAC,IAAI,CAAC"}
|
|
@@ -11,6 +11,9 @@ class ContainerWrapper extends selectors_1.ComponentWrapper {
|
|
|
11
11
|
findContent() {
|
|
12
12
|
return this.findByClassName(styles_selectors_js_1.default.content);
|
|
13
13
|
}
|
|
14
|
+
findMedia() {
|
|
15
|
+
return this.findByClassName(styles_selectors_js_1.default.media);
|
|
16
|
+
}
|
|
14
17
|
findFooter() {
|
|
15
18
|
return this.findByClassName(styles_selectors_js_1.default.footer);
|
|
16
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/container/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,gFAA4D;AAC5D,MAAqB,gBAAiB,SAAQ,4BAAgB;IAE5D,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IACD,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IACD,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/container/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,gFAA4D;AAC5D,MAAqB,gBAAiB,SAAQ,4BAAgB;IAE5D,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IACD,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IACD,SAAS;QACP,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,KAAK,CAAE,CAAC;IAC7C,CAAC;IACD,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;;AAbH,mCAcC;AAbQ,6BAAY,GAAW,6BAAM,CAAC,IAAI,CAAC"}
|
|
@@ -19,7 +19,7 @@ class ExpandableSectionWrapper extends selectors_1.ComponentWrapper {
|
|
|
19
19
|
return this.findByClassName(styles_selectors_js_1.default['expand-button']);
|
|
20
20
|
}
|
|
21
21
|
findExpandedContent() {
|
|
22
|
-
return this.find(`:scope > .${styles_selectors_js_1.default['content-expanded']}, :scope > .${styles_selectors_js_2.default.content} > .${styles_selectors_js_1.default['content-expanded']}`);
|
|
22
|
+
return this.find(`:scope > .${styles_selectors_js_1.default['content-expanded']}, :scope > .${styles_selectors_js_2.default['content-wrapper']} > .${styles_selectors_js_2.default.content} > .${styles_selectors_js_1.default['content-expanded']}`);
|
|
23
23
|
}
|
|
24
24
|
findExpandIcon() {
|
|
25
25
|
return this.findByClassName(styles_selectors_js_1.default['icon-container']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/expandable-section/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,yFAAqE;AACrE,gFAAqE;AACrE,MAAqB,wBAAyB,SAAQ,4BAAgB;IAEpE,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAE,CAAC;IAC9C,CAAC;IACD,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,eAAe,CAAC,CAAE,CAAC;IACxD,CAAC;IACD,mBAAmB;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,6BAAM,CAAC,kBAAkB,CAAC,eAAe,6BAAe,CAAC,OAAO,OAAO,6BAAM,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/expandable-section/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,yFAAqE;AACrE,gFAAqE;AACrE,MAAqB,wBAAyB,SAAQ,4BAAgB;IAEpE,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,MAAM,CAAE,CAAC;IAC9C,CAAC;IACD,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,OAAO,CAAE,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,eAAe,CAAC,CAAE,CAAC;IACxD,CAAC;IACD,mBAAmB;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,6BAAM,CAAC,kBAAkB,CAAC,eAAe,6BAAe,CAAC,iBAAiB,CAAC,OAAO,6BAAe,CAAC,OAAO,OAAO,6BAAM,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAC9K,CAAC;IACD,cAAc;QACZ,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,gBAAgB,CAAC,CAAE,CAAC;IACzD,CAAC;;AApBH,2CAqBC;AApBQ,qCAAY,GAAG,6BAAM,CAAC,IAAI,CAAC"}
|