@hitachivantara/uikit-react-lab 3.57.0 → 3.57.2
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/dist/Wizard/Wizard.d.ts +5 -5
- package/dist/Wizard/Wizard.js +4 -4
- package/dist/Wizard/Wizard.js.map +1 -1
- package/dist/Wizard/WizardActions/WizardActions.d.ts +2 -2
- package/dist/Wizard/WizardActions/WizardActions.js +6 -6
- package/dist/Wizard/WizardActions/WizardActions.js.map +1 -1
- package/dist/Wizard/WizardContent/WizardContent.d.ts +1 -1
- package/dist/Wizard/WizardContent/WizardContent.js +2 -2
- package/dist/Wizard/WizardContent/WizardContent.js.map +1 -1
- package/dist/Wizard/WizardContext/WizardContext.d.ts +12 -0
- package/dist/Wizard/WizardContext/WizardContextProvider.d.ts +28 -0
- package/dist/Wizard/WizardContext/WizardContextProvider.js +47 -0
- package/dist/Wizard/WizardContext/WizardContextProvider.js.map +1 -0
- package/dist/Wizard/WizardContext/index.d.ts +5 -0
- package/dist/Wizard/WizardContext/index.js +8 -0
- package/dist/Wizard/WizardContext/index.js.map +1 -1
- package/dist/Wizard/WizardTitle/WizardTitle.d.ts +7 -9
- package/dist/Wizard/WizardTitle/WizardTitle.js +2 -2
- package/dist/Wizard/WizardTitle/WizardTitle.js.map +1 -1
- package/dist/Wizard/index.d.ts +15 -0
- package/dist/Wizard/index.js +8 -0
- package/dist/Wizard/index.js.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy/Wizard/Wizard.d.ts +5 -5
- package/dist/legacy/Wizard/Wizard.js +4 -4
- package/dist/legacy/Wizard/Wizard.js.map +1 -1
- package/dist/legacy/Wizard/WizardActions/WizardActions.d.ts +2 -2
- package/dist/legacy/Wizard/WizardActions/WizardActions.js +8 -8
- package/dist/legacy/Wizard/WizardActions/WizardActions.js.map +1 -1
- package/dist/legacy/Wizard/WizardContent/WizardContent.d.ts +1 -1
- package/dist/legacy/Wizard/WizardContent/WizardContent.js +1 -1
- package/dist/legacy/Wizard/WizardContent/WizardContent.js.map +1 -1
- package/dist/legacy/Wizard/WizardContext/WizardContext.d.ts +12 -0
- package/dist/legacy/Wizard/WizardContext/WizardContextProvider.d.ts +28 -0
- package/dist/legacy/Wizard/WizardContext/WizardContextProvider.js +35 -0
- package/dist/legacy/Wizard/WizardContext/WizardContextProvider.js.map +1 -0
- package/dist/legacy/Wizard/WizardContext/index.d.ts +5 -0
- package/dist/legacy/Wizard/WizardContext/index.js +1 -0
- package/dist/legacy/Wizard/WizardContext/index.js.map +1 -1
- package/dist/legacy/Wizard/WizardTitle/WizardTitle.d.ts +7 -9
- package/dist/legacy/Wizard/WizardTitle/WizardTitle.js +1 -1
- package/dist/legacy/Wizard/WizardTitle/WizardTitle.js.map +1 -1
- package/dist/legacy/Wizard/index.d.ts +15 -0
- package/dist/legacy/Wizard/index.js +1 -0
- package/dist/legacy/Wizard/index.js.map +1 -1
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/Wizard/Wizard.d.ts +5 -5
- package/dist/modern/Wizard/Wizard.js +4 -4
- package/dist/modern/Wizard/Wizard.js.map +1 -1
- package/dist/modern/Wizard/WizardActions/WizardActions.d.ts +2 -2
- package/dist/modern/Wizard/WizardActions/WizardActions.js +6 -6
- package/dist/modern/Wizard/WizardActions/WizardActions.js.map +1 -1
- package/dist/modern/Wizard/WizardContent/WizardContent.d.ts +1 -1
- package/dist/modern/Wizard/WizardContent/WizardContent.js +1 -1
- package/dist/modern/Wizard/WizardContent/WizardContent.js.map +1 -1
- package/dist/modern/Wizard/WizardContext/WizardContext.d.ts +12 -0
- package/dist/modern/Wizard/WizardContext/WizardContextProvider.d.ts +28 -0
- package/dist/modern/Wizard/WizardContext/WizardContextProvider.js +36 -0
- package/dist/modern/Wizard/WizardContext/WizardContextProvider.js.map +1 -0
- package/dist/modern/Wizard/WizardContext/index.d.ts +5 -0
- package/dist/modern/Wizard/WizardContext/index.js +1 -0
- package/dist/modern/Wizard/WizardContext/index.js.map +1 -1
- package/dist/modern/Wizard/WizardTitle/WizardTitle.d.ts +7 -9
- package/dist/modern/Wizard/WizardTitle/WizardTitle.js +1 -1
- package/dist/modern/Wizard/WizardTitle/WizardTitle.js.map +1 -1
- package/dist/modern/Wizard/index.d.ts +15 -0
- package/dist/modern/Wizard/index.js +1 -0
- package/dist/modern/Wizard/index.js.map +1 -1
- package/dist/modern/index.js +1 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +3 -3
package/dist/Wizard/Wizard.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export type HvWizardProps = StandardProps<
|
|
|
13
13
|
/**
|
|
14
14
|
* Class names to be applied.
|
|
15
15
|
*/
|
|
16
|
-
className
|
|
16
|
+
className?: string;
|
|
17
17
|
/**
|
|
18
18
|
* Current state of the Wizard.
|
|
19
19
|
*/
|
|
@@ -25,19 +25,19 @@ export type HvWizardProps = StandardProps<
|
|
|
25
25
|
/**
|
|
26
26
|
* Function executed on submit.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
handleSubmit: any;
|
|
29
29
|
/**
|
|
30
30
|
* Title for the wizard.
|
|
31
31
|
*/
|
|
32
|
-
title
|
|
32
|
+
title?: string;
|
|
33
33
|
/**
|
|
34
34
|
* The content of the component.
|
|
35
35
|
*/
|
|
36
|
-
children
|
|
36
|
+
children?: React.ReactNode;
|
|
37
37
|
/**
|
|
38
38
|
* An object containing all the labels for the wizard.
|
|
39
39
|
*/
|
|
40
|
-
labels
|
|
40
|
+
labels?: HvWizardActionsProps["labels"] & HvWizardTitleProps["labels"];
|
|
41
41
|
/**
|
|
42
42
|
* Shows the summary button.
|
|
43
43
|
*/
|
package/dist/Wizard/Wizard.js
CHANGED
|
@@ -31,13 +31,13 @@ var _WizardActions = _interopRequireDefault(require("./WizardActions"));
|
|
|
31
31
|
|
|
32
32
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
33
33
|
|
|
34
|
-
var _excluded = ["className", "children", "onClose", "
|
|
34
|
+
var _excluded = ["className", "children", "onClose", "handleSubmit", "title", "open", "skippable", "loading", "hasSummary", "labels", "fixedHeight", "customStep"];
|
|
35
35
|
|
|
36
36
|
var HvWizard = function HvWizard(_ref) {
|
|
37
37
|
var className = _ref.className,
|
|
38
38
|
children = _ref.children,
|
|
39
39
|
onClose = _ref.onClose,
|
|
40
|
-
|
|
40
|
+
handleSubmit = _ref.handleSubmit,
|
|
41
41
|
title = _ref.title,
|
|
42
42
|
open = _ref.open,
|
|
43
43
|
_ref$skippable = _ref.skippable,
|
|
@@ -113,7 +113,7 @@ var HvWizard = function HvWizard(_ref) {
|
|
|
113
113
|
tab: tab,
|
|
114
114
|
changeTab: setTab,
|
|
115
115
|
handleClose: handleClose,
|
|
116
|
-
|
|
116
|
+
handleSubmit: handleSubmit
|
|
117
117
|
})));
|
|
118
118
|
};
|
|
119
119
|
|
|
@@ -136,7 +136,7 @@ process.env.NODE_ENV !== "production" ? HvWizard.propTypes = {
|
|
|
136
136
|
/**
|
|
137
137
|
* Function executed on submit.
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
handleSubmit: _propTypes.default.func.isRequired,
|
|
140
140
|
|
|
141
141
|
/**
|
|
142
142
|
* Enables the skip button.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.js","names":["HvWizard","className","children","onClose","
|
|
1
|
+
{"version":3,"file":"Wizard.js","names":["HvWizard","className","children","onClose","handleSubmit","title","open","skippable","loading","hasSummary","labels","cancel","next","previous","skip","submit","summary","fixedHeight","customStep","others","React","useState","context","setContext","tab","setTab","contextValue","useMemo","useEffect","handleClose","useCallback","evt","reason","propTypes","PropTypes","string","bool","isRequired","func","node","shape","type","oneOf","stepSize","width","xs","number","sm","md","lg","xl","withStyles","styles","name"],"sources":["../../src/Wizard/Wizard.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport WizardContext from \"./WizardContext\";\nimport WizardContainer from \"./WizardContainer\";\nimport WizardTitle from \"./WizardTitle\";\nimport WizardContent from \"./WizardContent\";\nimport WizardActions from \"./WizardActions\";\n\nimport styles from \"./styles\";\n\nconst HvWizard = ({\n className,\n children,\n onClose,\n handleSubmit,\n title,\n open,\n skippable = true,\n loading = false,\n hasSummary = false,\n labels = {\n cancel: \"Cancel\",\n next: \"Next\",\n previous: \"Previous\",\n skip: \"Skip\",\n submit: \"Submit\",\n summary: \"Summary\",\n },\n fixedHeight = false,\n customStep,\n ...others\n}) => {\n const [context, setContext] = React.useState({});\n const [tab, setTab] = React.useState(0);\n\n const contextValue = React.useMemo(\n () => ({\n context,\n setContext,\n }),\n [context, setContext]\n );\n\n React.useEffect(() => {\n if (!open) {\n setTab(0);\n }\n }, [open]);\n\n const handleClose = React.useCallback(\n (evt, reason) => {\n if (reason !== \"backdropClick\") {\n onClose(evt, reason);\n }\n },\n [onClose]\n );\n\n return (\n <WizardContext.Provider value={contextValue}>\n <WizardContainer className={className} handleClose={handleClose} open={open} {...others}>\n <WizardTitle\n title={title}\n hasSummary={hasSummary}\n labels={labels}\n tab={tab}\n changeTab={setTab}\n customStep={customStep}\n />\n <WizardContent loading={loading} fixedHeight={fixedHeight} tab={tab}>\n {children}\n </WizardContent>\n <WizardActions\n loading={loading}\n skippable={skippable}\n labels={labels}\n tab={tab}\n changeTab={setTab}\n handleClose={handleClose}\n handleSubmit={handleSubmit}\n />\n </WizardContainer>\n </WizardContext.Provider>\n );\n};\n\nHvWizard.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Current state of the Wizard.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Function executed on close.\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Function executed on submit.\n */\n handleSubmit: PropTypes.func.isRequired,\n /**\n * Enables the skip button.\n */\n skippable: PropTypes.bool,\n /**\n * Title for the wizard.\n */\n title: PropTypes.string,\n /**\n * Shows the summary button.\n */\n hasSummary: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * An object containing all the labels for the wizard.\n */\n labels: PropTypes.shape({\n /**\n * Cancel button label.\n */\n cancel: PropTypes.string,\n /**\n * Skip button label.\n */\n skip: PropTypes.string,\n /**\n * Previous button label.\n */\n previous: PropTypes.string,\n /**\n * Next button label.\n */\n next: PropTypes.string,\n /**\n * Submit button label.\n */\n submit: PropTypes.string,\n /**\n * Summary button label.\n */\n summary: PropTypes.string,\n }),\n /**\n * Forces minimum height to the component.\n */\n fixedHeight: PropTypes.bool,\n /**\n * Whether the loading animation is shown.\n */\n loading: PropTypes.bool,\n /**\n * Custom object to define type, size and width of the StepNavigation component\n */\n customStep: PropTypes.shape({\n /**\n * Type of step navigation. Values = {\"Simple\", \"Default\"}.\n */\n type: PropTypes.oneOf([\"Simple\", \"Default\"]),\n /**\n * Sets one of the standard sizes of the steps. Values = {\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"}\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * Width of the component element on each breakpoint screen resolution.\n */\n width: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n }),\n};\n\nexport default withStyles(styles, { name: \"HvWizard\" })(HvWizard);\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;AAEA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,OAqBX;EAAA,IApBJC,SAoBI,QApBJA,SAoBI;EAAA,IAnBJC,QAmBI,QAnBJA,QAmBI;EAAA,IAlBJC,OAkBI,QAlBJA,OAkBI;EAAA,IAjBJC,YAiBI,QAjBJA,YAiBI;EAAA,IAhBJC,KAgBI,QAhBJA,KAgBI;EAAA,IAfJC,IAeI,QAfJA,IAeI;EAAA,0BAdJC,SAcI;EAAA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AAEC,IAAI,EAAE;AAAR,CAAnB,EAAyCrD,QAAzC,C"}
|
|
@@ -22,11 +22,11 @@ export type HvWizardActionsProps = StandardProps<
|
|
|
22
22
|
/**
|
|
23
23
|
* Function to handle the submit button. Also sends the current context state.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
handleSubmit: (context: any) => void;
|
|
26
26
|
/**
|
|
27
27
|
* An object containing all the labels for the wizard actions component.
|
|
28
28
|
*/
|
|
29
|
-
labels
|
|
29
|
+
labels?: {
|
|
30
30
|
/**
|
|
31
31
|
* Cancel button label.
|
|
32
32
|
*/
|
|
@@ -56,7 +56,7 @@ var HvWizardActions = function HvWizardActions(_ref) {
|
|
|
56
56
|
|
|
57
57
|
var classes = _ref.classes,
|
|
58
58
|
handleClose = _ref.handleClose,
|
|
59
|
-
|
|
59
|
+
handleSubmit = _ref.handleSubmit,
|
|
60
60
|
changeTab = _ref.changeTab,
|
|
61
61
|
tab = _ref.tab,
|
|
62
62
|
_ref$loading = _ref.loading,
|
|
@@ -121,9 +121,9 @@ var HvWizardActions = function HvWizardActions(_ref) {
|
|
|
121
121
|
changeTab(lastPage);
|
|
122
122
|
}, [changeTab, context, lastPage, setContext]);
|
|
123
123
|
|
|
124
|
-
var
|
|
125
|
-
return
|
|
126
|
-
}, [
|
|
124
|
+
var handleSubmitInternal = _react.default.useCallback(function () {
|
|
125
|
+
return handleSubmit(context);
|
|
126
|
+
}, [handleSubmit, context]);
|
|
127
127
|
|
|
128
128
|
return /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvDialogActions, {
|
|
129
129
|
className: classes.actionsContainer
|
|
@@ -151,7 +151,7 @@ var HvWizardActions = function HvWizardActions(_ref) {
|
|
|
151
151
|
category: "primary",
|
|
152
152
|
className: classes.buttonWidth,
|
|
153
153
|
disabled: loading || !canSubmit,
|
|
154
|
-
onClick:
|
|
154
|
+
onClick: handleSubmitInternal
|
|
155
155
|
}, "".concat((_labels$submit = labels.submit) !== null && _labels$submit !== void 0 ? _labels$submit : "Submit")) : /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvButton, {
|
|
156
156
|
category: "ghost",
|
|
157
157
|
className: (0, _clsx.default)(classes.buttonWidth, classes.buttonSpacing),
|
|
@@ -208,7 +208,7 @@ process.env.NODE_ENV !== "production" ? HvWizardActions.propTypes = {
|
|
|
208
208
|
/**
|
|
209
209
|
* Function to handle the submit button. Also sends the current context state.
|
|
210
210
|
*/
|
|
211
|
-
|
|
211
|
+
handleSubmit: _propTypes.default.func.isRequired,
|
|
212
212
|
|
|
213
213
|
/**
|
|
214
214
|
* An object containing all the labels for the wizard actions component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardActions.js","names":["HvWizardActions","classes","handleClose","onSubmit","changeTab","tab","loading","skippable","labels","cancel","next","previous","skip","submit","React","useContext","WizardContext","context","setContext","useState","pages","setPages","canSubmit","setCanSubmit","useEffect","contextEntries","Object","entries","length","validWizard","every","value","valid","lastPage","isLastPage","handleSkip","useCallback","skippedContext","map","child","handleSubmit","actionsContainer","buttonWidth","buttonsContainer","t","clsx","buttonSpacing","propTypes","PropTypes","shape","string","isRequired","number","func","bool","withStyles","styles","name"],"sources":["../../../src/Wizard/WizardActions/WizardActions.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport clsx from \"clsx\";\nimport { HvButton, HvDialogActions, HvGrid } from \"@hitachivantara/uikit-react-core\";\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\nimport WizardContext from \"../WizardContext\";\n\nimport styles from \"./styles\";\n\nconst HvWizardActions = ({\n classes,\n handleClose,\n onSubmit,\n changeTab,\n tab,\n loading = false,\n skippable = false,\n labels = {\n cancel: \"Cancel\",\n next: \"Next\",\n previous: \"Previous\",\n skip: \"Skip\",\n submit: \"Submit\",\n },\n}) => {\n const { context, setContext } = React.useContext(WizardContext);\n const [pages, setPages] = React.useState(0);\n const [canSubmit, setCanSubmit] = React.useState(false);\n\n React.useEffect(() => {\n const contextEntries = Object.entries(context);\n if (contextEntries.length) {\n setPages(contextEntries.length);\n\n const validWizard = Object.entries(context).every(([, value]) => value.valid);\n if (validWizard !== canSubmit) {\n setCanSubmit(validWizard);\n }\n }\n }, [context]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const lastPage = pages - 1;\n const isLastPage = tab >= lastPage;\n\n const handleSkip = React.useCallback(() => {\n const skippedContext = Object.entries(context).map(([, child]) => ({\n ...child,\n valid: child.valid !== false,\n }));\n setContext(skippedContext);\n changeTab(lastPage);\n }, [changeTab, context, lastPage, setContext]);\n const handleSubmit = React.useCallback(() => onSubmit(context), [onSubmit, context]);\n\n return (\n <HvDialogActions className={classes.actionsContainer}>\n <HvGrid>\n <HvButton category=\"ghost\" onClick={handleClose} className={classes.buttonWidth}>\n {`${labels.cancel ?? \"Cancel\"}`}\n </HvButton>\n <HvButton\n category=\"ghost\"\n disabled={isLastPage || !skippable}\n className={classes.buttonWidth}\n onClick={handleSkip}\n >\n {`${labels.skip ?? \"Skip\"}`}\n </HvButton>\n </HvGrid>\n <HvGrid className={classes.buttonsContainer}>\n <HvButton\n category=\"ghost\"\n className={classes.buttonWidth}\n disabled={tab <= 0}\n onClick={() => changeTab((t) => t - 1)}\n >\n <Backwards />\n {`${labels.previous ?? \"Previous\"}`}\n </HvButton>\n\n {isLastPage ? (\n <HvButton\n category=\"primary\"\n className={classes.buttonWidth}\n disabled={loading || !canSubmit}\n onClick={handleSubmit}\n >\n {`${labels.submit ?? \"Submit\"}`}\n </HvButton>\n ) : (\n <HvButton\n category=\"ghost\"\n className={clsx(classes.buttonWidth, classes.buttonSpacing)}\n onClick={() => changeTab((t) => t + 1)}\n disabled={!skippable && !context?.[tab]?.valid}\n >\n {`${labels.next ?? \"Next\"}`}\n <Forwards />\n </HvButton>\n )}\n </HvGrid>\n </HvDialogActions>\n );\n};\n\nHvWizardActions.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component which contains the groups of buttons.\n */\n actionsContainer: PropTypes.string,\n /**\n * Styles applied to the component which contains the buttons.\n */\n buttonsContainer: PropTypes.string,\n /**\n * Styles applied to the Button component to override its width.\n */\n buttonWidth: PropTypes.string,\n /**\n * Styles applied to some Button components to override its left padding.\n */\n buttonSpacing: PropTypes.string,\n }).isRequired,\n /**\n * Current tab to check if it's last page or first to disable previous button and swap between next and submit button.\n */\n tab: PropTypes.number.isRequired,\n /**\n * Function to change the tab when pressing previous and next buttons.\n */\n changeTab: PropTypes.func.isRequired,\n /**\n * Function to handle the cancel button.\n */\n handleClose: PropTypes.func.isRequired,\n /**\n * Function to handle the submit button. Also sends the current context state.\n */\n onSubmit: PropTypes.func.isRequired,\n /**\n * An object containing all the labels for the wizard actions component.\n */\n labels: PropTypes.shape({\n /**\n * Cancel button label.\n */\n cancel: PropTypes.string,\n /**\n * Skip button label.\n */\n skip: PropTypes.string,\n /**\n * Previous button label.\n */\n previous: PropTypes.string,\n /**\n * Next button label.\n */\n next: PropTypes.string,\n /**\n * Submit button label.\n */\n submit: PropTypes.string,\n }),\n /**\n * Whether the submit button is disabled.\n */\n loading: PropTypes.bool,\n /**\n * Enables the skip button.\n */\n skippable: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvWizardActions\" })(HvWizardActions);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;;;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,OAelB;EAAA;;EAAA,IAdJC,OAcI,QAdJA,OAcI;EAAA,IAbJC,WAaI,QAbJA,WAaI;EAAA,IAZJC,QAYI,QAZJA,QAYI;EAAA,IAXJC,SAWI,QAXJA,SAWI;EAAA,IAVJC,GAUI,QAVJA,GAUI;EAAA,wBATJC,OASI;EAAA,IATJA,OASI,6BATM,KASN;EAAA,0BARJC,SAQI;EAA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EA0B1B;AACF;AACA;EACE/C,SAAS,EAAE4C,kBAAA,CAAUK,IAAV,CAAeF,UA7BA;;EA8B1B;AACF;AACA;EACEjD,WAAW,EAAE8C,kBAAA,CAAUK,IAAV,CAAeF,UAjCF;;EAkC1B;AACF;AACA;EACEhD,QAAQ,EAAE6C,kBAAA,CAAUK,IAAV,CAAeF,UArCC;;EAsC1B;AACF;AACA;EACE3C,MAAM,EAAEwC,kBAAA,CAAUC,KAAV,CAAgB;IACtB;AACJ;AACA;IACIxC,MAAM,EAAEuC,kBAAA,CAAUE,MAJI;;IAKtB;AACJ;AACA;IACItC,IAAI,EAAEoC,kBAAA,CAAUE,MARM;;IAStB;AACJ;AACA;IACIvC,QAAQ,EAAEqC,kBAAA,CAAUE,MAZE;;IAatB;AACJ;AACA;IACIxC,IAAI,EAAEsC,kBAAA,CAAUE,MAhBM;;IAiBtB;AACJ;AACA;IACIrC,MAAM,EAAEmC,kBAAA,CAAUE;EApBI,CAAhB,CAzCkB;;EA+D1B;AACF;AACA;EACE5C,OAAO,EAAE0C,kBAAA,CAAUM,IAlEO;;EAmE1B;AACF;AACA;EACE/C,SAAS,EAAEyC,kBAAA,CAAUM;AAtEK,CAA5B;;eAyEe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAgDzD,eAAhD,C"}
|
|
1
|
+
{"version":3,"file":"WizardActions.js","names":["HvWizardActions","classes","handleClose","handleSubmit","changeTab","tab","loading","skippable","labels","cancel","next","previous","skip","submit","React","useContext","HvWizardContext","context","setContext","useState","pages","setPages","canSubmit","setCanSubmit","useEffect","contextEntries","Object","entries","length","validWizard","every","value","valid","lastPage","isLastPage","handleSkip","useCallback","skippedContext","map","child","handleSubmitInternal","actionsContainer","buttonWidth","buttonsContainer","t","clsx","buttonSpacing","propTypes","PropTypes","shape","string","isRequired","number","func","bool","withStyles","styles","name"],"sources":["../../../src/Wizard/WizardActions/WizardActions.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport clsx from \"clsx\";\nimport { HvButton, HvDialogActions, HvGrid } from \"@hitachivantara/uikit-react-core\";\nimport { Backwards, Forwards } from \"@hitachivantara/uikit-react-icons\";\nimport HvWizardContext from \"../WizardContext\";\n\nimport styles from \"./styles\";\n\nconst HvWizardActions = ({\n classes,\n handleClose,\n handleSubmit,\n changeTab,\n tab,\n loading = false,\n skippable = false,\n labels = {\n cancel: \"Cancel\",\n next: \"Next\",\n previous: \"Previous\",\n skip: \"Skip\",\n submit: \"Submit\",\n },\n}) => {\n const { context, setContext } = React.useContext(HvWizardContext);\n const [pages, setPages] = React.useState(0);\n const [canSubmit, setCanSubmit] = React.useState(false);\n\n React.useEffect(() => {\n const contextEntries = Object.entries(context);\n if (contextEntries.length) {\n setPages(contextEntries.length);\n\n const validWizard = Object.entries(context).every(([, value]) => value.valid);\n if (validWizard !== canSubmit) {\n setCanSubmit(validWizard);\n }\n }\n }, [context]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const lastPage = pages - 1;\n const isLastPage = tab >= lastPage;\n\n const handleSkip = React.useCallback(() => {\n const skippedContext = Object.entries(context).map(([, child]) => ({\n ...child,\n valid: child.valid !== false,\n }));\n setContext(skippedContext);\n changeTab(lastPage);\n }, [changeTab, context, lastPage, setContext]);\n const handleSubmitInternal = React.useCallback(\n () => handleSubmit(context),\n [handleSubmit, context]\n );\n\n return (\n <HvDialogActions className={classes.actionsContainer}>\n <HvGrid>\n <HvButton category=\"ghost\" onClick={handleClose} className={classes.buttonWidth}>\n {`${labels.cancel ?? \"Cancel\"}`}\n </HvButton>\n <HvButton\n category=\"ghost\"\n disabled={isLastPage || !skippable}\n className={classes.buttonWidth}\n onClick={handleSkip}\n >\n {`${labels.skip ?? \"Skip\"}`}\n </HvButton>\n </HvGrid>\n <HvGrid className={classes.buttonsContainer}>\n <HvButton\n category=\"ghost\"\n className={classes.buttonWidth}\n disabled={tab <= 0}\n onClick={() => changeTab((t) => t - 1)}\n >\n <Backwards />\n {`${labels.previous ?? \"Previous\"}`}\n </HvButton>\n\n {isLastPage ? (\n <HvButton\n category=\"primary\"\n className={classes.buttonWidth}\n disabled={loading || !canSubmit}\n onClick={handleSubmitInternal}\n >\n {`${labels.submit ?? \"Submit\"}`}\n </HvButton>\n ) : (\n <HvButton\n category=\"ghost\"\n className={clsx(classes.buttonWidth, classes.buttonSpacing)}\n onClick={() => changeTab((t) => t + 1)}\n disabled={!skippable && !context?.[tab]?.valid}\n >\n {`${labels.next ?? \"Next\"}`}\n <Forwards />\n </HvButton>\n )}\n </HvGrid>\n </HvDialogActions>\n );\n};\n\nHvWizardActions.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component which contains the groups of buttons.\n */\n actionsContainer: PropTypes.string,\n /**\n * Styles applied to the component which contains the buttons.\n */\n buttonsContainer: PropTypes.string,\n /**\n * Styles applied to the Button component to override its width.\n */\n buttonWidth: PropTypes.string,\n /**\n * Styles applied to some Button components to override its left padding.\n */\n buttonSpacing: PropTypes.string,\n }).isRequired,\n /**\n * Current tab to check if it's last page or first to disable previous button and swap between next and submit button.\n */\n tab: PropTypes.number.isRequired,\n /**\n * Function to change the tab when pressing previous and next buttons.\n */\n changeTab: PropTypes.func.isRequired,\n /**\n * Function to handle the cancel button.\n */\n handleClose: PropTypes.func.isRequired,\n /**\n * Function to handle the submit button. Also sends the current context state.\n */\n handleSubmit: PropTypes.func.isRequired,\n /**\n * An object containing all the labels for the wizard actions component.\n */\n labels: PropTypes.shape({\n /**\n * Cancel button label.\n */\n cancel: PropTypes.string,\n /**\n * Skip button label.\n */\n skip: PropTypes.string,\n /**\n * Previous button label.\n */\n previous: PropTypes.string,\n /**\n * Next button label.\n */\n next: PropTypes.string,\n /**\n * Submit button label.\n */\n submit: PropTypes.string,\n }),\n /**\n * Whether the submit button is disabled.\n */\n loading: PropTypes.bool,\n /**\n * Enables the sk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AAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAgDzD,eAAhD,C"}
|
|
@@ -41,7 +41,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
41
41
|
|
|
42
42
|
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _WizardContext = _interopRequireDefault(require("../WizardContext"));
|
|
45
45
|
|
|
46
46
|
var _LoadingContainer = _interopRequireDefault(require("./LoadingContainer"));
|
|
47
47
|
|
|
@@ -72,7 +72,7 @@ var HvWizardContent = function HvWizardContent(_ref) {
|
|
|
72
72
|
})));
|
|
73
73
|
}, {});
|
|
74
74
|
|
|
75
|
-
var _React$useContext = _react.default.useContext(
|
|
75
|
+
var _React$useContext = _react.default.useContext(_WizardContext.default),
|
|
76
76
|
context = _React$useContext.context,
|
|
77
77
|
setContext = _React$useContext.setContext;
|
|
78
78
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardContent.js","names":["HvWizardContent","classes","fixedHeight","loading","children","tab","arrayChildren","React","Children","toArray","initialContext","reduce","acc","child","index","invalid","props","mustValidate","valid","form","touched","useContext","HvWizardContext","context","setContext","useEffect","updatedContext","Object","entries","key","childState","clsx","contentContainer","map","cloneElement","propTypes","PropTypes","number","isRequired","node","shape","string","bool","withStyles","styles","name"],"sources":["../../../src/Wizard/WizardContent/WizardContent.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport clsx from \"clsx\";\nimport { HvDialogContent } from \"@hitachivantara/uikit-react-core\";\nimport
|
|
1
|
+
{"version":3,"file":"WizardContent.js","names":["HvWizardContent","classes","fixedHeight","loading","children","tab","arrayChildren","React","Children","toArray","initialContext","reduce","acc","child","index","invalid","props","mustValidate","valid","form","touched","useContext","HvWizardContext","context","setContext","useEffect","updatedContext","Object","entries","key","childState","clsx","contentContainer","map","cloneElement","propTypes","PropTypes","number","isRequired","node","shape","string","bool","withStyles","styles","name"],"sources":["../../../src/Wizard/WizardContent/WizardContent.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport clsx from \"clsx\";\nimport { HvDialogContent } from \"@hitachivantara/uikit-react-core\";\nimport HvWizardContext from \"../WizardContext\";\nimport LoadingContainer from \"./LoadingContainer\";\n\nimport styles from \"./styles\";\n\nconst HvWizardContent = ({ classes, fixedHeight = false, loading = false, children, tab }) => {\n const arrayChildren = React.Children.toArray(children);\n const initialContext = arrayChildren.reduce((acc, child, index) => {\n const invalid = child.props.mustValidate === true ? false : null;\n const valid = invalid ?? (index === 0 || null);\n return {\n ...acc,\n [index]: { ...child.props, form: {}, valid, touched: index === 0 },\n };\n }, {});\n\n const { context, setContext } = React.useContext(HvWizardContext);\n\n React.useEffect(() => {\n setContext(initialContext);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n React.useEffect(() => {\n if (tab && !context[tab]?.touched) {\n const updatedContext = Object.entries(context).reduce(\n (acc, [key, childState]) => ({\n ...acc,\n ...(+key <= tab\n ? { [key]: { ...childState, touched: true, valid: childState.valid ?? true } }\n : { [key]: childState }),\n }),\n {}\n );\n\n setContext(updatedContext);\n }\n }, [tab]); // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <HvDialogContent\n className={clsx(classes.contentContainer, {\n [classes.fixedHeight]: fixedHeight,\n })}\n indentContent\n >\n <LoadingContainer hidden={!loading}>\n {React.Children.map(arrayChildren, (child, index) => {\n if (index === tab) {\n return React.cloneElement(child, { tab });\n }\n return null;\n })}\n </LoadingContainer>\n </HvDialogContent>\n );\n};\n\nHvWizardContent.propTypes = {\n /**\n * Current tab to show.\n */\n tab: PropTypes.number.isRequired,\n /**\n * Tabs to show on the Wizard.\n */\n children: PropTypes.node.isRequired,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the Wizard content container\n */\n contentContainer: PropTypes.string,\n /**\n * Style applied to the Wizard to fix its height.\n */\n fixedHeight: PropTypes.string,\n }).isRequired,\n /**\n * Forces minimum height to the component.\n */\n fixedHeight: PropTypes.bool,\n /**\n * Whether the loading animation is shown.\n */\n loading: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvWizardContent\" })(HvWizardContent);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;;;AAEA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,OAAsE;EAAA,IAAnEC,OAAmE,QAAnEA,OAAmE;EAAA,4BAA1DC,WAA0D;EAAA,IAA1DA,WAA0D,iCAA5C,KAA4C;EAAA,wBAArCC,OAAqC;EAAA,IAArCA,OAAqC,6BAA3B,KAA2B;EAAA,IAApBC,QAAoB,QAApBA,QAAoB;EAAA,IAAVC,GAAU,QAAVA,GAAU;;EAC5F,IAAMC,aAAa,GAAGC,cAAA,CAAMC,QAAN,CAAeC,OAAf,CAAuBL,QAAvB,CAAtB;;EACA,IAAMM,cAAc,GAAGJ,aAAa,CAACK,MAAd,CAAqB,UAACC,GAAD,EAAMC,KAAN,EAAaC,KAAb,EAAuB;IACjE,IAAMC,OAAO,GAAGF,KAAK,CAACG,KAAN,CAAYC,YAAZ,KAA6B,IAA7B,GAAoC,KAApC,GAA4C,IAA5D;IACA,IAAMC,KAAK,GAAGH,OAAH,aAAGA,OAAH,cAAGA,OAAH,GAAeD,KAAK,KAAK,CAAV,IAAe,IAAzC;IACA,uCACKF,GADL,yCAEGE,KAFH,kCAEgBD,KAAK,CAACG,KAFtB;MAE6BG,IAAI,EAAE,EAFnC;MAEuCD,KAAK,EAALA,KAFvC;MAE8CE,OAAO,EAAEN,KAAK,KAAK;IAFjE;EAID,CAPsB,EAOpB,EAPoB,CAAvB;;EASA,wBAAgCP,cAAA,CAAMc,UAAN,CAAiBC,sBAAjB,CA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;IACD,OAAO,IAAP;EACD,CALA,CADH,CANF,CADF;AAiBD,CAlDD;;AAoDA,wCAAAL,eAAe,CAACmC,SAAhB,GAA4B;EAC1B;AACF;AACA;EACE9B,GAAG,EAAE+B,kBAAA,CAAUC,MAAV,CAAiBC,UAJI;;EAK1B;AACF;AACA;EACElC,QAAQ,EAAEgC,kBAAA,CAAUG,IAAV,CAAeD,UARC;;EAS1B;AACF;AACA;EACErC,OAAO,EAAEmC,kBAAA,CAAUI,KAAV,CAAgB;IACvB;AACJ;AACA;IACIR,gBAAgB,EAAEI,kBAAA,CAAUK,MAJL;;IAKvB;AACJ;AACA;IACIvC,WAAW,EAAEkC,kBAAA,CAAUK;EARA,CAAhB,EASNH,UArBuB;;EAsB1B;AACF;AACA;EACEpC,WAAW,EAAEkC,kBAAA,CAAUM,IAzBG;;EA0B1B;AACF;AACA;EACEvC,OAAO,EAAEiC,kBAAA,CAAUM;AA7BO,CAA5B;;eAgCe,IAAAC,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAgD7C,eAAhD,C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export type HvWizardContextClassKey = "root";
|
|
4
|
+
|
|
5
|
+
export type HvWizardContextProps = {
|
|
6
|
+
context: any;
|
|
7
|
+
setContext: () => void;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default function HvWizardContext(
|
|
11
|
+
props: HvWizardContextProps
|
|
12
|
+
): React.Context<HvWizardContextProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StandardProps } from "@material-ui/core";
|
|
2
|
+
|
|
3
|
+
export type HvWizardContextProviderClassKey = "root";
|
|
4
|
+
|
|
5
|
+
export interface HvWizardContextProviderProps
|
|
6
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvWizardContextProviderClassKey> {
|
|
7
|
+
/**
|
|
8
|
+
* Initial context value
|
|
9
|
+
*/
|
|
10
|
+
value?: {
|
|
11
|
+
/**
|
|
12
|
+
* Initial context object
|
|
13
|
+
*/
|
|
14
|
+
context: any;
|
|
15
|
+
/**
|
|
16
|
+
* Function to modify the context
|
|
17
|
+
*/
|
|
18
|
+
setContext: React.Dispatch<React.SetStateAction<Record<string, unknown>>>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Child components for the Wizard
|
|
22
|
+
*/
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default function HvWizardContextProvider(
|
|
27
|
+
props: HvWizardContextProviderProps
|
|
28
|
+
): JSX.Element | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _WizardContext = _interopRequireDefault(require("./WizardContext"));
|
|
15
|
+
|
|
16
|
+
var WizardContextProvider = function WizardContextProvider(_ref) {
|
|
17
|
+
var value = _ref.value,
|
|
18
|
+
children = _ref.children;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_WizardContext.default.Provider, {
|
|
20
|
+
value: value
|
|
21
|
+
}, children);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
process.env.NODE_ENV !== "production" ? WizardContextProvider.propTypes = {
|
|
25
|
+
/**
|
|
26
|
+
* Initial context value
|
|
27
|
+
*/
|
|
28
|
+
value: _propTypes.default.shape({
|
|
29
|
+
/**
|
|
30
|
+
* Initial context object
|
|
31
|
+
*/
|
|
32
|
+
context: _propTypes.default.shape({}),
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Function to modify the context
|
|
36
|
+
*/
|
|
37
|
+
setContext: _propTypes.default.func
|
|
38
|
+
}),
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Child components for the Wizard
|
|
42
|
+
*/
|
|
43
|
+
children: _propTypes.default.node.isRequired
|
|
44
|
+
} : void 0;
|
|
45
|
+
var _default = WizardContextProvider;
|
|
46
|
+
exports.default = _default;
|
|
47
|
+
//# sourceMappingURL=WizardContextProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WizardContextProvider.js","names":["WizardContextProvider","value","children","propTypes","PropTypes","shape","context","setContext","func","node","isRequired"],"sources":["../../../src/Wizard/WizardContext/WizardContextProvider.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport HvWizardContext from \"./WizardContext\";\n\nconst WizardContextProvider = ({ value, children }) => {\n return <HvWizardContext.Provider value={value}>{children}</HvWizardContext.Provider>;\n};\n\nWizardContextProvider.propTypes = {\n /**\n * Initial context value\n */\n value: PropTypes.shape({\n /**\n * Initial context object\n */\n context: PropTypes.shape({}),\n /**\n * Function to modify the context\n */\n setContext: PropTypes.func,\n }),\n /**\n * Child components for the Wizard\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default WizardContextProvider;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAwB,OAAyB;EAAA,IAAtBC,KAAsB,QAAtBA,KAAsB;EAAA,IAAfC,QAAe,QAAfA,QAAe;EACrD,oBAAO,6BAAC,sBAAD,CAAiB,QAAjB;IAA0B,KAAK,EAAED;EAAjC,GAAyCC,QAAzC,CAAP;AACD,CAFD;;AAIA,wCAAAF,qBAAqB,CAACG,SAAtB,GAAkC;EAChC;AACF;AACA;EACEF,KAAK,EAAEG,kBAAA,CAAUC,KAAV,CAAgB;IACrB;AACJ;AACA;IACIC,OAAO,EAAEF,kBAAA,CAAUC,KAAV,CAAgB,EAAhB,CAJY;;IAKrB;AACJ;AACA;IACIE,UAAU,EAAEH,kBAAA,CAAUI;EARD,CAAhB,CAJyB;;EAchC;AACF;AACA;EACEN,QAAQ,EAAEE,kBAAA,CAAUK,IAAV,CAAeC;AAjBO,CAAlC;eAoBeV,qB"}
|
|
@@ -5,6 +5,12 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
Object.defineProperty(exports, "HvWizardContextProvider", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _WizardContextProvider.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
Object.defineProperty(exports, "default", {
|
|
9
15
|
enumerable: true,
|
|
10
16
|
get: function get() {
|
|
@@ -13,4 +19,6 @@ Object.defineProperty(exports, "default", {
|
|
|
13
19
|
});
|
|
14
20
|
|
|
15
21
|
var _WizardContext = _interopRequireDefault(require("./WizardContext"));
|
|
22
|
+
|
|
23
|
+
var _WizardContextProvider = _interopRequireDefault(require("./WizardContextProvider"));
|
|
16
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/Wizard/WizardContext/index.js"],"sourcesContent":["export { default } from \"./WizardContext\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/Wizard/WizardContext/index.js"],"sourcesContent":["export { default } from \"./WizardContext\";\nexport { default as HvWizardContextProvider } from \"./WizardContextProvider\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;AACA"}
|
|
@@ -4,22 +4,20 @@ import { HvStepNavigationProps } from "../../StepNavigation";
|
|
|
4
4
|
|
|
5
5
|
export type HvWizardTitleClassKey = "root";
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
React.HTMLAttributes<HTMLDivElement>,
|
|
9
|
-
HvWizardTitleClassKey
|
|
10
|
-
> & {
|
|
7
|
+
export interface HvWizardTitleProps
|
|
8
|
+
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvWizardTitleClassKey> {
|
|
11
9
|
/**
|
|
12
10
|
* Title for the wizard.
|
|
13
11
|
*/
|
|
14
|
-
title
|
|
12
|
+
title?: string;
|
|
15
13
|
/**
|
|
16
14
|
* Shows the summary button.
|
|
17
15
|
*/
|
|
18
|
-
hasSummary
|
|
16
|
+
hasSummary?: boolean;
|
|
19
17
|
/**
|
|
20
18
|
* An object containing all the labels for the wizard header.
|
|
21
19
|
*/
|
|
22
|
-
labels
|
|
20
|
+
labels?: {
|
|
23
21
|
/**
|
|
24
22
|
* Summary button label.
|
|
25
23
|
*/
|
|
@@ -36,7 +34,7 @@ export type HvWizardTitleProps = StandardProps<
|
|
|
36
34
|
/**
|
|
37
35
|
* Custom object to define type, size and width of the StepNavigation component
|
|
38
36
|
*/
|
|
39
|
-
|
|
40
|
-
}
|
|
37
|
+
customStep?: Pick<HvStepNavigationProps, "type" | "stepSize" | "width">;
|
|
38
|
+
}
|
|
41
39
|
|
|
42
40
|
export default function HvWizardTitle(props: HvWizardTitleProps): JSX.Element | null;
|
|
@@ -27,7 +27,7 @@ var _uikitReactIcons = require("@hitachivantara/uikit-react-icons");
|
|
|
27
27
|
|
|
28
28
|
var _uikitReactLab = require("@hitachivantara/uikit-react-lab");
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _WizardContext = _interopRequireDefault(require("../WizardContext"));
|
|
31
31
|
|
|
32
32
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
33
33
|
|
|
@@ -57,7 +57,7 @@ var HvWizardTitle = function HvWizardTitle(_ref) {
|
|
|
57
57
|
_ref$customStep = _ref.customStep,
|
|
58
58
|
customStep = _ref$customStep === void 0 ? {} : _ref$customStep;
|
|
59
59
|
|
|
60
|
-
var _React$useContext = _react.default.useContext(
|
|
60
|
+
var _React$useContext = _react.default.useContext(_WizardContext.default),
|
|
61
61
|
context = _React$useContext.context;
|
|
62
62
|
|
|
63
63
|
var _React$useState = _react.default.useState([]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardTitle.js","names":["switchTabState","state","currentTab","index","valid","touched","HvWizardTitle","title","hasSummary","labels","tab","classes","changeTab","customStep","React","useContext","HvWizardContext","context","useState","steps","setSteps","useEffect","contextArray","Object","entries","length","updatedSteps","map","childState","name","onClick","headerContainer","messageContainer","titleContainer","stepContainer","type","stepSize","width","xs","sm","md","lg","buttonWidth","root","rootSummaryButton","summary","propTypes","PropTypes","shape","string","bool","number","isRequired","func","oneOf","xl","withStyles","styles"],"sources":["../../../src/Wizard/WizardTitle/WizardTitle.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvButton, HvDialogTitle, HvGrid, HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport { Report } from \"@hitachivantara/uikit-react-icons\";\nimport { HvStepNavigation } from \"@hitachivantara/uikit-react-lab\";\nimport
|
|
1
|
+
{"version":3,"file":"WizardTitle.js","names":["switchTabState","state","currentTab","index","valid","touched","HvWizardTitle","title","hasSummary","labels","tab","classes","changeTab","customStep","React","useContext","HvWizardContext","context","useState","steps","setSteps","useEffect","contextArray","Object","entries","length","updatedSteps","map","childState","name","onClick","headerContainer","messageContainer","titleContainer","stepContainer","type","stepSize","width","xs","sm","md","lg","buttonWidth","root","rootSummaryButton","summary","propTypes","PropTypes","shape","string","bool","number","isRequired","func","oneOf","xl","withStyles","styles"],"sources":["../../../src/Wizard/WizardTitle/WizardTitle.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvButton, HvDialogTitle, HvGrid, HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport { Report } from \"@hitachivantara/uikit-react-icons\";\nimport { HvStepNavigation } from \"@hitachivantara/uikit-react-lab\";\nimport HvWizardContext from \"../WizardContext\";\n\nimport styles from \"./styles\";\n\nconst switchTabState = (state, currentTab, index) => {\n if (index === currentTab) return \"Current\";\n if (state.valid) return \"Completed\";\n if (state.valid === null) return \"Enabled\";\n if (state.touched && state.valid === false) return \"Failed\";\n // \"Disabled\"\n // \"Pending\"\n return \"Enabled\";\n};\n\nconst HvWizardTitle = ({\n title,\n hasSummary = false,\n labels = {},\n tab,\n classes,\n changeTab,\n customStep = {},\n}) => {\n const { context } = React.useContext(HvWizardContext);\n const [steps, setSteps] = React.useState([]);\n\n React.useEffect(() => {\n const contextArray = Object.entries(context);\n if (contextArray.length) {\n const updatedSteps = contextArray.map(([, childState], index) => ({\n title: childState.name ?? `${index + 1}`,\n state: switchTabState(childState, tab, index),\n onClick: () => changeTab(index),\n }));\n\n setSteps(updatedSteps);\n }\n }, [context, tab, changeTab]);\n\n return (\n <HvDialogTitle\n className={classes.headerContainer}\n classes={{ messageContainer: classes.messageContainer }}\n >\n <HvGrid\n container\n justifyContent=\"space-between\"\n alignItems=\"center\"\n className={classes.titleContainer}\n >\n {title && (\n <HvTypography variant=\"xsTitle\" component=\"h3\">\n {title}\n </HvTypography>\n )}\n {!!steps.length && (\n <HvStepNavigation\n className={classes.stepContainer}\n steps={steps}\n type={customStep?.type ?? \"Default\"}\n stepSize={customStep?.stepSize ?? \"XS\"}\n width={customStep?.width ?? { xs: 200, sm: 350, md: 600, lg: 800 }}\n />\n )}\n {hasSummary && (\n <HvButton\n category=\"secondary\"\n className={classes.buttonWidth}\n classes={{ root: classes.rootSummaryButton }}\n >\n <Report /> {`${labels.summary ?? \"Summary\"}`}\n </HvButton>\n )}\n </HvGrid>\n </HvDialogTitle>\n );\n};\n\nHvWizardTitle.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the header container.\n */\n headerContainer: PropTypes.string,\n /**\n * Styles applied to override the Dialog Title styles.\n */\n messageContainer: PropTypes.string,\n /**\n * Styles applied to the header content container.\n */\n titleContainer: PropTypes.string,\n /**\n * Styles applied to the Button component to override its width.\n */\n buttonWidth: PropTypes.string,\n /**\n * Styles applied to the Button component to override its right padding.\n */\n rootSummaryButton: PropTypes.string,\n /**\n *\n */\n stepContainer: PropTypes.string,\n }),\n /**\n * Title for the wizard.\n */\n title: PropTypes.string,\n /**\n * Shows the summary button.\n */\n hasSummary: PropTypes.bool,\n /**\n * An object containing all the labels for the wizard header.\n */\n labels: PropTypes.shape({\n /**\n * Summary button label.\n */\n summary: PropTypes.string,\n }),\n /**\n * Current tab to check if it's last page or first to disable previous button and swap between next and submit button.\n */\n tab: PropTypes.number.isRequired,\n /**\n * Function to change the tab when pressing previous and next buttons.\n */\n changeTab: PropTypes.func.isRequired,\n /**\n * Custom object to define type, size and width of the StepNavigation component\n */\n customStep: PropTypes.shape({\n /**\n * Type of step navigation. Values = {\"Simple\", \"Default\"}.\n */\n type: PropTypes.oneOf([\"Simple\", \"Default\"]),\n /**\n * Sets one of the standard sizes of the steps. Values = {\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"}\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * Width of the component element on each breakpoint screen resolution.\n */\n width: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n }),\n};\n\nexport default withStyles(styles, { name: \"HvWizardTitle\" })(HvWizardTitle);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;;;AAEA,IAAMA,cAAc,GAAG,SAAjBA,cAAiB,CAACC,KAAD,EAAQC,UAAR,EAAoBC,KAApB,EAA8B;EACnD,IAAIA,KAAK,KAAKD,UAAd,EAA0B,OAAO,SAAP;EAC1B,IAAID,KAAK,CAACG,KAAV,EAAiB,OAAO,WA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ACJ;AACA;IACIjB,KAAK,EAAEU,kBAAA,CAAUC,KAAV,CAAgB;MACrBV,EAAE,EAAES,kBAAA,CAAUI,MADO;MAErBZ,EAAE,EAAEQ,kBAAA,CAAUI,MAFO;MAGrBX,EAAE,EAAEO,kBAAA,CAAUI,MAHO;MAIrBV,EAAE,EAAEM,kBAAA,CAAUI,MAJO;MAKrBI,EAAE,EAAER,kBAAA,CAAUI;IALO,CAAhB;EAZmB,CAAhB;AA1DY,CAA1B;;eAgFe,IAAAK,gBAAA,EAAWC,eAAX,EAAmB;EAAE5B,IAAI,EAAE;AAAR,CAAnB,EAA8CvB,aAA9C,C"}
|
package/dist/Wizard/index.d.ts
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
export { default } from "./Wizard";
|
|
2
2
|
export * from "./Wizard";
|
|
3
|
+
|
|
4
|
+
export { default as HvWizardContainer } from "./WizardContainer";
|
|
5
|
+
export * from "./WizardContainer";
|
|
6
|
+
|
|
7
|
+
export { default as HvWizardTitle } from "./WizardTitle";
|
|
8
|
+
export * from "./WizardTitle";
|
|
9
|
+
|
|
10
|
+
export { default as HvWizardContent } from "./WizardContent";
|
|
11
|
+
export * from "./WizardContent";
|
|
12
|
+
|
|
13
|
+
export { default as HvWizardActions } from "./WizardActions";
|
|
14
|
+
export * from "./WizardActions";
|
|
15
|
+
|
|
16
|
+
export { default as HvWizardContext } from "./WizardContext";
|
|
17
|
+
export * from "./WizardContext";
|
package/dist/Wizard/index.js
CHANGED
|
@@ -29,6 +29,12 @@ Object.defineProperty(exports, "HvWizardContext", {
|
|
|
29
29
|
return _WizardContext.default;
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
|
+
Object.defineProperty(exports, "HvWizardContextProvider", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _WizardContextProvider.default;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
32
38
|
Object.defineProperty(exports, "HvWizardTitle", {
|
|
33
39
|
enumerable: true,
|
|
34
40
|
get: function get() {
|
|
@@ -53,4 +59,6 @@ var _WizardContent = _interopRequireDefault(require("./WizardContent"));
|
|
|
53
59
|
var _WizardActions = _interopRequireDefault(require("./WizardActions"));
|
|
54
60
|
|
|
55
61
|
var _WizardContext = _interopRequireDefault(require("./WizardContext"));
|
|
62
|
+
|
|
63
|
+
var _WizardContextProvider = _interopRequireDefault(require("./WizardContext/WizardContextProvider"));
|
|
56
64
|
//# sourceMappingURL=index.js.map
|
package/dist/Wizard/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/Wizard/index.js"],"sourcesContent":["export { default } from \"./Wizard\";\nexport { default as HvWizardContainer } from \"./WizardContainer\";\nexport { default as HvWizardTitle } from \"./WizardTitle\";\nexport { default as HvWizardContent } from \"./WizardContent\";\nexport { default as HvWizardActions } from \"./WizardActions\";\nexport { default as HvWizardContext } from \"./WizardContext\";\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/Wizard/index.js"],"sourcesContent":["export { default } from \"./Wizard\";\nexport { default as HvWizardContainer } from \"./WizardContainer\";\nexport { default as HvWizardTitle } from \"./WizardTitle\";\nexport { default as HvWizardContent } from \"./WizardContent\";\nexport { default as HvWizardActions } from \"./WizardActions\";\nexport { default as HvWizardContext } from \"./WizardContext\";\nexport { default as HvWizardContextProvider } from \"./WizardContext/WizardContextProvider\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA"}
|
package/dist/index.js
CHANGED
|
@@ -255,7 +255,19 @@ var _StepNavigation = _interopRequireDefault(require("./StepNavigation"));
|
|
|
255
255
|
|
|
256
256
|
var _ImageCarousel = _interopRequireDefault(require("./ImageCarousel"));
|
|
257
257
|
|
|
258
|
-
var _Wizard =
|
|
258
|
+
var _Wizard = _interopRequireWildcard(require("./Wizard"));
|
|
259
|
+
|
|
260
|
+
Object.keys(_Wizard).forEach(function (key) {
|
|
261
|
+
if (key === "default" || key === "__esModule") return;
|
|
262
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
263
|
+
if (key in exports && exports[key] === _Wizard[key]) return;
|
|
264
|
+
Object.defineProperty(exports, key, {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function get() {
|
|
267
|
+
return _Wizard[key];
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
});
|
|
259
271
|
|
|
260
272
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
261
273
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.js"],"sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvControls } from \"./Controls\";\nexport * from \"./Controls\";\nexport * from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvWizard } from \"./Wizard\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAFA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.js"],"sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvControls } from \"./Controls\";\nexport * from \"./Controls\";\nexport * from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAFA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
|