@carbon/ibm-products 2.97.0 → 2.98.0
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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +384 -384
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +4 -0
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +18 -6
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +2 -0
- package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +3 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +5 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +8 -4
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +7 -2
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +9 -3
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +11 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts.map +1 -1
- package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +12 -2
- package/es/components/ConditionBuilder/index.d.ts +1 -0
- package/es/components/ConditionBuilder/index.d.ts.map +1 -1
- package/es/components/ConditionBuilder/utils/handleKeyboardEvents.js +5 -2
- package/es/components/PageHeader/next/PageHeaderBreadcrumbBar.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderBreadcrumbBar.js +5 -2
- package/es/components/PageHeader/next/PageHeaderContent.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderContent.js +2 -6
- package/es/components/PageHeader/next/PageHeaderTagOverflow.d.ts +1 -1
- package/es/components/PageHeader/next/PageHeaderTagOverflow.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderTagOverflow.js +3 -1
- package/es/components/PageHeader/next/PageHeaderTitleBreadcrumb.d.ts.map +1 -1
- package/es/components/PageHeader/next/PageHeaderTitleBreadcrumb.js +3 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +4 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +17 -5
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +2 -0
- package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +3 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +5 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +8 -4
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOption.js +7 -2
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.js +9 -3
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +1 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +11 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +12 -2
- package/lib/components/ConditionBuilder/index.d.ts +1 -0
- package/lib/components/ConditionBuilder/index.d.ts.map +1 -1
- package/lib/components/ConditionBuilder/utils/handleKeyboardEvents.js +5 -2
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbBar.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderBreadcrumbBar.js +5 -2
- package/lib/components/PageHeader/next/PageHeaderContent.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderContent.js +2 -6
- package/lib/components/PageHeader/next/PageHeaderTagOverflow.d.ts +1 -1
- package/lib/components/PageHeader/next/PageHeaderTagOverflow.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderTagOverflow.js +3 -1
- package/lib/components/PageHeader/next/PageHeaderTitleBreadcrumb.d.ts.map +1 -1
- package/lib/components/PageHeader/next/PageHeaderTitleBreadcrumb.js +3 -1
- package/package.json +6 -6
- package/telemetry.yml +4 -0
|
@@ -34,11 +34,14 @@ const ConditionBuilderContent = ({ startConditionLabel, getConditionState, getAc
|
|
|
34
34
|
const initialConditionState = (0, react.useRef)(initialState?.state ? JSON.parse(JSON.stringify(initialState?.state)) : null);
|
|
35
35
|
const [isConditionBuilderActive, setIsConditionBuilderActive] = (0, react.useState)(false);
|
|
36
36
|
const [showConditionGroupPreview, setShowConditionGroupPreview] = (0, react.useState)(false);
|
|
37
|
-
const [addConditionGroupText, conditionHeadingText, conditionBuilderHierarchicalText] = require_useTranslations.useTranslations([
|
|
37
|
+
const [addConditionGroupText, conditionHeadingText, conditionBuilderHierarchicalText, conditionRemovedText] = require_useTranslations.useTranslations([
|
|
38
38
|
"addConditionGroupText",
|
|
39
39
|
"conditionHeadingText",
|
|
40
|
-
"conditionBuilderHierarchicalText"
|
|
40
|
+
"conditionBuilderHierarchicalText",
|
|
41
|
+
"conditionRemovedText"
|
|
41
42
|
]);
|
|
43
|
+
const carbonPrefix = (0, _carbon_react.usePrefix)();
|
|
44
|
+
const [statusMessage, setStatusMessage] = (0, react.useState)("");
|
|
42
45
|
const showConditionGroupPreviewHandler = () => {
|
|
43
46
|
setShowConditionGroupPreview(true);
|
|
44
47
|
};
|
|
@@ -77,11 +80,13 @@ const ConditionBuilderContent = ({ startConditionLabel, getConditionState, getAc
|
|
|
77
80
|
groups: rootState ? groups : []
|
|
78
81
|
});
|
|
79
82
|
if (groups?.length === 0) initialConditionState.current = null;
|
|
83
|
+
setStatusMessage(conditionRemovedText);
|
|
80
84
|
}
|
|
81
85
|
}, [
|
|
82
86
|
setRootState,
|
|
83
87
|
rootState,
|
|
84
|
-
onRemoveItem
|
|
88
|
+
onRemoveItem,
|
|
89
|
+
conditionRemovedText
|
|
85
90
|
]);
|
|
86
91
|
const onChangeHandler = (updatedGroup, groupIndex) => {
|
|
87
92
|
/**
|
|
@@ -128,7 +133,12 @@ const ConditionBuilderContent = ({ startConditionLabel, getConditionState, getAc
|
|
|
128
133
|
role: "treegrid",
|
|
129
134
|
"aria-label": conditionBuilderHierarchicalText
|
|
130
135
|
} : null;
|
|
131
|
-
return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement(
|
|
136
|
+
return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("div", {
|
|
137
|
+
role: "status",
|
|
138
|
+
"aria-live": "polite",
|
|
139
|
+
"aria-atomic": "true",
|
|
140
|
+
className: `${carbonPrefix}--visually-hidden`
|
|
141
|
+
}, statusMessage), /* @__PURE__ */ react.default.createElement(_carbon_react.Section, {
|
|
132
142
|
className: `${require_util.blockClass}__heading`,
|
|
133
143
|
level: 4
|
|
134
144
|
}, /* @__PURE__ */ react.default.createElement(_carbon_react.Heading, null, conditionHeadingText)), /* @__PURE__ */ react.default.createElement("div", {
|
|
@@ -150,7 +160,9 @@ const ConditionBuilderContent = ({ startConditionLabel, getConditionState, getAc
|
|
|
150
160
|
},
|
|
151
161
|
onChange: (updatedGroup) => {
|
|
152
162
|
onChangeHandler(updatedGroup, groupIndex);
|
|
153
|
-
}
|
|
163
|
+
},
|
|
164
|
+
setStatusMessage,
|
|
165
|
+
conditionRemovedText
|
|
154
166
|
}), rootState.groups && groupIndex < rootState.groups.length - 1 && /* @__PURE__ */ react.default.createElement(require_GroupConnector.default, null))), !readOnly && variant == "Hierarchical" && /* @__PURE__ */ react.default.createElement("div", {
|
|
155
167
|
role: "row",
|
|
156
168
|
tabIndex: -1,
|
|
@@ -34,6 +34,7 @@ export namespace translationsObject {
|
|
|
34
34
|
let addConditionRowText: string;
|
|
35
35
|
let startText: string;
|
|
36
36
|
let endText: string;
|
|
37
|
+
let searchPropertiesText: string;
|
|
37
38
|
let clearSearchText: string;
|
|
38
39
|
let actionsText: string;
|
|
39
40
|
let then: string;
|
|
@@ -48,5 +49,6 @@ export namespace translationsObject {
|
|
|
48
49
|
let addOperatorText: string;
|
|
49
50
|
let addValueText: string;
|
|
50
51
|
let conditionBuilderHierarchicalText: string;
|
|
52
|
+
let conditionRemovedText: string;
|
|
51
53
|
}
|
|
52
54
|
//# sourceMappingURL=translationObject.d.ts.map
|
|
@@ -48,6 +48,7 @@ const translationsObject = {
|
|
|
48
48
|
addConditionRowText: "Add condition row",
|
|
49
49
|
startText: "Start",
|
|
50
50
|
endText: "End",
|
|
51
|
+
searchPropertiesText: "Search properties",
|
|
51
52
|
clearSearchText: "Clear search input",
|
|
52
53
|
actionsText: "Actions",
|
|
53
54
|
then: "then",
|
|
@@ -61,7 +62,8 @@ const translationsObject = {
|
|
|
61
62
|
addPropertyText: "Add property",
|
|
62
63
|
addOperatorText: "Add operator",
|
|
63
64
|
addValueText: "Add value",
|
|
64
|
-
conditionBuilderHierarchicalText: "Condition Builder Hierarchical"
|
|
65
|
+
conditionBuilderHierarchicalText: "Condition Builder Hierarchical",
|
|
66
|
+
conditionRemovedText: "Condition removed"
|
|
65
67
|
};
|
|
66
68
|
//#endregion
|
|
67
69
|
exports.translationsObject = translationsObject;
|
|
@@ -13,6 +13,10 @@ interface ConditionBuilderItemProps extends PropsWithChildren {
|
|
|
13
13
|
label?: string | Option | Option[];
|
|
14
14
|
renderIcon?: CarbonIconType;
|
|
15
15
|
title?: string;
|
|
16
|
+
/** Screen-reader-only label for the popover dialog. Defaults to `title` when not set.
|
|
17
|
+
* Use this to supply richer context (e.g. "Property — Condition 1") without
|
|
18
|
+
* changing the visible heading rendered inside the popover. */
|
|
19
|
+
dialogAriaLabel?: string;
|
|
16
20
|
showToolTip?: boolean;
|
|
17
21
|
popOverClassName?: string;
|
|
18
22
|
type?: string;
|
|
@@ -28,7 +32,7 @@ interface ConditionBuilderItemProps extends PropsWithChildren {
|
|
|
28
32
|
onBlur?: React.FocusEventHandler<HTMLButtonElement>;
|
|
29
33
|
}
|
|
30
34
|
export declare const ConditionBuilderItem: {
|
|
31
|
-
({ children, className, label, renderIcon, title, type, showToolTip, condition, popOverClassName, config, renderChildren, onChange, description, ...rest }: ConditionBuilderItemProps): React.JSX.Element;
|
|
35
|
+
({ children, className, label, renderIcon, title, dialogAriaLabel, type, showToolTip, condition, popOverClassName, config, renderChildren, onChange, description, ...rest }: ConditionBuilderItemProps): React.JSX.Element;
|
|
32
36
|
propTypes: {
|
|
33
37
|
/**
|
|
34
38
|
* provide the contents of the popover
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionBuilderItem.d.ts","sourceRoot":"","sources":["../../../../src/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAKZ,iBAAiB,EAEjB,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AASf,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAO,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,UAAU,EACX,MAAM,2BAA2B,CAAC;AASnC,UAAU,yBAA0B,SAAQ,iBAAiB;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ConditionBuilderItem.d.ts","sourceRoot":"","sources":["../../../../src/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAKZ,iBAAiB,EAEjB,SAAS,EACT,GAAG,EACJ,MAAM,OAAO,CAAC;AASf,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAO,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAK1D,OAAO,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,UAAU,EACX,MAAM,2BAA2B,CAAC;AASnC,UAAU,yBAA0B,SAAQ,iBAAiB;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;IACnC,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;oEAEgE;IAChE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,cAAc,CAAC,EAAE,CACf,GAAG,EAAE,GAAG,CAAC,cAAc,GAAG,IAAI,CAAC,EAC/B,YAAY,EAAE,MAAM,IAAI,KACrB,SAAS,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAChE,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACrD;AACD,eAAO,MAAM,oBAAoB;iLAgB9B,yBAAyB;;QAgR1B;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAGH;;WAEG;;QAIH;;WAEG;;QAOH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAEH;;WAEG;;;CA9DJ,CAAC"}
|
|
@@ -26,7 +26,7 @@ let _carbon_react_icons = require("@carbon/react/icons");
|
|
|
26
26
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
27
27
|
* LICENSE file in the root directory of this source tree.
|
|
28
28
|
*/
|
|
29
|
-
const ConditionBuilderItem = ({ children, className, label, renderIcon, title, type, showToolTip, condition, popOverClassName, config, renderChildren, onChange, description, ...rest }) => {
|
|
29
|
+
const ConditionBuilderItem = ({ children, className, label, renderIcon, title, dialogAriaLabel, type, showToolTip, condition, popOverClassName, config, renderChildren, onChange, description, ...rest }) => {
|
|
30
30
|
const popoverRef = (0, react.useRef)(null);
|
|
31
31
|
const [open, setOpen] = (0, react.useState)(false);
|
|
32
32
|
const { conditionBuilderRef, statementConfigCustom, readOnly } = (0, react.useContext)(require_ConditionBuilderProvider.ConditionBuilderContext);
|
|
@@ -95,7 +95,9 @@ const ConditionBuilderItem = ({ children, className, label, renderIcon, title, t
|
|
|
95
95
|
if (!popoverEl) return;
|
|
96
96
|
const focusLeftPopover = relatedTarget && !popoverEl.contains(relatedTarget);
|
|
97
97
|
const targetInsidePopover = popoverEl.contains(focusEvent.target);
|
|
98
|
-
const
|
|
98
|
+
const targetEl = focusEvent.target;
|
|
99
|
+
const relatedEl = focusEvent.relatedTarget;
|
|
100
|
+
const focusMovedToDatePicker = targetEl?.closest(".flatpickr-calendar") || relatedEl?.closest?.(".flatpickr-calendar");
|
|
99
101
|
if ((focusLeftPopover || !targetInsidePopover) && !focusMovedToDatePicker) closePopover();
|
|
100
102
|
});
|
|
101
103
|
const manageInvalidSelection = () => {
|
|
@@ -145,11 +147,13 @@ const ConditionBuilderItem = ({ children, className, label, renderIcon, title, t
|
|
|
145
147
|
showToolTip,
|
|
146
148
|
isInvalid,
|
|
147
149
|
description,
|
|
148
|
-
...rest
|
|
150
|
+
...rest,
|
|
151
|
+
...isInvalid && dialogAriaLabel ? { "aria-label": `${invalidText}: ${dialogAriaLabel}` } : {}
|
|
149
152
|
}), open && /* @__PURE__ */ react.default.createElement(_carbon_react.PopoverContent, {
|
|
150
153
|
className: `${require_util.blockClass}__popover-content-wrapper`,
|
|
151
154
|
role: "dialog",
|
|
152
|
-
"aria-
|
|
155
|
+
"aria-modal": "true",
|
|
156
|
+
"aria-label": dialogAriaLabel ?? title,
|
|
153
157
|
onKeyDown: handleKeyDownHandler
|
|
154
158
|
}, /* @__PURE__ */ react.default.createElement(_carbon_react.Layer, null, /* @__PURE__ */ react.default.createElement(_carbon_react.Section, null, /* @__PURE__ */ react.default.createElement(_carbon_react.Heading, { className: `${require_util.blockClass}__item__title` }, title), /* @__PURE__ */ react.default.createElement("div", { className: `${require_util.blockClass}__popover-content` }, renderChildren ? renderChildren(popoverRef, closePopover) : children)))));
|
|
155
159
|
};
|
|
@@ -25,7 +25,11 @@ let _carbon_react_icons = require("@carbon/react/icons");
|
|
|
25
25
|
const ItemOption = ({ conditionState = {}, config = {}, onChange, closePopover, group }) => {
|
|
26
26
|
const { popOverSearchThreshold } = (0, react.useContext)(require_ConditionBuilderProvider.ConditionBuilderContext);
|
|
27
27
|
const contentRef = (0, react.useRef)(null);
|
|
28
|
-
const [propertyText, clearSearchText] = require_useTranslations.useTranslations([
|
|
28
|
+
const [propertyText, clearSearchText, searchPropertiesText] = require_useTranslations.useTranslations([
|
|
29
|
+
"propertyText",
|
|
30
|
+
"clearSearchText",
|
|
31
|
+
"searchPropertiesText"
|
|
32
|
+
]);
|
|
29
33
|
const { conditionBuilderRef } = (0, react.useContext)(require_ConditionBuilderProvider.ConditionBuilderContext);
|
|
30
34
|
const allOptions = config?.options;
|
|
31
35
|
const [searchValue, setSearchValue] = (0, react.useState)("");
|
|
@@ -56,7 +60,8 @@ const ItemOption = ({ conditionState = {}, config = {}, onChange, closePopover,
|
|
|
56
60
|
ref: contentRef
|
|
57
61
|
}, allOptions.length > popOverSearchThreshold ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_util.blockClass}__item-option__search` }, /* @__PURE__ */ react.default.createElement(_carbon_react.Search, {
|
|
58
62
|
size: "sm",
|
|
59
|
-
labelText:
|
|
63
|
+
labelText: searchPropertiesText,
|
|
64
|
+
placeholder: "",
|
|
60
65
|
closeButtonLabelText: clearSearchText,
|
|
61
66
|
onChange: onSearchChangeHandler,
|
|
62
67
|
onKeyDown: (evt) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemOptionForValueField.d.ts","sourceRoot":"","sources":["../../../../../src/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,OAAO,EACL,SAAS,EAGT,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AAOtC,UAAU,4BAA4B;IACpC,cAAc,EAAE,SAAS,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AACD,eAAO,MAAM,uBAAuB;0DAKjC,4BAA4B;;
|
|
1
|
+
{"version":3,"file":"ItemOptionForValueField.d.ts","sourceRoot":"","sources":["../../../../../src/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ItemOptionForValueField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,OAAO,SAAS,MAAM,YAAY,CAAC;AAGnC,OAAO,EACL,SAAS,EAGT,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AAOtC,UAAU,4BAA4B;IACpC,cAAc,EAAE,SAAS,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B;AACD,eAAO,MAAM,uBAAuB;0DAKjC,4BAA4B;;QA0O7B;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;CAfJ,CAAC"}
|
|
@@ -26,7 +26,11 @@ let _carbon_react_icons = require("@carbon/react/icons");
|
|
|
26
26
|
const ItemOptionForValueField = ({ conditionState = {}, config = {}, onChange, closePopover }) => {
|
|
27
27
|
const multiSelectable = require_util.checkForMultiSelectOperator(conditionState, config);
|
|
28
28
|
const { popOverSearchThreshold, getOptions, rootState } = (0, react.useContext)(require_ConditionBuilderProvider.ConditionBuilderContext);
|
|
29
|
-
const [propertyText, clearSearchText] = require_useTranslations.useTranslations([
|
|
29
|
+
const [propertyText, clearSearchText, searchPropertiesText] = require_useTranslations.useTranslations([
|
|
30
|
+
"propertyText",
|
|
31
|
+
"clearSearchText",
|
|
32
|
+
"searchPropertiesText"
|
|
33
|
+
]);
|
|
30
34
|
const { conditionBuilderRef } = (0, react.useContext)(require_ConditionBuilderProvider.ConditionBuilderContext);
|
|
31
35
|
const contentRef = (0, react.useRef)(null);
|
|
32
36
|
const [allOptions, setAllOptions] = (0, react.useState)(config?.options);
|
|
@@ -74,7 +78,8 @@ const ItemOptionForValueField = ({ conditionState = {}, config = {}, onChange, c
|
|
|
74
78
|
ref: contentRef
|
|
75
79
|
}, allOptions.length > popOverSearchThreshold ? /* @__PURE__ */ react.default.createElement("div", { className: `${require_util.blockClass}__item-option__search` }, /* @__PURE__ */ react.default.createElement(_carbon_react.Search, {
|
|
76
80
|
size: "sm",
|
|
77
|
-
labelText:
|
|
81
|
+
labelText: searchPropertiesText,
|
|
82
|
+
placeholder: "",
|
|
78
83
|
closeButtonLabelText: clearSearchText,
|
|
79
84
|
onChange: onSearchChangeHandler,
|
|
80
85
|
onKeyDown: (evt) => {
|
|
@@ -89,7 +94,8 @@ const ItemOptionForValueField = ({ conditionState = {}, config = {}, onChange, c
|
|
|
89
94
|
}, selection.length == 0 ? "Select all" : "Deselect all")), /* @__PURE__ */ react.default.createElement("ul", {
|
|
90
95
|
"aria-label": getAriaLabel(),
|
|
91
96
|
role: "listbox",
|
|
92
|
-
"data-multi-select": multiSelectable
|
|
97
|
+
"data-multi-select": multiSelectable,
|
|
98
|
+
"aria-multiselectable": multiSelectable ? true : void 0
|
|
93
99
|
}, filteredItems?.map((option) => {
|
|
94
100
|
const isSelected = selection.map((option) => option.id).includes(option.id);
|
|
95
101
|
const Icon = option.icon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionBuilderItemTime.d.ts","sourceRoot":"","sources":["../../../../../src/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,UAAU,wBAAwB;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,cAAc,EAAE;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AACD,eAAO,MAAM,wBAAwB;4CAIlC,wBAAwB;;
|
|
1
|
+
{"version":3,"file":"ConditionBuilderItemTime.d.ts","sourceRoot":"","sources":["../../../../../src/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGlE,UAAU,wBAAwB;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9C,MAAM,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACrC,cAAc,EAAE;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AACD,eAAO,MAAM,wBAAwB;4CAIlC,wBAAwB;;QA2EzB;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;CAbJ,CAAC"}
|
|
@@ -53,7 +53,7 @@ const ConditionBuilderItemTime = ({ onChange, config, conditionState }) => {
|
|
|
53
53
|
return /* @__PURE__ */ react.default.createElement("div", { className: `${require_util.blockClass}__item-time` }, /* @__PURE__ */ react.default.createElement(_carbon_react.TimePicker, {
|
|
54
54
|
defaultValue: initialTimeValue,
|
|
55
55
|
id: "time-picker",
|
|
56
|
-
labelText: "Select a time",
|
|
56
|
+
labelText: conditionState.label ? `Select time for ${conditionState.label}` : "Select a time",
|
|
57
57
|
onChange: setTime
|
|
58
58
|
}, /* @__PURE__ */ react.default.createElement(_carbon_react.TimePickerSelect, {
|
|
59
59
|
id: "time-picker-day-zone",
|
|
@@ -23,9 +23,11 @@ interface ConditionGroupBuilderProps {
|
|
|
23
23
|
posinset: number;
|
|
24
24
|
setsize: number;
|
|
25
25
|
};
|
|
26
|
+
setStatusMessage?: (message: string) => void;
|
|
27
|
+
conditionRemovedText?: string;
|
|
26
28
|
}
|
|
27
29
|
declare const ConditionGroupBuilder: {
|
|
28
|
-
({ group, aria, onRemove, onChange, className, }: ConditionGroupBuilderProps): React.JSX.Element;
|
|
30
|
+
({ group, aria, onRemove, onChange, className, setStatusMessage, conditionRemovedText, }: ConditionGroupBuilderProps): React.JSX.Element;
|
|
29
31
|
propTypes: {
|
|
30
32
|
/**
|
|
31
33
|
* object contains the aria attributes
|
|
@@ -38,6 +40,10 @@ declare const ConditionGroupBuilder: {
|
|
|
38
40
|
* Provide an optional class to be applied to the containing node.
|
|
39
41
|
*/
|
|
40
42
|
className: PropTypes.Requireable<string>;
|
|
43
|
+
/**
|
|
44
|
+
* translation string announced when a condition is removed
|
|
45
|
+
*/
|
|
46
|
+
conditionRemovedText: PropTypes.Requireable<string>;
|
|
41
47
|
group: PropTypes.Requireable<object>;
|
|
42
48
|
/**
|
|
43
49
|
* callback to update the current condition of the state tree
|
|
@@ -47,6 +53,10 @@ declare const ConditionGroupBuilder: {
|
|
|
47
53
|
* call back to remove the particular group from the state tree
|
|
48
54
|
*/
|
|
49
55
|
onRemove: PropTypes.Requireable<(...args: any[]) => any>;
|
|
56
|
+
/**
|
|
57
|
+
* callback to update the aria-live status message in the parent
|
|
58
|
+
*/
|
|
59
|
+
setStatusMessage: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
60
|
};
|
|
51
61
|
};
|
|
52
62
|
export default ConditionGroupBuilder;
|
package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConditionGroupBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,SAAS,MAAM,YAAY,CAAC;AAkBnC,OAAO,EAEL,cAAc,EAEf,MAAM,2BAA2B,CAAC;AAGnC;;;;;GAKG;AAEH,UAAU,0BAA0B;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"ConditionGroupBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,SAAS,MAAM,YAAY,CAAC;AAkBnC,OAAO,EAEL,cAAc,EAEf,MAAM,2BAA2B,CAAC;AAGnC;;;;;GAKG;AAEH,UAAU,0BAA0B;IAClC,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,QAAA,MAAM,qBAAqB;8FAQxB,0BAA0B;;QAghB3B;;WAEG;;QAGH;;WAEG;QACH;;WAEG;;QAGH;;WAEG;;;QAGH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;CAhCJ,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -29,7 +29,7 @@ prop_types = require_runtime.__toESM(prop_types);
|
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
31
|
var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.default);
|
|
32
|
-
const ConditionGroupBuilder = ({ group, aria, onRemove, onChange, className }) => {
|
|
32
|
+
const ConditionGroupBuilder = ({ group, aria, onRemove, onChange, className, setStatusMessage, conditionRemovedText }) => {
|
|
33
33
|
const [conditionBuilderGroupText, conditionText, conditionBuilderText] = require_useTranslations.useTranslations([
|
|
34
34
|
"conditionBuilderGroupText",
|
|
35
35
|
"conditionText",
|
|
@@ -98,6 +98,7 @@ const ConditionGroupBuilder = ({ group, aria, onRemove, onChange, className }) =
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
} else onRemove?.(evt);
|
|
101
|
+
setStatusMessage?.(conditionRemovedText ?? "");
|
|
101
102
|
};
|
|
102
103
|
const checkGroupHaveCondition = (conditions, conditionId) => {
|
|
103
104
|
return conditions.find((eachCondition) => {
|
|
@@ -246,6 +247,7 @@ const ConditionGroupBuilder = ({ group, aria, onRemove, onChange, className }) =
|
|
|
246
247
|
}, /* @__PURE__ */ react.default.createElement(require_ConditionBuilderItem.ConditionBuilderItem, {
|
|
247
248
|
label: group.statement,
|
|
248
249
|
title: conditionText,
|
|
250
|
+
dialogAriaLabel: `${conditionText} — ${conditionBuilderGroupText} ${Math.ceil(aria.posinset / 2)}`,
|
|
249
251
|
"data-name": "connectorField",
|
|
250
252
|
popOverClassName: `${require_util.blockClass}__gap ${require_util.blockClass}__connector`,
|
|
251
253
|
className: `${require_util.blockClass}__statement-button`
|
|
@@ -332,6 +334,10 @@ ConditionGroupBuilder.propTypes = {
|
|
|
332
334
|
* Provide an optional class to be applied to the containing node.
|
|
333
335
|
*/
|
|
334
336
|
className: prop_types.default.string,
|
|
337
|
+
/**
|
|
338
|
+
* translation string announced when a condition is removed
|
|
339
|
+
*/
|
|
340
|
+
conditionRemovedText: prop_types.default.string,
|
|
335
341
|
group: prop_types.default.object,
|
|
336
342
|
/**
|
|
337
343
|
* callback to update the current condition of the state tree
|
|
@@ -340,7 +346,11 @@ ConditionGroupBuilder.propTypes = {
|
|
|
340
346
|
/**
|
|
341
347
|
* call back to remove the particular group from the state tree
|
|
342
348
|
*/
|
|
343
|
-
onRemove: prop_types.default.func
|
|
349
|
+
onRemove: prop_types.default.func,
|
|
350
|
+
/**
|
|
351
|
+
* callback to update the aria-live status message in the parent
|
|
352
|
+
*/
|
|
353
|
+
setStatusMessage: prop_types.default.func
|
|
344
354
|
};
|
|
345
355
|
//#endregion
|
|
346
356
|
exports.default = ConditionGroupBuilder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConditionBuilder/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ConditionBuilder/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC"}
|
|
@@ -55,7 +55,7 @@ const handleKeyPressForPopover = (evt, parentContainer, conditionBuilderRef, clo
|
|
|
55
55
|
});
|
|
56
56
|
break;
|
|
57
57
|
case "Tab":
|
|
58
|
-
allItems = [...Array.from(parentContainer.querySelectorAll(`.${require_util.blockClass}__selectAll-button,[
|
|
58
|
+
allItems = [...Array.from(parentContainer.querySelectorAll(`.${require_util.blockClass}__selectAll-button,input[type="search"]`)), getVisibleOptions(parentContainer)?.[0]];
|
|
59
59
|
allItems.forEach((eachElem, index, allElements) => {
|
|
60
60
|
if (isHoldingShiftKey) require_util.traverseReverse(eachElem, index, allElements, true, true, conditionBuilderRef);
|
|
61
61
|
else require_util.traverseClockwise(eachElem, index, allElements, true, true, conditionBuilderRef);
|
|
@@ -69,7 +69,10 @@ const handleKeyPressForPopover = (evt, parentContainer, conditionBuilderRef, clo
|
|
|
69
69
|
}
|
|
70
70
|
break;
|
|
71
71
|
case "Enter":
|
|
72
|
-
if (
|
|
72
|
+
if (isMultiSelect === "true") {
|
|
73
|
+
if (document.activeElement.type !== "button") document.activeElement?.click();
|
|
74
|
+
evt.preventDefault();
|
|
75
|
+
} else if (document.activeElement.type !== "button") {
|
|
73
76
|
require_util.focusThisField(evt, conditionBuilderRef);
|
|
74
77
|
document.activeElement?.click();
|
|
75
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeaderBreadcrumbBar.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderBreadcrumbBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AAEnB;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,GAAG,iBAAiB,CAAC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EACX,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1D;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EACR,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1D;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"PageHeaderBreadcrumbBar.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderBreadcrumbBar.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,EAGL,KAAK,uBAAuB,EAC7B,MAAM,WAAW,CAAC;AAEnB;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,GAAG,iBAAiB,CAAC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EACX,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1D;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EACR,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAC1D;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,qGAkFlC,CAAC"}
|
|
@@ -46,9 +46,12 @@ const PageHeaderBreadcrumbBar = react.default.forwardRef(function PageHeaderBrea
|
|
|
46
46
|
lg: 16,
|
|
47
47
|
md: 8,
|
|
48
48
|
sm: 4
|
|
49
|
-
}, /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__breadcrumb-container` }, /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__breadcrumb-wrapper` }, IconElement && /* @__PURE__ */ react.default.createElement("div", {
|
|
49
|
+
}, /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__breadcrumb-container` }, /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__breadcrumb-wrapper` }, IconElement && /* @__PURE__ */ react.default.createElement("div", {
|
|
50
|
+
className: `${require_PageHeaderUtils.blockClass}__breadcrumb__icon`,
|
|
51
|
+
"aria-hidden": "true"
|
|
52
|
+
}, /* @__PURE__ */ react.default.createElement(IconElement, null)), children), /* @__PURE__ */ react.default.createElement("div", {
|
|
50
53
|
className: `${require_PageHeaderUtils.blockClass}__breadcrumb__actions`,
|
|
51
|
-
role: "
|
|
54
|
+
role: "toolbar",
|
|
52
55
|
"aria-label": actionsAriaLabel
|
|
53
56
|
}, /* @__PURE__ */ react.default.createElement("div", { className: contentActionsClasses }, typeof contentActions === "function" ? contentActions(observerState) : contentActions), typeof pageActions === "function" ? pageActions(observerState) : pageActions))))));
|
|
54
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeaderContent.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderContent.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAyB,OAAO,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAGxE;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,GAAG,iBAAiB,CAAC;IAC/C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,OAAO,CAAC;IACnE;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,EACR,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,iBAAiB,+
|
|
1
|
+
{"version":3,"file":"PageHeaderContent.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderContent.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EACZ,KAAK,aAAa,EAClB,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAyB,OAAO,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,EAAiB,KAAK,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAGxE;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,aAAa,GAAG,iBAAiB,CAAC;IAC/C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,OAAO,CAAC;IACnE;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,EACR,KAAK,CAAC,SAAS,GACf,CAAC,CAAC,KAAK,EAAE,uBAAuB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,iBAAiB,+FAuF5B,CAAC"}
|
|
@@ -26,7 +26,7 @@ var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.de
|
|
|
26
26
|
const PageHeaderContent = react.default.forwardRef(function PageHeaderContent({ className, children, title, titleAs: TitleTag = "h1", titleTruncate, renderIcon: IconElement, contextualActions, pageActions, ...other }, ref) {
|
|
27
27
|
const contentRef = (0, react.useRef)(null);
|
|
28
28
|
const componentRef = ref ?? contentRef;
|
|
29
|
-
const { setRefs, setPageActionsInstance } = require_context.usePageHeader();
|
|
29
|
+
const { setRefs, setPageActionsInstance, observerState } = require_context.usePageHeader();
|
|
30
30
|
const classNames = (0, import_classnames.default)({ [`${require_PageHeaderUtils.blockClass}__content`]: true }, className);
|
|
31
31
|
const titleRef = (0, react.useRef)(null);
|
|
32
32
|
const titleLines = titleTruncate ?? (contextualActions ? 1 : 2);
|
|
@@ -60,11 +60,7 @@ const PageHeaderContent = react.default.forwardRef(function PageHeaderContent({
|
|
|
60
60
|
value: title,
|
|
61
61
|
lines: titleLines,
|
|
62
62
|
type: "tooltip"
|
|
63
|
-
}))), contextualActions && /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__content__contextual-actions` }, contextualActions)), typeof pageActions === "function" ? pageActions(
|
|
64
|
-
fullyCollapsed: false,
|
|
65
|
-
titleClipped: false,
|
|
66
|
-
contentActionsClipped: false
|
|
67
|
-
}) : pageActions), children)));
|
|
63
|
+
}))), contextualActions && /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__content__contextual-actions` }, contextualActions)), typeof pageActions === "function" ? pageActions(observerState) : pageActions), children)));
|
|
68
64
|
});
|
|
69
65
|
PageHeaderContent.displayName = "PageHeaderContent";
|
|
70
66
|
PageHeaderContent.propTypes = {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
export interface PageHeaderTagOverflowProps {
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
-
renderOverflowTag?: (hiddenBreadcrumbs: HTMLElement[], handleOverflowClick: (event: React.MouseEvent) => void, openPopover: boolean) => React.ReactElement;
|
|
10
|
+
renderOverflowTag?: (hiddenBreadcrumbs: HTMLElement[], handleOverflowClick: (event: React.MouseEvent) => void, openPopover: boolean, triggerId?: string) => React.ReactElement;
|
|
11
11
|
renderPopoverContent?: (hiddenBreadcrumbs: HTMLElement[]) => React.ReactElement;
|
|
12
12
|
}
|
|
13
13
|
export declare const PageHeaderTagOverflow: React.ForwardRefExoticComponent<PageHeaderTagOverflowProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeaderTagOverflow.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderTagOverflow.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAMN,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,0BAA0B;IAEzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAClB,iBAAiB,EAAE,WAAW,EAAE,EAChC,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,EACtD,WAAW,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"PageHeaderTagOverflow.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderTagOverflow.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAMN,MAAM,OAAO,CAAC;AAOf,MAAM,WAAW,0BAA0B;IAEzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,CAClB,iBAAiB,EAAE,WAAW,EAAE,EAChC,mBAAmB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,EACtD,WAAW,EAAE,OAAO,EACpB,SAAS,CAAC,EAAE,MAAM,KACf,KAAK,CAAC,YAAY,CAAC;IACxB,oBAAoB,CAAC,EAAE,CACrB,iBAAiB,EAAE,WAAW,EAAE,KAC7B,KAAK,CAAC,YAAY,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB,mGA8EhC,CAAC"}
|
|
@@ -24,6 +24,7 @@ var import_classnames = /* @__PURE__ */ require_runtime.__toESM(require_index.de
|
|
|
24
24
|
const PageHeaderTagOverflow = react.default.forwardRef(({ renderOverflowTag, renderPopoverContent, children }, ref) => {
|
|
25
25
|
const [openPopover, setOpenPopover] = (0, react.useState)(false);
|
|
26
26
|
const [hiddenTags, setHiddenTags] = (0, react.useState)([]);
|
|
27
|
+
const overflowButtonId = `${require_settings.pkg.prefix}--page-header--tag-overflow-btn`;
|
|
27
28
|
const localRef = (0, react.useRef)(null);
|
|
28
29
|
const tagsContainerRef = ref || localRef;
|
|
29
30
|
(0, react.useEffect)(() => {
|
|
@@ -54,8 +55,9 @@ const PageHeaderTagOverflow = react.default.forwardRef(({ renderOverflowTag, ren
|
|
|
54
55
|
open: openPopover,
|
|
55
56
|
onRequestClose: () => setOpenPopover(false),
|
|
56
57
|
"data-fixed": true,
|
|
58
|
+
"aria-labelledby": overflowButtonId,
|
|
57
59
|
className: (0, import_classnames.default)(`${require_settings.pkg.prefix}--page-header--tag-overflow-popover`, { [`${require_settings.pkg.prefix}--page-header--tag-overflow-popover__hidden`]: !hiddenTags.length })
|
|
58
|
-
}, renderOverflowTag?.(hiddenTags, handleOverflowClick, openPopover), /* @__PURE__ */ react.default.createElement(_carbon_react.PopoverContent, null, /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__tags-popover-list` }, renderPopoverContent?.(hiddenTags)))));
|
|
60
|
+
}, renderOverflowTag?.(hiddenTags, handleOverflowClick, openPopover, overflowButtonId), /* @__PURE__ */ react.default.createElement(_carbon_react.PopoverContent, null, /* @__PURE__ */ react.default.createElement("div", { className: `${require_PageHeaderUtils.blockClass}__tags-popover-list` }, renderPopoverContent?.(hiddenTags)))));
|
|
59
61
|
});
|
|
60
62
|
PageHeaderTagOverflow.displayName = "PageHeaderTagOverflow";
|
|
61
63
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeaderTitleBreadcrumb.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderTitleBreadcrumb.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAkB,MAAM,eAAe,CAAC;AAIpE,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"PageHeaderTitleBreadcrumb.d.ts","sourceRoot":"","sources":["../../../../src/components/PageHeader/next/PageHeaderTitleBreadcrumb.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAkB,MAAM,eAAe,CAAC;AAIpE,eAAO,MAAM,yBAAyB,2FAoCpC,CAAC"}
|
|
@@ -25,11 +25,13 @@ const PageHeaderTitleBreadcrumb = (0, react.forwardRef)(({ className, children,
|
|
|
25
25
|
const titleClipped = observerState.titleClipped;
|
|
26
26
|
const hasContentElement = refs?.contentRef?.current;
|
|
27
27
|
const shouldShow = !hasContentElement || titleClipped && !!refs?.titleRef;
|
|
28
|
+
const isAriaHidden = hasContentElement && !titleClipped;
|
|
28
29
|
return /* @__PURE__ */ react.default.createElement(_carbon_react.BreadcrumbItem, {
|
|
29
30
|
ref,
|
|
30
31
|
isCurrentPage: true,
|
|
31
32
|
...other,
|
|
32
|
-
"aria-hidden":
|
|
33
|
+
"aria-hidden": isAriaHidden ? true : void 0,
|
|
34
|
+
tabIndex: isAriaHidden ? -1 : void 0,
|
|
33
35
|
className: (0, import_classnames.default)(className, `${require_settings.pkg.prefix}--page-header-title-breadcrumb`, {
|
|
34
36
|
[`${require_settings.pkg.prefix}--page-header-title-breadcrumb-show`]: shouldShow,
|
|
35
37
|
[`${require_settings.pkg.prefix}--page-header-title-breadcrumb-show__with-content-element`]: hasContentElement,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/ibm-products",
|
|
3
3
|
"description": "Carbon for IBM Products",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.98.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@babel/preset-react": "^7.26.3",
|
|
68
68
|
"@babel/preset-typescript": "^7.26.0",
|
|
69
69
|
"@carbon/charts-react": "^1.27.16",
|
|
70
|
-
"@carbon/ibm-products-utilities": "1.
|
|
70
|
+
"@carbon/ibm-products-utilities": "1.7.0",
|
|
71
71
|
"@carbon/styles": "^1.110.1",
|
|
72
72
|
"@figma/code-connect": "^1.4.0",
|
|
73
73
|
"@ibm/telemetry-js-config-generator": "^2.0.1",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@types/react-table": "^7.7.20",
|
|
81
81
|
"@vitejs/plugin-react": "^5.0.0",
|
|
82
82
|
"babel-plugin-dev-expression": "^0.2.3",
|
|
83
|
-
"babel-preset-ibm-cloud-cognitive": "^0.
|
|
83
|
+
"babel-preset-ibm-cloud-cognitive": "^0.56.0",
|
|
84
84
|
"change-case": "5.4.4",
|
|
85
85
|
"classnames": "^2.5.1",
|
|
86
86
|
"copyfiles": "^2.4.1",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"fs-extra": "^11.3.0",
|
|
89
89
|
"glob": "^13.0.0",
|
|
90
90
|
"jest": "^30.0.5",
|
|
91
|
-
"jest-config-ibm-cloud-cognitive": "^1.
|
|
91
|
+
"jest-config-ibm-cloud-cognitive": "^1.57.0",
|
|
92
92
|
"jest-environment-jsdom": "^30.0.5",
|
|
93
93
|
"namor": "^1.1.2",
|
|
94
94
|
"npm-run-all2": "^8.0.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@babel/runtime": "^7.26.10",
|
|
109
109
|
"@carbon-labs/react-resizer": "^0.25.0",
|
|
110
110
|
"@carbon/feature-flags": "^1.4.0",
|
|
111
|
-
"@carbon/ibm-products-styles": "^2.
|
|
111
|
+
"@carbon/ibm-products-styles": "^2.94.0",
|
|
112
112
|
"@carbon/telemetry": "^0.1.0",
|
|
113
113
|
"@carbon/utilities": "^0.21.0",
|
|
114
114
|
"@carbon/utilities-react": "0.24.0",
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0 || ^19.0.0",
|
|
133
133
|
"react-is": "^16.13.1 || ^17.0.2 || ^18.3.1 || ^19.0.0"
|
|
134
134
|
},
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "e818e518799f3ad09c1cd77f4e27f42dba9977b8"
|
|
136
136
|
}
|
package/telemetry.yml
CHANGED
|
@@ -662,6 +662,7 @@ collect:
|
|
|
662
662
|
- wrapperClassName
|
|
663
663
|
- wrapperProps
|
|
664
664
|
# ConditionBuilderItem
|
|
665
|
+
- dialogAriaLabel
|
|
665
666
|
- popOverClassName
|
|
666
667
|
- renderChildren
|
|
667
668
|
# ConditionBuilderItemDate
|
|
@@ -674,6 +675,9 @@ collect:
|
|
|
674
675
|
- setRootState
|
|
675
676
|
# ConditionConnector
|
|
676
677
|
- operator
|
|
678
|
+
# ConditionGroupBuilder
|
|
679
|
+
- conditionRemovedText
|
|
680
|
+
- setStatusMessage
|
|
677
681
|
# ConditionPreview
|
|
678
682
|
- colorIndex
|
|
679
683
|
- previewType
|