@wix/form-public 0.524.0 → 0.525.0
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.cjs +5 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -54146,17 +54146,16 @@ var hasDropdown = (field, isMobile2) => {
|
|
|
54146
54146
|
}
|
|
54147
54147
|
return DROPDOWN_FIELD_TYPES.includes(field.fieldType);
|
|
54148
54148
|
};
|
|
54149
|
-
var isOpenableDropdown = (field, isMobile2) => hasDropdown(field, isMobile2) && !field.properties.
|
|
54150
|
-
var byLayoutPosition = (first2, second) => first2.layout.row - second.layout.row || first2.layout.column - second.layout.column;
|
|
54149
|
+
var isOpenableDropdown = (field, isMobile2) => hasDropdown(field, isMobile2) && !field.properties.disabled && !field.properties.readOnly;
|
|
54151
54150
|
var useIsForcedOpenDropdown = (fieldId) => {
|
|
54152
54151
|
const isOpenState = useElementProps().dropdown?.open === true;
|
|
54153
54152
|
const formView = useContext(FormViewContext);
|
|
54154
54153
|
const { isMobile: isMobile2 = false } = useConfig();
|
|
54155
|
-
const
|
|
54154
|
+
const openableDropdownIds = useMemo(() => formView && !formView.parentId ? formView.fields.filter((field) => isOpenableDropdown(field, isMobile2)).map((field) => field.id) : [], [
|
|
54156
54155
|
formView,
|
|
54157
54156
|
isMobile2
|
|
54158
54157
|
]);
|
|
54159
|
-
return isOpenState &&
|
|
54158
|
+
return isOpenState && openableDropdownIds.includes(fieldId);
|
|
54160
54159
|
};
|
|
54161
54160
|
var UNLIMITED_ROWS = Infinity;
|
|
54162
54161
|
var MAX_HEIGHT_PROBE_STYLE = {
|
|
@@ -61271,11 +61270,11 @@ var SignaturePad = class _SignaturePad extends SignatureEventTarget {
|
|
|
61271
61270
|
var useId2 = typeof React173.useId === "function" ? React173.useId : () => useRef(generateUUID()).current;
|
|
61272
61271
|
var hasUploadTab = ({ properties }) => properties.uploadEnabled === true;
|
|
61273
61272
|
var isForceableSignature = (field, mode) => field.fieldType === FIELD_TYPES.SIGNATURE && !field.properties.hidden && !field.properties.disabled && !field.properties.readOnly && (mode !== "upload" || hasUploadTab(field));
|
|
61274
|
-
var
|
|
61273
|
+
var byLayoutPosition = (first2, second) => first2.layout.row - second.layout.row || first2.layout.column - second.layout.column;
|
|
61275
61274
|
var useForcedSignatureMode = (fieldId) => {
|
|
61276
61275
|
const forcedMode = useElementProps().signatureContainer?.signatureMode;
|
|
61277
61276
|
const formView = useContext(FormViewContext);
|
|
61278
|
-
const firstSignatureId = useMemo(() => formView && !formView.parentId && forcedMode ? formView.fields.filter((field) => isForceableSignature(field, forcedMode)).sort(
|
|
61277
|
+
const firstSignatureId = useMemo(() => formView && !formView.parentId && forcedMode ? formView.fields.filter((field) => isForceableSignature(field, forcedMode)).sort(byLayoutPosition)[0]?.id : void 0, [
|
|
61279
61278
|
formView,
|
|
61280
61279
|
forcedMode
|
|
61281
61280
|
]);
|