@bigbinary/neeto-form-frontend 3.13.9 → 3.14.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/README.md +131 -81
- package/app/javascript/src/translations/ar.json +9 -1
- package/app/javascript/src/translations/bg.json +207 -0
- package/app/javascript/src/translations/ca.json +207 -0
- package/app/javascript/src/translations/cs.json +9 -1
- package/app/javascript/src/translations/da.json +207 -0
- package/app/javascript/src/translations/de.json +9 -1
- package/app/javascript/src/translations/en.json +10 -1
- package/app/javascript/src/translations/es-MX.json +207 -0
- package/app/javascript/src/translations/es.json +9 -1
- package/app/javascript/src/translations/et.json +207 -0
- package/app/javascript/src/translations/fi.json +207 -0
- package/app/javascript/src/translations/fil.json +207 -0
- package/app/javascript/src/translations/fr.json +9 -1
- package/app/javascript/src/translations/hi.json +207 -0
- package/app/javascript/src/translations/hr.json +207 -0
- package/app/javascript/src/translations/id.json +207 -0
- package/app/javascript/src/translations/it.json +9 -1
- package/app/javascript/src/translations/ja.json +207 -0
- package/app/javascript/src/translations/ko.json +207 -0
- package/app/javascript/src/translations/nl.json +9 -1
- package/app/javascript/src/translations/pl.json +9 -1
- package/app/javascript/src/translations/pt-BR.json +207 -0
- package/app/javascript/src/translations/pt.json +9 -1
- package/app/javascript/src/translations/ro.json +9 -1
- package/app/javascript/src/translations/ru.json +9 -1
- package/app/javascript/src/translations/sk.json +207 -0
- package/app/javascript/src/translations/sl.json +207 -0
- package/app/javascript/src/translations/sv.json +207 -0
- package/app/javascript/src/translations/th.json +207 -0
- package/app/javascript/src/translations/tr.json +207 -0
- package/app/javascript/src/translations/uk.json +207 -0
- package/app/javascript/src/translations/vi.json +207 -0
- package/app/javascript/src/translations/zh-CN.json +207 -0
- package/app/javascript/src/translations/zh-TW.json +207 -0
- package/dist/BuildForm.js +32 -7
- package/dist/BuildForm.js.map +1 -1
- package/dist/ExternalForm.js +39 -32
- package/dist/ExternalForm.js.map +1 -1
- package/dist/Submission.js +1 -1
- package/dist/UrlBuilder.js +10 -6
- package/dist/UrlBuilder.js.map +1 -1
- package/dist/{buildForm-miMj_S28.js → buildForm-CXy5L1RP.js} +2 -2
- package/dist/{buildForm-miMj_S28.js.map → buildForm-CXy5L1RP.js.map} +1 -1
- package/dist/{buildForm-DQ2wgwuW.js → buildForm-DNCW7prR.js} +2 -2
- package/dist/{buildForm-DQ2wgwuW.js.map → buildForm-DNCW7prR.js.map} +1 -1
- package/dist/cjs/BuildForm.js +32 -7
- package/dist/cjs/BuildForm.js.map +1 -1
- package/dist/cjs/ExternalForm.js +38 -31
- package/dist/cjs/ExternalForm.js.map +1 -1
- package/dist/cjs/Submission.js +1 -1
- package/dist/cjs/UrlBuilder.js +10 -6
- package/dist/cjs/UrlBuilder.js.map +1 -1
- package/dist/cjs/hooks.js +4 -4
- package/dist/cjs/index.js +8 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/{constants-Dq9-rvtB.js → constants-BVZZfXua.js} +5 -1
- package/dist/constants-BVZZfXua.js.map +1 -0
- package/dist/{constants-R6y-Scns.js → constants-Bw2NSI7-.js} +5 -4
- package/dist/constants-Bw2NSI7-.js.map +1 -0
- package/dist/{constants-CDhYxmSQ.js → constants-VzpftVgP.js} +5 -3
- package/dist/constants-VzpftVgP.js.map +1 -0
- package/dist/{constants-DBuFEVFA.js → constants-b1EQ6-AS.js} +4 -2
- package/dist/constants-b1EQ6-AS.js.map +1 -0
- package/dist/hooks.js +4 -4
- package/dist/{index-CAtNQTCZ.js → index-BARvqe7c.js} +2 -2
- package/dist/{index-CAtNQTCZ.js.map → index-BARvqe7c.js.map} +1 -1
- package/dist/{index-BGEdOqsc.js → index-BkNaYmLc.js} +2 -2
- package/dist/{index-BGEdOqsc.js.map → index-BkNaYmLc.js.map} +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/{useFormSubmission-Bor3TuEO.js → useFormSubmission-CYqHLtkA.js} +2 -2
- package/dist/{useFormSubmission-Bor3TuEO.js.map → useFormSubmission-CYqHLtkA.js.map} +1 -1
- package/dist/{useFormSubmission-D3Bxhy6g.js → useFormSubmission-DMoyM44A.js} +2 -2
- package/dist/{useFormSubmission-D3Bxhy6g.js.map → useFormSubmission-DMoyM44A.js.map} +1 -1
- package/dist/{utils-BThu7JWp.js → utils-BjgmM0Qs.js} +521 -55
- package/dist/utils-BjgmM0Qs.js.map +1 -0
- package/dist/{utils-1blEk5zb.js → utils-DdrUdmyb.js} +512 -45
- package/dist/utils-DdrUdmyb.js.map +1 -0
- package/package.json +15 -15
- package/dist/constants-CDhYxmSQ.js.map +0 -1
- package/dist/constants-DBuFEVFA.js.map +0 -1
- package/dist/constants-Dq9-rvtB.js.map +0 -1
- package/dist/constants-R6y-Scns.js.map +0 -1
- package/dist/utils-1blEk5zb.js.map +0 -1
- package/dist/utils-BThu7JWp.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildForm-
|
|
1
|
+
{"version":3,"file":"buildForm-DNCW7prR.js","sources":["../app/javascript/src/stores/buildForm.js"],"sourcesContent":["import i18next from \"i18next\";\nimport { noop } from \"neetocist\";\nimport { withImmutableActions } from \"neetocommons/react-utils\";\nimport { mergeLeft, modify, prop } from \"ramda\";\nimport { create } from \"zustand\";\n\nimport { isFunction } from \"utils\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useBuildFormStore = create(\n withImmutableActions(set => ({\n formState: {\n selectedLanguage: i18next.resolvedLanguage,\n onLanguageChange: noop,\n formId: null,\n enabled: false,\n title: \"\",\n helpDocUrls: {},\n isUsingDefaultQuestionKinds: true,\n usesCustomSubmissionComponent: false,\n hostSpecificData: {},\n isReorderingQuestions: false,\n onMutateSuccess: noop,\n },\n\n setFormData: arg =>\n set(modify(\"formState\", isFunction(arg) ? arg : mergeLeft(arg))),\n }))\n);\n\nexport const useBuildFormState = () => useBuildFormStore(prop(\"formState\"));\n\nexport default useBuildFormStore;\n"],"names":["useBuildFormStore","create","withImmutableActions","set","formState","selectedLanguage","i18next","resolvedLanguage","onLanguageChange","noop","formId","enabled","title","helpDocUrls","isUsingDefaultQuestionKinds","usesCustomSubmissionComponent","hostSpecificData","isReorderingQuestions","onMutateSuccess","setFormData","arg","modify","isFunction","mergeLeft","useBuildFormState","prop"],"mappings":";;;;;;;AAQA;AACA,IAAMA,iBAAiB,GAAGC,MAAM,CAC9BC,oBAAoB,CAAC,UAAAC,GAAG,EAAA;EAAA,OAAK;AAC3BC,IAAAA,SAAS,EAAE;MACTC,gBAAgB,EAAEC,OAAO,CAACC,gBAAgB;AAC1CC,MAAAA,gBAAgB,EAAEC,IAAI;AACtBC,MAAAA,MAAM,EAAE,IAAI;AACZC,MAAAA,OAAO,EAAE,KAAK;AACdC,MAAAA,KAAK,EAAE,EAAE;MACTC,WAAW,EAAE,EAAE;AACfC,MAAAA,2BAA2B,EAAE,IAAI;AACjCC,MAAAA,6BAA6B,EAAE,KAAK;MACpCC,gBAAgB,EAAE,EAAE;AACpBC,MAAAA,qBAAqB,EAAE,KAAK;AAC5BC,MAAAA,eAAe,EAAET;KAClB;AAEDU,IAAAA,WAAW,EAAE,SAAbA,WAAWA,CAAEC,GAAG,EAAA;AAAA,MAAA,OACdjB,GAAG,CAACkB,MAAM,CAAC,WAAW,EAAEC,UAAU,CAACF,GAAG,CAAC,GAAGA,GAAG,GAAGG,SAAS,CAACH,GAAG,CAAC,CAAC,CAAC;AAAA;GACnE;AAAA,CAAC,CACJ;AAEaI,IAAAA,iBAAiB,GAAG,SAApBA,iBAAiBA,GAAA;AAAA,EAAA,OAASxB,iBAAiB,CAACyB,IAAI,CAAC,WAAW,CAAC,CAAC;AAAA;;;;"}
|
package/dist/cjs/BuildForm.js
CHANGED
|
@@ -5,14 +5,14 @@ var classnames = require('classnames');
|
|
|
5
5
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
6
6
|
var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
7
7
|
var ramda = require('ramda');
|
|
8
|
-
var constants = require('../constants-
|
|
9
|
-
var constants$1 = require('../constants-
|
|
8
|
+
var constants = require('../constants-BVZZfXua.js');
|
|
9
|
+
var constants$1 = require('../constants-VzpftVgP.js');
|
|
10
10
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
11
11
|
var React = require('react');
|
|
12
12
|
var dnd = require('@hello-pangea/dnd');
|
|
13
13
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
14
14
|
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
15
|
-
var buildForm = require('../buildForm-
|
|
15
|
+
var buildForm = require('../buildForm-CXy5L1RP.js');
|
|
16
16
|
var shallow = require('zustand/shallow');
|
|
17
17
|
var Alert = require('@bigbinary/neetoui/Alert');
|
|
18
18
|
var reactI18next = require('react-i18next');
|
|
@@ -23,7 +23,7 @@ var MoreDropdown = require('@bigbinary/neeto-molecules/MoreDropdown');
|
|
|
23
23
|
var Dropdown = require('@bigbinary/neetoui/Dropdown');
|
|
24
24
|
var Tooltip = require('@bigbinary/neetoui/Tooltip');
|
|
25
25
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
26
|
-
var index = require('../index-
|
|
26
|
+
var index = require('../index-BARvqe7c.js');
|
|
27
27
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
28
28
|
var i18next = require('i18next');
|
|
29
29
|
var uuid = require('uuid');
|
|
@@ -1430,6 +1430,10 @@ var DOMAIN_RESTRICTION_TRANSLATIONS = {
|
|
|
1430
1430
|
popoverDescription: i18next.t("neetoForm.domainRestriction.blacklistedDomains.popoverDescription")
|
|
1431
1431
|
}
|
|
1432
1432
|
};
|
|
1433
|
+
var EMAIL_VERIFICATION_TRANSLATIONS = {
|
|
1434
|
+
title: i18next.t("neetoForm.emailVerification.label"),
|
|
1435
|
+
popoverDescription: i18next.t("neetoForm.emailVerification.popoverDescription")
|
|
1436
|
+
};
|
|
1433
1437
|
|
|
1434
1438
|
var _excluded$2 = ["children"];
|
|
1435
1439
|
function ownKeys$4(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; }
|
|
@@ -1733,7 +1737,6 @@ var RestrictDomainsBlock = function RestrictDomainsBlock(_ref) {
|
|
|
1733
1737
|
className: "flex flex-col space-y-4",
|
|
1734
1738
|
"data-cy": "".concat(neetoCist.hyphenate(switchName), "-container"),
|
|
1735
1739
|
children: [/*#__PURE__*/jsxRuntime.jsx(SwitchBlock, {
|
|
1736
|
-
className: "mt-4",
|
|
1737
1740
|
name: switchName,
|
|
1738
1741
|
title: /*#__PURE__*/jsxRuntime.jsx(TitleWithHelpPopover, {
|
|
1739
1742
|
helpLink: helpLink,
|
|
@@ -1747,6 +1750,28 @@ var RestrictDomainsBlock = function RestrictDomainsBlock(_ref) {
|
|
|
1747
1750
|
});
|
|
1748
1751
|
};
|
|
1749
1752
|
|
|
1753
|
+
var VerifyEmails = function VerifyEmails() {
|
|
1754
|
+
var _useBuildFormStore = buildForm.useBuildFormStore(ramda.paths([["formState", "helpDocUrls", "emailVerification"], ["formState", "hostSpecificData", "emailVerification"]])),
|
|
1755
|
+
_useBuildFormStore2 = _slicedToArray(_useBuildFormStore, 2),
|
|
1756
|
+
helpLink = _useBuildFormStore2[0],
|
|
1757
|
+
hostSpecificTranslations = _useBuildFormStore2[1];
|
|
1758
|
+
var _mergeLeft = ramda.mergeLeft(hostSpecificTranslations, EMAIL_VERIFICATION_TRANSLATIONS),
|
|
1759
|
+
title = _mergeLeft.title,
|
|
1760
|
+
popoverDescription = _mergeLeft.popoverDescription;
|
|
1761
|
+
return /*#__PURE__*/jsxRuntime.jsx(Switch, {
|
|
1762
|
+
name: "isVerificationEnabled",
|
|
1763
|
+
label: /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
1764
|
+
component: "span",
|
|
1765
|
+
style: "body1",
|
|
1766
|
+
children: /*#__PURE__*/jsxRuntime.jsx(TitleWithHelpPopover, {
|
|
1767
|
+
helpLink: helpLink,
|
|
1768
|
+
title: title,
|
|
1769
|
+
description: popoverDescription
|
|
1770
|
+
})
|
|
1771
|
+
})
|
|
1772
|
+
});
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1750
1775
|
var Email = function Email(_ref) {
|
|
1751
1776
|
var usesCustomSubmissionComponent = _ref.usesCustomSubmissionComponent;
|
|
1752
1777
|
var _useFormikContext = formik.useFormikContext(),
|
|
@@ -1756,7 +1781,7 @@ var Email = function Email(_ref) {
|
|
|
1756
1781
|
_useFormikContext$val3 = _useFormikContext$val.isDomainBlacklistingEnabled,
|
|
1757
1782
|
isDomainBlacklistingEnabled = _useFormikContext$val3 === void 0 ? false : _useFormikContext$val3;
|
|
1758
1783
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1759
|
-
className: "flex flex-col",
|
|
1784
|
+
className: "flex flex-col space-y-4",
|
|
1760
1785
|
children: !usesCustomSubmissionComponent && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1761
1786
|
children: [/*#__PURE__*/jsxRuntime.jsx(RestrictDomainsBlock, {
|
|
1762
1787
|
domainName: "whitelistedDomains",
|
|
@@ -1766,7 +1791,7 @@ var Email = function Email(_ref) {
|
|
|
1766
1791
|
domainName: "blacklistedDomains",
|
|
1767
1792
|
isDomainRestrictionEnabled: isDomainBlacklistingEnabled,
|
|
1768
1793
|
switchName: "isDomainBlacklistingEnabled"
|
|
1769
|
-
})]
|
|
1794
|
+
}), /*#__PURE__*/jsxRuntime.jsx(VerifyEmails, {})]
|
|
1770
1795
|
})
|
|
1771
1796
|
});
|
|
1772
1797
|
};
|