@cloudscape-design/components 3.0.434 → 3.0.436
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/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/popover/utils/positions.d.ts.map +1 -1
- package/popover/utils/positions.js +1 -6
- package/popover/utils/positions.js.map +1 -1
- package/property-filter/token-editor.d.ts.map +1 -1
- package/property-filter/token-editor.js +2 -5
- package/property-filter/token-editor.js.map +1 -1
- package/table/resizer/styles.css.js +6 -6
- package/table/resizer/styles.scoped.css +21 -21
- package/table/resizer/styles.selectors.js +6 -6
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positions.d.ts","sourceRoot":"lib/default/","sources":["popover/utils/positions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5F,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,cAAc,EAAE,cAAc,CAAC;CAChC;AAUD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,CAiD9E,CAAC;
|
|
1
|
+
{"version":3,"file":"positions.d.ts","sourceRoot":"lib/default/","sources":["popover/utils/positions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5F,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,cAAc,EAAE,cAAc,CAAC;CAChC;AAUD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,CAiD9E,CAAC;AA0HF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,MAAM,GAAG,IAAI,CAsB/E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,YAAY,CAAC,QAAQ,EAChC,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,cAAc,EACzB,QAAQ,EAAE,cAAc,EAExB,gBAAgB,CAAC,EAAE,OAAO,GACzB,iBAAiB,CAkCnB"}
|
|
@@ -162,11 +162,6 @@ function fitIntoContainer(inner, outer) {
|
|
|
162
162
|
}
|
|
163
163
|
return { left, width, top, height };
|
|
164
164
|
}
|
|
165
|
-
function getLargestRect(rect1, rect2) {
|
|
166
|
-
const area1 = rect1.height * rect1.width;
|
|
167
|
-
const area2 = rect2.height * rect2.width;
|
|
168
|
-
return area1 >= area2 ? rect1 : rect2;
|
|
169
|
-
}
|
|
170
165
|
/**
|
|
171
166
|
* Returns the area of the intersection of passed in rectangles or a null, if there is no intersection
|
|
172
167
|
*/
|
|
@@ -225,7 +220,7 @@ renderWithPortal) {
|
|
|
225
220
|
// Get default rect for that placement.
|
|
226
221
|
const defaultOffset = RECTANGLE_CALCULATIONS[internalPosition]({ body, trigger, arrow });
|
|
227
222
|
// Get largest possible rect that fits into viewport or container.
|
|
228
|
-
const optimisedOffset = fitIntoContainer(defaultOffset,
|
|
223
|
+
const optimisedOffset = fitIntoContainer(defaultOffset, viewport);
|
|
229
224
|
// If largest possible rect is smaller than original - set body scroll.
|
|
230
225
|
const scrollable = optimisedOffset.height < defaultOffset.height;
|
|
231
226
|
return { internalPosition, boundingOffset: optimisedOffset, scrollable };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"positions.js","sourceRoot":"lib/default/","sources":["popover/utils/positions.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nimport { PopoverProps, InternalPosition, BoundingOffset, BoundingBox } from '../interfaces';\n\n// A structure describing how the popover should be positioned\nexport interface CalculatePosition {\n scrollable?: boolean;\n internalPosition: InternalPosition;\n boundingOffset: BoundingOffset;\n}\n\ninterface ElementGroup {\n body: BoundingBox;\n trigger: BoundingOffset;\n arrow: BoundingBox;\n}\n\nconst ARROW_OFFSET = 12;\n\nexport const PRIORITY_MAPPING: Record<PopoverProps.Position, InternalPosition[]> = {\n top: [\n 'top-center',\n 'top-right',\n 'top-left',\n 'bottom-center',\n 'bottom-right',\n 'bottom-left',\n 'right-top',\n 'right-bottom',\n 'left-top',\n 'left-bottom',\n ],\n bottom: [\n 'bottom-center',\n 'bottom-right',\n 'bottom-left',\n 'top-center',\n 'top-right',\n 'top-left',\n 'right-top',\n 'right-bottom',\n 'left-top',\n 'left-bottom',\n ],\n left: [\n 'left-top',\n 'left-bottom',\n 'right-top',\n 'right-bottom',\n 'bottom-center',\n 'top-center',\n 'bottom-left',\n 'top-left',\n 'bottom-right',\n 'top-right',\n ],\n right: [\n 'right-top',\n 'right-bottom',\n 'left-top',\n 'left-bottom',\n 'bottom-center',\n 'top-center',\n 'bottom-right',\n 'top-right',\n 'bottom-left',\n 'top-left',\n ],\n};\n\nconst RECTANGLE_CALCULATIONS: Record<InternalPosition, (r: ElementGroup) => BoundingOffset> = {\n 'top-center': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top - body.height - arrow.height,\n left: trigger.left + trigger.width / 2 - body.width / 2,\n width: body.width,\n height: body.height,\n };\n },\n 'top-right': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top - body.height - arrow.height,\n left: trigger.left,\n width: body.width,\n height: body.height,\n };\n },\n 'top-left': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top - body.height - arrow.height,\n left: trigger.left + trigger.width - body.width,\n width: body.width,\n height: body.height,\n };\n },\n 'bottom-center': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height + arrow.height,\n left: trigger.left + trigger.width / 2 - body.width / 2,\n width: body.width,\n height: body.height,\n };\n },\n 'bottom-right': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height + arrow.height,\n left: trigger.left,\n width: body.width,\n height: body.height,\n };\n },\n 'bottom-left': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height + arrow.height,\n left: trigger.left + trigger.width - body.width,\n width: body.width,\n height: body.height,\n };\n },\n 'right-top': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - ARROW_OFFSET - arrow.height,\n left: trigger.left + trigger.width + arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n 'right-bottom': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - body.height + ARROW_OFFSET + arrow.height,\n left: trigger.left + trigger.width + arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n 'left-top': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - ARROW_OFFSET - arrow.height,\n left: trigger.left - body.width - arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n 'left-bottom': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - body.height + ARROW_OFFSET + arrow.height,\n left: trigger.left - body.width - arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n};\n\n/**\n * Returns whether one rectangle fits in another.\n */\nfunction canRectFit(inner: BoundingOffset, outer: BoundingOffset): boolean {\n return (\n inner.left >= outer.left &&\n inner.top >= outer.top &&\n inner.left + inner.width <= outer.left + outer.width &&\n inner.top + inner.height <= outer.top + outer.height\n );\n}\n\nfunction fitIntoContainer(inner: BoundingOffset, outer: BoundingOffset): BoundingOffset {\n let { left, width, top, height } = inner;\n\n // Adjust left boundary.\n if (left < outer.left) {\n width = left + width - outer.left;\n left = outer.left;\n }\n // Adjust right boundary.\n else if (left + width > outer.left + outer.width) {\n width = outer.left + outer.width - left;\n }\n // Adjust top boundary.\n if (top < outer.top) {\n height = top + height - outer.top;\n top = outer.top;\n }\n // Adjust bottom boundary.\n else if (top + height > outer.top + outer.height) {\n height = outer.top + outer.height - top;\n }\n\n return { left, width, top, height };\n}\n\nfunction getLargestRect(rect1: BoundingOffset, rect2: BoundingOffset): BoundingOffset {\n const area1 = rect1.height * rect1.width;\n const area2 = rect2.height * rect2.width;\n return area1 >= area2 ? rect1 : rect2;\n}\n\n/**\n * Returns the area of the intersection of passed in rectangles or a null, if there is no intersection\n */\nexport function intersectRectangles(rectangles: BoundingOffset[]): number | null {\n let boundingOffset: BoundingOffset | null = null;\n for (const currentRect of rectangles) {\n if (!boundingOffset) {\n boundingOffset = currentRect;\n continue;\n }\n const left = Math.max(boundingOffset.left, currentRect.left);\n const top = Math.max(boundingOffset.top, currentRect.top);\n const right = Math.min(boundingOffset.left + boundingOffset.width, currentRect.left + currentRect.width);\n const bottom = Math.min(boundingOffset.top + boundingOffset.height, currentRect.top + currentRect.height);\n if (right < left || bottom < top) {\n return null;\n }\n boundingOffset = {\n left,\n top,\n width: right - left,\n height: bottom - top,\n };\n }\n return boundingOffset && boundingOffset.height * boundingOffset.width;\n}\n\n/**\n * A functions that returns the correct popover position based on screen dimensions.\n */\nexport function calculatePosition(\n preferred: PopoverProps.Position,\n trigger: BoundingOffset,\n arrow: BoundingBox,\n body: BoundingBox,\n container: BoundingOffset,\n viewport: BoundingOffset,\n // the popover is only bound by the viewport if it is rendered in a portal\n renderWithPortal?: boolean\n): CalculatePosition {\n let bestPositionOutsideViewport: CalculatePosition | null = null;\n let largestArea = 0;\n\n // Attempt to position the popover based on the priority list for this position,\n // trying to fit it inside the container and inside the viewport.\n for (const internalPosition of PRIORITY_MAPPING[preferred]) {\n const boundingOffset = RECTANGLE_CALCULATIONS[internalPosition]({ body, trigger, arrow });\n const fitsInContainer = renderWithPortal || canRectFit(boundingOffset, container);\n const fitsInViewport = canRectFit(boundingOffset, viewport);\n if (fitsInContainer && fitsInViewport) {\n return { internalPosition, boundingOffset };\n }\n const boundingRectangles = [boundingOffset, viewport];\n if (!renderWithPortal) {\n boundingRectangles.push(container);\n }\n const availableArea = intersectRectangles(boundingRectangles);\n if (availableArea && availableArea > largestArea) {\n bestPositionOutsideViewport = { internalPosition, boundingOffset };\n largestArea = availableArea;\n }\n }\n\n // Use best possible placement.\n const internalPosition = bestPositionOutsideViewport?.internalPosition || 'right-top';\n // Get default rect for that placement.\n const defaultOffset = RECTANGLE_CALCULATIONS[internalPosition]({ body, trigger, arrow });\n // Get largest possible rect that fits into viewport or container.\n const optimisedOffset = fitIntoContainer(\n defaultOffset,\n renderWithPortal ? viewport : getLargestRect(container, viewport)\n );\n // If largest possible rect is smaller than original - set body scroll.\n const scrollable = optimisedOffset.height < defaultOffset.height;\n\n return { internalPosition, boundingOffset: optimisedOffset, scrollable };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"positions.js","sourceRoot":"lib/default/","sources":["popover/utils/positions.ts"],"names":[],"mappings":"AAiBA,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,MAAM,CAAC,MAAM,gBAAgB,GAAsD;IACjF,GAAG,EAAE;QACH,YAAY;QACZ,WAAW;QACX,UAAU;QACV,eAAe;QACf,cAAc;QACd,aAAa;QACb,WAAW;QACX,cAAc;QACd,UAAU;QACV,aAAa;KACd;IACD,MAAM,EAAE;QACN,eAAe;QACf,cAAc;QACd,aAAa;QACb,YAAY;QACZ,WAAW;QACX,UAAU;QACV,WAAW;QACX,cAAc;QACd,UAAU;QACV,aAAa;KACd;IACD,IAAI,EAAE;QACJ,UAAU;QACV,aAAa;QACb,WAAW;QACX,cAAc;QACd,eAAe;QACf,YAAY;QACZ,aAAa;QACb,UAAU;QACV,cAAc;QACd,WAAW;KACZ;IACD,KAAK,EAAE;QACL,WAAW;QACX,cAAc;QACd,UAAU;QACV,aAAa;QACb,eAAe;QACf,YAAY;QACZ,cAAc;QACd,WAAW;QACX,aAAa;QACb,UAAU;KACX;CACF,CAAC;AAEF,MAAM,sBAAsB,GAAkE;IAC5F,YAAY,EAAE,CAAC,EAAE,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AAM,CAAC;IAEjE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC;AAC3E,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PopoverProps, InternalPosition, BoundingOffset, BoundingBox } from '../interfaces';\n\n// A structure describing how the popover should be positioned\nexport interface CalculatePosition {\n scrollable?: boolean;\n internalPosition: InternalPosition;\n boundingOffset: BoundingOffset;\n}\n\ninterface ElementGroup {\n body: BoundingBox;\n trigger: BoundingOffset;\n arrow: BoundingBox;\n}\n\nconst ARROW_OFFSET = 12;\n\nexport const PRIORITY_MAPPING: Record<PopoverProps.Position, InternalPosition[]> = {\n top: [\n 'top-center',\n 'top-right',\n 'top-left',\n 'bottom-center',\n 'bottom-right',\n 'bottom-left',\n 'right-top',\n 'right-bottom',\n 'left-top',\n 'left-bottom',\n ],\n bottom: [\n 'bottom-center',\n 'bottom-right',\n 'bottom-left',\n 'top-center',\n 'top-right',\n 'top-left',\n 'right-top',\n 'right-bottom',\n 'left-top',\n 'left-bottom',\n ],\n left: [\n 'left-top',\n 'left-bottom',\n 'right-top',\n 'right-bottom',\n 'bottom-center',\n 'top-center',\n 'bottom-left',\n 'top-left',\n 'bottom-right',\n 'top-right',\n ],\n right: [\n 'right-top',\n 'right-bottom',\n 'left-top',\n 'left-bottom',\n 'bottom-center',\n 'top-center',\n 'bottom-right',\n 'top-right',\n 'bottom-left',\n 'top-left',\n ],\n};\n\nconst RECTANGLE_CALCULATIONS: Record<InternalPosition, (r: ElementGroup) => BoundingOffset> = {\n 'top-center': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top - body.height - arrow.height,\n left: trigger.left + trigger.width / 2 - body.width / 2,\n width: body.width,\n height: body.height,\n };\n },\n 'top-right': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top - body.height - arrow.height,\n left: trigger.left,\n width: body.width,\n height: body.height,\n };\n },\n 'top-left': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top - body.height - arrow.height,\n left: trigger.left + trigger.width - body.width,\n width: body.width,\n height: body.height,\n };\n },\n 'bottom-center': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height + arrow.height,\n left: trigger.left + trigger.width / 2 - body.width / 2,\n width: body.width,\n height: body.height,\n };\n },\n 'bottom-right': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height + arrow.height,\n left: trigger.left,\n width: body.width,\n height: body.height,\n };\n },\n 'bottom-left': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height + arrow.height,\n left: trigger.left + trigger.width - body.width,\n width: body.width,\n height: body.height,\n };\n },\n 'right-top': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - ARROW_OFFSET - arrow.height,\n left: trigger.left + trigger.width + arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n 'right-bottom': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - body.height + ARROW_OFFSET + arrow.height,\n left: trigger.left + trigger.width + arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n 'left-top': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - ARROW_OFFSET - arrow.height,\n left: trigger.left - body.width - arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n 'left-bottom': ({ body, trigger, arrow }) => {\n return {\n top: trigger.top + trigger.height / 2 - body.height + ARROW_OFFSET + arrow.height,\n left: trigger.left - body.width - arrow.height,\n width: body.width,\n height: body.height,\n };\n },\n};\n\n/**\n * Returns whether one rectangle fits in another.\n */\nfunction canRectFit(inner: BoundingOffset, outer: BoundingOffset): boolean {\n return (\n inner.left >= outer.left &&\n inner.top >= outer.top &&\n inner.left + inner.width <= outer.left + outer.width &&\n inner.top + inner.height <= outer.top + outer.height\n );\n}\n\nfunction fitIntoContainer(inner: BoundingOffset, outer: BoundingOffset): BoundingOffset {\n let { left, width, top, height } = inner;\n\n // Adjust left boundary.\n if (left < outer.left) {\n width = left + width - outer.left;\n left = outer.left;\n }\n // Adjust right boundary.\n else if (left + width > outer.left + outer.width) {\n width = outer.left + outer.width - left;\n }\n // Adjust top boundary.\n if (top < outer.top) {\n height = top + height - outer.top;\n top = outer.top;\n }\n // Adjust bottom boundary.\n else if (top + height > outer.top + outer.height) {\n height = outer.top + outer.height - top;\n }\n\n return { left, width, top, height };\n}\n\n/**\n * Returns the area of the intersection of passed in rectangles or a null, if there is no intersection\n */\nexport function intersectRectangles(rectangles: BoundingOffset[]): number | null {\n let boundingOffset: BoundingOffset | null = null;\n for (const currentRect of rectangles) {\n if (!boundingOffset) {\n boundingOffset = currentRect;\n continue;\n }\n const left = Math.max(boundingOffset.left, currentRect.left);\n const top = Math.max(boundingOffset.top, currentRect.top);\n const right = Math.min(boundingOffset.left + boundingOffset.width, currentRect.left + currentRect.width);\n const bottom = Math.min(boundingOffset.top + boundingOffset.height, currentRect.top + currentRect.height);\n if (right < left || bottom < top) {\n return null;\n }\n boundingOffset = {\n left,\n top,\n width: right - left,\n height: bottom - top,\n };\n }\n return boundingOffset && boundingOffset.height * boundingOffset.width;\n}\n\n/**\n * A functions that returns the correct popover position based on screen dimensions.\n */\nexport function calculatePosition(\n preferred: PopoverProps.Position,\n trigger: BoundingOffset,\n arrow: BoundingBox,\n body: BoundingBox,\n container: BoundingOffset,\n viewport: BoundingOffset,\n // the popover is only bound by the viewport if it is rendered in a portal\n renderWithPortal?: boolean\n): CalculatePosition {\n let bestPositionOutsideViewport: CalculatePosition | null = null;\n let largestArea = 0;\n\n // Attempt to position the popover based on the priority list for this position,\n // trying to fit it inside the container and inside the viewport.\n for (const internalPosition of PRIORITY_MAPPING[preferred]) {\n const boundingOffset = RECTANGLE_CALCULATIONS[internalPosition]({ body, trigger, arrow });\n const fitsInContainer = renderWithPortal || canRectFit(boundingOffset, container);\n const fitsInViewport = canRectFit(boundingOffset, viewport);\n if (fitsInContainer && fitsInViewport) {\n return { internalPosition, boundingOffset };\n }\n const boundingRectangles = [boundingOffset, viewport];\n if (!renderWithPortal) {\n boundingRectangles.push(container);\n }\n const availableArea = intersectRectangles(boundingRectangles);\n if (availableArea && availableArea > largestArea) {\n bestPositionOutsideViewport = { internalPosition, boundingOffset };\n largestArea = availableArea;\n }\n }\n\n // Use best possible placement.\n const internalPosition = bestPositionOutsideViewport?.internalPosition || 'right-top';\n // Get default rect for that placement.\n const defaultOffset = RECTANGLE_CALCULATIONS[internalPosition]({ body, trigger, arrow });\n // Get largest possible rect that fits into viewport or container.\n const optimisedOffset = fitIntoContainer(defaultOffset, viewport);\n // If largest possible rect is smaller than original - set body scroll.\n const scrollable = optimisedOffset.height < defaultOffset.height;\n\n return { internalPosition, boundingOffset: optimisedOffset, scrollable };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-editor.d.ts","sourceRoot":"lib/default/","sources":["property-filter/token-editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAMhD,OAAO,EAEL,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,aAAa,EACb,eAAe,EACf,KAAK,EACN,MAAM,cAAc,CAAC;AAStB,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"token-editor.d.ts","sourceRoot":"lib/default/","sources":["property-filter/token-editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAMhD,OAAO,EAEL,SAAS,EACT,WAAW,EACX,uBAAuB,EACvB,yBAAyB,EACzB,aAAa,EACb,eAAe,EACf,KAAK,EACN,MAAM,cAAc,CAAC;AAStB,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAC;AAgKxF,UAAU,gBAAgB;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,mBAAmB,CAAC;IAChC,gBAAgB,EAAE,SAAS,SAAS,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,mBAAmB,EAAE,SAAS,yBAAyB,EAAE,CAAC;IAC1D,gBAAgB,EAAE,SAAS,uBAAuB,EAAE,CAAC;IACrD,WAAW,EAAE,WAAW,CAAC;IACzB,WAAW,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,CAAC;IACzD,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,aAAa,CAAC;IACrB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED,wBAAgB,WAAW,CAAC,EAC1B,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,QAAQ,EACR,KAAK,EACL,gBAAgB,GACjB,EAAE,gBAAgB,eA4GlB"}
|
|
@@ -64,11 +64,8 @@ function ValueInput({ property, operator, value, onChangeValue, asyncProps, filt
|
|
|
64
64
|
var _a, _b, _c;
|
|
65
65
|
const valueOptions = property
|
|
66
66
|
? filteringOptions
|
|
67
|
-
.filter(option => option.property === property)
|
|
68
|
-
.map(({ label, value }) => ({
|
|
69
|
-
label,
|
|
70
|
-
value,
|
|
71
|
-
}))
|
|
67
|
+
.filter(option => { var _a; return ((_a = option.property) === null || _a === void 0 ? void 0 : _a.propertyKey) === property.propertyKey; })
|
|
68
|
+
.map(({ label, value }) => ({ label, value }))
|
|
72
69
|
: [];
|
|
73
70
|
const valueAutosuggestHandlers = useLoadItems(onLoadItems, '', property === null || property === void 0 ? void 0 : property.externalProperty);
|
|
74
71
|
const asyncValueAutosuggestProps = (property === null || property === void 0 ? void 0 : property.propertyKey)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-editor.js","sourceRoot":"lib/default/","sources":["property-filter/token-editor.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,eAAuC,MAAM,qBAAqB,CAAC;AAW1E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,gCAAgC,EAChC,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAGtB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,iBAAiB,GAAyB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAa5D,SAAS,aAAa,CAAC,EACrB,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,wBAAwB,GACL;;IACnB,MAAM,sBAAsB,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,wBAAwB,GAAG,UAAU,CAAC,CAAC,iCAAM,UAAU,GAAK,sBAAsB,EAAG,CAAC,CAAC,EAAE,CAAC;IAChG,MAAM,eAAe,GAAqD,sBAAsB,CAC9F,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,CAAC,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;QACnC,KAAK,EAAE,WAAW;QAClB,K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GAClD,CACgB;gBAEpB,oBAAC,iBAAiB,IAAC,KAAK,EAAE,WAAW,CAAC,YAAY,EAAE,SAAS,EAAE,MAAM,CAAC,6BAA6B,CAAC;oBAClG,oBAAC,aAAa,IACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,WAAW,GACxB,CACgB;gBAEpB,oBAAC,iBAAiB,IAAC,KAAK,EAAE,WAAW,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC;oBAC5F,oBAAC,UAAU,IACT,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,GACxB,CACgB,CAChB;YAEN,6BAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,CAAC;gBAC5C,oBAAC,cAAc,IACb,UAAU,EAAC,MAAM,EACjB,OAAO,EAAC,MAAM,EACd,SAAS,EAAE,MAAM,CAAC,qBAAqB,CAAC,EACxC,OAAO,EAAE,YAAY,IAEpB,WAAW,CAAC,gBAAgB,CACd;gBACjB,oBAAC,cAAc,IACb,SAAS,EAAE,MAAM,CAAC,qBAAqB,CAAC,EACxC,UAAU,EAAC,MAAM,EACjB,OAAO,EAAE,GAAG,EAAE;wBACZ,QAAQ,CAAC,eAAe,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC,CAAC;wBAC5D,YAAY,EAAE,CAAC;oBACjB,CAAC,IAEA,WAAW,CAAC,eAAe,CACb,CACb,CACF,IAGP,gBAAgB,CACD,CACnB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useRef } from 'react';\n\nimport { SelectProps } from '../select/interfaces';\nimport InternalSelect from '../select/internal';\nimport InternalAutosuggest from '../autosuggest/internal';\nimport InternalPopover, { InternalPopoverRef } from '../popover/internal';\nimport {\n ComparisonOperator,\n GroupText,\n I18nStrings,\n InternalFilteringOption,\n InternalFilteringProperty,\n InternalToken,\n LoadItemsDetail,\n Token,\n} from './interfaces';\nimport styles from './styles.css.js';\nimport { useLoadItems } from './use-load-items';\nimport {\n createPropertiesCompatibilityMap,\n getAllowedOperators,\n operatorToDescription,\n getPropertySuggestions,\n} from './controller';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport InternalButton from '../button/internal';\nimport InternalFormField from '../form-field/internal';\nimport { matchTokenValue } from './utils';\n\nconst freeTextOperators: ComparisonOperator[] = [':', '!:'];\n\ninterface PropertyInputProps {\n asyncProps: null | DropdownStatusProps;\n customGroupsText: readonly GroupText[];\n disableFreeTextFiltering?: boolean;\n filteringProperties: readonly InternalFilteringProperty[];\n i18nStrings: I18nStrings;\n onChangePropertyKey: (propertyKey: undefined | string) => void;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n property: null | InternalFilteringProperty;\n}\n\nfunction PropertyInput({\n property,\n onChangePropertyKey,\n asyncProps,\n filteringProperties,\n onLoadItems,\n customGroupsText,\n i18nStrings,\n disableFreeTextFiltering,\n}: PropertyInputProps) {\n const propertySelectHandlers = useLoadItems(onLoadItems);\n const asyncPropertySelectProps = asyncProps ? { ...asyncProps, ...propertySelectHandlers } : {};\n const propertyOptions: (SelectProps.Option | SelectProps.OptionGroup)[] = getPropertySuggestions(\n filteringProperties,\n customGroupsText,\n i18nStrings,\n ({ propertyKey, propertyLabel }) => ({\n value: propertyKey,\n label: propertyLabel,\n dontCloseOnSelect: true,\n })\n );\n\n // Disallow selecting properties that have different representation.\n const checkPropertiesCompatible = createPropertiesCompatibilityMap(filteringProperties);\n propertyOptions.forEach(optionGroup => {\n if ('options' in optionGroup) {\n optionGroup.options.forEach(option => {\n if (property?.propertyKey && option.value) {\n option.disabled = !checkPropertiesCompatible(option.value, property.propertyKey);\n }\n });\n }\n });\n\n const allPropertiesOption = {\n label: i18nStrings.allPropertiesLabel,\n value: undefined,\n };\n if (!disableFreeTextFiltering) {\n propertyOptions.unshift(allPropertiesOption);\n }\n return (\n <InternalSelect\n options={propertyOptions}\n selectedOption={\n property\n ? {\n value: property.propertyKey ?? undefined,\n label: property.propertyLabel,\n }\n : allPropertiesOption\n }\n onChange={e => onChangePropertyKey(e.detail.selectedOption.value)}\n {...asyncPropertySelectProps}\n />\n );\n}\n\ninterface OperatorInputProps {\n i18nStrings: I18nStrings;\n onChangeOperator: (operator: ComparisonOperator) => void;\n operator: undefined | ComparisonOperator;\n property: null | InternalFilteringProperty;\n}\n\nfunction OperatorInput({ property, operator, onChangeOperator, i18nStrings }: OperatorInputProps) {\n const freeTextOperators: ComparisonOperator[] = [':', '!:'];\n const operatorOptions = (property ? getAllowedOperators(property) : freeTextOperators).map(operator => ({\n value: operator,\n label: operator,\n description: operatorToDescription(operator, i18nStrings),\n }));\n return (\n <InternalSelect\n options={operatorOptions}\n triggerVariant=\"option\"\n selectedOption={\n operator\n ? {\n value: operator,\n label: operator,\n description: operatorToDescription(operator, i18nStrings),\n }\n : null\n }\n onChange={e => onChangeOperator(e.detail.selectedOption.value as ComparisonOperator)}\n />\n );\n}\n\ninterface ValueInputProps {\n asyncProps: DropdownStatusProps;\n filteringOptions: readonly InternalFilteringOption[];\n i18nStrings: I18nStrings;\n onChangeValue: (value: string) => void;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n operator: undefined | ComparisonOperator;\n property: null | InternalFilteringProperty;\n value: undefined | string;\n}\n\nfunction ValueInput({\n property,\n operator,\n value,\n onChangeValue,\n asyncProps,\n filteringOptions,\n onLoadItems,\n i18nStrings,\n}: ValueInputProps) {\n const valueOptions = property\n ? filteringOptions\n .filter(option => option.property === property)\n .map(({ label, value }) => ({\n label,\n value,\n }))\n : [];\n const valueAutosuggestHandlers = useLoadItems(onLoadItems, '', property?.externalProperty);\n const asyncValueAutosuggestProps = property?.propertyKey\n ? { ...valueAutosuggestHandlers, ...asyncProps }\n : { empty: asyncProps.empty };\n const [matchedOption] = valueOptions.filter(option => option.value === value);\n\n const OperatorForm = property?.propertyKey && operator && property?.getValueFormRenderer(operator);\n\n return OperatorForm ? (\n <OperatorForm value={value} onChange={onChangeValue} operator={operator} />\n ) : (\n <InternalAutosuggest\n enteredTextLabel={i18nStrings.enteredTextLabel ?? (value => value)}\n value={matchedOption?.label ?? value ?? ''}\n clearAriaLabel={i18nStrings.clearAriaLabel}\n onChange={e => onChangeValue(e.detail.value)}\n disabled={!operator}\n options={valueOptions}\n {...asyncValueAutosuggestProps}\n virtualScroll={true}\n />\n );\n}\n\ninterface TokenEditorProps {\n asyncProperties?: boolean;\n asyncProps: DropdownStatusProps;\n customGroupsText: readonly GroupText[];\n disabled?: boolean;\n disableFreeTextFiltering?: boolean;\n expandToViewport?: boolean;\n filteringProperties: readonly InternalFilteringProperty[];\n filteringOptions: readonly InternalFilteringOption[];\n i18nStrings: I18nStrings;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n setToken: (newToken: Token) => void;\n token: InternalToken;\n triggerComponent?: React.ReactNode;\n}\n\nexport function TokenEditor({\n asyncProperties,\n asyncProps,\n customGroupsText,\n disableFreeTextFiltering,\n expandToViewport,\n filteringProperties,\n filteringOptions,\n i18nStrings,\n onLoadItems,\n setToken,\n token,\n triggerComponent,\n}: TokenEditorProps) {\n const [temporaryToken, setTemporaryToken] = useState<InternalToken>(token);\n const popoverRef = useRef<InternalPopoverRef>(null);\n const closePopover = () => {\n popoverRef.current && popoverRef.current.dismissPopover();\n };\n\n const property = temporaryToken.property;\n const onChangePropertyKey = (newPropertyKey: undefined | string) => {\n const filteringProperty = filteringProperties.reduce<InternalFilteringProperty | undefined>(\n (acc, property) => (property.propertyKey === newPropertyKey ? property : acc),\n undefined\n );\n const allowedOperators = filteringProperty ? getAllowedOperators(filteringProperty) : freeTextOperators;\n const operator =\n temporaryToken.operator && allowedOperators.indexOf(temporaryToken.operator) !== -1\n ? temporaryToken.operator\n : allowedOperators[0];\n const matchedProperty = filteringProperties.find(property => property.propertyKey === newPropertyKey) ?? null;\n setTemporaryToken({ ...temporaryToken, property: matchedProperty, operator });\n };\n\n const operator = temporaryToken.operator;\n const onChangeOperator = (newOperator: ComparisonOperator) => {\n setTemporaryToken({ ...temporaryToken, operator: newOperator });\n };\n\n const value = temporaryToken.value;\n const onChangeValue = (newValue: string) => {\n setTemporaryToken({ ...temporaryToken, value: newValue });\n };\n\n return (\n <InternalPopover\n ref={popoverRef}\n className={styles['token-label']}\n triggerType=\"text\"\n header={i18nStrings.editTokenHeader}\n size=\"large\"\n position=\"right\"\n dismissAriaLabel={i18nStrings.dismissAriaLabel}\n __onOpen={() => setTemporaryToken(token)}\n renderWithPortal={expandToViewport}\n content={\n <div className={styles['token-editor']}>\n <div className={styles['token-editor-form']}>\n <InternalFormField label={i18nStrings.propertyText} className={styles['token-editor-field-property']}>\n <PropertyInput\n property={property}\n onChangePropertyKey={onChangePropertyKey}\n asyncProps={asyncProperties ? asyncProps : null}\n filteringProperties={filteringProperties}\n onLoadItems={onLoadItems}\n customGroupsText={customGroupsText}\n i18nStrings={i18nStrings}\n disableFreeTextFiltering={disableFreeTextFiltering}\n />\n </InternalFormField>\n\n <InternalFormField label={i18nStrings.operatorText} className={styles['token-editor-field-operator']}>\n <OperatorInput\n property={property}\n operator={operator}\n onChangeOperator={onChangeOperator}\n i18nStrings={i18nStrings}\n />\n </InternalFormField>\n\n <InternalFormField label={i18nStrings.valueText} className={styles['token-editor-field-value']}>\n <ValueInput\n property={property}\n operator={operator}\n value={value}\n onChangeValue={onChangeValue}\n asyncProps={asyncProps}\n filteringOptions={filteringOptions}\n onLoadItems={onLoadItems}\n i18nStrings={i18nStrings}\n />\n </InternalFormField>\n </div>\n\n <div className={styles['token-editor-actions']}>\n <InternalButton\n formAction=\"none\"\n variant=\"link\"\n className={styles['token-editor-cancel']}\n onClick={closePopover}\n >\n {i18nStrings.cancelActionText}\n </InternalButton>\n <InternalButton\n className={styles['token-editor-submit']}\n formAction=\"none\"\n onClick={() => {\n setToken(matchTokenValue(temporaryToken, filteringOptions));\n closePopover();\n }}\n >\n {i18nStrings.applyActionText}\n </InternalButton>\n </div>\n </div>\n }\n >\n {triggerComponent}\n </InternalPopover>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"token-editor.js","sourceRoot":"lib/default/","sources":["property-filter/token-editor.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGhD,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,mBAAmB,MAAM,yBAAyB,CAAC;AAC1D,OAAO,eAAuC,MAAM,qBAAqB,CAAC;AAW1E,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,gCAAgC,EAChC,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAGtB,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,iBAAiB,GAAyB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAa5D,SAAS,aAAa,CAAC,EACrB,QAAQ,EACR,mBAAmB,EACnB,UAAU,EACV,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,wBAAwB,GACL;;IACnB,MAAM,sBAAsB,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IACzD,MAAM,wBAAwB,GAAG,UAAU,CAAC,CAAC,iCAA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AQ,CAAC,eAAe,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC,CAAC;wBAC5D,YAAY,EAAE,CAAC;oBACjB,CAAC,IAEA,WAAW,CAAC,eAAe,CACb,CACb,CACF,IAGP,gBAAgB,CACD,CACnB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useState, useRef } from 'react';\n\nimport { SelectProps } from '../select/interfaces';\nimport InternalSelect from '../select/internal';\nimport InternalAutosuggest from '../autosuggest/internal';\nimport InternalPopover, { InternalPopoverRef } from '../popover/internal';\nimport {\n ComparisonOperator,\n GroupText,\n I18nStrings,\n InternalFilteringOption,\n InternalFilteringProperty,\n InternalToken,\n LoadItemsDetail,\n Token,\n} from './interfaces';\nimport styles from './styles.css.js';\nimport { useLoadItems } from './use-load-items';\nimport {\n createPropertiesCompatibilityMap,\n getAllowedOperators,\n operatorToDescription,\n getPropertySuggestions,\n} from './controller';\nimport { NonCancelableEventHandler } from '../internal/events';\nimport { DropdownStatusProps } from '../internal/components/dropdown-status/interfaces';\nimport InternalButton from '../button/internal';\nimport InternalFormField from '../form-field/internal';\nimport { matchTokenValue } from './utils';\n\nconst freeTextOperators: ComparisonOperator[] = [':', '!:'];\n\ninterface PropertyInputProps {\n asyncProps: null | DropdownStatusProps;\n customGroupsText: readonly GroupText[];\n disableFreeTextFiltering?: boolean;\n filteringProperties: readonly InternalFilteringProperty[];\n i18nStrings: I18nStrings;\n onChangePropertyKey: (propertyKey: undefined | string) => void;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n property: null | InternalFilteringProperty;\n}\n\nfunction PropertyInput({\n property,\n onChangePropertyKey,\n asyncProps,\n filteringProperties,\n onLoadItems,\n customGroupsText,\n i18nStrings,\n disableFreeTextFiltering,\n}: PropertyInputProps) {\n const propertySelectHandlers = useLoadItems(onLoadItems);\n const asyncPropertySelectProps = asyncProps ? { ...asyncProps, ...propertySelectHandlers } : {};\n const propertyOptions: (SelectProps.Option | SelectProps.OptionGroup)[] = getPropertySuggestions(\n filteringProperties,\n customGroupsText,\n i18nStrings,\n ({ propertyKey, propertyLabel }) => ({\n value: propertyKey,\n label: propertyLabel,\n dontCloseOnSelect: true,\n })\n );\n\n // Disallow selecting properties that have different representation.\n const checkPropertiesCompatible = createPropertiesCompatibilityMap(filteringProperties);\n propertyOptions.forEach(optionGroup => {\n if ('options' in optionGroup) {\n optionGroup.options.forEach(option => {\n if (property?.propertyKey && option.value) {\n option.disabled = !checkPropertiesCompatible(option.value, property.propertyKey);\n }\n });\n }\n });\n\n const allPropertiesOption = {\n label: i18nStrings.allPropertiesLabel,\n value: undefined,\n };\n if (!disableFreeTextFiltering) {\n propertyOptions.unshift(allPropertiesOption);\n }\n return (\n <InternalSelect\n options={propertyOptions}\n selectedOption={\n property\n ? {\n value: property.propertyKey ?? undefined,\n label: property.propertyLabel,\n }\n : allPropertiesOption\n }\n onChange={e => onChangePropertyKey(e.detail.selectedOption.value)}\n {...asyncPropertySelectProps}\n />\n );\n}\n\ninterface OperatorInputProps {\n i18nStrings: I18nStrings;\n onChangeOperator: (operator: ComparisonOperator) => void;\n operator: undefined | ComparisonOperator;\n property: null | InternalFilteringProperty;\n}\n\nfunction OperatorInput({ property, operator, onChangeOperator, i18nStrings }: OperatorInputProps) {\n const freeTextOperators: ComparisonOperator[] = [':', '!:'];\n const operatorOptions = (property ? getAllowedOperators(property) : freeTextOperators).map(operator => ({\n value: operator,\n label: operator,\n description: operatorToDescription(operator, i18nStrings),\n }));\n return (\n <InternalSelect\n options={operatorOptions}\n triggerVariant=\"option\"\n selectedOption={\n operator\n ? {\n value: operator,\n label: operator,\n description: operatorToDescription(operator, i18nStrings),\n }\n : null\n }\n onChange={e => onChangeOperator(e.detail.selectedOption.value as ComparisonOperator)}\n />\n );\n}\n\ninterface ValueInputProps {\n asyncProps: DropdownStatusProps;\n filteringOptions: readonly InternalFilteringOption[];\n i18nStrings: I18nStrings;\n onChangeValue: (value: string) => void;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n operator: undefined | ComparisonOperator;\n property: null | InternalFilteringProperty;\n value: undefined | string;\n}\n\nfunction ValueInput({\n property,\n operator,\n value,\n onChangeValue,\n asyncProps,\n filteringOptions,\n onLoadItems,\n i18nStrings,\n}: ValueInputProps) {\n const valueOptions = property\n ? filteringOptions\n .filter(option => option.property?.propertyKey === property.propertyKey)\n .map(({ label, value }) => ({ label, value }))\n : [];\n\n const valueAutosuggestHandlers = useLoadItems(onLoadItems, '', property?.externalProperty);\n const asyncValueAutosuggestProps = property?.propertyKey\n ? { ...valueAutosuggestHandlers, ...asyncProps }\n : { empty: asyncProps.empty };\n const [matchedOption] = valueOptions.filter(option => option.value === value);\n\n const OperatorForm = property?.propertyKey && operator && property?.getValueFormRenderer(operator);\n\n return OperatorForm ? (\n <OperatorForm value={value} onChange={onChangeValue} operator={operator} />\n ) : (\n <InternalAutosuggest\n enteredTextLabel={i18nStrings.enteredTextLabel ?? (value => value)}\n value={matchedOption?.label ?? value ?? ''}\n clearAriaLabel={i18nStrings.clearAriaLabel}\n onChange={e => onChangeValue(e.detail.value)}\n disabled={!operator}\n options={valueOptions}\n {...asyncValueAutosuggestProps}\n virtualScroll={true}\n />\n );\n}\n\ninterface TokenEditorProps {\n asyncProperties?: boolean;\n asyncProps: DropdownStatusProps;\n customGroupsText: readonly GroupText[];\n disabled?: boolean;\n disableFreeTextFiltering?: boolean;\n expandToViewport?: boolean;\n filteringProperties: readonly InternalFilteringProperty[];\n filteringOptions: readonly InternalFilteringOption[];\n i18nStrings: I18nStrings;\n onLoadItems?: NonCancelableEventHandler<LoadItemsDetail>;\n setToken: (newToken: Token) => void;\n token: InternalToken;\n triggerComponent?: React.ReactNode;\n}\n\nexport function TokenEditor({\n asyncProperties,\n asyncProps,\n customGroupsText,\n disableFreeTextFiltering,\n expandToViewport,\n filteringProperties,\n filteringOptions,\n i18nStrings,\n onLoadItems,\n setToken,\n token,\n triggerComponent,\n}: TokenEditorProps) {\n const [temporaryToken, setTemporaryToken] = useState<InternalToken>(token);\n const popoverRef = useRef<InternalPopoverRef>(null);\n const closePopover = () => {\n popoverRef.current && popoverRef.current.dismissPopover();\n };\n\n const property = temporaryToken.property;\n const onChangePropertyKey = (newPropertyKey: undefined | string) => {\n const filteringProperty = filteringProperties.reduce<InternalFilteringProperty | undefined>(\n (acc, property) => (property.propertyKey === newPropertyKey ? property : acc),\n undefined\n );\n const allowedOperators = filteringProperty ? getAllowedOperators(filteringProperty) : freeTextOperators;\n const operator =\n temporaryToken.operator && allowedOperators.indexOf(temporaryToken.operator) !== -1\n ? temporaryToken.operator\n : allowedOperators[0];\n const matchedProperty = filteringProperties.find(property => property.propertyKey === newPropertyKey) ?? null;\n setTemporaryToken({ ...temporaryToken, property: matchedProperty, operator });\n };\n\n const operator = temporaryToken.operator;\n const onChangeOperator = (newOperator: ComparisonOperator) => {\n setTemporaryToken({ ...temporaryToken, operator: newOperator });\n };\n\n const value = temporaryToken.value;\n const onChangeValue = (newValue: string) => {\n setTemporaryToken({ ...temporaryToken, value: newValue });\n };\n\n return (\n <InternalPopover\n ref={popoverRef}\n className={styles['token-label']}\n triggerType=\"text\"\n header={i18nStrings.editTokenHeader}\n size=\"large\"\n position=\"right\"\n dismissAriaLabel={i18nStrings.dismissAriaLabel}\n __onOpen={() => setTemporaryToken(token)}\n renderWithPortal={expandToViewport}\n content={\n <div className={styles['token-editor']}>\n <div className={styles['token-editor-form']}>\n <InternalFormField label={i18nStrings.propertyText} className={styles['token-editor-field-property']}>\n <PropertyInput\n property={property}\n onChangePropertyKey={onChangePropertyKey}\n asyncProps={asyncProperties ? asyncProps : null}\n filteringProperties={filteringProperties}\n onLoadItems={onLoadItems}\n customGroupsText={customGroupsText}\n i18nStrings={i18nStrings}\n disableFreeTextFiltering={disableFreeTextFiltering}\n />\n </InternalFormField>\n\n <InternalFormField label={i18nStrings.operatorText} className={styles['token-editor-field-operator']}>\n <OperatorInput\n property={property}\n operator={operator}\n onChangeOperator={onChangeOperator}\n i18nStrings={i18nStrings}\n />\n </InternalFormField>\n\n <InternalFormField label={i18nStrings.valueText} className={styles['token-editor-field-value']}>\n <ValueInput\n property={property}\n operator={operator}\n value={value}\n onChangeValue={onChangeValue}\n asyncProps={asyncProps}\n filteringOptions={filteringOptions}\n onLoadItems={onLoadItems}\n i18nStrings={i18nStrings}\n />\n </InternalFormField>\n </div>\n\n <div className={styles['token-editor-actions']}>\n <InternalButton\n formAction=\"none\"\n variant=\"link\"\n className={styles['token-editor-cancel']}\n onClick={closePopover}\n >\n {i18nStrings.cancelActionText}\n </InternalButton>\n <InternalButton\n className={styles['token-editor-submit']}\n formAction=\"none\"\n onClick={() => {\n setToken(matchTokenValue(temporaryToken, filteringOptions));\n closePopover();\n }}\n >\n {i18nStrings.applyActionText}\n </InternalButton>\n </div>\n </div>\n }\n >\n {triggerComponent}\n </InternalPopover>\n );\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"resize-active": "awsui_resize-
|
|
5
|
-
"resize-active-with-focus": "awsui_resize-active-with-
|
|
6
|
-
"resizer": "
|
|
7
|
-
"resizer-active": "awsui_resizer-
|
|
8
|
-
"has-focus": "awsui_has-
|
|
9
|
-
"tracker": "
|
|
4
|
+
"resize-active": "awsui_resize-active_x7peu_k905k_93",
|
|
5
|
+
"resize-active-with-focus": "awsui_resize-active-with-focus_x7peu_k905k_93",
|
|
6
|
+
"resizer": "awsui_resizer_x7peu_k905k_98",
|
|
7
|
+
"resizer-active": "awsui_resizer-active_x7peu_k905k_130",
|
|
8
|
+
"has-focus": "awsui_has-focus_x7peu_k905k_142",
|
|
9
|
+
"tracker": "awsui_tracker_x7peu_k905k_165"
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -90,22 +90,13 @@ 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
|
-
.awsui_resize-
|
|
93
|
+
.awsui_resize-active_x7peu_k905k_93:not(#\9):not(.awsui_resize-active-with-focus_x7peu_k905k_93) * {
|
|
94
94
|
cursor: col-resize;
|
|
95
95
|
-webkit-user-select: none;
|
|
96
96
|
user-select: none;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.
|
|
100
|
-
border: none;
|
|
101
|
-
background: none;
|
|
102
|
-
bottom: 0;
|
|
103
|
-
cursor: col-resize;
|
|
104
|
-
position: absolute;
|
|
105
|
-
right: calc(-1 * var(--space-l-t419sm, 20px) / 2);
|
|
106
|
-
top: 0;
|
|
107
|
-
width: var(--space-l-t419sm, 20px);
|
|
108
|
-
z-index: 10;
|
|
99
|
+
.awsui_resizer_x7peu_k905k_98:not(#\9) {
|
|
109
100
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
110
101
|
border-collapse: separate;
|
|
111
102
|
border-spacing: 0;
|
|
@@ -142,19 +133,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
142
133
|
font-family: var(--font-family-base-dnvic8, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
143
134
|
-webkit-font-smoothing: auto;
|
|
144
135
|
-moz-osx-font-smoothing: auto;
|
|
136
|
+
border: none;
|
|
137
|
+
background: none;
|
|
138
|
+
bottom: 0;
|
|
139
|
+
cursor: col-resize;
|
|
140
|
+
position: absolute;
|
|
141
|
+
right: calc(-1 * var(--space-l-t419sm, 20px) / 2);
|
|
142
|
+
top: 0;
|
|
143
|
+
width: var(--space-l-t419sm, 20px);
|
|
144
|
+
z-index: 10;
|
|
145
145
|
}
|
|
146
|
-
.
|
|
146
|
+
.awsui_resizer_x7peu_k905k_98:not(#\9):focus {
|
|
147
147
|
outline: none;
|
|
148
148
|
text-decoration: none;
|
|
149
149
|
}
|
|
150
|
-
.awsui_resize-
|
|
150
|
+
.awsui_resize-active_x7peu_k905k_93 .awsui_resizer_x7peu_k905k_98:not(#\9) {
|
|
151
151
|
pointer-events: none;
|
|
152
152
|
}
|
|
153
|
-
th:not(#\9):last-child > .
|
|
153
|
+
th:not(#\9):last-child > .awsui_resizer_x7peu_k905k_98 {
|
|
154
154
|
width: calc(var(--space-l-t419sm, 20px) / 2);
|
|
155
155
|
right: 0;
|
|
156
156
|
}
|
|
157
|
-
th:not(#\9):not(:last-child) > .
|
|
157
|
+
th:not(#\9):not(:last-child) > .awsui_resizer_x7peu_k905k_98:hover::before, th:not(#\9):not(:last-child) > .awsui_resizer-active_x7peu_k905k_130::before {
|
|
158
158
|
content: "";
|
|
159
159
|
position: absolute;
|
|
160
160
|
left: calc(var(--space-l-t419sm, 20px) / 2 - 2px);
|
|
@@ -166,15 +166,15 @@ th:not(#\9):not(:last-child) > .awsui_resizer_x7peu_19okv_98:hover::before, th:n
|
|
|
166
166
|
border-left: 2px solid var(--color-border-divider-active-k4haaf, #000716);
|
|
167
167
|
box-sizing: border-box;
|
|
168
168
|
}
|
|
169
|
-
body[data-awsui-focus-visible=true] .
|
|
169
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_k905k_98.awsui_has-focus_x7peu_k905k_142:not(#\9) {
|
|
170
170
|
position: relative;
|
|
171
171
|
position: absolute;
|
|
172
172
|
}
|
|
173
|
-
body[data-awsui-focus-visible=true] .
|
|
173
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_k905k_98.awsui_has-focus_x7peu_k905k_142:not(#\9) {
|
|
174
174
|
outline: 2px dotted transparent;
|
|
175
175
|
outline-offset: calc(var(--space-table-header-focus-outline-gutter-7js4en, 0px) - 1px);
|
|
176
176
|
}
|
|
177
|
-
body[data-awsui-focus-visible=true] .
|
|
177
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_k905k_98.awsui_has-focus_x7peu_k905k_142:not(#\9)::before {
|
|
178
178
|
content: " ";
|
|
179
179
|
display: block;
|
|
180
180
|
position: absolute;
|
|
@@ -185,11 +185,11 @@ body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_19okv_98.awsui_has-focu
|
|
|
185
185
|
border-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
186
186
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
187
187
|
}
|
|
188
|
-
body[data-awsui-focus-visible=true] .
|
|
188
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_k905k_98.awsui_has-focus_x7peu_k905k_142:not(#\9)::before {
|
|
189
189
|
box-shadow: inset 0 0 0 2px var(--color-border-item-focused-b2ntyl, #0972d3);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
.
|
|
192
|
+
.awsui_tracker_x7peu_k905k_165:not(#\9) {
|
|
193
193
|
display: none;
|
|
194
194
|
position: absolute;
|
|
195
195
|
border-left: var(--border-divider-list-width-27y3k5, 1px) dashed var(--color-border-divider-active-k4haaf, #000716);
|
|
@@ -197,6 +197,6 @@ body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_19okv_98.awsui_has-focu
|
|
|
197
197
|
top: 0;
|
|
198
198
|
bottom: 0;
|
|
199
199
|
}
|
|
200
|
-
.awsui_resize-
|
|
200
|
+
.awsui_resize-active_x7peu_k905k_93 .awsui_tracker_x7peu_k905k_165:not(#\9) {
|
|
201
201
|
display: block;
|
|
202
202
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"resize-active": "awsui_resize-
|
|
6
|
-
"resize-active-with-focus": "awsui_resize-active-with-
|
|
7
|
-
"resizer": "
|
|
8
|
-
"resizer-active": "awsui_resizer-
|
|
9
|
-
"has-focus": "awsui_has-
|
|
10
|
-
"tracker": "
|
|
5
|
+
"resize-active": "awsui_resize-active_x7peu_k905k_93",
|
|
6
|
+
"resize-active-with-focus": "awsui_resize-active-with-focus_x7peu_k905k_93",
|
|
7
|
+
"resizer": "awsui_resizer_x7peu_k905k_98",
|
|
8
|
+
"resizer-active": "awsui_resizer-active_x7peu_k905k_130",
|
|
9
|
+
"has-focus": "awsui_has-focus_x7peu_k905k_142",
|
|
10
|
+
"tracker": "awsui_tracker_x7peu_k905k_165"
|
|
11
11
|
};
|
|
12
12
|
|