dynamic-mui 1.0.41 → 1.0.43
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.f4aff917.js → main.7ce6ae00.js} +3 -3
- package/build/static/js/{main.f4aff917.js.map → main.7ce6ae00.js.map} +1 -1
- package/dist-modules/components/controls/Stepper/stepper.js +2 -2
- package/dist-modules/util/helper.js +22 -16
- package/docs/asset-manifest.json +2 -7
- package/docs/build/bundle.b84aecd9.js +2 -0
- package/docs/build/{2.8784a577.js.LICENSE.txt → bundle.b84aecd9.js.LICENSE.txt} +6 -9
- package/docs/index.html +1 -3
- package/package.json +1 -1
- package/docs/build/2.8784a577.js +0 -127507
- package/docs/build/bundle.2d61df25.js +0 -1
- package/docs/build/main.5b2b2fe7.js +0 -2300
- /package/build/static/js/{main.f4aff917.js.LICENSE.txt → main.7ce6ae00.js.LICENSE.txt} +0 -0
|
@@ -76,7 +76,7 @@ function Stepper(_ref) {
|
|
|
76
76
|
if (isLastStep) {
|
|
77
77
|
onChange === null || onChange === void 0 || onChange({
|
|
78
78
|
id: attributes.id,
|
|
79
|
-
value: stepperResponse
|
|
79
|
+
value: stepperResponse[attributes.id] || {}
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
};
|
|
@@ -130,7 +130,7 @@ function Stepper(_ref) {
|
|
|
130
130
|
}, attributes.MuiStepLabelOptionalLabel || 'Last step')
|
|
131
131
|
}, attributes.MuiStepLabelAttributes), step.label), /*#__PURE__*/_react.default.createElement(_StepContent.default, attributes.MuiStepContentAttributes, step.components ? /*#__PURE__*/_react.default.createElement(_stepperComponents.default, {
|
|
132
132
|
onUpdate: handleUpdate,
|
|
133
|
-
components: (0, _helper.updatePatchData)(step.components, stepperResponse[attributes.id], attributes.id, stepperResponse)
|
|
133
|
+
components: (0, _helper.updatePatchData)(step.components, stepperResponse[attributes.id] || {}, attributes.id, stepperResponse || {})
|
|
134
134
|
}) : /*#__PURE__*/_react.default.createElement(_Typography.default, null, step.description), renderStepButtons(index, step.isScreenChange))))));
|
|
135
135
|
}
|
|
136
136
|
Stepper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -79,22 +79,28 @@ function isEmptyCustom(value) {
|
|
|
79
79
|
value.constructor === Object && Object.keys(value).length === 0
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
|
-
const updatePatchData = (fields, patch, guid
|
|
83
|
-
response[
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
82
|
+
const updatePatchData = function (fields, patch, guid) {
|
|
83
|
+
let response = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
84
|
+
try {
|
|
85
|
+
response[guid] = patch;
|
|
86
|
+
const formData = Object.assign([], fields);
|
|
87
|
+
return (0, _lodash.map)(formData, field => {
|
|
88
|
+
var _newField$props;
|
|
89
|
+
const newField = {
|
|
90
|
+
...field
|
|
91
|
+
};
|
|
92
|
+
const id = (newField === null || newField === void 0 ? void 0 : newField.id) || (newField === null || newField === void 0 || (_newField$props = newField.props) === null || _newField$props === void 0 ? void 0 : _newField$props.id);
|
|
93
|
+
if (id && response[guid] && !isEmptyCustom(response[guid][id])) {
|
|
94
|
+
const defaultValue = (newField === null || newField === void 0 ? void 0 : newField.type) === 'switch' || (newField === null || newField === void 0 ? void 0 : newField.type) === 'checkbox' ? false : '';
|
|
95
|
+
newField.props.value = response[guid][id] || defaultValue;
|
|
96
|
+
}
|
|
97
|
+
return newField;
|
|
98
|
+
});
|
|
99
|
+
} catch (e) {
|
|
100
|
+
// eslint-disable-next-line no-console
|
|
101
|
+
console.log(e);
|
|
102
|
+
return fields;
|
|
103
|
+
}
|
|
98
104
|
};
|
|
99
105
|
exports.updatePatchData = updatePatchData;
|
|
100
106
|
const DateComponent = name => {
|
package/docs/asset-manifest.json
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
|
-
"main.js": "/DinakaranS/-dynamic-mui/build/
|
|
4
|
-
"runtime-main.js": "/DinakaranS/-dynamic-mui/build/bundle.2d61df25.js",
|
|
5
|
-
"build/2.8784a577.js": "/DinakaranS/-dynamic-mui/build/2.8784a577.js",
|
|
6
|
-
"build/2.8784a577.js.LICENSE.txt": "/DinakaranS/-dynamic-mui/build/2.8784a577.js.LICENSE.txt",
|
|
3
|
+
"main.js": "/DinakaranS/-dynamic-mui/build/bundle.b84aecd9.js",
|
|
7
4
|
"index.html": "/DinakaranS/-dynamic-mui/index.html"
|
|
8
5
|
},
|
|
9
6
|
"entrypoints": [
|
|
10
|
-
"build/bundle.
|
|
11
|
-
"build/2.8784a577.js",
|
|
12
|
-
"build/main.5b2b2fe7.js"
|
|
7
|
+
"build/bundle.b84aecd9.js"
|
|
13
8
|
]
|
|
14
9
|
}
|