@bigbinary/neeto-form-frontend 4.6.4-beta1 → 4.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.ready +1 -1
- package/dist/cjs/v2/BuildForm.js +13 -2
- package/dist/cjs/v2/BuildForm.js.map +1 -1
- package/dist/v2/BuildForm.js +13 -2
- package/dist/v2/BuildForm.js.map +1 -1
- package/package.json +15 -15
package/dist/v2/BuildForm.js
CHANGED
|
@@ -1086,6 +1086,7 @@ var RequiredSwitch = withT(function (_ref) {
|
|
|
1086
1086
|
return /*#__PURE__*/jsx("div", {
|
|
1087
1087
|
className: "w-full",
|
|
1088
1088
|
children: /*#__PURE__*/jsx(Switch, {
|
|
1089
|
+
dataTestId: "required",
|
|
1089
1090
|
label: t("neetoForm.common.required"),
|
|
1090
1091
|
name: "isRequired",
|
|
1091
1092
|
size: "default"
|
|
@@ -1360,6 +1361,7 @@ var Form$1 = function Form(_ref) {
|
|
|
1360
1361
|
"data-testid": "settings-card",
|
|
1361
1362
|
children: [isBasicSettingsVisible && /*#__PURE__*/jsxs(Fragment, {
|
|
1362
1363
|
children: [shouldShowRequiredSwitch && /*#__PURE__*/jsx(RequiredSwitch, {}), shouldShowHideSwitch && /*#__PURE__*/jsx(Switch, {
|
|
1364
|
+
dataTestId: "hide-question",
|
|
1363
1365
|
label: t("neetoForm.common.hideQuestion"),
|
|
1364
1366
|
name: "isHidden",
|
|
1365
1367
|
size: "default",
|
|
@@ -1371,11 +1373,13 @@ var Form$1 = function Form(_ref) {
|
|
|
1371
1373
|
labelProps: responseVisibleOnlyToHostSwitchLabelProps(responseVisibleOnlyToHostHelpDocUrl)
|
|
1372
1374
|
})]
|
|
1373
1375
|
}), canMarkResponsesAsReadOnly && /*#__PURE__*/jsx(Switch, {
|
|
1376
|
+
dataTestId: "read-only",
|
|
1374
1377
|
label: t("neetoForm.common.readOnly"),
|
|
1375
1378
|
labelProps: readOnlySwitchLabelProps(readOnlyHelpDocUrl),
|
|
1376
1379
|
name: "isReadOnly",
|
|
1377
1380
|
size: "default"
|
|
1378
1381
|
}), shouldShowSendSmsUpdatesSwitch && /*#__PURE__*/jsx(Switch, {
|
|
1382
|
+
dataTestId: "send-sms-updates",
|
|
1379
1383
|
disabled: isSmsUpdatesDisabled,
|
|
1380
1384
|
label: t("neetoForm.common.sendSmsUpdates"),
|
|
1381
1385
|
name: "sendSmsUpdates",
|
|
@@ -1396,6 +1400,7 @@ var Form$1 = function Form(_ref) {
|
|
|
1396
1400
|
children: t("neetoForm.callouts.whatsappUpdatesSingleField")
|
|
1397
1401
|
})
|
|
1398
1402
|
}), canConfigureDecimals && /*#__PURE__*/jsx(Switch, {
|
|
1403
|
+
dataTestId: "allow-decimals",
|
|
1399
1404
|
label: t("neetoForm.questions.common.allowDecimals"),
|
|
1400
1405
|
name: "allowDecimals"
|
|
1401
1406
|
}), isTextarea && enforceMinWordsInMultiLineTexts && /*#__PURE__*/jsx(Textarea, {})]
|
|
@@ -2302,7 +2307,8 @@ var buildHelpPopoverLabelProps = function buildHelpPopoverLabelProps(popoverDesc
|
|
|
2302
2307
|
|
|
2303
2308
|
var EmailDomains = function EmailDomains(_ref) {
|
|
2304
2309
|
var name = _ref.name,
|
|
2305
|
-
label = _ref.label
|
|
2310
|
+
label = _ref.label,
|
|
2311
|
+
dataTestId = _ref.dataTestId;
|
|
2306
2312
|
var _useTranslation = useTranslation(),
|
|
2307
2313
|
t = _useTranslation.t;
|
|
2308
2314
|
var _useField = useField({
|
|
@@ -2321,6 +2327,7 @@ var EmailDomains = function EmailDomains(_ref) {
|
|
|
2321
2327
|
className: "mb-4",
|
|
2322
2328
|
"data-testid": "multi-domain-input-container",
|
|
2323
2329
|
children: /*#__PURE__*/jsx(MultiEmailInput, {
|
|
2330
|
+
dataTestId: dataTestId,
|
|
2324
2331
|
label: label,
|
|
2325
2332
|
entryType: "domain",
|
|
2326
2333
|
error: meta.touched ? formatErrorMessage(meta.error) : "",
|
|
@@ -2341,7 +2348,8 @@ var EmailDomains = function EmailDomains(_ref) {
|
|
|
2341
2348
|
};
|
|
2342
2349
|
|
|
2343
2350
|
var RestrictDomainsBlock = function RestrictDomainsBlock(_ref) {
|
|
2344
|
-
var
|
|
2351
|
+
var dataTestId = _ref.dataTestId,
|
|
2352
|
+
switchName = _ref.switchName,
|
|
2345
2353
|
domainName = _ref.domainName,
|
|
2346
2354
|
isDomainRestrictionEnabled = _ref.isDomainRestrictionEnabled;
|
|
2347
2355
|
var _useBuildFormStore = useBuildFormStore(paths([["formState", "helpDocUrls", domainName], ["formState", "hostSpecificData", domainName]])),
|
|
@@ -2360,6 +2368,7 @@ var RestrictDomainsBlock = function RestrictDomainsBlock(_ref) {
|
|
|
2360
2368
|
labelProps: buildHelpPopoverLabelProps(popoverDescription, helpLink),
|
|
2361
2369
|
name: switchName
|
|
2362
2370
|
}), isDomainRestrictionEnabled && /*#__PURE__*/jsx(EmailDomains, {
|
|
2371
|
+
dataTestId: dataTestId,
|
|
2363
2372
|
label: description,
|
|
2364
2373
|
name: domainName
|
|
2365
2374
|
})]
|
|
@@ -2397,10 +2406,12 @@ var Email = function Email(_ref) {
|
|
|
2397
2406
|
className: "flex flex-col space-y-6",
|
|
2398
2407
|
children: !usesCustomSubmissionComponent && /*#__PURE__*/jsxs(Fragment, {
|
|
2399
2408
|
children: [/*#__PURE__*/jsx(RestrictDomainsBlock, {
|
|
2409
|
+
dataTestId: "whitelisted-domains",
|
|
2400
2410
|
domainName: "whitelistedDomains",
|
|
2401
2411
|
isDomainRestrictionEnabled: isDomainWhitelistingEnabled,
|
|
2402
2412
|
switchName: "isDomainWhitelistingEnabled"
|
|
2403
2413
|
}), /*#__PURE__*/jsx(RestrictDomainsBlock, {
|
|
2414
|
+
dataTestId: "blacklisted-domains",
|
|
2404
2415
|
domainName: "blacklistedDomains",
|
|
2405
2416
|
isDomainRestrictionEnabled: isDomainBlacklistingEnabled,
|
|
2406
2417
|
switchName: "isDomainBlacklistingEnabled"
|