@cloudscape-design/components 3.0.1127 → 3.0.1129
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/alert/styles.css.js +27 -27
- package/alert/styles.scoped.css +50 -50
- package/alert/styles.selectors.js +27 -27
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +32 -32
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/notifications/styles.css.js +3 -3
- package/app-layout/notifications/styles.scoped.css +7 -7
- package/app-layout/notifications/styles.selectors.js +3 -3
- package/app-layout/visual-refresh/styles.css.js +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh-toolbar/drawer/styles.css.js +30 -30
- package/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +87 -87
- package/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +30 -30
- package/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +27 -27
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +54 -54
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +27 -27
- package/attribute-editor/index.d.ts.map +1 -1
- package/attribute-editor/index.js +2 -2
- package/attribute-editor/index.js.map +1 -1
- package/attribute-editor/interfaces.d.ts +8 -0
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/attribute-editor/internal.d.ts.map +1 -1
- package/attribute-editor/internal.js +9 -6
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/styles.css.js +15 -15
- package/attribute-editor/styles.scoped.css +28 -28
- package/attribute-editor/styles.selectors.js +15 -15
- package/breadcrumb-group/item/styles.css.js +7 -7
- package/breadcrumb-group/item/styles.scoped.css +28 -28
- package/breadcrumb-group/item/styles.selectors.js +7 -7
- package/button/styles.css.js +22 -22
- package/button/styles.scoped.css +256 -256
- package/button/styles.selectors.js +22 -22
- package/button-dropdown/item-element/styles.css.js +16 -16
- package/button-dropdown/item-element/styles.scoped.css +27 -27
- package/button-dropdown/item-element/styles.selectors.js +16 -16
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +11 -11
- package/checkbox/styles.selectors.js +3 -3
- package/content-layout/styles.css.js +14 -14
- package/content-layout/styles.scoped.css +27 -27
- package/content-layout/styles.selectors.js +14 -14
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +187 -187
- package/flashbar/styles.selectors.js +50 -50
- package/header/analytics/use-table-integration.d.ts +2 -1
- package/header/analytics/use-table-integration.d.ts.map +1 -1
- package/header/analytics/use-table-integration.js +8 -1
- package/header/analytics/use-table-integration.js.map +1 -1
- package/header/interfaces.d.ts +2 -2
- package/header/interfaces.d.ts.map +1 -1
- package/header/interfaces.js.map +1 -1
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +73 -73
- package/help-panel/styles.selectors.js +6 -6
- package/icon/generated/icons.d.ts +1 -0
- package/icon/generated/icons.d.ts.map +1 -1
- package/icon/generated/icons.js +3 -0
- package/icon/generated/icons.js.map +1 -1
- package/icon/interfaces.d.ts +1 -1
- package/icon/interfaces.d.ts.map +1 -1
- package/icon/interfaces.js.map +1 -1
- package/icon-provider/interfaces.d.ts +1 -0
- package/icon-provider/interfaces.d.ts.map +1 -1
- package/icon-provider/interfaces.js.map +1 -1
- package/input/styles.css.js +13 -13
- package/input/styles.scoped.css +65 -65
- package/input/styles.selectors.js +13 -13
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/components/drag-handle-wrapper/styles.css.js +20 -20
- package/internal/components/drag-handle-wrapper/styles.scoped.css +48 -48
- package/internal/components/drag-handle-wrapper/styles.selectors.js +20 -20
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +38 -38
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +25 -25
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/generated/custom-css-properties/index.d.ts +4 -0
- package/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/internal/generated/custom-css-properties/index.js +102 -98
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/generated/styles/tokens.d.ts +50 -75
- package/internal/generated/styles/tokens.js +50 -75
- package/internal/generated/theming/index.cjs +305 -461
- package/internal/generated/theming/index.js +305 -461
- package/internal/manifest.json +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +103 -103
- package/link/styles.selectors.js +20 -20
- package/package.json +1 -1
- package/progress-bar/index.d.ts.map +1 -1
- package/progress-bar/index.js +14 -54
- package/progress-bar/interfaces.d.ts +18 -0
- package/progress-bar/interfaces.d.ts.map +1 -1
- package/progress-bar/interfaces.js.map +1 -1
- package/progress-bar/internal-do-not-use-core.js +58 -0
- package/progress-bar/internal-do-not-use-core.js.map +1 -0
- package/progress-bar/internal.d.ts +3 -1
- package/progress-bar/internal.d.ts.map +1 -1
- package/progress-bar/internal.js +7 -3
- package/progress-bar/internal.js.map +1 -1
- package/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.d.ts +15 -0
- package/progress-bar/styles.d.ts.map +1 -0
- package/progress-bar/styles.js +33 -0
- package/progress-bar/styles.js.map +1 -0
- package/progress-bar/styles.scoped.css +56 -56
- package/progress-bar/styles.selectors.js +19 -19
- package/radio-group/analytics-metadata/interfaces.d.ts +1 -0
- package/radio-group/analytics-metadata/interfaces.d.ts.map +1 -1
- package/radio-group/analytics-metadata/interfaces.js.map +1 -1
- package/radio-group/analytics-metadata/styles.css.js +6 -0
- package/radio-group/analytics-metadata/styles.scoped.css +7 -0
- package/radio-group/analytics-metadata/styles.selectors.js +7 -0
- package/radio-group/index.d.ts.map +1 -1
- package/radio-group/internal-do-not-use-core.js +2 -0
- package/radio-group/internal-do-not-use-core.js.map +1 -1
- package/radio-group/internal.d.ts.map +1 -1
- package/radio-group/internal.js +2 -1
- package/radio-group/internal.js.map +1 -1
- package/radio-group/styles.css.js +10 -10
- package/radio-group/styles.scoped.css +22 -22
- package/radio-group/styles.selectors.js +10 -10
- package/s3-resource-selector/index.d.ts.map +1 -1
- package/s3-resource-selector/index.js +2 -2
- package/s3-resource-selector/index.js.map +1 -1
- package/s3-resource-selector/interfaces.d.ts +8 -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.d.ts +3 -0
- package/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
- package/s3-resource-selector/s3-in-context/index.js +8 -2
- package/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/slider/styles.css.js +26 -26
- package/slider/styles.scoped.css +86 -86
- package/slider/styles.selectors.js +26 -26
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +39 -39
- package/spinner/styles.selectors.js +13 -13
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +13 -13
- package/tag-editor/styles.selectors.js +3 -3
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +66 -66
- package/text-content/styles.selectors.js +1 -1
- package/textarea/styles.css.js +5 -5
- package/textarea/styles.scoped.css +41 -41
- package/textarea/styles.selectors.js +5 -5
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +23 -23
- package/toggle/styles.selectors.js +10 -10
- package/progress-bar/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/s3-resource-selector/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YA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Q,EAClB,OAAO,EAAE,OAAO,EAChB,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAClC,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,EAAE,CAAC,sBAAsB,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAC5F,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,GACxB;QACD,CAAC,SAAS,IAAI,KAAK,IAAI,CACtB,oBAAC,WAAW,IAAC,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IACvD,KAAK,CACM,CACf;QACA,SAAS,IAAI,oBAAC,OAAO,oBAAK,UAAU,EAAI,CACrC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC;AAC3D,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React, { useEffect, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport InternalBox from '../box/internal';\nimport { useFormFieldContext } from '../contexts/form-field';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { checkSafeUrl } from '../internal/utils/check-safe-url';\nimport { S3ResourceSelectorProps } from './interfaces';\nimport { S3InContext, S3InContextRef } from './s3-in-context';\nimport { S3Modal, S3ModalProps } from './s3-modal';\n\nimport styles from './styles.css.js';\n\nexport { S3ResourceSelectorProps };\n\nconst S3ResourceSelector = React.forwardRef(\n (\n {\n i18nStrings,\n inputPlaceholder,\n alert,\n resource,\n viewHref,\n invalid,\n selectableItemsTypes = [],\n inputAriaDescribedby,\n bucketsVisibleColumns = ['Name', 'CreationDate'],\n bucketsIsItemDisabled,\n fetchBuckets,\n fetchObjects,\n objectsVisibleColumns = ['Key', 'LastModified', 'Size'],\n objectsIsItemDisabled,\n fetchVersions,\n versionsVisibleColumns = ['ID', 'LastModified', 'Size'],\n versionsIsItemDisabled,\n onChange,\n ariaLabel,\n getModalRoot,\n removeModalRoot,\n onInputFocus,\n onInputBlur,\n ...rest\n }: S3ResourceSelectorProps,\n ref: React.Ref<S3ResourceSelectorProps.Ref>\n ) => {\n checkSafeUrl('S3ResourceSelector', viewHref);\n const { __internalRootRef } = useBaseComponent('S3ResourceSelector');\n const [modalOpen, setModalOpen] = useState(false);\n const inContextRef = useRef<S3InContextRef>(null);\n const modalWasSubmitted = useRef<boolean>(false);\n useForwardFocus(ref, inContextRef);\n const { ariaLabelledby, ariaDescribedby } = useFormFieldContext(rest);\n\n useEffect(() => {\n // Focus uriInput only when modal was submitted.\n // When it was dismissed, the focus naturally goes to previously focused element (browse button)\n if (!modalOpen && modalWasSubmitted.current) {\n modalWasSubmitted.current = false;\n inContextRef.current?.focus();\n }\n }, [modalOpen]);\n\n const baseProps = getBaseProps(rest);\n const modalProps: S3ModalProps = {\n alert,\n i18nStrings,\n fetchBuckets,\n selectableItemsTypes,\n bucketsVisibleColumns,\n bucketsIsItemDisabled,\n fetchObjects,\n objectsVisibleColumns,\n objectsIsItemDisabled,\n fetchVersions,\n versionsVisibleColumns,\n versionsIsItemDisabled,\n getModalRoot,\n removeModalRoot,\n onSubmit: resource => {\n fireNonCancelableEvent(onChange, { resource });\n setModalOpen(false);\n modalWasSubmitted.current = true;\n },\n onDismiss: () => setModalOpen(false),\n };\n return (\n <div\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n ref={__internalRootRef}\n role=\"group\"\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n aria-label={ariaLabel}\n >\n <S3InContext\n ref={inContextRef}\n selectableItemsTypes={selectableItemsTypes}\n i18nStrings={i18nStrings}\n inputPlaceholder={inputPlaceholder}\n resource={resource}\n viewHref={viewHref}\n invalid={invalid}\n inputAriaDescribedby={inputAriaDescribedby}\n fetchVersions={fetchVersions}\n onBrowse={() => setModalOpen(true)}\n onChange={(resource, errorText) => fireNonCancelableEvent(onChange, { resource, errorText })}\n onInputFocus={onInputFocus}\n onInputBlur={onInputBlur}\n />\n {!modalOpen && alert && (\n <InternalBox className={styles.alert} margin={{ top: 's' }}>\n {alert}\n </InternalBox>\n )}\n {modalOpen && <S3Modal {...modalProps} />}\n </div>\n );\n }\n);\n\napplyDisplayName(S3ResourceSelector, 'S3ResourceSelector');\nexport default S3ResourceSelector;\n"]}
|
|
@@ -133,6 +133,14 @@ export interface S3ResourceSelectorProps extends BaseComponentProps, BaseModalPr
|
|
|
133
133
|
* - `Size` (number) - (Optional) Size of the object version.
|
|
134
134
|
*/
|
|
135
135
|
fetchVersions: (bucketName: string, pathPrefix: string) => Promise<ReadonlyArray<S3ResourceSelectorProps.Version>>;
|
|
136
|
+
/**
|
|
137
|
+
* Called when input focus is removed from the S3 URI input.
|
|
138
|
+
*/
|
|
139
|
+
onInputBlur?: NonCancelableEventHandler<null>;
|
|
140
|
+
/**
|
|
141
|
+
* Called when input focus is moved to the S3 URI input.
|
|
142
|
+
*/
|
|
143
|
+
onInputFocus?: NonCancelableEventHandler<null>;
|
|
136
144
|
/**
|
|
137
145
|
* Fired when the resource selection is changed. The event detail object contains resource that represents the full
|
|
138
146
|
* path of the selected resource and `errorText` that may contain a validation error.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/s3-resource-selector/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAA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iB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;KACf;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/s3-resource-selector/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseModalProps } from '../modal/interfaces';\nimport { PaginationProps } from '../pagination/interfaces';\nimport { TableProps } from '../table/interfaces';\n\nexport interface S3ResourceSelectorProps extends BaseComponentProps, BaseModalProps {\n /**\n * Specifies additional information about component status.\n */\n alert?: React.ReactNode;\n\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for each element that you want to use as a description\n * and set the property to a string of each ID separated by spaces (for example, `\"id1 id2 id3\"`).\n */\n ariaDescribedby?: string;\n\n /**\n * Adds `aria-label` to the component.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the S3 URI input. If you're using this component within a form field,\n * you do not need to set this property, as the form field component will set it automatically.\n *\n * Use this property if the component isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n inputAriaDescribedby?: string;\n\n /**\n * Adds a placeholder to the S3 URI input.\n */\n inputPlaceholder?: string;\n\n /**\n * An array of the item types that are selectable in the table view. The array may contain the following items:\n * 'buckets', 'objects', or 'versions'. Example: ['buckets', 'objects']. By default, no items are selectable.\n * This property determines whether the component operates in Read mode or Write mode:\n * * Read mode - When 'objects' and 'versions' values are provided (folder selection should be disabled by\n * customizing `objectsIsItemDisabled` function).\n * * Write mode - When 'buckets' and 'objects' values are provided (file selection should be disabled by\n * customizing `objectsIsItemDisabled` function).\n */\n selectableItemsTypes?: ReadonlyArray<S3ResourceSelectorProps.SelectableItems>;\n\n /**\n * Href of the selected object that is applied to the View button.\n */\n viewHref?: string;\n\n /**\n * Whether the S3 URI input field is in invalid state.\n */\n invalid?: boolean;\n\n /**\n * Optionally overrides the set of visible columns in the Buckets view. Available columns: 'Name', 'CreationDate',\n * and 'Region'.\n */\n bucketsVisibleColumns?: ReadonlyArray<string>;\n\n /**\n * Optionally overrides the set of visible columns in the Objects view. Available columns: 'Key', 'LastModified',\n * and 'Size'.\n */\n objectsVisibleColumns?: ReadonlyArray<string>;\n\n /**\n * Optionally overrides the set of visible columns in the Versions view. Available columns: 'ID', 'CreationDate',\n * and 'Size'.\n */\n versionsVisibleColumns?: ReadonlyArray<string>;\n\n /**\n * Optionally overrides whether a bucket should be disabled for selection in the Buckets view or not.\n * It has higher priority than `selectableItemsTypes`. Example: if `selectableItemsTypes` has `['buckets']` value and\n * `bucketsIsItemDisabled` returns false for a bucket, then the bucket is disabled for selection.\n */\n bucketsIsItemDisabled?: (item: S3ResourceSelectorProps.Bucket) => boolean;\n\n /**\n * Optionally overrides whether an object should be disabled for selection in the Objects view or not. Similar to\n * `bucketsIsItemDisabled` this property takes precedence over the `selectableItemsTypes` property.\n */\n objectsIsItemDisabled?: (item: S3ResourceSelectorProps.Object) => boolean;\n\n /**\n * Optionally overrides whether a version should be disabled for selection in the Versions view or not. Similar to\n * `bucketsIsItemDisabled` this property takes precedence over the `selectableItemsTypes` property.\n */\n versionsIsItemDisabled?: (item: S3ResourceSelectorProps.Version) => boolean;\n\n /**\n * The current selected resource. Resource has the following properties:\n * - `uri` (string) - URI of the resource.\n * - `versionId` (string) - (Optional) Version ID of the selected resource.\n */\n resource: S3ResourceSelectorProps.Resource;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: S3ResourceSelectorProps.I18nStrings;\n\n /**\n * Specifies a function that returns all available buckets. The return type of the function should be a promise\n * that resolves to a list of objects with the following properties:\n * - `Name` (string) - Name of the bucket.\n * - `CreationDate` (string) - (Optional) Creation date of the bucket.\n * - `Region` (string) - (Optional) Region of the bucket.\n */\n fetchBuckets: () => Promise<ReadonlyArray<S3ResourceSelectorProps.Bucket>>;\n\n /**\n * Specifies a function that returns available objects and object prefixes for the given `bucketName` and `pathPrefix`.\n * The return type of the function should be a promise that resolves to a list of objects with the following properties:\n * - `Key` (string) - Name of the object or object prefix.\n * - `LastModified` (string) - (Optional) Date when this object was last modified.\n * - `Size` (number) - (Optional) Size of the object.\n * - `IsFolder` (boolean) - (Optional) Determines whether the entry is an object prefix (folder).\n */\n fetchObjects: (bucketName: string, pathPrefix: string) => Promise<ReadonlyArray<S3ResourceSelectorProps.Object>>;\n\n /**\n * Specifies a function that returns available versions for the given `bucketName` and `pathPrefix`.\n * The return type of the function should be a promise that resolves to a list of versions with the following properties:\n * - `VersionId` (string) - Version ID of an object.\n * - `LastModified` (string) - (Optional) Date when this object was last modified.\n * - `Size` (number) - (Optional) Size of the object version.\n */\n fetchVersions: (bucketName: string, pathPrefix: string) => Promise<ReadonlyArray<S3ResourceSelectorProps.Version>>;\n\n /**\n * Fired when the resource selection is changed. The event detail object contains resource that represents the full\n * path of the selected resource and `errorText` that may contain a validation error.\n */\n onChange?: NonCancelableEventHandler<S3ResourceSelectorProps.ChangeDetail>;\n}\n\n// Does not use TableProps.AriaLabels, because here we do not need \"allItemsSelectionLabel\"\n// it is not applicable to single selection mode\ninterface SelectionLabels<T> {\n itemSelectionLabel: (data: TableProps.SelectionState<T>, row: T) => string;\n selectionGroupLabel: string;\n}\n\ntype SortingColumnContainingString = (columnName: string) => string;\n\nexport namespace S3ResourceSelectorProps {\n export interface Bucket {\n Name?: string;\n CreationDate?: string;\n // artificial field, does not exist on the real s3 response\n Region?: string;\n }\n export interface Object {\n Key?: string;\n LastModified?: string;\n Size?: number;\n // artificial field, does not exist on the real s3 response\n IsFolder?: boolean;\n }\n export interface Version {\n VersionId?: string;\n LastModified?: string;\n Size?: number;\n }\n\n export interface Resource {\n uri: string;\n versionId?: string;\n }\n\n export type SelectableItems = 'buckets' | 'objects' | 'versions';\n\n export interface I18nStrings {\n /**\n * @deprecated Use `inputPlaceholder` on the component instead.\n */\n inContextInputPlaceholder?: string;\n inContextInputClearAriaLabel?: string;\n inContextSelectPlaceholder?: string;\n inContextBrowseButton?: string;\n inContextViewButton?: string;\n inContextViewButtonAriaLabel?: string;\n inContextLoadingText?: string;\n inContextUriLabel?: string;\n inContextVersionSelectLabel?: string;\n\n modalTitle?: string;\n modalCancelButton?: string;\n modalSubmitButton?: string;\n modalBreadcrumbRootItem?: string;\n modalLastUpdatedText?: string;\n\n selectionBuckets?: string;\n selectionObjects?: string;\n selectionVersions?: string;\n selectionBucketsSearchPlaceholder?: string;\n selectionObjectsSearchPlaceholder?: string;\n selectionVersionsSearchPlaceholder?: string;\n selectionBucketsLoading?: string;\n selectionBucketsNoItems?: string;\n selectionObjectsLoading?: string;\n selectionObjectsNoItems?: string;\n selectionVersionsLoading?: string;\n selectionVersionsNoItems?: string;\n\n filteringCounterText?: (count: number) => string;\n filteringNoMatches?: string;\n filteringCantFindMatch?: string;\n clearFilterButtonText?: string;\n\n columnBucketName?: string;\n columnBucketCreationDate?: string;\n columnBucketRegion?: string;\n columnObjectKey?: string;\n columnObjectLastModified?: string;\n columnObjectSize?: string;\n columnVersionID?: string;\n columnVersionLastModified?: string;\n columnVersionSize?: string;\n\n validationPathMustBegin?: string;\n validationBucketLowerCase?: string;\n validationBucketMustNotContain?: string;\n validationBucketLength?: string;\n validationBucketMustComplyDns?: string;\n\n labelSortedDescending?: SortingColumnContainingString;\n labelSortedAscending?: SortingColumnContainingString;\n labelNotSorted?: SortingColumnContainingString;\n labelsPagination?: PaginationProps.Labels;\n labelsBucketsSelection?: SelectionLabels<Bucket>;\n labelsObjectsSelection?: SelectionLabels<S3ResourceSelectorProps.Object>;\n labelsVersionsSelection?: SelectionLabels<Version>;\n labelFiltering?: (itemsType: string) => string;\n labelRefresh?: string;\n labelModalDismiss?: string;\n labelBreadcrumbs?: string;\n labelExpandBreadcrumbs?: string;\n labelClearFilter?: string;\n labelIconObject?: string;\n labelIconFolder?: string;\n }\n\n export interface ChangeDetail {\n resource: Resource;\n errorText?: string;\n }\n\n export interface Ref {\n /**\n * Focuses the S3 URI input field\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/s3-resource-selector/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { BaseModalProps } from '../modal/interfaces';\nimport { PaginationProps } from '../pagination/interfaces';\nimport { TableProps } from '../table/interfaces';\n\nexport interface S3ResourceSelectorProps extends BaseComponentProps, BaseModalProps {\n /**\n * Specifies additional information about component status.\n */\n alert?: React.ReactNode;\n\n /**\n * Adds `aria-labelledby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n ariaLabelledby?: string;\n\n /**\n * Adds `aria-describedby` to the component. If you're using this component within a form field,\n * don't set this property because the form field component automatically sets it.\n *\n * Use this property if the component isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for each element that you want to use as a description\n * and set the property to a string of each ID separated by spaces (for example, `\"id1 id2 id3\"`).\n */\n ariaDescribedby?: string;\n\n /**\n * Adds `aria-label` to the component.\n */\n ariaLabel?: string;\n\n /**\n * Adds `aria-labelledby` to the S3 URI input. If you're using this component within a form field,\n * you do not need to set this property, as the form field component will set it automatically.\n *\n * Use this property if the component isn't surrounded by a form field, or you want to override the value\n * automatically set by the form field (for example, if you have two components within a single form field).\n *\n * To use it correctly, define an ID for the element you want to use as label and set the property to that ID.\n */\n inputAriaDescribedby?: string;\n\n /**\n * Adds a placeholder to the S3 URI input.\n */\n inputPlaceholder?: string;\n\n /**\n * An array of the item types that are selectable in the table view. The array may contain the following items:\n * 'buckets', 'objects', or 'versions'. Example: ['buckets', 'objects']. By default, no items are selectable.\n * This property determines whether the component operates in Read mode or Write mode:\n * * Read mode - When 'objects' and 'versions' values are provided (folder selection should be disabled by\n * customizing `objectsIsItemDisabled` function).\n * * Write mode - When 'buckets' and 'objects' values are provided (file selection should be disabled by\n * customizing `objectsIsItemDisabled` function).\n */\n selectableItemsTypes?: ReadonlyArray<S3ResourceSelectorProps.SelectableItems>;\n\n /**\n * Href of the selected object that is applied to the View button.\n */\n viewHref?: string;\n\n /**\n * Whether the S3 URI input field is in invalid state.\n */\n invalid?: boolean;\n\n /**\n * Optionally overrides the set of visible columns in the Buckets view. Available columns: 'Name', 'CreationDate',\n * and 'Region'.\n */\n bucketsVisibleColumns?: ReadonlyArray<string>;\n\n /**\n * Optionally overrides the set of visible columns in the Objects view. Available columns: 'Key', 'LastModified',\n * and 'Size'.\n */\n objectsVisibleColumns?: ReadonlyArray<string>;\n\n /**\n * Optionally overrides the set of visible columns in the Versions view. Available columns: 'ID', 'CreationDate',\n * and 'Size'.\n */\n versionsVisibleColumns?: ReadonlyArray<string>;\n\n /**\n * Optionally overrides whether a bucket should be disabled for selection in the Buckets view or not.\n * It has higher priority than `selectableItemsTypes`. Example: if `selectableItemsTypes` has `['buckets']` value and\n * `bucketsIsItemDisabled` returns false for a bucket, then the bucket is disabled for selection.\n */\n bucketsIsItemDisabled?: (item: S3ResourceSelectorProps.Bucket) => boolean;\n\n /**\n * Optionally overrides whether an object should be disabled for selection in the Objects view or not. Similar to\n * `bucketsIsItemDisabled` this property takes precedence over the `selectableItemsTypes` property.\n */\n objectsIsItemDisabled?: (item: S3ResourceSelectorProps.Object) => boolean;\n\n /**\n * Optionally overrides whether a version should be disabled for selection in the Versions view or not. Similar to\n * `bucketsIsItemDisabled` this property takes precedence over the `selectableItemsTypes` property.\n */\n versionsIsItemDisabled?: (item: S3ResourceSelectorProps.Version) => boolean;\n\n /**\n * The current selected resource. Resource has the following properties:\n * - `uri` (string) - URI of the resource.\n * - `versionId` (string) - (Optional) Version ID of the selected resource.\n */\n resource: S3ResourceSelectorProps.Resource;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: S3ResourceSelectorProps.I18nStrings;\n\n /**\n * Specifies a function that returns all available buckets. The return type of the function should be a promise\n * that resolves to a list of objects with the following properties:\n * - `Name` (string) - Name of the bucket.\n * - `CreationDate` (string) - (Optional) Creation date of the bucket.\n * - `Region` (string) - (Optional) Region of the bucket.\n */\n fetchBuckets: () => Promise<ReadonlyArray<S3ResourceSelectorProps.Bucket>>;\n\n /**\n * Specifies a function that returns available objects and object prefixes for the given `bucketName` and `pathPrefix`.\n * The return type of the function should be a promise that resolves to a list of objects with the following properties:\n * - `Key` (string) - Name of the object or object prefix.\n * - `LastModified` (string) - (Optional) Date when this object was last modified.\n * - `Size` (number) - (Optional) Size of the object.\n * - `IsFolder` (boolean) - (Optional) Determines whether the entry is an object prefix (folder).\n */\n fetchObjects: (bucketName: string, pathPrefix: string) => Promise<ReadonlyArray<S3ResourceSelectorProps.Object>>;\n\n /**\n * Specifies a function that returns available versions for the given `bucketName` and `pathPrefix`.\n * The return type of the function should be a promise that resolves to a list of versions with the following properties:\n * - `VersionId` (string) - Version ID of an object.\n * - `LastModified` (string) - (Optional) Date when this object was last modified.\n * - `Size` (number) - (Optional) Size of the object version.\n */\n fetchVersions: (bucketName: string, pathPrefix: string) => Promise<ReadonlyArray<S3ResourceSelectorProps.Version>>;\n\n /**\n * Called when input focus is removed from the S3 URI input.\n */\n onInputBlur?: NonCancelableEventHandler<null>;\n\n /**\n * Called when input focus is moved to the S3 URI input.\n */\n onInputFocus?: NonCancelableEventHandler<null>;\n\n /**\n * Fired when the resource selection is changed. The event detail object contains resource that represents the full\n * path of the selected resource and `errorText` that may contain a validation error.\n */\n onChange?: NonCancelableEventHandler<S3ResourceSelectorProps.ChangeDetail>;\n}\n\n// Does not use TableProps.AriaLabels, because here we do not need \"allItemsSelectionLabel\"\n// it is not applicable to single selection mode\ninterface SelectionLabels<T> {\n itemSelectionLabel: (data: TableProps.SelectionState<T>, row: T) => string;\n selectionGroupLabel: string;\n}\n\ntype SortingColumnContainingString = (columnName: string) => string;\n\nexport namespace S3ResourceSelectorProps {\n export interface Bucket {\n Name?: string;\n CreationDate?: string;\n // artificial field, does not exist on the real s3 response\n Region?: string;\n }\n export interface Object {\n Key?: string;\n LastModified?: string;\n Size?: number;\n // artificial field, does not exist on the real s3 response\n IsFolder?: boolean;\n }\n export interface Version {\n VersionId?: string;\n LastModified?: string;\n Size?: number;\n }\n\n export interface Resource {\n uri: string;\n versionId?: string;\n }\n\n export type SelectableItems = 'buckets' | 'objects' | 'versions';\n\n export interface I18nStrings {\n /**\n * @deprecated Use `inputPlaceholder` on the component instead.\n */\n inContextInputPlaceholder?: string;\n inContextInputClearAriaLabel?: string;\n inContextSelectPlaceholder?: string;\n inContextBrowseButton?: string;\n inContextViewButton?: string;\n inContextViewButtonAriaLabel?: string;\n inContextLoadingText?: string;\n inContextUriLabel?: string;\n inContextVersionSelectLabel?: string;\n\n modalTitle?: string;\n modalCancelButton?: string;\n modalSubmitButton?: string;\n modalBreadcrumbRootItem?: string;\n modalLastUpdatedText?: string;\n\n selectionBuckets?: string;\n selectionObjects?: string;\n selectionVersions?: string;\n selectionBucketsSearchPlaceholder?: string;\n selectionObjectsSearchPlaceholder?: string;\n selectionVersionsSearchPlaceholder?: string;\n selectionBucketsLoading?: string;\n selectionBucketsNoItems?: string;\n selectionObjectsLoading?: string;\n selectionObjectsNoItems?: string;\n selectionVersionsLoading?: string;\n selectionVersionsNoItems?: string;\n\n filteringCounterText?: (count: number) => string;\n filteringNoMatches?: string;\n filteringCantFindMatch?: string;\n clearFilterButtonText?: string;\n\n columnBucketName?: string;\n columnBucketCreationDate?: string;\n columnBucketRegion?: string;\n columnObjectKey?: string;\n columnObjectLastModified?: string;\n columnObjectSize?: string;\n columnVersionID?: string;\n columnVersionLastModified?: string;\n columnVersionSize?: string;\n\n validationPathMustBegin?: string;\n validationBucketLowerCase?: string;\n validationBucketMustNotContain?: string;\n validationBucketLength?: string;\n validationBucketMustComplyDns?: string;\n\n labelSortedDescending?: SortingColumnContainingString;\n labelSortedAscending?: SortingColumnContainingString;\n labelNotSorted?: SortingColumnContainingString;\n labelsPagination?: PaginationProps.Labels;\n labelsBucketsSelection?: SelectionLabels<Bucket>;\n labelsObjectsSelection?: SelectionLabels<S3ResourceSelectorProps.Object>;\n labelsVersionsSelection?: SelectionLabels<Version>;\n labelFiltering?: (itemsType: string) => string;\n labelRefresh?: string;\n labelModalDismiss?: string;\n labelBreadcrumbs?: string;\n labelExpandBreadcrumbs?: string;\n labelClearFilter?: string;\n labelIconObject?: string;\n labelIconFolder?: string;\n }\n\n export interface ChangeDetail {\n resource: Resource;\n errorText?: string;\n }\n\n export interface Ref {\n /**\n * Focuses the S3 URI input field\n */\n focus(): void;\n }\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { NonCancelableEventHandler } from '../../internal/events';
|
|
2
3
|
import { S3ResourceSelectorProps } from '../interfaces';
|
|
3
4
|
interface S3InContextProps {
|
|
4
5
|
i18nStrings: S3ResourceSelectorProps.I18nStrings | undefined;
|
|
@@ -9,6 +10,8 @@ interface S3InContextProps {
|
|
|
9
10
|
inputAriaDescribedby: string | undefined;
|
|
10
11
|
selectableItemsTypes: S3ResourceSelectorProps['selectableItemsTypes'];
|
|
11
12
|
fetchVersions: S3ResourceSelectorProps['fetchVersions'];
|
|
13
|
+
onInputBlur: NonCancelableEventHandler<null> | undefined;
|
|
14
|
+
onInputFocus: NonCancelableEventHandler<null> | undefined;
|
|
12
15
|
onBrowse: () => void;
|
|
13
16
|
onChange: (newResource: S3ResourceSelectorProps.Resource, errorText: string | undefined) => void;
|
|
14
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/s3-resource-selector/s3-in-context/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/s3-resource-selector/s3-in-context/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAO3D,OAAO,EAAoD,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAKpH,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAOxD,UAAU,gBAAgB;IACxB,WAAW,EAAE,uBAAuB,CAAC,WAAW,GAAG,SAAS,CAAC;IAC7D,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,QAAQ,EAAE,uBAAuB,CAAC,QAAQ,CAAC;IAC3C,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,oBAAoB,EAAE,uBAAuB,CAAC,sBAAsB,CAAC,CAAC;IACtE,aAAa,EAAE,uBAAuB,CAAC,eAAe,CAAC,CAAC;IACxD,WAAW,EAAE,yBAAyB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IACzD,YAAY,EAAE,yBAAyB,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,WAAW,EAAE,uBAAuB,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAClG;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,IAAI,IAAI,CAAC;CACf;AAED,eAAO,MAAM,WAAW,yFAmIvB,CAAC"}
|
|
@@ -5,6 +5,7 @@ import InternalBox from '../../box/internal';
|
|
|
5
5
|
import { InternalButton } from '../../button/internal';
|
|
6
6
|
import InternalFormField from '../../form-field/internal';
|
|
7
7
|
import { useInternalI18n } from '../../i18n/context';
|
|
8
|
+
import { fireNonCancelableEvent } from '../../internal/events';
|
|
8
9
|
import useForwardFocus from '../../internal/hooks/forward-focus';
|
|
9
10
|
import InternalLiveRegion from '../../live-region/internal';
|
|
10
11
|
import InternalSelect from '../../select/internal';
|
|
@@ -13,7 +14,7 @@ import { SearchInput } from './search-input';
|
|
|
13
14
|
import { useVersionsFetch } from './use-versions-fetch';
|
|
14
15
|
import { getErrorText, validate } from './validation';
|
|
15
16
|
import styles from './styles.css.js';
|
|
16
|
-
export const S3InContext = React.forwardRef(({ i18nStrings, inputPlaceholder, resource, viewHref, invalid, inputAriaDescribedby, selectableItemsTypes, fetchVersions, onChange, onBrowse, }, ref) => {
|
|
17
|
+
export const S3InContext = React.forwardRef(({ i18nStrings, inputPlaceholder, resource, viewHref, invalid, inputAriaDescribedby, selectableItemsTypes, fetchVersions, onInputBlur, onInputFocus, onChange, onBrowse, }, ref) => {
|
|
17
18
|
const i18n = useInternalI18n('s3-resource-selector');
|
|
18
19
|
const isInputBlurredRef = useRef(true);
|
|
19
20
|
const [isInputTouched, setInputTouched] = useState(false);
|
|
@@ -34,10 +35,15 @@ export const S3InContext = React.forwardRef(({ i18nStrings, inputPlaceholder, re
|
|
|
34
35
|
setInputTouched(true);
|
|
35
36
|
const errorCode = validate(resource.uri);
|
|
36
37
|
onChange(resource, getErrorText(i18n, i18nStrings, errorCode));
|
|
38
|
+
fireNonCancelableEvent(onInputBlur);
|
|
37
39
|
if (supportsVersions) {
|
|
38
40
|
loadVersions(resource.uri);
|
|
39
41
|
}
|
|
40
42
|
}
|
|
43
|
+
function handleUriFocus() {
|
|
44
|
+
isInputBlurredRef.current = false;
|
|
45
|
+
fireNonCancelableEvent(onInputFocus);
|
|
46
|
+
}
|
|
41
47
|
useEffect(() => {
|
|
42
48
|
var _a;
|
|
43
49
|
if (!isInputBlurredRef.current || !supportsVersions) {
|
|
@@ -49,7 +55,7 @@ export const S3InContext = React.forwardRef(({ i18nStrings, inputPlaceholder, re
|
|
|
49
55
|
return (React.createElement("div", { className: styles.root },
|
|
50
56
|
React.createElement("div", { className: styles.layout },
|
|
51
57
|
React.createElement(InternalFormField, { className: styles['layout-uri'], label: i18n('i18nStrings.inContextUriLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.inContextUriLabel), stretch: true },
|
|
52
|
-
React.createElement(SearchInput, { ref: inputRef, value: uri, ariaDescribedby: inputAriaDescribedby, clearAriaLabel: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.inContextInputClearAriaLabel, placeholder: inputPlaceholder !== null && inputPlaceholder !== void 0 ? inputPlaceholder : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.inContextInputPlaceholder, onChange: handleUriChange, invalid: invalid, onFocus:
|
|
58
|
+
React.createElement(SearchInput, { ref: inputRef, value: uri, ariaDescribedby: inputAriaDescribedby, clearAriaLabel: i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.inContextInputClearAriaLabel, placeholder: inputPlaceholder !== null && inputPlaceholder !== void 0 ? inputPlaceholder : i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.inContextInputPlaceholder, onChange: handleUriChange, invalid: invalid, onFocus: handleUriFocus, onBlur: handleUriBlur })),
|
|
53
59
|
supportsVersions && (React.createElement(InternalFormField, { className: styles['layout-version'], label: i18n('i18nStrings.inContextVersionSelectLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.inContextVersionSelectLabel), stretch: true },
|
|
54
60
|
React.createElement(InternalSelect, { selectedOption: selectedVersion, placeholder: i18n('i18nStrings.inContextSelectPlaceholder', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.inContextSelectPlaceholder), disabled: versions.length === 0, options: versions, onChange: event => onChange(Object.assign(Object.assign({}, resource), { versionId: event.detail.selectedOption.value }), undefined), invalid: false }))),
|
|
55
61
|
React.createElement("div", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/s3-resource-selector/s3-in-context/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,iBAAiB,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,eAAe,MAAM,oCAAoC,CAAC;AACjE,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,uBAAuB,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAmBrC,MAAM,CAAC,MAAM,WAAW,GAAG,KAAK,C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C,GAAI;YAC5C;gBACE,oBAAC,cAAc,IAAC,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAC,MAAM,EAAC,OAAO,EAAE,QAAQ,IACvG,IAAI,CAAC,mCAAmC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,qBAAqB,CAAC,CAC/D,CACb,CACF;QAEN,oBAAC,kBAAkB,IAAC,SAAS,EAAE,IAAI,IAChC,OAAO,IAAI,CACV,oBAAC,WAAW,IAAC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;YAC/B,oBAAC,uBAAuB,IAAC,IAAI,EAAC,SAAS,IACpC,IAAI,CAAC,kCAAkC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,CAAC,CACpD,CACd,CACf,CACkB,CACjB,CACP,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport InternalBox from '../../box/internal';\nimport { InternalButton } from '../../button/internal';\nimport InternalFormField from '../../form-field/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { InputProps } from '../../input/interfaces';\nimport { NonCancelableCustomEvent } from '../../internal/events';\nimport useForwardFocus from '../../internal/hooks/forward-focus';\nimport InternalLiveRegion from '../../live-region/internal';\nimport InternalSelect from '../../select/internal';\nimport InternalStatusIndicator from '../../status-indicator/internal';\nimport { S3ResourceSelectorProps } from '../interfaces';\nimport { SearchInput } from './search-input';\nimport { useVersionsFetch } from './use-versions-fetch';\nimport { getErrorText, validate } from './validation';\n\nimport styles from './styles.css.js';\n\ninterface S3InContextProps {\n i18nStrings: S3ResourceSelectorProps.I18nStrings | undefined;\n inputPlaceholder: string | undefined;\n resource: S3ResourceSelectorProps.Resource;\n viewHref: string | undefined;\n invalid: boolean | undefined;\n inputAriaDescribedby: string | undefined;\n selectableItemsTypes: S3ResourceSelectorProps['selectableItemsTypes'];\n fetchVersions: S3ResourceSelectorProps['fetchVersions'];\n onBrowse: () => void;\n onChange: (newResource: S3ResourceSelectorProps.Resource, errorText: string | undefined) => void;\n}\n\nexport interface S3InContextRef {\n focus(): void;\n}\n\nexport const S3InContext = React.forwardRef(\n (\n {\n i18nStrings,\n inputPlaceholder,\n resource,\n viewHref,\n invalid,\n inputAriaDescribedby,\n selectableItemsTypes,\n fetchVersions,\n onChange,\n onBrowse,\n }: S3InContextProps,\n ref: React.Ref<S3InContextRef>\n ) => {\n const i18n = useInternalI18n('s3-resource-selector');\n const isInputBlurredRef = useRef(true);\n const [isInputTouched, setInputTouched] = useState(false);\n const { versions, loading, loadVersions, resetVersions } = useVersionsFetch(fetchVersions);\n const inputRef = useRef<HTMLInputElement>(null);\n\n useForwardFocus(ref, inputRef);\n\n const uri = resource.uri;\n const supportsVersions = selectableItemsTypes && selectableItemsTypes.indexOf('versions') > -1;\n const selectedVersion = versions.filter(version => version.value === resource.versionId)[0] || null;\n\n function handleUriChange(event: NonCancelableCustomEvent<InputProps.ChangeDetail>) {\n const uri = event.detail.value;\n const errorCode = isInputTouched ? validate(uri) : undefined;\n resetVersions();\n onChange({ uri }, getErrorText(i18n, i18nStrings, errorCode));\n }\n\n function handleUriBlur() {\n isInputBlurredRef.current = true;\n setInputTouched(true);\n const errorCode = validate(resource.uri);\n onChange(resource, getErrorText(i18n, i18nStrings, errorCode));\n if (supportsVersions) {\n loadVersions(resource.uri);\n }\n }\n\n useEffect(() => {\n if (!isInputBlurredRef.current || !supportsVersions) {\n return;\n }\n const { cancel } = loadVersions(uri) ?? {};\n return cancel;\n }, [uri, supportsVersions, loadVersions]);\n\n return (\n <div className={styles.root}>\n <div className={styles.layout}>\n <InternalFormField\n className={styles['layout-uri']}\n label={i18n('i18nStrings.inContextUriLabel', i18nStrings?.inContextUriLabel)}\n stretch={true}\n >\n <SearchInput\n ref={inputRef}\n value={uri}\n ariaDescribedby={inputAriaDescribedby}\n clearAriaLabel={i18nStrings?.inContextInputClearAriaLabel}\n placeholder={inputPlaceholder ?? i18nStrings?.inContextInputPlaceholder}\n onChange={handleUriChange}\n invalid={invalid}\n onFocus={() => (isInputBlurredRef.current = false)}\n onBlur={handleUriBlur}\n />\n </InternalFormField>\n {supportsVersions && (\n <InternalFormField\n className={styles['layout-version']}\n label={i18n('i18nStrings.inContextVersionSelectLabel', i18nStrings?.inContextVersionSelectLabel)}\n stretch={true}\n >\n <InternalSelect\n selectedOption={selectedVersion}\n placeholder={i18n('i18nStrings.inContextSelectPlaceholder', i18nStrings?.inContextSelectPlaceholder)}\n disabled={versions.length === 0}\n options={versions}\n onChange={event => onChange({ ...resource, versionId: event.detail.selectedOption.value }, undefined)}\n invalid={false} // invalid state should not highlight the select, only the text input\n />\n </InternalFormField>\n )}\n <div>\n <InternalButton\n className={styles['view-button']}\n disabled={!viewHref}\n href={viewHref}\n target=\"_blank\"\n iconName=\"external\"\n iconAlign=\"right\"\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.inContextViewButtonAriaLabel', i18nStrings?.inContextViewButtonAriaLabel)}\n >\n {i18n('i18nStrings.inContextViewButton', i18nStrings?.inContextViewButton)}\n </InternalButton>\n </div>\n <div className={styles['layout-divider']} />\n <div>\n <InternalButton className={styles['browse-button']} disabled={loading} formAction=\"none\" onClick={onBrowse}>\n {i18n('i18nStrings.inContextBrowseButton', i18nStrings?.inContextBrowseButton)}\n </InternalButton>\n </div>\n </div>\n\n <InternalLiveRegion assertive={true}>\n {loading && (\n <InternalBox margin={{ top: 's' }}>\n <InternalStatusIndicator type=\"loading\">\n {i18n('i18nStrings.inContextLoadingText', i18nStrings?.inContextLoadingText)}\n </InternalStatusIndicator>\n </InternalBox>\n )}\n </InternalLiveRegion>\n </div>\n );\n }\n);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/s3-resource-selector/s3-in-context/index.tsx"],"names":[],"m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,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;YAC/B,oBAAC,uBAAuB,IAAC,IAAI,EAAC,SAAS,IACpC,IAAI,CAAC,kCAAkC,EAAE,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,oBAAoB,CAAC,CACpD,CACd,CACf,CACkB,CACjB,CACP,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useEffect, useRef, useState } from 'react';\n\nimport InternalBox from '../../box/internal';\nimport { InternalButton } from '../../button/internal';\nimport InternalFormField from '../../form-field/internal';\nimport { useInternalI18n } from '../../i18n/context';\nimport { InputProps } from '../../input/interfaces';\nimport { fireNonCancelableEvent, NonCancelableCustomEvent, NonCancelableEventHandler } from '../../internal/events';\nimport useForwardFocus from '../../internal/hooks/forward-focus';\nimport InternalLiveRegion from '../../live-region/internal';\nimport InternalSelect from '../../select/internal';\nimport InternalStatusIndicator from '../../status-indicator/internal';\nimport { S3ResourceSelectorProps } from '../interfaces';\nimport { SearchInput } from './search-input';\nimport { useVersionsFetch } from './use-versions-fetch';\nimport { getErrorText, validate } from './validation';\n\nimport styles from './styles.css.js';\n\ninterface S3InContextProps {\n i18nStrings: S3ResourceSelectorProps.I18nStrings | undefined;\n inputPlaceholder: string | undefined;\n resource: S3ResourceSelectorProps.Resource;\n viewHref: string | undefined;\n invalid: boolean | undefined;\n inputAriaDescribedby: string | undefined;\n selectableItemsTypes: S3ResourceSelectorProps['selectableItemsTypes'];\n fetchVersions: S3ResourceSelectorProps['fetchVersions'];\n onInputBlur: NonCancelableEventHandler<null> | undefined;\n onInputFocus: NonCancelableEventHandler<null> | undefined;\n onBrowse: () => void;\n onChange: (newResource: S3ResourceSelectorProps.Resource, errorText: string | undefined) => void;\n}\n\nexport interface S3InContextRef {\n focus(): void;\n}\n\nexport const S3InContext = React.forwardRef(\n (\n {\n i18nStrings,\n inputPlaceholder,\n resource,\n viewHref,\n invalid,\n inputAriaDescribedby,\n selectableItemsTypes,\n fetchVersions,\n onInputBlur,\n onInputFocus,\n onChange,\n onBrowse,\n }: S3InContextProps,\n ref: React.Ref<S3InContextRef>\n ) => {\n const i18n = useInternalI18n('s3-resource-selector');\n const isInputBlurredRef = useRef(true);\n const [isInputTouched, setInputTouched] = useState(false);\n const { versions, loading, loadVersions, resetVersions } = useVersionsFetch(fetchVersions);\n const inputRef = useRef<HTMLInputElement>(null);\n\n useForwardFocus(ref, inputRef);\n\n const uri = resource.uri;\n const supportsVersions = selectableItemsTypes && selectableItemsTypes.indexOf('versions') > -1;\n const selectedVersion = versions.filter(version => version.value === resource.versionId)[0] || null;\n\n function handleUriChange(event: NonCancelableCustomEvent<InputProps.ChangeDetail>) {\n const uri = event.detail.value;\n const errorCode = isInputTouched ? validate(uri) : undefined;\n resetVersions();\n onChange({ uri }, getErrorText(i18n, i18nStrings, errorCode));\n }\n\n function handleUriBlur() {\n isInputBlurredRef.current = true;\n setInputTouched(true);\n const errorCode = validate(resource.uri);\n onChange(resource, getErrorText(i18n, i18nStrings, errorCode));\n fireNonCancelableEvent(onInputBlur);\n if (supportsVersions) {\n loadVersions(resource.uri);\n }\n }\n\n function handleUriFocus() {\n isInputBlurredRef.current = false;\n fireNonCancelableEvent(onInputFocus);\n }\n\n useEffect(() => {\n if (!isInputBlurredRef.current || !supportsVersions) {\n return;\n }\n const { cancel } = loadVersions(uri) ?? {};\n return cancel;\n }, [uri, supportsVersions, loadVersions]);\n\n return (\n <div className={styles.root}>\n <div className={styles.layout}>\n <InternalFormField\n className={styles['layout-uri']}\n label={i18n('i18nStrings.inContextUriLabel', i18nStrings?.inContextUriLabel)}\n stretch={true}\n >\n <SearchInput\n ref={inputRef}\n value={uri}\n ariaDescribedby={inputAriaDescribedby}\n clearAriaLabel={i18nStrings?.inContextInputClearAriaLabel}\n placeholder={inputPlaceholder ?? i18nStrings?.inContextInputPlaceholder}\n onChange={handleUriChange}\n invalid={invalid}\n onFocus={handleUriFocus}\n onBlur={handleUriBlur}\n />\n </InternalFormField>\n {supportsVersions && (\n <InternalFormField\n className={styles['layout-version']}\n label={i18n('i18nStrings.inContextVersionSelectLabel', i18nStrings?.inContextVersionSelectLabel)}\n stretch={true}\n >\n <InternalSelect\n selectedOption={selectedVersion}\n placeholder={i18n('i18nStrings.inContextSelectPlaceholder', i18nStrings?.inContextSelectPlaceholder)}\n disabled={versions.length === 0}\n options={versions}\n onChange={event => onChange({ ...resource, versionId: event.detail.selectedOption.value }, undefined)}\n invalid={false} // invalid state should not highlight the select, only the text input\n />\n </InternalFormField>\n )}\n <div>\n <InternalButton\n className={styles['view-button']}\n disabled={!viewHref}\n href={viewHref}\n target=\"_blank\"\n iconName=\"external\"\n iconAlign=\"right\"\n formAction=\"none\"\n ariaLabel={i18n('i18nStrings.inContextViewButtonAriaLabel', i18nStrings?.inContextViewButtonAriaLabel)}\n >\n {i18n('i18nStrings.inContextViewButton', i18nStrings?.inContextViewButton)}\n </InternalButton>\n </div>\n <div className={styles['layout-divider']} />\n <div>\n <InternalButton className={styles['browse-button']} disabled={loading} formAction=\"none\" onClick={onBrowse}>\n {i18n('i18nStrings.inContextBrowseButton', i18nStrings?.inContextBrowseButton)}\n </InternalButton>\n </div>\n </div>\n\n <InternalLiveRegion assertive={true}>\n {loading && (\n <InternalBox margin={{ top: 's' }}>\n <InternalStatusIndicator type=\"loading\">\n {i18n('i18nStrings.inContextLoadingText', i18nStrings?.inContextLoadingText)}\n </InternalStatusIndicator>\n </InternalBox>\n )}\n </InternalLiveRegion>\n </div>\n );\n }\n);\n"]}
|
package/slider/styles.css.js
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"slider": "
|
|
6
|
-
"slider-track": "awsui_slider-
|
|
7
|
-
"slider-range": "awsui_slider-
|
|
8
|
-
"disabled": "
|
|
9
|
-
"readonly": "
|
|
10
|
-
"error": "
|
|
11
|
-
"warning": "
|
|
12
|
-
"active": "
|
|
13
|
-
"error-active": "awsui_error-
|
|
14
|
-
"warning-active": "awsui_warning-
|
|
15
|
-
"labels": "
|
|
16
|
-
"labels-noref": "awsui_labels-
|
|
17
|
-
"labels-reference": "awsui_labels-
|
|
18
|
-
"labels-min": "awsui_labels-
|
|
19
|
-
"labels-max": "awsui_labels-
|
|
20
|
-
"labels-aria-description": "awsui_labels-aria-
|
|
21
|
-
"ticks": "
|
|
22
|
-
"ticks-wrapper": "awsui_ticks-
|
|
23
|
-
"tick": "
|
|
24
|
-
"middle": "
|
|
25
|
-
"filled": "
|
|
26
|
-
"tooltip-thumb": "awsui_tooltip-
|
|
27
|
-
"thumb": "
|
|
28
|
-
"min": "
|
|
29
|
-
"max": "
|
|
4
|
+
"root": "awsui_root_pcgz5_i2fjb_153",
|
|
5
|
+
"slider": "awsui_slider_pcgz5_i2fjb_190",
|
|
6
|
+
"slider-track": "awsui_slider-track_pcgz5_i2fjb_194",
|
|
7
|
+
"slider-range": "awsui_slider-range_pcgz5_i2fjb_194",
|
|
8
|
+
"disabled": "awsui_disabled_pcgz5_i2fjb_209",
|
|
9
|
+
"readonly": "awsui_readonly_pcgz5_i2fjb_213",
|
|
10
|
+
"error": "awsui_error_pcgz5_i2fjb_222",
|
|
11
|
+
"warning": "awsui_warning_pcgz5_i2fjb_225",
|
|
12
|
+
"active": "awsui_active_pcgz5_i2fjb_228",
|
|
13
|
+
"error-active": "awsui_error-active_pcgz5_i2fjb_231",
|
|
14
|
+
"warning-active": "awsui_warning-active_pcgz5_i2fjb_234",
|
|
15
|
+
"labels": "awsui_labels_pcgz5_i2fjb_245",
|
|
16
|
+
"labels-noref": "awsui_labels-noref_pcgz5_i2fjb_251",
|
|
17
|
+
"labels-reference": "awsui_labels-reference_pcgz5_i2fjb_254",
|
|
18
|
+
"labels-min": "awsui_labels-min_pcgz5_i2fjb_261",
|
|
19
|
+
"labels-max": "awsui_labels-max_pcgz5_i2fjb_267",
|
|
20
|
+
"labels-aria-description": "awsui_labels-aria-description_pcgz5_i2fjb_275",
|
|
21
|
+
"ticks": "awsui_ticks_pcgz5_i2fjb_293",
|
|
22
|
+
"ticks-wrapper": "awsui_ticks-wrapper_pcgz5_i2fjb_299",
|
|
23
|
+
"tick": "awsui_tick_pcgz5_i2fjb_293",
|
|
24
|
+
"middle": "awsui_middle_pcgz5_i2fjb_314",
|
|
25
|
+
"filled": "awsui_filled_pcgz5_i2fjb_317",
|
|
26
|
+
"tooltip-thumb": "awsui_tooltip-thumb_pcgz5_i2fjb_345",
|
|
27
|
+
"thumb": "awsui_thumb_pcgz5_i2fjb_358",
|
|
28
|
+
"min": "awsui_min_pcgz5_i2fjb_394",
|
|
29
|
+
"max": "awsui_max_pcgz5_i2fjb_397"
|
|
30
30
|
};
|
|
31
31
|
|