@bigbinary/neeto-rules-frontend 2.7.38-beta1 → 2.7.39
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 +0 -2
- package/dist/.ready +1 -1
- package/dist/NeetoRules.js +1 -1
- package/dist/NeetoRulesBuilder.js +2 -2
- package/dist/NeetoRulesForm.js +2 -2
- package/dist/RulePreview.js +13 -18
- package/dist/RulePreview.js.map +1 -1
- package/dist/cjs/NeetoRules.js +1 -1
- package/dist/cjs/NeetoRulesBuilder.js +2 -2
- package/dist/cjs/NeetoRulesForm.js +2 -2
- package/dist/cjs/RulePreview.js +13 -18
- package/dist/cjs/RulePreview.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/v2/NeetoRules.js +1 -1
- package/dist/cjs/v2/NeetoRulesBuilder.js +2 -2
- package/dist/cjs/v2/NeetoRulesForm.js +7 -10
- package/dist/cjs/v2/NeetoRulesForm.js.map +1 -1
- package/dist/cjs/v2/RulePreview.js +13 -19
- package/dist/cjs/v2/RulePreview.js.map +1 -1
- package/dist/cjs/v2/index.js +2 -2
- package/dist/{index-Cr27L32X.js → index-5dTL7Uf8.js} +2 -2
- package/dist/{index-Cr27L32X.js.map → index-5dTL7Uf8.js.map} +1 -1
- package/dist/{index-Omo1J36W.js → index-DRTOsVi5.js} +2 -2
- package/dist/{index-Omo1J36W.js.map → index-DRTOsVi5.js.map} +1 -1
- package/dist/{index-DnUyU-KI.js → index-DU1giKOy.js} +2 -2
- package/dist/{index-DnUyU-KI.js.map → index-DU1giKOy.js.map} +1 -1
- package/dist/{index-D7DIAuwa.js → index-DeSkVcPm.js} +2 -2
- package/dist/{index-D7DIAuwa.js.map → index-DeSkVcPm.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{utils-B3roKiff.js → utils-CvvJ6wvi.js} +5 -1
- package/dist/utils-CvvJ6wvi.js.map +1 -0
- package/dist/{utils-CeTB10_T.js → utils-a-9NZPeQ.js} +6 -3
- package/dist/utils-a-9NZPeQ.js.map +1 -0
- package/dist/v2/NeetoRules.js +1 -1
- package/dist/v2/NeetoRulesBuilder.js +2 -2
- package/dist/v2/NeetoRulesForm.js +7 -10
- package/dist/v2/NeetoRulesForm.js.map +1 -1
- package/dist/v2/RulePreview.js +13 -19
- package/dist/v2/RulePreview.js.map +1 -1
- package/dist/v2/index.js +2 -2
- package/package.json +3 -3
- package/types.d.ts +1 -1
- package/dist/utils-B3roKiff.js.map +0 -1
- package/dist/utils-CeTB10_T.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ import '@babel/runtime/helpers/objectWithoutProperties';
|
|
|
34
34
|
import 'axios';
|
|
35
35
|
import '@bigbinary/neeto-molecules/Header';
|
|
36
36
|
import '@bigbinary/neetoui/Button';
|
|
37
|
-
import './utils-
|
|
37
|
+
import './utils-a-9NZPeQ.js';
|
|
38
38
|
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
39
39
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
40
40
|
import 'zustand/shallow';
|
|
@@ -54,7 +54,7 @@ import 'react-router-dom';
|
|
|
54
54
|
import '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
55
55
|
import './keyboardShortcuts-CsMwT9YF.js';
|
|
56
56
|
import 'classnames';
|
|
57
|
-
import './index-
|
|
57
|
+
import './index-5dTL7Uf8.js';
|
|
58
58
|
import '@babel/runtime/helpers/typeof';
|
|
59
59
|
import 'yup';
|
|
60
60
|
import '@bigbinary/neeto-icons/Search';
|
|
@@ -15,6 +15,9 @@ var TIME_FORMAT = "HH:mm";
|
|
|
15
15
|
var LOCALIZED_TIME_FORMAT = "LT";
|
|
16
16
|
var LOCALIZED_DATE_TIME_FORMAT = "ll LT";
|
|
17
17
|
|
|
18
|
+
var toLowerCaseValue = function toLowerCaseValue(value) {
|
|
19
|
+
return ramda.isNil(value) ? value : String(value).toLowerCase();
|
|
20
|
+
};
|
|
18
21
|
var createRoutes = function createRoutes(basePath) {
|
|
19
22
|
return {
|
|
20
23
|
index: basePath,
|
|
@@ -79,4 +82,5 @@ exports.dotPath = dotPath;
|
|
|
79
82
|
exports.getDateTimeFormattedValue = getDateTimeFormattedValue;
|
|
80
83
|
exports.getDateTimeValue = getDateTimeValue;
|
|
81
84
|
exports.getSeparator = getSeparator;
|
|
82
|
-
|
|
85
|
+
exports.toLowerCaseValue = toLowerCaseValue;
|
|
86
|
+
//# sourceMappingURL=utils-CvvJ6wvi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-CvvJ6wvi.js","sources":["../app/javascript/src/constants/dateTime.js","../app/javascript/src/utils.js"],"sourcesContent":["export const DATE_TIME_TYPES = {\n datetime: \"datetime\",\n date: \"date\",\n time: \"time\",\n};\n\nexport const DATE_FORMAT = \"YYYY-MM-DD\";\nexport const DATE_TIME_FORMAT = \"YYYY-MM-DD HH:mm\";\nexport const TIME_FORMAT = \"HH:mm\";\n\nexport const LOCALIZED_TIME_FORMAT = \"LT\";\nexport const LOCALIZED_DATE_TIME_FORMAT = \"ll LT\";\n","import { globalProps } from \"neetocommons/initializers\";\nimport { dayjs, dateFormat } from \"neetocommons/utils\";\nimport { isNil, path, split, useWith } from \"ramda\";\n\nimport {\n DATE_TIME_TYPES,\n LOCALIZED_TIME_FORMAT,\n LOCALIZED_DATE_TIME_FORMAT,\n} from \"./constants/dateTime\";\n\nexport const toLowerCaseValue = value =>\n isNil(value) ? value : String(value).toLowerCase();\n\nexport const createRoutes = basePath => ({\n index: basePath,\n new: `${basePath}/new`,\n edit: `${basePath}/:ruleId/edit`,\n});\n\nexport const getSeparator = ({\n defaultSeparator,\n index = 0,\n selectedField,\n}) => {\n if (!selectedField || !selectedField.separator) return defaultSeparator;\n\n if (!Array.isArray(selectedField.separator)) {\n return selectedField.separator?.toLowerCase();\n }\n\n return selectedField.separator[index]?.toLowerCase() ?? defaultSeparator;\n};\n\nexport const getDateTimeValue = ({ date, format, type, timezone }) => {\n if (!date) return \"\";\n\n if (type === DATE_TIME_TYPES.date) return dayjs(date);\n\n return dayjs.tz(date, format, timezone).tz(globalProps.user?.timeZone);\n};\n\nexport const getDateTimeFormattedValue = ({ date, format, type, timezone }) => {\n if (!date) return \"\";\n\n if (type === DATE_TIME_TYPES.date) return dateFormat.date(date);\n\n const parsedDate = getDateTimeValue({ date, format, type, timezone });\n\n if (type === DATE_TIME_TYPES.time) {\n return parsedDate.format(LOCALIZED_TIME_FORMAT);\n }\n\n if (type === DATE_TIME_TYPES.datetime) {\n return parsedDate.format(LOCALIZED_DATE_TIME_FORMAT);\n }\n\n return date;\n};\n\n// eslint-disable-next-line react-hooks/rules-of-hooks\nexport const dotPath = useWith(path, [split(\".\")]);\n"],"names":["DATE_TIME_TYPES","datetime","date","time","DATE_FORMAT","DATE_TIME_FORMAT","TIME_FORMAT","LOCALIZED_TIME_FORMAT","LOCALIZED_DATE_TIME_FORMAT","toLowerCaseValue","value","isNil","String","toLowerCase","createRoutes","basePath","index","concat","edit","getSeparator","_ref","_selectedField$separa2","_selectedField$separa3","defaultSeparator","_ref$index","selectedField","separator","Array","isArray","_selectedField$separa","getDateTimeValue","_ref2","_globalProps$user","format","type","timezone","dayjs","tz","globalProps","user","timeZone","getDateTimeFormattedValue","_ref3","dateFormat","parsedDate","dotPath","useWith","path","split"],"mappings":";;;;;;AAAO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,IAAI,EAAE;AACR;AAEO,IAAMC,WAAW,GAAG;AACpB,IAAMC,gBAAgB,GAAG;AACzB,IAAMC,WAAW,GAAG;AAEpB,IAAMC,qBAAqB,GAAG,IAAI;AAClC,IAAMC,0BAA0B,GAAG,OAAO;;ICDpCC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAGC,KAAK,EAAA;AAAA,EAAA,OACnCC,WAAK,CAACD,KAAK,CAAC,GAAGA,KAAK,GAAG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AAU,CAACX,MAAM,CAAC1B,qBAAqB,CAAC;AACjD,EAAA;AAEA,EAAA,IAAI2B,IAAI,KAAKlC,eAAe,CAACC,QAAQ,EAAE;AACrC,IAAA,OAAO2C,UAAU,CAACX,MAAM,CAACzB,0BAA0B,CAAC;AACtD,EAAA;AAEA,EAAA,OAAON,IAAI;AACb;;AAEA;AACO,IAAM2C,OAAO,GAAGC,aAAO,CAACC,UAAI,EAAE,CAACC,WAAK,CAAC,GAAG,CAAC,CAAC;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
2
2
|
import { dayjs, dateFormat } from '@bigbinary/neeto-commons-frontend/utils';
|
|
3
|
-
import { useWith, path, split } from 'ramda';
|
|
3
|
+
import { useWith, path, split, isNil } from 'ramda';
|
|
4
4
|
|
|
5
5
|
var DATE_TIME_TYPES = {
|
|
6
6
|
datetime: "datetime",
|
|
@@ -13,6 +13,9 @@ var TIME_FORMAT = "HH:mm";
|
|
|
13
13
|
var LOCALIZED_TIME_FORMAT = "LT";
|
|
14
14
|
var LOCALIZED_DATE_TIME_FORMAT = "ll LT";
|
|
15
15
|
|
|
16
|
+
var toLowerCaseValue = function toLowerCaseValue(value) {
|
|
17
|
+
return isNil(value) ? value : String(value).toLowerCase();
|
|
18
|
+
};
|
|
16
19
|
var createRoutes = function createRoutes(basePath) {
|
|
17
20
|
return {
|
|
18
21
|
index: basePath,
|
|
@@ -68,5 +71,5 @@ var getDateTimeFormattedValue = function getDateTimeFormattedValue(_ref3) {
|
|
|
68
71
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
69
72
|
var dotPath = useWith(path, [split(".")]);
|
|
70
73
|
|
|
71
|
-
export { DATE_FORMAT as D, TIME_FORMAT as T, getDateTimeFormattedValue as a, getDateTimeValue as b, createRoutes as c, DATE_TIME_TYPES as d, DATE_TIME_FORMAT as e, dotPath as f, getSeparator as g };
|
|
72
|
-
//# sourceMappingURL=utils-
|
|
74
|
+
export { DATE_FORMAT as D, TIME_FORMAT as T, getDateTimeFormattedValue as a, getDateTimeValue as b, createRoutes as c, DATE_TIME_TYPES as d, DATE_TIME_FORMAT as e, dotPath as f, getSeparator as g, toLowerCaseValue as t };
|
|
75
|
+
//# sourceMappingURL=utils-a-9NZPeQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils-a-9NZPeQ.js","sources":["../app/javascript/src/constants/dateTime.js","../app/javascript/src/utils.js"],"sourcesContent":["export const DATE_TIME_TYPES = {\n datetime: \"datetime\",\n date: \"date\",\n time: \"time\",\n};\n\nexport const DATE_FORMAT = \"YYYY-MM-DD\";\nexport const DATE_TIME_FORMAT = \"YYYY-MM-DD HH:mm\";\nexport const TIME_FORMAT = \"HH:mm\";\n\nexport const LOCALIZED_TIME_FORMAT = \"LT\";\nexport const LOCALIZED_DATE_TIME_FORMAT = \"ll LT\";\n","import { globalProps } from \"neetocommons/initializers\";\nimport { dayjs, dateFormat } from \"neetocommons/utils\";\nimport { isNil, path, split, useWith } from \"ramda\";\n\nimport {\n DATE_TIME_TYPES,\n LOCALIZED_TIME_FORMAT,\n LOCALIZED_DATE_TIME_FORMAT,\n} from \"./constants/dateTime\";\n\nexport const toLowerCaseValue = value =>\n isNil(value) ? value : String(value).toLowerCase();\n\nexport const createRoutes = basePath => ({\n index: basePath,\n new: `${basePath}/new`,\n edit: `${basePath}/:ruleId/edit`,\n});\n\nexport const getSeparator = ({\n defaultSeparator,\n index = 0,\n selectedField,\n}) => {\n if (!selectedField || !selectedField.separator) return defaultSeparator;\n\n if (!Array.isArray(selectedField.separator)) {\n return selectedField.separator?.toLowerCase();\n }\n\n return selectedField.separator[index]?.toLowerCase() ?? defaultSeparator;\n};\n\nexport const getDateTimeValue = ({ date, format, type, timezone }) => {\n if (!date) return \"\";\n\n if (type === DATE_TIME_TYPES.date) return dayjs(date);\n\n return dayjs.tz(date, format, timezone).tz(globalProps.user?.timeZone);\n};\n\nexport const getDateTimeFormattedValue = ({ date, format, type, timezone }) => {\n if (!date) return \"\";\n\n if (type === DATE_TIME_TYPES.date) return dateFormat.date(date);\n\n const parsedDate = getDateTimeValue({ date, format, type, timezone });\n\n if (type === DATE_TIME_TYPES.time) {\n return parsedDate.format(LOCALIZED_TIME_FORMAT);\n }\n\n if (type === DATE_TIME_TYPES.datetime) {\n return parsedDate.format(LOCALIZED_DATE_TIME_FORMAT);\n }\n\n return date;\n};\n\n// eslint-disable-next-line react-hooks/rules-of-hooks\nexport const dotPath = useWith(path, [split(\".\")]);\n"],"names":["DATE_TIME_TYPES","datetime","date","time","DATE_FORMAT","DATE_TIME_FORMAT","TIME_FORMAT","LOCALIZED_TIME_FORMAT","LOCALIZED_DATE_TIME_FORMAT","toLowerCaseValue","value","isNil","String","toLowerCase","createRoutes","basePath","index","concat","edit","getSeparator","_ref","_selectedField$separa2","_selectedField$separa3","defaultSeparator","_ref$index","selectedField","separator","Array","isArray","_selectedField$separa","getDateTimeValue","_ref2","_globalProps$user","format","type","timezone","dayjs","tz","globalProps","user","timeZone","getDateTimeFormattedValue","_ref3","dateFormat","parsedDate","dotPath","useWith","path","split"],"mappings":";;;;AAAO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,IAAI,EAAE;AACR;AAEO,IAAMC,WAAW,GAAG;AACpB,IAAMC,gBAAgB,GAAG;AACzB,IAAMC,WAAW,GAAG;AAEpB,IAAMC,qBAAqB,GAAG,IAAI;AAClC,IAAMC,0BAA0B,GAAG,OAAO;;ICDpCC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAGC,KAAK,EAAA;AAAA,EAAA,OACnCC,KAAK,CAACD,KAAK,CAAC,GAAGA,KAAK,GAAGE,MAAM,CAACF,KAAK,CAAC,CAACG,WAAW,EAAE;AAAA;IAEvCC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,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ACC,QAAQ,EAAE;AACrC,IAAA,OAAO2C,UAAU,CAACX,MAAM,CAACzB,0BAA0B,CAAC;AACtD,EAAA;AAEA,EAAA,OAAON,IAAI;AACb;;AAEA;AACO,IAAM2C,OAAO,GAAGC,OAAO,CAACC,IAAI,EAAE,CAACC,KAAK,CAAC,GAAG,CAAC,CAAC;;;;"}
|
package/dist/v2/NeetoRules.js
CHANGED
|
@@ -9,7 +9,7 @@ import { b as useUpdateAutomationRule, c as useCloneAutomationRule, d as useDele
|
|
|
9
9
|
import { I as INITIAL_RULES_DATA, R as RulesReorder } from '../index-DA8DSoSK.js';
|
|
10
10
|
import { Button, Typography, Switch, Spinner, DataTable, Alert, Empty } from '@bigbinary/neeto-atoms';
|
|
11
11
|
import Header$2 from '@bigbinary/neeto-molecules/v2/Header';
|
|
12
|
-
import { c as createRoutes } from '../utils-
|
|
12
|
+
import { c as createRoutes } from '../utils-a-9NZPeQ.js';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
14
14
|
import { useShallow } from 'zustand/shallow';
|
|
15
15
|
import { Workflow } from 'lucide-react';
|
|
@@ -11,7 +11,7 @@ import { isNotEmpty, toLabelAndValue, removeBy, findBy, isPresent, isNot, noop }
|
|
|
11
11
|
import Container from '@bigbinary/neeto-molecules/v2/Container';
|
|
12
12
|
import Header from '@bigbinary/neeto-molecules/v2/Header';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
|
-
import { r as useHasFieldChanged, s as areValuesEqual, t as useResetSaveAsTemplateOnHide, v as SelectTemplateField, E as EditorAction, w as SaveAsTemplate, x as setEditorContent, y as ApiFields, L as ListField, o as Panel, z as ErrorCallout, B as SmsFields, M as MIN_DELAY_VALUE, C as MAX_DELAY_VALUE, G as PhoneNumberField, l as formatData, u as usePollRuleName, T as TouchErrors, n as ScrollToErrorField, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE, m as buildPayload } from '../index-
|
|
14
|
+
import { r as useHasFieldChanged, s as areValuesEqual, t as useResetSaveAsTemplateOnHide, v as SelectTemplateField, E as EditorAction, w as SaveAsTemplate, x as setEditorContent, y as ApiFields, L as ListField, o as Panel, z as ErrorCallout, B as SmsFields, M as MIN_DELAY_VALUE, C as MAX_DELAY_VALUE, G as PhoneNumberField, l as formatData, u as usePollRuleName, T as TouchErrors, n as ScrollToErrorField, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE, m as buildPayload } from '../index-DeSkVcPm.js';
|
|
15
15
|
import { u as useCustomDataStore } from '../useCustomDataStore-CEbhXugO.js';
|
|
16
16
|
import { u as useUtilityStore } from '../useUtilityStore-BVCulMEC.js';
|
|
17
17
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
@@ -28,7 +28,7 @@ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
|
28
28
|
import useHotkeys from '@bigbinary/neeto-hotkeys';
|
|
29
29
|
import Search from '@bigbinary/neeto-icons/Search';
|
|
30
30
|
import { dayjs } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
31
|
-
import { D as DATE_FORMAT, b as getDateTimeValue, d as DATE_TIME_TYPES, T as TIME_FORMAT, e as DATE_TIME_FORMAT } from '../utils-
|
|
31
|
+
import { D as DATE_FORMAT, b as getDateTimeValue, d as DATE_TIME_TYPES, T as TIME_FORMAT, e as DATE_TIME_FORMAT } from '../utils-a-9NZPeQ.js';
|
|
32
32
|
import Up from '@bigbinary/neeto-icons/Up';
|
|
33
33
|
import Down from '@bigbinary/neeto-icons/Down';
|
|
34
34
|
import Info from '@bigbinary/neeto-icons/Info';
|
|
@@ -13,7 +13,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
13
13
|
import { u as useUtilityStore } from '../useUtilityStore-BVCulMEC.js';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { isNotNil, isEmpty, pluck } from 'ramda';
|
|
16
|
-
import { g as getActionOptions, a as getFieldDetails, b as getSlackChannelErrors, c as getOptionsKey, d as getActionLabel, A as ActionSubItem, F as FIELDS_WITH_OPTIONS, P as PANEL_TYPES, D as DEFAULT_RULE_ACTION, e as getLogicalOperatorOptions, f as getFieldDetails$1, h as getVerbOptions, R as RadioField$1, S as SelectField$1, V as ValueField, i as DEFAULT_DELAY, j as getAllEvents, O as OPERATORS$1, k as STATUS_KEYS, l as formatData, u as usePollRuleName, T as TouchErrors, m as buildPayload, n as ScrollToErrorField, o as Panel, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE } from '../index-
|
|
16
|
+
import { g as getActionOptions, a as getFieldDetails, b as getSlackChannelErrors, c as getOptionsKey, d as getActionLabel, A as ActionSubItem, F as FIELDS_WITH_OPTIONS, P as PANEL_TYPES, D as DEFAULT_RULE_ACTION, e as getLogicalOperatorOptions, f as getFieldDetails$1, h as getVerbOptions, R as RadioField$1, S as SelectField$1, V as ValueField, i as DEFAULT_DELAY, j as getAllEvents, O as OPERATORS$1, k as STATUS_KEYS, l as formatData, u as usePollRuleName, T as TouchErrors, m as buildPayload, n as ScrollToErrorField, o as Panel, p as getValidationSchema, q as DEFAULT_INITIAL_VALUE } from '../index-DeSkVcPm.js';
|
|
17
17
|
import { a as useActiveField, u as useCustomDataStore } from '../useCustomDataStore-CEbhXugO.js';
|
|
18
18
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
19
19
|
import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
@@ -35,7 +35,7 @@ import '../index-9h4B7JZZ.js';
|
|
|
35
35
|
import 'yup';
|
|
36
36
|
import '@monaco-editor/react';
|
|
37
37
|
import '@bigbinary/neeto-molecules/v2/DynamicVariables';
|
|
38
|
-
import '../utils-
|
|
38
|
+
import '../utils-a-9NZPeQ.js';
|
|
39
39
|
import '@bigbinary/neeto-commons-frontend/initializers';
|
|
40
40
|
import '@bigbinary/neeto-commons-frontend/utils';
|
|
41
41
|
import '@bigbinary/neeto-editor/v2/FormikEditor';
|
|
@@ -1199,9 +1199,7 @@ var TextareaField = function TextareaField(_ref) {
|
|
|
1199
1199
|
var ENABLED = STATUS_KEYS.ENABLED,
|
|
1200
1200
|
DISABLED = STATUS_KEYS.DISABLED;
|
|
1201
1201
|
var Status = function Status(_ref) {
|
|
1202
|
-
var
|
|
1203
|
-
var _ref$helpText = _ref.helpText,
|
|
1204
|
-
helpText = _ref$helpText === void 0 ? {} : _ref$helpText;
|
|
1202
|
+
var label = _ref.label;
|
|
1205
1203
|
var _useFormikContext = useFormikContext(),
|
|
1206
1204
|
status = _useFormikContext.values.status,
|
|
1207
1205
|
setFieldValue = _useFormikContext.setFieldValue;
|
|
@@ -1213,13 +1211,13 @@ var Status = function Status(_ref) {
|
|
|
1213
1211
|
};
|
|
1214
1212
|
return /*#__PURE__*/jsx(Switch, {
|
|
1215
1213
|
checked: defaultValue === ENABLED,
|
|
1216
|
-
label: t("neetoRules.labels.active"),
|
|
1214
|
+
label: label || t("neetoRules.labels.active"),
|
|
1217
1215
|
size: "lg",
|
|
1218
1216
|
labelProps: {
|
|
1219
1217
|
helpIconProps: {
|
|
1220
1218
|
icon: CircleHelp,
|
|
1221
1219
|
tooltipProps: {
|
|
1222
|
-
content:
|
|
1220
|
+
content: status.value === ENABLED ? t("neetoRules.tooltips.rule.active") : t("neetoRules.tooltips.rule.inactive")
|
|
1223
1221
|
}
|
|
1224
1222
|
}
|
|
1225
1223
|
},
|
|
@@ -1247,8 +1245,7 @@ var Form = function Form(_ref) {
|
|
|
1247
1245
|
handleCancel = _ref$handleCancel === void 0 ? noop : _ref$handleCancel,
|
|
1248
1246
|
_ref$showStatusSwitch = _ref.showStatusSwitch,
|
|
1249
1247
|
showStatusSwitch = _ref$showStatusSwitch === void 0 ? true : _ref$showStatusSwitch,
|
|
1250
|
-
|
|
1251
|
-
statusHelpText = _ref$statusHelpText === void 0 ? {} : _ref$statusHelpText,
|
|
1248
|
+
statusSwitchLabel = _ref.statusSwitchLabel,
|
|
1252
1249
|
_ref$payloadKey = _ref.payloadKey,
|
|
1253
1250
|
payloadKey = _ref$payloadKey === void 0 ? "rule" : _ref$payloadKey,
|
|
1254
1251
|
_ref$isNameGeneration = _ref.isNameGenerationDisabled,
|
|
@@ -1360,7 +1357,7 @@ var Form = function Form(_ref) {
|
|
|
1360
1357
|
})]
|
|
1361
1358
|
})]
|
|
1362
1359
|
}), showStatusSwitch && /*#__PURE__*/jsx(Status, {
|
|
1363
|
-
|
|
1360
|
+
label: statusSwitchLabel
|
|
1364
1361
|
})]
|
|
1365
1362
|
}), typeof _children === "function" ? _children === null || _children === void 0 ? void 0 : _children(_objectSpread$1({
|
|
1366
1363
|
values: values,
|