@bigbinary/neeto-rules-frontend 2.7.28 → 2.7.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/dist/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-09-11T11:12:10.240Z
1
+ Built at 2026-09-15T09:11:51.390Z
@@ -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-CfUbVR_5.js';
10
10
  import Header$2 from '@bigbinary/neeto-molecules/Header';
11
11
  import Button from '@bigbinary/neetoui/Button';
12
- import { c as createRoutes } from './utils-Cp7CD4kh.js';
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 FilterBar from '@bigbinary/neeto-filters-frontend/Bar';
@@ -11,7 +11,7 @@ import Header from '@bigbinary/neeto-molecules/Header';
11
11
  import Spinner from '@bigbinary/neetoui/Spinner';
12
12
  import ActionBlock from '@bigbinary/neetoui/formik/ActionBlock';
13
13
  import { useTranslation } from 'react-i18next';
14
- import { E as EditorAction, o as Panel, r as ErrorCallout, s as SmsFields, M as MIN_DELAY_VALUE, t as MAX_DELAY_VALUE, v 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-DuotbpzE.js';
14
+ import { E as EditorAction, o as Panel, r as ErrorCallout, s as SmsFields, M as MIN_DELAY_VALUE, t as MAX_DELAY_VALUE, v 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-Cr27L32X.js';
15
15
  import { u as useCustomDataStore } from './useCustomDataStore-BtKYtLVc.js';
16
16
  import { u as useUtilityStore } from './useUtilityStore-CCUYS1mS.js';
17
17
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
@@ -34,7 +34,7 @@ import Checkbox from '@bigbinary/neetoui/Checkbox';
34
34
  import DatePicker from '@bigbinary/neetoui/DatePicker';
35
35
  import Radio from '@bigbinary/neetoui/Radio';
36
36
  import Textarea from '@bigbinary/neetoui/Textarea';
37
- import { D as DATE_FORMAT } from './utils-Cp7CD4kh.js';
37
+ import { D as DATE_FORMAT } from './utils-CeTB10_T.js';
38
38
  import Input$1 from '@bigbinary/neetoui/formik/Input';
39
39
  import Select from '@bigbinary/neetoui/formik/Select';
40
40
  import Select$1 from '@bigbinary/neetoui/Select';
@@ -15,7 +15,7 @@ import { u as useUtilityStore } from './useUtilityStore-CCUYS1mS.js';
15
15
  import classNames from 'classnames';
16
16
  import Typography from '@bigbinary/neetoui/Typography';
17
17
  import { isNotNil, isEmpty, pluck } from 'ramda';
18
- 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-DuotbpzE.js';
18
+ 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-Cr27L32X.js';
19
19
  import { a as useActiveField, u as useCustomDataStore } from './useCustomDataStore-BtKYtLVc.js';
20
20
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
21
21
  import { joinHyphenCase } from '@bigbinary/neeto-commons-frontend/utils';
@@ -58,7 +58,7 @@ import '@monaco-editor/react';
58
58
  import '@bigbinary/neeto-molecules/DynamicVariables';
59
59
  import '@bigbinary/neetoui/Select';
60
60
  import '@bigbinary/neetoui/DatePicker';
61
- import './utils-Cp7CD4kh.js';
61
+ import './utils-CeTB10_T.js';
62
62
  import '@bigbinary/neeto-commons-frontend/initializers';
63
63
  import '@bigbinary/neetoui/formik/MultiEmailInput';
64
64
  import '@bigbinary/neeto-editor/FormikEditor';
@@ -13,7 +13,7 @@ import Down from '@bigbinary/neeto-icons/Down';
13
13
  import Up from '@bigbinary/neeto-icons/Up';
14
14
  import Button from '@bigbinary/neetoui/Button';
15
15
  import { pluck } from 'ramda';
16
- import { g as getSeparator, a as getDateTimeFormattedValue } from './utils-Cp7CD4kh.js';
16
+ import { g as getSeparator, a as getDateTimeFormattedValue } from './utils-CeTB10_T.js';
17
17
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
18
18
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
19
19
  import Tooltip from '@bigbinary/neetoui/Tooltip';
@@ -13,7 +13,7 @@ var neetoCist = require('@bigbinary/neeto-cist');
13
13
  var Container = require('@bigbinary/neeto-molecules/v2/Container');
14
14
  var Header = require('@bigbinary/neeto-molecules/v2/Header');
15
15
  var reactI18next = require('react-i18next');
16
- var index = require('../../index-DvquzIBi.js');
16
+ var index = require('../../index-DnUyU-KI.js');
17
17
  var useCustomDataStore = require('../../useCustomDataStore-DPmWkEhs.js');
18
18
  var useUtilityStore = require('../../useUtilityStore-gtPhFvpI.js');
19
19
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
@@ -3646,7 +3646,8 @@ var CONDITION_VALUE_TYPES = {
3646
3646
  multiSelectCreate: "multi-select-create",
3647
3647
  number: "number",
3648
3648
  email: "email",
3649
- date: "date"
3649
+ date: "date",
3650
+ time: "time"
3650
3651
  };
3651
3652
 
3652
3653
  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; }
@@ -5061,6 +5062,21 @@ var RecipientPane = function RecipientPane(_ref) {
5061
5062
 
5062
5063
  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; }
5063
5064
  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; }
