@bigbinary/neeto-rules-frontend 0.7.0 → 0.7.2
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/index.cjs.js +150 -162
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +150 -162
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -279,10 +279,70 @@ var ActionsDetail = function ActionsDetail(_ref) {
|
|
|
279
279
|
});
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
+
var OPERATORS$1 = {
|
|
283
|
+
or: "or_operator",
|
|
284
|
+
and: "and_operator"
|
|
285
|
+
};
|
|
286
|
+
var OPERATOR_LABELS = {
|
|
287
|
+
or_operator: t$5("neetoRules.operators.or"),
|
|
288
|
+
and_operator: t$5("neetoRules.operators.and")
|
|
289
|
+
};
|
|
290
|
+
var VERB_LABELS = {
|
|
291
|
+
is: t$5("neetoRules.conditionVerbs.is"),
|
|
292
|
+
is_not: t$5("neetoRules.conditionVerbs.isNot"),
|
|
293
|
+
contains: t$5("neetoRules.conditionVerbs.contains"),
|
|
294
|
+
does_not_contain: t$5("neetoRules.conditionVerbs.doesNotContain"),
|
|
295
|
+
contains_any_of: t$5("neetoRules.conditionVerbs.containsAnyOf"),
|
|
296
|
+
contains_all_of: t$5("neetoRules.conditionVerbs.containsAllOf"),
|
|
297
|
+
contains_none_of: t$5("neetoRules.conditionVerbs.containsNoneOf"),
|
|
298
|
+
starts_with: t$5("neetoRules.conditionVerbs.startsWith"),
|
|
299
|
+
ends_with: t$5("neetoRules.conditionVerbs.endsWith"),
|
|
300
|
+
less_than: t$5("neetoRules.conditionVerbs.lessThan"),
|
|
301
|
+
greater_than: t$5("neetoRules.conditionVerbs.greaterThan"),
|
|
302
|
+
any_time: t$5("neetoRules.conditionVerbs.anyTime"),
|
|
303
|
+
during: t$5("neetoRules.conditionVerbs.during"),
|
|
304
|
+
not_during: t$5("neetoRules.conditionVerbs.notDuring"),
|
|
305
|
+
any_of: t$5("neetoRules.conditionVerbs.anyOf"),
|
|
306
|
+
none_of: t$5("neetoRules.conditionVerbs.noneOf"),
|
|
307
|
+
is_before: t$5("neetoRules.conditionVerbs.isBefore"),
|
|
308
|
+
is_after: t$5("neetoRules.conditionVerbs.isAfter")
|
|
309
|
+
};
|
|
310
|
+
var CONDITION_VALUE_TYPES = {
|
|
311
|
+
text: "text",
|
|
312
|
+
number: "number",
|
|
313
|
+
decimal: "decimal",
|
|
314
|
+
url: "url",
|
|
315
|
+
email: "email",
|
|
316
|
+
dropdown: "dropdown",
|
|
317
|
+
multiSelect: "multi-select",
|
|
318
|
+
multiSelectCreate: "multi-select-create",
|
|
319
|
+
date: "date",
|
|
320
|
+
regex: "regex",
|
|
321
|
+
textarea: "textarea"
|
|
322
|
+
};
|
|
323
|
+
var INPUT_FIELD_TYPES = ["email", "text", "number", "decimal", "url", "regex"];
|
|
324
|
+
var MAXIMUM_OPTION_LENGTH$3 = 7;
|
|
325
|
+
|
|
326
|
+
var PREVIEW_CONDITION_LIMIT = 3;
|
|
327
|
+
|
|
328
|
+
function ownKeys$r(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; }
|
|
329
|
+
function _objectSpread$p(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$r(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$r(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
282
330
|
var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
283
331
|
var conditions = _ref.conditions,
|
|
284
332
|
conditionOptions = _ref.conditionOptions,
|
|
285
|
-
conditionVerbs = _ref.conditionVerbs
|
|
333
|
+
_ref$conditionVerbs = _ref.conditionVerbs,
|
|
334
|
+
conditionVerbs = _ref$conditionVerbs === void 0 ? {} : _ref$conditionVerbs,
|
|
335
|
+
_ref$hasEvent = _ref.hasEvent,
|
|
336
|
+
hasEvent = _ref$hasEvent === void 0 ? true : _ref$hasEvent;
|
|
337
|
+
var _useState = useState(false),
|
|
338
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
339
|
+
viewMore = _useState2[0],
|
|
340
|
+
setViewMore = _useState2[1];
|
|
341
|
+
var _useTranslation = useTranslation(),
|
|
342
|
+
t = _useTranslation.t;
|
|
343
|
+
var conditionsList = conditions.value;
|
|
344
|
+
var allConditions = viewMore && conditionsList.length > PREVIEW_CONDITION_LIMIT ? conditionsList : conditionsList.slice(0, PREVIEW_CONDITION_LIMIT);
|
|
345
|
+
var allConditionVerbs = _objectSpread$p(_objectSpread$p({}, VERB_LABELS), conditionVerbs);
|
|
286
346
|
var getLogicOperator = function getLogicOperator(joinType) {
|
|
287
347
|
return joinType === "or_operator" ? "or" : "and";
|
|
288
348
|
};
|
|
@@ -303,7 +363,7 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
303
363
|
}));
|
|
304
364
|
return /*#__PURE__*/jsx$1(MultiSelectValues, {
|
|
305
365
|
values: values,
|
|
306
|
-
separator: t
|
|
366
|
+
separator: t("neetoRules.common.or")
|
|
307
367
|
});
|
|
308
368
|
}
|
|
309
369
|
if (conditionOption.type === "dropdown") {
|
|
@@ -317,12 +377,12 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
317
377
|
return null;
|
|
318
378
|
};
|
|
319
379
|
var renderCondition = function renderCondition(condition) {
|
|
320
|
-
var
|
|
380
|
+
var _allConditionVerbs$co;
|
|
321
381
|
var conditionOption = findBy({
|
|
322
382
|
value: condition.field
|
|
323
383
|
}, conditionOptions);
|
|
324
384
|
if (!conditionOption) return null;
|
|
325
|
-
var conditionVerb = (
|
|
385
|
+
var conditionVerb = (_allConditionVerbs$co = allConditionVerbs[condition.verb]) === null || _allConditionVerbs$co === void 0 ? void 0 : _allConditionVerbs$co.toLowerCase();
|
|
326
386
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
327
387
|
children: [/*#__PURE__*/jsx$1(Typography, {
|
|
328
388
|
className: "neeto-ui-text-gray-800",
|
|
@@ -337,31 +397,46 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
337
397
|
}), renderConditionValues(condition, conditionOption)]
|
|
338
398
|
});
|
|
339
399
|
};
|
|
340
|
-
return /*#__PURE__*/
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
400
|
+
return /*#__PURE__*/jsxs(Fragment, {
|
|
401
|
+
children: [/*#__PURE__*/jsx$1("div", {
|
|
402
|
+
className: "mt-2",
|
|
403
|
+
children: allConditions.map(function (condition, index) {
|
|
404
|
+
return /*#__PURE__*/jsxs("div", {
|
|
405
|
+
className: "mb-2 flex flex-wrap gap-x-2 gap-y-2",
|
|
406
|
+
children: [!index && hasEvent && /*#__PURE__*/jsx$1(Typography, {
|
|
407
|
+
className: "neeto-ui-text-gray-700",
|
|
408
|
+
style: "h5",
|
|
409
|
+
weight: "normal",
|
|
410
|
+
children: t("neetoRules.common.and", {
|
|
411
|
+
what: ""
|
|
412
|
+
})
|
|
413
|
+
}), !!index && /*#__PURE__*/jsx$1(Typography, {
|
|
414
|
+
className: "neeto-ui-text-gray-800",
|
|
415
|
+
style: "h5",
|
|
416
|
+
weight: "semibold",
|
|
417
|
+
children: getLogicOperator(condition.joinType)
|
|
418
|
+
}), /*#__PURE__*/jsx$1(Typography, {
|
|
419
|
+
className: "neeto-ui-text-gray-700",
|
|
420
|
+
style: "h5",
|
|
421
|
+
weight: "normal",
|
|
422
|
+
children: t("neetoRules.common.when")
|
|
423
|
+
}), renderCondition(condition)]
|
|
424
|
+
}, condition.id);
|
|
425
|
+
})
|
|
426
|
+
}), conditionsList.length > 3 && /*#__PURE__*/jsx$1("div", {
|
|
427
|
+
className: "mt-3 w-full",
|
|
428
|
+
children: /*#__PURE__*/jsx$1(Button, {
|
|
429
|
+
icon: !viewMore ? Down : Up,
|
|
430
|
+
size: "small",
|
|
431
|
+
style: "link",
|
|
432
|
+
label: !viewMore ? t("neetoRules.common.viewMore") : t("neetoRules.common.viewLess"),
|
|
433
|
+
onClick: function onClick() {
|
|
434
|
+
return setViewMore(function (prevState) {
|
|
435
|
+
return !prevState;
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
})
|
|
439
|
+
})]
|
|
365
440
|
});
|
|
366
441
|
};
|
|
367
442
|
|
|
@@ -370,21 +445,17 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
370
445
|
var events = _ref.events,
|
|
371
446
|
performer = _ref.performer,
|
|
372
447
|
conditions = _ref.conditions;
|
|
373
|
-
var
|
|
374
|
-
|
|
375
|
-
viewMore = _useState2[0],
|
|
376
|
-
setViewMore = _useState2[1];
|
|
448
|
+
var _useTranslation = useTranslation(),
|
|
449
|
+
t = _useTranslation.t;
|
|
377
450
|
var eventNames = pluck("name", events.value);
|
|
378
451
|
var allEvents = events.eventOptions.filter(function (event) {
|
|
379
452
|
return eventNames === null || eventNames === void 0 ? void 0 : eventNames.includes(event.value);
|
|
380
453
|
});
|
|
381
|
-
var conditionsList = conditions.value;
|
|
382
|
-
var allConditions = viewMore && conditionsList.length > 3 ? conditionsList : conditionsList.slice(0, 3);
|
|
383
454
|
var currentPerformer = findBy({
|
|
384
455
|
value: performer.value
|
|
385
456
|
}, performer.options);
|
|
386
457
|
return /*#__PURE__*/jsxs(Title, {
|
|
387
|
-
title: t
|
|
458
|
+
title: t("neetoRules.common.when"),
|
|
388
459
|
children: [/*#__PURE__*/jsxs("div", {
|
|
389
460
|
className: "flex flex-wrap gap-x-2 gap-y-2",
|
|
390
461
|
children: [allEvents.map(function (event, index) {
|
|
@@ -394,12 +465,12 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
394
465
|
className: "neeto-ui-text-gray-700 my-auto",
|
|
395
466
|
style: "h5",
|
|
396
467
|
weight: "normal",
|
|
397
|
-
children: t
|
|
468
|
+
children: t("neetoRules.common.when")
|
|
398
469
|
}), !!index && /*#__PURE__*/jsx$1(Typography, {
|
|
399
470
|
className: "neeto-ui-text-gray-700 my-auto",
|
|
400
471
|
style: "h5",
|
|
401
472
|
weight: "normal",
|
|
402
|
-
children: t
|
|
473
|
+
children: t("neetoRules.common.or")
|
|
403
474
|
}), /*#__PURE__*/jsx$1(Typography, {
|
|
404
475
|
className: "neeto-ui-text-gray-800",
|
|
405
476
|
style: "h5",
|
|
@@ -411,7 +482,7 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
411
482
|
className: "neeto-ui-text-gray-700",
|
|
412
483
|
style: "h5",
|
|
413
484
|
weight: "normal",
|
|
414
|
-
children: t
|
|
485
|
+
children: t("neetoRules.common.by")
|
|
415
486
|
}), /*#__PURE__*/jsx$1(Typography, {
|
|
416
487
|
className: "neeto-ui-text-gray-800",
|
|
417
488
|
style: "h5",
|
|
@@ -419,22 +490,9 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
419
490
|
children: currentPerformer === null || currentPerformer === void 0 || (_currentPerformer$lab = currentPerformer.label) === null || _currentPerformer$lab === void 0 ? void 0 : _currentPerformer$lab.toLowerCase()
|
|
420
491
|
})]
|
|
421
492
|
}), /*#__PURE__*/jsx$1(ConditionsDetail, {
|
|
493
|
+
conditions: conditions,
|
|
422
494
|
conditionOptions: conditions.conditionOptions,
|
|
423
|
-
conditionVerbs: conditions.verbs
|
|
424
|
-
conditions: allConditions
|
|
425
|
-
}), conditionsList.length > 3 && /*#__PURE__*/jsx$1("div", {
|
|
426
|
-
className: "mt-3 w-full",
|
|
427
|
-
children: /*#__PURE__*/jsx$1(Button, {
|
|
428
|
-
icon: !viewMore ? Down : Up,
|
|
429
|
-
size: "small",
|
|
430
|
-
style: "link",
|
|
431
|
-
label: !viewMore ? t$5("neetoRules.common.viewMore") : t$5("neetoRules.common.viewLess"),
|
|
432
|
-
onClick: function onClick() {
|
|
433
|
-
return setViewMore(function (prevState) {
|
|
434
|
-
return !prevState;
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
})
|
|
495
|
+
conditionVerbs: conditions.verbs
|
|
438
496
|
})]
|
|
439
497
|
});
|
|
440
498
|
};
|
|
@@ -457,73 +515,47 @@ var RulePreview = withT(function (_ref) {
|
|
|
457
515
|
children: /*#__PURE__*/jsxs("div", {
|
|
458
516
|
className: "flex items-center justify-between gap-x-3",
|
|
459
517
|
children: [/*#__PURE__*/jsx$1(Typography, {
|
|
460
|
-
|
|
518
|
+
className: "line-clamp-2",
|
|
519
|
+
style: "h4",
|
|
461
520
|
weight: "semibold",
|
|
462
|
-
children:
|
|
521
|
+
children: ruleDetails.name.value
|
|
463
522
|
}), isNotEmpty(moreDropdownProps) && /*#__PURE__*/jsx$1(MoreDropdown, _objectSpread$o({}, moreDropdownProps))]
|
|
464
523
|
})
|
|
465
524
|
}), /*#__PURE__*/jsx$1(Pane.Body, {
|
|
466
525
|
children: /*#__PURE__*/jsxs("div", {
|
|
467
|
-
className: "w-full",
|
|
526
|
+
className: "mt-2 w-full",
|
|
468
527
|
children: [/*#__PURE__*/jsxs("div", {
|
|
469
|
-
className: "
|
|
470
|
-
children: [/*#__PURE__*/
|
|
471
|
-
className: "
|
|
528
|
+
className: "mb-6",
|
|
529
|
+
children: [ruleDetails.description && /*#__PURE__*/jsx$1(Typography, {
|
|
530
|
+
className: "my-auto mb-4",
|
|
531
|
+
style: "body2",
|
|
532
|
+
children: ruleDetails.description.value
|
|
533
|
+
}), ruleDetails.entity && /*#__PURE__*/jsxs("div", {
|
|
534
|
+
className: "flex space-x-8",
|
|
472
535
|
children: [/*#__PURE__*/jsx$1(Typography, {
|
|
473
|
-
className: "neeto-ui-text-gray-
|
|
536
|
+
className: "neeto-ui-text-gray-800 col-span-1",
|
|
474
537
|
style: "h5",
|
|
475
538
|
weight: "semibold",
|
|
476
|
-
children:
|
|
477
|
-
}), /*#__PURE__*/jsx$1(
|
|
478
|
-
className: "
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
weight: "normal",
|
|
483
|
-
children: ruleDetails.name.value
|
|
484
|
-
})
|
|
485
|
-
})]
|
|
486
|
-
}), ruleDetails.description && /*#__PURE__*/jsxs(Fragment, {
|
|
487
|
-
children: [/*#__PURE__*/jsx$1("hr", {}), /*#__PURE__*/jsxs("div", {
|
|
488
|
-
className: "my-3 flex flex-wrap justify-between gap-x-2",
|
|
489
|
-
children: [/*#__PURE__*/jsx$1(Typography, {
|
|
490
|
-
className: "neeto-ui-text-gray-700 my-auto",
|
|
491
|
-
style: "h5",
|
|
492
|
-
weight: "semibold",
|
|
493
|
-
children: t("neetoRules.common.description")
|
|
494
|
-
}), /*#__PURE__*/jsx$1("div", {
|
|
495
|
-
className: "flex w-72 flex-wrap",
|
|
496
|
-
children: /*#__PURE__*/jsx$1(Typography, {
|
|
497
|
-
className: "neeto-ui-text-gray-800 my-auto",
|
|
498
|
-
style: "h5",
|
|
499
|
-
weight: "normal",
|
|
500
|
-
children: ruleDetails.description.value
|
|
501
|
-
})
|
|
502
|
-
})]
|
|
503
|
-
})]
|
|
504
|
-
}), ruleDetails.entity && /*#__PURE__*/jsxs(Fragment, {
|
|
505
|
-
children: [/*#__PURE__*/jsx$1("hr", {}), /*#__PURE__*/jsxs("div", {
|
|
506
|
-
className: "my-3 flex flex-wrap justify-between gap-x-2",
|
|
507
|
-
children: [/*#__PURE__*/jsx$1(Typography, {
|
|
508
|
-
className: "neeto-ui-text-gray-700 my-auto",
|
|
509
|
-
style: "h5",
|
|
510
|
-
weight: "semibold",
|
|
511
|
-
children: ruleDetails.entity.label
|
|
512
|
-
}), /*#__PURE__*/jsx$1("div", {
|
|
513
|
-
className: "flex w-72 flex-wrap",
|
|
514
|
-
children: /*#__PURE__*/jsx$1(Typography, {
|
|
515
|
-
className: "neeto-ui-text-gray-800 my-auto",
|
|
516
|
-
style: "h5",
|
|
517
|
-
weight: "normal",
|
|
518
|
-
children: ruleDetails.entity.value
|
|
519
|
-
})
|
|
520
|
-
})]
|
|
539
|
+
children: ruleDetails.entity.label
|
|
540
|
+
}), /*#__PURE__*/jsx$1(Typography, {
|
|
541
|
+
className: "neeto-ui-text-gray-800 col-span-2",
|
|
542
|
+
style: "h5",
|
|
543
|
+
weight: "normal",
|
|
544
|
+
children: ruleDetails.entity.value
|
|
521
545
|
})]
|
|
522
546
|
})]
|
|
523
|
-
}), /*#__PURE__*/jsx$1(EventsDetail, {
|
|
547
|
+
}), ruleDetails.events && isNotEmpty(ruleDetails.events) ? /*#__PURE__*/jsx$1(EventsDetail, {
|
|
524
548
|
conditions: ruleDetails.conditions,
|
|
525
549
|
events: ruleDetails.events,
|
|
526
550
|
performer: ruleDetails.performer
|
|
551
|
+
}) : /*#__PURE__*/jsx$1(Title, {
|
|
552
|
+
title: t("neetoRules.common.when"),
|
|
553
|
+
children: /*#__PURE__*/jsx$1(ConditionsDetail, {
|
|
554
|
+
conditionOptions: ruleDetails.conditions.conditionOptions,
|
|
555
|
+
conditionVerbs: ruleDetails.conditions.verbs,
|
|
556
|
+
conditions: ruleDetails.conditions,
|
|
557
|
+
hasEvent: false
|
|
558
|
+
})
|
|
527
559
|
}), /*#__PURE__*/jsx$1(ActionsDetail, {
|
|
528
560
|
actions: ruleDetails.actions
|
|
529
561
|
})]
|
|
@@ -9921,52 +9953,8 @@ var DEFAULT_RULE_ACTION = {
|
|
|
9921
9953
|
};
|
|
9922
9954
|
var EDITOR_ADDONS = ["code-block", "block-quote", "image-upload"];
|
|
9923
9955
|
var EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
9924
|
-
var MAXIMUM_OPTION_LENGTH$3 = 7;
|
|
9925
|
-
var ACTION_INPUT_TYPES = ["text", "number", "decimal", "regex"];
|
|
9926
|
-
|
|
9927
|
-
var OPERATORS$1 = {
|
|
9928
|
-
or: "or_operator",
|
|
9929
|
-
and: "and_operator"
|
|
9930
|
-
};
|
|
9931
|
-
var OPERATOR_LABELS = {
|
|
9932
|
-
or_operator: t$5("neetoRules.operators.or"),
|
|
9933
|
-
and_operator: t$5("neetoRules.operators.and")
|
|
9934
|
-
};
|
|
9935
|
-
var VERB_LABELS = {
|
|
9936
|
-
is: t$5("neetoRules.conditionVerbs.is"),
|
|
9937
|
-
is_not: t$5("neetoRules.conditionVerbs.isNot"),
|
|
9938
|
-
contains: t$5("neetoRules.conditionVerbs.contains"),
|
|
9939
|
-
does_not_contain: t$5("neetoRules.conditionVerbs.doesNotContain"),
|
|
9940
|
-
contains_any_of: t$5("neetoRules.conditionVerbs.containsAnyOf"),
|
|
9941
|
-
contains_all_of: t$5("neetoRules.conditionVerbs.containsAllOf"),
|
|
9942
|
-
contains_none_of: t$5("neetoRules.conditionVerbs.containsNoneOf"),
|
|
9943
|
-
starts_with: t$5("neetoRules.conditionVerbs.startsWith"),
|
|
9944
|
-
ends_with: t$5("neetoRules.conditionVerbs.endsWith"),
|
|
9945
|
-
less_than: t$5("neetoRules.conditionVerbs.lessThan"),
|
|
9946
|
-
greater_than: t$5("neetoRules.conditionVerbs.greaterThan"),
|
|
9947
|
-
any_time: t$5("neetoRules.conditionVerbs.anyTime"),
|
|
9948
|
-
during: t$5("neetoRules.conditionVerbs.during"),
|
|
9949
|
-
not_during: t$5("neetoRules.conditionVerbs.notDuring"),
|
|
9950
|
-
any_of: t$5("neetoRules.conditionVerbs.anyOf"),
|
|
9951
|
-
none_of: t$5("neetoRules.conditionVerbs.noneOf"),
|
|
9952
|
-
is_before: t$5("neetoRules.conditionVerbs.isBefore"),
|
|
9953
|
-
is_after: t$5("neetoRules.conditionVerbs.isAfter")
|
|
9954
|
-
};
|
|
9955
|
-
var CONDITION_VALUE_TYPES = {
|
|
9956
|
-
text: "text",
|
|
9957
|
-
number: "number",
|
|
9958
|
-
decimal: "decimal",
|
|
9959
|
-
url: "url",
|
|
9960
|
-
email: "email",
|
|
9961
|
-
dropdown: "dropdown",
|
|
9962
|
-
multiSelect: "multi-select",
|
|
9963
|
-
multiSelectCreate: "multi-select-create",
|
|
9964
|
-
date: "date",
|
|
9965
|
-
regex: "regex",
|
|
9966
|
-
textarea: "textarea"
|
|
9967
|
-
};
|
|
9968
|
-
var INPUT_FIELD_TYPES = ["email", "text", "number", "decimal", "url", "regex"];
|
|
9969
9956
|
var MAXIMUM_OPTION_LENGTH$2 = 7;
|
|
9957
|
+
var ACTION_INPUT_TYPES = ["text", "number", "decimal", "regex"];
|
|
9970
9958
|
|
|
9971
9959
|
function ownKeys$l(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; }
|
|
9972
9960
|
function _objectSpread$k(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$l(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$l(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -11050,7 +11038,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
11050
11038
|
onClose: handleClose,
|
|
11051
11039
|
children: /*#__PURE__*/jsxs(Menu$a, {
|
|
11052
11040
|
className: "max-h-60 max-w-2xl p-3",
|
|
11053
|
-
children: [dropdownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11041
|
+
children: [dropdownOptions.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsx$1(Input$2, {
|
|
11054
11042
|
autoFocus: true,
|
|
11055
11043
|
className: "mb-1",
|
|
11056
11044
|
"data-cy": "search-text-field",
|
|
@@ -11064,7 +11052,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
11064
11052
|
return e.stopPropagation();
|
|
11065
11053
|
}
|
|
11066
11054
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
11067
|
-
hasScroll: dropdownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11055
|
+
hasScroll: dropdownOptions.length > MAXIMUM_OPTION_LENGTH$2,
|
|
11068
11056
|
children: searchedOptions.map(function (option, idx) {
|
|
11069
11057
|
return /*#__PURE__*/jsx$1(MenuItem$9.Button, {
|
|
11070
11058
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -11698,7 +11686,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11698
11686
|
onClose: handleClose,
|
|
11699
11687
|
children: /*#__PURE__*/jsxs(Menu$9, {
|
|
11700
11688
|
className: "max-h-60 max-w-2xl p-3",
|
|
11701
|
-
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11689
|
+
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsx$1(Input$2, {
|
|
11702
11690
|
autoFocus: true,
|
|
11703
11691
|
className: "mb-1",
|
|
11704
11692
|
"data-cy": "search-text-field",
|
|
@@ -11709,7 +11697,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11709
11697
|
return setSearchTerm(e.target.value);
|
|
11710
11698
|
}
|
|
11711
11699
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
11712
|
-
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11700
|
+
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$2,
|
|
11713
11701
|
children: searchedOptions.map(function (option, idx) {
|
|
11714
11702
|
return /*#__PURE__*/jsx$1(MenuItem$8.Button, {
|
|
11715
11703
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20393,7 +20381,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20393
20381
|
onClose: handleClose,
|
|
20394
20382
|
children: /*#__PURE__*/jsxs(Menu$6, {
|
|
20395
20383
|
className: "max-h-60 max-w-2xl p-3",
|
|
20396
|
-
children: [options.length > MAXIMUM_OPTION_LENGTH$
|
|
20384
|
+
children: [options.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsx$1(Input$2, {
|
|
20397
20385
|
autoFocus: true,
|
|
20398
20386
|
className: "mb-1",
|
|
20399
20387
|
"data-cy": "search-text-field",
|
|
@@ -20407,7 +20395,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20407
20395
|
return e.stopPropagation();
|
|
20408
20396
|
}
|
|
20409
20397
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
20410
|
-
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$
|
|
20398
|
+
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20411
20399
|
children: searchedOptions.map(function (option, idx) {
|
|
20412
20400
|
return /*#__PURE__*/jsx$1(MenuItem$6.Button, {
|
|
20413
20401
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20515,7 +20503,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20515
20503
|
onClose: handleClose,
|
|
20516
20504
|
children: /*#__PURE__*/jsxs(Menu$5, {
|
|
20517
20505
|
className: "max-h-60 max-w-2xl p-3",
|
|
20518
|
-
children: [options.length > MAXIMUM_OPTION_LENGTH$
|
|
20506
|
+
children: [options.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsx$1(Input$2, {
|
|
20519
20507
|
autoFocus: true,
|
|
20520
20508
|
className: "mb-1",
|
|
20521
20509
|
"data-cy": "search-text-field",
|
|
@@ -20529,7 +20517,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20529
20517
|
return e.stopPropagation();
|
|
20530
20518
|
}
|
|
20531
20519
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
20532
|
-
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$
|
|
20520
|
+
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20533
20521
|
children: searchedOptions.map(function (option, idx) {
|
|
20534
20522
|
return /*#__PURE__*/jsx$1(MenuItem$5.Button, {
|
|
20535
20523
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20689,7 +20677,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20689
20677
|
onClose: handleClose,
|
|
20690
20678
|
children: /*#__PURE__*/jsxs(Menu$4, {
|
|
20691
20679
|
className: "max-h-60 max-w-2xl p-3",
|
|
20692
|
-
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
20680
|
+
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsx$1(Input$2, {
|
|
20693
20681
|
autoFocus: true,
|
|
20694
20682
|
className: "mb-1",
|
|
20695
20683
|
"data-cy": "search-text-field",
|
|
@@ -20700,7 +20688,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20700
20688
|
return setSearchTerm(e.target.value);
|
|
20701
20689
|
}
|
|
20702
20690
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
20703
|
-
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
20691
|
+
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20704
20692
|
children: searchedOptions.map(function (option, idx) {
|
|
20705
20693
|
return /*#__PURE__*/jsx$1(MenuItem$4.Button, {
|
|
20706
20694
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|