@bigbinary/neeto-rules-frontend 0.2.5 → 0.3.0

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 CHANGED
@@ -16,6 +16,7 @@ var ramda = require('ramda');
16
16
  var dayjs = require('dayjs');
17
17
  var neetoEditor = require('@bigbinary/neeto-editor');
18
18
  var yup = require('yup');
19
+ var PageLoader = require('neetomolecules/PageLoader');
19
20
  var utils = require('@bigbinary/neeto-commons-frontend/utils');
20
21
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
21
22
 
@@ -45,6 +46,7 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
45
46
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
46
47
  var dayjs__namespace = /*#__PURE__*/_interopNamespace(dayjs);
47
48
  var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
49
+ var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
48
50
 
49
51
  function _objectDestructuringEmpty(obj) {
50
52
  if (obj == null) throw new TypeError("Cannot destructure " + obj);
@@ -5801,7 +5803,9 @@ var common$1 = {
5801
5803
  or: "or",
5802
5804
  search: "Search",
5803
5805
  as: "as",
5804
- "delete": "Delete"
5806
+ "delete": "Delete",
5807
+ viewMore: "View more",
5808
+ viewLess: "View less"
5805
5809
  };
5806
5810
  var form = {
5807
5811
  noEvents: "A rule without events will run hourly.",
@@ -5901,7 +5905,8 @@ var labels = {
5901
5905
  unassigned: "Unassigned",
5902
5906
  checked: "Checked",
5903
5907
  unchecked: "Unchecked",
5904
- text: "Text"
5908
+ text: "Text",
5909
+ ruleSummary: "Automation rule summary"
5905
5910
  };
5906
5911
  var placeholders$1 = {
5907
5912
  "if": "If",
@@ -15747,7 +15752,7 @@ function cov_1l1zuel3qt() {
15747
15752
  }
15748
15753
  cov_1l1zuel3qt();
15749
15754
  cov_1l1zuel3qt().s[0]++;
15750
- var Title = function Title(_ref) {
15755
+ var Title$1 = function Title(_ref) {
15751
15756
  var title = _ref.title,
15752
15757
  children = _ref.children;
15753
15758
  cov_1l1zuel3qt().f[0]++;
@@ -16589,7 +16594,7 @@ var Actions$1 = function Actions(_ref) {
16589
16594
  setScrollToBottom(true);
16590
16595
  };
16591
16596
  cov_3lq6cjh4u().s[18]++;
16592
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Title, {
16597
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(Title$1, {
16593
16598
  title: t("common.actions")
16594
16599
  }, /*#__PURE__*/React__default["default"].createElement(formik.FieldArray, {
16595
16600
  name: "actions",
@@ -26549,7 +26554,7 @@ var Conditions$1 = function Conditions(_ref2) {
26549
26554
  return index ? (cov_2otqdci4wd().b[4][0]++, t("placeholders.if").toLowerCase()) : (cov_2otqdci4wd().b[4][1]++, t("placeholders.if"));
26550
26555
  };
26551
26556
  cov_2otqdci4wd().s[22]++;
26552
- return /*#__PURE__*/React__default["default"].createElement(Title, {
26557
+ return /*#__PURE__*/React__default["default"].createElement(Title$1, {
26553
26558
  title: t("common.conditions")
26554
26559
  }, /*#__PURE__*/React__default["default"].createElement(formik.FieldArray, {
26555
26560
  name: "conditions",
@@ -31387,7 +31392,7 @@ var Events$2 = function Events() {
31387
31392
  arrayHelper.remove(index);
31388
31393
  };
31389
31394
  cov_dprwv7svz().s[12]++;
31390
- return /*#__PURE__*/React__default["default"].createElement(Title, {
31395
+ return /*#__PURE__*/React__default["default"].createElement(Title$1, {
31391
31396
  title: t("common.events")
31392
31397
  }, /*#__PURE__*/React__default["default"].createElement(formik.FieldArray, {
31393
31398
  name: "events",
@@ -33925,6 +33930,2886 @@ var NeetoRules$2 = function NeetoRules(_ref) {
33925
33930
  return /*#__PURE__*/React__default["default"].createElement(BrowserRouter, null, /*#__PURE__*/React__default["default"].createElement(Main, rest));
33926
33931
  };
33927
33932
 
33933
+ function cov_13jp1hsz0e() {
33934
+ var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/Card.jsx";
33935
+ var hash = "060ed8cb86ad2890593771245657ef35803f1a4f";
33936
+ var global = new Function("return this")();
33937
+ var gcv = "__coverage__";
33938
+ var coverageData = {
33939
+ path: "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/Card.jsx",
33940
+ statementMap: {
33941
+ "0": {
33942
+ start: {
33943
+ line: 6,
33944
+ column: 14
33945
+ },
33946
+ end: {
33947
+ line: 15,
33948
+ column: 1
33949
+ }
33950
+ },
33951
+ "1": {
33952
+ start: {
33953
+ line: 7,
33954
+ column: 2
33955
+ },
33956
+ end: {
33957
+ line: 14,
33958
+ column: 5
33959
+ }
33960
+ },
33961
+ "2": {
33962
+ start: {
33963
+ line: 17,
33964
+ column: 0
33965
+ },
33966
+ end: {
33967
+ line: 20,
33968
+ column: 2
33969
+ }
33970
+ }
33971
+ },
33972
+ fnMap: {
33973
+ "0": {
33974
+ name: "(anonymous_0)",
33975
+ decl: {
33976
+ start: {
33977
+ line: 6,
33978
+ column: 14
33979
+ },
33980
+ end: {
33981
+ line: 6,
33982
+ column: 15
33983
+ }
33984
+ },
33985
+ loc: {
33986
+ start: {
33987
+ line: 7,
33988
+ column: 2
33989
+ },
33990
+ end: {
33991
+ line: 14,
33992
+ column: 5
33993
+ }
33994
+ },
33995
+ line: 7
33996
+ }
33997
+ },
33998
+ branchMap: {},
33999
+ s: {
34000
+ "0": 0,
34001
+ "1": 0,
34002
+ "2": 0
34003
+ },
34004
+ f: {
34005
+ "0": 0
34006
+ },
34007
+ b: {},
34008
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
34009
+ hash: "060ed8cb86ad2890593771245657ef35803f1a4f"
34010
+ };
34011
+ var coverage = global[gcv] || (global[gcv] = {});
34012
+ if (!coverage[path] || coverage[path].hash !== hash) {
34013
+ coverage[path] = coverageData;
34014
+ }
34015
+ var actualCoverage = coverage[path];
34016
+ {
34017
+ // @ts-ignore
34018
+ cov_13jp1hsz0e = function () {
34019
+ return actualCoverage;
34020
+ };
34021
+ }
34022
+ return actualCoverage;
34023
+ }
34024
+ cov_13jp1hsz0e();
34025
+ cov_13jp1hsz0e().s[0]++;
34026
+ var Title = function Title(_ref) {
34027
+ var title = _ref.title,
34028
+ children = _ref.children;
34029
+ cov_13jp1hsz0e().f[0]++;
34030
+ cov_13jp1hsz0e().s[1]++;
34031
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
34032
+ className: "neeto-ui-text-gray-800",
34033
+ style: "h5",
34034
+ weight: "semibold"
34035
+ }, title), /*#__PURE__*/React__default["default"].createElement("div", {
34036
+ className: "neeto-ui-bg-gray-100 neeto-ui-rounded-sm my-3 p-4"
34037
+ }, children));
34038
+ };
34039
+ cov_13jp1hsz0e().s[2]++;
34040
+
34041
+ function cov_1yo87bzjl0() {
34042
+ var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/MultiSelectValues.jsx";
34043
+ var hash = "ebc82c77b82c7a6b1fe37565159b52052ceca263";
34044
+ var global = new Function("return this")();
34045
+ var gcv = "__coverage__";
34046
+ var coverageData = {
34047
+ path: "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/MultiSelectValues.jsx",
34048
+ statementMap: {
34049
+ "0": {
34050
+ start: {
34051
+ line: 5,
34052
+ column: 26
34053
+ },
34054
+ end: {
34055
+ line: 28,
34056
+ column: 1
34057
+ }
34058
+ },
34059
+ "1": {
34060
+ start: {
34061
+ line: 6,
34062
+ column: 2
34063
+ },
34064
+ end: {
34065
+ line: 27,
34066
+ column: 5
34067
+ }
34068
+ },
34069
+ "2": {
34070
+ start: {
34071
+ line: 8,
34072
+ column: 6
34073
+ },
34074
+ end: {
34075
+ line: 25,
34076
+ column: 23
34077
+ }
34078
+ }
34079
+ },
34080
+ fnMap: {
34081
+ "0": {
34082
+ name: "(anonymous_0)",
34083
+ decl: {
34084
+ start: {
34085
+ line: 5,
34086
+ column: 26
34087
+ },
34088
+ end: {
34089
+ line: 5,
34090
+ column: 27
34091
+ }
34092
+ },
34093
+ loc: {
34094
+ start: {
34095
+ line: 6,
34096
+ column: 2
34097
+ },
34098
+ end: {
34099
+ line: 27,
34100
+ column: 5
34101
+ }
34102
+ },
34103
+ line: 6
34104
+ },
34105
+ "1": {
34106
+ name: "(anonymous_1)",
34107
+ decl: {
34108
+ start: {
34109
+ line: 7,
34110
+ column: 17
34111
+ },
34112
+ end: {
34113
+ line: 7,
34114
+ column: 18
34115
+ }
34116
+ },
34117
+ loc: {
34118
+ start: {
34119
+ line: 8,
34120
+ column: 6
34121
+ },
34122
+ end: {
34123
+ line: 25,
34124
+ column: 23
34125
+ }
34126
+ },
34127
+ line: 8
34128
+ }
34129
+ },
34130
+ branchMap: {
34131
+ "0": {
34132
+ loc: {
34133
+ start: {
34134
+ line: 9,
34135
+ column: 9
34136
+ },
34137
+ end: {
34138
+ line: 17,
34139
+ column: 9
34140
+ }
34141
+ },
34142
+ type: "binary-expr",
34143
+ locations: [{
34144
+ start: {
34145
+ line: 9,
34146
+ column: 9
34147
+ },
34148
+ end: {
34149
+ line: 9,
34150
+ column: 14
34151
+ }
34152
+ }, {
34153
+ start: {
34154
+ line: 10,
34155
+ column: 10
34156
+ },
34157
+ end: {
34158
+ line: 16,
34159
+ column: 23
34160
+ }
34161
+ }],
34162
+ line: 9
34163
+ }
34164
+ },
34165
+ s: {
34166
+ "0": 0,
34167
+ "1": 0,
34168
+ "2": 0
34169
+ },
34170
+ f: {
34171
+ "0": 0,
34172
+ "1": 0
34173
+ },
34174
+ b: {
34175
+ "0": [0, 0]
34176
+ },
34177
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
34178
+ hash: "ebc82c77b82c7a6b1fe37565159b52052ceca263"
34179
+ };
34180
+ var coverage = global[gcv] || (global[gcv] = {});
34181
+ if (!coverage[path] || coverage[path].hash !== hash) {
34182
+ coverage[path] = coverageData;
34183
+ }
34184
+ var actualCoverage = coverage[path];
34185
+ {
34186
+ // @ts-ignore
34187
+ cov_1yo87bzjl0 = function () {
34188
+ return actualCoverage;
34189
+ };
34190
+ }
34191
+ return actualCoverage;
34192
+ }
34193
+ cov_1yo87bzjl0();
34194
+ cov_1yo87bzjl0().s[0]++;
34195
+ var MultiSelectValues = function MultiSelectValues(_ref) {
34196
+ var separator = _ref.separator,
34197
+ values = _ref.values;
34198
+ cov_1yo87bzjl0().f[0]++;
34199
+ cov_1yo87bzjl0().s[1]++;
34200
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, values === null || values === void 0 ? void 0 : values.map(function (value, idx) {
34201
+ cov_1yo87bzjl0().f[1]++;
34202
+ cov_1yo87bzjl0().s[2]++;
34203
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
34204
+ key: idx
34205
+ }, (cov_1yo87bzjl0().b[0][0]++, !!idx) && (cov_1yo87bzjl0().b[0][1]++, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
34206
+ className: "neeto-ui-text-gray-700",
34207
+ style: "h5",
34208
+ weight: "normal"
34209
+ }, separator)), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
34210
+ className: "neeto-ui-text-gray-800",
34211
+ style: "h5",
34212
+ weight: "semibold"
34213
+ }, value.toLowerCase()));
34214
+ }));
34215
+ };
34216
+
34217
+ function cov_l89oqcaez() {
34218
+ var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/utils.js";
34219
+ var hash = "67d71dfe37d2327777bd145bf79ff7779c4b115d";
34220
+ var global = new Function("return this")();
34221
+ var gcv = "__coverage__";
34222
+ var coverageData = {
34223
+ path: "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/utils.js",
34224
+ statementMap: {
34225
+ "0": {
34226
+ start: {
34227
+ line: 3,
34228
+ column: 37
34229
+ },
34230
+ end: {
34231
+ line: 7,
34232
+ column: 25
34233
+ }
34234
+ },
34235
+ "1": {
34236
+ start: {
34237
+ line: 4,
34238
+ column: 2
34239
+ },
34240
+ end: {
34241
+ line: 7,
34242
+ column: 25
34243
+ }
34244
+ }
34245
+ },
34246
+ fnMap: {
34247
+ "0": {
34248
+ name: "(anonymous_0)",
34249
+ decl: {
34250
+ start: {
34251
+ line: 3,
34252
+ column: 37
34253
+ },
34254
+ end: {
34255
+ line: 3,
34256
+ column: 38
34257
+ }
34258
+ },
34259
+ loc: {
34260
+ start: {
34261
+ line: 4,
34262
+ column: 2
34263
+ },
34264
+ end: {
34265
+ line: 7,
34266
+ column: 25
34267
+ }
34268
+ },
34269
+ line: 4
34270
+ }
34271
+ },
34272
+ branchMap: {},
34273
+ s: {
34274
+ "0": 0,
34275
+ "1": 0
34276
+ },
34277
+ f: {
34278
+ "0": 0
34279
+ },
34280
+ b: {},
34281
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
34282
+ hash: "67d71dfe37d2327777bd145bf79ff7779c4b115d"
34283
+ };
34284
+ var coverage = global[gcv] || (global[gcv] = {});
34285
+ if (!coverage[path] || coverage[path].hash !== hash) {
34286
+ coverage[path] = coverageData;
34287
+ }
34288
+ var actualCoverage = coverage[path];
34289
+ {
34290
+ // @ts-ignore
34291
+ cov_l89oqcaez = function () {
34292
+ return actualCoverage;
34293
+ };
34294
+ }
34295
+ return actualCoverage;
34296
+ }
34297
+ cov_l89oqcaez();
34298
+ cov_l89oqcaez().s[0]++;
34299
+ var getEntityDisplayValue = function getEntityDisplayValue(entitiy, entitiyOption) {
34300
+ var _findBy, _findBy$label;
34301
+ cov_l89oqcaez().f[0]++;
34302
+ cov_l89oqcaez().s[1]++;
34303
+ return (_findBy = pure.findBy({
34304
+ value: entitiy.metadata.value
34305
+ }, entitiyOption.dropdownOptions)) === null || _findBy === void 0 ? void 0 : (_findBy$label = _findBy.label) === null || _findBy$label === void 0 ? void 0 : _findBy$label.toLowerCase();
34306
+ };
34307
+
34308
+ function cov_12s3p009b2() {
34309
+ var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/ActionsDetail.jsx";
34310
+ var hash = "f649e2bb358ba3c6a0dec691b8f1c0f6ace29061";
34311
+ var global = new Function("return this")();
34312
+ var gcv = "__coverage__";
34313
+ var coverageData = {
34314
+ path: "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/ActionsDetail.jsx",
34315
+ statementMap: {
34316
+ "0": {
34317
+ start: {
34318
+ line: 13,
34319
+ column: 22
34320
+ },
34321
+ end: {
34322
+ line: 103,
34323
+ column: 1
34324
+ }
34325
+ },
34326
+ "1": {
34327
+ start: {
34328
+ line: 14,
34329
+ column: 34
34330
+ },
34331
+ end: {
34332
+ line: 14,
34333
+ column: 49
34334
+ }
34335
+ },
34336
+ "2": {
34337
+ start: {
34338
+ line: 15,
34339
+ column: 16
34340
+ },
34341
+ end: {
34342
+ line: 15,
34343
+ column: 32
34344
+ }
34345
+ },
34346
+ "3": {
34347
+ start: {
34348
+ line: 17,
34349
+ column: 22
34350
+ },
34351
+ end: {
34352
+ line: 17,
34353
+ column: 35
34354
+ }
34355
+ },
34356
+ "4": {
34357
+ start: {
34358
+ line: 19,
34359
+ column: 4
34360
+ },
34361
+ end: {
34362
+ line: 19,
34363
+ column: 78
34364
+ }
34365
+ },
34366
+ "5": {
34367
+ start: {
34368
+ line: 21,
34369
+ column: 19
34370
+ },
34371
+ end: {
34372
+ line: 24,
34373
+ column: 24
34374
+ }
34375
+ },
34376
+ "6": {
34377
+ start: {
34378
+ line: 22,
34379
+ column: 4
34380
+ },
34381
+ end: {
34382
+ line: 24,
34383
+ column: 24
34384
+ }
34385
+ },
34386
+ "7": {
34387
+ start: {
34388
+ line: 26,
34389
+ column: 29
34390
+ },
34391
+ end: {
34392
+ line: 56,
34393
+ column: 3
34394
+ }
34395
+ },
34396
+ "8": {
34397
+ start: {
34398
+ line: 27,
34399
+ column: 4
34400
+ },
34401
+ end: {
34402
+ line: 37,
34403
+ column: 5
34404
+ }
34405
+ },
34406
+ "9": {
34407
+ start: {
34408
+ line: 28,
34409
+ column: 6
34410
+ },
34411
+ end: {
34412
+ line: 36,
34413
+ column: 8
34414
+ }
34415
+ },
34416
+ "10": {
34417
+ start: {
34418
+ line: 39,
34419
+ column: 4
34420
+ },
34421
+ end: {
34422
+ line: 53,
34423
+ column: 5
34424
+ }
34425
+ },
34426
+ "11": {
34427
+ start: {
34428
+ line: 40,
34429
+ column: 21
34430
+ },
34431
+ end: {
34432
+ line: 45,
34433
+ column: 7
34434
+ }
34435
+ },
34436
+ "12": {
34437
+ start: {
34438
+ line: 43,
34439
+ column: 10
34440
+ },
34441
+ end: {
34442
+ line: 43,
34443
+ column: 47
34444
+ }
34445
+ },
34446
+ "13": {
34447
+ start: {
34448
+ line: 47,
34449
+ column: 6
34450
+ },
34451
+ end: {
34452
+ line: 52,
34453
+ column: 8
34454
+ }
34455
+ },
34456
+ "14": {
34457
+ start: {
34458
+ line: 55,
34459
+ column: 4
34460
+ },
34461
+ end: {
34462
+ line: 55,
34463
+ column: 16
34464
+ }
34465
+ },
34466
+ "15": {
34467
+ start: {
34468
+ line: 58,
34469
+ column: 23
34470
+ },
34471
+ end: {
34472
+ line: 74,
34473
+ column: 3
34474
+ }
34475
+ },
34476
+ "16": {
34477
+ start: {
34478
+ line: 59,
34479
+ column: 25
34480
+ },
34481
+ end: {
34482
+ line: 59,
34483
+ column: 78
34484
+ }
34485
+ },
34486
+ "17": {
34487
+ start: {
34488
+ line: 60,
34489
+ column: 4
34490
+ },
34491
+ end: {
34492
+ line: 60,
34493
+ column: 35
34494
+ }
34495
+ },
34496
+ "18": {
34497
+ start: {
34498
+ line: 60,
34499
+ column: 23
34500
+ },
34501
+ end: {
34502
+ line: 60,
34503
+ column: 35
34504
+ }
34505
+ },
34506
+ "19": {
34507
+ start: {
34508
+ line: 62,
34509
+ column: 4
34510
+ },
34511
+ end: {
34512
+ line: 73,
34513
+ column: 6
34514
+ }
34515
+ },
34516
+ "20": {
34517
+ start: {
34518
+ line: 76,
34519
+ column: 2
34520
+ },
34521
+ end: {
34522
+ line: 102,
34523
+ column: 4
34524
+ }
34525
+ },
34526
+ "21": {
34527
+ start: {
34528
+ line: 79,
34529
+ column: 8
34530
+ },
34531
+ end: {
34532
+ line: 88,
34533
+ column: 14
34534
+ }
34535
+ },
34536
+ "22": {
34537
+ start: {
34538
+ line: 97,
34539
+ column: 27
34540
+ },
34541
+ end: {
34542
+ line: 97,
34543
+ column: 63
34544
+ }
34545
+ },
34546
+ "23": {
34547
+ start: {
34548
+ line: 97,
34549
+ column: 52
34550
+ },
34551
+ end: {
34552
+ line: 97,
34553
+ column: 62
34554
+ }
34555
+ }
34556
+ },
34557
+ fnMap: {
34558
+ "0": {
34559
+ name: "(anonymous_0)",
34560
+ decl: {
34561
+ start: {
34562
+ line: 13,
34563
+ column: 22
34564
+ },
34565
+ end: {
34566
+ line: 13,
34567
+ column: 23
34568
+ }
34569
+ },
34570
+ loc: {
34571
+ start: {
34572
+ line: 13,
34573
+ column: 39
34574
+ },
34575
+ end: {
34576
+ line: 103,
34577
+ column: 1
34578
+ }
34579
+ },
34580
+ line: 13
34581
+ },
34582
+ "1": {
34583
+ name: "(anonymous_1)",
34584
+ decl: {
34585
+ start: {
34586
+ line: 21,
34587
+ column: 19
34588
+ },
34589
+ end: {
34590
+ line: 21,
34591
+ column: 20
34592
+ }
34593
+ },
34594
+ loc: {
34595
+ start: {
34596
+ line: 22,
34597
+ column: 4
34598
+ },
34599
+ end: {
34600
+ line: 24,
34601
+ column: 24
34602
+ }
34603
+ },
34604
+ line: 22
34605
+ },
34606
+ "2": {
34607
+ name: "(anonymous_2)",
34608
+ decl: {
34609
+ start: {
34610
+ line: 26,
34611
+ column: 29
34612
+ },
34613
+ end: {
34614
+ line: 26,
34615
+ column: 30
34616
+ }
34617
+ },
34618
+ loc: {
34619
+ start: {
34620
+ line: 26,
34621
+ column: 55
34622
+ },
34623
+ end: {
34624
+ line: 56,
34625
+ column: 3
34626
+ }
34627
+ },
34628
+ line: 26
34629
+ },
34630
+ "3": {
34631
+ name: "(anonymous_3)",
34632
+ decl: {
34633
+ start: {
34634
+ line: 42,
34635
+ column: 44
34636
+ },
34637
+ end: {
34638
+ line: 42,
34639
+ column: 45
34640
+ }
34641
+ },
34642
+ loc: {
34643
+ start: {
34644
+ line: 43,
34645
+ column: 10
34646
+ },
34647
+ end: {
34648
+ line: 43,
34649
+ column: 47
34650
+ }
34651
+ },
34652
+ line: 43
34653
+ },
34654
+ "4": {
34655
+ name: "(anonymous_4)",
34656
+ decl: {
34657
+ start: {
34658
+ line: 58,
34659
+ column: 23
34660
+ },
34661
+ end: {
34662
+ line: 58,
34663
+ column: 24
34664
+ }
34665
+ },
34666
+ loc: {
34667
+ start: {
34668
+ line: 58,
34669
+ column: 33
34670
+ },
34671
+ end: {
34672
+ line: 74,
34673
+ column: 3
34674
+ }
34675
+ },
34676
+ line: 58
34677
+ },
34678
+ "5": {
34679
+ name: "(anonymous_5)",
34680
+ decl: {
34681
+ start: {
34682
+ line: 78,
34683
+ column: 22
34684
+ },
34685
+ end: {
34686
+ line: 78,
34687
+ column: 23
34688
+ }
34689
+ },
34690
+ loc: {
34691
+ start: {
34692
+ line: 79,
34693
+ column: 8
34694
+ },
34695
+ end: {
34696
+ line: 88,
34697
+ column: 14
34698
+ }
34699
+ },
34700
+ line: 79
34701
+ },
34702
+ "6": {
34703
+ name: "(anonymous_6)",
34704
+ decl: {
34705
+ start: {
34706
+ line: 97,
34707
+ column: 21
34708
+ },
34709
+ end: {
34710
+ line: 97,
34711
+ column: 22
34712
+ }
34713
+ },
34714
+ loc: {
34715
+ start: {
34716
+ line: 97,
34717
+ column: 27
34718
+ },
34719
+ end: {
34720
+ line: 97,
34721
+ column: 63
34722
+ }
34723
+ },
34724
+ line: 97
34725
+ },
34726
+ "7": {
34727
+ name: "(anonymous_7)",
34728
+ decl: {
34729
+ start: {
34730
+ line: 97,
34731
+ column: 39
34732
+ },
34733
+ end: {
34734
+ line: 97,
34735
+ column: 40
34736
+ }
34737
+ },
34738
+ loc: {
34739
+ start: {
34740
+ line: 97,
34741
+ column: 52
34742
+ },
34743
+ end: {
34744
+ line: 97,
34745
+ column: 62
34746
+ }
34747
+ },
34748
+ line: 97
34749
+ }
34750
+ },
34751
+ branchMap: {
34752
+ "0": {
34753
+ loc: {
34754
+ start: {
34755
+ line: 19,
34756
+ column: 4
34757
+ },
34758
+ end: {
34759
+ line: 19,
34760
+ column: 78
34761
+ }
34762
+ },
34763
+ type: "cond-expr",
34764
+ locations: [{
34765
+ start: {
34766
+ line: 19,
34767
+ column: 41
34768
+ },
34769
+ end: {
34770
+ line: 19,
34771
+ column: 52
34772
+ }
34773
+ }, {
34774
+ start: {
34775
+ line: 19,
34776
+ column: 55
34777
+ },
34778
+ end: {
34779
+ line: 19,
34780
+ column: 78
34781
+ }
34782
+ }],
34783
+ line: 19
34784
+ },
34785
+ "1": {
34786
+ loc: {
34787
+ start: {
34788
+ line: 19,
34789
+ column: 4
34790
+ },
34791
+ end: {
34792
+ line: 19,
34793
+ column: 38
34794
+ }
34795
+ },
34796
+ type: "binary-expr",
34797
+ locations: [{
34798
+ start: {
34799
+ line: 19,
34800
+ column: 4
34801
+ },
34802
+ end: {
34803
+ line: 19,
34804
+ column: 12
34805
+ }
34806
+ }, {
34807
+ start: {
34808
+ line: 19,
34809
+ column: 16
34810
+ },
34811
+ end: {
34812
+ line: 19,
34813
+ column: 38
34814
+ }
34815
+ }],
34816
+ line: 19
34817
+ },
34818
+ "2": {
34819
+ loc: {
34820
+ start: {
34821
+ line: 22,
34822
+ column: 4
34823
+ },
34824
+ end: {
34825
+ line: 24,
34826
+ column: 24
34827
+ }
34828
+ },
34829
+ type: "cond-expr",
34830
+ locations: [{
34831
+ start: {
34832
+ line: 23,
34833
+ column: 8
34834
+ },
34835
+ end: {
34836
+ line: 23,
34837
+ column: 65
34838
+ }
34839
+ }, {
34840
+ start: {
34841
+ line: 24,
34842
+ column: 8
34843
+ },
34844
+ end: {
34845
+ line: 24,
34846
+ column: 24
34847
+ }
34848
+ }],
34849
+ line: 22
34850
+ },
34851
+ "3": {
34852
+ loc: {
34853
+ start: {
34854
+ line: 27,
34855
+ column: 4
34856
+ },
34857
+ end: {
34858
+ line: 37,
34859
+ column: 5
34860
+ }
34861
+ },
34862
+ type: "if",
34863
+ locations: [{
34864
+ start: {
34865
+ line: 27,
34866
+ column: 4
34867
+ },
34868
+ end: {
34869
+ line: 37,
34870
+ column: 5
34871
+ }
34872
+ }, {
34873
+ start: {
34874
+ line: undefined,
34875
+ column: undefined
34876
+ },
34877
+ end: {
34878
+ line: undefined,
34879
+ column: undefined
34880
+ }
34881
+ }],
34882
+ line: 27
34883
+ },
34884
+ "4": {
34885
+ loc: {
34886
+ start: {
34887
+ line: 39,
34888
+ column: 4
34889
+ },
34890
+ end: {
34891
+ line: 53,
34892
+ column: 5
34893
+ }
34894
+ },
34895
+ type: "if",
34896
+ locations: [{
34897
+ start: {
34898
+ line: 39,
34899
+ column: 4
34900
+ },
34901
+ end: {
34902
+ line: 53,
34903
+ column: 5
34904
+ }
34905
+ }, {
34906
+ start: {
34907
+ line: undefined,
34908
+ column: undefined
34909
+ },
34910
+ end: {
34911
+ line: undefined,
34912
+ column: undefined
34913
+ }
34914
+ }],
34915
+ line: 39
34916
+ },
34917
+ "5": {
34918
+ loc: {
34919
+ start: {
34920
+ line: 60,
34921
+ column: 4
34922
+ },
34923
+ end: {
34924
+ line: 60,
34925
+ column: 35
34926
+ }
34927
+ },
34928
+ type: "if",
34929
+ locations: [{
34930
+ start: {
34931
+ line: 60,
34932
+ column: 4
34933
+ },
34934
+ end: {
34935
+ line: 60,
34936
+ column: 35
34937
+ }
34938
+ }, {
34939
+ start: {
34940
+ line: undefined,
34941
+ column: undefined
34942
+ },
34943
+ end: {
34944
+ line: undefined,
34945
+ column: undefined
34946
+ }
34947
+ }],
34948
+ line: 60
34949
+ },
34950
+ "6": {
34951
+ loc: {
34952
+ start: {
34953
+ line: 90,
34954
+ column: 7
34955
+ },
34956
+ end: {
34957
+ line: 100,
34958
+ column: 7
34959
+ }
34960
+ },
34961
+ type: "binary-expr",
34962
+ locations: [{
34963
+ start: {
34964
+ line: 90,
34965
+ column: 7
34966
+ },
34967
+ end: {
34968
+ line: 90,
34969
+ column: 29
34970
+ }
34971
+ }, {
34972
+ start: {
34973
+ line: 91,
34974
+ column: 8
34975
+ },
34976
+ end: {
34977
+ line: 99,
34978
+ column: 14
34979
+ }
34980
+ }],
34981
+ line: 90
34982
+ },
34983
+ "7": {
34984
+ loc: {
34985
+ start: {
34986
+ line: 93,
34987
+ column: 18
34988
+ },
34989
+ end: {
34990
+ line: 93,
34991
+ column: 39
34992
+ }
34993
+ },
34994
+ type: "cond-expr",
34995
+ locations: [{
34996
+ start: {
34997
+ line: 93,
34998
+ column: 30
34999
+ },
35000
+ end: {
35001
+ line: 93,
35002
+ column: 34
35003
+ }
35004
+ }, {
35005
+ start: {
35006
+ line: 93,
35007
+ column: 37
35008
+ },
35009
+ end: {
35010
+ line: 93,
35011
+ column: 39
35012
+ }
35013
+ }],
35014
+ line: 93
35015
+ },
35016
+ "8": {
35017
+ loc: {
35018
+ start: {
35019
+ line: 94,
35020
+ column: 19
35021
+ },
35022
+ end: {
35023
+ line: 94,
35024
+ column: 74
35025
+ }
35026
+ },
35027
+ type: "cond-expr",
35028
+ locations: [{
35029
+ start: {
35030
+ line: 94,
35031
+ column: 31
35032
+ },
35033
+ end: {
35034
+ line: 94,
35035
+ column: 51
35036
+ }
35037
+ }, {
35038
+ start: {
35039
+ line: 94,
35040
+ column: 54
35041
+ },
35042
+ end: {
35043
+ line: 94,
35044
+ column: 74
35045
+ }
35046
+ }],
35047
+ line: 94
35048
+ }
35049
+ },
35050
+ s: {
35051
+ "0": 0,
35052
+ "1": 0,
35053
+ "2": 0,
35054
+ "3": 0,
35055
+ "4": 0,
35056
+ "5": 0,
35057
+ "6": 0,
35058
+ "7": 0,
35059
+ "8": 0,
35060
+ "9": 0,
35061
+ "10": 0,
35062
+ "11": 0,
35063
+ "12": 0,
35064
+ "13": 0,
35065
+ "14": 0,
35066
+ "15": 0,
35067
+ "16": 0,
35068
+ "17": 0,
35069
+ "18": 0,
35070
+ "19": 0,
35071
+ "20": 0,
35072
+ "21": 0,
35073
+ "22": 0,
35074
+ "23": 0
35075
+ },
35076
+ f: {
35077
+ "0": 0,
35078
+ "1": 0,
35079
+ "2": 0,
35080
+ "3": 0,
35081
+ "4": 0,
35082
+ "5": 0,
35083
+ "6": 0,
35084
+ "7": 0
35085
+ },
35086
+ b: {
35087
+ "0": [0, 0],
35088
+ "1": [0, 0],
35089
+ "2": [0, 0],
35090
+ "3": [0, 0],
35091
+ "4": [0, 0],
35092
+ "5": [0, 0],
35093
+ "6": [0, 0],
35094
+ "7": [0, 0],
35095
+ "8": [0, 0]
35096
+ },
35097
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
35098
+ hash: "f649e2bb358ba3c6a0dec691b8f1c0f6ace29061"
35099
+ };
35100
+ var coverage = global[gcv] || (global[gcv] = {});
35101
+ if (!coverage[path] || coverage[path].hash !== hash) {
35102
+ coverage[path] = coverageData;
35103
+ }
35104
+ var actualCoverage = coverage[path];
35105
+ {
35106
+ // @ts-ignore
35107
+ cov_12s3p009b2 = function () {
35108
+ return actualCoverage;
35109
+ };
35110
+ }
35111
+ return actualCoverage;
35112
+ }
35113
+ cov_12s3p009b2();
35114
+ cov_12s3p009b2().s[0]++;
35115
+ var ActionsDetail = function ActionsDetail(_ref) {
35116
+ var actions = _ref.actions;
35117
+ cov_12s3p009b2().f[0]++;
35118
+ var _ref2 = (cov_12s3p009b2().s[1]++, React.useState(false)),
35119
+ _ref3 = _slicedToArray(_ref2, 2),
35120
+ viewMore = _ref3[0],
35121
+ setViewMore = _ref3[1];
35122
+ var _ref4 = (cov_12s3p009b2().s[2]++, useTranslation()),
35123
+ t = _ref4.t;
35124
+ var actionsList = (cov_12s3p009b2().s[3]++, actions.value);
35125
+ var allActions = (cov_12s3p009b2().s[4]++, (cov_12s3p009b2().b[1][0]++, viewMore) && (cov_12s3p009b2().b[1][1]++, actionsList.length > 4) ? (cov_12s3p009b2().b[0][0]++, actionsList) : (cov_12s3p009b2().b[0][1]++, actionsList.slice(0, 4)));
35126
+ cov_12s3p009b2().s[5]++;
35127
+ var getLabel = function getLabel(index) {
35128
+ cov_12s3p009b2().f[1]++;
35129
+ cov_12s3p009b2().s[6]++;
35130
+ return index ? (cov_12s3p009b2().b[2][0]++, t("common.and", {
35131
+ what: t("common.then").toLowerCase()
35132
+ })) : (cov_12s3p009b2().b[2][1]++, t("common.then"));
35133
+ };
35134
+ cov_12s3p009b2().s[7]++;
35135
+ var renderActionValues = function renderActionValues(action, actionOption) {
35136
+ cov_12s3p009b2().f[2]++;
35137
+ cov_12s3p009b2().s[8]++;
35138
+ if (actionOption.type === "dropdown") {
35139
+ cov_12s3p009b2().b[3][0]++;
35140
+ cov_12s3p009b2().s[9]++;
35141
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35142
+ className: "neeto-ui-text-gray-800",
35143
+ style: "h5",
35144
+ weight: "semibold"
35145
+ }, getEntityDisplayValue(action, actionOption));
35146
+ } else {
35147
+ cov_12s3p009b2().b[3][1]++;
35148
+ }
35149
+ cov_12s3p009b2().s[10]++;
35150
+ if (actionOption.type === "multiSelect") {
35151
+ cov_12s3p009b2().b[4][0]++;
35152
+ var values = (cov_12s3p009b2().s[11]++, ramda.pluck("label", actionOption.dropdownOptions.filter(function (_ref5) {
35153
+ var value = _ref5.value;
35154
+ cov_12s3p009b2().f[3]++;
35155
+ cov_12s3p009b2().s[12]++;
35156
+ return action.metadata.value.includes(value);
35157
+ })));
35158
+ cov_12s3p009b2().s[13]++;
35159
+ return /*#__PURE__*/React__default["default"].createElement(MultiSelectValues, {
35160
+ separator: t("common.and", {
35161
+ what: ""
35162
+ }),
35163
+ values: values
35164
+ });
35165
+ } else {
35166
+ cov_12s3p009b2().b[4][1]++;
35167
+ }
35168
+ cov_12s3p009b2().s[14]++;
35169
+ return null;
35170
+ };
35171
+ cov_12s3p009b2().s[15]++;
35172
+ var renderAction = function renderAction(action) {
35173
+ cov_12s3p009b2().f[4]++;
35174
+ var actionOption = (cov_12s3p009b2().s[16]++, pure.findBy({
35175
+ value: action.name
35176
+ }, actions.actionOptions));
35177
+ cov_12s3p009b2().s[17]++;
35178
+ if (!actionOption) {
35179
+ cov_12s3p009b2().b[5][0]++;
35180
+ cov_12s3p009b2().s[18]++;
35181
+ return null;
35182
+ } else {
35183
+ cov_12s3p009b2().b[5][1]++;
35184
+ }
35185
+ cov_12s3p009b2().s[19]++;
35186
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35187
+ className: "neeto-ui-text-gray-800",
35188
+ style: "h5",
35189
+ weight: "semibold"
35190
+ }, actionOption === null || actionOption === void 0 ? void 0 : actionOption.label.toLowerCase()), renderActionValues(action, actionOption));
35191
+ };
35192
+ cov_12s3p009b2().s[20]++;
35193
+ return /*#__PURE__*/React__default["default"].createElement(Title, {
35194
+ title: t("common.then")
35195
+ }, allActions.map(function (action, index) {
35196
+ cov_12s3p009b2().f[5]++;
35197
+ cov_12s3p009b2().s[21]++;
35198
+ return /*#__PURE__*/React__default["default"].createElement("div", {
35199
+ className: "mb-2 flex flex-wrap gap-x-1 gap-y-2",
35200
+ key: action.name
35201
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35202
+ className: "neeto-ui-text-gray-700",
35203
+ style: "h5",
35204
+ weight: "normal"
35205
+ }, getLabel(index)), renderAction(action));
35206
+ }), (cov_12s3p009b2().b[6][0]++, actionsList.length > 4) && (cov_12s3p009b2().b[6][1]++, /*#__PURE__*/React__default["default"].createElement("div", {
35207
+ className: "mt-3 w-full"
35208
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
35209
+ icon: !viewMore ? (cov_12s3p009b2().b[7][0]++, neetoIcons.Down) : (cov_12s3p009b2().b[7][1]++, neetoIcons.Up),
35210
+ label: !viewMore ? (cov_12s3p009b2().b[8][0]++, t("common.viewMore")) : (cov_12s3p009b2().b[8][1]++, t("common.viewLess")),
35211
+ size: "small",
35212
+ style: "link",
35213
+ onClick: function onClick() {
35214
+ cov_12s3p009b2().f[6]++;
35215
+ cov_12s3p009b2().s[22]++;
35216
+ return setViewMore(function (prevState) {
35217
+ cov_12s3p009b2().f[7]++;
35218
+ cov_12s3p009b2().s[23]++;
35219
+ return !prevState;
35220
+ });
35221
+ }
35222
+ }))));
35223
+ };
35224
+
35225
+ function cov_h01t9qzwy() {
35226
+ var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/ConditionsDetail.jsx";
35227
+ var hash = "fc61378f8f3779c202fa96af72a7593a3f420615";
35228
+ var global = new Function("return this")();
35229
+ var gcv = "__coverage__";
35230
+ var coverageData = {
35231
+ path: "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/ConditionsDetail.jsx",
35232
+ statementMap: {
35233
+ "0": {
35234
+ start: {
35235
+ line: 11,
35236
+ column: 25
35237
+ },
35238
+ end: {
35239
+ line: 118,
35240
+ column: 1
35241
+ }
35242
+ },
35243
+ "1": {
35244
+ start: {
35245
+ line: 12,
35246
+ column: 27
35247
+ },
35248
+ end: {
35249
+ line: 13,
35250
+ column: 45
35251
+ }
35252
+ },
35253
+ "2": {
35254
+ start: {
35255
+ line: 13,
35256
+ column: 4
35257
+ },
35258
+ end: {
35259
+ line: 13,
35260
+ column: 45
35261
+ }
35262
+ },
35263
+ "3": {
35264
+ start: {
35265
+ line: 15,
35266
+ column: 32
35267
+ },
35268
+ end: {
35269
+ line: 52,
35270
+ column: 3
35271
+ }
35272
+ },
35273
+ "4": {
35274
+ start: {
35275
+ line: 16,
35276
+ column: 4
35277
+ },
35278
+ end: {
35279
+ line: 26,
35280
+ column: 5
35281
+ }
35282
+ },
35283
+ "5": {
35284
+ start: {
35285
+ line: 17,
35286
+ column: 6
35287
+ },
35288
+ end: {
35289
+ line: 25,
35290
+ column: 8
35291
+ }
35292
+ },
35293
+ "6": {
35294
+ start: {
35295
+ line: 28,
35296
+ column: 4
35297
+ },
35298
+ end: {
35299
+ line: 37,
35300
+ column: 5
35301
+ }
35302
+ },
35303
+ "7": {
35304
+ start: {
35305
+ line: 29,
35306
+ column: 21
35307
+ },
35308
+ end: {
35309
+ line: 34,
35310
+ column: 7
35311
+ }
35312
+ },
35313
+ "8": {
35314
+ start: {
35315
+ line: 32,
35316
+ column: 10
35317
+ },
35318
+ end: {
35319
+ line: 32,
35320
+ column: 51
35321
+ }
35322
+ },
35323
+ "9": {
35324
+ start: {
35325
+ line: 36,
35326
+ column: 6
35327
+ },
35328
+ end: {
35329
+ line: 36,
35330
+ column: 78
35331
+ }
35332
+ },
35333
+ "10": {
35334
+ start: {
35335
+ line: 39,
35336
+ column: 4
35337
+ },
35338
+ end: {
35339
+ line: 49,
35340
+ column: 5
35341
+ }
35342
+ },
35343
+ "11": {
35344
+ start: {
35345
+ line: 40,
35346
+ column: 6
35347
+ },
35348
+ end: {
35349
+ line: 48,
35350
+ column: 8
35351
+ }
35352
+ },
35353
+ "12": {
35354
+ start: {
35355
+ line: 51,
35356
+ column: 4
35357
+ },
35358
+ end: {
35359
+ line: 51,
35360
+ column: 16
35361
+ }
35362
+ },
35363
+ "13": {
35364
+ start: {
35365
+ line: 54,
35366
+ column: 26
35367
+ },
35368
+ end: {
35369
+ line: 82,
35370
+ column: 3
35371
+ }
35372
+ },
35373
+ "14": {
35374
+ start: {
35375
+ line: 55,
35376
+ column: 28
35377
+ },
35378
+ end: {
35379
+ line: 58,
35380
+ column: 5
35381
+ }
35382
+ },
35383
+ "15": {
35384
+ start: {
35385
+ line: 59,
35386
+ column: 4
35387
+ },
35388
+ end: {
35389
+ line: 59,
35390
+ column: 38
35391
+ }
35392
+ },
35393
+ "16": {
35394
+ start: {
35395
+ line: 59,
35396
+ column: 26
35397
+ },
35398
+ end: {
35399
+ line: 59,
35400
+ column: 38
35401
+ }
35402
+ },
35403
+ "17": {
35404
+ start: {
35405
+ line: 61,
35406
+ column: 26
35407
+ },
35408
+ end: {
35409
+ line: 61,
35410
+ column: 71
35411
+ }
35412
+ },
35413
+ "18": {
35414
+ start: {
35415
+ line: 63,
35416
+ column: 4
35417
+ },
35418
+ end: {
35419
+ line: 81,
35420
+ column: 6
35421
+ }
35422
+ },
35423
+ "19": {
35424
+ start: {
35425
+ line: 84,
35426
+ column: 2
35427
+ },
35428
+ end: {
35429
+ line: 117,
35430
+ column: 4
35431
+ }
35432
+ },
35433
+ "20": {
35434
+ start: {
35435
+ line: 87,
35436
+ column: 8
35437
+ },
35438
+ end: {
35439
+ line: 114,
35440
+ column: 14
35441
+ }
35442
+ }
35443
+ },
35444
+ fnMap: {
35445
+ "0": {
35446
+ name: "(anonymous_0)",
35447
+ decl: {
35448
+ start: {
35449
+ line: 11,
35450
+ column: 25
35451
+ },
35452
+ end: {
35453
+ line: 11,
35454
+ column: 26
35455
+ }
35456
+ },
35457
+ loc: {
35458
+ start: {
35459
+ line: 11,
35460
+ column: 79
35461
+ },
35462
+ end: {
35463
+ line: 118,
35464
+ column: 1
35465
+ }
35466
+ },
35467
+ line: 11
35468
+ },
35469
+ "1": {
35470
+ name: "(anonymous_1)",
35471
+ decl: {
35472
+ start: {
35473
+ line: 12,
35474
+ column: 27
35475
+ },
35476
+ end: {
35477
+ line: 12,
35478
+ column: 28
35479
+ }
35480
+ },
35481
+ loc: {
35482
+ start: {
35483
+ line: 13,
35484
+ column: 4
35485
+ },
35486
+ end: {
35487
+ line: 13,
35488
+ column: 45
35489
+ }
35490
+ },
35491
+ line: 13
35492
+ },
35493
+ "2": {
35494
+ name: "(anonymous_2)",
35495
+ decl: {
35496
+ start: {
35497
+ line: 15,
35498
+ column: 32
35499
+ },
35500
+ end: {
35501
+ line: 15,
35502
+ column: 33
35503
+ }
35504
+ },
35505
+ loc: {
35506
+ start: {
35507
+ line: 15,
35508
+ column: 64
35509
+ },
35510
+ end: {
35511
+ line: 52,
35512
+ column: 3
35513
+ }
35514
+ },
35515
+ line: 15
35516
+ },
35517
+ "3": {
35518
+ name: "(anonymous_3)",
35519
+ decl: {
35520
+ start: {
35521
+ line: 31,
35522
+ column: 47
35523
+ },
35524
+ end: {
35525
+ line: 31,
35526
+ column: 48
35527
+ }
35528
+ },
35529
+ loc: {
35530
+ start: {
35531
+ line: 32,
35532
+ column: 10
35533
+ },
35534
+ end: {
35535
+ line: 32,
35536
+ column: 51
35537
+ }
35538
+ },
35539
+ line: 32
35540
+ },
35541
+ "4": {
35542
+ name: "(anonymous_4)",
35543
+ decl: {
35544
+ start: {
35545
+ line: 54,
35546
+ column: 26
35547
+ },
35548
+ end: {
35549
+ line: 54,
35550
+ column: 27
35551
+ }
35552
+ },
35553
+ loc: {
35554
+ start: {
35555
+ line: 54,
35556
+ column: 39
35557
+ },
35558
+ end: {
35559
+ line: 82,
35560
+ column: 3
35561
+ }
35562
+ },
35563
+ line: 54
35564
+ },
35565
+ "5": {
35566
+ name: "(anonymous_5)",
35567
+ decl: {
35568
+ start: {
35569
+ line: 86,
35570
+ column: 22
35571
+ },
35572
+ end: {
35573
+ line: 86,
35574
+ column: 23
35575
+ }
35576
+ },
35577
+ loc: {
35578
+ start: {
35579
+ line: 87,
35580
+ column: 8
35581
+ },
35582
+ end: {
35583
+ line: 114,
35584
+ column: 14
35585
+ }
35586
+ },
35587
+ line: 87
35588
+ }
35589
+ },
35590
+ branchMap: {
35591
+ "0": {
35592
+ loc: {
35593
+ start: {
35594
+ line: 13,
35595
+ column: 4
35596
+ },
35597
+ end: {
35598
+ line: 13,
35599
+ column: 45
35600
+ }
35601
+ },
35602
+ type: "cond-expr",
35603
+ locations: [{
35604
+ start: {
35605
+ line: 13,
35606
+ column: 33
35607
+ },
35608
+ end: {
35609
+ line: 13,
35610
+ column: 37
35611
+ }
35612
+ }, {
35613
+ start: {
35614
+ line: 13,
35615
+ column: 40
35616
+ },
35617
+ end: {
35618
+ line: 13,
35619
+ column: 45
35620
+ }
35621
+ }],
35622
+ line: 13
35623
+ },
35624
+ "1": {
35625
+ loc: {
35626
+ start: {
35627
+ line: 16,
35628
+ column: 4
35629
+ },
35630
+ end: {
35631
+ line: 26,
35632
+ column: 5
35633
+ }
35634
+ },
35635
+ type: "if",
35636
+ locations: [{
35637
+ start: {
35638
+ line: 16,
35639
+ column: 4
35640
+ },
35641
+ end: {
35642
+ line: 26,
35643
+ column: 5
35644
+ }
35645
+ }, {
35646
+ start: {
35647
+ line: undefined,
35648
+ column: undefined
35649
+ },
35650
+ end: {
35651
+ line: undefined,
35652
+ column: undefined
35653
+ }
35654
+ }],
35655
+ line: 16
35656
+ },
35657
+ "2": {
35658
+ loc: {
35659
+ start: {
35660
+ line: 28,
35661
+ column: 4
35662
+ },
35663
+ end: {
35664
+ line: 37,
35665
+ column: 5
35666
+ }
35667
+ },
35668
+ type: "if",
35669
+ locations: [{
35670
+ start: {
35671
+ line: 28,
35672
+ column: 4
35673
+ },
35674
+ end: {
35675
+ line: 37,
35676
+ column: 5
35677
+ }
35678
+ }, {
35679
+ start: {
35680
+ line: undefined,
35681
+ column: undefined
35682
+ },
35683
+ end: {
35684
+ line: undefined,
35685
+ column: undefined
35686
+ }
35687
+ }],
35688
+ line: 28
35689
+ },
35690
+ "3": {
35691
+ loc: {
35692
+ start: {
35693
+ line: 39,
35694
+ column: 4
35695
+ },
35696
+ end: {
35697
+ line: 49,
35698
+ column: 5
35699
+ }
35700
+ },
35701
+ type: "if",
35702
+ locations: [{
35703
+ start: {
35704
+ line: 39,
35705
+ column: 4
35706
+ },
35707
+ end: {
35708
+ line: 49,
35709
+ column: 5
35710
+ }
35711
+ }, {
35712
+ start: {
35713
+ line: undefined,
35714
+ column: undefined
35715
+ },
35716
+ end: {
35717
+ line: undefined,
35718
+ column: undefined
35719
+ }
35720
+ }],
35721
+ line: 39
35722
+ },
35723
+ "4": {
35724
+ loc: {
35725
+ start: {
35726
+ line: 59,
35727
+ column: 4
35728
+ },
35729
+ end: {
35730
+ line: 59,
35731
+ column: 38
35732
+ }
35733
+ },
35734
+ type: "if",
35735
+ locations: [{
35736
+ start: {
35737
+ line: 59,
35738
+ column: 4
35739
+ },
35740
+ end: {
35741
+ line: 59,
35742
+ column: 38
35743
+ }
35744
+ }, {
35745
+ start: {
35746
+ line: undefined,
35747
+ column: undefined
35748
+ },
35749
+ end: {
35750
+ line: undefined,
35751
+ column: undefined
35752
+ }
35753
+ }],
35754
+ line: 59
35755
+ },
35756
+ "5": {
35757
+ loc: {
35758
+ start: {
35759
+ line: 88,
35760
+ column: 11
35761
+ },
35762
+ end: {
35763
+ line: 96,
35764
+ column: 11
35765
+ }
35766
+ },
35767
+ type: "binary-expr",
35768
+ locations: [{
35769
+ start: {
35770
+ line: 88,
35771
+ column: 11
35772
+ },
35773
+ end: {
35774
+ line: 88,
35775
+ column: 17
35776
+ }
35777
+ }, {
35778
+ start: {
35779
+ line: 89,
35780
+ column: 12
35781
+ },
35782
+ end: {
35783
+ line: 95,
35784
+ column: 25
35785
+ }
35786
+ }],
35787
+ line: 88
35788
+ },
35789
+ "6": {
35790
+ loc: {
35791
+ start: {
35792
+ line: 97,
35793
+ column: 11
35794
+ },
35795
+ end: {
35796
+ line: 105,
35797
+ column: 11
35798
+ }
35799
+ },
35800
+ type: "binary-expr",
35801
+ locations: [{
35802
+ start: {
35803
+ line: 97,
35804
+ column: 11
35805
+ },
35806
+ end: {
35807
+ line: 97,
35808
+ column: 18
35809
+ }
35810
+ }, {
35811
+ start: {
35812
+ line: 98,
35813
+ column: 12
35814
+ },
35815
+ end: {
35816
+ line: 104,
35817
+ column: 25
35818
+ }
35819
+ }],
35820
+ line: 97
35821
+ }
35822
+ },
35823
+ s: {
35824
+ "0": 0,
35825
+ "1": 0,
35826
+ "2": 0,
35827
+ "3": 0,
35828
+ "4": 0,
35829
+ "5": 0,
35830
+ "6": 0,
35831
+ "7": 0,
35832
+ "8": 0,
35833
+ "9": 0,
35834
+ "10": 0,
35835
+ "11": 0,
35836
+ "12": 0,
35837
+ "13": 0,
35838
+ "14": 0,
35839
+ "15": 0,
35840
+ "16": 0,
35841
+ "17": 0,
35842
+ "18": 0,
35843
+ "19": 0,
35844
+ "20": 0
35845
+ },
35846
+ f: {
35847
+ "0": 0,
35848
+ "1": 0,
35849
+ "2": 0,
35850
+ "3": 0,
35851
+ "4": 0,
35852
+ "5": 0
35853
+ },
35854
+ b: {
35855
+ "0": [0, 0],
35856
+ "1": [0, 0],
35857
+ "2": [0, 0],
35858
+ "3": [0, 0],
35859
+ "4": [0, 0],
35860
+ "5": [0, 0],
35861
+ "6": [0, 0]
35862
+ },
35863
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
35864
+ hash: "fc61378f8f3779c202fa96af72a7593a3f420615"
35865
+ };
35866
+ var coverage = global[gcv] || (global[gcv] = {});
35867
+ if (!coverage[path] || coverage[path].hash !== hash) {
35868
+ coverage[path] = coverageData;
35869
+ }
35870
+ var actualCoverage = coverage[path];
35871
+ {
35872
+ // @ts-ignore
35873
+ cov_h01t9qzwy = function () {
35874
+ return actualCoverage;
35875
+ };
35876
+ }
35877
+ return actualCoverage;
35878
+ }
35879
+ cov_h01t9qzwy();
35880
+ cov_h01t9qzwy().s[0]++;
35881
+ var ConditionsDetail = function ConditionsDetail(_ref) {
35882
+ var conditions = _ref.conditions,
35883
+ conditionOptions = _ref.conditionOptions,
35884
+ conditionVerbs = _ref.conditionVerbs;
35885
+ cov_h01t9qzwy().f[0]++;
35886
+ cov_h01t9qzwy().s[1]++;
35887
+ var getLogicOperator = function getLogicOperator(joinType) {
35888
+ cov_h01t9qzwy().f[1]++;
35889
+ cov_h01t9qzwy().s[2]++;
35890
+ return joinType === "or_operator" ? (cov_h01t9qzwy().b[0][0]++, "or") : (cov_h01t9qzwy().b[0][1]++, "and");
35891
+ };
35892
+ cov_h01t9qzwy().s[3]++;
35893
+ var renderConditionValues = function renderConditionValues(condition, conditionOption) {
35894
+ cov_h01t9qzwy().f[2]++;
35895
+ cov_h01t9qzwy().s[4]++;
35896
+ if (["email", "text", "number"].includes(conditionOption.type)) {
35897
+ var _condition$metadata$v;
35898
+ cov_h01t9qzwy().b[1][0]++;
35899
+ cov_h01t9qzwy().s[5]++;
35900
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35901
+ className: "neeto-ui-text-gray-800",
35902
+ style: "h5",
35903
+ weight: "semibold"
35904
+ }, (_condition$metadata$v = condition.metadata.value) === null || _condition$metadata$v === void 0 ? void 0 : _condition$metadata$v.toLowerCase());
35905
+ } else {
35906
+ cov_h01t9qzwy().b[1][1]++;
35907
+ }
35908
+ cov_h01t9qzwy().s[6]++;
35909
+ if (conditionOption.type === "multi-select") {
35910
+ cov_h01t9qzwy().b[2][0]++;
35911
+ var values = (cov_h01t9qzwy().s[7]++, ramda.pluck("label", conditionOption.dropdownOptions.filter(function (_ref2) {
35912
+ var value = _ref2.value;
35913
+ cov_h01t9qzwy().f[3]++;
35914
+ cov_h01t9qzwy().s[8]++;
35915
+ return condition.metadata.values.includes(value);
35916
+ })));
35917
+ cov_h01t9qzwy().s[9]++;
35918
+ return /*#__PURE__*/React__default["default"].createElement(MultiSelectValues, {
35919
+ separator: t("common.or"),
35920
+ values: values
35921
+ });
35922
+ } else {
35923
+ cov_h01t9qzwy().b[2][1]++;
35924
+ }
35925
+ cov_h01t9qzwy().s[10]++;
35926
+ if (conditionOption.type === "dropdown") {
35927
+ cov_h01t9qzwy().b[3][0]++;
35928
+ cov_h01t9qzwy().s[11]++;
35929
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35930
+ className: "neeto-ui-text-gray-800",
35931
+ style: "h5",
35932
+ weight: "semibold"
35933
+ }, getEntityDisplayValue(condition, conditionOption));
35934
+ } else {
35935
+ cov_h01t9qzwy().b[3][1]++;
35936
+ }
35937
+ cov_h01t9qzwy().s[12]++;
35938
+ return null;
35939
+ };
35940
+ cov_h01t9qzwy().s[13]++;
35941
+ var renderCondition = function renderCondition(condition) {
35942
+ var _conditionVerbs$condi;
35943
+ cov_h01t9qzwy().f[4]++;
35944
+ var conditionOption = (cov_h01t9qzwy().s[14]++, pure.findBy({
35945
+ value: condition.field
35946
+ }, conditionOptions));
35947
+ cov_h01t9qzwy().s[15]++;
35948
+ if (!conditionOption) {
35949
+ cov_h01t9qzwy().b[4][0]++;
35950
+ cov_h01t9qzwy().s[16]++;
35951
+ return null;
35952
+ } else {
35953
+ cov_h01t9qzwy().b[4][1]++;
35954
+ }
35955
+ var conditionVerb = (cov_h01t9qzwy().s[17]++, (_conditionVerbs$condi = conditionVerbs[condition.verb]) === null || _conditionVerbs$condi === void 0 ? void 0 : _conditionVerbs$condi.toLowerCase());
35956
+ cov_h01t9qzwy().s[18]++;
35957
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35958
+ className: "neeto-ui-text-gray-800",
35959
+ style: "h5",
35960
+ weight: "semibold"
35961
+ }, conditionOption === null || conditionOption === void 0 ? void 0 : conditionOption.label.toLowerCase()), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35962
+ className: "neeto-ui-text-gray-800",
35963
+ style: "h5",
35964
+ weight: "semibold"
35965
+ }, conditionVerb), renderConditionValues(condition, conditionOption));
35966
+ };
35967
+ cov_h01t9qzwy().s[19]++;
35968
+ return /*#__PURE__*/React__default["default"].createElement("div", {
35969
+ className: "mt-2"
35970
+ }, conditions.map(function (condition, index) {
35971
+ cov_h01t9qzwy().f[5]++;
35972
+ cov_h01t9qzwy().s[20]++;
35973
+ return /*#__PURE__*/React__default["default"].createElement("div", {
35974
+ className: "mb-2 flex flex-wrap gap-x-2 gap-y-2",
35975
+ key: condition.id
35976
+ }, (cov_h01t9qzwy().b[5][0]++, !index) && (cov_h01t9qzwy().b[5][1]++, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35977
+ className: "neeto-ui-text-gray-700",
35978
+ style: "h5",
35979
+ weight: "normal"
35980
+ }, t("common.and", {
35981
+ what: ""
35982
+ }))), (cov_h01t9qzwy().b[6][0]++, !!index) && (cov_h01t9qzwy().b[6][1]++, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35983
+ className: "neeto-ui-text-gray-800",
35984
+ style: "h5",
35985
+ weight: "semibold"
35986
+ }, getLogicOperator(condition.joinType))), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
35987
+ className: "neeto-ui-text-gray-700",
35988
+ style: "h5",
35989
+ weight: "normal"
35990
+ }, t("common.when").toLowerCase()), renderCondition(condition));
35991
+ }));
35992
+ };
35993
+
35994
+ function cov_rr7czlpcc() {
35995
+ var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/EventsDetail.jsx";
35996
+ var hash = "027ffb7dc7b431626e71008ddc8edc3a2d938d8a";
35997
+ var global = new Function("return this")();
35998
+ var gcv = "__coverage__";
35999
+ var coverageData = {
36000
+ path: "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/EventsDetail.jsx",
36001
+ statementMap: {
36002
+ "0": {
36003
+ start: {
36004
+ line: 12,
36005
+ column: 21
36006
+ },
36007
+ end: {
36008
+ line: 96,
36009
+ column: 1
36010
+ }
36011
+ },
36012
+ "1": {
36013
+ start: {
36014
+ line: 13,
36015
+ column: 34
36016
+ },
36017
+ end: {
36018
+ line: 13,
36019
+ column: 49
36020
+ }
36021
+ },
36022
+ "2": {
36023
+ start: {
36024
+ line: 15,
36025
+ column: 21
36026
+ },
36027
+ end: {
36028
+ line: 15,
36029
+ column: 48
36030
+ }
36031
+ },
36032
+ "3": {
36033
+ start: {
36034
+ line: 16,
36035
+ column: 20
36036
+ },
36037
+ end: {
36038
+ line: 18,
36039
+ column: 3
36040
+ }
36041
+ },
36042
+ "4": {
36043
+ start: {
36044
+ line: 17,
36045
+ column: 4
36046
+ },
36047
+ end: {
36048
+ line: 17,
36049
+ column: 37
36050
+ }
36051
+ },
36052
+ "5": {
36053
+ start: {
36054
+ line: 20,
36055
+ column: 25
36056
+ },
36057
+ end: {
36058
+ line: 20,
36059
+ column: 41
36060
+ }
36061
+ },
36062
+ "6": {
36063
+ start: {
36064
+ line: 22,
36065
+ column: 4
36066
+ },
36067
+ end: {
36068
+ line: 24,
36069
+ column: 34
36070
+ }
36071
+ },
36072
+ "7": {
36073
+ start: {
36074
+ line: 26,
36075
+ column: 27
36076
+ },
36077
+ end: {
36078
+ line: 29,
36079
+ column: 3
36080
+ }
36081
+ },
36082
+ "8": {
36083
+ start: {
36084
+ line: 31,
36085
+ column: 2
36086
+ },
36087
+ end: {
36088
+ line: 95,
36089
+ column: 4
36090
+ }
36091
+ },
36092
+ "9": {
36093
+ start: {
36094
+ line: 35,
36095
+ column: 10
36096
+ },
36097
+ end: {
36098
+ line: 61,
36099
+ column: 16
36100
+ }
36101
+ },
36102
+ "10": {
36103
+ start: {
36104
+ line: 90,
36105
+ column: 27
36106
+ },
36107
+ end: {
36108
+ line: 90,
36109
+ column: 63
36110
+ }
36111
+ },
36112
+ "11": {
36113
+ start: {
36114
+ line: 90,
36115
+ column: 52
36116
+ },
36117
+ end: {
36118
+ line: 90,
36119
+ column: 62
36120
+ }
36121
+ }
36122
+ },
36123
+ fnMap: {
36124
+ "0": {
36125
+ name: "(anonymous_0)",
36126
+ decl: {
36127
+ start: {
36128
+ line: 12,
36129
+ column: 21
36130
+ },
36131
+ end: {
36132
+ line: 12,
36133
+ column: 22
36134
+ }
36135
+ },
36136
+ loc: {
36137
+ start: {
36138
+ line: 12,
36139
+ column: 60
36140
+ },
36141
+ end: {
36142
+ line: 96,
36143
+ column: 1
36144
+ }
36145
+ },
36146
+ line: 12
36147
+ },
36148
+ "1": {
36149
+ name: "(anonymous_1)",
36150
+ decl: {
36151
+ start: {
36152
+ line: 16,
36153
+ column: 47
36154
+ },
36155
+ end: {
36156
+ line: 16,
36157
+ column: 48
36158
+ }
36159
+ },
36160
+ loc: {
36161
+ start: {
36162
+ line: 17,
36163
+ column: 4
36164
+ },
36165
+ end: {
36166
+ line: 17,
36167
+ column: 37
36168
+ }
36169
+ },
36170
+ line: 17
36171
+ },
36172
+ "2": {
36173
+ name: "(anonymous_2)",
36174
+ decl: {
36175
+ start: {
36176
+ line: 34,
36177
+ column: 23
36178
+ },
36179
+ end: {
36180
+ line: 34,
36181
+ column: 24
36182
+ }
36183
+ },
36184
+ loc: {
36185
+ start: {
36186
+ line: 35,
36187
+ column: 10
36188
+ },
36189
+ end: {
36190
+ line: 61,
36191
+ column: 16
36192
+ }
36193
+ },
36194
+ line: 35
36195
+ },
36196
+ "3": {
36197
+ name: "(anonymous_3)",
36198
+ decl: {
36199
+ start: {
36200
+ line: 90,
36201
+ column: 21
36202
+ },
36203
+ end: {
36204
+ line: 90,
36205
+ column: 22
36206
+ }
36207
+ },
36208
+ loc: {
36209
+ start: {
36210
+ line: 90,
36211
+ column: 27
36212
+ },
36213
+ end: {
36214
+ line: 90,
36215
+ column: 63
36216
+ }
36217
+ },
36218
+ line: 90
36219
+ },
36220
+ "4": {
36221
+ name: "(anonymous_4)",
36222
+ decl: {
36223
+ start: {
36224
+ line: 90,
36225
+ column: 39
36226
+ },
36227
+ end: {
36228
+ line: 90,
36229
+ column: 40
36230
+ }
36231
+ },
36232
+ loc: {
36233
+ start: {
36234
+ line: 90,
36235
+ column: 52
36236
+ },
36237
+ end: {
36238
+ line: 90,
36239
+ column: 62
36240
+ }
36241
+ },
36242
+ line: 90
36243
+ }
36244
+ },
36245
+ branchMap: {
36246
+ "0": {
36247
+ loc: {
36248
+ start: {
36249
+ line: 22,
36250
+ column: 4
36251
+ },
36252
+ end: {
36253
+ line: 24,
36254
+ column: 34
36255
+ }
36256
+ },
36257
+ type: "cond-expr",
36258
+ locations: [{
36259
+ start: {
36260
+ line: 23,
36261
+ column: 8
36262
+ },
36263
+ end: {
36264
+ line: 23,
36265
+ column: 22
36266
+ }
36267
+ }, {
36268
+ start: {
36269
+ line: 24,
36270
+ column: 8
36271
+ },
36272
+ end: {
36273
+ line: 24,
36274
+ column: 34
36275
+ }
36276
+ }],
36277
+ line: 22
36278
+ },
36279
+ "1": {
36280
+ loc: {
36281
+ start: {
36282
+ line: 22,
36283
+ column: 4
36284
+ },
36285
+ end: {
36286
+ line: 22,
36287
+ column: 41
36288
+ }
36289
+ },
36290
+ type: "binary-expr",
36291
+ locations: [{
36292
+ start: {
36293
+ line: 22,
36294
+ column: 4
36295
+ },
36296
+ end: {
36297
+ line: 22,
36298
+ column: 12
36299
+ }
36300
+ }, {
36301
+ start: {
36302
+ line: 22,
36303
+ column: 16
36304
+ },
36305
+ end: {
36306
+ line: 22,
36307
+ column: 41
36308
+ }
36309
+ }],
36310
+ line: 22
36311
+ },
36312
+ "2": {
36313
+ loc: {
36314
+ start: {
36315
+ line: 36,
36316
+ column: 13
36317
+ },
36318
+ end: {
36319
+ line: 44,
36320
+ column: 13
36321
+ }
36322
+ },
36323
+ type: "binary-expr",
36324
+ locations: [{
36325
+ start: {
36326
+ line: 36,
36327
+ column: 13
36328
+ },
36329
+ end: {
36330
+ line: 36,
36331
+ column: 19
36332
+ }
36333
+ }, {
36334
+ start: {
36335
+ line: 37,
36336
+ column: 14
36337
+ },
36338
+ end: {
36339
+ line: 43,
36340
+ column: 27
36341
+ }
36342
+ }],
36343
+ line: 36
36344
+ },
36345
+ "3": {
36346
+ loc: {
36347
+ start: {
36348
+ line: 45,
36349
+ column: 13
36350
+ },
36351
+ end: {
36352
+ line: 53,
36353
+ column: 13
36354
+ }
36355
+ },
36356
+ type: "binary-expr",
36357
+ locations: [{
36358
+ start: {
36359
+ line: 45,
36360
+ column: 13
36361
+ },
36362
+ end: {
36363
+ line: 45,
36364
+ column: 20
36365
+ }
36366
+ }, {
36367
+ start: {
36368
+ line: 46,
36369
+ column: 14
36370
+ },
36371
+ end: {
36372
+ line: 52,
36373
+ column: 27
36374
+ }
36375
+ }],
36376
+ line: 45
36377
+ },
36378
+ "4": {
36379
+ loc: {
36380
+ start: {
36381
+ line: 83,
36382
+ column: 7
36383
+ },
36384
+ end: {
36385
+ line: 93,
36386
+ column: 7
36387
+ }
36388
+ },
36389
+ type: "binary-expr",
36390
+ locations: [{
36391
+ start: {
36392
+ line: 83,
36393
+ column: 7
36394
+ },
36395
+ end: {
36396
+ line: 83,
36397
+ column: 32
36398
+ }
36399
+ }, {
36400
+ start: {
36401
+ line: 84,
36402
+ column: 8
36403
+ },
36404
+ end: {
36405
+ line: 92,
36406
+ column: 14
36407
+ }
36408
+ }],
36409
+ line: 83
36410
+ },
36411
+ "5": {
36412
+ loc: {
36413
+ start: {
36414
+ line: 86,
36415
+ column: 18
36416
+ },
36417
+ end: {
36418
+ line: 86,
36419
+ column: 39
36420
+ }
36421
+ },
36422
+ type: "cond-expr",
36423
+ locations: [{
36424
+ start: {
36425
+ line: 86,
36426
+ column: 30
36427
+ },
36428
+ end: {
36429
+ line: 86,
36430
+ column: 34
36431
+ }
36432
+ }, {
36433
+ start: {
36434
+ line: 86,
36435
+ column: 37
36436
+ },
36437
+ end: {
36438
+ line: 86,
36439
+ column: 39
36440
+ }
36441
+ }],
36442
+ line: 86
36443
+ },
36444
+ "6": {
36445
+ loc: {
36446
+ start: {
36447
+ line: 87,
36448
+ column: 19
36449
+ },
36450
+ end: {
36451
+ line: 87,
36452
+ column: 74
36453
+ }
36454
+ },
36455
+ type: "cond-expr",
36456
+ locations: [{
36457
+ start: {
36458
+ line: 87,
36459
+ column: 31
36460
+ },
36461
+ end: {
36462
+ line: 87,
36463
+ column: 51
36464
+ }
36465
+ }, {
36466
+ start: {
36467
+ line: 87,
36468
+ column: 54
36469
+ },
36470
+ end: {
36471
+ line: 87,
36472
+ column: 74
36473
+ }
36474
+ }],
36475
+ line: 87
36476
+ }
36477
+ },
36478
+ s: {
36479
+ "0": 0,
36480
+ "1": 0,
36481
+ "2": 0,
36482
+ "3": 0,
36483
+ "4": 0,
36484
+ "5": 0,
36485
+ "6": 0,
36486
+ "7": 0,
36487
+ "8": 0,
36488
+ "9": 0,
36489
+ "10": 0,
36490
+ "11": 0
36491
+ },
36492
+ f: {
36493
+ "0": 0,
36494
+ "1": 0,
36495
+ "2": 0,
36496
+ "3": 0,
36497
+ "4": 0
36498
+ },
36499
+ b: {
36500
+ "0": [0, 0],
36501
+ "1": [0, 0],
36502
+ "2": [0, 0],
36503
+ "3": [0, 0],
36504
+ "4": [0, 0],
36505
+ "5": [0, 0],
36506
+ "6": [0, 0]
36507
+ },
36508
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
36509
+ hash: "027ffb7dc7b431626e71008ddc8edc3a2d938d8a"
36510
+ };
36511
+ var coverage = global[gcv] || (global[gcv] = {});
36512
+ if (!coverage[path] || coverage[path].hash !== hash) {
36513
+ coverage[path] = coverageData;
36514
+ }
36515
+ var actualCoverage = coverage[path];
36516
+ {
36517
+ // @ts-ignore
36518
+ cov_rr7czlpcc = function () {
36519
+ return actualCoverage;
36520
+ };
36521
+ }
36522
+ return actualCoverage;
36523
+ }
36524
+ cov_rr7czlpcc();
36525
+ cov_rr7czlpcc().s[0]++;
36526
+ var EventsDetail = function EventsDetail(_ref) {
36527
+ var _currentPerformer$lab;
36528
+ var events = _ref.events,
36529
+ performer = _ref.performer,
36530
+ conditions = _ref.conditions;
36531
+ cov_rr7czlpcc().f[0]++;
36532
+ var _ref2 = (cov_rr7czlpcc().s[1]++, React.useState(false)),
36533
+ _ref3 = _slicedToArray(_ref2, 2),
36534
+ viewMore = _ref3[0],
36535
+ setViewMore = _ref3[1];
36536
+ var eventNames = (cov_rr7czlpcc().s[2]++, ramda.pluck("name", events.value));
36537
+ var allEvents = (cov_rr7czlpcc().s[3]++, events.eventOptions.filter(function (event) {
36538
+ cov_rr7czlpcc().f[1]++;
36539
+ cov_rr7czlpcc().s[4]++;
36540
+ return eventNames === null || eventNames === void 0 ? void 0 : eventNames.includes(event.value);
36541
+ }));
36542
+ var conditionsList = (cov_rr7czlpcc().s[5]++, conditions.value);
36543
+ var allConditions = (cov_rr7czlpcc().s[6]++, (cov_rr7czlpcc().b[1][0]++, viewMore) && (cov_rr7czlpcc().b[1][1]++, conditionsList.length > 3) ? (cov_rr7czlpcc().b[0][0]++, conditionsList) : (cov_rr7czlpcc().b[0][1]++, conditionsList.slice(0, 3)));
36544
+ var currentPerformer = (cov_rr7czlpcc().s[7]++, pure.findBy({
36545
+ value: performer.value
36546
+ }, performer.options));
36547
+ cov_rr7czlpcc().s[8]++;
36548
+ return /*#__PURE__*/React__default["default"].createElement(Title, {
36549
+ title: t("common.when")
36550
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
36551
+ className: "flex flex-wrap gap-x-2 gap-y-2"
36552
+ }, allEvents.map(function (event, index) {
36553
+ cov_rr7czlpcc().f[2]++;
36554
+ cov_rr7czlpcc().s[9]++;
36555
+ return /*#__PURE__*/React__default["default"].createElement("div", {
36556
+ className: "flex gap-x-2",
36557
+ key: index
36558
+ }, (cov_rr7czlpcc().b[2][0]++, !index) && (cov_rr7czlpcc().b[2][1]++, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36559
+ className: "neeto-ui-text-gray-700 my-auto",
36560
+ style: "h5",
36561
+ weight: "normal"
36562
+ }, t("common.when"))), (cov_rr7czlpcc().b[3][0]++, !!index) && (cov_rr7czlpcc().b[3][1]++, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36563
+ className: "neeto-ui-text-gray-700 my-auto",
36564
+ style: "h5",
36565
+ weight: "normal"
36566
+ }, t("common.or"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36567
+ className: "neeto-ui-text-gray-800",
36568
+ style: "h5",
36569
+ weight: "semibold"
36570
+ }, event.label.toLowerCase()));
36571
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36572
+ className: "neeto-ui-text-gray-700",
36573
+ style: "h5",
36574
+ weight: "normal"
36575
+ }, t("common.by")), /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36576
+ className: "neeto-ui-text-gray-800",
36577
+ style: "h5",
36578
+ weight: "semibold"
36579
+ }, currentPerformer === null || currentPerformer === void 0 ? void 0 : (_currentPerformer$lab = currentPerformer.label) === null || _currentPerformer$lab === void 0 ? void 0 : _currentPerformer$lab.toLowerCase())), /*#__PURE__*/React__default["default"].createElement(ConditionsDetail, {
36580
+ conditionOptions: conditions.conditionOptions,
36581
+ conditionVerbs: conditions.verbs,
36582
+ conditions: allConditions
36583
+ }), (cov_rr7czlpcc().b[4][0]++, conditionsList.length > 3) && (cov_rr7czlpcc().b[4][1]++, /*#__PURE__*/React__default["default"].createElement("div", {
36584
+ className: "mt-3 w-full"
36585
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
36586
+ icon: !viewMore ? (cov_rr7czlpcc().b[5][0]++, neetoIcons.Down) : (cov_rr7czlpcc().b[5][1]++, neetoIcons.Up),
36587
+ label: !viewMore ? (cov_rr7czlpcc().b[6][0]++, t("common.viewMore")) : (cov_rr7czlpcc().b[6][1]++, t("common.viewLess")),
36588
+ size: "small",
36589
+ style: "link",
36590
+ onClick: function onClick() {
36591
+ cov_rr7czlpcc().f[3]++;
36592
+ cov_rr7czlpcc().s[10]++;
36593
+ return setViewMore(function (prevState) {
36594
+ cov_rr7czlpcc().f[4]++;
36595
+ cov_rr7czlpcc().s[11]++;
36596
+ return !prevState;
36597
+ });
36598
+ }
36599
+ }))));
36600
+ };
36601
+
36602
+ function cov_229plf36at() {
36603
+ var path = "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/index.jsx";
36604
+ var hash = "3462c6a4c7347e110f00d280be805931b49100da";
36605
+ var global = new Function("return this")();
36606
+ var gcv = "__coverage__";
36607
+ var coverageData = {
36608
+ path: "/home/runner/work/neeto-rules-frontend/neeto-rules-frontend/src/components/RulePreview/index.jsx",
36609
+ statementMap: {
36610
+ "0": {
36611
+ start: {
36612
+ line: 10,
36613
+ column: 20
36614
+ },
36615
+ end: {
36616
+ line: 73,
36617
+ column: 1
36618
+ }
36619
+ },
36620
+ "1": {
36621
+ start: {
36622
+ line: 11,
36623
+ column: 16
36624
+ },
36625
+ end: {
36626
+ line: 11,
36627
+ column: 32
36628
+ }
36629
+ },
36630
+ "2": {
36631
+ start: {
36632
+ line: 13,
36633
+ column: 2
36634
+ },
36635
+ end: {
36636
+ line: 13,
36637
+ column: 39
36638
+ }
36639
+ },
36640
+ "3": {
36641
+ start: {
36642
+ line: 13,
36643
+ column: 17
36644
+ },
36645
+ end: {
36646
+ line: 13,
36647
+ column: 39
36648
+ }
36649
+ },
36650
+ "4": {
36651
+ start: {
36652
+ line: 15,
36653
+ column: 2
36654
+ },
36655
+ end: {
36656
+ line: 72,
36657
+ column: 4
36658
+ }
36659
+ }
36660
+ },
36661
+ fnMap: {
36662
+ "0": {
36663
+ name: "(anonymous_0)",
36664
+ decl: {
36665
+ start: {
36666
+ line: 10,
36667
+ column: 20
36668
+ },
36669
+ end: {
36670
+ line: 10,
36671
+ column: 21
36672
+ }
36673
+ },
36674
+ loc: {
36675
+ start: {
36676
+ line: 10,
36677
+ column: 69
36678
+ },
36679
+ end: {
36680
+ line: 73,
36681
+ column: 1
36682
+ }
36683
+ },
36684
+ line: 10
36685
+ }
36686
+ },
36687
+ branchMap: {
36688
+ "0": {
36689
+ loc: {
36690
+ start: {
36691
+ line: 13,
36692
+ column: 2
36693
+ },
36694
+ end: {
36695
+ line: 13,
36696
+ column: 39
36697
+ }
36698
+ },
36699
+ type: "if",
36700
+ locations: [{
36701
+ start: {
36702
+ line: 13,
36703
+ column: 2
36704
+ },
36705
+ end: {
36706
+ line: 13,
36707
+ column: 39
36708
+ }
36709
+ }, {
36710
+ start: {
36711
+ line: undefined,
36712
+ column: undefined
36713
+ },
36714
+ end: {
36715
+ line: undefined,
36716
+ column: undefined
36717
+ }
36718
+ }],
36719
+ line: 13
36720
+ }
36721
+ },
36722
+ s: {
36723
+ "0": 0,
36724
+ "1": 0,
36725
+ "2": 0,
36726
+ "3": 0,
36727
+ "4": 0
36728
+ },
36729
+ f: {
36730
+ "0": 0
36731
+ },
36732
+ b: {
36733
+ "0": [0, 0]
36734
+ },
36735
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
36736
+ hash: "3462c6a4c7347e110f00d280be805931b49100da"
36737
+ };
36738
+ var coverage = global[gcv] || (global[gcv] = {});
36739
+ if (!coverage[path] || coverage[path].hash !== hash) {
36740
+ coverage[path] = coverageData;
36741
+ }
36742
+ var actualCoverage = coverage[path];
36743
+ {
36744
+ // @ts-ignore
36745
+ cov_229plf36at = function () {
36746
+ return actualCoverage;
36747
+ };
36748
+ }
36749
+ return actualCoverage;
36750
+ }
36751
+ cov_229plf36at();
36752
+ cov_229plf36at().s[0]++;
36753
+ var RulePreview = function RulePreview(_ref) {
36754
+ var isLoading = _ref.isLoading,
36755
+ ruleDetails = _ref.ruleDetails,
36756
+ isOpen = _ref.isOpen,
36757
+ onClose = _ref.onClose;
36758
+ cov_229plf36at().f[0]++;
36759
+ var _ref2 = (cov_229plf36at().s[1]++, useTranslation()),
36760
+ t = _ref2.t;
36761
+ cov_229plf36at().s[2]++;
36762
+ if (isLoading) {
36763
+ cov_229plf36at().b[0][0]++;
36764
+ cov_229plf36at().s[3]++;
36765
+ return /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null);
36766
+ } else {
36767
+ cov_229plf36at().b[0][1]++;
36768
+ }
36769
+ cov_229plf36at().s[4]++;
36770
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Pane, {
36771
+ isOpen: isOpen,
36772
+ onClose: onClose
36773
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Header, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36774
+ style: "h2",
36775
+ weight: "semibold"
36776
+ }, t("labels.ruleSummary"))), /*#__PURE__*/React__default["default"].createElement(neetoui.Pane.Body, null, /*#__PURE__*/React__default["default"].createElement("div", {
36777
+ className: "w-full"
36778
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
36779
+ className: "neeto-ui-rounded mb-4 border p-4"
36780
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
36781
+ className: "mb-3 flex flex-wrap justify-between gap-x-4"
36782
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36783
+ className: "neeto-ui-text-gray-700 my-auto",
36784
+ style: "h5",
36785
+ weight: "semibold"
36786
+ }, t("common.name")), /*#__PURE__*/React__default["default"].createElement("div", {
36787
+ className: "flex w-72 flex-wrap"
36788
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36789
+ className: "neeto-ui-text-gray-800 my-auto",
36790
+ style: "h5",
36791
+ weight: "normal"
36792
+ }, ruleDetails.name.value))), /*#__PURE__*/React__default["default"].createElement("hr", null), /*#__PURE__*/React__default["default"].createElement("div", {
36793
+ className: "my-3 flex flex-wrap justify-between gap-x-2"
36794
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36795
+ className: "neeto-ui-text-gray-700 my-auto",
36796
+ style: "h5",
36797
+ weight: "semibold"
36798
+ }, t("common.description")), /*#__PURE__*/React__default["default"].createElement("div", {
36799
+ className: "flex w-72 flex-wrap"
36800
+ }, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
36801
+ className: "neeto-ui-text-gray-800 my-auto",
36802
+ style: "h5",
36803
+ weight: "normal"
36804
+ }, ruleDetails.description.value)))), /*#__PURE__*/React__default["default"].createElement(EventsDetail, {
36805
+ conditions: ruleDetails.conditions,
36806
+ events: ruleDetails.events,
36807
+ performer: ruleDetails.performer
36808
+ }), /*#__PURE__*/React__default["default"].createElement(ActionsDetail, {
36809
+ actions: ruleDetails.actions
36810
+ }))));
36811
+ };
36812
+
33928
36813
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
33929
36814
  try {
33930
36815
  var info = gen[key](arg);
@@ -71101,5 +73986,6 @@ cov_2lkzw7diw1();
71101
73986
  exports.ActionForm = Actions$1;
71102
73987
  exports.ConditionForm = Conditions$1;
71103
73988
  exports.NeetoRulesForm = NeetoRules;
73989
+ exports.RulePreview = RulePreview;
71104
73990
  exports["default"] = NeetoRules$2;
71105
73991
  //# sourceMappingURL=index.cjs.js.map