@elementor/editor-variables 3.32.0-54 → 3.32.0-56
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/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/components/variable-creation.tsx +2 -0
- package/src/components/variable-edit.tsx +2 -0
- package/src/components/variable-restore.tsx +2 -0
- package/src/variables-registry/create-variable-type-registry.ts +2 -1
package/dist/index.mjs
CHANGED
|
@@ -991,6 +991,7 @@ var SIZE = "tiny";
|
|
|
991
991
|
var VariableCreation = ({ onGoBack, onClose }) => {
|
|
992
992
|
const { icon: VariableIcon, valueField: ValueField, variableType, propTypeUtil } = useVariableType();
|
|
993
993
|
const { setValue: setVariable, path } = useBoundProp3(propTypeUtil);
|
|
994
|
+
const { propType } = useBoundProp3();
|
|
994
995
|
const initialValue = useInitialValue();
|
|
995
996
|
const [value, setValue] = useState4(initialValue);
|
|
996
997
|
const [label, setLabel] = useState4("");
|
|
@@ -1072,7 +1073,8 @@ var VariableCreation = ({ onGoBack, onClose }) => {
|
|
|
1072
1073
|
setErrorMessage("");
|
|
1073
1074
|
setValueFieldError("");
|
|
1074
1075
|
},
|
|
1075
|
-
onValidationChange: setValueFieldError
|
|
1076
|
+
onValidationChange: setValueFieldError,
|
|
1077
|
+
propType
|
|
1076
1078
|
}
|
|
1077
1079
|
)), errorMessage && /* @__PURE__ */ React10.createElement(FormHelperText2, { error: true }, errorMessage)), /* @__PURE__ */ React10.createElement(CardActions, { sx: { pt: 0.5, pb: 1 } }, /* @__PURE__ */ React10.createElement(Button2, { size: "small", variant: "contained", disabled: isSubmitDisabled, onClick: handleCreateAndTrack }, __7("Create", "elementor"))));
|
|
1078
1080
|
};
|
|
@@ -1164,6 +1166,7 @@ var SIZE2 = "tiny";
|
|
|
1164
1166
|
var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
1165
1167
|
const { icon: VariableIcon, valueField: ValueField, variableType, propTypeUtil } = useVariableType();
|
|
1166
1168
|
const { setValue: notifyBoundPropChange, value: assignedValue } = useBoundProp4(propTypeUtil);
|
|
1169
|
+
const { propType } = useBoundProp4();
|
|
1167
1170
|
const [isMessageSuppressed, suppressMessage] = useSuppressedMessage(EDIT_CONFIRMATION_DIALOG_ID);
|
|
1168
1171
|
const [deleteConfirmation, setDeleteConfirmation] = useState6(false);
|
|
1169
1172
|
const [editConfirmation, setEditConfirmation] = useState6(false);
|
|
@@ -1303,7 +1306,8 @@ var VariableEdit = ({ onClose, onGoBack, onSubmit, editId }) => {
|
|
|
1303
1306
|
setErrorMessage("");
|
|
1304
1307
|
setValueFieldError("");
|
|
1305
1308
|
},
|
|
1306
|
-
onValidationChange: setValueFieldError
|
|
1309
|
+
onValidationChange: setValueFieldError,
|
|
1310
|
+
propType
|
|
1307
1311
|
}
|
|
1308
1312
|
)), errorMessage && /* @__PURE__ */ React13.createElement(FormHelperText3, { error: true }, errorMessage)), /* @__PURE__ */ React13.createElement(CardActions2, { sx: { pt: 0.5, pb: 1 } }, /* @__PURE__ */ React13.createElement(Button5, { size: "small", variant: "contained", disabled: isSubmitDisabled, onClick: handleUpdate }, __10("Save", "elementor")))), deleteConfirmation && /* @__PURE__ */ React13.createElement(
|
|
1309
1313
|
DeleteConfirmationDialog,
|
|
@@ -1749,6 +1753,7 @@ var SIZE6 = "tiny";
|
|
|
1749
1753
|
var VariableRestore = ({ variableId, onClose, onSubmit }) => {
|
|
1750
1754
|
const { icon: VariableIcon, valueField: ValueField, variableType, propTypeUtil } = useVariableType();
|
|
1751
1755
|
const { setValue: notifyBoundPropChange } = useBoundProp7(propTypeUtil);
|
|
1756
|
+
const { propType } = useBoundProp7();
|
|
1752
1757
|
const variable = useVariable(variableId);
|
|
1753
1758
|
if (!variable) {
|
|
1754
1759
|
throw new Error(`Global ${variableType} variable not found`);
|
|
@@ -1820,7 +1825,8 @@ var VariableRestore = ({ variableId, onClose, onSubmit }) => {
|
|
|
1820
1825
|
setErrorMessage("");
|
|
1821
1826
|
setValueFieldError("");
|
|
1822
1827
|
},
|
|
1823
|
-
onValidationChange: setValueFieldError
|
|
1828
|
+
onValidationChange: setValueFieldError,
|
|
1829
|
+
propType
|
|
1824
1830
|
}
|
|
1825
1831
|
)), errorMessage && /* @__PURE__ */ React21.createElement(FormHelperText4, { error: true }, errorMessage)), /* @__PURE__ */ React21.createElement(CardActions3, { sx: { pt: 0.5, pb: 1 } }, /* @__PURE__ */ React21.createElement(Button7, { size: "small", variant: "contained", disabled: isSubmitDisabled, onClick: handleRestore }, __16("Restore", "elementor")))));
|
|
1826
1832
|
};
|