@bigbinary/neeto-form-frontend 4.4.18 → 4.4.19
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/README.md +1 -1
- package/app/javascript/src/translations/ar.json +8 -2
- package/app/javascript/src/translations/bg.json +8 -2
- package/app/javascript/src/translations/ca.json +8 -2
- package/app/javascript/src/translations/cs.json +8 -2
- package/app/javascript/src/translations/da.json +8 -2
- package/app/javascript/src/translations/de.json +8 -2
- package/app/javascript/src/translations/en.json +7 -1
- package/app/javascript/src/translations/es-MX.json +8 -2
- package/app/javascript/src/translations/es.json +8 -2
- package/app/javascript/src/translations/et.json +8 -2
- package/app/javascript/src/translations/fi.json +8 -2
- package/app/javascript/src/translations/fil.json +8 -2
- package/app/javascript/src/translations/fr.json +8 -2
- package/app/javascript/src/translations/he.json +8 -2
- package/app/javascript/src/translations/hi.json +8 -2
- package/app/javascript/src/translations/hr.json +8 -2
- package/app/javascript/src/translations/hu.json +8 -2
- package/app/javascript/src/translations/id.json +8 -2
- package/app/javascript/src/translations/it.json +8 -2
- package/app/javascript/src/translations/ja.json +8 -2
- package/app/javascript/src/translations/ko.json +8 -2
- package/app/javascript/src/translations/nl.json +8 -2
- package/app/javascript/src/translations/pl.json +8 -2
- package/app/javascript/src/translations/pt-BR.json +8 -2
- package/app/javascript/src/translations/pt.json +8 -2
- package/app/javascript/src/translations/ro.json +8 -2
- package/app/javascript/src/translations/ru.json +8 -2
- package/app/javascript/src/translations/sk.json +8 -2
- package/app/javascript/src/translations/sl.json +8 -2
- package/app/javascript/src/translations/sv.json +8 -2
- package/app/javascript/src/translations/th.json +8 -2
- package/app/javascript/src/translations/tr.json +8 -2
- package/app/javascript/src/translations/uk.json +8 -2
- package/app/javascript/src/translations/vi.json +8 -2
- package/app/javascript/src/translations/zh-CN.json +8 -2
- package/app/javascript/src/translations/zh-TW.json +8 -2
- package/dist/.ready +1 -1
- package/dist/BuildForm.js +96 -27
- package/dist/BuildForm.js.map +1 -1
- package/dist/ExternalForm.js +24 -2
- package/dist/ExternalForm.js.map +1 -1
- package/dist/UrlBuilder.js +24 -2
- package/dist/UrlBuilder.js.map +1 -1
- package/dist/cjs/BuildForm.js +96 -27
- package/dist/cjs/BuildForm.js.map +1 -1
- package/dist/cjs/ExternalForm.js +24 -2
- package/dist/cjs/ExternalForm.js.map +1 -1
- package/dist/cjs/UrlBuilder.js +24 -2
- package/dist/cjs/UrlBuilder.js.map +1 -1
- package/dist/cjs/index.js +25 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/index.js +25 -3
- package/dist/index.js.map +1 -1
- package/dist/{utils-H7u9B9Jq.js → utils-NwGbGewW.js} +2 -2
- package/dist/{utils-H7u9B9Jq.js.map → utils-NwGbGewW.js.map} +1 -1
- package/dist/{utils-QSMxxdQN.js → utils-rfqUlBlT.js} +2 -2
- package/dist/{utils-QSMxxdQN.js.map → utils-rfqUlBlT.js.map} +1 -1
- package/dist/{yup-B3JGBWm7.js → yup-CBPWSDXh.js} +67 -8
- package/dist/yup-CBPWSDXh.js.map +1 -0
- package/dist/{yup-DfKhsn0t.js → yup-COZendlM.js} +67 -8
- package/dist/yup-COZendlM.js.map +1 -0
- package/package.json +16 -16
- package/dist/yup-B3JGBWm7.js.map +0 -1
- package/dist/yup-DfKhsn0t.js.map +0 -1
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "Viacnásobný výber",
|
|
69
69
|
"scf": "Jednotný výber",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "Pokyny",
|
|
71
71
|
"drf": "Rozbaľovací zoznam",
|
|
72
72
|
"qif": "Viacriadkový text",
|
|
73
73
|
"nif": "Meno",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "Overovací kód bol odoslaný do vašej prichádzajúcej pošty. Neprišiel vám kód? <button>Znova odoslať overovací kód</button>",
|
|
282
282
|
"sendCode": "Odoslať kód",
|
|
283
283
|
"verificationCode": "Overovací kód"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "Pridajte odstavce, informácie alebo krátke poznámky do svojho formulára."
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "odstavec, informácie, krátke poznámky"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "Več izbire",
|
|
69
69
|
"scf": "Enojna izbira",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "Navodila",
|
|
71
71
|
"drf": "Spustni meni",
|
|
72
72
|
"qif": "Več vrstic besedila",
|
|
73
73
|
"nif": "Ime",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "Verifikacijska koda je bila poslana v vašo poštno shramba. Niste prejeli kode? <button>Ponovno pošlji verifikacijsko kodo</button>",
|
|
282
282
|
"sendCode": "Pošlji kodo",
|
|
283
283
|
"verificationCode": "Verifikacijska koda"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "Dodajte odstavke, informacije ali kratke opombe v svoj obrazec."
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "odstavek, informacije, kratke opombe"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "Flera val",
|
|
69
69
|
"scf": "Enkel val",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "Instruktioner",
|
|
71
71
|
"drf": "Rullgardinsmeny",
|
|
72
72
|
"qif": "Flera raders text",
|
|
73
73
|
"nif": "Namn",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "En verifieringskod har skickats till din inkorg. Fick du inte en kod? <button>Skicka verifieringskod igen</button>",
|
|
282
282
|
"sendCode": "Skicka kod",
|
|
283
283
|
"verificationCode": "Verifieringskod"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "Lägg till stycken, information eller korta anteckningar till ditt formulär."
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "stycke, information, korta anteckningar"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "ทางเลือกหลายทาง",
|
|
69
69
|
"scf": "ทางเลือกเดียว",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "คำแนะนำ",
|
|
71
71
|
"drf": "แบบเลื่อนลง",
|
|
72
72
|
"qif": "ข้อความหลายบรรทัด",
|
|
73
73
|
"nif": "ชื่อ",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "รหัสยืนยันได้ถูกส่งไปยังกล่องขาเข้าแล้ว ไม่ได้รับรหัส? <button>ส่งรหัสยืนยันซ้ำ</button>",
|
|
282
282
|
"sendCode": "ส่งรหัส",
|
|
283
283
|
"verificationCode": "รหัสยืนยัน"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "เพิ่มย่อหน้า ข้อมูล หรือบันทัดสั้นๆ ลงในแบบฟอร์มของคุณ。"
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "ย่อหน้า ข้อมูล บันทัดสั้นๆ"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "Çoklu seçim",
|
|
69
69
|
"scf": "Tek seçim",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "Talimatlar",
|
|
71
71
|
"drf": "Açılır menü",
|
|
72
72
|
"qif": "Birden fazla satır metin",
|
|
73
73
|
"nif": "İsim",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "Bir doğrulama kodu gelen kutunuza gönderildi. Kod almadınız mı? <button>Doğrulama kodunu yeniden gönder</button>",
|
|
282
282
|
"sendCode": "Kodu gönder",
|
|
283
283
|
"verificationCode": "Doğrulama kodu"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "Formunuza paragraflar, bilgi veya kısa notlar ekleyin."
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "paragraf, bilgi, kısa notlar"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "Багатократний вибір",
|
|
69
69
|
"scf": "Один вибір",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "Інструкції",
|
|
71
71
|
"drf": "Випадаючий список",
|
|
72
72
|
"qif": "Багаторядковий текст",
|
|
73
73
|
"nif": "Ім'я",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "Код перевірки надіслано на вашу поштову скриньку. Не отримали код? <button>Повторно надішліть код перевірки</button>",
|
|
282
282
|
"sendCode": "Надіслати код",
|
|
283
283
|
"verificationCode": "Код перевірки"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "Додайте абзаци, інформацію або короткі нотатки до вашої форми."
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "абзац, інформація, короткі нотатки"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "Lựa chọn nhiều",
|
|
69
69
|
"scf": "Lựa chọn đơn",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "Hướng dẫn",
|
|
71
71
|
"drf": "Danh sách xổ xuống",
|
|
72
72
|
"qif": "Văn bản nhiều dòng",
|
|
73
73
|
"nif": "Tên",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "Mã xác minh đã được gửi đến hộp thư của bạn. Chưa nhận được mã? <button>Gửi lại mã xác minh</button>",
|
|
282
282
|
"sendCode": "Gửi mã",
|
|
283
283
|
"verificationCode": "Mã xác minh"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "Thêm đoạn văn, thông tin hoặc ghi chú ngắn vào biểu mẫu của bạn."
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "đoạn văn, thông tin, ghi chú ngắn"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "多项选择",
|
|
69
69
|
"scf": "单项选择",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "说明",
|
|
71
71
|
"drf": "下拉菜单",
|
|
72
72
|
"qif": "多行文本",
|
|
73
73
|
"nif": "姓名",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "验证代码已发送到您的收件箱。没有收到代码? <button>重新发送验证代码</button>",
|
|
282
282
|
"sendCode": "发送代码",
|
|
283
283
|
"verificationCode": "验证代码"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "在表单中添加段落、信息或简短备注。"
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "段落,信息,短备注"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"fields": {
|
|
68
68
|
"mcf": "多選",
|
|
69
69
|
"scf": "單選",
|
|
70
|
-
"def": "
|
|
70
|
+
"def": "說明",
|
|
71
71
|
"drf": "下拉菜單",
|
|
72
72
|
"qif": "多行文本",
|
|
73
73
|
"nif": "姓名",
|
|
@@ -281,6 +281,12 @@
|
|
|
281
281
|
"resendCode": "驗證代碼已發送到您的收件箱。沒有收到代碼? <button>重新發送驗證代碼</button>",
|
|
282
282
|
"sendCode": "發送代碼",
|
|
283
283
|
"verificationCode": "驗證代碼"
|
|
284
|
+
},
|
|
285
|
+
"questionTooltips": {
|
|
286
|
+
"def": "在您的表單中加入段落、信息或簡短說明。"
|
|
287
|
+
},
|
|
288
|
+
"questionAliases": {
|
|
289
|
+
"def": "段落, 信息, 簡短說明"
|
|
284
290
|
}
|
|
285
291
|
}
|
|
286
|
-
}
|
|
292
|
+
}
|
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-
|
|
1
|
+
Built at 2026-05-08T05:05:46.191Z
|
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-Cj0XxE8a.js';
|
|
7
|
-
import { j as QUESTION_ACTIONS, k as INDEPENDENT_LABELS_MAP, l as buildDisplayLabel, m as isElementOverflowing, n as Drag, o as SELECTABLE_KINDS, p as isAutoGeneratedQuestion, q as isRichTextQuestion, r as SPOT_QUESTION_FIELD_CODE, N as NON_BASIC_LATIN_CHARACTERS_REGEX, s as RESERVED_FIELD_CODES, t as renameKey, f as LABEL_FIELDS, u as isDefaultLanguage, v as buildAddQuestionButtonProps, w as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, M as MIN_WORDS_SWITCH_LABEL_PROPS, x as MIN_WORDS, y as isImmutableField, Q as QUESTIONS_WITHOUT_FIELD_CODE, z as NON_HIDEABLE_FIELDS, B as NON_READ_ONLY_FIELDS, O as OPINION_LABEL_MAX_LENGTH, G as RICH_TEXT_QUESTIONS, e as ADDRESS_FIELD_WIDTHS, A as ADDRESS_FIELD_TYPES, H as generateDefaultOptions, J as MINIMUM_ADDRESS_FIELDS, K as getDeletedRecords, T as randomId, U as getActiveRecords, V as FILE_TYPES_MAP, W as FILE_GROUPS, X as OPINION_SCALE_MIN_VALUE_OPTIONS, Y as OPINION_SCALE_MAX_VALUE_OPTIONS, D as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, Z as MINIMUM_OPTIONS, _ as IMAGE_HEIGHT_SLIDER_DEFAULTS, $ as RATING_OPTIONS, a0 as STAR_RATING_MIN_VALUE_OPTIONS, a1 as STAR_RATING_MAX_VALUE_OPTIONS, a2 as STAR_RATING_ICONS_MAP, a3 as buildDisabledAddButtonHelpPopoverProps, a4 as buildReorderPayload, a5 as QUESTIONS_INITIAL_VALUE, a6 as isMandatoryField, a7 as QUESTION_KINDS, a as QUESTION_KIND, a8 as getActiveQuestionKindDetails, a9 as DEFAULT_AVAILABLE_LANGUAGES, aa 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 Drag, o as SELECTABLE_KINDS, p as isAutoGeneratedQuestion, q as isRichTextQuestion, r as SPOT_QUESTION_FIELD_CODE, N as NON_BASIC_LATIN_CHARACTERS_REGEX, s as RESERVED_FIELD_CODES, t as renameKey, f as LABEL_FIELDS, u as isDefaultLanguage, v as buildAddQuestionButtonProps, w as validateEditorContent, F as FIELD_CODES_REJECT_CHARS_REGEX, M as MIN_WORDS_SWITCH_LABEL_PROPS, x as MIN_WORDS, y as isImmutableField, Q as QUESTIONS_WITHOUT_FIELD_CODE, z as NON_HIDEABLE_FIELDS, B as NON_READ_ONLY_FIELDS, O as OPINION_LABEL_MAX_LENGTH, G as RICH_TEXT_QUESTIONS, e as ADDRESS_FIELD_WIDTHS, A as ADDRESS_FIELD_TYPES, H as generateDefaultOptions, J as MINIMUM_ADDRESS_FIELDS, K as getDeletedRecords, T as randomId, U as getActiveRecords, V as FILE_TYPES_MAP, W as FILE_GROUPS, X as OPINION_SCALE_MIN_VALUE_OPTIONS, Y as OPINION_SCALE_MAX_VALUE_OPTIONS, D as DEFAULT_CHOICE_QUESTION_ATTRIBUTES, Z as MINIMUM_OPTIONS, _ as IMAGE_HEIGHT_SLIDER_DEFAULTS, $ as RATING_OPTIONS, a0 as STAR_RATING_MIN_VALUE_OPTIONS, a1 as STAR_RATING_MAX_VALUE_OPTIONS, a2 as STAR_RATING_ICONS_MAP, a3 as buildDisabledAddButtonHelpPopoverProps, a4 as buildReorderPayload, a5 as QUESTIONS_INITIAL_VALUE, a6 as isMandatoryField, a7 as QUESTION_KINDS, a as QUESTION_KIND, a8 as getActiveQuestionKindDetails, a9 as DEFAULT_AVAILABLE_LANGUAGES, aa as DEFAULT_ADVANCED_FEATURES } from './yup-CBPWSDXh.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';
|
|
@@ -58,6 +58,28 @@ import Slider from '@bigbinary/neetoui/Slider';
|
|
|
58
58
|
import HelpPopover from '@bigbinary/neeto-molecules/HelpPopover';
|
|
59
59
|
import '@bigbinary/neeto-commons-frontend/constants';
|
|
60
60
|
import 'axios';
|
|
61
|
+
import '@bigbinary/neeto-icons/Address';
|
|
62
|
+
import '@bigbinary/neeto-icons/Calendar';
|
|
63
|
+
import '@bigbinary/neeto-icons/Captcha';
|
|
64
|
+
import '@bigbinary/neeto-icons/Checkbox';
|
|
65
|
+
import '@bigbinary/neeto-icons/DropdownClosed';
|
|
66
|
+
import '@bigbinary/neeto-icons/Email';
|
|
67
|
+
import '@bigbinary/neeto-icons/FileUpload';
|
|
68
|
+
import '@bigbinary/neeto-icons/Group';
|
|
69
|
+
import '@bigbinary/neeto-icons/Hash';
|
|
70
|
+
import '@bigbinary/neeto-icons/Header';
|
|
71
|
+
import '@bigbinary/neeto-icons/Location';
|
|
72
|
+
import '@bigbinary/neeto-icons/LongText';
|
|
73
|
+
import '@bigbinary/neeto-icons/MessageSquare';
|
|
74
|
+
import '@bigbinary/neeto-icons/NeetoInvisible';
|
|
75
|
+
import '@bigbinary/neeto-icons/PhoneRing';
|
|
76
|
+
import '@bigbinary/neeto-icons/Radio';
|
|
77
|
+
import '@bigbinary/neeto-icons/Rating';
|
|
78
|
+
import '@bigbinary/neeto-icons/Scale';
|
|
79
|
+
import '@bigbinary/neeto-icons/Sms';
|
|
80
|
+
import '@bigbinary/neeto-icons/Terms';
|
|
81
|
+
import '@bigbinary/neeto-icons/TextLines';
|
|
82
|
+
import '@bigbinary/neeto-icons/UserRoundedRect';
|
|
61
83
|
import 'dompurify';
|
|
62
84
|
import '@bigbinary/neeto-icons/Plus';
|
|
63
85
|
import 'zustand';
|
|
@@ -360,8 +382,8 @@ var Card = function Card(_ref) {
|
|
|
360
382
|
});
|
|
361
383
|
};
|
|
362
384
|
|
|
363
|
-
function ownKeys$
|
|
364
|
-
function _objectSpread$
|
|
385
|
+
function ownKeys$j(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
386
|
+
function _objectSpread$j(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$j(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$j(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
365
387
|
var Questions = function Questions(_ref) {
|
|
366
388
|
var questions = _ref.questions,
|
|
367
389
|
isDeletable = _ref.isDeletable,
|
|
@@ -381,7 +403,7 @@ var Questions = function Questions(_ref) {
|
|
|
381
403
|
var droppableProps = _ref2.droppableProps,
|
|
382
404
|
placeholder = _ref2.placeholder,
|
|
383
405
|
innerRef = _ref2.innerRef;
|
|
384
|
-
return /*#__PURE__*/jsxs("div", _objectSpread$
|
|
406
|
+
return /*#__PURE__*/jsxs("div", _objectSpread$j(_objectSpread$j({}, droppableProps), {}, {
|
|
385
407
|
className: "space-y-2",
|
|
386
408
|
ref: innerRef,
|
|
387
409
|
children: [questions.map(function (question, index) {
|
|
@@ -396,7 +418,7 @@ var Questions = function Questions(_ref) {
|
|
|
396
418
|
var draggableProps = _ref3.draggableProps,
|
|
397
419
|
dragHandleProps = _ref3.dragHandleProps,
|
|
398
420
|
innerRef = _ref3.innerRef;
|
|
399
|
-
return /*#__PURE__*/jsx("div", _objectSpread$
|
|
421
|
+
return /*#__PURE__*/jsx("div", _objectSpread$j(_objectSpread$j(_objectSpread$j({}, draggableProps), dragHandleProps), {}, {
|
|
400
422
|
ref: innerRef,
|
|
401
423
|
children: /*#__PURE__*/jsx(Card, {
|
|
402
424
|
allQuestionKinds: allQuestionKinds,
|
|
@@ -431,8 +453,8 @@ var arrayHelpers = {
|
|
|
431
453
|
};
|
|
432
454
|
|
|
433
455
|
var _excluded$b = ["fields"];
|
|
434
|
-
function ownKeys$
|
|
435
|
-
function _objectSpread$
|
|
456
|
+
function ownKeys$i(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
457
|
+
function _objectSpread$i(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$i(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$i(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
436
458
|
var isChoiceQuestion = function isChoiceQuestion(question) {
|
|
437
459
|
return includes(question === null || question === void 0 ? void 0 : question.kind, SELECTABLE_KINDS);
|
|
438
460
|
};
|
|
@@ -517,7 +539,7 @@ var handleFieldDragEnd = function handleFieldDragEnd(_ref4) {
|
|
|
517
539
|
var nextItems = _toConsumableArray(items);
|
|
518
540
|
arrayHelpers.moveItem(nextItems, source.index, destination.index);
|
|
519
541
|
var orderedItems = nextItems.map(function (item, index) {
|
|
520
|
-
return _objectSpread$
|
|
542
|
+
return _objectSpread$i(_objectSpread$i({}, item), {}, {
|
|
521
543
|
displayOrder: index
|
|
522
544
|
});
|
|
523
545
|
});
|
|
@@ -539,7 +561,7 @@ var createFieldData = function createFieldData(_ref5) {
|
|
|
539
561
|
selectedLanguage: selectedLanguage,
|
|
540
562
|
isUsingDefaultQuestionKinds: isUsingDefaultQuestionKinds
|
|
541
563
|
});
|
|
542
|
-
return _objectSpread$
|
|
564
|
+
return _objectSpread$i(_objectSpread$i(_objectSpread$i({}, modifiedDefaultValues), {}, {
|
|
543
565
|
metadata: metadata
|
|
544
566
|
}, typeof isRequired === "boolean" && {
|
|
545
567
|
isRequired: isRequired
|
|
@@ -571,7 +593,7 @@ var duplicateFieldData = function duplicateFieldData(_ref6) {
|
|
|
571
593
|
var newQuestionLabel = isRichTextQuestion(kind) ? label : t("neetoForm.common.clonedElementLabel", {
|
|
572
594
|
label: label
|
|
573
595
|
});
|
|
574
|
-
return _objectSpread$
|
|
596
|
+
return _objectSpread$i(_objectSpread$i({}, defaultAttributes), {}, {
|
|
575
597
|
isRequired: isRequired,
|
|
576
598
|
kind: kind,
|
|
577
599
|
label: newQuestionLabel,
|
|
@@ -684,9 +706,34 @@ var useHelpDoc = function useHelpDoc(key) {
|
|
|
684
706
|
return useBuildFormStore(path(["formState", "helpDocUrls", key]));
|
|
685
707
|
};
|
|
686
708
|
|
|
709
|
+
var KindOption = function KindOption(_ref) {
|
|
710
|
+
var label = _ref.label,
|
|
711
|
+
description = _ref.description,
|
|
712
|
+
Icon = _ref.icon;
|
|
713
|
+
return /*#__PURE__*/jsxs("div", {
|
|
714
|
+
className: "flex items-start gap-2",
|
|
715
|
+
children: [Icon && /*#__PURE__*/jsx(Icon, {
|
|
716
|
+
className: "neeto-ui-text-gray-700 mt-0.5 shrink-0",
|
|
717
|
+
"data-testid": "kind-option-icon",
|
|
718
|
+
size: 16
|
|
719
|
+
}), /*#__PURE__*/jsxs("div", {
|
|
720
|
+
className: "flex min-w-0 flex-col",
|
|
721
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
722
|
+
style: "body2",
|
|
723
|
+
children: label
|
|
724
|
+
}), description && /*#__PURE__*/jsx(Typography, {
|
|
725
|
+
className: "neeto-ui-text-gray-600 mt-0.5",
|
|
726
|
+
"data-testid": "kind-option-description",
|
|
727
|
+
style: "body3",
|
|
728
|
+
children: description
|
|
729
|
+
})]
|
|
730
|
+
})]
|
|
731
|
+
});
|
|
732
|
+
};
|
|
733
|
+
|
|
687
734
|
var _excluded$a = ["label", "name"];
|
|
688
|
-
function ownKeys$
|
|
689
|
-
function _objectSpread$
|
|
735
|
+
function ownKeys$h(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
736
|
+
function _objectSpread$h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$h(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
690
737
|
var FormikAdaptiveInput = function FormikAdaptiveInput(_ref) {
|
|
691
738
|
var label = _ref.label,
|
|
692
739
|
name = _ref.name,
|
|
@@ -705,7 +752,7 @@ var FormikAdaptiveInput = function FormikAdaptiveInput(_ref) {
|
|
|
705
752
|
var end = element.value.length;
|
|
706
753
|
element.setSelectionRange(end, end);
|
|
707
754
|
};
|
|
708
|
-
return /*#__PURE__*/jsx(Textarea$1, _objectSpread$
|
|
755
|
+
return /*#__PURE__*/jsx(Textarea$1, _objectSpread$h({
|
|
709
756
|
label: label,
|
|
710
757
|
name: name,
|
|
711
758
|
className: "neeto-form-nano-adaptive-input",
|
|
@@ -719,8 +766,8 @@ var FormikAdaptiveInput = function FormikAdaptiveInput(_ref) {
|
|
|
719
766
|
}, otherProps));
|
|
720
767
|
};
|
|
721
768
|
|
|
722
|
-
function ownKeys$
|
|
723
|
-
function _objectSpread$
|
|
769
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
770
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
724
771
|
var LabelWithPlaceholder = function LabelWithPlaceholder(_ref) {
|
|
725
772
|
var kind = _ref.kind,
|
|
726
773
|
isLabelDisabled = _ref.isLabelDisabled,
|
|
@@ -734,14 +781,14 @@ var LabelWithPlaceholder = function LabelWithPlaceholder(_ref) {
|
|
|
734
781
|
var shouldShowPlaceholder = includes(kind, QUESTIONS_WITH_PLACEHOLDERS);
|
|
735
782
|
return /*#__PURE__*/jsxs("div", {
|
|
736
783
|
className: "space-y-4",
|
|
737
|
-
children: [/*#__PURE__*/jsx(FormikAdaptiveInput, _objectSpread$
|
|
784
|
+
children: [/*#__PURE__*/jsx(FormikAdaptiveInput, _objectSpread$g({
|
|
738
785
|
required: true,
|
|
739
786
|
disabled: isLabelDisabled,
|
|
740
787
|
label: t("neetoForm.questions.common.questionFields.field.question"),
|
|
741
788
|
name: "label",
|
|
742
789
|
placeholder: DEFAULT_PLACEHOLDERS[kind],
|
|
743
790
|
onChange: withEventTargetValue(handleLabelChange)
|
|
744
|
-
}, labelProps)), shouldShowPlaceholder && /*#__PURE__*/jsx(FormikAdaptiveInput, _objectSpread$
|
|
791
|
+
}, labelProps)), shouldShowPlaceholder && /*#__PURE__*/jsx(FormikAdaptiveInput, _objectSpread$g({
|
|
745
792
|
className: "neeto-form-nano-placeholder-input neeto-form-nano-placeholder-input-".concat(kind),
|
|
746
793
|
name: "placeholder",
|
|
747
794
|
label: t("neetoForm.questions.common.questionFields.field.placeholder")
|
|
@@ -749,8 +796,8 @@ var LabelWithPlaceholder = function LabelWithPlaceholder(_ref) {
|
|
|
749
796
|
});
|
|
750
797
|
};
|
|
751
798
|
|
|
752
|
-
function ownKeys$
|
|
753
|
-
function _objectSpread$
|
|
799
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
800
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
754
801
|
var Name = function Name(_ref) {
|
|
755
802
|
var isLabelDisabled = _ref.isLabelDisabled,
|
|
756
803
|
_handleLabelChange = _ref.handleLabelChange;
|
|
@@ -770,7 +817,7 @@ var Name = function Name(_ref) {
|
|
|
770
817
|
label: t("neetoForm.common.splitAsFirstAndLastNames"),
|
|
771
818
|
name: "isSplitMode"
|
|
772
819
|
}), isSplitMode && !usesCustomSubmissionComponent ? /*#__PURE__*/jsxs(Fragment, {
|
|
773
|
-
children: [/*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$
|
|
820
|
+
children: [/*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$f(_objectSpread$f({}, commonProps), {}, {
|
|
774
821
|
handleLabelChange: function handleLabelChange(value) {
|
|
775
822
|
return _handleLabelChange(value, LABEL_FIELDS.FIRST_NAME);
|
|
776
823
|
},
|
|
@@ -782,7 +829,7 @@ var Name = function Name(_ref) {
|
|
|
782
829
|
label: t("neetoForm.questions.common.questionFields.field.firstNamePlaceholder"),
|
|
783
830
|
name: "firstNamePlaceholder"
|
|
784
831
|
}
|
|
785
|
-
})), /*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$
|
|
832
|
+
})), /*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$f(_objectSpread$f({}, commonProps), {}, {
|
|
786
833
|
handleLabelChange: function handleLabelChange(value) {
|
|
787
834
|
return _handleLabelChange(value, LABEL_FIELDS.LAST_NAME);
|
|
788
835
|
},
|
|
@@ -795,7 +842,7 @@ var Name = function Name(_ref) {
|
|
|
795
842
|
name: "lastNamePlaceholder"
|
|
796
843
|
}
|
|
797
844
|
}))]
|
|
798
|
-
}) : /*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$
|
|
845
|
+
}) : /*#__PURE__*/jsx(LabelWithPlaceholder, _objectSpread$f(_objectSpread$f({}, commonProps), {}, {
|
|
799
846
|
labelProps: {
|
|
800
847
|
name: LABEL_FIELDS.FULL_NAME
|
|
801
848
|
},
|
|
@@ -940,8 +987,8 @@ var RequiredSwitch = withT(function (_ref) {
|
|
|
940
987
|
});
|
|
941
988
|
|
|
942
989
|
var _excluded$9 = ["maxLength"];
|
|
943
|
-
function ownKeys$
|
|
944
|
-
function _objectSpread$
|
|
990
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
991
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
945
992
|
var InputWithMaxLength = function InputWithMaxLength(_ref) {
|
|
946
993
|
var maxLength = _ref.maxLength,
|
|
947
994
|
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
@@ -955,7 +1002,7 @@ var InputWithMaxLength = function InputWithMaxLength(_ref) {
|
|
|
955
1002
|
}
|
|
956
1003
|
}, [value, maxLength, setValue]);
|
|
957
1004
|
var shouldShowMaxLength = value && value.length > maxLength - 10;
|
|
958
|
-
return /*#__PURE__*/jsx(Input, _objectSpread$
|
|
1005
|
+
return /*#__PURE__*/jsx(Input, _objectSpread$e(_objectSpread$e({}, props), shouldShowMaxLength && {
|
|
959
1006
|
maxLength: maxLength
|
|
960
1007
|
}));
|
|
961
1008
|
};
|
|
@@ -1015,6 +1062,8 @@ var Textarea = function Textarea() {
|
|
|
1015
1062
|
});
|
|
1016
1063
|
};
|
|
1017
1064
|
|
|
1065
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1066
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1018
1067
|
var Form$1 = function Form(_ref) {
|
|
1019
1068
|
var questions = _ref.questions,
|
|
1020
1069
|
initialFocusRef = _ref.initialFocusRef,
|
|
@@ -1136,10 +1185,15 @@ var Form$1 = function Form(_ref) {
|
|
|
1136
1185
|
isClearable: true,
|
|
1137
1186
|
isSearchable: true,
|
|
1138
1187
|
defaultValue: buildDefaultValueForKind(questionKind),
|
|
1188
|
+
filterOption: filterKindOption,
|
|
1139
1189
|
innerRef: initialFocusRef,
|
|
1140
1190
|
isDisabled: isEdit,
|
|
1141
1191
|
name: "kind",
|
|
1142
1192
|
options: buildKindOptions(questionKinds),
|
|
1193
|
+
formatOptionLabel: function formatOptionLabel(option, _ref3) {
|
|
1194
|
+
var context = _ref3.context;
|
|
1195
|
+
return context === "menu" ? /*#__PURE__*/jsx(KindOption, _objectSpread$d({}, option)) : option.label;
|
|
1196
|
+
},
|
|
1143
1197
|
label: t("neetoForm.questions.common.questionFields.field.questionType"),
|
|
1144
1198
|
onChange: handleKindChange
|
|
1145
1199
|
}), isRichTextQuestion(kind) ? /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -2644,16 +2698,31 @@ var getQuestionKind = function getQuestionKind(questionKinds, pattern) {
|
|
|
2644
2698
|
var buildKindOptions = function buildKindOptions(kinds) {
|
|
2645
2699
|
return kinds.map(function (_ref3) {
|
|
2646
2700
|
var label = _ref3.label,
|
|
2647
|
-
type = _ref3.type
|
|
2701
|
+
type = _ref3.type,
|
|
2702
|
+
icon = _ref3.icon,
|
|
2703
|
+
description = _ref3.description,
|
|
2704
|
+
searchTerms = _ref3.searchTerms;
|
|
2648
2705
|
return {
|
|
2649
2706
|
label: label,
|
|
2650
2707
|
value: transformValueForOption({
|
|
2651
2708
|
label: label,
|
|
2652
2709
|
type: type
|
|
2653
|
-
})
|
|
2710
|
+
}),
|
|
2711
|
+
icon: icon,
|
|
2712
|
+
description: description,
|
|
2713
|
+
searchTerms: searchTerms
|
|
2654
2714
|
};
|
|
2655
2715
|
});
|
|
2656
2716
|
};
|
|
2717
|
+
var filterKindOption = function filterKindOption(option, rawInput) {
|
|
2718
|
+
var _option$data$searchTe, _option$data;
|
|
2719
|
+
var query = rawInput === null || rawInput === void 0 ? void 0 : rawInput.trim().toLowerCase();
|
|
2720
|
+
if (!query) return true;
|
|
2721
|
+
var searchTerms = (_option$data$searchTe = (_option$data = option.data) === null || _option$data === void 0 ? void 0 : _option$data.searchTerms) !== null && _option$data$searchTe !== void 0 ? _option$data$searchTe : [];
|
|
2722
|
+
return searchTerms.some(function (term) {
|
|
2723
|
+
return term.includes(query);
|
|
2724
|
+
});
|
|
2725
|
+
};
|
|
2657
2726
|
var extractKindFromOption = pipe(split("-"), last);
|
|
2658
2727
|
var buildDefaultValueForKind = function buildDefaultValueForKind(questionKind) {
|
|
2659
2728
|
return isPresent(questionKind) ? {
|