@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.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,30 +490,18 @@ 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
|
};
|
|
441
499
|
|
|
442
500
|
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; }
|
|
443
501
|
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; }
|
|
444
|
-
var RulePreview = function
|
|
445
|
-
var
|
|
502
|
+
var RulePreview = withT(function (_ref) {
|
|
503
|
+
var t = _ref.t,
|
|
504
|
+
isLoading = _ref.isLoading,
|
|
446
505
|
ruleDetails = _ref.ruleDetails,
|
|
447
506
|
isOpen = _ref.isOpen,
|
|
448
507
|
onClose = _ref.onClose,
|
|
@@ -485,10 +544,18 @@ var RulePreview = function RulePreview(_ref) {
|
|
|
485
544
|
children: ruleDetails.entity.value
|
|
486
545
|
})]
|
|
487
546
|
})]
|
|
488
|
-
}), /*#__PURE__*/jsx$1(EventsDetail, {
|
|
547
|
+
}), ruleDetails.events && isNotEmpty(ruleDetails.events) ? /*#__PURE__*/jsx$1(EventsDetail, {
|
|
489
548
|
conditions: ruleDetails.conditions,
|
|
490
549
|
events: ruleDetails.events,
|
|
491
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
|
+
})
|
|
492
559
|
}), /*#__PURE__*/jsx$1(ActionsDetail, {
|
|
493
560
|
actions: ruleDetails.actions
|
|
494
561
|
})]
|
|
@@ -496,7 +563,7 @@ var RulePreview = function RulePreview(_ref) {
|
|
|
496
563
|
})]
|
|
497
564
|
})
|
|
498
565
|
});
|
|
499
|
-
};
|
|
566
|
+
});
|
|
500
567
|
|
|
501
568
|
function _typeof$2(o) {
|
|
502
569
|
"@babel/helpers - typeof";
|
|
@@ -9886,52 +9953,8 @@ var DEFAULT_RULE_ACTION = {
|
|
|
9886
9953
|
};
|
|
9887
9954
|
var EDITOR_ADDONS = ["code-block", "block-quote", "image-upload"];
|
|
9888
9955
|
var EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
9889
|
-
var MAXIMUM_OPTION_LENGTH$3 = 7;
|
|
9890
|
-
var ACTION_INPUT_TYPES = ["text", "number", "decimal", "regex"];
|
|
9891
|
-
|
|
9892
|
-
var OPERATORS$1 = {
|
|
9893
|
-
or: "or_operator",
|
|
9894
|
-
and: "and_operator"
|
|
9895
|
-
};
|
|
9896
|
-
var OPERATOR_LABELS = {
|
|
9897
|
-
or_operator: t$5("neetoRules.operators.or"),
|
|
9898
|
-
and_operator: t$5("neetoRules.operators.and")
|
|
9899
|
-
};
|
|
9900
|
-
var VERB_LABELS = {
|
|
9901
|
-
is: t$5("neetoRules.conditionVerbs.is"),
|
|
9902
|
-
is_not: t$5("neetoRules.conditionVerbs.isNot"),
|
|
9903
|
-
contains: t$5("neetoRules.conditionVerbs.contains"),
|
|
9904
|
-
does_not_contain: t$5("neetoRules.conditionVerbs.doesNotContain"),
|
|
9905
|
-
contains_any_of: t$5("neetoRules.conditionVerbs.containsAnyOf"),
|
|
9906
|
-
contains_all_of: t$5("neetoRules.conditionVerbs.containsAllOf"),
|
|
9907
|
-
contains_none_of: t$5("neetoRules.conditionVerbs.containsNoneOf"),
|
|
9908
|
-
starts_with: t$5("neetoRules.conditionVerbs.startsWith"),
|
|
9909
|
-
ends_with: t$5("neetoRules.conditionVerbs.endsWith"),
|
|
9910
|
-
less_than: t$5("neetoRules.conditionVerbs.lessThan"),
|
|
9911
|
-
greater_than: t$5("neetoRules.conditionVerbs.greaterThan"),
|
|
9912
|
-
any_time: t$5("neetoRules.conditionVerbs.anyTime"),
|
|
9913
|
-
during: t$5("neetoRules.conditionVerbs.during"),
|
|
9914
|
-
not_during: t$5("neetoRules.conditionVerbs.notDuring"),
|
|
9915
|
-
any_of: t$5("neetoRules.conditionVerbs.anyOf"),
|
|
9916
|
-
none_of: t$5("neetoRules.conditionVerbs.noneOf"),
|
|
9917
|
-
is_before: t$5("neetoRules.conditionVerbs.isBefore"),
|
|
9918
|
-
is_after: t$5("neetoRules.conditionVerbs.isAfter")
|
|
9919
|
-
};
|
|
9920
|
-
var CONDITION_VALUE_TYPES = {
|
|
9921
|
-
text: "text",
|
|
9922
|
-
number: "number",
|
|
9923
|
-
decimal: "decimal",
|
|
9924
|
-
url: "url",
|
|
9925
|
-
email: "email",
|
|
9926
|
-
dropdown: "dropdown",
|
|
9927
|
-
multiSelect: "multi-select",
|
|
9928
|
-
multiSelectCreate: "multi-select-create",
|
|
9929
|
-
date: "date",
|
|
9930
|
-
regex: "regex",
|
|
9931
|
-
textarea: "textarea"
|
|
9932
|
-
};
|
|
9933
|
-
var INPUT_FIELD_TYPES = ["email", "text", "number", "decimal", "url", "regex"];
|
|
9934
9956
|
var MAXIMUM_OPTION_LENGTH$2 = 7;
|
|
9957
|
+
var ACTION_INPUT_TYPES = ["text", "number", "decimal", "regex"];
|
|
9935
9958
|
|
|
9936
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; }
|
|
9937
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; }
|
|
@@ -11015,7 +11038,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
11015
11038
|
onClose: handleClose,
|
|
11016
11039
|
children: /*#__PURE__*/jsxs(Menu$a, {
|
|
11017
11040
|
className: "max-h-60 max-w-2xl p-3",
|
|
11018
|
-
children: [dropdownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11041
|
+
children: [dropdownOptions.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsx$1(Input$2, {
|
|
11019
11042
|
autoFocus: true,
|
|
11020
11043
|
className: "mb-1",
|
|
11021
11044
|
"data-cy": "search-text-field",
|
|
@@ -11029,7 +11052,7 @@ var DropdownField$1 = function DropdownField(_ref) {
|
|
|
11029
11052
|
return e.stopPropagation();
|
|
11030
11053
|
}
|
|
11031
11054
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
11032
|
-
hasScroll: dropdownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11055
|
+
hasScroll: dropdownOptions.length > MAXIMUM_OPTION_LENGTH$2,
|
|
11033
11056
|
children: searchedOptions.map(function (option, idx) {
|
|
11034
11057
|
return /*#__PURE__*/jsx$1(MenuItem$9.Button, {
|
|
11035
11058
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -11663,7 +11686,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11663
11686
|
onClose: handleClose,
|
|
11664
11687
|
children: /*#__PURE__*/jsxs(Menu$9, {
|
|
11665
11688
|
className: "max-h-60 max-w-2xl p-3",
|
|
11666
|
-
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11689
|
+
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$2 && /*#__PURE__*/jsx$1(Input$2, {
|
|
11667
11690
|
autoFocus: true,
|
|
11668
11691
|
className: "mb-1",
|
|
11669
11692
|
"data-cy": "search-text-field",
|
|
@@ -11674,7 +11697,7 @@ var MultiSelect$1 = function MultiSelect(_ref) {
|
|
|
11674
11697
|
return setSearchTerm(e.target.value);
|
|
11675
11698
|
}
|
|
11676
11699
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
11677
|
-
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
11700
|
+
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$2,
|
|
11678
11701
|
children: searchedOptions.map(function (option, idx) {
|
|
11679
11702
|
return /*#__PURE__*/jsx$1(MenuItem$8.Button, {
|
|
11680
11703
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20358,7 +20381,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20358
20381
|
onClose: handleClose,
|
|
20359
20382
|
children: /*#__PURE__*/jsxs(Menu$6, {
|
|
20360
20383
|
className: "max-h-60 max-w-2xl p-3",
|
|
20361
|
-
children: [options.length > MAXIMUM_OPTION_LENGTH$
|
|
20384
|
+
children: [options.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsx$1(Input$2, {
|
|
20362
20385
|
autoFocus: true,
|
|
20363
20386
|
className: "mb-1",
|
|
20364
20387
|
"data-cy": "search-text-field",
|
|
@@ -20372,7 +20395,7 @@ var DropdownField = function DropdownField(_ref) {
|
|
|
20372
20395
|
return e.stopPropagation();
|
|
20373
20396
|
}
|
|
20374
20397
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
20375
|
-
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$
|
|
20398
|
+
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20376
20399
|
children: searchedOptions.map(function (option, idx) {
|
|
20377
20400
|
return /*#__PURE__*/jsx$1(MenuItem$6.Button, {
|
|
20378
20401
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20480,7 +20503,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20480
20503
|
onClose: handleClose,
|
|
20481
20504
|
children: /*#__PURE__*/jsxs(Menu$5, {
|
|
20482
20505
|
className: "max-h-60 max-w-2xl p-3",
|
|
20483
|
-
children: [options.length > MAXIMUM_OPTION_LENGTH$
|
|
20506
|
+
children: [options.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsx$1(Input$2, {
|
|
20484
20507
|
autoFocus: true,
|
|
20485
20508
|
className: "mb-1",
|
|
20486
20509
|
"data-cy": "search-text-field",
|
|
@@ -20494,7 +20517,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
20494
20517
|
return e.stopPropagation();
|
|
20495
20518
|
}
|
|
20496
20519
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
20497
|
-
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$
|
|
20520
|
+
hasScroll: options.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20498
20521
|
children: searchedOptions.map(function (option, idx) {
|
|
20499
20522
|
return /*#__PURE__*/jsx$1(MenuItem$5.Button, {
|
|
20500
20523
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|
|
@@ -20654,7 +20677,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20654
20677
|
onClose: handleClose,
|
|
20655
20678
|
children: /*#__PURE__*/jsxs(Menu$4, {
|
|
20656
20679
|
className: "max-h-60 max-w-2xl p-3",
|
|
20657
|
-
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
20680
|
+
children: [dropDownOptions.length > MAXIMUM_OPTION_LENGTH$3 && /*#__PURE__*/jsx$1(Input$2, {
|
|
20658
20681
|
autoFocus: true,
|
|
20659
20682
|
className: "mb-1",
|
|
20660
20683
|
"data-cy": "search-text-field",
|
|
@@ -20665,7 +20688,7 @@ var MultiSelect = function MultiSelect(_ref) {
|
|
|
20665
20688
|
return setSearchTerm(e.target.value);
|
|
20666
20689
|
}
|
|
20667
20690
|
}), /*#__PURE__*/jsx$1(OptionsWrapper, {
|
|
20668
|
-
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$
|
|
20691
|
+
hasScroll: dropDownOptions.length > MAXIMUM_OPTION_LENGTH$3,
|
|
20669
20692
|
children: searchedOptions.map(function (option, idx) {
|
|
20670
20693
|
return /*#__PURE__*/jsx$1(MenuItem$4.Button, {
|
|
20671
20694
|
"data-cy": "".concat(joinHyphenCase(option.label), "-menu-item"),
|