@bigbinary/neeto-form-frontend 2.0.2 → 2.0.4
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/de.json +26 -6
- package/app/javascript/src/translations/en.json +7 -7
- package/app/javascript/src/translations/es.json +34 -0
- package/app/javascript/src/translations/fr.json +34 -0
- package/app/javascript/src/translations/nl.json +34 -0
- package/app/javascript/src/translations/pl.json +34 -0
- package/app/javascript/src/translations/pt.json +34 -0
- package/dist/index.cjs.js +73 -43
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +125 -95
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"neetoForm": {
|
|
3
|
+
"common": {
|
|
4
|
+
"addGuests": "Gäste hinzufügen",
|
|
5
|
+
"phoneNumberValidation": "Telefonnummer beginnend mit der Landesvorwahl",
|
|
6
|
+
"mustAcceptTermsAndConditions": "Du musst die Geschäftsbedingungen akzeptieren",
|
|
7
|
+
"mustAcceptCondition": "Sie müssen die Bedingung akzeptieren, um fortfahren zu können",
|
|
8
|
+
"option": "Möglichkeit",
|
|
9
|
+
"rating": "Bewertung"
|
|
10
|
+
},
|
|
3
11
|
"error": {
|
|
4
|
-
"invalidField": "Bitte geben Sie ein gültiges {{label}} ein
|
|
12
|
+
"invalidField": "Bitte geben Sie ein gültiges {{label}} ein",
|
|
5
13
|
"invalidType": "{{label}} sollte ein gültiger {{type}} sein",
|
|
6
|
-
"requiredField": "Bitte geben Sie {{label}} ein
|
|
7
|
-
"selectMin": "Bitte wählen Sie {{
|
|
14
|
+
"requiredField": "Bitte geben Sie {{label}} ein",
|
|
15
|
+
"selectMin": "Bitte wählen Sie {{entity}} aus"
|
|
8
16
|
},
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
17
|
+
"fileUpload": {
|
|
18
|
+
"validations": {
|
|
19
|
+
"waitForUpload": "Bitte warten Sie, bis der Upload abgeschlossen ist",
|
|
20
|
+
"atLeastOneFileRequired": "Bitte laden Sie mindestens eine Datei hoch",
|
|
21
|
+
"removeDuplicates": "Bitte entfernen Sie doppelte Einträge",
|
|
22
|
+
"fileIsRequired": "Bitte laden Sie eine Datei hoch"
|
|
23
|
+
},
|
|
24
|
+
"dropzone": {
|
|
25
|
+
"errors": {
|
|
26
|
+
"fileTooLarge": "Die Datei '{{fileName, anyCase}}' ist größer als {{maxSize}} MB",
|
|
27
|
+
"fileInvalidType": "Der Dateityp {{fileType}} ist nicht zulässig",
|
|
28
|
+
"tooManyFiles": "Sie können nur eine Datei hochladen",
|
|
29
|
+
"defaultError": "Beim Hochladen von {{fileName, anyCase}} ist ein Fehler aufgetreten"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
12
32
|
}
|
|
13
33
|
}
|
|
14
34
|
}
|
|
@@ -47,7 +47,9 @@
|
|
|
47
47
|
"end": "End",
|
|
48
48
|
"settings": "Settings",
|
|
49
49
|
"advancedProperties": "Advanced properties",
|
|
50
|
-
"clonedElementLabel": "Copy of {{label, anyCase}}"
|
|
50
|
+
"clonedElementLabel": "Copy of {{label, anyCase}}",
|
|
51
|
+
"option": "Option",
|
|
52
|
+
"rating": "Rating"
|
|
51
53
|
},
|
|
52
54
|
"fields": {
|
|
53
55
|
"mcf": "Multiple choice",
|
|
@@ -123,13 +125,11 @@
|
|
|
123
125
|
"changeLanguage": "Change language"
|
|
124
126
|
},
|
|
125
127
|
"error": {
|
|
126
|
-
"invalidField": "Please enter a valid {{label}}
|
|
127
|
-
"invalidFieldCode": "This field code cannot be used
|
|
128
|
-
"requiredField": "Please enter {{label}}
|
|
128
|
+
"invalidField": "Please enter a valid {{label}}",
|
|
129
|
+
"invalidFieldCode": "This field code cannot be used",
|
|
130
|
+
"requiredField": "Please enter {{label}}",
|
|
129
131
|
"selectMin": "Please select {{min}} {{entity}}",
|
|
130
132
|
"invalidType": "{{label}} should be a valid {{type}}",
|
|
131
|
-
"minCount": "{{field}} must be greater than or equal to {{value}}",
|
|
132
|
-
"maxCount": "{{field}} must be less than or equal to {{value}}",
|
|
133
133
|
"fieldCantBeEmpty": "{{field, anyCase}} can't be empty"
|
|
134
134
|
},
|
|
135
135
|
"fileTypes": {
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"errors": {
|
|
151
151
|
"fileTooLarge": "The file '{{fileName, anyCase}}' is larger than {{maxSize}} MB",
|
|
152
152
|
"fileInvalidType": "File type {{fileType}} is not permitted",
|
|
153
|
-
"tooManyFiles": "You can only upload
|
|
153
|
+
"tooManyFiles": "You can only upload one file",
|
|
154
154
|
"defaultError": "Something went wrong while uploading {{fileName, anyCase}}"
|
|
155
155
|
},
|
|
156
156
|
"maxFileSize": "Maximum allowed size is {{size}} {{unit, anyCase}}",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neetoForm": {
|
|
3
|
+
"common": {
|
|
4
|
+
"addGuests": "Agregar invitados",
|
|
5
|
+
"phoneNumberValidation": "Número de teléfono que comienza con el código de país",
|
|
6
|
+
"mustAcceptTermsAndConditions": "Debe aceptar los Términos y Condiciones",
|
|
7
|
+
"mustAcceptCondition": "Debes aceptar la condición para continuar",
|
|
8
|
+
"option": "Opción",
|
|
9
|
+
"rating": "Clasificación"
|
|
10
|
+
},
|
|
11
|
+
"error": {
|
|
12
|
+
"invalidField": "Introduzca una {{label}} válida",
|
|
13
|
+
"invalidType": "{{label}} debe ser un {{type}} válido",
|
|
14
|
+
"requiredField": "Por favor ingrese {{label}}",
|
|
15
|
+
"selectMin": "Por favor seleccione {{entity}}"
|
|
16
|
+
},
|
|
17
|
+
"fileUpload": {
|
|
18
|
+
"validations": {
|
|
19
|
+
"waitForUpload": "Espere hasta que finalice la carga.",
|
|
20
|
+
"atLeastOneFileRequired": "Por favor sube al menos un archivo",
|
|
21
|
+
"removeDuplicates": "Por favor elimine las entradas duplicadas",
|
|
22
|
+
"fileIsRequired": "Por favor sube un archivo"
|
|
23
|
+
},
|
|
24
|
+
"dropzone": {
|
|
25
|
+
"errors": {
|
|
26
|
+
"fileTooLarge": "El archivo '{{fileName, anyCase}}' pesa más de {{maxSize}} MB",
|
|
27
|
+
"fileInvalidType": "El tipo de archivo {{fileType}} no está permitido",
|
|
28
|
+
"tooManyFiles": "Solo puedes subir un archivo",
|
|
29
|
+
"defaultError": "Algo salió mal al cargar {{fileName, anyCase}}"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neetoForm": {
|
|
3
|
+
"common": {
|
|
4
|
+
"addGuests": "Ajouter des invités",
|
|
5
|
+
"phoneNumberValidation": "Numéro de téléphone commençant par l'indicatif du pays",
|
|
6
|
+
"mustAcceptTermsAndConditions": "Vous devez accepter les Termes et Conditions",
|
|
7
|
+
"mustAcceptCondition": "Vous devez accepter la condition pour continuer",
|
|
8
|
+
"option": "Option",
|
|
9
|
+
"rating": "Notation"
|
|
10
|
+
},
|
|
11
|
+
"error": {
|
|
12
|
+
"invalidField": "Veuillez saisir un {{label}} valide",
|
|
13
|
+
"invalidType": "{{label}} doit être un {{type}} valide",
|
|
14
|
+
"requiredField": "Veuillez saisir {{label}}",
|
|
15
|
+
"selectMin": "Veuillez sélectionner {{entity}}"
|
|
16
|
+
},
|
|
17
|
+
"fileUpload": {
|
|
18
|
+
"validations": {
|
|
19
|
+
"waitForUpload": "Veuillez patienter jusqu'à ce que le téléchargement soit terminé",
|
|
20
|
+
"atLeastOneFileRequired": "Veuillez télécharger au moins un fichier",
|
|
21
|
+
"removeDuplicates": "Veuillez supprimer les entrées en double",
|
|
22
|
+
"fileIsRequired": "Veuillez télécharger un fichier"
|
|
23
|
+
},
|
|
24
|
+
"dropzone": {
|
|
25
|
+
"errors": {
|
|
26
|
+
"fileTooLarge": "Le fichier '{{fileName, anyCase}}' fait plus de {{maxSize}} Mo",
|
|
27
|
+
"fileInvalidType": "Le type de fichier {{fileType}} n'est pas autorisé",
|
|
28
|
+
"tooManyFiles": "Vous ne pouvez télécharger qu'un seul fichier",
|
|
29
|
+
"defaultError": "Une erreur s'est produite lors du téléchargement de {{fileName, anyCase}}"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neetoForm": {
|
|
3
|
+
"common": {
|
|
4
|
+
"addGuests": "Voeg gasten toe",
|
|
5
|
+
"phoneNumberValidation": "Telefoonnummer beginnend met landcode",
|
|
6
|
+
"mustAcceptTermsAndConditions": "U moet de voorwaarden accepteren",
|
|
7
|
+
"mustAcceptCondition": "U moet de voorwaarde accepteren om door te gaan",
|
|
8
|
+
"option": "Keuze",
|
|
9
|
+
"rating": "Beoordeling"
|
|
10
|
+
},
|
|
11
|
+
"error": {
|
|
12
|
+
"invalidField": "Voer een geldige {{label}} in",
|
|
13
|
+
"invalidType": "{{label}} moet een geldige {{type}} zijn",
|
|
14
|
+
"requiredField": "Voer {{label}} in",
|
|
15
|
+
"selectMin": "Selecteer {{entity}}"
|
|
16
|
+
},
|
|
17
|
+
"fileUpload": {
|
|
18
|
+
"validations": {
|
|
19
|
+
"waitForUpload": "Wacht tot het uploaden is voltooid",
|
|
20
|
+
"atLeastOneFileRequired": "Upload minimaal één bestand",
|
|
21
|
+
"removeDuplicates": "Verwijder dubbele vermeldingen",
|
|
22
|
+
"fileIsRequired": "Upload een bestand"
|
|
23
|
+
},
|
|
24
|
+
"dropzone": {
|
|
25
|
+
"errors": {
|
|
26
|
+
"fileTooLarge": "Het bestand '{{fileName, anyCase}}' is groter dan {{maxSize}} MB",
|
|
27
|
+
"fileInvalidType": "Bestandstype {{fileType}} is niet toegestaan",
|
|
28
|
+
"tooManyFiles": "U kunt slechts één bestand uploaden",
|
|
29
|
+
"defaultError": "Er is iets misgegaan tijdens het uploaden van {{fileName, anyCase}}"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neetoForm": {
|
|
3
|
+
"common": {
|
|
4
|
+
"addGuests": "Dodaj gości",
|
|
5
|
+
"phoneNumberValidation": "Numer telefonu zaczynający się od numeru kierunkowego kraju",
|
|
6
|
+
"mustAcceptTermsAndConditions": "Musisz zaakceptować warunki",
|
|
7
|
+
"mustAcceptCondition": "Aby kontynuować, musisz zaakceptować warunek",
|
|
8
|
+
"option": "Opcja",
|
|
9
|
+
"rating": "Ocena"
|
|
10
|
+
},
|
|
11
|
+
"error": {
|
|
12
|
+
"invalidField": "Proszę wprowadzić poprawną etykietę {{label}}",
|
|
13
|
+
"invalidType": "{{label}} powinien być prawidłowym {{type}}",
|
|
14
|
+
"requiredField": "Proszę wpisać {{label}}",
|
|
15
|
+
"selectMin": "Proszę wybrać {{entity}}"
|
|
16
|
+
},
|
|
17
|
+
"fileUpload": {
|
|
18
|
+
"validations": {
|
|
19
|
+
"waitForUpload": "Poczekaj, aż przesyłanie się zakończy",
|
|
20
|
+
"atLeastOneFileRequired": "Prześlij przynajmniej jeden plik",
|
|
21
|
+
"removeDuplicates": "Proszę usunąć zdublowane wpisy",
|
|
22
|
+
"fileIsRequired": "Proszę przesłać plik"
|
|
23
|
+
},
|
|
24
|
+
"dropzone": {
|
|
25
|
+
"errors": {
|
|
26
|
+
"fileTooLarge": "Plik '{{fileName, anyCase}}' jest większy niż {{maxSize}} MB",
|
|
27
|
+
"fileInvalidType": "Typ pliku {{fileType}} jest niedozwolony",
|
|
28
|
+
"tooManyFiles": "Możesz przesłać tylko jeden plik",
|
|
29
|
+
"defaultError": "Coś poszło nie tak podczas przesyłania pliku {{fileName, anyCase}}"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neetoForm": {
|
|
3
|
+
"common": {
|
|
4
|
+
"addGuests": "Adicionar convidados",
|
|
5
|
+
"phoneNumberValidation": "Número de telefone começando com o código do país",
|
|
6
|
+
"mustAcceptTermsAndConditions": "Você deve aceitar os Termos e Condições",
|
|
7
|
+
"mustAcceptCondition": "Você deve aceitar a condição para prosseguir",
|
|
8
|
+
"option": "Opção",
|
|
9
|
+
"rating": "Avaliação"
|
|
10
|
+
},
|
|
11
|
+
"error": {
|
|
12
|
+
"invalidField": "Insira um {{label}} válido",
|
|
13
|
+
"invalidType": "{{label}} deve ser um {{type}} válido",
|
|
14
|
+
"requiredField": "Insira {{label}}",
|
|
15
|
+
"selectMin": "Selecione {{entity}}"
|
|
16
|
+
},
|
|
17
|
+
"fileUpload": {
|
|
18
|
+
"validations": {
|
|
19
|
+
"waitForUpload": "Aguarde até que o upload termine",
|
|
20
|
+
"atLeastOneFileRequired": "Faça upload de pelo menos um arquivo",
|
|
21
|
+
"removeDuplicates": "Remova entradas duplicadas",
|
|
22
|
+
"fileIsRequired": "Por favor carregue um arquivo"
|
|
23
|
+
},
|
|
24
|
+
"dropzone": {
|
|
25
|
+
"errors": {
|
|
26
|
+
"fileTooLarge": "O arquivo '{{fileName, anyCase}}' é maior que {{maxSize}} MB",
|
|
27
|
+
"fileInvalidType": "O tipo de arquivo {{fileType}} não é permitido",
|
|
28
|
+
"tooManyFiles": "Você só pode enviar um arquivo",
|
|
29
|
+
"defaultError": "Algo deu errado ao enviar {{fileName, anyCase}}"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1575,7 +1575,7 @@ var useSyncExternalStoreShim_production_min = {};
|
|
|
1575
1575
|
* LICENSE file in the root directory of this source tree.
|
|
1576
1576
|
*/
|
|
1577
1577
|
var e$2=React__default["default"];function h$3(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k$2="function"===typeof Object.is?Object.is:h$3,l$2=e$2.useState,m$2=e$2.useEffect,n$3=e$2.useLayoutEffect,p$3=e$2.useDebugValue;function q$3(a,b){var d=b(),f=l$2({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n$3(function(){c.value=d;c.getSnapshot=b;r$2(c)&&g({inst:c});},[a,d,b]);m$2(function(){r$2(c)&&g({inst:c});return a(function(){r$2(c)&&g({inst:c});})},[a]);p$3(d);return d}
|
|
1578
|
-
function r$2(a){var b=a.getSnapshot;a=a.value;try{var d=b();return !k$2(a,d)}catch(f){return !0}}function t$
|
|
1578
|
+
function r$2(a){var b=a.getSnapshot;a=a.value;try{var d=b();return !k$2(a,d)}catch(f){return !0}}function t$6(a,b){return b()}var u$2="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?t$6:q$3;useSyncExternalStoreShim_production_min.useSyncExternalStore=void 0!==e$2.useSyncExternalStore?e$2.useSyncExternalStore:u$2;
|
|
1579
1579
|
|
|
1580
1580
|
{
|
|
1581
1581
|
shim.exports = useSyncExternalStoreShim_production_min;
|
|
@@ -1594,8 +1594,8 @@ var withSelector_production_min = {};
|
|
|
1594
1594
|
* This source code is licensed under the MIT license found in the
|
|
1595
1595
|
* LICENSE file in the root directory of this source tree.
|
|
1596
1596
|
*/
|
|
1597
|
-
var h$2=React__default["default"],n$2=shimExports;function p$2(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q$2="function"===typeof Object.is?Object.is:p$2,r$1=n$2.useSyncExternalStore,t$
|
|
1598
|
-
withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t$
|
|
1597
|
+
var h$2=React__default["default"],n$2=shimExports;function p$2(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q$2="function"===typeof Object.is?Object.is:p$2,r$1=n$2.useSyncExternalStore,t$5=h$2.useRef,u$1=h$2.useEffect,v$2=h$2.useMemo,w$1=h$2.useDebugValue;
|
|
1598
|
+
withSelector_production_min.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t$5(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f;}else f=c.current;c=v$2(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q$2(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return [function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r$1(a,c[0],c[1]);
|
|
1599
1599
|
u$1(function(){f.hasValue=!0;f.value=d;},[d]);w$1(d);return d};
|
|
1600
1600
|
|
|
1601
1601
|
// Default to a dummy "batch" implementation that just runs the callback
|
|
@@ -1677,11 +1677,11 @@ var reactIs_production_min$1 = {};
|
|
|
1677
1677
|
* LICENSE file in the root directory of this source tree.
|
|
1678
1678
|
*/
|
|
1679
1679
|
var b$2="function"===typeof Symbol&&Symbol.for,c$2=b$2?Symbol.for("react.element"):60103,d$1=b$2?Symbol.for("react.portal"):60106,e$1=b$2?Symbol.for("react.fragment"):60107,f$1=b$2?Symbol.for("react.strict_mode"):60108,g$1=b$2?Symbol.for("react.profiler"):60114,h$1=b$2?Symbol.for("react.provider"):60109,k$1=b$2?Symbol.for("react.context"):60110,l$1=b$2?Symbol.for("react.async_mode"):60111,m$1=b$2?Symbol.for("react.concurrent_mode"):60111,n$1=b$2?Symbol.for("react.forward_ref"):60112,p$1=b$2?Symbol.for("react.suspense"):60113,q$1=b$2?
|
|
1680
|
-
Symbol.for("react.suspense_list"):60120,r=b$2?Symbol.for("react.memo"):60115,t$
|
|
1681
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$2:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$1:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$
|
|
1682
|
-
reactIs_production_min$1.Profiler=g$1;reactIs_production_min$1.StrictMode=f$1;reactIs_production_min$1.Suspense=p$1;reactIs_production_min$1.isAsyncMode=function(a){return A(a)||z(a)===l$1};reactIs_production_min$1.isConcurrentMode=A;reactIs_production_min$1.isContextConsumer=function(a){return z(a)===k$1};reactIs_production_min$1.isContextProvider=function(a){return z(a)===h$1};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$2};reactIs_production_min$1.isForwardRef=function(a){return z(a)===n$1};reactIs_production_min$1.isFragment=function(a){return z(a)===e$1};reactIs_production_min$1.isLazy=function(a){return z(a)===t$
|
|
1680
|
+
Symbol.for("react.suspense_list"):60120,r=b$2?Symbol.for("react.memo"):60115,t$4=b$2?Symbol.for("react.lazy"):60116,v$1=b$2?Symbol.for("react.block"):60121,w=b$2?Symbol.for("react.fundamental"):60117,x=b$2?Symbol.for("react.responder"):60118,y=b$2?Symbol.for("react.scope"):60119;
|
|
1681
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$2:switch(a=a.type,a){case l$1:case m$1:case e$1:case g$1:case f$1:case p$1:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$1:case t$4:case r:case h$1:return a;default:return u}}case d$1:return u}}}function A(a){return z(a)===m$1}reactIs_production_min$1.AsyncMode=l$1;reactIs_production_min$1.ConcurrentMode=m$1;reactIs_production_min$1.ContextConsumer=k$1;reactIs_production_min$1.ContextProvider=h$1;reactIs_production_min$1.Element=c$2;reactIs_production_min$1.ForwardRef=n$1;reactIs_production_min$1.Fragment=e$1;reactIs_production_min$1.Lazy=t$4;reactIs_production_min$1.Memo=r;reactIs_production_min$1.Portal=d$1;
|
|
1682
|
+
reactIs_production_min$1.Profiler=g$1;reactIs_production_min$1.StrictMode=f$1;reactIs_production_min$1.Suspense=p$1;reactIs_production_min$1.isAsyncMode=function(a){return A(a)||z(a)===l$1};reactIs_production_min$1.isConcurrentMode=A;reactIs_production_min$1.isContextConsumer=function(a){return z(a)===k$1};reactIs_production_min$1.isContextProvider=function(a){return z(a)===h$1};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$2};reactIs_production_min$1.isForwardRef=function(a){return z(a)===n$1};reactIs_production_min$1.isFragment=function(a){return z(a)===e$1};reactIs_production_min$1.isLazy=function(a){return z(a)===t$4};
|
|
1683
1683
|
reactIs_production_min$1.isMemo=function(a){return z(a)===r};reactIs_production_min$1.isPortal=function(a){return z(a)===d$1};reactIs_production_min$1.isProfiler=function(a){return z(a)===g$1};reactIs_production_min$1.isStrictMode=function(a){return z(a)===f$1};reactIs_production_min$1.isSuspense=function(a){return z(a)===p$1};
|
|
1684
|
-
reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$1||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$
|
|
1684
|
+
reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m$1||a===g$1||a===f$1||a===p$1||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$4||a.$$typeof===r||a.$$typeof===h$1||a.$$typeof===k$1||a.$$typeof===n$1||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v$1)};reactIs_production_min$1.typeOf=z;
|
|
1685
1685
|
|
|
1686
1686
|
{
|
|
1687
1687
|
reactIs$2.exports = reactIs_production_min$1;
|
|
@@ -1806,11 +1806,11 @@ var reactIs_production_min = {};
|
|
|
1806
1806
|
* This source code is licensed under the MIT license found in the
|
|
1807
1807
|
* LICENSE file in the root directory of this source tree.
|
|
1808
1808
|
*/
|
|
1809
|
-
var b$1=Symbol.for("react.element"),c$1=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
|
|
1809
|
+
var b$1=Symbol.for("react.element"),c$1=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t$3=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
|
|
1810
1810
|
function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b$1:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c$1:return r}}}reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=g;reactIs_production_min.Element=b$1;reactIs_production_min.ForwardRef=l;reactIs_production_min.Fragment=d;reactIs_production_min.Lazy=q;reactIs_production_min.Memo=p;reactIs_production_min.Portal=c$1;reactIs_production_min.Profiler=f;reactIs_production_min.StrictMode=e;reactIs_production_min.Suspense=m;
|
|
1811
1811
|
reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return v(a)===h};reactIs_production_min.isContextProvider=function(a){return v(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b$1};reactIs_production_min.isForwardRef=function(a){return v(a)===l};reactIs_production_min.isFragment=function(a){return v(a)===d};reactIs_production_min.isLazy=function(a){return v(a)===q};reactIs_production_min.isMemo=function(a){return v(a)===p};
|
|
1812
1812
|
reactIs_production_min.isPortal=function(a){return v(a)===c$1};reactIs_production_min.isProfiler=function(a){return v(a)===f};reactIs_production_min.isStrictMode=function(a){return v(a)===e};reactIs_production_min.isSuspense=function(a){return v(a)===m};reactIs_production_min.isSuspenseList=function(a){return v(a)===n};
|
|
1813
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min.typeOf=v;
|
|
1813
|
+
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t$3||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min.typeOf=v;
|
|
1814
1814
|
|
|
1815
1815
|
{
|
|
1816
1816
|
reactIs.exports = reactIs_production_min;
|
|
@@ -12893,7 +12893,7 @@ var formValidationSchema = yup__namespace.object().shape({
|
|
|
12893
12893
|
lowestRatingLabel: yup__namespace.string().nullable()
|
|
12894
12894
|
});
|
|
12895
12895
|
|
|
12896
|
-
var _excluded$9 = ["question", "onClose", "questions", "handleSelect", "buildRequestArgs"];
|
|
12896
|
+
var _excluded$9 = ["question", "onClose", "questions", "handleSelect", "buildRequestArgs", "isOpen"];
|
|
12897
12897
|
function ownKeys$w(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; }
|
|
12898
12898
|
function _objectSpread$w(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$w(Object(t), !0).forEach(function (r) { _defineProperty$6(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$w(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12899
12899
|
var Add = function Add(_ref) {
|
|
@@ -12902,6 +12902,7 @@ var Add = function Add(_ref) {
|
|
|
12902
12902
|
questions = _ref.questions,
|
|
12903
12903
|
handleSelect = _ref.handleSelect,
|
|
12904
12904
|
buildRequestArgs = _ref.buildRequestArgs,
|
|
12905
|
+
isOpen = _ref.isOpen,
|
|
12905
12906
|
props = _objectWithoutProperties$1(_ref, _excluded$9);
|
|
12906
12907
|
var _useBuildFormStore = useBuildFormStore(function (store) {
|
|
12907
12908
|
var _store$formState, _store$formState2;
|
|
@@ -12923,6 +12924,7 @@ var Add = function Add(_ref) {
|
|
|
12923
12924
|
createQuestion = _useCreateQuestion.mutate,
|
|
12924
12925
|
isCreating = _useCreateQuestion.isLoading;
|
|
12925
12926
|
var handleSubmit = function handleSubmit(values) {
|
|
12927
|
+
if (isCreating || !isOpen) return;
|
|
12926
12928
|
var displayOrder = question ? question.displayOrder + 1 : questions.length;
|
|
12927
12929
|
createQuestion(_objectSpread$w({
|
|
12928
12930
|
language: language,
|
|
@@ -12969,11 +12971,12 @@ var Add = function Add(_ref) {
|
|
|
12969
12971
|
});
|
|
12970
12972
|
};
|
|
12971
12973
|
|
|
12972
|
-
var _excluded$8 = ["question", "onClose"];
|
|
12974
|
+
var _excluded$8 = ["question", "isOpen", "onClose"];
|
|
12973
12975
|
function ownKeys$v(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; }
|
|
12974
12976
|
function _objectSpread$v(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$v(Object(t), !0).forEach(function (r) { _defineProperty$6(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$v(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12975
12977
|
var Edit = function Edit(_ref) {
|
|
12976
12978
|
var question = _ref.question,
|
|
12979
|
+
isOpen = _ref.isOpen,
|
|
12977
12980
|
onClose = _ref.onClose,
|
|
12978
12981
|
props = _objectWithoutProperties$1(_ref, _excluded$8);
|
|
12979
12982
|
var _useTranslation = reactI18next.useTranslation(),
|
|
@@ -12990,6 +12993,7 @@ var Edit = function Edit(_ref) {
|
|
|
12990
12993
|
isUpdating = _useUpdateQuestion.isLoading;
|
|
12991
12994
|
var handleSubmit = function handleSubmit(values, _ref2) {
|
|
12992
12995
|
var setSubmitting = _ref2.setSubmitting;
|
|
12996
|
+
if (isUpdating || !isOpen) return;
|
|
12993
12997
|
var payload = {
|
|
12994
12998
|
language: language,
|
|
12995
12999
|
neetoFormQuestion: values
|
|
@@ -13441,6 +13445,7 @@ var ManageQuestionPane = function ManageQuestionPane(_ref) {
|
|
|
13441
13445
|
children: /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread$s({}, _objectSpread$s({
|
|
13442
13446
|
availableQuestionKinds: availableQuestionKinds,
|
|
13443
13447
|
initialFocusRef: initialFocusRef,
|
|
13448
|
+
isOpen: isOpen,
|
|
13444
13449
|
onClose: onClose,
|
|
13445
13450
|
question: question
|
|
13446
13451
|
}, props)))
|
|
@@ -14374,6 +14379,8 @@ var Callout = function Callout(_ref) {
|
|
|
14374
14379
|
});
|
|
14375
14380
|
};
|
|
14376
14381
|
|
|
14382
|
+
var clientI18nInstance = i18next__default["default"].cloneInstance();
|
|
14383
|
+
|
|
14377
14384
|
var clearLocalStorageValues = function clearLocalStorageValues(key) {
|
|
14378
14385
|
try {
|
|
14379
14386
|
localStorage.removeItem(key);
|
|
@@ -14421,13 +14428,25 @@ var FormikWrap = function FormikWrap(_ref) {
|
|
|
14421
14428
|
children = _ref.children,
|
|
14422
14429
|
formId = _ref.formId,
|
|
14423
14430
|
preserveValues = _ref.preserveValues,
|
|
14424
|
-
onValuesChange = _ref.onValuesChange
|
|
14431
|
+
onValuesChange = _ref.onValuesChange,
|
|
14432
|
+
dataUpdateCount = _ref.dataUpdateCount;
|
|
14425
14433
|
var _useFormikContext = formik.useFormikContext(),
|
|
14426
14434
|
errors = _useFormikContext.errors,
|
|
14427
14435
|
touched = _useFormikContext.touched,
|
|
14428
14436
|
isValid = _useFormikContext.isValid,
|
|
14429
14437
|
isSubmitting = _useFormikContext.isSubmitting,
|
|
14430
|
-
values = _useFormikContext.values
|
|
14438
|
+
values = _useFormikContext.values,
|
|
14439
|
+
validateForm = _useFormikContext.validateForm;
|
|
14440
|
+
var revalidate = function revalidate() {
|
|
14441
|
+
return neetoCist.isPresent(errors) && validateForm();
|
|
14442
|
+
};
|
|
14443
|
+
React$2.useEffect(function () {
|
|
14444
|
+
revalidate();
|
|
14445
|
+
clientI18nInstance.on("languageChanged", revalidate);
|
|
14446
|
+
return function () {
|
|
14447
|
+
return clientI18nInstance.off("languageChanged", revalidate);
|
|
14448
|
+
};
|
|
14449
|
+
}, [dataUpdateCount]);
|
|
14431
14450
|
var syncValuesWithLocalStorage = function syncValuesWithLocalStorage() {
|
|
14432
14451
|
return preserveValues && !isEmptyValues(values) && setWithExpiry("".concat(formId, "/values"), values);
|
|
14433
14452
|
};
|
|
@@ -14436,16 +14455,16 @@ var FormikWrap = function FormikWrap(_ref) {
|
|
|
14436
14455
|
onValuesChange && onValuesChange(values);
|
|
14437
14456
|
}, [values, formId, preserveValues]);
|
|
14438
14457
|
React$2.useEffect(function () {
|
|
14439
|
-
if (
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
|
|
14458
|
+
if (isSubmitting || isValid) return;
|
|
14459
|
+
|
|
14460
|
+
// include only touched fields
|
|
14461
|
+
var touchedErrors = Object.keys(errors).filter(function (key) {
|
|
14462
|
+
return touched[key];
|
|
14463
|
+
}).reduce(function (obj, key) {
|
|
14464
|
+
obj[key] = errors[key];
|
|
14465
|
+
return obj;
|
|
14466
|
+
}, {});
|
|
14467
|
+
if (isFunction$1(onError)) onError(touchedErrors);
|
|
14449
14468
|
}, [isValid, isSubmitting]);
|
|
14450
14469
|
return children;
|
|
14451
14470
|
};
|
|
@@ -17496,25 +17515,26 @@ function parsePhoneNumberWithError() {
|
|
|
17496
17515
|
return withMetadataArgument(parsePhoneNumberWithError$1, arguments)
|
|
17497
17516
|
}
|
|
17498
17517
|
|
|
17518
|
+
var t$2 = clientI18nInstance.t;
|
|
17499
17519
|
var getInvalidFieldError = function getInvalidFieldError(label) {
|
|
17500
|
-
return
|
|
17520
|
+
return t$2("neetoForm.error.invalidField", {
|
|
17501
17521
|
label: label
|
|
17502
17522
|
});
|
|
17503
17523
|
};
|
|
17504
17524
|
var getRequiredFieldError = function getRequiredFieldError(label) {
|
|
17505
|
-
return
|
|
17525
|
+
return t$2("neetoForm.error.requiredField", {
|
|
17506
17526
|
label: label
|
|
17507
17527
|
});
|
|
17508
17528
|
};
|
|
17509
17529
|
var getSelectMinError = function getSelectMinError(min) {
|
|
17510
|
-
var entity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "option";
|
|
17511
|
-
return
|
|
17530
|
+
var entity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : t$2("neetoForm.common.option");
|
|
17531
|
+
return t$2("neetoForm.error.selectMin", {
|
|
17512
17532
|
min: min,
|
|
17513
17533
|
entity: entity
|
|
17514
17534
|
});
|
|
17515
17535
|
};
|
|
17516
17536
|
var getInvalidTypeError = function getInvalidTypeError(label, type) {
|
|
17517
|
-
return
|
|
17537
|
+
return t$2("neetoForm.error.invalidType", {
|
|
17518
17538
|
label: label,
|
|
17519
17539
|
type: type
|
|
17520
17540
|
});
|
|
@@ -17524,6 +17544,7 @@ var _excluded$4 = ["kind", "label", "isRequired", "customValidator"];
|
|
|
17524
17544
|
var _fieldKindValidatorMa;
|
|
17525
17545
|
function ownKeys$k(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; }
|
|
17526
17546
|
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$k(Object(t), !0).forEach(function (r) { _defineProperty$6(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$k(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17547
|
+
var t$1 = clientI18nInstance.t;
|
|
17527
17548
|
yup__namespace.addMethod(yup__namespace.array, "unique", function () {
|
|
17528
17549
|
var field, message;
|
|
17529
17550
|
if (arguments.length > 1) {
|
|
@@ -17559,7 +17580,7 @@ var validateTextField = function validateTextField(_ref) {
|
|
|
17559
17580
|
isRequired = _ref.isRequired;
|
|
17560
17581
|
var schema = yup__namespace.string().typeError(getInvalidTypeError(label, "string"));
|
|
17561
17582
|
if (kind === QUESTION_KIND.PHONE.value) {
|
|
17562
|
-
schema = PhoneNumber$1.validation(getInvalidFieldError(
|
|
17583
|
+
schema = PhoneNumber$1.validation(getInvalidFieldError(t$1("neetoForm.common.phoneNumberValidation")));
|
|
17563
17584
|
}
|
|
17564
17585
|
if (isRequired) schema = schema.trim().required(getRequiredFieldError(label));
|
|
17565
17586
|
return schema.trim();
|
|
@@ -17602,18 +17623,20 @@ var validateStarRatingField = function validateStarRatingField(_ref7) {
|
|
|
17602
17623
|
var label = _ref7.label,
|
|
17603
17624
|
isRequired = _ref7.isRequired;
|
|
17604
17625
|
var schema = yup__namespace.string().typeError(getInvalidTypeError(label, "string"));
|
|
17605
|
-
if (isRequired)
|
|
17626
|
+
if (isRequired) {
|
|
17627
|
+
schema = schema.required(getSelectMinError("a", t$1("neetoForm.common.rating")));
|
|
17628
|
+
}
|
|
17606
17629
|
return schema.trim();
|
|
17607
17630
|
};
|
|
17608
17631
|
var validateTermsField = function validateTermsField(_ref8) {
|
|
17609
17632
|
var _ref8$isRequired = _ref8.isRequired,
|
|
17610
17633
|
isRequired = _ref8$isRequired === void 0 ? true : _ref8$isRequired;
|
|
17611
|
-
return isRequired ? yup__namespace["boolean"]().oneOf([true],
|
|
17634
|
+
return isRequired ? yup__namespace["boolean"]().oneOf([true], t$1("neetoForm.common.mustAcceptTermsAndConditions")) : yup__namespace["boolean"]().notRequired();
|
|
17612
17635
|
};
|
|
17613
17636
|
var validateConditionField = function validateConditionField(_ref9) {
|
|
17614
17637
|
var _ref9$isRequired = _ref9.isRequired,
|
|
17615
17638
|
isRequired = _ref9$isRequired === void 0 ? true : _ref9$isRequired;
|
|
17616
|
-
return isRequired ? yup__namespace["boolean"]().oneOf([true],
|
|
17639
|
+
return isRequired ? yup__namespace["boolean"]().oneOf([true], t$1("neetoForm.common.mustAcceptCondition")) : yup__namespace["boolean"]().notRequired();
|
|
17617
17640
|
};
|
|
17618
17641
|
var validateDateField = function validateDateField(_ref10) {
|
|
17619
17642
|
var label = _ref10.label,
|
|
@@ -17632,7 +17655,7 @@ var validateMultiEmailField = function validateMultiEmailField(_ref11) {
|
|
|
17632
17655
|
value: yup__namespace.string().email(getInvalidFieldError("Email")).trim()
|
|
17633
17656
|
})).nullable();
|
|
17634
17657
|
if (isRequired) {
|
|
17635
|
-
schema = schema.compact().min(1, getSelectMinError("an", "email"));
|
|
17658
|
+
schema = schema.compact().min(1, getSelectMinError("an", t$1("neetoForm.common.email")));
|
|
17636
17659
|
}
|
|
17637
17660
|
return schema;
|
|
17638
17661
|
};
|
|
@@ -17654,9 +17677,9 @@ var validateFileUploadField = function validateFileUploadField(_ref13) {
|
|
|
17654
17677
|
if (isRequired) {
|
|
17655
17678
|
files_schema = files_schema.of(yup__namespace.object().shape({
|
|
17656
17679
|
name: yup__namespace.string(),
|
|
17657
|
-
signedId: yup__namespace.string().required(
|
|
17658
|
-
url: yup__namespace.string().required(
|
|
17659
|
-
})).unique("name",
|
|
17680
|
+
signedId: yup__namespace.string().required(t$1("neetoForm.fileUpload.validations.waitForUpload")),
|
|
17681
|
+
url: yup__namespace.string().required(t$1("neetoForm.fileUpload.validations.waitForUpload"))
|
|
17682
|
+
})).unique("name", t$1("neetoForm.fileUpload.validations.removeDuplicates")).min(1, multipleFilesAllowed ? t$1("neetoForm.fileUpload.validations.atLeastOneFileRequired") : t$1("neetoForm.fileUpload.validations.fileIsRequired"));
|
|
17660
17683
|
}
|
|
17661
17684
|
return yup__namespace.object().shape({
|
|
17662
17685
|
files: files_schema
|
|
@@ -17798,6 +17821,7 @@ var ConditionField = function ConditionField(_ref) {
|
|
|
17798
17821
|
|
|
17799
17822
|
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; }
|
|
17800
17823
|
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), !0).forEach(function (r) { _defineProperty$6(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; }
|
|
17824
|
+
var t = clientI18nInstance.t;
|
|
17801
17825
|
var toEmailValues = function toEmailValues() {
|
|
17802
17826
|
var values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
17803
17827
|
return values.map(function (value) {
|
|
@@ -18092,23 +18116,21 @@ var renderErrorMessage = function renderErrorMessage(errorObject, maxFileSize, i
|
|
|
18092
18116
|
var code = error.code;
|
|
18093
18117
|
switch (code) {
|
|
18094
18118
|
case ERROR_CODES.FILE_TOO_LARGE:
|
|
18095
|
-
return
|
|
18119
|
+
return t("neetoForm.fileUpload.dropzone.errors.fileTooLarge", {
|
|
18096
18120
|
fileName: file.name,
|
|
18097
18121
|
maxSize: Math.round(maxFileSize / 1048576)
|
|
18098
18122
|
});
|
|
18099
18123
|
case ERROR_CODES.FILE_INVALID_TYPE:
|
|
18100
|
-
return
|
|
18124
|
+
return t("neetoForm.fileUpload.dropzone.errors.fileInvalidType", {
|
|
18101
18125
|
fileType: path__default["default"].extname(file.name)
|
|
18102
18126
|
});
|
|
18103
18127
|
case ERROR_CODES.TOO_MANY_FILES:
|
|
18104
18128
|
if (!isMultiple) {
|
|
18105
|
-
return
|
|
18106
|
-
maxFiles: 1
|
|
18107
|
-
});
|
|
18129
|
+
return t("neetoForm.fileUpload.dropzone.errors.tooManyFiles");
|
|
18108
18130
|
}
|
|
18109
18131
|
}
|
|
18110
18132
|
}
|
|
18111
|
-
return
|
|
18133
|
+
return t("neetoForm.fileUpload.dropzone.errors.defaultError", {
|
|
18112
18134
|
fileName: file.name
|
|
18113
18135
|
});
|
|
18114
18136
|
};
|
|
@@ -28994,6 +29016,10 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
28994
29016
|
var formikInnerRef = React$2.useRef();
|
|
28995
29017
|
var editorRef = React$2.useRef();
|
|
28996
29018
|
var queryClient = reactQuery.useQueryClient();
|
|
29019
|
+
React$2.useEffect(function () {
|
|
29020
|
+
if (ramda.equals(language, clientI18nInstance.resolvedLanguage)) return;
|
|
29021
|
+
clientI18nInstance.changeLanguage(language);
|
|
29022
|
+
}, [language]);
|
|
28997
29023
|
var _useTranslation = reactI18next.useTranslation(),
|
|
28998
29024
|
t = _useTranslation.t;
|
|
28999
29025
|
React$2.useEffect(function () {
|
|
@@ -29196,6 +29222,8 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
29196
29222
|
questions: []
|
|
29197
29223
|
} : _useForm$data,
|
|
29198
29224
|
isLoading = _useForm.isLoading;
|
|
29225
|
+
var _queryClient$getQuery = queryClient.getQueryState([QUERY_KEYS.QUESTIONS, formId, language]),
|
|
29226
|
+
dataUpdateCount = _queryClient$getQuery.dataUpdateCount;
|
|
29199
29227
|
var keyPressRef = useHotkeys__default["default"]("command+enter", ((_formikInnerRef$curre = formikInnerRef.current) === null || _formikInnerRef$curre === void 0 ? void 0 : _formikInnerRef$curre.handleSubmit) || neetoCist.noop, {
|
|
29200
29228
|
mode: "scoped"
|
|
29201
29229
|
});
|
|
@@ -29215,7 +29243,8 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
29215
29243
|
if (displayThankYou && showSuccess) {
|
|
29216
29244
|
return /*#__PURE__*/jsxRuntime.jsx(Success$1, {});
|
|
29217
29245
|
}
|
|
29218
|
-
return /*#__PURE__*/jsxRuntime.jsxs(
|
|
29246
|
+
return /*#__PURE__*/jsxRuntime.jsxs(reactI18next.I18nextProvider, {
|
|
29247
|
+
i18n: clientI18nInstance,
|
|
29219
29248
|
children: [showTitle && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
29220
29249
|
className: "py-6 text-center",
|
|
29221
29250
|
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], _objectSpread$2(_objectSpread$2({
|
|
@@ -29243,6 +29272,7 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
29243
29272
|
setFieldError = _ref5.setFieldError,
|
|
29244
29273
|
handleReset = _ref5.handleReset;
|
|
29245
29274
|
return /*#__PURE__*/jsxRuntime.jsxs(FormikWrap, {
|
|
29275
|
+
dataUpdateCount: dataUpdateCount,
|
|
29246
29276
|
formId: formId,
|
|
29247
29277
|
preserveValues: preserveValues,
|
|
29248
29278
|
onError: handleScrollToError,
|