@bigbinary/neeto-form-frontend 1.2.28 → 1.2.30
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 +1 -0
- package/dist/index.cjs.js +16 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ 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
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';
|
|
@@ -16160,6 +16160,10 @@ var renderErrorMessage = function renderErrorMessage(errorObject, maxFileSize, i
|
|
|
16160
16160
|
fileName: file.name
|
|
16161
16161
|
});
|
|
16162
16162
|
};
|
|
16163
|
+
var renderButtonsInOrder = function renderButtonsInOrder(buttonsArray, shouldReverse) {
|
|
16164
|
+
var orderedButtons = shouldReverse ? buttonsArray.reverse() : buttonsArray;
|
|
16165
|
+
return map(identity, orderedButtons);
|
|
16166
|
+
};
|
|
16163
16167
|
|
|
16164
16168
|
var _excluded$3 = ["value"];
|
|
16165
16169
|
dayjs.extend(weekOfYear);
|
|
@@ -27149,18 +27153,24 @@ var ExternalForm = function ExternalForm(_ref) {
|
|
|
27149
27153
|
style: "h3",
|
|
27150
27154
|
weight: "semibold"
|
|
27151
27155
|
}, t("neetoForm.questions.common.notFound"))), footer, !isEmpty(renderedQuestions) && /*#__PURE__*/React__default.createElement("div", {
|
|
27152
|
-
className: "mt-8 flex items-center justify-
|
|
27153
|
-
}, /*#__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({
|
|
27154
27163
|
disabled: isSubmitting || isSubmitted,
|
|
27164
|
+
key: "submit",
|
|
27165
|
+
label: t("neetoForm.common.submit"),
|
|
27155
27166
|
loading: isSubmitting,
|
|
27156
27167
|
type: "submit"
|
|
27157
|
-
}, submitButtonProps)),
|
|
27168
|
+
}, submitButtonProps)), /*#__PURE__*/React__default.createElement(Button$1, _extends$8({
|
|
27169
|
+
key: "reset",
|
|
27158
27170
|
label: t("neetoForm.common.reset"),
|
|
27159
27171
|
style: "secondary",
|
|
27160
27172
|
type: "reset"
|
|
27161
|
-
}, resetButtonProps)), cancelButtonProps && /*#__PURE__*/React__default.createElement(
|
|
27162
|
-
label: "Cancel"
|
|
27163
|
-
}, cancelButtonProps)))), !customSubmitHandler && /*#__PURE__*/React__default.createElement(Callout, {
|
|
27173
|
+
}, resetButtonProps))], isPresent$1(cancelButtonProps))))), !customSubmitHandler && /*#__PURE__*/React__default.createElement(Callout, {
|
|
27164
27174
|
callout: {
|
|
27165
27175
|
isVisible: isPresent$1(error),
|
|
27166
27176
|
title: t("neetoForm.callouts.submitError"),
|