@bigbinary/neeto-rules-frontend 2.7.29 → 2.7.31
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 +4 -0
- package/dist/.ready +1 -1
- package/dist/NeetoRules.js +1 -1
- package/dist/NeetoRulesBuilder.js +2 -2
- package/dist/NeetoRulesForm.js +5 -6
- package/dist/NeetoRulesForm.js.map +1 -1
- package/dist/RulePreview.js +1 -1
- package/dist/cjs/NeetoRulesForm.js +3 -4
- package/dist/cjs/NeetoRulesForm.js.map +1 -1
- package/dist/cjs/v2/NeetoRulesBuilder.js +43 -18
- package/dist/cjs/v2/NeetoRulesBuilder.js.map +1 -1
- package/dist/cjs/v2/NeetoRulesForm.js +3 -4
- package/dist/cjs/v2/NeetoRulesForm.js.map +1 -1
- package/dist/{index-DuotbpzE.js → index-Cr27L32X.js} +2 -2
- package/dist/{index-DuotbpzE.js.map → index-Cr27L32X.js.map} +1 -1
- package/dist/{index-B9wfLgdl.js → index-D7DIAuwa.js} +2 -2
- package/dist/{index-B9wfLgdl.js.map → index-D7DIAuwa.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{utils-Cp7CD4kh.js → utils-CeTB10_T.js} +2 -2
- package/dist/{utils-Cp7CD4kh.js.map → utils-CeTB10_T.js.map} +1 -1
- package/dist/v2/NeetoRules.js +1 -1
- package/dist/v2/NeetoRulesBuilder.js +46 -21
- package/dist/v2/NeetoRulesBuilder.js.map +1 -1
- package/dist/v2/NeetoRulesForm.js +5 -6
- package/dist/v2/NeetoRulesForm.js.map +1 -1
- package/dist/v2/RulePreview.js +1 -1
- package/dist/v2/index.js +2 -2
- package/package.json +7 -7
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-CeTB10_T.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-Cr27L32X.js';
|
|
58
58
|
import '@babel/runtime/helpers/typeof';
|
|
59
59
|
import 'yup';
|
|
60
60
|
import '@bigbinary/neeto-icons/Search';
|
|
@@ -68,5 +68,5 @@ var getDateTimeFormattedValue = function getDateTimeFormattedValue(_ref3) {
|
|
|
68
68
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
69
69
|
var dotPath = useWith(path, [split(".")]);
|
|
70
70
|
|
|
71
|
-
export { DATE_FORMAT as D, TIME_FORMAT as T, getDateTimeFormattedValue as a, getDateTimeValue as b, createRoutes as c,
|
|
72
|
-
//# sourceMappingURL=utils-
|
|
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-CeTB10_T.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-
|
|
1
|
+
{"version":3,"file":"utils-CeTB10_T.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 { 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 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","createRoutes","basePath","index","concat","edit","getSeparator","_ref","_selectedField$separa2","_selectedField$separa3","defaultSeparator","_ref$index","selectedField","separator","Array","isArray","_selectedField$separa","toLowerCase","getDateTimeValue","_ref2","_globalProps$user","format","type","timezone","dayjs","tz","globalProps","user","timeZone","getDateTimeFormattedValue","_ref3","dateFormat","parsedDate","dotPath","useWith","path","split"],"mappings":"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"}
|
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-DOwwMQ0G.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-CeTB10_T.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';
|
|
@@ -3,7 +3,7 @@ import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructurin
|
|
|
3
3
|
import { f as flatten, S as SHORTCUTS } from '../keyboardShortcuts-CsMwT9YF.js';
|
|
4
4
|
import { useShallow } from 'zustand/shallow';
|
|
5
5
|
import { useState, useRef, useEffect, Fragment, createElement, useCallback, useMemo, isValidElement } from 'react';
|
|
6
|
-
import { Button, Select, Input, Checkbox, Typography, RadioGroup, Textarea, DatePicker, Popover, Tooltip, MultiEmailInput, Spinner } from '@bigbinary/neeto-atoms';
|
|
6
|
+
import { Button, Select, Input, Checkbox, Typography, RadioGroup, Textarea, DatePicker, Popover, Tooltip, MultiEmailInput, TimePicker, Spinner } from '@bigbinary/neeto-atoms';
|
|
7
7
|
import { Input as Input$1, Select as Select$1, ActionBlock } from '@bigbinary/neeto-atoms/formik';
|
|
8
8
|
import classNames from 'classnames';
|
|
9
9
|
import { useFormikContext, getIn, useField, Formik, Form as Form$1 } from 'formik';
|
|
@@ -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-D7DIAuwa.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
|
|
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-CeTB10_T.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';
|
|
@@ -3625,7 +3625,8 @@ var CONDITION_VALUE_TYPES = {
|
|
|
3625
3625
|
multiSelectCreate: "multi-select-create",
|
|
3626
3626
|
number: "number",
|
|
3627
3627
|
email: "email",
|
|
3628
|
-
date: "date"
|
|
3628
|
+
date: "date",
|
|
3629
|
+
time: "time"
|
|
3629
3630
|
};
|
|
3630
3631
|
|
|
3631
3632
|
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -5040,6 +5041,21 @@ var RecipientPane = function RecipientPane(_ref) {
|
|
|
5040
5041
|
|
|
5041
5042
|
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5042
5043
|
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5044
|
+
var dateTimeMetaOf = function dateTimeMetaOf(field) {
|
|
5045
|
+
if ((field === null || field === void 0 ? void 0 : field.type) === CONDITION_VALUE_TYPES.time) {
|
|
5046
|
+
return {
|
|
5047
|
+
type: DATE_TIME_TYPES.time,
|
|
5048
|
+
format: TIME_FORMAT
|
|
5049
|
+
};
|
|
5050
|
+
}
|
|
5051
|
+
return field !== null && field !== void 0 && field.showTime ? {
|
|
5052
|
+
type: DATE_TIME_TYPES.datetime,
|
|
5053
|
+
format: DATE_TIME_FORMAT
|
|
5054
|
+
} : {
|
|
5055
|
+
type: DATE_TIME_TYPES.date,
|
|
5056
|
+
format: DATE_FORMAT
|
|
5057
|
+
};
|
|
5058
|
+
};
|
|
5043
5059
|
var ConditionValueFields = function ConditionValueFields(_ref) {
|
|
5044
5060
|
var name = _ref.name,
|
|
5045
5061
|
field = _ref.field,
|
|
@@ -5145,41 +5161,50 @@ var ConditionValueFields = function ConditionValueFields(_ref) {
|
|
|
5145
5161
|
})
|
|
5146
5162
|
});
|
|
5147
5163
|
}
|
|
5148
|
-
if (type === CONDITION_VALUE_TYPES.date) {
|
|
5164
|
+
if (type === CONDITION_VALUE_TYPES.date || type === CONDITION_VALUE_TYPES.time) {
|
|
5165
|
+
var _parsed$isValid;
|
|
5149
5166
|
var metadataPath = "".concat(name, ".metadata");
|
|
5150
5167
|
var metadata = getIn(values, metadataPath) || {};
|
|
5168
|
+
var _dateTimeMetaOf = dateTimeMetaOf(field),
|
|
5169
|
+
dateTimeType = _dateTimeMetaOf.type,
|
|
5170
|
+
format = _dateTimeMetaOf.format;
|
|
5171
|
+
var parsed = getDateTimeValue({
|
|
5172
|
+
date: metadata.value,
|
|
5173
|
+
format: metadata.format,
|
|
5174
|
+
type: metadata.type,
|
|
5175
|
+
timezone: metadata.timezone
|
|
5176
|
+
});
|
|
5151
5177
|
|
|
5152
5178
|
// Formik validates each write on a stale snapshot, so write it all at once.
|
|
5153
|
-
var
|
|
5179
|
+
var handleChange = function handleChange(date) {
|
|
5154
5180
|
var _globalProps$user;
|
|
5155
|
-
var format = field !== null && field !== void 0 && field.showTime ? DATE_TIME_FORMAT : DATE_FORMAT;
|
|
5156
5181
|
setFieldTouched(valuePath, true, false);
|
|
5157
5182
|
setFieldValue(metadataPath, _objectSpread$2(_objectSpread$2({}, metadata), {}, {
|
|
5158
5183
|
// eslint-disable-next-line @bigbinary/neeto/use-standard-date-time-formats
|
|
5159
5184
|
value: date ? dayjs(date).format(format) : "",
|
|
5160
|
-
type:
|
|
5185
|
+
type: dateTimeType,
|
|
5161
5186
|
format: format,
|
|
5162
5187
|
timezone: globalProps === null || globalProps === void 0 || (_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.timeZone
|
|
5163
5188
|
}));
|
|
5164
5189
|
};
|
|
5165
|
-
|
|
5190
|
+
var pickerProps = {
|
|
5166
5191
|
required: true,
|
|
5167
5192
|
error: fieldError(valuePath),
|
|
5168
|
-
|
|
5169
|
-
showTime: field === null || field === void 0 ? void 0 : field.showTime,
|
|
5170
|
-
timeFormat: "HH:mm",
|
|
5171
|
-
type: "date",
|
|
5172
|
-
value: getDateTimeValue({
|
|
5173
|
-
date: metadata.value,
|
|
5174
|
-
format: metadata.format,
|
|
5175
|
-
type: metadata.type,
|
|
5176
|
-
timezone: metadata.timezone
|
|
5177
|
-
}) || undefined,
|
|
5193
|
+
value: parsed !== null && parsed !== void 0 && (_parsed$isValid = parsed.isValid) !== null && _parsed$isValid !== void 0 && _parsed$isValid.call(parsed) ? parsed : null,
|
|
5178
5194
|
onBlur: function onBlur() {
|
|
5179
5195
|
return setFieldTouched(valuePath, true);
|
|
5180
5196
|
},
|
|
5181
|
-
onChange:
|
|
5182
|
-
}
|
|
5197
|
+
onChange: handleChange
|
|
5198
|
+
};
|
|
5199
|
+
return dateTimeType === DATE_TIME_TYPES.time ? /*#__PURE__*/jsx(TimePicker, _objectSpread$2(_objectSpread$2({}, pickerProps), {}, {
|
|
5200
|
+
format: "24",
|
|
5201
|
+
label: t("neetoRules.form.selectTime")
|
|
5202
|
+
})) : /*#__PURE__*/jsx(DatePicker, _objectSpread$2(_objectSpread$2({}, pickerProps), {}, {
|
|
5203
|
+
label: t("neetoRules.form.selectDate"),
|
|
5204
|
+
showTime: field === null || field === void 0 ? void 0 : field.showTime,
|
|
5205
|
+
timeFormat: "HH:mm",
|
|
5206
|
+
type: "date"
|
|
5207
|
+
}));
|
|
5183
5208
|
}
|
|
5184
5209
|
if (valueType === CONDITION_VALUE_TYPES.number) {
|
|
5185
5210
|
var _getIn;
|