@bigbinary/neeto-rules-frontend 0.7.1 → 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 +136 -113
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +136 -113
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -330,10 +330,70 @@ var ActionsDetail = function ActionsDetail(_ref) {
|
|
|
330
330
|
});
|
|
331
331
|
};
|
|
332
332
|
|
|
333
|
+
var OPERATORS$1 = {
|
|
334
|
+
or: "or_operator",
|
|
335
|
+
and: "and_operator"
|
|
336
|
+
};
|
|
337
|
+
var OPERATOR_LABELS = {
|
|
338
|
+
or_operator: i18next.t("neetoRules.operators.or"),
|
|
339
|
+
and_operator: i18next.t("neetoRules.operators.and")
|
|
340
|
+
};
|
|
341
|
+
var VERB_LABELS = {
|
|
342
|
+
is: i18next.t("neetoRules.conditionVerbs.is"),
|
|
343
|
+
is_not: i18next.t("neetoRules.conditionVerbs.isNot"),
|
|
344
|
+
contains: i18next.t("neetoRules.conditionVerbs.contains"),
|
|
345
|
+
does_not_contain: i18next.t("neetoRules.conditionVerbs.doesNotContain"),
|
|
346
|
+
contains_any_of: i18next.t("neetoRules.conditionVerbs.containsAnyOf"),
|
|
347
|
+
contains_all_of: i18next.t("neetoRules.conditionVerbs.containsAllOf"),
|
|
348
|
+
contains_none_of: i18next.t("neetoRules.conditionVerbs.containsNoneOf"),
|
|
349
|
+
starts_with: i18next.t("neetoRules.conditionVerbs.startsWith"),
|
|
350
|
+
ends_with: i18next.t("neetoRules.conditionVerbs.endsWith"),
|
|
351
|
+
less_than: i18next.t("neetoRules.conditionVerbs.lessThan"),
|
|
352
|
+
greater_than: i18next.t("neetoRules.conditionVerbs.greaterThan"),
|
|
353
|
+
any_time: i18next.t("neetoRules.conditionVerbs.anyTime"),
|
|
354
|
+
during: i18next.t("neetoRules.conditionVerbs.during"),
|
|
355
|
+
not_during: i18next.t("neetoRules.conditionVerbs.notDuring"),
|
|
356
|
+
any_of: i18next.t("neetoRules.conditionVerbs.anyOf"),
|
|
357
|
+
none_of: i18next.t("neetoRules.conditionVerbs.noneOf"),
|
|
358
|
+
is_before: i18next.t("neetoRules.conditionVerbs.isBefore"),
|
|
359
|
+
is_after: i18next.t("neetoRules.conditionVerbs.isAfter")
|
|
360
|
+
};
|
|
361
|
+
var CONDITION_VALUE_TYPES = {
|
|
362
|
+
text: "text",
|
|
363
|
+
number: "number",
|
|
364
|
+
decimal: "decimal",
|
|
365
|
+
url: "url",
|
|
366
|
+
email: "email",
|
|
367
|
+
dropdown: "dropdown",
|
|
368
|
+
multiSelect: "multi-select",
|
|
369
|
+
multiSelectCreate: "multi-select-create",
|
|
370
|
+
date: "date",
|
|
371
|
+
regex: "regex",
|
|
372
|
+
textarea: "textarea"
|
|
373
|
+
};
|
|
374
|
+
var INPUT_FIELD_TYPES = ["email", "text", "number", "decimal", "url", "regex"];
|
|
375
|
+
var MAXIMUM_OPTION_LENGTH$3 = 7;
|
|
376
|
+
|
|
377
|
+
var PREVIEW_CONDITION_LIMIT = 3;
|
|
378
|
+
|
|
379
|
+
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; }
|
|
380
|
+
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; }
|
|
333
381
|
var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
334
382
|
var conditions = _ref.conditions,
|
|
335
383
|
conditionOptions = _ref.conditionOptions,
|
|
336
|
-
conditionVerbs = _ref.conditionVerbs
|
|
384
|
+
_ref$conditionVerbs = _ref.conditionVerbs,
|
|
385
|
+
conditionVerbs = _ref$conditionVerbs === void 0 ? {} : _ref$conditionVerbs,
|
|
386
|
+
_ref$hasEvent = _ref.hasEvent,
|
|
387
|
+
hasEvent = _ref$hasEvent === void 0 ? true : _ref$hasEvent;
|
|
388
|
+
var _useState = React.useState(false),
|
|
389
|
+
_useState2 = _slicedToArray$1(_useState, 2),
|
|
390
|
+
viewMore = _useState2[0],
|
|
391
|
+
setViewMore = _useState2[1];
|
|
392
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
393
|
+
t = _useTranslation.t;
|
|
394
|
+
var conditionsList = conditions.value;
|
|
395
|
+
var allConditions = viewMore && conditionsList.length > PREVIEW_CONDITION_LIMIT ? conditionsList : conditionsList.slice(0, PREVIEW_CONDITION_LIMIT);
|
|
396
|
+
var allConditionVerbs = _objectSpread$p(_objectSpread$p({}, VERB_LABELS), conditionVerbs);
|
|
337
397
|
var getLogicOperator = function getLogicOperator(joinType) {
|
|
338
398
|
return joinType === "or_operator" ? "or" : "and";
|
|
339
399
|
};
|
|
@@ -354,7 +414,7 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
354
414
|
}));
|
|
355
415
|
return /*#__PURE__*/jsxRuntime.jsx(MultiSelectValues, {
|
|
356
416
|
values: values,
|
|
357
|
-
separator:
|
|
417
|
+
separator: t("neetoRules.common.or")
|
|
358
418
|
});
|
|
359
419
|
}
|
|
360
420
|
if (conditionOption.type === "dropdown") {
|
|
@@ -368,12 +428,12 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
368
428
|
return null;
|
|
369
429
|
};
|
|
370
430
|
var renderCondition = function renderCondition(condition) {
|
|
371
|
-
var
|
|
431
|
+
var _allConditionVerbs$co;
|
|
372
432
|
var conditionOption = neetoCist.findBy({
|
|
373
433
|
value: condition.field
|
|
374
434
|
}, conditionOptions);
|
|
375
435
|
if (!conditionOption) return null;
|
|
376
|
-
var conditionVerb = (
|
|
436
|
+
var conditionVerb = (_allConditionVerbs$co = allConditionVerbs[condition.verb]) === null || _allConditionVerbs$co === void 0 ? void 0 : _allConditionVerbs$co.toLowerCase();
|
|
377
437
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
378
438
|
children: [/*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
379
439
|
className: "neeto-ui-text-gray-800",
|
|
@@ -388,31 +448,46 @@ var ConditionsDetail = function ConditionsDetail(_ref) {
|
|
|
388
448
|
}), renderConditionValues(condition, conditionOption)]
|
|
389
449
|
});
|
|
390
450
|
};
|
|
391
|
-
return /*#__PURE__*/jsxRuntime.
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
451
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
452
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
453
|
+
className: "mt-2",
|
|
454
|
+
children: allConditions.map(function (condition, index) {
|
|
455
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
456
|
+
className: "mb-2 flex flex-wrap gap-x-2 gap-y-2",
|
|
457
|
+
children: [!index && hasEvent && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
458
|
+
className: "neeto-ui-text-gray-700",
|
|
459
|
+
style: "h5",
|
|
460
|
+
weight: "normal",
|
|
461
|
+
children: t("neetoRules.common.and", {
|
|
462
|
+
what: ""
|
|
463
|
+
})
|
|
464
|
+
}), !!index && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
465
|
+
className: "neeto-ui-text-gray-800",
|
|
466
|
+
style: "h5",
|
|
467
|
+
weight: "semibold",
|
|
468
|
+
children: getLogicOperator(condition.joinType)
|
|
469
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
470
|
+
className: "neeto-ui-text-gray-700",
|
|
471
|
+
style: "h5",
|
|
472
|
+
weight: "normal",
|
|
473
|
+
children: t("neetoRules.common.when")
|
|
474
|
+
}), renderCondition(condition)]
|
|
475
|
+
}, condition.id);
|
|
476
|
+
})
|
|
477
|
+
}), conditionsList.length > 3 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
478
|
+
className: "mt-3 w-full",
|
|
479
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
480
|
+
icon: !viewMore ? neetoIcons.Down : neetoIcons.Up,
|
|
481
|
+
size: "small",
|
|
482
|
+
style: "link",
|
|
483
|
+
label: !viewMore ? t("neetoRules.common.viewMore") : t("neetoRules.common.viewLess"),
|
|
484
|
+
onClick: function onClick() {
|
|
485
|
+
return setViewMore(function (prevState) {
|
|
486
|
+
return !prevState;
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
})
|
|
490
|
+
})]
|
|
416
491
|
});
|
|
417
492
|
};
|
|
418
493
|
|
|
@@ -421,21 +496,17 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
421
496
|
var events = _ref.events,
|
|
422
497
|
performer = _ref.performer,
|
|
423
498
|
conditions = _ref.conditions;
|
|
424
|
-
var
|
|
425
|
-
|
|
426
|
-
viewMore = _useState2[0],
|
|
427
|
-
setViewMore = _useState2[1];
|
|
499
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
500
|
+
t = _useTranslation.t;
|
|
428
501
|
var eventNames = ramda.pluck("name", events.value);
|
|
429
502
|
var allEvents = events.eventOptions.filter(function (event) {
|
|
430
503
|
return eventNames === null || eventNames === void 0 ? void 0 : eventNames.includes(event.value);
|
|
431
504
|
});
|
|
432
|
-
var conditionsList = conditions.value;
|
|
433
|
-
var allConditions = viewMore && conditionsList.length > 3 ? conditionsList : conditionsList.slice(0, 3);
|
|
434
505
|
var currentPerformer = neetoCist.findBy({
|
|
435
506
|
value: performer.value
|
|
436
507
|
}, performer.options);
|
|
437
508
|
return /*#__PURE__*/jsxRuntime.jsxs(Title, {
|
|
438
|
-
title:
|
|
509
|
+
title: t("neetoRules.common.when"),
|
|
439
510
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
440
511
|
className: "flex flex-wrap gap-x-2 gap-y-2",
|
|
441
512
|
children: [allEvents.map(function (event, index) {
|
|
@@ -445,12 +516,12 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
445
516
|
className: "neeto-ui-text-gray-700 my-auto",
|
|
446
517
|
style: "h5",
|
|
447
518
|
weight: "normal",
|
|
448
|
-
children:
|
|
519
|
+
children: t("neetoRules.common.when")
|
|
449
520
|
}), !!index && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
450
521
|
className: "neeto-ui-text-gray-700 my-auto",
|
|
451
522
|
style: "h5",
|
|
452
523
|
weight: "normal",
|
|
453
|
-
children:
|
|
524
|
+
children: t("neetoRules.common.or")
|
|
454
525
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
455
526
|
className: "neeto-ui-text-gray-800",
|
|
456
527
|
style: "h5",
|
|
@@ -462,7 +533,7 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
462
533
|
className: "neeto-ui-text-gray-700",
|
|
463
534
|
style: "h5",
|
|
464
535
|
weight: "normal",
|
|
465
|
-
children:
|
|
536
|
+
children: t("neetoRules.common.by")
|
|
466
537
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
467
538
|
className: "neeto-ui-text-gray-800",
|
|
468
539
|
style: "h5",
|
|
@@ -470,30 +541,18 @@ var EventsDetail = function EventsDetail(_ref) {
|
|
|
470
541
|
children: currentPerformer === null || currentPerformer === void 0 || (_currentPerformer$lab = currentPerformer.label) === null || _currentPerformer$lab === void 0 ? void 0 : _currentPerformer$lab.toLowerCase()
|
|
471
542
|
})]
|
|
472
543
|
}), /*#__PURE__*/jsxRuntime.jsx(ConditionsDetail, {
|
|
544
|
+
conditions: conditions,
|
|
473
545
|
conditionOptions: conditions.conditionOptions,
|
|
474
|
-
conditionVerbs: conditions.verbs
|
|
475
|
-
conditions: allConditions
|
|
476
|
-
}), conditionsList.length > 3 && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
477
|
-
className: "mt-3 w-full",
|
|
478
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
479
|
-
icon: !viewMore ? neetoIcons.Down : neetoIcons.Up,
|
|
480
|
-
size: "small",
|
|
481
|
-
style: "link",
|
|
482
|
-
label: !viewMore ? i18next.t("neetoRules.common.viewMore") : i18next.t("neetoRules.common.viewLess"),
|
|
483
|
-
onClick: function onClick() {
|
|
484
|
-
return setViewMore(function (prevState) {
|
|
485
|
-
return !prevState;
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
})
|
|
546
|
+
conditionVerbs: conditions.verbs
|
|
489
547
|
})]
|
|
490
548
|
});
|
|
491
549
|
};
|
|
492
550
|
|
|
493
551
|
function ownKeys$q(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; }
|
|
494
552
|
function _objectSpread$o(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$q(Object(t), !0).forEach(function (r) { _defineProperty$2(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$q(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
495
|
-
var RulePreview = function
|
|
496
|
-
var
|
|
553
|
+
var RulePreview = reactUtils.withT(function (_ref) {
|
|
554
|
+
var t = _ref.t,
|
|
555
|
+
isLoading = _ref.isLoading,
|
|
497
556
|
ruleDetails = _ref.ruleDetails,
|
|
498
557
|
isOpen = _ref.isOpen,
|
|
499
558
|
onClose = _ref.onClose,
|
|
@@ -536,10 +595,18 @@ var RulePreview = function RulePreview(_ref) {
|
|
|
536
595
|
children: ruleDetails.entity.value
|
|
537
596
|
})]
|
|
538
597
|
})]
|
|
539
|
-
}), /*#__PURE__*/jsxRuntime.jsx(EventsDetail, {
|
|
598
|
+
}), ruleDetails.events && neetoCist.isNotEmpty(ruleDetails.events) ? /*#__PURE__*/jsxRuntime.jsx(EventsDetail, {
|
|
540
599
|
conditions: ruleDetails.conditions,
|
|
541
600
|
events: ruleDetails.events,
|
|
542
601
|
performer: ruleDetails.performer
|
|
602
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Title, {
|
|
603
|
+
title: t("neetoRules.common.when"),
|
|
604
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ConditionsDetail, {
|
|
605
|
+
conditionOptions: ruleDetails.conditions.conditionOptions,
|
|
606
|
+
conditionVerbs: ruleDetails.conditions.verbs,
|
|
607
|
+
conditions: ruleDetails.conditions,
|
|
608
|
+
hasEvent: false
|
|
609
|
+
})
|
|
543
610
|
}), /*#__PURE__*/jsxRuntime.jsx(ActionsDetail, {
|
|
544
611
|
actions: ruleDetails.actions
|
|
545
612
|
})]
|
|
@@ -547,7 +614,7 @@ var RulePreview = function RulePreview(_ref) {
|
|
|
547
614
|
})]
|
|
548
615
|
})
|
|
549
616
|
});
|
|
550
|
-
};
|
|
617
|
+
});
|
|
551
618
|
|
|
552
619
|
function _typeof$2(o) {
|
|
553
620
|
"@babel/helpers - typeof";
|
|
@@ -9937,52 +10004,8 @@ var DEFAULT_RULE_ACTION = {
|
|
|
9937
10004
|
};
|
|
9938
10005
|
var EDITOR_ADDONS = ["code-block", "block-quote", "image-upload"];
|
|
9939
10006
|
var EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
9940
|
-
var MAXIMUM_OPTION_LENGTH$3 = 7;
|
|
9941
|
-
var ACTION_INPUT_TYPES = ["text", "number", "decimal", "regex"];
|
|
9942
|
-
|
|
9943
|
-
var OPERATORS$1 = {
|
|
9944
|
-
or: "or_operator",
|
|
9945
|
-
and: "and_operator"
|
|
9946
|
-
};
|
|
9947
|
-
var OPERATOR_LABELS = {
|
|
9948
|
-
or_operator: i18next.t("neetoRules.operators.or"),
|
|
9949
|
-
and_operator: i18next.t("neetoRules.operators.and")
|
|
9950
|
-
};
|
|
9951
|
-
var VERB_LABELS = {
|
|
9952
|
-
is: i18next.t("neetoRules.conditionVerbs.is"),
|
|
9953
|
-
is_not: i18next.t("neetoRules.conditionVerbs.isNot"),
|
|
9954
|
-
contains: i18next.t("neetoRules.conditionVerbs.contains"),
|
|
9955
|
-
does_not_contain: i18next.t("neetoRules.conditionVerbs.doesNotContain"),
|
|
9956
|
-
contains_any_of: i18next.t("neetoRules.conditionVerbs.containsAnyOf"),
|
|
9957
|
-
contains_all_of: i18next.t("neetoRules.conditionVerbs.containsAllOf"),
|
|
9958
|
-
contains_none_of: i18next.t("neetoRules.conditionVerbs.containsNoneOf"),
|
|
9959
|
-
starts_with: i18next.t("neetoRules.conditionVerbs.startsWith"),
|
|
9960
|
-
ends_with: i18next.t("neetoRules.conditionVerbs.endsWith"),
|
|
9961
|
-
less_than: i18next.t("neetoRules.conditionVerbs.lessThan"),
|
|
9962
|
-
greater_than: i18next.t("neetoRules.conditionVerbs.greaterThan"),
|
|
9963
|
-
any_time: i18next.t("neetoRules.conditionVerbs.anyTime"),
|
|
9964
|
-
during: i18next.t("neetoRules.conditionVerbs.during"),
|
|
9965
|
-
not_during: i18next.t("neetoRules.conditionVerbs.notDuring"),
|
|
9966
|
-
any_of: i18next.t("neetoRules.conditionVerbs.anyOf"),
|
|
9967
|
-
none_of: i18next.t("neetoRules.conditionVerbs.noneOf"),
|
|
9968
|
-
is_before: i18next.t("neetoRules.conditionVerbs.isBefore"),
|
|
9969
|
-
is_after: i18next.t("neetoRules.conditionVerbs.isAfter")
|
|
9970
|
-
};
|
|
9971
|
-
var CONDITION_VALUE_TYPES = {
|
|
9972
|
-
text: "text",
|
|
9973
|
-
number: "number",
|
|
9974
|
-
decimal: "decimal",
|
|
9975
|
-
url: "url",
|
|
9976
|
-
email: "email",
|
|
9977
|
-
dropdown: "dropdown",
|
|
9978
|
-
multiSelect: "multi-select",
|
|
9979
|
-
multiSelectCreate: "multi-select-create",
|
|
9980
|
-
date: "date",
|
|
9981
|
-
regex: "regex",
|
|
9982
|
-
textarea: "textarea"
|
|
9983
|
-
};
|
|
9984
|
-
var INPUT_FIELD_TYPES = ["email", "text", "number", "decimal", "url", "regex"];
|
|
9985
10007
|
var MAXIMUM_OPTION_LENGTH$2 = 7;
|
|
10008
|
+
var ACTION_INPUT_TYPES = ["text", "number", "decimal", "regex"];
|
|
9986
10009
|
|
|
9987
10010
|
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; }
|
|
9988
10011
|
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; }
|
|
@@ -11066,7 +11089,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
11066
11089
|
onClose: handleClose,
|
|
11067
11090
|
children: /*#__PURE__*/jsxRuntime.jsxs(Menu$a, {
|
|
11068
11091
|
className: "max-h-60 max-w-2xl p-3",
|
|
11069
|
-
children: [dropdownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11092
|
+
children: [dropdownOptions.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
11070
11093
|
autoFocus: true,
|
|
11071
11094
|
className: "mb-1",
|
|
11072
11095
|
"data-cy": "search-text-field",
|
|
@@ -11080,7 +11103,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
11080
11103
|
return e.stopPropagation();
|
|
11081
11104
|
}
|
|
11082
11105
|
}), /*#__PURE__*/jsxRuntime.jsx(OptionsWrapper, {
|
|
11083
|
-
hasScroll: dropdownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11106
|
+
hasScroll: dropdownOptions.length > MAXIMUM_OPTION_LENGTH$2,
|
|
11084
11107
|
children: searchedOptions.map(function (option, idx) {
|
|
11085
11108
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$9.Button, {
|
|
11086
11109
|
"data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -11714,7 +11737,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11714
11737
|
onClose: handleClose,
|
|
11715
11738
|
children: /*#__PURE__*/jsxRuntime.jsxs(Menu$9, {
|
|
11716
11739
|
className: "max-h-60 max-w-2xl p-3",
|
|
11717
|
-
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11740
|
+
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
11718
11741
|
autoFocus: true,
|
|
11719
11742
|
className: "mb-1",
|
|
11720
11743
|
"data-cy": "search-text-field",
|
|
@@ -11725,7 +11748,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11725
11748
|
return setSearchTerm(e.target.value);
|
|
11726
11749
|
}
|
|
11727
11750
|
}), /*#__PURE__*/jsxRuntime.jsx(OptionsWrapper, {
|
|
11728
|
-
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11751
|
+
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$2,
|
|
11729
11752
|
children: searchedOptions.map(function (option, idx) {
|
|
11730
11753
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$8.Button, {
|
|
11731
11754
|
"data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20409,7 +20432,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20409
20432
|
onClose: handleClose,
|
|
20410
20433
|
children: /*#__PURE__*/jsxRuntime.jsxs(Menu$6, {
|
|
20411
20434
|
className: "max-h-60 max-w-2xl p-3",
|
|
20412
|
-
children: [options.length > MAXIMUM_OPTION_LENGTH$
|
|
20435
|
+
children: [options.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
20413
20436
|
autoFocus: true,
|
|
20414
20437
|
className: "mb-1",
|
|
20415
20438
|
"data-cy": "search-text-field",
|
|
@@ -20423,7 +20446,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20423
20446
|
return e.stopPropagation();
|
|
20424
20447
|
}
|
|
20425
20448
|
}), /*#__PURE__*/jsxRuntime.jsx(OptionsWrapper, {
|
|
20426
|
-
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$
|
|
20449
|
+
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20427
20450
|
children: searchedOptions.map(function (option, idx) {
|
|
20428
20451
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$6.Button, {
|
|
20429
20452
|
"data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20531,7 +20554,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20531
20554
|
onClose: handleClose,
|
|
20532
20555
|
children: /*#__PURE__*/jsxRuntime.jsxs(Menu$5, {
|
|
20533
20556
|
className: "max-h-60 max-w-2xl p-3",
|
|
20534
|
-
children: [options.length > MAXIMUM_OPTION_LENGTH$
|
|
20557
|
+
children: [options.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
20535
20558
|
autoFocus: true,
|
|
20536
20559
|
className: "mb-1",
|
|
20537
20560
|
"data-cy": "search-text-field",
|
|
@@ -20545,7 +20568,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20545
20568
|
return e.stopPropagation();
|
|
20546
20569
|
}
|
|
20547
20570
|
}), /*#__PURE__*/jsxRuntime.jsx(OptionsWrapper, {
|
|
20548
|
-
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$
|
|
20571
|
+
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20549
20572
|
children: searchedOptions.map(function (option, idx) {
|
|
20550
20573
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$5.Button, {
|
|
20551
20574
|
"data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20705,7 +20728,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20705
20728
|
onClose: handleClose,
|
|
20706
20729
|
children: /*#__PURE__*/jsxRuntime.jsxs(Menu$4, {
|
|
20707
20730
|
className: "max-h-60 max-w-2xl p-3",
|
|
20708
|
-
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
20731
|
+
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsxRuntime.jsx(Input__default["default"], {
|
|
20709
20732
|
autoFocus: true,
|
|
20710
20733
|
className: "mb-1",
|
|
20711
20734
|
"data-cy": "search-text-field",
|
|
@@ -20716,7 +20739,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20716
20739
|
return setSearchTerm(e.target.value);
|
|
20717
20740
|
}
|
|
20718
20741
|
}), /*#__PURE__*/jsxRuntime.jsx(OptionsWrapper, {
|
|
20719
|
-
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
20742
|
+
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20720
20743
|
children: searchedOptions.map(function (option, idx) {
|
|
20721
20744
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem$4.Button, {
|
|
20722
20745
|
"data-cy": "".concat(utils.joinHyphenCase(option.label), "-menu-item"),
|