@patternfly/react-core 4.181.3 → 4.182.1
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/CHANGELOG.md +41 -0
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts +1 -0
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +5 -0
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuControl.d.ts.map +1 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuControl.js +8 -4
- package/dist/esm/components/OverflowMenu/OverflowMenuControl.js.map +1 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuGroup.d.ts.map +1 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuGroup.js +5 -1
- package/dist/esm/components/OverflowMenu/OverflowMenuGroup.js.map +1 -1
- package/dist/esm/components/TimePicker/TimePicker.d.ts +13 -0
- package/dist/esm/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/esm/components/TimePicker/TimePicker.js +28 -9
- package/dist/esm/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/esm/components/TimePicker/TimePickerUtils.d.ts +2 -1
- package/dist/esm/components/TimePicker/TimePickerUtils.d.ts.map +1 -1
- package/dist/esm/components/TimePicker/TimePickerUtils.js +45 -19
- package/dist/esm/components/TimePicker/TimePickerUtils.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +2 -2
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarChipGroupContent.d.ts +2 -0
- package/dist/esm/components/Toolbar/ToolbarChipGroupContent.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarChipGroupContent.js +4 -5
- package/dist/esm/components/Toolbar/ToolbarChipGroupContent.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts +1 -0
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js +5 -0
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/js/components/OverflowMenu/OverflowMenuControl.d.ts.map +1 -1
- package/dist/js/components/OverflowMenu/OverflowMenuControl.js +7 -4
- package/dist/js/components/OverflowMenu/OverflowMenuControl.js.map +1 -1
- package/dist/js/components/OverflowMenu/OverflowMenuGroup.d.ts.map +1 -1
- package/dist/js/components/OverflowMenu/OverflowMenuGroup.js +4 -1
- package/dist/js/components/OverflowMenu/OverflowMenuGroup.js.map +1 -1
- package/dist/js/components/TimePicker/TimePicker.d.ts +13 -0
- package/dist/js/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/js/components/TimePicker/TimePicker.js +27 -8
- package/dist/js/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/js/components/TimePicker/TimePickerUtils.d.ts +2 -1
- package/dist/js/components/TimePicker/TimePickerUtils.d.ts.map +1 -1
- package/dist/js/components/TimePicker/TimePickerUtils.js +47 -20
- package/dist/js/components/TimePicker/TimePickerUtils.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +2 -2
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarChipGroupContent.d.ts +2 -0
- package/dist/js/components/Toolbar/ToolbarChipGroupContent.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarChipGroupContent.js +4 -5
- package/dist/js/components/Toolbar/ToolbarChipGroupContent.js.map +1 -1
- package/dist/umd/react-core.css +104 -104
- package/dist/umd/react-core.js +94 -39
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +5 -5
- package/src/components/ClipboardCopy/ClipboardCopy.tsx +6 -0
- package/src/components/OverflowMenu/OverflowMenuControl.tsx +6 -2
- package/src/components/OverflowMenu/OverflowMenuGroup.tsx +3 -1
- package/src/components/TimePicker/TimePicker.tsx +48 -9
- package/src/components/TimePicker/TimePickerUtils.tsx +54 -24
- package/src/components/TimePicker/examples/TimePicker.md +11 -0
- package/src/components/Toolbar/Toolbar.tsx +4 -0
- package/src/components/Toolbar/ToolbarChipGroupContent.tsx +6 -2
- package/src/components/Toolbar/__tests__/Generated/__snapshots__/Toolbar.test.tsx.snap +1 -0
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarToggleGroup.test.tsx.snap +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAkC,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1E,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,SAAS;IAC9E,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,sDAAsD;IACtD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gGAAgG;IAChG,+BAA+B,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IACrE,sFAAsF;IACtF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6BAA6B;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,2FAA2F;IAC3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E,CAAC,eAAe,EAAE,MAAM,KAAK,MAAM,CAAC;CAC3D;AAED,MAAM,WAAW,YAAY;IAC3B;iEAC6D;IAC7D,uBAAuB,EAAE,OAAO,CAAC;IACjC,8EAA8E;IAC9E,UAAU,EAAE,UAAU,CAAC;IACvB,qGAAqG;IACrG,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,UAAU;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,qBAAa,OAAQ,SAAQ,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IACtE,MAAM,CAAC,WAAW,SAAa;IAC/B,mBAAmB,kCAAqC;IACxD,gBAAgB,KAAM;IACtB,KAAK;;;;;MAKH;IAEF,eAAe,gBAAmE;IAElF,gBAAgB,aAId;IAEF,sBAAsB,MAAO,GAAG,UAO9B;IAEF,iBAAiB;IAMjB,oBAAoB;IAMpB,mBAAmB,iBAAkB,MAAM,mBAAmB,MAAM,UAOlE;IAEF,kBAAkB,eAC4E;IAE9F,aAAa,aAAc,MAAM,iBAoE/B;IAEF,MAAM;CAOP"}
|
|
@@ -45,7 +45,7 @@ class Toolbar extends React.Component {
|
|
|
45
45
|
};
|
|
46
46
|
this.getNumberOfFilters = () => Object.values(this.state.filterInfo).reduce((acc, cur) => acc + cur, 0);
|
|
47
47
|
this.renderToolbar = (randomId) => {
|
|
48
|
-
const _a = this.props, { clearAllFilters, clearFiltersButtonText, collapseListedFiltersBreakpoint, isExpanded: isExpandedProp, toggleIsExpanded, className, children, isFullHeight, isStatic, inset, usePageInsets, isSticky, ouiaId } = _a, props = tslib_1.__rest(_a, ["clearAllFilters", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "isExpanded", "toggleIsExpanded", "className", "children", "isFullHeight", "isStatic", "inset", "usePageInsets", "isSticky", "ouiaId"]);
|
|
48
|
+
const _a = this.props, { clearAllFilters, clearFiltersButtonText, collapseListedFiltersBreakpoint, isExpanded: isExpandedProp, toggleIsExpanded, className, children, isFullHeight, isStatic, inset, usePageInsets, isSticky, ouiaId, numberOfFiltersText } = _a, props = tslib_1.__rest(_a, ["clearAllFilters", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "isExpanded", "toggleIsExpanded", "className", "children", "isFullHeight", "isStatic", "inset", "usePageInsets", "isSticky", "ouiaId", "numberOfFiltersText"]);
|
|
49
49
|
const { isManagedToggleExpanded } = this.state;
|
|
50
50
|
const isToggleManaged = this.isToggleManaged();
|
|
51
51
|
const isExpanded = isToggleManaged ? isManagedToggleExpanded : isExpandedProp;
|
|
@@ -64,7 +64,7 @@ class Toolbar extends React.Component {
|
|
|
64
64
|
toolbarId: randomId
|
|
65
65
|
} },
|
|
66
66
|
children,
|
|
67
|
-
React.createElement(ToolbarChipGroupContent_1.ToolbarChipGroupContent, { isExpanded: isExpanded, chipGroupContentRef: this.chipGroupContentRef, clearAllFilters: clearAllFilters, showClearFiltersButton: showClearFiltersButton, clearFiltersButtonText: clearFiltersButtonText, numberOfFilters: numberOfFilters, collapseListedFiltersBreakpoint: collapseListedFiltersBreakpoint }))));
|
|
67
|
+
React.createElement(ToolbarChipGroupContent_1.ToolbarChipGroupContent, { isExpanded: isExpanded, chipGroupContentRef: this.chipGroupContentRef, clearAllFilters: clearAllFilters, showClearFiltersButton: showClearFiltersButton, clearFiltersButtonText: clearFiltersButtonText, numberOfFilters: numberOfFilters, numberOfFiltersText: numberOfFiltersText, collapseListedFiltersBreakpoint: collapseListedFiltersBreakpoint }))));
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
componentDidMount() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/Toolbar.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,8GAA6E;AAC7E,oEAAiE;AACjE,2DAA+C;AAC/C,iDAAgD;AAChD,uEAAoE;AACpE,6CAAq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AI,CAAC,eAAe,EAAE,IAAI,gBAAS,EAAE;YACvC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;SAChE;IACH,CAAC;IAED,oBAAoB;QAClB,IAAI,IAAI,CAAC,eAAe,EAAE,IAAI,gBAAS,EAAE;YACvC,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAAC;SACnE;IACH,CAAC;IAoFD,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CACrB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAClC,CAAC,CAAC,CAAC,CACF,oBAAC,uBAAU,QAAE,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAc,CACpE,CAAC;IACJ,CAAC;;AAhIH,0BAiIC;AAhIQ,mBAAW,GAAG,SAAS,CAAC"}
|
|
@@ -16,6 +16,8 @@ export interface ToolbarChipGroupContentProps extends React.HTMLProps<HTMLDivEle
|
|
|
16
16
|
clearFiltersButtonText?: string;
|
|
17
17
|
/** Total number of filters currently being applied across all ToolbarFilter components */
|
|
18
18
|
numberOfFilters: number;
|
|
19
|
+
/** Text to display in the total number of applied filters ToolbarFilter */
|
|
20
|
+
numberOfFiltersText?: (numberOfFilters: number) => string;
|
|
19
21
|
/** The breakpoint at which the listed filters in chip groups are collapsed down to a summary */
|
|
20
22
|
collapseListedFiltersBreakpoint?: 'all' | 'md' | 'lg' | 'xl' | '2xl';
|
|
21
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarChipGroupContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Toolbar/ToolbarChipGroupContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,SAAS,EAAE,MAA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B,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACrC,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,sBAAsB,EAAE,OAAO,CAAC;IAChC,sDAAsD;IACtD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,0FAA0F;IAC1F,eAAe,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,mBAAmB,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1D,gGAAgG;IAChG,+BAA+B,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;CACtE;AAED,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAAC,4BAA4B,CAAC;IACxF,MAAM,CAAC,WAAW,SAA6B;IAC/C,MAAM,CAAC,YAAY,EAAE,YAAY,CAAC,4BAA4B,CAAC,CAI7D;IAEF,MAAM;CAyDP"}
|
|
@@ -12,7 +12,7 @@ const ToolbarGroup_1 = require("./ToolbarGroup");
|
|
|
12
12
|
const ToolbarUtils_1 = require("./ToolbarUtils");
|
|
13
13
|
class ToolbarChipGroupContent extends React.Component {
|
|
14
14
|
render() {
|
|
15
|
-
const _a = this.props, { className, isExpanded, chipGroupContentRef, clearAllFilters, showClearFiltersButton, clearFiltersButtonText, collapseListedFiltersBreakpoint, numberOfFilters } = _a, props = tslib_1.__rest(_a, ["className", "isExpanded", "chipGroupContentRef", "clearAllFilters", "showClearFiltersButton", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "numberOfFilters"]);
|
|
15
|
+
const _a = this.props, { className, isExpanded, chipGroupContentRef, clearAllFilters, showClearFiltersButton, clearFiltersButtonText, collapseListedFiltersBreakpoint, numberOfFilters, numberOfFiltersText } = _a, props = tslib_1.__rest(_a, ["className", "isExpanded", "chipGroupContentRef", "clearAllFilters", "showClearFiltersButton", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "numberOfFilters", "numberOfFiltersText"]);
|
|
16
16
|
const clearChipGroups = () => {
|
|
17
17
|
clearAllFilters();
|
|
18
18
|
};
|
|
@@ -27,9 +27,7 @@ class ToolbarChipGroupContent extends React.Component {
|
|
|
27
27
|
return (React.createElement("div", Object.assign({ className: react_styles_1.css(toolbar_1.default.toolbarContent, (numberOfFilters === 0 || isExpanded) && toolbar_1.default.modifiers.hidden, className) }, ((numberOfFilters === 0 || isExpanded) && { hidden: true }), { ref: chipGroupContentRef }, props),
|
|
28
28
|
React.createElement(ToolbarGroup_1.ToolbarGroup, Object.assign({ className: react_styles_1.css(collapseListedFilters && toolbar_1.default.modifiers.hidden) }, (collapseListedFilters && { hidden: true }), (collapseListedFilters && { 'aria-hidden': true }))),
|
|
29
29
|
collapseListedFilters && numberOfFilters > 0 && !isExpanded && (React.createElement(ToolbarGroup_1.ToolbarGroup, null,
|
|
30
|
-
React.createElement(ToolbarItem_1.ToolbarItem, null,
|
|
31
|
-
numberOfFilters,
|
|
32
|
-
" filters applied"))),
|
|
30
|
+
React.createElement(ToolbarItem_1.ToolbarItem, null, numberOfFiltersText(numberOfFilters)))),
|
|
33
31
|
showClearFiltersButton && !isExpanded && (React.createElement(ToolbarItem_1.ToolbarItem, null,
|
|
34
32
|
React.createElement(Button_1.Button, { variant: "link", onClick: clearChipGroups, isInline: true }, clearFiltersButtonText)))));
|
|
35
33
|
}
|
|
@@ -38,6 +36,7 @@ exports.ToolbarChipGroupContent = ToolbarChipGroupContent;
|
|
|
38
36
|
ToolbarChipGroupContent.displayName = 'ToolbarChipGroupContent';
|
|
39
37
|
ToolbarChipGroupContent.defaultProps = {
|
|
40
38
|
clearFiltersButtonText: 'Clear all filters',
|
|
41
|
-
collapseListedFiltersBreakpoint: 'lg'
|
|
39
|
+
collapseListedFiltersBreakpoint: 'lg',
|
|
40
|
+
numberOfFiltersText: (numberOfFilters) => `${numberOfFilters} filters applied`
|
|
42
41
|
};
|
|
43
42
|
//# sourceMappingURL=ToolbarChipGroupContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarChipGroupContent.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/ToolbarChipGroupContent.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,8GAA6E;AAC7E,2DAA+C;AAC/C,6CAA+C;AAG/C,+CAA4C;AAC5C,sCAAmC;AACnC,iDAA8C;AAC9C,iDAAmD;
|
|
1
|
+
{"version":3,"file":"ToolbarChipGroupContent.js","sourceRoot":"","sources":["../../../../src/components/Toolbar/ToolbarChipGroupContent.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,8GAA6E;AAC7E,2DAA+C;AAC/C,6CAA+C;AAG/C,+CAA4C;AAC5C,sCAAmC;AACnC,iDAA8C;AAC9C,iDAAmD;AAwBnD,MAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAuC;IAQxF,MAAM;QACJ,MAAM,KAWF,IAAI,CAAC,KAAK,EAXR,EACJ,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,+BAA+B,EAC/B,eAAe,EACf,mBAAmB,OAEP,EADT,KAAK,sBAVJ,sMAWL,CAAa,CAAC;QAEf,MAAM,eAAe,GAAG,GAAG,EAAE;YAC3B,eAAe,EAAE,CAAC;QACpB,CAAC,CAAC;QAEF,IAAI,qBAAqB,GAAG,KAAK,CAAC;QAClC,IAAI,+BAA+B,KAAK,KAAK,EAAE;YAC7C,qBAAqB,GAAG,IAAI,CAAC;SAC9B;aAAM,IAAI,gBAAS,EAAE;YACpB,qBAAqB;gBACnB,CAAC,gBAAS,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,gCAAiB,CAAC,+BAA+B,CAAC,CAAC;SAC/F;QAED,OAAO,CACL,2CACE,SAAS,EAAE,kBAAG,CACZ,iBAAM,CAAC,cAAc,EACrB,CAAC,eAAe,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,iBAAM,CAAC,SAAS,CAAC,MAAM,EAChE,SAAS,CACV,IACG,CAAC,CAAC,eAAe,KAAK,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,IAC/D,GAAG,EAAE,mBAAmB,IACpB,KAAK;YAET,oBAAC,2BAAY,kBACX,SAAS,EAAE,kBAAG,CAAC,qBAAqB,IAAI,iBAAM,CAAC,SAAS,CAAC,MAAM,CAAC,IAC5D,CAAC,qBAAqB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAC3C,CAAC,qBAAqB,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EACtD;YACD,qBAAqB,IAAI,eAAe,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,CAC9D,oBAAC,2BAAY;gBACX,oBAAC,yBAAW,QAAE,mBAAmB,CAAC,eAAe,CAAC,CAAe,CACpD,CAChB;YACA,sBAAsB,IAAI,CAAC,UAAU,IAAI,CACxC,oBAAC,yBAAW;gBACV,oBAAC,eAAM,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,UACtD,sBAAsB,CAChB,CACG,CACf,CACG,CACP,CAAC;IACJ,CAAC;;AAhEH,0DAiEC;AAhEQ,mCAAW,GAAG,yBAAyB,CAAC;AACxC,oCAAY,GAA+C;IAChE,sBAAsB,EAAE,mBAAmB;IAC3C,+BAA+B,EAAE,IAAI;IACrC,mBAAmB,EAAE,CAAC,eAAuB,EAAE,EAAE,CAAC,GAAG,eAAe,kBAAkB;CACvF,CAAC"}
|
package/dist/umd/react-core.css
CHANGED
|
@@ -9427,6 +9427,110 @@ button.pf-c-label__content:focus {
|
|
|
9427
9427
|
color: var(--pf-c-label__icon--Color);
|
|
9428
9428
|
}
|
|
9429
9429
|
|
|
9430
|
+
.pf-c-inline-edit {
|
|
9431
|
+
--pf-c-inline-edit__group--item--MarginRight: var(--pf-global--spacer--sm);
|
|
9432
|
+
--pf-c-inline-edit__action--c-button--m-valid--m-plain--Color: var(--pf-global--link--Color);
|
|
9433
|
+
--pf-c-inline-edit__action--c-button--m-valid--m-plain--hover--Color: var(--pf-global--link--Color--hover);
|
|
9434
|
+
--pf-c-inline-edit__action--m-icon-group--item--MarginRight: 0;
|
|
9435
|
+
--pf-c-inline-edit__group--m-footer--MarginTop: var(--pf-global--spacer--xl);
|
|
9436
|
+
--pf-c-inline-edit__label--m-bold--FontWeight: var(--pf-global--FontWeight--semi-bold);
|
|
9437
|
+
}
|
|
9438
|
+
|
|
9439
|
+
.pf-c-inline-edit__group {
|
|
9440
|
+
display: flex;
|
|
9441
|
+
align-items: baseline;
|
|
9442
|
+
}
|
|
9443
|
+
|
|
9444
|
+
.pf-c-inline-edit__group > * {
|
|
9445
|
+
margin-right: var(--pf-c-inline-edit__group--item--MarginRight);
|
|
9446
|
+
}
|
|
9447
|
+
|
|
9448
|
+
.pf-c-inline-edit__group.pf-m-icon-group {
|
|
9449
|
+
--pf-c-inline-edit__group--item--MarginRight: var(--pf-c-inline-edit__action--m-icon-group--item--MarginRight);
|
|
9450
|
+
}
|
|
9451
|
+
|
|
9452
|
+
.pf-c-inline-edit__group.pf-m-footer {
|
|
9453
|
+
margin-top: var(--pf-c-inline-edit__group--m-footer--MarginTop);
|
|
9454
|
+
}
|
|
9455
|
+
|
|
9456
|
+
.pf-c-inline-edit__group.pf-m-column {
|
|
9457
|
+
--pf-c-inline-edit__group--item--MarginRight: 0;
|
|
9458
|
+
flex-direction: column;
|
|
9459
|
+
}
|
|
9460
|
+
|
|
9461
|
+
.pf-c-inline-edit__group > :last-child {
|
|
9462
|
+
--pf-c-inline-edit__group--item--MarginRight: 0;
|
|
9463
|
+
}
|
|
9464
|
+
|
|
9465
|
+
.pf-c-inline-edit__input {
|
|
9466
|
+
flex: 1;
|
|
9467
|
+
}
|
|
9468
|
+
|
|
9469
|
+
.pf-c-inline-edit__action.pf-m-valid .pf-c-button.pf-m-plain {
|
|
9470
|
+
--pf-c-button--m-plain--Color: var(--pf-c-inline-edit__action--c-button--m-valid--m-plain--Color);
|
|
9471
|
+
}
|
|
9472
|
+
|
|
9473
|
+
.pf-c-inline-edit__action.pf-m-valid .pf-c-button.pf-m-plain:hover {
|
|
9474
|
+
--pf-c-button--m-plain--Color: var(--pf-c-inline-edit__action--c-button--m-valid--m-plain--hover--Color);
|
|
9475
|
+
}
|
|
9476
|
+
|
|
9477
|
+
.pf-c-inline-edit__input,
|
|
9478
|
+
.pf-c-inline-edit__action,
|
|
9479
|
+
.pf-c-inline-edit__group.pf-m-action-group {
|
|
9480
|
+
display: none;
|
|
9481
|
+
visibility: hidden;
|
|
9482
|
+
}
|
|
9483
|
+
|
|
9484
|
+
.pf-c-inline-edit__action.pf-m-enable-editable {
|
|
9485
|
+
display: inline-block;
|
|
9486
|
+
visibility: visible;
|
|
9487
|
+
}
|
|
9488
|
+
|
|
9489
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__input,
|
|
9490
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__action,
|
|
9491
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group,
|
|
9492
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__input,
|
|
9493
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__action,
|
|
9494
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group {
|
|
9495
|
+
visibility: visible;
|
|
9496
|
+
}
|
|
9497
|
+
|
|
9498
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__input,
|
|
9499
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__input {
|
|
9500
|
+
display: block;
|
|
9501
|
+
}
|
|
9502
|
+
|
|
9503
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__action,
|
|
9504
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__action {
|
|
9505
|
+
display: inline-block;
|
|
9506
|
+
}
|
|
9507
|
+
|
|
9508
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group,
|
|
9509
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group {
|
|
9510
|
+
display: inline-flex;
|
|
9511
|
+
}
|
|
9512
|
+
|
|
9513
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__value,
|
|
9514
|
+
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__action.pf-m-enable-editable,
|
|
9515
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__value,
|
|
9516
|
+
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__action.pf-m-enable-editable {
|
|
9517
|
+
display: none;
|
|
9518
|
+
visibility: hidden;
|
|
9519
|
+
}
|
|
9520
|
+
|
|
9521
|
+
.pf-c-inline-edit__label + .pf-c-inline-edit__action.pf-m-enable > .pf-c-button {
|
|
9522
|
+
margin-top: calc(var(--pf-c-button--PaddingTop) * -1);
|
|
9523
|
+
margin-bottom: calc(var(--pf-c-button--PaddingBottom) * -1);
|
|
9524
|
+
}
|
|
9525
|
+
|
|
9526
|
+
.pf-c-inline-edit__label.pf-m-bold {
|
|
9527
|
+
font-weight: var(--pf-c-inline-edit__label--m-bold--FontWeight);
|
|
9528
|
+
}
|
|
9529
|
+
|
|
9530
|
+
.pf-c-inline-edit__editable-text br {
|
|
9531
|
+
display: none;
|
|
9532
|
+
}
|
|
9533
|
+
|
|
9430
9534
|
.pf-c-label-group {
|
|
9431
9535
|
--pf-c-label-group__list--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
|
|
9432
9536
|
--pf-c-label-group__list--MarginRight: calc(var(--pf-global--spacer--xs) * -1);
|
|
@@ -9570,110 +9674,6 @@ button.pf-c-label__content:focus {
|
|
|
9570
9674
|
display: none;
|
|
9571
9675
|
}
|
|
9572
9676
|
|
|
9573
|
-
.pf-c-inline-edit {
|
|
9574
|
-
--pf-c-inline-edit__group--item--MarginRight: var(--pf-global--spacer--sm);
|
|
9575
|
-
--pf-c-inline-edit__action--c-button--m-valid--m-plain--Color: var(--pf-global--link--Color);
|
|
9576
|
-
--pf-c-inline-edit__action--c-button--m-valid--m-plain--hover--Color: var(--pf-global--link--Color--hover);
|
|
9577
|
-
--pf-c-inline-edit__action--m-icon-group--item--MarginRight: 0;
|
|
9578
|
-
--pf-c-inline-edit__group--m-footer--MarginTop: var(--pf-global--spacer--xl);
|
|
9579
|
-
--pf-c-inline-edit__label--m-bold--FontWeight: var(--pf-global--FontWeight--semi-bold);
|
|
9580
|
-
}
|
|
9581
|
-
|
|
9582
|
-
.pf-c-inline-edit__group {
|
|
9583
|
-
display: flex;
|
|
9584
|
-
align-items: baseline;
|
|
9585
|
-
}
|
|
9586
|
-
|
|
9587
|
-
.pf-c-inline-edit__group > * {
|
|
9588
|
-
margin-right: var(--pf-c-inline-edit__group--item--MarginRight);
|
|
9589
|
-
}
|
|
9590
|
-
|
|
9591
|
-
.pf-c-inline-edit__group.pf-m-icon-group {
|
|
9592
|
-
--pf-c-inline-edit__group--item--MarginRight: var(--pf-c-inline-edit__action--m-icon-group--item--MarginRight);
|
|
9593
|
-
}
|
|
9594
|
-
|
|
9595
|
-
.pf-c-inline-edit__group.pf-m-footer {
|
|
9596
|
-
margin-top: var(--pf-c-inline-edit__group--m-footer--MarginTop);
|
|
9597
|
-
}
|
|
9598
|
-
|
|
9599
|
-
.pf-c-inline-edit__group.pf-m-column {
|
|
9600
|
-
--pf-c-inline-edit__group--item--MarginRight: 0;
|
|
9601
|
-
flex-direction: column;
|
|
9602
|
-
}
|
|
9603
|
-
|
|
9604
|
-
.pf-c-inline-edit__group > :last-child {
|
|
9605
|
-
--pf-c-inline-edit__group--item--MarginRight: 0;
|
|
9606
|
-
}
|
|
9607
|
-
|
|
9608
|
-
.pf-c-inline-edit__input {
|
|
9609
|
-
flex: 1;
|
|
9610
|
-
}
|
|
9611
|
-
|
|
9612
|
-
.pf-c-inline-edit__action.pf-m-valid .pf-c-button.pf-m-plain {
|
|
9613
|
-
--pf-c-button--m-plain--Color: var(--pf-c-inline-edit__action--c-button--m-valid--m-plain--Color);
|
|
9614
|
-
}
|
|
9615
|
-
|
|
9616
|
-
.pf-c-inline-edit__action.pf-m-valid .pf-c-button.pf-m-plain:hover {
|
|
9617
|
-
--pf-c-button--m-plain--Color: var(--pf-c-inline-edit__action--c-button--m-valid--m-plain--hover--Color);
|
|
9618
|
-
}
|
|
9619
|
-
|
|
9620
|
-
.pf-c-inline-edit__input,
|
|
9621
|
-
.pf-c-inline-edit__action,
|
|
9622
|
-
.pf-c-inline-edit__group.pf-m-action-group {
|
|
9623
|
-
display: none;
|
|
9624
|
-
visibility: hidden;
|
|
9625
|
-
}
|
|
9626
|
-
|
|
9627
|
-
.pf-c-inline-edit__action.pf-m-enable-editable {
|
|
9628
|
-
display: inline-block;
|
|
9629
|
-
visibility: visible;
|
|
9630
|
-
}
|
|
9631
|
-
|
|
9632
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__input,
|
|
9633
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__action,
|
|
9634
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group,
|
|
9635
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__input,
|
|
9636
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__action,
|
|
9637
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group {
|
|
9638
|
-
visibility: visible;
|
|
9639
|
-
}
|
|
9640
|
-
|
|
9641
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__input,
|
|
9642
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__input {
|
|
9643
|
-
display: block;
|
|
9644
|
-
}
|
|
9645
|
-
|
|
9646
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__action,
|
|
9647
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__action {
|
|
9648
|
-
display: inline-block;
|
|
9649
|
-
}
|
|
9650
|
-
|
|
9651
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group,
|
|
9652
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__group.pf-m-action-group {
|
|
9653
|
-
display: inline-flex;
|
|
9654
|
-
}
|
|
9655
|
-
|
|
9656
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__value,
|
|
9657
|
-
.pf-c-inline-edit.pf-m-inline-editable .pf-c-inline-edit__action.pf-m-enable-editable,
|
|
9658
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__value,
|
|
9659
|
-
.pf-c-inline-edit .pf-m-inline-editable .pf-c-inline-edit__action.pf-m-enable-editable {
|
|
9660
|
-
display: none;
|
|
9661
|
-
visibility: hidden;
|
|
9662
|
-
}
|
|
9663
|
-
|
|
9664
|
-
.pf-c-inline-edit__label + .pf-c-inline-edit__action.pf-m-enable > .pf-c-button {
|
|
9665
|
-
margin-top: calc(var(--pf-c-button--PaddingTop) * -1);
|
|
9666
|
-
margin-bottom: calc(var(--pf-c-button--PaddingBottom) * -1);
|
|
9667
|
-
}
|
|
9668
|
-
|
|
9669
|
-
.pf-c-inline-edit__label.pf-m-bold {
|
|
9670
|
-
font-weight: var(--pf-c-inline-edit__label--m-bold--FontWeight);
|
|
9671
|
-
}
|
|
9672
|
-
|
|
9673
|
-
.pf-c-inline-edit__editable-text br {
|
|
9674
|
-
display: none;
|
|
9675
|
-
}
|
|
9676
|
-
|
|
9677
9677
|
.pf-c-list {
|
|
9678
9678
|
--pf-c-list--PaddingLeft: var(--pf-global--spacer--lg);
|
|
9679
9679
|
--pf-c-list--nested--MarginTop: var(--pf-global--spacer--sm);
|
package/dist/umd/react-core.js
CHANGED
|
@@ -7865,6 +7865,11 @@
|
|
|
7865
7865
|
this.updateText(this.props.children);
|
|
7866
7866
|
}
|
|
7867
7867
|
};
|
|
7868
|
+
this.componentWillUnmount = () => {
|
|
7869
|
+
if (this.timer) {
|
|
7870
|
+
window.clearTimeout(this.timer);
|
|
7871
|
+
}
|
|
7872
|
+
};
|
|
7868
7873
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7869
7874
|
this.expandContent = (_event) => {
|
|
7870
7875
|
this.setState(prevState => ({
|
|
@@ -15840,16 +15845,22 @@
|
|
|
15840
15845
|
OverflowMenu.displayName = 'OverflowMenu';
|
|
15841
15846
|
OverflowMenu.contextType = OverflowMenuContext;
|
|
15842
15847
|
|
|
15843
|
-
const OverflowMenuControl = (
|
|
15844
|
-
" ",
|
|
15845
|
-
|
|
15846
|
-
|
|
15848
|
+
const OverflowMenuControl = (_a) => {
|
|
15849
|
+
var { className, children, hasAdditionalOptions } = _a, props = __rest$1(_a, ["className", "children", "hasAdditionalOptions"]);
|
|
15850
|
+
return (React__namespace.createElement(OverflowMenuContext.Consumer, null, value => (value.isBelowBreakpoint || hasAdditionalOptions) && (React__namespace.createElement("div", Object.assign({ className: css(_default$r.overflowMenuControl, className) }, props),
|
|
15851
|
+
' ',
|
|
15852
|
+
children,
|
|
15853
|
+
' '))));
|
|
15854
|
+
};
|
|
15847
15855
|
OverflowMenuControl.displayName = 'OverflowMenuControl';
|
|
15848
15856
|
|
|
15849
15857
|
const OverflowMenuContent = ({ className, children, isPersistent }) => (React__namespace.createElement(OverflowMenuContext.Consumer, null, value => (!value.isBelowBreakpoint || isPersistent) && (React__namespace.createElement("div", { className: css(_default$r.overflowMenuContent, className) }, children))));
|
|
15850
15858
|
OverflowMenuContent.displayName = 'OverflowMenuContent';
|
|
15851
15859
|
|
|
15852
|
-
const OverflowMenuGroup = (
|
|
15860
|
+
const OverflowMenuGroup = (_a) => {
|
|
15861
|
+
var { className, children, isPersistent = false, groupType } = _a, props = __rest$1(_a, ["className", "children", "isPersistent", "groupType"]);
|
|
15862
|
+
return (React__namespace.createElement(OverflowMenuContext.Consumer, null, value => (isPersistent || !value.isBelowBreakpoint) && (React__namespace.createElement("div", Object.assign({ className: css(_default$r.overflowMenuGroup, groupType === 'button' && _default$r.modifiers.buttonGroup, groupType === 'icon' && _default$r.modifiers.iconButtonGroup, className) }, props), children))));
|
|
15863
|
+
};
|
|
15853
15864
|
OverflowMenuGroup.displayName = 'OverflowMenuGroup';
|
|
15854
15865
|
|
|
15855
15866
|
const OverflowMenuItem = ({ className, children, isPersistent = false }) => (React__namespace.createElement(OverflowMenuContext.Consumer, null, value => (isPersistent || !value.isBelowBreakpoint) && (React__namespace.createElement("div", { className: css(_default$r.overflowMenuItem, className) },
|
|
@@ -17762,7 +17773,7 @@
|
|
|
17762
17773
|
|
|
17763
17774
|
const amSuffix = ' AM';
|
|
17764
17775
|
const pmSuffix = ' PM';
|
|
17765
|
-
const makeTimeOptions = (stepMinutes, hour12, delimiter) => {
|
|
17776
|
+
const makeTimeOptions = (stepMinutes, hour12, delimiter, minTime, maxTime) => {
|
|
17766
17777
|
const res = [];
|
|
17767
17778
|
const iter = new Date(new Date().setHours(0, 0, 0, 0));
|
|
17768
17779
|
const iterDay = iter.getDay();
|
|
@@ -17780,13 +17791,16 @@
|
|
|
17780
17791
|
hour %= 12;
|
|
17781
17792
|
}
|
|
17782
17793
|
}
|
|
17783
|
-
|
|
17784
|
-
|
|
17785
|
-
|
|
17786
|
-
|
|
17787
|
-
|
|
17788
|
-
|
|
17789
|
-
|
|
17794
|
+
hour = hour12 ? hour.toString() : hour.toString().padStart(2, '0');
|
|
17795
|
+
const minutes = iter
|
|
17796
|
+
.getMinutes()
|
|
17797
|
+
.toString()
|
|
17798
|
+
.padStart(2, '0');
|
|
17799
|
+
const timeOption = hour + delimiter + minutes + (hour12 ? suffix : '');
|
|
17800
|
+
// time option is valid if within min/max constraints
|
|
17801
|
+
if (isWithinMinMax(minTime, maxTime, timeOption, delimiter)) {
|
|
17802
|
+
res.push(timeOption);
|
|
17803
|
+
}
|
|
17790
17804
|
iter.setMinutes(iter.getMinutes() + stepMinutes);
|
|
17791
17805
|
}
|
|
17792
17806
|
return res;
|
|
@@ -17811,20 +17825,14 @@
|
|
|
17811
17825
|
else if (typeof time === 'string') {
|
|
17812
17826
|
time = time.trim();
|
|
17813
17827
|
if (is12Hour && time !== '' && validateTime(time, timeRegex, delimiter, is12Hour)) {
|
|
17828
|
+
const [, hours, minutes, suffix = ''] = timeRegex.exec(time);
|
|
17829
|
+
const uppercaseSuffix = suffix.toUpperCase();
|
|
17814
17830
|
// Format AM/PM according to design
|
|
17815
17831
|
let ampm = '';
|
|
17816
|
-
if (
|
|
17817
|
-
time = time
|
|
17818
|
-
.toUpperCase()
|
|
17819
|
-
.replace(amSuffix.toUpperCase().trim(), '')
|
|
17820
|
-
.trim();
|
|
17832
|
+
if (uppercaseSuffix === amSuffix.toUpperCase().trim()) {
|
|
17821
17833
|
ampm = amSuffix;
|
|
17822
17834
|
}
|
|
17823
|
-
else if (
|
|
17824
|
-
time = time
|
|
17825
|
-
.toUpperCase()
|
|
17826
|
-
.replace(pmSuffix.toUpperCase().trim(), '')
|
|
17827
|
-
.trim();
|
|
17835
|
+
else if (uppercaseSuffix === pmSuffix.toUpperCase().trim()) {
|
|
17828
17836
|
ampm = pmSuffix;
|
|
17829
17837
|
}
|
|
17830
17838
|
else {
|
|
@@ -17832,7 +17840,7 @@
|
|
|
17832
17840
|
// append am/pm depending on time of day
|
|
17833
17841
|
ampm = new Date().getHours() > 11 ? pmSuffix : amSuffix;
|
|
17834
17842
|
}
|
|
17835
|
-
return `${
|
|
17843
|
+
return `${hours}${delimiter}${minutes}${ampm}`;
|
|
17836
17844
|
}
|
|
17837
17845
|
}
|
|
17838
17846
|
return time.toString();
|
|
@@ -17867,6 +17875,35 @@
|
|
|
17867
17875
|
const parts = time.match(timeRegex);
|
|
17868
17876
|
return parts && parts.length ? parseInt(parts[2]) : null;
|
|
17869
17877
|
};
|
|
17878
|
+
const isWithinMinMax = (minTime, maxTime, time, delimiter) => {
|
|
17879
|
+
// do not throw error if empty string
|
|
17880
|
+
if (time.trim() === '') {
|
|
17881
|
+
return true;
|
|
17882
|
+
}
|
|
17883
|
+
const convertTo24Hour = (time) => {
|
|
17884
|
+
const timeReg = new RegExp(`^\\s*(\\d\\d?)${delimiter}([0-5]\\d)\\s*([AaPp][Mm])?\\s*$`);
|
|
17885
|
+
const regMatches = timeReg.exec(time);
|
|
17886
|
+
if (!regMatches || !regMatches.length) {
|
|
17887
|
+
return;
|
|
17888
|
+
}
|
|
17889
|
+
let hours = regMatches[1].padStart(2, '0');
|
|
17890
|
+
const minutes = regMatches[2];
|
|
17891
|
+
const suffix = regMatches[3] || '';
|
|
17892
|
+
if (suffix.toUpperCase() === 'PM' && hours !== '12') {
|
|
17893
|
+
hours = `${parseInt(hours) + 12}`;
|
|
17894
|
+
}
|
|
17895
|
+
else if (suffix.toUpperCase() === 'AM' && hours === '12') {
|
|
17896
|
+
hours = '00';
|
|
17897
|
+
}
|
|
17898
|
+
return `${hours}${delimiter}${minutes}`;
|
|
17899
|
+
};
|
|
17900
|
+
// correctly format as 24hr times (12:30AM => 00:30, 1:15 => 01:15)
|
|
17901
|
+
minTime = convertTo24Hour(minTime);
|
|
17902
|
+
time = convertTo24Hour(time);
|
|
17903
|
+
maxTime = convertTo24Hour(maxTime);
|
|
17904
|
+
// simple string comparison for 24hr times
|
|
17905
|
+
return minTime <= time && time <= maxTime;
|
|
17906
|
+
};
|
|
17870
17907
|
|
|
17871
17908
|
class TimePicker extends React__namespace.Component {
|
|
17872
17909
|
constructor(props) {
|
|
@@ -17991,13 +18028,19 @@
|
|
|
17991
18028
|
? new RegExp(`^\\s*(\\d\\d?)${this.props.delimiter}([0-5]\\d)\\s*$`)
|
|
17992
18029
|
: new RegExp(`^\\s*(\\d\\d?)${this.props.delimiter}([0-5]\\d)\\s*([AaPp][Mm])?\\s*$`);
|
|
17993
18030
|
this.getOptions = () => (this.menuRef && this.menuRef.current ? Array.from(this.menuRef.current.children) : []);
|
|
17994
|
-
this.
|
|
18031
|
+
this.isValidFormat = (time) => {
|
|
17995
18032
|
if (this.props.validateTime) {
|
|
17996
18033
|
return this.props.validateTime(time);
|
|
17997
18034
|
}
|
|
17998
18035
|
const { delimiter, is24Hour } = this.props;
|
|
17999
18036
|
return validateTime(time, this.state.timeRegex, delimiter, !is24Hour);
|
|
18000
18037
|
};
|
|
18038
|
+
this.isValidTime = (time) => {
|
|
18039
|
+
const { delimiter } = this.props;
|
|
18040
|
+
const { minTimeState, maxTimeState } = this.state;
|
|
18041
|
+
return isWithinMinMax(minTimeState, maxTimeState, time, delimiter);
|
|
18042
|
+
};
|
|
18043
|
+
this.isValid = (time) => this.isValidFormat(time) && this.isValidTime(time);
|
|
18001
18044
|
this.onToggle = (isOpen) => {
|
|
18002
18045
|
// on close, parse and validate input
|
|
18003
18046
|
this.setState(prevState => {
|
|
@@ -18047,6 +18090,13 @@
|
|
|
18047
18090
|
});
|
|
18048
18091
|
};
|
|
18049
18092
|
const { is24Hour, delimiter, time } = this.props;
|
|
18093
|
+
let { minTime, maxTime } = this.props;
|
|
18094
|
+
if (minTime === '') {
|
|
18095
|
+
minTime = is24Hour ? `00${delimiter}00` : `12${delimiter}00AM`;
|
|
18096
|
+
}
|
|
18097
|
+
if (maxTime === '') {
|
|
18098
|
+
maxTime = is24Hour ? `23${delimiter}59` : `11${delimiter}59PM`;
|
|
18099
|
+
}
|
|
18050
18100
|
const timeRegex = this.getRegExp();
|
|
18051
18101
|
this.state = {
|
|
18052
18102
|
isInvalid: false,
|
|
@@ -18054,7 +18104,9 @@
|
|
|
18054
18104
|
timeState: parseTime(time, timeRegex, delimiter, !is24Hour),
|
|
18055
18105
|
focusedIndex: null,
|
|
18056
18106
|
scrollIndex: 0,
|
|
18057
|
-
timeRegex
|
|
18107
|
+
timeRegex,
|
|
18108
|
+
minTimeState: parseTime(minTime, timeRegex, delimiter, !is24Hour),
|
|
18109
|
+
maxTimeState: parseTime(maxTime, timeRegex, delimiter, !is24Hour)
|
|
18058
18110
|
};
|
|
18059
18111
|
}
|
|
18060
18112
|
componentDidMount() {
|
|
@@ -18085,12 +18137,13 @@
|
|
|
18085
18137
|
}
|
|
18086
18138
|
}
|
|
18087
18139
|
render() {
|
|
18088
|
-
const _a = this.props, { 'aria-label': ariaLabel, isDisabled, className, placeholder, id, menuAppendTo, is24Hour, invalidFormatErrorMessage, direction, stepMinutes, width, delimiter,
|
|
18140
|
+
const _a = this.props, { 'aria-label': ariaLabel, isDisabled, className, placeholder, id, menuAppendTo, is24Hour, invalidFormatErrorMessage, invalidMinMaxErrorMessage, direction, stepMinutes, width, delimiter,
|
|
18089
18141
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
18090
|
-
onChange, time, validateTime, inputProps } = _a, props = __rest$1(_a, ['aria-label', "isDisabled", "className", "placeholder", "id", "menuAppendTo", "is24Hour", "invalidFormatErrorMessage", "direction", "stepMinutes", "width", "delimiter", "onChange", "time", "validateTime", "inputProps"]);
|
|
18091
|
-
const { timeState, isOpen, isInvalid, focusedIndex } = this.state;
|
|
18142
|
+
onChange, time, validateTime, inputProps, minTime, maxTime } = _a, props = __rest$1(_a, ['aria-label', "isDisabled", "className", "placeholder", "id", "menuAppendTo", "is24Hour", "invalidFormatErrorMessage", "invalidMinMaxErrorMessage", "direction", "stepMinutes", "width", "delimiter", "onChange", "time", "validateTime", "inputProps", "minTime", "maxTime"]);
|
|
18143
|
+
const { timeState, isOpen, isInvalid, focusedIndex, minTimeState, maxTimeState } = this.state;
|
|
18092
18144
|
const style = { '--pf-c-date-picker__input--c-form-control--Width': width };
|
|
18093
|
-
const options = makeTimeOptions(stepMinutes, !is24Hour, delimiter);
|
|
18145
|
+
const options = makeTimeOptions(stepMinutes, !is24Hour, delimiter, minTimeState, maxTimeState);
|
|
18146
|
+
const isValidFormat = this.isValidFormat(timeState);
|
|
18094
18147
|
const randomId = id || getUniqueId('time-picker');
|
|
18095
18148
|
const menuContainer = (React__namespace.createElement("ul", { ref: this.menuRef, className: css(_default$12.selectMenu), role: "listbox", "aria-labelledby": `${id}-input`, style: { maxHeight: '200px', overflowY: 'auto' } }, options.map((option, index) => (React__namespace.createElement(TimeOption, { key: index, value: option, index: index, onSelect: this.onSelect, isFocused: index === focusedIndex, id: `${id}-option-${index}` })))));
|
|
18096
18149
|
const inputAndToggle = (React__namespace.createElement("div", Object.assign({ className: css(_default$R.datePickerInput), style: style }, props),
|
|
@@ -18099,7 +18152,7 @@
|
|
|
18099
18152
|
React__namespace.createElement("div", { ref: this.toggleRef, className: css(_default$12.selectToggle, isDisabled && _default$12.modifiers.disabled, _default$12.modifiers.typeahead), style: { paddingLeft: '0' } },
|
|
18100
18153
|
React__namespace.createElement(TextInput, Object.assign({ className: css(_default$1b.formControl, _default$12.selectToggleTypeahead), id: `${randomId}-input`, "aria-label": ariaLabel, validated: isInvalid ? 'error' : 'default', placeholder: placeholder, value: timeState || '', type: "text", iconVariant: "clock", onClick: this.onInputFocus, onFocus: this.onInputFocus, onChange: this.onInputChange, onBlur: this.onBlur, autoComplete: "off", isDisabled: isDisabled, ref: this.inputRef }, inputProps))),
|
|
18101
18154
|
isOpen && menuAppendTo === 'inline' && menuContainer)),
|
|
18102
|
-
isInvalid && (React__namespace.createElement("div", { className: css(_default$R.datePickerHelperText, _default$R.modifiers.error) }, invalidFormatErrorMessage))));
|
|
18155
|
+
isInvalid && (React__namespace.createElement("div", { className: css(_default$R.datePickerHelperText, _default$R.modifiers.error) }, !isValidFormat ? invalidFormatErrorMessage : invalidMinMaxErrorMessage))));
|
|
18103
18156
|
const popperContainer = (React__namespace.createElement("div", { className: css(_default$12.select, isOpen && _default$12.modifiers.expanded, direction === exports.SelectDirection.up && _default$12.modifiers.top, className) }, isOpen && menuContainer));
|
|
18104
18157
|
return (React__namespace.createElement("div", { className: css(_default$R.datePicker, className) }, menuAppendTo === 'inline' ? (inputAndToggle) : (React__namespace.createElement(Popper, { trigger: inputAndToggle, popper: popperContainer, direction: direction, appendTo: menuAppendTo, isVisible: isOpen }))));
|
|
18105
18158
|
}
|
|
@@ -18111,6 +18164,7 @@
|
|
|
18111
18164
|
time: '',
|
|
18112
18165
|
is24Hour: false,
|
|
18113
18166
|
invalidFormatErrorMessage: 'Invalid time format',
|
|
18167
|
+
invalidMinMaxErrorMessage: 'Invalid time entered',
|
|
18114
18168
|
placeholder: 'hh:mm',
|
|
18115
18169
|
delimiter: ':',
|
|
18116
18170
|
'aria-label': 'Time picker',
|
|
@@ -18118,7 +18172,9 @@
|
|
|
18118
18172
|
direction: 'down',
|
|
18119
18173
|
width: 150,
|
|
18120
18174
|
stepMinutes: 30,
|
|
18121
|
-
inputProps: {}
|
|
18175
|
+
inputProps: {},
|
|
18176
|
+
minTime: '',
|
|
18177
|
+
maxTime: ''
|
|
18122
18178
|
};
|
|
18123
18179
|
|
|
18124
18180
|
var _default$d = {
|
|
@@ -18400,7 +18456,7 @@
|
|
|
18400
18456
|
|
|
18401
18457
|
class ToolbarChipGroupContent extends React__namespace.Component {
|
|
18402
18458
|
render() {
|
|
18403
|
-
const _a = this.props, { className, isExpanded, chipGroupContentRef, clearAllFilters, showClearFiltersButton, clearFiltersButtonText, collapseListedFiltersBreakpoint, numberOfFilters } = _a, props = __rest$1(_a, ["className", "isExpanded", "chipGroupContentRef", "clearAllFilters", "showClearFiltersButton", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "numberOfFilters"]);
|
|
18459
|
+
const _a = this.props, { className, isExpanded, chipGroupContentRef, clearAllFilters, showClearFiltersButton, clearFiltersButtonText, collapseListedFiltersBreakpoint, numberOfFilters, numberOfFiltersText } = _a, props = __rest$1(_a, ["className", "isExpanded", "chipGroupContentRef", "clearAllFilters", "showClearFiltersButton", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "numberOfFilters", "numberOfFiltersText"]);
|
|
18404
18460
|
const clearChipGroups = () => {
|
|
18405
18461
|
clearAllFilters();
|
|
18406
18462
|
};
|
|
@@ -18415,9 +18471,7 @@
|
|
|
18415
18471
|
return (React__namespace.createElement("div", Object.assign({ className: css(_default$c.toolbarContent, (numberOfFilters === 0 || isExpanded) && _default$c.modifiers.hidden, className) }, ((numberOfFilters === 0 || isExpanded) && { hidden: true }), { ref: chipGroupContentRef }, props),
|
|
18416
18472
|
React__namespace.createElement(ToolbarGroup, Object.assign({ className: css(collapseListedFilters && _default$c.modifiers.hidden) }, (collapseListedFilters && { hidden: true }), (collapseListedFilters && { 'aria-hidden': true }))),
|
|
18417
18473
|
collapseListedFilters && numberOfFilters > 0 && !isExpanded && (React__namespace.createElement(ToolbarGroup, null,
|
|
18418
|
-
React__namespace.createElement(ToolbarItem, null,
|
|
18419
|
-
numberOfFilters,
|
|
18420
|
-
" filters applied"))),
|
|
18474
|
+
React__namespace.createElement(ToolbarItem, null, numberOfFiltersText(numberOfFilters)))),
|
|
18421
18475
|
showClearFiltersButton && !isExpanded && (React__namespace.createElement(ToolbarItem, null,
|
|
18422
18476
|
React__namespace.createElement(Button, { variant: "link", onClick: clearChipGroups, isInline: true }, clearFiltersButtonText)))));
|
|
18423
18477
|
}
|
|
@@ -18425,7 +18479,8 @@
|
|
|
18425
18479
|
ToolbarChipGroupContent.displayName = 'ToolbarChipGroupContent';
|
|
18426
18480
|
ToolbarChipGroupContent.defaultProps = {
|
|
18427
18481
|
clearFiltersButtonText: 'Clear all filters',
|
|
18428
|
-
collapseListedFiltersBreakpoint: 'lg'
|
|
18482
|
+
collapseListedFiltersBreakpoint: 'lg',
|
|
18483
|
+
numberOfFiltersText: (numberOfFilters) => `${numberOfFilters} filters applied`
|
|
18429
18484
|
};
|
|
18430
18485
|
|
|
18431
18486
|
class Toolbar extends React__namespace.Component {
|
|
@@ -18463,7 +18518,7 @@
|
|
|
18463
18518
|
};
|
|
18464
18519
|
this.getNumberOfFilters = () => Object.values(this.state.filterInfo).reduce((acc, cur) => acc + cur, 0);
|
|
18465
18520
|
this.renderToolbar = (randomId) => {
|
|
18466
|
-
const _a = this.props, { clearAllFilters, clearFiltersButtonText, collapseListedFiltersBreakpoint, isExpanded: isExpandedProp, toggleIsExpanded, className, children, isFullHeight, isStatic, inset, usePageInsets, isSticky, ouiaId } = _a, props = __rest$1(_a, ["clearAllFilters", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "isExpanded", "toggleIsExpanded", "className", "children", "isFullHeight", "isStatic", "inset", "usePageInsets", "isSticky", "ouiaId"]);
|
|
18521
|
+
const _a = this.props, { clearAllFilters, clearFiltersButtonText, collapseListedFiltersBreakpoint, isExpanded: isExpandedProp, toggleIsExpanded, className, children, isFullHeight, isStatic, inset, usePageInsets, isSticky, ouiaId, numberOfFiltersText } = _a, props = __rest$1(_a, ["clearAllFilters", "clearFiltersButtonText", "collapseListedFiltersBreakpoint", "isExpanded", "toggleIsExpanded", "className", "children", "isFullHeight", "isStatic", "inset", "usePageInsets", "isSticky", "ouiaId", "numberOfFiltersText"]);
|
|
18467
18522
|
const { isManagedToggleExpanded } = this.state;
|
|
18468
18523
|
const isToggleManaged = this.isToggleManaged();
|
|
18469
18524
|
const isExpanded = isToggleManaged ? isManagedToggleExpanded : isExpandedProp;
|
|
@@ -18482,7 +18537,7 @@
|
|
|
18482
18537
|
toolbarId: randomId
|
|
18483
18538
|
} },
|
|
18484
18539
|
children,
|
|
18485
|
-
React__namespace.createElement(ToolbarChipGroupContent, { isExpanded: isExpanded, chipGroupContentRef: this.chipGroupContentRef, clearAllFilters: clearAllFilters, showClearFiltersButton: showClearFiltersButton, clearFiltersButtonText: clearFiltersButtonText, numberOfFilters: numberOfFilters, collapseListedFiltersBreakpoint: collapseListedFiltersBreakpoint }))));
|
|
18540
|
+
React__namespace.createElement(ToolbarChipGroupContent, { isExpanded: isExpanded, chipGroupContentRef: this.chipGroupContentRef, clearAllFilters: clearAllFilters, showClearFiltersButton: showClearFiltersButton, clearFiltersButtonText: clearFiltersButtonText, numberOfFilters: numberOfFilters, numberOfFiltersText: numberOfFiltersText, collapseListedFiltersBreakpoint: collapseListedFiltersBreakpoint }))));
|
|
18486
18541
|
};
|
|
18487
18542
|
}
|
|
18488
18543
|
componentDidMount() {
|