@patternfly/react-core 4.223.2 → 4.224.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 +30 -0
- package/dist/esm/components/Form/FormGroup.d.ts +4 -2
- package/dist/esm/components/Form/FormGroup.d.ts.map +1 -1
- package/dist/esm/components/Form/FormGroup.js +4 -3
- package/dist/esm/components/Form/FormGroup.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +25 -23
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Wizard/Wizard.d.ts +9 -0
- package/dist/esm/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/esm/components/Wizard/Wizard.js +6 -3
- package/dist/esm/components/Wizard/Wizard.js.map +1 -1
- package/dist/esm/components/Wizard/WizardBody.d.ts +6 -0
- package/dist/esm/components/Wizard/WizardBody.d.ts.map +1 -1
- package/dist/esm/components/Wizard/WizardBody.js +6 -2
- package/dist/esm/components/Wizard/WizardBody.js.map +1 -1
- package/dist/esm/components/Wizard/WizardDrawerWrapper.d.ts +11 -0
- package/dist/esm/components/Wizard/WizardDrawerWrapper.d.ts.map +1 -0
- package/dist/esm/components/Wizard/WizardDrawerWrapper.js +3 -0
- package/dist/esm/components/Wizard/WizardDrawerWrapper.js.map +1 -0
- package/dist/esm/components/Wizard/WizardToggle.d.ts +5 -1
- package/dist/esm/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/esm/components/Wizard/WizardToggle.js +4 -2
- package/dist/esm/components/Wizard/WizardToggle.js.map +1 -1
- package/dist/js/components/Form/FormGroup.d.ts +4 -2
- package/dist/js/components/Form/FormGroup.d.ts.map +1 -1
- package/dist/js/components/Form/FormGroup.js +4 -3
- package/dist/js/components/Form/FormGroup.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +25 -23
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/Wizard/Wizard.d.ts +9 -0
- package/dist/js/components/Wizard/Wizard.d.ts.map +1 -1
- package/dist/js/components/Wizard/Wizard.js +6 -3
- package/dist/js/components/Wizard/Wizard.js.map +1 -1
- package/dist/js/components/Wizard/WizardBody.d.ts +6 -0
- package/dist/js/components/Wizard/WizardBody.d.ts.map +1 -1
- package/dist/js/components/Wizard/WizardBody.js +6 -2
- package/dist/js/components/Wizard/WizardBody.js.map +1 -1
- package/dist/js/components/Wizard/WizardDrawerWrapper.d.ts +11 -0
- package/dist/js/components/Wizard/WizardDrawerWrapper.d.ts.map +1 -0
- package/dist/js/components/Wizard/WizardDrawerWrapper.js +7 -0
- package/dist/js/components/Wizard/WizardDrawerWrapper.js.map +1 -0
- package/dist/js/components/Wizard/WizardToggle.d.ts +5 -1
- package/dist/js/components/Wizard/WizardToggle.d.ts.map +1 -1
- package/dist/js/components/Wizard/WizardToggle.js +4 -2
- package/dist/js/components/Wizard/WizardToggle.js.map +1 -1
- package/dist/umd/react-core.js +45 -33
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +6 -6
- package/src/components/Form/FormGroup.tsx +40 -29
- package/src/components/Form/examples/Form.md +12 -1271
- package/src/components/Form/examples/FormBasic.tsx +122 -0
- package/src/components/Form/examples/FormFieldGroups.tsx +324 -0
- package/src/components/Form/examples/FormGrid.tsx +66 -0
- package/src/components/Form/examples/FormGroupLabelInfo.tsx +72 -0
- package/src/components/Form/examples/FormHorizontal.tsx +118 -0
- package/src/components/Form/examples/FormHorizontalHelper.tsx +23 -0
- package/src/components/Form/examples/FormHorizontalStacked.tsx +11 -0
- package/src/components/Form/examples/FormInvalid.tsx +47 -0
- package/src/components/Form/examples/FormInvalidWithFormAlert.tsx +52 -0
- package/src/components/Form/examples/FormLimitWidth.tsx +122 -0
- package/src/components/Form/examples/FormSections.tsx +44 -0
- package/src/components/Form/examples/FormValidated.tsx +60 -0
- package/src/components/Select/Select.tsx +35 -33
- package/src/components/Wizard/Wizard.tsx +21 -1
- package/src/components/Wizard/WizardBody.tsx +23 -2
- package/src/components/Wizard/WizardDrawerWrapper.tsx +18 -0
- package/src/components/Wizard/WizardToggle.tsx +12 -2
- package/src/components/Wizard/__tests__/Wizard.test.tsx +24 -7
- package/src/components/Wizard/examples/Wizard.md +157 -2
- package/src/demos/Wizard/WizardDemo.md +1033 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardBody.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"WizardBody.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,QAAQ,EAAE,GAAG,CAAC;IACd,qDAAqD;IACrD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sDAAsD;IACtD,aAAa,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAClC,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAE5B;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAyB/D,CAAC"}
|
|
@@ -5,10 +5,14 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const wizard_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Wizard/wizard"));
|
|
7
7
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
8
|
-
const
|
|
8
|
+
const WizardDrawerWrapper_1 = require("./WizardDrawerWrapper");
|
|
9
|
+
const Drawer_1 = require("../Drawer");
|
|
10
|
+
const WizardBody = ({ children, hasNoBodyPadding = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, mainComponent = 'div', hasDrawer, isDrawerExpanded, activeStep }) => {
|
|
9
11
|
const MainComponent = mainComponent;
|
|
10
12
|
return (React.createElement(MainComponent, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className: react_styles_1.css(wizard_1.default.wizardMain) },
|
|
11
|
-
React.createElement(
|
|
13
|
+
React.createElement(WizardDrawerWrapper_1.WizardDrawerWrapper, { hasDrawer: hasDrawer && activeStep.drawerPanelContent, wrapper: (children) => (React.createElement(Drawer_1.Drawer, { isInline: true, isExpanded: isDrawerExpanded },
|
|
14
|
+
React.createElement(Drawer_1.DrawerContent, { panelContent: activeStep.drawerPanelContent }, children))) },
|
|
15
|
+
React.createElement("div", { className: react_styles_1.css(wizard_1.default.wizardMainBody, hasNoBodyPadding && wizard_1.default.modifiers.noPadding) }, children))));
|
|
12
16
|
};
|
|
13
17
|
exports.WizardBody = WizardBody;
|
|
14
18
|
exports.WizardBody.displayName = 'WizardBody';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardBody.js","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardBody.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2GAA2E;AAC3E,2DAA+C;
|
|
1
|
+
{"version":3,"file":"WizardBody.js","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardBody.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2GAA2E;AAC3E,2DAA+C;AAC/C,+DAA4D;AAC5D,sCAAkD;AAsB3C,MAAM,UAAU,GAA6C,CAAC,EACnE,QAAQ,EACR,gBAAgB,GAAG,KAAK,EACxB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,aAAa,GAAG,KAAK,EACrB,SAAS,EACT,gBAAgB,EAChB,UAAU,EACM,EAAE,EAAE;IACpB,MAAM,aAAa,GAAG,aAAa,CAAC;IACpC,OAAO,CACL,oBAAC,aAAa,kBAAa,SAAS,qBAAmB,cAAc,EAAE,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,UAAU,CAAC;QACtG,oBAAC,yCAAmB,IAClB,SAAS,EAAE,SAAS,IAAI,UAAU,CAAC,kBAAkB,EACrD,OAAO,EAAE,CAAC,QAAyB,EAAE,EAAE,CAAC,CACtC,oBAAC,eAAM,IAAC,QAAQ,QAAC,UAAU,EAAE,gBAAgB;gBAC3C,oBAAC,sBAAa,IAAC,YAAY,EAAE,UAAU,CAAC,kBAAkB,IAAG,QAAQ,CAAiB,CAC/E,CACV;YAED,6BAAK,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,cAAc,EAAE,gBAAgB,IAAI,gBAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAG,QAAQ,CAAO,CACxF,CACR,CACjB,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,UAAU,cAyBrB;AACF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface WizardDrawerWrapperProps {
|
|
3
|
+
/** The wizard content */
|
|
4
|
+
children: React.ReactElement;
|
|
5
|
+
/** Flag indicating the wizard has a drawer for at least one of the wizard steps */
|
|
6
|
+
hasDrawer: boolean;
|
|
7
|
+
/** The drawer component which wraps the wizard content */
|
|
8
|
+
wrapper: (children: React.ReactElement) => JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
export declare const WizardDrawerWrapper: React.FunctionComponent<WizardDrawerWrapperProps>;
|
|
11
|
+
//# sourceMappingURL=WizardDrawerWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WizardDrawerWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardDrawerWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,wBAAwB;IACvC,0BAA0B;IAC1B,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B,mFAAmF;IACnF,SAAS,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,OAAO,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,YAAY,KAAK,GAAG,CAAC,OAAO,CAAC;CACxD;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,iBAAiB,CAAC,wBAAwB,CAIlC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WizardDrawerWrapper = void 0;
|
|
4
|
+
const WizardDrawerWrapper = ({ hasDrawer, wrapper, children }) => (hasDrawer ? wrapper(children) : children);
|
|
5
|
+
exports.WizardDrawerWrapper = WizardDrawerWrapper;
|
|
6
|
+
exports.WizardDrawerWrapper.displayName = 'WizardDrawerWrapper';
|
|
7
|
+
//# sourceMappingURL=WizardDrawerWrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WizardDrawerWrapper.js","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardDrawerWrapper.tsx"],"names":[],"mappings":";;;AAWO,MAAM,mBAAmB,GAAsD,CAAC,EACrF,SAAS,EACT,OAAO,EACP,QAAQ,EACT,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAJpC,QAAA,mBAAmB,uBAIiB;AAEjD,2BAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC"}
|
|
@@ -8,7 +8,7 @@ export interface WizardToggleProps {
|
|
|
8
8
|
/** The currently active WizardStep */
|
|
9
9
|
activeStep: WizardStep;
|
|
10
10
|
/** The WizardFooter */
|
|
11
|
-
children
|
|
11
|
+
children?: React.ReactNode;
|
|
12
12
|
/** Set to true to remove body padding */
|
|
13
13
|
hasNoBodyPadding: boolean;
|
|
14
14
|
/** If the nav is open */
|
|
@@ -23,6 +23,10 @@ export interface WizardToggleProps {
|
|
|
23
23
|
mainAriaLabel?: string;
|
|
24
24
|
/** If the wizard is in-page */
|
|
25
25
|
isInPage?: boolean;
|
|
26
|
+
/** @beta Flag indicating the wizard has a drawer for at least one of the wizard steps */
|
|
27
|
+
hasDrawer?: boolean;
|
|
28
|
+
/** @beta Flag indicating the wizard drawer is expanded */
|
|
29
|
+
isDrawerExpanded?: boolean;
|
|
26
30
|
}
|
|
27
31
|
export declare const WizardToggle: React.FunctionComponent<WizardToggleProps>;
|
|
28
32
|
//# sourceMappingURL=WizardToggle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,GAAG,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,KAAK,CAAC,YAAY,CAAC;IACtD,uBAAuB;IACvB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAC;IACvB,uBAAuB;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"WizardToggle.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,MAAM,WAAW,iBAAiB;IAChC,oDAAoD;IACpD,GAAG,EAAE,CAAC,eAAe,EAAE,OAAO,KAAK,KAAK,CAAC,YAAY,CAAC;IACtD,uBAAuB;IACvB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,sCAAsC;IACtC,UAAU,EAAE,UAAU,CAAC;IACvB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yCAAyC;IACzC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,yBAAyB;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CA0EnE,CAAC"}
|
|
@@ -8,7 +8,7 @@ const wizard_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/c
|
|
|
8
8
|
const angle_right_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/angle-right-icon'));
|
|
9
9
|
const caret_down_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/caret-down-icon'));
|
|
10
10
|
const WizardBody_1 = require("./WizardBody");
|
|
11
|
-
const WizardToggle = ({ isNavOpen, onNavToggle, nav, steps, activeStep, children, hasNoBodyPadding = false, 'aria-label': ariaLabel = 'Wizard Toggle', mainAriaLabelledBy = null, mainAriaLabel = null, isInPage = true }) => {
|
|
11
|
+
const WizardToggle = ({ isNavOpen, onNavToggle, nav, steps, activeStep, children, hasNoBodyPadding = false, 'aria-label': ariaLabel = 'Wizard Toggle', mainAriaLabelledBy = null, mainAriaLabel = null, isInPage = true, hasDrawer, isDrawerExpanded }) => {
|
|
12
12
|
let activeStepIndex;
|
|
13
13
|
let activeStepName;
|
|
14
14
|
let activeStepSubName;
|
|
@@ -43,7 +43,9 @@ const WizardToggle = ({ isNavOpen, onNavToggle, nav, steps, activeStep, children
|
|
|
43
43
|
React.createElement("div", { className: react_styles_1.css(wizard_1.default.wizardOuterWrap) },
|
|
44
44
|
React.createElement("div", { className: react_styles_1.css(wizard_1.default.wizardInnerWrap) },
|
|
45
45
|
nav(isNavOpen),
|
|
46
|
-
React.createElement(WizardBody_1.WizardBody, { mainComponent: isInPage ? 'div' : 'main', "aria-label": mainAriaLabel, "aria-labelledby": mainAriaLabelledBy, hasNoBodyPadding: hasNoBodyPadding
|
|
46
|
+
React.createElement(WizardBody_1.WizardBody, { mainComponent: isInPage ? 'div' : 'main', "aria-label": mainAriaLabel, "aria-labelledby": mainAriaLabelledBy, hasNoBodyPadding: hasNoBodyPadding, activeStep: activeStep, isDrawerExpanded: isDrawerExpanded, hasDrawer: hasDrawer },
|
|
47
|
+
hasDrawer && !isDrawerExpanded && activeStep.drawerToggleButton,
|
|
48
|
+
activeStep.component)),
|
|
47
49
|
children)));
|
|
48
50
|
};
|
|
49
51
|
exports.WizardToggle = WizardToggle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardToggle.js","sourceRoot":"","sources":["../../../../src/components/Wizard/WizardToggle.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,2GAA2E;AAC3E,sHAAqF;AACrF,oHAAmF;AAEnF,6CAA0C;
|
|
1
|
+
{"version":3,"file":"WizardToggle.js","sourceRoot":"","sources":["../../../../src/components/Wizard/W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,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS;oBAEnB,SAAS,IAAI,CAAC,gBAAgB,IAAI,UAAU,CAAC,kBAAkB;oBAC/D,UAAU,CAAC,SAAS,CACV,CACT;YACL,QAAQ,CACL,CACS,CAClB,CAAC;AACJ,CAAC,CAAC;AA1EW,QAAA,YAAY,gBA0EvB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
|
package/dist/umd/react-core.js
CHANGED
|
@@ -7527,30 +7527,32 @@
|
|
|
7527
7527
|
this.refCollection[this.state.viewMoreNextIndex][0].focus();
|
|
7528
7528
|
this.setState({ viewMoreNextIndex: -1 });
|
|
7529
7529
|
}
|
|
7530
|
-
|
|
7531
|
-
const
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
prevChildProps.
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7530
|
+
if (this.props.variant === 'typeahead' || this.props.variant === 'typeaheadmulti') {
|
|
7531
|
+
const checkUpdatedChildren = (prevChildren, currChildren) => Array.from(prevChildren).some((prevChild, index) => {
|
|
7532
|
+
const prevChildProps = prevChild.props;
|
|
7533
|
+
const currChild = currChildren[index];
|
|
7534
|
+
const { props: currChildProps } = currChild;
|
|
7535
|
+
if (prevChildProps && currChildProps) {
|
|
7536
|
+
return (prevChildProps.value !== currChildProps.value ||
|
|
7537
|
+
prevChildProps.label !== currChildProps.label ||
|
|
7538
|
+
prevChildProps.isDisabled !== currChildProps.isDisabled ||
|
|
7539
|
+
prevChildProps.isPlaceholder !== currChildProps.isPlaceholder);
|
|
7540
|
+
}
|
|
7541
|
+
else {
|
|
7542
|
+
return prevChild !== currChild;
|
|
7543
|
+
}
|
|
7544
|
+
});
|
|
7545
|
+
const hasUpdatedChildren = prevProps.children.length !== this.props.children.length ||
|
|
7546
|
+
checkUpdatedChildren(prevProps.children, this.props.children) ||
|
|
7547
|
+
(this.props.isGrouped &&
|
|
7548
|
+
Array.from(prevProps.children).some((prevChild, index) => prevChild.type === SelectGroup &&
|
|
7549
|
+
prevChild.props.children &&
|
|
7550
|
+
this.props.children[index].props.children &&
|
|
7551
|
+
(prevChild.props.children.length !== this.props.children[index].props.children.length ||
|
|
7552
|
+
checkUpdatedChildren(prevChild.props.children, this.props.children[index].props.children))));
|
|
7553
|
+
if (hasUpdatedChildren) {
|
|
7554
|
+
this.updateTypeAheadFilteredChildren(prevState.typeaheadInputValue || '', null);
|
|
7542
7555
|
}
|
|
7543
|
-
});
|
|
7544
|
-
const hasUpdatedChildren = prevProps.children.length !== this.props.children.length ||
|
|
7545
|
-
checkUpdatedChildren(prevProps.children, this.props.children) ||
|
|
7546
|
-
(this.props.isGrouped &&
|
|
7547
|
-
prevProps.children.some((prevChild, index) => prevChild.type === SelectGroup &&
|
|
7548
|
-
prevChild.props.children &&
|
|
7549
|
-
this.props.children[index].props.children &&
|
|
7550
|
-
(prevChild.props.children.length !== this.props.children[index].props.children.length ||
|
|
7551
|
-
checkUpdatedChildren(prevChild.props.children, this.props.children[index].props.children))));
|
|
7552
|
-
if (hasUpdatedChildren) {
|
|
7553
|
-
this.updateTypeAheadFilteredChildren(prevState.typeaheadInputValue || '', null);
|
|
7554
7556
|
}
|
|
7555
7557
|
// for menus with favorites,
|
|
7556
7558
|
// if the number of favorites or typeahead filtered children has changed, the generated
|
|
@@ -14111,8 +14113,8 @@
|
|
|
14111
14113
|
ASTERISK))),
|
|
14112
14114
|
' ',
|
|
14113
14115
|
React__namespace.isValidElement(labelIcon) && labelIcon));
|
|
14114
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(styles$Z.formGroup, className) }, (role && { role }), (isGroupOrRadioGroup && { 'aria-labelledby': `${fieldId}-legend` }), props),
|
|
14115
|
-
label && (React__namespace.createElement("div", Object.assign({ className: css(styles$Z.formGroupLabel, labelInfo && styles$Z.modifiers.info, hasNoPaddingTop && styles$Z.modifiers.noPaddingTop) }, (isGroupOrRadioGroup && { id: `${fieldId}-legend` })),
|
|
14116
|
+
return (React__namespace.createElement(GenerateId, null, randomId => (React__namespace.createElement("div", Object.assign({ className: css(styles$Z.formGroup, className) }, (role && { role }), (isGroupOrRadioGroup && { 'aria-labelledby': `${fieldId || randomId}-legend` }), props),
|
|
14117
|
+
label && (React__namespace.createElement("div", Object.assign({ className: css(styles$Z.formGroupLabel, labelInfo && styles$Z.modifiers.info, hasNoPaddingTop && styles$Z.modifiers.noPaddingTop) }, (isGroupOrRadioGroup && { id: `${fieldId || randomId}-legend` })),
|
|
14116
14118
|
labelInfo && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
14117
14119
|
React__namespace.createElement("div", { className: css(styles$Z.formGroupLabelMain) }, labelContent),
|
|
14118
14120
|
React__namespace.createElement("div", { className: css(styles$Z.formGroupLabelInfo) }, labelInfo))),
|
|
@@ -14120,7 +14122,7 @@
|
|
|
14120
14122
|
React__namespace.createElement("div", { className: css(styles$Z.formGroupControl, isInline && styles$Z.modifiers.inline, isStack && styles$Z.modifiers.stack) },
|
|
14121
14123
|
isHelperTextBeforeField && helperTextToDisplay,
|
|
14122
14124
|
children,
|
|
14123
|
-
!isHelperTextBeforeField && helperTextToDisplay)));
|
|
14125
|
+
!isHelperTextBeforeField && helperTextToDisplay)))));
|
|
14124
14126
|
};
|
|
14125
14127
|
FormGroup.displayName = 'FormGroup';
|
|
14126
14128
|
|
|
@@ -20883,14 +20885,19 @@
|
|
|
20883
20885
|
React__namespace.createElement(Button, { variant: exports.ButtonVariant.link, onClick: onClose }, cancelButtonText)))));
|
|
20884
20886
|
WizardFooterInternal.displayName = 'WizardFooterInternal';
|
|
20885
20887
|
|
|
20886
|
-
const
|
|
20888
|
+
const WizardDrawerWrapper = ({ hasDrawer, wrapper, children }) => (hasDrawer ? wrapper(children) : children);
|
|
20889
|
+
WizardDrawerWrapper.displayName = 'WizardDrawerWrapper';
|
|
20890
|
+
|
|
20891
|
+
const WizardBody = ({ children, hasNoBodyPadding = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, mainComponent = 'div', hasDrawer, isDrawerExpanded, activeStep }) => {
|
|
20887
20892
|
const MainComponent = mainComponent;
|
|
20888
20893
|
return (React__namespace.createElement(MainComponent, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className: css(styles$8.wizardMain) },
|
|
20889
|
-
React__namespace.createElement(
|
|
20894
|
+
React__namespace.createElement(WizardDrawerWrapper, { hasDrawer: hasDrawer && activeStep.drawerPanelContent, wrapper: (children) => (React__namespace.createElement(Drawer, { isInline: true, isExpanded: isDrawerExpanded },
|
|
20895
|
+
React__namespace.createElement(DrawerContent, { panelContent: activeStep.drawerPanelContent }, children))) },
|
|
20896
|
+
React__namespace.createElement("div", { className: css(styles$8.wizardMainBody, hasNoBodyPadding && styles$8.modifiers.noPadding) }, children))));
|
|
20890
20897
|
};
|
|
20891
20898
|
WizardBody.displayName = 'WizardBody';
|
|
20892
20899
|
|
|
20893
|
-
const WizardToggle = ({ isNavOpen, onNavToggle, nav, steps, activeStep, children, hasNoBodyPadding = false, 'aria-label': ariaLabel = 'Wizard Toggle', mainAriaLabelledBy = null, mainAriaLabel = null, isInPage = true }) => {
|
|
20900
|
+
const WizardToggle = ({ isNavOpen, onNavToggle, nav, steps, activeStep, children, hasNoBodyPadding = false, 'aria-label': ariaLabel = 'Wizard Toggle', mainAriaLabelledBy = null, mainAriaLabel = null, isInPage = true, hasDrawer, isDrawerExpanded }) => {
|
|
20894
20901
|
let activeStepIndex;
|
|
20895
20902
|
let activeStepName;
|
|
20896
20903
|
let activeStepSubName;
|
|
@@ -20925,7 +20932,9 @@
|
|
|
20925
20932
|
React__namespace.createElement("div", { className: css(styles$8.wizardOuterWrap) },
|
|
20926
20933
|
React__namespace.createElement("div", { className: css(styles$8.wizardInnerWrap) },
|
|
20927
20934
|
nav(isNavOpen),
|
|
20928
|
-
React__namespace.createElement(WizardBody, { mainComponent: isInPage ? 'div' : 'main', "aria-label": mainAriaLabel, "aria-labelledby": mainAriaLabelledBy, hasNoBodyPadding: hasNoBodyPadding
|
|
20935
|
+
React__namespace.createElement(WizardBody, { mainComponent: isInPage ? 'div' : 'main', "aria-label": mainAriaLabel, "aria-labelledby": mainAriaLabelledBy, hasNoBodyPadding: hasNoBodyPadding, activeStep: activeStep, isDrawerExpanded: isDrawerExpanded, hasDrawer: hasDrawer },
|
|
20936
|
+
hasDrawer && !isDrawerExpanded && activeStep.drawerToggleButton,
|
|
20937
|
+
activeStep.component)),
|
|
20929
20938
|
children)));
|
|
20930
20939
|
};
|
|
20931
20940
|
WizardToggle.displayName = 'WizardToggle';
|
|
@@ -21132,6 +21141,7 @@
|
|
|
21132
21141
|
currentStep: this.props.startAtStep && Number.isInteger(this.props.startAtStep) ? this.props.startAtStep : 1,
|
|
21133
21142
|
isNavOpen: false
|
|
21134
21143
|
};
|
|
21144
|
+
this.drawerRef = React__namespace.createRef();
|
|
21135
21145
|
}
|
|
21136
21146
|
componentDidMount() {
|
|
21137
21147
|
const target = typeof document !== 'undefined' ? document.body : null;
|
|
@@ -21148,7 +21158,7 @@
|
|
|
21148
21158
|
render() {
|
|
21149
21159
|
const _a = this.props, {
|
|
21150
21160
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
21151
|
-
width, height, title, description, descriptionComponent, onClose, onSave, onBack, onNext, onGoToStep, className, steps, startAtStep, nextButtonText = 'Next', backButtonText = 'Back', cancelButtonText = 'Cancel', hideClose, closeButtonAriaLabel = 'Close', navAriaLabel, navAriaLabelledBy, mainAriaLabel, mainAriaLabelledBy, hasNoBodyPadding, footer, appendTo, isOpen, titleId, descriptionId, isNavExpandable } = _a, rest = __rest$1(_a, ["width", "height", "title", "description", "descriptionComponent", "onClose", "onSave", "onBack", "onNext", "onGoToStep", "className", "steps", "startAtStep", "nextButtonText", "backButtonText", "cancelButtonText", "hideClose", "closeButtonAriaLabel", "navAriaLabel", "navAriaLabelledBy", "mainAriaLabel", "mainAriaLabelledBy", "hasNoBodyPadding", "footer", "appendTo", "isOpen", "titleId", "descriptionId", "isNavExpandable"])
|
|
21161
|
+
width, height, title, description, descriptionComponent, onClose, onSave, onBack, onNext, onGoToStep, className, steps, startAtStep, nextButtonText = 'Next', backButtonText = 'Back', cancelButtonText = 'Cancel', hideClose, closeButtonAriaLabel = 'Close', navAriaLabel, navAriaLabelledBy, mainAriaLabel, mainAriaLabelledBy, hasNoBodyPadding, footer, appendTo, isOpen, titleId, descriptionId, isNavExpandable, hasDrawer, isDrawerExpanded } = _a, rest = __rest$1(_a, ["width", "height", "title", "description", "descriptionComponent", "onClose", "onSave", "onBack", "onNext", "onGoToStep", "className", "steps", "startAtStep", "nextButtonText", "backButtonText", "cancelButtonText", "hideClose", "closeButtonAriaLabel", "navAriaLabel", "navAriaLabelledBy", "mainAriaLabel", "mainAriaLabelledBy", "hasNoBodyPadding", "footer", "appendTo", "isOpen", "titleId", "descriptionId", "isNavExpandable", "hasDrawer", "isDrawerExpanded"])
|
|
21152
21162
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
21153
21163
|
;
|
|
21154
21164
|
const { currentStep } = this.state;
|
|
@@ -21212,7 +21222,7 @@
|
|
|
21212
21222
|
const wizard = (React__namespace.createElement(WizardContextProvider, { value: context },
|
|
21213
21223
|
React__namespace.createElement("div", Object.assign({}, rest, { className: css(styles$8.wizard, activeStep && activeStep.isFinishedStep && 'pf-m-finished', className), style: Object.keys(divStyles).length ? divStyles : undefined }),
|
|
21214
21224
|
title && (React__namespace.createElement(WizardHeader, { titleId: this.titleId, descriptionId: this.descriptionId, onClose: onClose, title: title, description: description, descriptionComponent: descriptionComponent, closeButtonAriaLabel: closeButtonAriaLabel, hideClose: hideClose })),
|
|
21215
|
-
React__namespace.createElement(WizardToggle, { mainAriaLabel: mainAriaLabel, isInPage: isOpen === undefined, mainAriaLabelledBy: (title || mainAriaLabelledBy) && (mainAriaLabelledBy || this.titleId), isNavOpen: this.state.isNavOpen, onNavToggle: isNavOpen => this.setState({ isNavOpen }), nav: nav, steps: steps, activeStep: activeStep, hasNoBodyPadding: hasNoBodyPadding }, footer || (React__namespace.createElement(WizardFooterInternal, { onNext: this.onNext, onBack: this.onBack, onClose: onClose, isValid: isValid, firstStep: firstStep, activeStep: activeStep, nextButtonText: (activeStep && activeStep.nextButtonText) || nextButtonText, backButtonText: backButtonText, cancelButtonText: cancelButtonText }))))));
|
|
21225
|
+
React__namespace.createElement(WizardToggle, { hasDrawer: hasDrawer, isDrawerExpanded: isDrawerExpanded, mainAriaLabel: mainAriaLabel, isInPage: isOpen === undefined, mainAriaLabelledBy: (title || mainAriaLabelledBy) && (mainAriaLabelledBy || this.titleId), isNavOpen: this.state.isNavOpen, onNavToggle: isNavOpen => this.setState({ isNavOpen }), nav: nav, steps: steps, activeStep: activeStep, hasNoBodyPadding: hasNoBodyPadding }, footer || (React__namespace.createElement(WizardFooterInternal, { onNext: this.onNext, onBack: this.onBack, onClose: onClose, isValid: isValid, firstStep: firstStep, activeStep: activeStep, nextButtonText: (activeStep && activeStep.nextButtonText) || nextButtonText, backButtonText: backButtonText, cancelButtonText: cancelButtonText }))))));
|
|
21216
21226
|
if (isOpen !== undefined) {
|
|
21217
21227
|
return (React__namespace.createElement(Modal, { width: width !== null ? width : undefined, isOpen: isOpen, variant: exports.ModalVariant.large, "aria-labelledby": this.titleId, "aria-describedby": this.descriptionId, showClose: false, hasNoBodyWrapper: true }, wizard));
|
|
21218
21228
|
}
|
|
@@ -21246,7 +21256,9 @@
|
|
|
21246
21256
|
onClose: () => undefined,
|
|
21247
21257
|
appendTo: null,
|
|
21248
21258
|
isOpen: undefined,
|
|
21249
|
-
isNavExpandable: false
|
|
21259
|
+
isNavExpandable: false,
|
|
21260
|
+
hasDrawer: false,
|
|
21261
|
+
isDrawerExpanded: false
|
|
21250
21262
|
};
|
|
21251
21263
|
|
|
21252
21264
|
const WizardFooter = ({ children }) => (React__namespace.createElement("footer", { className: css(styles$8.wizardFooter) }, children));
|