5065
+ var dateTimeMetaOf = function dateTimeMetaOf(field) {
5066
+ if ((field === null || field === void 0 ? void 0 : field.type) === CONDITION_VALUE_TYPES.time) {
5067
+ return {
5068
+ type: utils$1.DATE_TIME_TYPES.time,
5069
+ format: utils$1.TIME_FORMAT
5070
+ };
5071
+ }
5072
+ return field !== null && field !== void 0 && field.showTime ? {
5073
+ type: utils$1.DATE_TIME_TYPES.datetime,
5074
+ format: utils$1.DATE_TIME_FORMAT
5075
+ } : {
5076
+ type: utils$1.DATE_TIME_TYPES.date,
5077
+ format: utils$1.DATE_FORMAT
5078
+ };
5079
+ };
5064
5080
  var ConditionValueFields = function ConditionValueFields(_ref) {
5065
5081
  var name = _ref.name,
5066
5082
  field = _ref.field,
@@ -5166,41 +5182,50 @@ var ConditionValueFields = function ConditionValueFields(_ref) {
5166
5182
  })
5167
5183
  });
5168
5184
  }
5169
- if (type === CONDITION_VALUE_TYPES.date) {
5185
+ if (type === CONDITION_VALUE_TYPES.date || type === CONDITION_VALUE_TYPES.time) {
5186
+ var _parsed$isValid;
5170
5187
  var metadataPath = "".concat(name, ".metadata");
5171
5188
  var metadata = formik.getIn(values, metadataPath) || {};
5189
+ var _dateTimeMetaOf = dateTimeMetaOf(field),
5190
+ dateTimeType = _dateTimeMetaOf.type,
5191
+ format = _dateTimeMetaOf.format;
5192
+ var parsed = utils$1.getDateTimeValue({
5193
+ date: metadata.value,
5194
+ format: metadata.format,
5195
+ type: metadata.type,
5196
+ timezone: metadata.timezone
5197
+ });
5172
5198
 
5173
5199
  // Formik validates each write on a stale snapshot, so write it all at once.
5174
- var handleDateChange = function handleDateChange(date) {
5200
+ var handleChange = function handleChange(date) {
5175
5201
  var _globalProps$user;
5176
- var format = field !== null && field !== void 0 && field.showTime ? utils$1.DATE_TIME_FORMAT : utils$1.DATE_FORMAT;
5177
5202
  setFieldTouched(valuePath, true, false);
5178
5203
  setFieldValue(metadataPath, _objectSpread$2(_objectSpread$2({}, metadata), {}, {
5179
5204
  // eslint-disable-next-line @bigbinary/neeto/use-standard-date-time-formats
5180
5205
  value: date ? utils.dayjs(date).format(format) : "",
5181
- type: field !== null && field !== void 0 && field.showTime ? utils$1.DATE_TIME_TYPES.datetime : utils$1.DATE_TIME_TYPES.date,
5206
+ type: dateTimeType,
5182
5207
  format: format,
5183
5208
  timezone: initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$user = initializers.globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.timeZone
5184
5209
  }));
5185
5210
  };
5186
- return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DatePicker, {
5211
+ var pickerProps = {
5187
5212
  required: true,
5188
5213
  error: fieldError(valuePath),
5189
- label: t("neetoRules.form.selectDate"),
5190
- showTime: field === null || field === void 0 ? void 0 : field.showTime,
5191
- timeFormat: "HH:mm",
5192
- type: "date",
5193
- value: utils$1.getDateTimeValue({
5194
- date: metadata.value,
5195
- format: metadata.format,
5196
- type: metadata.type,
5197
- timezone: metadata.timezone
5198
- }) || undefined,
5214
+ value: parsed !== null && parsed !== void 0 && (_parsed$isValid = parsed.isValid) !== null && _parsed$isValid !== void 0 && _parsed$isValid.call(parsed) ? parsed : null,
5199
5215
  onBlur: function onBlur() {
5200
5216
  return setFieldTouched(valuePath, true);
5201
5217
  },
5202
- onChange: handleDateChange
5203
- });
5218
+ onChange: handleChange
5219
+ };
5220
+ return dateTimeType === utils$1.DATE_TIME_TYPES.time ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.TimePicker, _objectSpread$2(_objectSpread$2({}, pickerProps), {}, {
5221
+ format: "24",
5222
+ label: t("neetoRules.form.selectTime")
5223
+ })) : /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DatePicker, _objectSpread$2(_objectSpread$2({}, pickerProps), {}, {
5224
+ label: t("neetoRules.form.selectDate"),
5225
+ showTime: field === null || field === void 0 ? void 0 : field.showTime,
5226
+ timeFormat: "HH:mm",
5227
+ type: "date"
5228
+ }));
5204
5229
  }
5205
5230
  if (valueType === CONDITION_VALUE_TYPES.number) {
5206
5231
  var _getIn;