dynamic-mui 1.0.69 → 1.0.70
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/build/asset-manifest.json +3 -3
- package/build/index.html +1 -1
- package/build/static/js/main.c9bfd94c.js +185 -0
- package/build/static/js/{main.b9f075ec.js.LICENSE.txt → main.c9bfd94c.js.LICENSE.txt} +1 -1
- package/build/static/js/main.c9bfd94c.js.map +1 -0
- package/dist-modules/components/controls/Stepper/stepper.js +26 -22
- package/docs/asset-manifest.json +2 -2
- package/docs/build/bundle.7bf57cc2.js +184 -0
- package/docs/build/{bundle.036bacf5.js.LICENSE.txt → bundle.7bf57cc2.js.LICENSE.txt} +1 -1
- package/docs/index.html +1 -1
- package/package.json +7 -7
- package/build/static/js/main.b9f075ec.js +0 -185
- package/build/static/js/main.b9f075ec.js.map +0 -1
- package/docs/build/bundle.036bacf5.js +0 -184
|
@@ -156,27 +156,31 @@ function Stepper(_ref) {
|
|
|
156
156
|
// dispatch({ type: 'SET_STEPS', MuiSteps: newMuiSteps });
|
|
157
157
|
// }
|
|
158
158
|
}, [onChange]);
|
|
159
|
-
const renderStepButtons = (index, isScreenChange)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
159
|
+
const renderStepButtons = function (index, isScreenChange) {
|
|
160
|
+
let mandatoryIds = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
161
|
+
return /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
162
|
+
sx: {
|
|
163
|
+
mb: 2
|
|
164
|
+
}
|
|
165
|
+
}, /*#__PURE__*/_react.default.createElement(_material.Button, _extends({
|
|
166
|
+
variant: "contained",
|
|
167
|
+
onClick: () => handleStepChange('NEXT_STEP', isScreenChange, index === MuiSteps.length - 1),
|
|
168
|
+
disabled: mandatoryIds.some(id => !patch[id]),
|
|
169
|
+
sx: {
|
|
170
|
+
mt: 1,
|
|
171
|
+
mr: 1
|
|
172
|
+
}
|
|
173
|
+
}, attributes.MuiButtonAttributes.next, index === MuiSteps.length - 1 && {
|
|
174
|
+
...attributes.MuiButtonAttributes.final
|
|
175
|
+
}), index === MuiSteps.length - 1 ? 'Finish' : 'Continue'), /*#__PURE__*/_react.default.createElement(_material.Button, _extends({
|
|
176
|
+
disabled: index === 0,
|
|
177
|
+
onClick: () => handleStepChange('PREVIOUS_STEP', isScreenChange, false),
|
|
178
|
+
sx: {
|
|
179
|
+
mt: 1,
|
|
180
|
+
mr: 1
|
|
181
|
+
}
|
|
182
|
+
}, attributes.MuiButtonAttributes.back), "Back"));
|
|
183
|
+
};
|
|
180
184
|
return /*#__PURE__*/_react.default.createElement(_material.Box, _extends({
|
|
181
185
|
sx: {
|
|
182
186
|
maxWidth: 400
|
|
@@ -193,7 +197,7 @@ function Stepper(_ref) {
|
|
|
193
197
|
}, attributes.MuiStepLabelAttributes), step.label), /*#__PURE__*/_react.default.createElement(_material.StepContent, attributes.MuiStepContentAttributes, step.components ? /*#__PURE__*/_react.default.createElement(_stepperComponents.default, {
|
|
194
198
|
onUpdate: handleUpdate,
|
|
195
199
|
components: (0, _helper.updatePatchData)(step.components, stepperResponse, attributes.id, response)
|
|
196
|
-
}) : /*#__PURE__*/_react.default.createElement(_material.Typography, null, step.description), renderStepButtons(index, step.isScreenChange))))));
|
|
200
|
+
}) : /*#__PURE__*/_react.default.createElement(_material.Typography, null, step.description), renderStepButtons(index, step.isScreenChange, step.mandatoryIds))))));
|
|
197
201
|
}
|
|
198
202
|
Stepper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
199
203
|
attributes: _propTypes.default.shape({
|
package/docs/asset-manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.js": "/DinakaranS/-dynamic-mui/build/bundle.
|
|
3
|
+
"main.js": "/DinakaranS/-dynamic-mui/build/bundle.7bf57cc2.js",
|
|
4
4
|
"index.html": "/DinakaranS/-dynamic-mui/index.html"
|
|
5
5
|
},
|
|
6
6
|
"entrypoints": [
|
|
7
|
-
"build/bundle.
|
|
7
|
+
"build/bundle.7bf57cc2.js"
|
|
8
8
|
]
|
|
9
9
|
}
|