@bigbinary/neeto-form-frontend 1.2.48 → 1.2.50
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/index.cjs.js +8 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { noop as noop$4, findBy, slugify, filterBy, isNotEmpty, truncate, humani
|
|
|
5
5
|
import { withEventTargetValue, showThumbsUpToastr, getQueryParams, dateFormat } from '@bigbinary/neeto-commons-frontend/utils';
|
|
6
6
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
7
7
|
import { Tooltip, Dropdown as Dropdown$2, Alert, Typography, Button as Button$1, Label, Checkbox as Checkbox$1, Toastr, MultiEmailInput, DatePicker, Radio as Radio$1, Select, Textarea as Textarea$1, Input as Input$2, Spinner as Spinner$2 } from '@bigbinary/neetoui';
|
|
8
|
-
import { assoc, mergeLeft, prop, isEmpty, path, values, compose as compose$1, trim, useWith, split, either, isNil, equals, difference, reject, pluck, keys, pick, omit,
|
|
8
|
+
import { assoc, mergeLeft, prop, isEmpty, path, values, compose as compose$1, trim, useWith, split, either, isNil, equals, difference, reject, pluck, keys, pick, omit, isNotNil, insert, not, pipe as pipe$1, toLower, map, includes, identity, times, clamp as clamp$2, filter as filter$1 } from 'ramda';
|
|
9
9
|
import { useQuery, useQueryClient, useMutation } from 'react-query';
|
|
10
10
|
import i18next, { t as t$4 } from 'i18next';
|
|
11
11
|
import { Input, Email as Email$2, Phone as Phone$2, Globe, Up, Down, MenuHorizontal, Delete, Plus, NeetoInvisible, Checkbox as Checkbox$2, Radio, Dropdown as Dropdown$3, Rating as Rating$4, Smiley, Calendar, Upload, Check, Close, FileGeneric } from '@bigbinary/neeto-icons';
|
|
@@ -10038,6 +10038,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
10038
10038
|
"pr-4 md:pr-8": showAddQuestionDivider
|
|
10039
10039
|
})
|
|
10040
10040
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10041
|
+
"data-cy": "neeto-form-engine-question-accordion-header",
|
|
10041
10042
|
className: classnames({
|
|
10042
10043
|
"neeto-form-engine-question-accordion__header flex h-10 cursor-pointer select-none items-center justify-between px-3 py-2": true,
|
|
10043
10044
|
"neeto-ui-text-gray-700 border": !isExpanded,
|
|
@@ -10071,6 +10072,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
10071
10072
|
customTarget: function customTarget() {
|
|
10072
10073
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
10073
10074
|
className: "flex items-center justify-center border-0 bg-transparent outline-none",
|
|
10075
|
+
"data-cy": "neeto-form-engine-question-accordion-more-dropdown",
|
|
10074
10076
|
type: "button"
|
|
10075
10077
|
}, /*#__PURE__*/React__default.createElement(MenuHorizontal, null));
|
|
10076
10078
|
}
|
|
@@ -10331,6 +10333,7 @@ var Dropdown$1 = function Dropdown(_ref) {
|
|
|
10331
10333
|
number: index + 1
|
|
10332
10334
|
})
|
|
10333
10335
|
}), !freezeOptions && /*#__PURE__*/React__default.createElement(Button$1, {
|
|
10336
|
+
"data-cy": "neeto-form-engine-delete-option-button",
|
|
10334
10337
|
icon: Delete,
|
|
10335
10338
|
size: "small",
|
|
10336
10339
|
style: "text",
|
|
@@ -10604,6 +10607,7 @@ var MultipleChoice$1 = function MultipleChoice(_ref) {
|
|
|
10604
10607
|
number: index + 1
|
|
10605
10608
|
})
|
|
10606
10609
|
}), !freezeOptions && /*#__PURE__*/React__default.createElement(Button$1, {
|
|
10610
|
+
"data-cy": "neeto-form-engine-delete-option-button",
|
|
10607
10611
|
icon: Delete,
|
|
10608
10612
|
size: "small",
|
|
10609
10613
|
style: "text",
|
|
@@ -10852,6 +10856,7 @@ var SingleChoice$1 = function SingleChoice(_ref) {
|
|
|
10852
10856
|
number: index + 1
|
|
10853
10857
|
})
|
|
10854
10858
|
}), !freezeOptions && /*#__PURE__*/React__default.createElement(Button$1, {
|
|
10859
|
+
"data-cy": "neeto-form-engine-delete-option-button",
|
|
10855
10860
|
icon: Delete,
|
|
10856
10861
|
size: "small",
|
|
10857
10862
|
style: "text",
|
|
@@ -11789,10 +11794,10 @@ var Form = function Form(_ref) {
|
|
|
11789
11794
|
return humanize(questionKind);
|
|
11790
11795
|
};
|
|
11791
11796
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Alert, {
|
|
11792
|
-
isOpen: deleteQuestionIndex
|
|
11797
|
+
isOpen: isNotNil(deleteQuestionIndex),
|
|
11793
11798
|
submitButtonLabel: t("neetoForm.common.delete"),
|
|
11794
11799
|
title: t("neetoForm.questions.deleteAlert.title"),
|
|
11795
|
-
message: deleteQuestionIndex && /*#__PURE__*/React__default.createElement(Trans, {
|
|
11800
|
+
message: isNotNil(deleteQuestionIndex) && /*#__PURE__*/React__default.createElement(Trans, {
|
|
11796
11801
|
i18nKey: "neetoForm.questions.deleteAlert.message",
|
|
11797
11802
|
values: {
|
|
11798
11803
|
count: availableLanguages.length,
|
|
@@ -11909,7 +11914,7 @@ var getActiveQuestionKindDetails = function getActiveQuestionKindDetails(_ref) {
|
|
|
11909
11914
|
|
|
11910
11915
|
/* eslint-disable @bigbinary/neeto/file-name-and-export-name-standards */
|
|
11911
11916
|
var requiredLabelValidation = function requiredLabelValidation(schema, field) {
|
|
11912
|
-
return schema.required(i18next.t("neetoForm.common.fieldReq", {
|
|
11917
|
+
return schema.trim().required(i18next.t("neetoForm.common.fieldReq", {
|
|
11913
11918
|
field: field
|
|
11914
11919
|
}));
|
|
11915
11920
|
};
|