@bigbinary/neeto-form-frontend 4.4.32 → 4.4.33
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/app/javascript/src/translations/en.json +3 -0
- package/dist/.ready +1 -1
- package/dist/BuildForm.js +34 -4
- package/dist/BuildForm.js.map +1 -1
- package/dist/ExternalForm.js +2 -2
- package/dist/UrlBuilder.js +2 -2
- package/dist/cjs/BuildForm.js +34 -4
- package/dist/cjs/BuildForm.js.map +1 -1
- package/dist/cjs/ExternalForm.js +2 -2
- package/dist/cjs/UrlBuilder.js +2 -2
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/{utils-BGOMnbfz.js → utils-Xnit8PUn.js} +2 -2
- package/dist/cjs/{utils-BGOMnbfz.js.map → utils-Xnit8PUn.js.map} +1 -1
- package/dist/cjs/v2/BuildForm.js +34 -4
- package/dist/cjs/v2/BuildForm.js.map +1 -1
- package/dist/cjs/v2/ExternalForm.js +2 -2
- package/dist/cjs/v2/UrlBuilder.js +2 -2
- package/dist/cjs/v2/index.js +2 -2
- package/dist/cjs/v2/{utils-Del875LZ.js → utils-DO12kVcq.js} +2 -2
- package/dist/cjs/v2/{utils-Del875LZ.js.map → utils-DO12kVcq.js.map} +1 -1
- package/dist/cjs/v2/{yup-7xdcVVow.js → yup-DH3aFnam.js} +5 -2
- package/dist/cjs/v2/yup-DH3aFnam.js.map +1 -0
- package/dist/cjs/{yup-ClZ8UAn4.js → yup-DZgfXVgs.js} +5 -2
- package/dist/cjs/yup-DZgfXVgs.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/{utils-DJxVM1eN.js → utils-Chj7ZOKi.js} +2 -2
- package/dist/{utils-DJxVM1eN.js.map → utils-Chj7ZOKi.js.map} +1 -1
- package/dist/v2/BuildForm.js +34 -4
- package/dist/v2/BuildForm.js.map +1 -1
- package/dist/v2/ExternalForm.js +2 -2
- package/dist/v2/UrlBuilder.js +2 -2
- package/dist/v2/index.js +2 -2
- package/dist/v2/{utils-DsxkYUMo.js → utils-CW12NXEG.js} +2 -2
- package/dist/v2/{utils-DsxkYUMo.js.map → utils-CW12NXEG.js.map} +1 -1
- package/dist/v2/{yup-Ddfa0GAg.js → yup-Cddsv0mm.js} +5 -2
- package/dist/v2/yup-Cddsv0mm.js.map +1 -0
- package/dist/{yup-5EabgWxl.js → yup-CwN-8JrO.js} +5 -2
- package/dist/yup-CwN-8JrO.js.map +1 -0
- package/package.json +3 -3
- package/types.d.ts +4 -0
- package/dist/cjs/v2/yup-7xdcVVow.js.map +0 -1
- package/dist/cjs/yup-ClZ8UAn4.js.map +0 -1
- package/dist/v2/yup-Ddfa0GAg.js.map +0 -1
- package/dist/yup-5EabgWxl.js.map +0 -1
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"required": "Required",
|
|
27
27
|
"hideQuestion": "Hide question",
|
|
28
28
|
"readOnly": "Read-only",
|
|
29
|
+
"sendSmsUpdates": "Send SMS updates",
|
|
29
30
|
"responseVisibleOnlyToHost": "Response visible only to host",
|
|
30
31
|
"invalidURL": "Invalid URL",
|
|
31
32
|
"generateLink": "Generate link",
|
|
@@ -145,6 +146,8 @@
|
|
|
145
146
|
"fieldCodeHelpDescription": "If you change the field code, any existing shared links containing the old field code as query parameter, will not work correctly. <Link>View help article</Link> for more information.",
|
|
146
147
|
"questionType": "Question type",
|
|
147
148
|
"hideQuestionHelpDescription": "When enabled, this question will not be visible in the created form. It can be used to track \"reference ids\" and UTM parameters.",
|
|
149
|
+
"sendSmsUpdatesHelpDescription": "When enabled, SMS notifications will be sent to this number.",
|
|
150
|
+
"sendSmsUpdatesIntegrationNote": "An SMS integration must be connected to send SMS notifications.",
|
|
148
151
|
"responseVisibleOnlyToHostHelpDescription": "When enabled, the response to this question will only be visible to the host",
|
|
149
152
|
"readOnlyHelpDescription": "When enabled, the client will only be able to see the answer of this question, but will not be able to change the answer of this question. Since you are marking this question as \"read-only\". You should pre-fill the question with an answer.",
|
|
150
153
|
"fitImagesHelpDescription": "When enabled, images zoom to fill the entire space (some edges may get cut off). When disabled, the complete image is shown (may have empty space around it).",
|
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-07-
|
|
1
|
+
Built at 2026-07-17T07:49:56.167Z
|
package/dist/BuildForm.js
CHANGED
|
@@ -4,7 +4,7 @@ import { isPresent, truncate, findBy, isNotPresent, slugify, existsBy, findById,
|
|
|
4
4
|
import Spinner from '@bigbinary/neetoui/Spinner';
|
|
5
5
|
import { equals, path, when, assoc, includes, isEmpty, reject, keys, pick, omit, evolve, map, mergeLeft, isNil, pipe, filter, isNotNil, values, uniq, join, pathSatisfies, assocPath, dissoc, append, pluck, test, paths, difference, prop, startsWith, split, last, either, F, T } from 'ramda';
|
|
6
6
|
import { k as useDeleteQuestion, Q as QUESTION_TYPES, b as useForm, l as useCreateQuestion, m as useUpdateQuestion, C as CAPTCHA_TYPES, n as useReorderQuestions, i as QUERY_KEYS } from './constants-fjoeNdhb.js';
|
|
7
|
-
import { j as QUESTION_ACTIONS, k as INDEPENDENT_LABELS_MAP, l as buildDisplayLabel, m as isElementOverflowing, n as SELECTABLE_KINDS, o as isAutoGeneratedQuestion, p as isRichTextQuestion, q as SPOT_QUESTION_FIELD_CODE, N as NON_BASIC_LATIN_CHARACTERS_REGEX, r as RESERVED_FIELD_CODES, s as renameKey, f as LABEL_FIELDS, t as isDefaultLanguage, u as buildAddQuestionButtonProps, v as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, M as MIN_WORDS_SWITCH_LABEL_PROPS, w as MIN_WORDS, x as isImmutableField, a as QUESTIONS_WITHOUT_FIELD_CODE, y as NON_HIDEABLE_FIELDS, z as NON_READ_ONLY_FIELDS, O as OPINION_LABEL_MAX_LENGTH, B as RICH_TEXT_QUESTIONS, e as ADDRESS_FIELD_WIDTHS, A as ADDRESS_FIELD_TYPES, G as generateDefaultOptions, H as MINIMUM_ADDRESS_FIELDS, J as getDeletedRecords, K as randomId, T as getActiveRecords, U as FILE_TYPES_MAP, V as FILE_GROUPS, W as OPINION_SCALE_MIN_VALUE_OPTIONS, X as OPINION_SCALE_MAX_VALUE_OPTIONS, D as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, Y as MINIMUM_OPTIONS, Z as IMAGE_HEIGHT_SLIDER_DEFAULTS, _ as RATING_OPTIONS, $ as STAR_RATING_MIN_VALUE_OPTIONS, a0 as STAR_RATING_MAX_VALUE_OPTIONS, a1 as STAR_RATING_ICONS_MAP, a2 as buildDisabledAddButtonHelpPopoverProps, a3 as buildReorderPayload, a4 as QUESTIONS_INITIAL_VALUE, a5 as isMandatoryField, a6 as QUESTION_KINDS, Q as QUESTION_KIND, a7 as getActiveQuestionKindDetails, a8 as DEFAULT_AVAILABLE_LANGUAGES, a9 as DEFAULT_ADVANCED_FEATURES } from './yup-
|
|
7
|
+
import { j as QUESTION_ACTIONS, k as INDEPENDENT_LABELS_MAP, l as buildDisplayLabel, m as isElementOverflowing, n as SELECTABLE_KINDS, o as isAutoGeneratedQuestion, p as isRichTextQuestion, q as SPOT_QUESTION_FIELD_CODE, N as NON_BASIC_LATIN_CHARACTERS_REGEX, r as RESERVED_FIELD_CODES, s as renameKey, f as LABEL_FIELDS, t as isDefaultLanguage, u as buildAddQuestionButtonProps, v as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, M as MIN_WORDS_SWITCH_LABEL_PROPS, w as MIN_WORDS, x as isImmutableField, a as QUESTIONS_WITHOUT_FIELD_CODE, y as NON_HIDEABLE_FIELDS, z as NON_READ_ONLY_FIELDS, O as OPINION_LABEL_MAX_LENGTH, B as RICH_TEXT_QUESTIONS, e as ADDRESS_FIELD_WIDTHS, A as ADDRESS_FIELD_TYPES, G as generateDefaultOptions, H as MINIMUM_ADDRESS_FIELDS, J as getDeletedRecords, K as randomId, T as getActiveRecords, U as FILE_TYPES_MAP, V as FILE_GROUPS, W as OPINION_SCALE_MIN_VALUE_OPTIONS, X as OPINION_SCALE_MAX_VALUE_OPTIONS, D as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, Y as MINIMUM_OPTIONS, Z as IMAGE_HEIGHT_SLIDER_DEFAULTS, _ as RATING_OPTIONS, $ as STAR_RATING_MIN_VALUE_OPTIONS, a0 as STAR_RATING_MAX_VALUE_OPTIONS, a1 as STAR_RATING_ICONS_MAP, a2 as buildDisabledAddButtonHelpPopoverProps, a3 as buildReorderPayload, a4 as QUESTIONS_INITIAL_VALUE, a5 as isMandatoryField, a6 as QUESTION_KINDS, Q as QUESTION_KIND, a7 as getActiveQuestionKindDetails, a8 as DEFAULT_AVAILABLE_LANGUAGES, a9 as DEFAULT_ADVANCED_FEATURES } from './yup-CwN-8JrO.js';
|
|
8
8
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
9
9
|
import { useState, useRef, useEffect, createElement } from 'react';
|
|
10
10
|
import { Droppable, Draggable, DragDropContext } from '@hello-pangea/dnd';
|
|
@@ -1182,6 +1182,7 @@ var Form$1 = function Form(_ref) {
|
|
|
1182
1182
|
errors = _useFormikContext.errors,
|
|
1183
1183
|
submitCount = _useFormikContext.submitCount;
|
|
1184
1184
|
var hideQuestionHelpDocUrl = useHelpDoc("hideQuestion");
|
|
1185
|
+
var sendSmsUpdatesHelpDocUrl = useHelpDoc("smsUpdates");
|
|
1185
1186
|
var readOnlyHelpDocUrl = useHelpDoc("readOnly");
|
|
1186
1187
|
var responseVisibleOnlyToHostHelpDocUrl = useHelpDoc("responseVisibleOnlyToHost");
|
|
1187
1188
|
var _useBuildFormStore = useBuildFormStore(function (store) {
|
|
@@ -1200,7 +1201,10 @@ var Form$1 = function Form(_ref) {
|
|
|
1200
1201
|
var isFieldCodeEnabled = advancedFeatures.fieldCode,
|
|
1201
1202
|
markResponsesAsReadOnly = advancedFeatures.markResponsesAsReadOnly,
|
|
1202
1203
|
restrictResponseVisibilityToHost = advancedFeatures.restrictResponseVisibilityToHost,
|
|
1203
|
-
enforceMinWordsInMultiLineTexts = advancedFeatures.enforceMinWordsInMultiLineTexts
|
|
1204
|
+
enforceMinWordsInMultiLineTexts = advancedFeatures.enforceMinWordsInMultiLineTexts,
|
|
1205
|
+
showSmsUpdatesToggle = advancedFeatures.smsUpdates,
|
|
1206
|
+
isSmsUpdatesDisabled = advancedFeatures.smsUpdatesDisabled,
|
|
1207
|
+
isSmsUpdatesEnabledByDefault = advancedFeatures.smsUpdatesEnabledByDefault;
|
|
1204
1208
|
var kind = values.kind;
|
|
1205
1209
|
var questionKinds = isEdit ? allQuestionKinds : availableQuestionKinds;
|
|
1206
1210
|
var questionKindUniquenessPattern = mergeLeft(isEdit && kindUniqueOn ? kindUniqueOn(values) : {}, {
|
|
@@ -1228,9 +1232,10 @@ var Form$1 = function Form(_ref) {
|
|
|
1228
1232
|
var canRestrictResponseVisibilityToHost = restrictResponseVisibilityToHost && !includes(kind, NON_HIDEABLE_FIELDS);
|
|
1229
1233
|
var canMarkResponsesAsReadOnly = markResponsesAsReadOnly && !includes(kind, NON_READ_ONLY_FIELDS);
|
|
1230
1234
|
var isTextarea = kind === QUESTION_TYPES.TEXTAREA;
|
|
1235
|
+
var shouldShowSendSmsUpdatesSwitch = kind === QUESTION_TYPES.PHONE && showSmsUpdatesToggle;
|
|
1231
1236
|
var isBasicSettingsVisible = !isRequired && (!isImmutable || shouldShowHideSwitch);
|
|
1232
1237
|
var shouldShowRequiredSwitch = isBasicSettingsVisible && !isImmutable && !includes(kind, [QUESTION_TYPES.PARAGRAPH, QUESTION_TYPES.ADDRESS, QUESTION_TYPES.SPOT]);
|
|
1233
|
-
var isSettingsBlockVisible = kind !== QUESTION_TYPES.SPOT && (isBasicSettingsVisible || canMarkResponsesAsReadOnly || isTextarea);
|
|
1238
|
+
var isSettingsBlockVisible = kind !== QUESTION_TYPES.SPOT && (isBasicSettingsVisible || canMarkResponsesAsReadOnly || isTextarea || shouldShowSendSmsUpdatesSwitch);
|
|
1234
1239
|
var handleKindChange = function handleKindChange(option) {
|
|
1235
1240
|
var data = buildQuestionData(option);
|
|
1236
1241
|
updateFormState(data);
|
|
@@ -1246,13 +1251,17 @@ var Form$1 = function Form(_ref) {
|
|
|
1246
1251
|
type: kind,
|
|
1247
1252
|
label: label
|
|
1248
1253
|
});
|
|
1249
|
-
|
|
1254
|
+
var data = createFieldData({
|
|
1250
1255
|
kind: questionKind,
|
|
1251
1256
|
isRequired: isRequired,
|
|
1252
1257
|
questions: questions,
|
|
1253
1258
|
selectedLanguage: selectedLanguage,
|
|
1254
1259
|
isUsingDefaultQuestionKinds: isUsingDefaultQuestionKinds
|
|
1255
1260
|
});
|
|
1261
|
+
if (kind === QUESTION_TYPES.PHONE && showSmsUpdatesToggle) {
|
|
1262
|
+
data.sendSmsUpdates = Boolean(isSmsUpdatesEnabledByDefault);
|
|
1263
|
+
}
|
|
1264
|
+
return data;
|
|
1256
1265
|
};
|
|
1257
1266
|
var updateFormState = function updateFormState(data) {
|
|
1258
1267
|
setValues(data);
|
|
@@ -1312,6 +1321,11 @@ var Form$1 = function Form(_ref) {
|
|
|
1312
1321
|
name: "isResponseVisibleOnlyToHost",
|
|
1313
1322
|
labelProps: responseVisibleOnlyToHostSwitchLabelProps(responseVisibleOnlyToHostHelpDocUrl)
|
|
1314
1323
|
})]
|
|
1324
|
+
}), shouldShowSendSmsUpdatesSwitch && /*#__PURE__*/jsx(Switch, {
|
|
1325
|
+
disabled: isSmsUpdatesDisabled,
|
|
1326
|
+
label: t("neetoForm.common.sendSmsUpdates"),
|
|
1327
|
+
name: "sendSmsUpdates",
|
|
1328
|
+
labelProps: sendSmsUpdatesSwitchLabelProps(sendSmsUpdatesHelpDocUrl)
|
|
1315
1329
|
}), canMarkResponsesAsReadOnly && /*#__PURE__*/jsx(Switch, {
|
|
1316
1330
|
label: t("neetoForm.common.readOnly"),
|
|
1317
1331
|
labelProps: readOnlySwitchLabelProps(readOnlyHelpDocUrl),
|
|
@@ -2846,6 +2860,22 @@ var hideSwitchLabelProps = function hideSwitchLabelProps(helpUrl) {
|
|
|
2846
2860
|
}
|
|
2847
2861
|
} : undefined;
|
|
2848
2862
|
};
|
|
2863
|
+
var sendSmsUpdatesSwitchLabelProps = function sendSmsUpdatesSwitchLabelProps(helpUrl) {
|
|
2864
|
+
return helpUrl ? {
|
|
2865
|
+
helpIconProps: {
|
|
2866
|
+
"data-testid": "help-popover-button",
|
|
2867
|
+
popoverProps: {
|
|
2868
|
+
description: /*#__PURE__*/jsxs(Fragment, {
|
|
2869
|
+
children: [t("neetoForm.questions.common.questionFields.field.sendSmsUpdatesHelpDescription"), /*#__PURE__*/jsx("br", {}), t("neetoForm.questions.common.questionFields.field.sendSmsUpdatesIntegrationNote")]
|
|
2870
|
+
}),
|
|
2871
|
+
helpLinkProps: {
|
|
2872
|
+
href: helpUrl,
|
|
2873
|
+
label: t("neetoForm.common.viewHelpArticle")
|
|
2874
|
+
}
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
} : undefined;
|
|
2878
|
+
};
|
|
2849
2879
|
var responseVisibleOnlyToHostSwitchLabelProps = function responseVisibleOnlyToHostSwitchLabelProps(helpUrl) {
|
|
2850
2880
|
return {
|
|
2851
2881
|
helpIconProps: {
|