@bigbinary/neeto-form-frontend 1.2.27 → 1.2.29
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/en.json +3 -1
- package/dist/index.cjs.js +26 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +28 -16
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import { useField, useFormikContext, FieldArray, Form as Form$1, Formik, Field,
|
|
|
4
4
|
import { noop as noop$4, slugify, filterBy, findBy, removeBy, isPresent as isPresent$1, isNotEmpty, findById, notEqualsDeep } from '@bigbinary/neeto-cist';
|
|
5
5
|
import PageLoader from '@bigbinary/neeto-molecules/PageLoader';
|
|
6
6
|
import { Typography, Dropdown as Dropdown$2, Tooltip, Button as Button$1, Label, Checkbox as Checkbox$1, Alert, Toastr, MultiEmailInput, DatePicker, Radio as Radio$1, Select, Textarea as Textarea$1, Input as Input$2, Spinner as Spinner$2 } from '@bigbinary/neetoui';
|
|
7
|
-
import { assoc, prop, isEmpty, path, values, compose as compose$1, trim, useWith, split, either, isNil, equals, difference, reject, pluck, keys, pick, omit, insert, not, pipe as pipe$1, toLower, map, includes, isNotNil, times, filter as filter$1 } from 'ramda';
|
|
7
|
+
import { assoc, prop, isEmpty, path, values, compose as compose$1, trim, useWith, split, either, isNil, equals, difference, reject, pluck, keys, pick, omit, insert, not, pipe as pipe$1, toLower, map, includes, identity, isNotNil, times, filter as filter$1 } from 'ramda';
|
|
8
8
|
import { useQuery, useQueryClient, useMutation } from 'react-query';
|
|
9
9
|
import i18next, { t as t$4 } from 'i18next';
|
|
10
|
-
import { Input, Email as Email$2, Phone as Phone$2, Up, Down, MenuHorizontal,
|
|
10
|
+
import { Input, Email as Email$2, Phone as Phone$2, 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';
|
|
11
11
|
import axios from 'axios';
|
|
12
12
|
import ReactDOM, { unstable_batchedUpdates, flushSync as flushSync$1 } from 'react-dom';
|
|
13
13
|
import { Input as Input$1, Textarea, Checkbox, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
@@ -10145,15 +10145,17 @@ var FieldCode = withT(function (_ref) {
|
|
|
10145
10145
|
className: "mt-14",
|
|
10146
10146
|
label: t("neetoForm.questions.common.questionFields.field.fieldCode"),
|
|
10147
10147
|
name: "".concat(name, ".fieldCode"),
|
|
10148
|
-
|
|
10149
|
-
|
|
10150
|
-
|
|
10151
|
-
|
|
10152
|
-
|
|
10153
|
-
|
|
10154
|
-
|
|
10148
|
+
helpText: /*#__PURE__*/React__default.createElement(Trans, {
|
|
10149
|
+
i18nKey: "neetoForm.questions.common.questionFields.field.fieldCodeHelpDescription",
|
|
10150
|
+
components: {
|
|
10151
|
+
Link: /*#__PURE__*/React__default.createElement(Button$1, {
|
|
10152
|
+
className: "text-xs",
|
|
10153
|
+
href: FIELD_CODE_DOC,
|
|
10154
|
+
style: "link",
|
|
10155
|
+
target: "_blank"
|
|
10156
|
+
})
|
|
10155
10157
|
}
|
|
10156
|
-
}
|
|
10158
|
+
})
|
|
10157
10159
|
}));
|
|
10158
10160
|
});
|
|
10159
10161
|
|
|
@@ -16158,6 +16160,10 @@ var renderErrorMessage = function renderErrorMessage(errorObject, maxFileSize, i
|
|
|
16158
16160
|
fileName: file.name
|
|
16159
16161
|
});
|
|
16160
16162
|
};
|
|
16163
|
+
var renderButtonsInOrder = function renderButtonsInOrder(buttonsArray, shouldReverse) {
|
|
16164
|
+
var orderedButtons = shouldReverse ? buttonsArray.reverse() : buttonsArray;
|
|
16165
|
+
return map(identity, orderedButtons);
|
|
16166
|
+
};
|
|
16161
16167
|
|
|
16162
16168
|
var _excluded$3 = ["value"];
|
|
16163
16169
|
dayjs.extend(weekOfYear);
|
|
@@ -27147,18 +27153,24 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
27147
27153
|
style: "h3",
|
|
27148
27154
|
weight: "semibold"
|
|
27149
27155
|
}, t("neetoForm.questions.common.notFound"))), footer, !isEmpty(renderedQuestions) && /*#__PURE__*/React__default.createElement("div", {
|
|
27150
|
-
className: "mt-8 flex items-center justify-
|
|
27151
|
-
}, /*#__PURE__*/React__default.createElement(Button$1, _extends$8({
|
|
27156
|
+
className: "mt-8 flex items-center justify-between"
|
|
27157
|
+
}, cancelButtonProps && /*#__PURE__*/React__default.createElement(Button$1, _extends$8({
|
|
27158
|
+
label: t("neetoForm.common.cancel"),
|
|
27159
|
+
style: "secondary"
|
|
27160
|
+
}, cancelButtonProps)), /*#__PURE__*/React__default.createElement("div", {
|
|
27161
|
+
className: "flex gap-x-2"
|
|
27162
|
+
}, renderButtonsInOrder([/*#__PURE__*/React__default.createElement(Button$1, _extends$8({
|
|
27152
27163
|
disabled: isSubmitting || isSubmitted,
|
|
27164
|
+
key: "submit",
|
|
27165
|
+
label: t("neetoForm.common.submit"),
|
|
27153
27166
|
loading: isSubmitting,
|
|
27154
27167
|
type: "submit"
|
|
27155
|
-
}, submitButtonProps)),
|
|
27168
|
+
}, submitButtonProps)), /*#__PURE__*/React__default.createElement(Button$1, _extends$8({
|
|
27169
|
+
key: "reset",
|
|
27156
27170
|
label: t("neetoForm.common.reset"),
|
|
27157
27171
|
style: "secondary",
|
|
27158
27172
|
type: "reset"
|
|
27159
|
-
}, resetButtonProps)), cancelButtonProps && /*#__PURE__*/React__default.createElement(
|
|
27160
|
-
label: "Cancel"
|
|
27161
|
-
}, cancelButtonProps)))), !customSubmitHandler && /*#__PURE__*/React__default.createElement(Callout, {
|
|
27173
|
+
}, resetButtonProps))], isPresent$1(cancelButtonProps))))), !customSubmitHandler && /*#__PURE__*/React__default.createElement(Callout, {
|
|
27162
27174
|
callout: {
|
|
27163
27175
|
isVisible: isPresent$1(error),
|
|
27164
27176
|
title: t("neetoForm.callouts.submitError"),
|