@genesislcap/expression-builder 14.252.1-alpha-ea46342.0 → 14.254.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/custom-elements.json +617 -466
- package/dist/dts/main/expression-group/expression-group.d.ts.map +1 -1
- package/dist/dts/main/expression-group/expression-group.template.d.ts.map +1 -1
- package/dist/dts/main/expression-rule/expression-rule.d.ts +1 -0
- package/dist/dts/main/expression-rule/expression-rule.d.ts.map +1 -1
- package/dist/dts/main/expression-rule/expression-rule.helpers.d.ts +14 -1
- package/dist/dts/main/expression-rule/expression-rule.helpers.d.ts.map +1 -1
- package/dist/dts/main/expression-rule/expression-rule.styles.d.ts.map +1 -1
- package/dist/dts/main/rule-operator/rule-operator.template.d.ts.map +1 -1
- package/dist/dts/types/public.types.d.ts +4 -0
- package/dist/dts/types/public.types.d.ts.map +1 -1
- package/dist/dts/utils/formatting.d.ts +2 -0
- package/dist/dts/utils/formatting.d.ts.map +1 -1
- package/dist/esm/main/expression-group/expression-group.js +0 -10
- package/dist/esm/main/expression-group/expression-group.template.js +9 -0
- package/dist/esm/main/expression-rule/expression-rule.helpers.js +84 -0
- package/dist/esm/main/expression-rule/expression-rule.js +14 -53
- package/dist/esm/main/expression-rule/expression-rule.styles.js +4 -0
- package/dist/esm/main/expression-rule/expression-rule.template.js +2 -2
- package/dist/esm/main/rule-operator/rule-operator.template.js +2 -0
- package/dist/esm/utils/formatting.js +8 -6
- package/dist/expression-builder.d.ts +6 -0
- package/docs/api-report.md +2 -0
- package/package.json +2 -2
|
@@ -138,206 +138,490 @@
|
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"kind": "javascript-module",
|
|
141
|
-
"path": "src/
|
|
142
|
-
"declarations": [],
|
|
143
|
-
"exports": []
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"kind": "javascript-module",
|
|
147
|
-
"path": "src/main/expression-builder.helpers.ts",
|
|
141
|
+
"path": "src/utils/data-model.ts",
|
|
148
142
|
"declarations": [
|
|
149
143
|
{
|
|
150
144
|
"kind": "function",
|
|
151
|
-
"name": "
|
|
145
|
+
"name": "groupToModelGroup",
|
|
152
146
|
"return": {
|
|
153
147
|
"type": {
|
|
154
|
-
"text": ""
|
|
148
|
+
"text": "ModelGroup"
|
|
155
149
|
}
|
|
156
150
|
},
|
|
157
151
|
"parameters": [
|
|
158
152
|
{
|
|
159
|
-
"name": "
|
|
160
|
-
"type": {
|
|
161
|
-
"text": "ModelGroup"
|
|
162
|
-
},
|
|
163
|
-
"description": "The root group to start searching from"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"name": "groupId",
|
|
153
|
+
"name": "group",
|
|
167
154
|
"type": {
|
|
168
|
-
"text": "
|
|
169
|
-
}
|
|
170
|
-
"description": "The Group ID to find"
|
|
155
|
+
"text": "Group"
|
|
156
|
+
}
|
|
171
157
|
},
|
|
172
158
|
{
|
|
173
|
-
"name": "
|
|
159
|
+
"name": "provider",
|
|
174
160
|
"type": {
|
|
175
|
-
"text": "
|
|
176
|
-
}
|
|
177
|
-
"description": "The function to apply to the children of the found group. A *new* object must be created and returned"
|
|
161
|
+
"text": "MetadataProvider"
|
|
162
|
+
}
|
|
178
163
|
}
|
|
179
164
|
],
|
|
180
|
-
"description": "
|
|
165
|
+
"description": "Converts a Group to a ModelGroup (adds required metadata)"
|
|
181
166
|
},
|
|
182
167
|
{
|
|
183
168
|
"kind": "function",
|
|
184
|
-
"name": "
|
|
169
|
+
"name": "modelGroupToGroup",
|
|
185
170
|
"return": {
|
|
186
171
|
"type": {
|
|
187
|
-
"text": "
|
|
172
|
+
"text": ""
|
|
188
173
|
}
|
|
189
174
|
},
|
|
190
175
|
"parameters": [
|
|
191
176
|
{
|
|
192
|
-
"name": "
|
|
177
|
+
"name": "modelGroup",
|
|
193
178
|
"type": {
|
|
194
179
|
"text": "ModelGroup"
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
{
|
|
198
|
-
"name": "parentGroupId",
|
|
199
|
-
"type": {
|
|
200
|
-
"text": "string"
|
|
201
|
-
}
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "newItem",
|
|
205
|
-
"type": {
|
|
206
|
-
"text": "ModelGroup | ModelRule"
|
|
207
|
-
}
|
|
180
|
+
},
|
|
181
|
+
"description": "The internal ModelGroup to convert."
|
|
208
182
|
}
|
|
209
|
-
]
|
|
183
|
+
],
|
|
184
|
+
"description": "Converts a ModelGroup (internal data structure) to a public Group structure.\nThis function recursively processes the rules within the group."
|
|
210
185
|
},
|
|
211
186
|
{
|
|
212
187
|
"kind": "function",
|
|
213
|
-
"name": "
|
|
188
|
+
"name": "modelRuleToRule",
|
|
214
189
|
"return": {
|
|
215
190
|
"type": {
|
|
216
|
-
"text": "
|
|
191
|
+
"text": ""
|
|
217
192
|
}
|
|
218
193
|
},
|
|
219
194
|
"parameters": [
|
|
220
195
|
{
|
|
221
|
-
"name": "
|
|
222
|
-
"type": {
|
|
223
|
-
"text": "ModelGroup"
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
"name": "groupIdToDelete",
|
|
196
|
+
"name": "modelRule",
|
|
228
197
|
"type": {
|
|
229
|
-
"text": "
|
|
230
|
-
}
|
|
198
|
+
"text": "ModelRule"
|
|
199
|
+
},
|
|
200
|
+
"description": "The internal ModelRule to convert."
|
|
231
201
|
}
|
|
232
|
-
]
|
|
202
|
+
],
|
|
203
|
+
"description": "Converts a ModelRule (internal data structure) to a public Rule structure."
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"exports": [
|
|
207
|
+
{
|
|
208
|
+
"kind": "js",
|
|
209
|
+
"name": "groupToModelGroup",
|
|
210
|
+
"declaration": {
|
|
211
|
+
"name": "groupToModelGroup",
|
|
212
|
+
"module": "src/utils/data-model.ts"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"kind": "js",
|
|
217
|
+
"name": "modelGroupToGroup",
|
|
218
|
+
"declaration": {
|
|
219
|
+
"name": "modelGroupToGroup",
|
|
220
|
+
"module": "src/utils/data-model.ts"
|
|
221
|
+
}
|
|
233
222
|
},
|
|
223
|
+
{
|
|
224
|
+
"kind": "js",
|
|
225
|
+
"name": "modelRuleToRule",
|
|
226
|
+
"declaration": {
|
|
227
|
+
"name": "modelRuleToRule",
|
|
228
|
+
"module": "src/utils/data-model.ts"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"kind": "javascript-module",
|
|
235
|
+
"path": "src/utils/formatting.ts",
|
|
236
|
+
"declarations": [
|
|
234
237
|
{
|
|
235
238
|
"kind": "function",
|
|
236
|
-
"name": "
|
|
237
|
-
"return": {
|
|
238
|
-
"type": {
|
|
239
|
-
"text": "ModelGroup"
|
|
240
|
-
}
|
|
241
|
-
},
|
|
239
|
+
"name": "formatDateString",
|
|
242
240
|
"parameters": [
|
|
243
241
|
{
|
|
244
|
-
"name": "
|
|
242
|
+
"name": "date",
|
|
245
243
|
"type": {
|
|
246
|
-
"text": "
|
|
244
|
+
"text": "Date"
|
|
247
245
|
}
|
|
248
|
-
}
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"description": "Gets the string representation from a `Date` which is the format a `date` input uses.\n`yyyy-mm-dd`\nUses UTC methods to ensure consistent output regardless of timezone."
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"kind": "function",
|
|
252
|
+
"name": "formatDateTimeString",
|
|
253
|
+
"parameters": [
|
|
249
254
|
{
|
|
250
|
-
"name": "
|
|
255
|
+
"name": "date",
|
|
251
256
|
"type": {
|
|
252
|
-
"text": "
|
|
257
|
+
"text": "Date"
|
|
253
258
|
}
|
|
254
259
|
}
|
|
255
|
-
]
|
|
260
|
+
],
|
|
261
|
+
"description": "Gets the string representation from a `Date` which is the format a `datetime-local` input uses.\n`yyyy-mm-ddThh:mm:ss`\nUses UTC methods to ensure consistent output regardless of timezone."
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
"exports": [
|
|
265
|
+
{
|
|
266
|
+
"kind": "js",
|
|
267
|
+
"name": "formatDateString",
|
|
268
|
+
"declaration": {
|
|
269
|
+
"name": "formatDateString",
|
|
270
|
+
"module": "src/utils/formatting.ts"
|
|
271
|
+
}
|
|
256
272
|
},
|
|
257
273
|
{
|
|
258
|
-
"kind": "
|
|
259
|
-
"name": "
|
|
260
|
-
"
|
|
261
|
-
"
|
|
262
|
-
|
|
263
|
-
|
|
274
|
+
"kind": "js",
|
|
275
|
+
"name": "formatDateTimeString",
|
|
276
|
+
"declaration": {
|
|
277
|
+
"name": "formatDateTimeString",
|
|
278
|
+
"module": "src/utils/formatting.ts"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"kind": "javascript-module",
|
|
285
|
+
"path": "src/utils/index.ts",
|
|
286
|
+
"declarations": [],
|
|
287
|
+
"exports": [
|
|
288
|
+
{
|
|
289
|
+
"kind": "js",
|
|
290
|
+
"name": "*",
|
|
291
|
+
"declaration": {
|
|
292
|
+
"name": "*",
|
|
293
|
+
"package": "./data-model"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"kind": "js",
|
|
298
|
+
"name": "*",
|
|
299
|
+
"declaration": {
|
|
300
|
+
"name": "*",
|
|
301
|
+
"package": "./formatting"
|
|
302
|
+
}
|
|
264
303
|
},
|
|
304
|
+
{
|
|
305
|
+
"kind": "js",
|
|
306
|
+
"name": "*",
|
|
307
|
+
"declaration": {
|
|
308
|
+
"name": "*",
|
|
309
|
+
"package": "./misc"
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"kind": "javascript-module",
|
|
316
|
+
"path": "src/utils/misc.ts",
|
|
317
|
+
"declarations": [
|
|
265
318
|
{
|
|
266
319
|
"kind": "function",
|
|
267
|
-
"name": "
|
|
320
|
+
"name": "processOptGroups",
|
|
268
321
|
"return": {
|
|
269
322
|
"type": {
|
|
270
|
-
"text": "
|
|
323
|
+
"text": "(T | { optgroup: string | null; xs: T[] })[]"
|
|
271
324
|
}
|
|
272
325
|
},
|
|
273
326
|
"parameters": [
|
|
274
327
|
{
|
|
275
|
-
"name": "
|
|
276
|
-
"type": {
|
|
277
|
-
"text": "ModelGroup"
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
"name": "groupIdToUpdate",
|
|
282
|
-
"type": {
|
|
283
|
-
"text": "string"
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
"name": "newData",
|
|
328
|
+
"name": "xs",
|
|
288
329
|
"type": {
|
|
289
|
-
"text": "
|
|
330
|
+
"text": "T[]"
|
|
290
331
|
}
|
|
291
332
|
}
|
|
292
333
|
]
|
|
293
334
|
},
|
|
294
335
|
{
|
|
295
336
|
"kind": "function",
|
|
296
|
-
"name": "
|
|
337
|
+
"name": "applyCustomStyles",
|
|
297
338
|
"return": {
|
|
298
339
|
"type": {
|
|
299
|
-
"text": "
|
|
340
|
+
"text": "void"
|
|
300
341
|
}
|
|
301
342
|
},
|
|
302
343
|
"parameters": [
|
|
303
344
|
{
|
|
304
|
-
"name": "
|
|
345
|
+
"name": "component",
|
|
305
346
|
"type": {
|
|
306
|
-
"text": "
|
|
307
|
-
}
|
|
347
|
+
"text": "HTMLElement"
|
|
348
|
+
},
|
|
349
|
+
"description": "The web component instance"
|
|
308
350
|
},
|
|
309
351
|
{
|
|
310
|
-
"name": "
|
|
352
|
+
"name": "styles",
|
|
311
353
|
"type": {
|
|
312
|
-
"text": "
|
|
313
|
-
}
|
|
354
|
+
"text": "Styles | undefined | null"
|
|
355
|
+
},
|
|
356
|
+
"description": "The styles configuration object"
|
|
314
357
|
},
|
|
315
358
|
{
|
|
316
|
-
"name": "
|
|
359
|
+
"name": "styleKey",
|
|
317
360
|
"type": {
|
|
318
|
-
"text": "
|
|
319
|
-
}
|
|
361
|
+
"text": "keyof NonNullable<Styles['customStyles']>"
|
|
362
|
+
},
|
|
363
|
+
"description": "The key in styles.customStyles to use for custom styles"
|
|
320
364
|
}
|
|
321
|
-
]
|
|
365
|
+
],
|
|
366
|
+
"description": "Utility function to add custom styles to a web component's shadow root"
|
|
322
367
|
}
|
|
323
368
|
],
|
|
324
369
|
"exports": [
|
|
325
370
|
{
|
|
326
371
|
"kind": "js",
|
|
327
|
-
"name": "
|
|
372
|
+
"name": "processOptGroups",
|
|
328
373
|
"declaration": {
|
|
329
|
-
"name": "
|
|
330
|
-
"module": "src/
|
|
374
|
+
"name": "processOptGroups",
|
|
375
|
+
"module": "src/utils/misc.ts"
|
|
331
376
|
}
|
|
332
377
|
},
|
|
333
378
|
{
|
|
334
379
|
"kind": "js",
|
|
335
|
-
"name": "
|
|
380
|
+
"name": "applyCustomStyles",
|
|
336
381
|
"declaration": {
|
|
337
|
-
"name": "
|
|
338
|
-
"module": "src/
|
|
382
|
+
"name": "applyCustomStyles",
|
|
383
|
+
"module": "src/utils/misc.ts"
|
|
339
384
|
}
|
|
340
|
-
}
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"kind": "javascript-module",
|
|
390
|
+
"path": "src/types/index.ts",
|
|
391
|
+
"declarations": [],
|
|
392
|
+
"exports": [
|
|
393
|
+
{
|
|
394
|
+
"kind": "js",
|
|
395
|
+
"name": "*",
|
|
396
|
+
"declaration": {
|
|
397
|
+
"name": "*",
|
|
398
|
+
"package": "./public.types"
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"kind": "js",
|
|
403
|
+
"name": "*",
|
|
404
|
+
"declaration": {
|
|
405
|
+
"name": "*",
|
|
406
|
+
"package": "./private.types"
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"kind": "javascript-module",
|
|
413
|
+
"path": "src/types/private.types.ts",
|
|
414
|
+
"declarations": [],
|
|
415
|
+
"exports": []
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"kind": "javascript-module",
|
|
419
|
+
"path": "src/types/public.types.ts",
|
|
420
|
+
"declarations": [],
|
|
421
|
+
"exports": []
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"kind": "javascript-module",
|
|
425
|
+
"path": "src/main/events.ts",
|
|
426
|
+
"declarations": [],
|
|
427
|
+
"exports": []
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"kind": "javascript-module",
|
|
431
|
+
"path": "src/main/expression-builder.helpers.ts",
|
|
432
|
+
"declarations": [
|
|
433
|
+
{
|
|
434
|
+
"kind": "function",
|
|
435
|
+
"name": "findOperateOnGroup",
|
|
436
|
+
"return": {
|
|
437
|
+
"type": {
|
|
438
|
+
"text": ""
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"parameters": [
|
|
442
|
+
{
|
|
443
|
+
"name": "model",
|
|
444
|
+
"type": {
|
|
445
|
+
"text": "ModelGroup"
|
|
446
|
+
},
|
|
447
|
+
"description": "The root group to start searching from"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"name": "groupId",
|
|
451
|
+
"type": {
|
|
452
|
+
"text": "string"
|
|
453
|
+
},
|
|
454
|
+
"description": "The Group ID to find"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "fn",
|
|
458
|
+
"type": {
|
|
459
|
+
"text": "ChildrenOperatorFn"
|
|
460
|
+
},
|
|
461
|
+
"description": "The function to apply to the children of the found group. A *new* object must be created and returned"
|
|
462
|
+
}
|
|
463
|
+
],
|
|
464
|
+
"description": "Finds a group within a model and applies a function to create a new children"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"kind": "function",
|
|
468
|
+
"name": "addGroupOrRule",
|
|
469
|
+
"return": {
|
|
470
|
+
"type": {
|
|
471
|
+
"text": "ModelGroup"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"parameters": [
|
|
475
|
+
{
|
|
476
|
+
"name": "model",
|
|
477
|
+
"type": {
|
|
478
|
+
"text": "ModelGroup"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "parentGroupId",
|
|
483
|
+
"type": {
|
|
484
|
+
"text": "string"
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "newItem",
|
|
489
|
+
"type": {
|
|
490
|
+
"text": "ModelGroup | ModelRule"
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"kind": "function",
|
|
497
|
+
"name": "deleteGroup",
|
|
498
|
+
"return": {
|
|
499
|
+
"type": {
|
|
500
|
+
"text": "ModelGroup"
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
"parameters": [
|
|
504
|
+
{
|
|
505
|
+
"name": "model",
|
|
506
|
+
"type": {
|
|
507
|
+
"text": "ModelGroup"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "groupIdToDelete",
|
|
512
|
+
"type": {
|
|
513
|
+
"text": "string"
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
]
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"kind": "function",
|
|
520
|
+
"name": "deleteRule",
|
|
521
|
+
"return": {
|
|
522
|
+
"type": {
|
|
523
|
+
"text": "ModelGroup"
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
"parameters": [
|
|
527
|
+
{
|
|
528
|
+
"name": "model",
|
|
529
|
+
"type": {
|
|
530
|
+
"text": "ModelGroup"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"name": "ruleIdToDelete",
|
|
535
|
+
"type": {
|
|
536
|
+
"text": "string"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"kind": "variable",
|
|
543
|
+
"name": "ROOT_GROUP",
|
|
544
|
+
"type": {
|
|
545
|
+
"text": "string"
|
|
546
|
+
},
|
|
547
|
+
"default": "'group-root'"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"kind": "function",
|
|
551
|
+
"name": "updateGroupData",
|
|
552
|
+
"return": {
|
|
553
|
+
"type": {
|
|
554
|
+
"text": "ModelGroup"
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"parameters": [
|
|
558
|
+
{
|
|
559
|
+
"name": "model",
|
|
560
|
+
"type": {
|
|
561
|
+
"text": "ModelGroup"
|
|
562
|
+
}
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"name": "groupIdToUpdate",
|
|
566
|
+
"type": {
|
|
567
|
+
"text": "string"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "newData",
|
|
572
|
+
"type": {
|
|
573
|
+
"text": "EventsDetailMap[Events.UpdateGroup]['newData']"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
]
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"kind": "function",
|
|
580
|
+
"name": "updateRuleData",
|
|
581
|
+
"return": {
|
|
582
|
+
"type": {
|
|
583
|
+
"text": "ModelGroup"
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"parameters": [
|
|
587
|
+
{
|
|
588
|
+
"name": "model",
|
|
589
|
+
"type": {
|
|
590
|
+
"text": "ModelGroup"
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "ruleIdToUpdate",
|
|
595
|
+
"type": {
|
|
596
|
+
"text": "string"
|
|
597
|
+
}
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
"name": "newData",
|
|
601
|
+
"type": {
|
|
602
|
+
"text": "EventsDetailMap[Events.UpdateRule]['newData']"
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
]
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
"exports": [
|
|
609
|
+
{
|
|
610
|
+
"kind": "js",
|
|
611
|
+
"name": "findOperateOnGroup",
|
|
612
|
+
"declaration": {
|
|
613
|
+
"name": "findOperateOnGroup",
|
|
614
|
+
"module": "src/main/expression-builder.helpers.ts"
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"kind": "js",
|
|
619
|
+
"name": "addGroupOrRule",
|
|
620
|
+
"declaration": {
|
|
621
|
+
"name": "addGroupOrRule",
|
|
622
|
+
"module": "src/main/expression-builder.helpers.ts"
|
|
623
|
+
}
|
|
624
|
+
},
|
|
341
625
|
{
|
|
342
626
|
"kind": "js",
|
|
343
627
|
"name": "deleteGroup",
|
|
@@ -628,317 +912,33 @@
|
|
|
628
912
|
}
|
|
629
913
|
]
|
|
630
914
|
},
|
|
631
|
-
{
|
|
632
|
-
"kind": "javascript-module",
|
|
633
|
-
"path": "src/main/index.ts",
|
|
634
|
-
"declarations": [],
|
|
635
|
-
"exports": [
|
|
636
|
-
{
|
|
637
|
-
"kind": "js",
|
|
638
|
-
"name": "*",
|
|
639
|
-
"declaration": {
|
|
640
|
-
"name": "*",
|
|
641
|
-
"package": "./expression-builder"
|
|
642
|
-
}
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
"kind": "js",
|
|
646
|
-
"name": "*",
|
|
647
|
-
"declaration": {
|
|
648
|
-
"name": "*",
|
|
649
|
-
"package": "./expression-builder.styles"
|
|
650
|
-
}
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
"kind": "js",
|
|
654
|
-
"name": "*",
|
|
655
|
-
"declaration": {
|
|
656
|
-
"name": "*",
|
|
657
|
-
"package": "./expression-builder.template"
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
]
|
|
661
|
-
},
|
|
662
|
-
{
|
|
663
|
-
"kind": "javascript-module",
|
|
664
|
-
"path": "src/types/index.ts",
|
|
665
|
-
"declarations": [],
|
|
666
|
-
"exports": [
|
|
667
|
-
{
|
|
668
|
-
"kind": "js",
|
|
669
|
-
"name": "*",
|
|
670
|
-
"declaration": {
|
|
671
|
-
"name": "*",
|
|
672
|
-
"package": "./public.types"
|
|
673
|
-
}
|
|
674
|
-
},
|
|
675
|
-
{
|
|
676
|
-
"kind": "js",
|
|
677
|
-
"name": "*",
|
|
678
|
-
"declaration": {
|
|
679
|
-
"name": "*",
|
|
680
|
-
"package": "./private.types"
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
]
|
|
684
|
-
},
|
|
685
|
-
{
|
|
686
|
-
"kind": "javascript-module",
|
|
687
|
-
"path": "src/types/private.types.ts",
|
|
688
|
-
"declarations": [],
|
|
689
|
-
"exports": []
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
"kind": "javascript-module",
|
|
693
|
-
"path": "src/types/public.types.ts",
|
|
694
|
-
"declarations": [],
|
|
695
|
-
"exports": []
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
"kind": "javascript-module",
|
|
699
|
-
"path": "src/utils/data-model.ts",
|
|
700
|
-
"declarations": [
|
|
701
|
-
{
|
|
702
|
-
"kind": "function",
|
|
703
|
-
"name": "groupToModelGroup",
|
|
704
|
-
"return": {
|
|
705
|
-
"type": {
|
|
706
|
-
"text": "ModelGroup"
|
|
707
|
-
}
|
|
708
|
-
},
|
|
709
|
-
"parameters": [
|
|
710
|
-
{
|
|
711
|
-
"name": "group",
|
|
712
|
-
"type": {
|
|
713
|
-
"text": "Group"
|
|
714
|
-
}
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
"name": "provider",
|
|
718
|
-
"type": {
|
|
719
|
-
"text": "MetadataProvider"
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
],
|
|
723
|
-
"description": "Converts a Group to a ModelGroup (adds required metadata)"
|
|
724
|
-
},
|
|
725
|
-
{
|
|
726
|
-
"kind": "function",
|
|
727
|
-
"name": "modelGroupToGroup",
|
|
728
|
-
"return": {
|
|
729
|
-
"type": {
|
|
730
|
-
"text": ""
|
|
731
|
-
}
|
|
732
|
-
},
|
|
733
|
-
"parameters": [
|
|
734
|
-
{
|
|
735
|
-
"name": "modelGroup",
|
|
736
|
-
"type": {
|
|
737
|
-
"text": "ModelGroup"
|
|
738
|
-
},
|
|
739
|
-
"description": "The internal ModelGroup to convert."
|
|
740
|
-
}
|
|
741
|
-
],
|
|
742
|
-
"description": "Converts a ModelGroup (internal data structure) to a public Group structure.\nThis function recursively processes the rules within the group."
|
|
743
|
-
},
|
|
744
|
-
{
|
|
745
|
-
"kind": "function",
|
|
746
|
-
"name": "modelRuleToRule",
|
|
747
|
-
"return": {
|
|
748
|
-
"type": {
|
|
749
|
-
"text": ""
|
|
750
|
-
}
|
|
751
|
-
},
|
|
752
|
-
"parameters": [
|
|
753
|
-
{
|
|
754
|
-
"name": "modelRule",
|
|
755
|
-
"type": {
|
|
756
|
-
"text": "ModelRule"
|
|
757
|
-
},
|
|
758
|
-
"description": "The internal ModelRule to convert."
|
|
759
|
-
}
|
|
760
|
-
],
|
|
761
|
-
"description": "Converts a ModelRule (internal data structure) to a public Rule structure."
|
|
762
|
-
}
|
|
763
|
-
],
|
|
764
|
-
"exports": [
|
|
765
|
-
{
|
|
766
|
-
"kind": "js",
|
|
767
|
-
"name": "groupToModelGroup",
|
|
768
|
-
"declaration": {
|
|
769
|
-
"name": "groupToModelGroup",
|
|
770
|
-
"module": "src/utils/data-model.ts"
|
|
771
|
-
}
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
"kind": "js",
|
|
775
|
-
"name": "modelGroupToGroup",
|
|
776
|
-
"declaration": {
|
|
777
|
-
"name": "modelGroupToGroup",
|
|
778
|
-
"module": "src/utils/data-model.ts"
|
|
779
|
-
}
|
|
780
|
-
},
|
|
781
|
-
{
|
|
782
|
-
"kind": "js",
|
|
783
|
-
"name": "modelRuleToRule",
|
|
784
|
-
"declaration": {
|
|
785
|
-
"name": "modelRuleToRule",
|
|
786
|
-
"module": "src/utils/data-model.ts"
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
]
|
|
790
|
-
},
|
|
791
|
-
{
|
|
792
|
-
"kind": "javascript-module",
|
|
793
|
-
"path": "src/utils/formatting.ts",
|
|
794
|
-
"declarations": [
|
|
795
|
-
{
|
|
796
|
-
"kind": "function",
|
|
797
|
-
"name": "formatDateString",
|
|
798
|
-
"parameters": [
|
|
799
|
-
{
|
|
800
|
-
"name": "date",
|
|
801
|
-
"type": {
|
|
802
|
-
"text": "Date"
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
],
|
|
806
|
-
"description": "Gets the string representation from a `Date` which is the format a `date` input uses.\n`yyyy-mm-dd`"
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
"kind": "function",
|
|
810
|
-
"name": "formatDateTimeString",
|
|
811
|
-
"parameters": [
|
|
812
|
-
{
|
|
813
|
-
"name": "date",
|
|
814
|
-
"type": {
|
|
815
|
-
"text": "Date"
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
],
|
|
819
|
-
"description": "Gets the string representation from a `Date` which is the format a `datetime-local` input uses.\n`yyyy-mm-ddThh:mm:ss`"
|
|
820
|
-
}
|
|
821
|
-
],
|
|
822
|
-
"exports": [
|
|
823
|
-
{
|
|
824
|
-
"kind": "js",
|
|
825
|
-
"name": "formatDateString",
|
|
826
|
-
"declaration": {
|
|
827
|
-
"name": "formatDateString",
|
|
828
|
-
"module": "src/utils/formatting.ts"
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
{
|
|
832
|
-
"kind": "js",
|
|
833
|
-
"name": "formatDateTimeString",
|
|
834
|
-
"declaration": {
|
|
835
|
-
"name": "formatDateTimeString",
|
|
836
|
-
"module": "src/utils/formatting.ts"
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
]
|
|
840
|
-
},
|
|
841
|
-
{
|
|
842
|
-
"kind": "javascript-module",
|
|
843
|
-
"path": "src/utils/index.ts",
|
|
844
|
-
"declarations": [],
|
|
845
|
-
"exports": [
|
|
846
|
-
{
|
|
847
|
-
"kind": "js",
|
|
848
|
-
"name": "*",
|
|
849
|
-
"declaration": {
|
|
850
|
-
"name": "*",
|
|
851
|
-
"package": "./data-model"
|
|
852
|
-
}
|
|
853
|
-
},
|
|
854
|
-
{
|
|
855
|
-
"kind": "js",
|
|
856
|
-
"name": "*",
|
|
857
|
-
"declaration": {
|
|
858
|
-
"name": "*",
|
|
859
|
-
"package": "./formatting"
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
{
|
|
863
|
-
"kind": "js",
|
|
864
|
-
"name": "*",
|
|
865
|
-
"declaration": {
|
|
866
|
-
"name": "*",
|
|
867
|
-
"package": "./misc"
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
]
|
|
871
|
-
},
|
|
872
|
-
{
|
|
873
|
-
"kind": "javascript-module",
|
|
874
|
-
"path": "src/utils/misc.ts",
|
|
875
|
-
"declarations": [
|
|
876
|
-
{
|
|
877
|
-
"kind": "function",
|
|
878
|
-
"name": "processOptGroups",
|
|
879
|
-
"return": {
|
|
880
|
-
"type": {
|
|
881
|
-
"text": "(T | { optgroup: string | null; xs: T[] })[]"
|
|
882
|
-
}
|
|
883
|
-
},
|
|
884
|
-
"parameters": [
|
|
885
|
-
{
|
|
886
|
-
"name": "xs",
|
|
887
|
-
"type": {
|
|
888
|
-
"text": "T[]"
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
]
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
"kind": "function",
|
|
895
|
-
"name": "applyCustomStyles",
|
|
896
|
-
"return": {
|
|
897
|
-
"type": {
|
|
898
|
-
"text": "void"
|
|
899
|
-
}
|
|
900
|
-
},
|
|
901
|
-
"parameters": [
|
|
902
|
-
{
|
|
903
|
-
"name": "component",
|
|
904
|
-
"type": {
|
|
905
|
-
"text": "HTMLElement"
|
|
906
|
-
},
|
|
907
|
-
"description": "The web component instance"
|
|
908
|
-
},
|
|
909
|
-
{
|
|
910
|
-
"name": "styles",
|
|
911
|
-
"type": {
|
|
912
|
-
"text": "Styles | undefined | null"
|
|
913
|
-
},
|
|
914
|
-
"description": "The styles configuration object"
|
|
915
|
-
},
|
|
916
|
-
{
|
|
917
|
-
"name": "styleKey",
|
|
918
|
-
"type": {
|
|
919
|
-
"text": "keyof NonNullable<Styles['customStyles']>"
|
|
920
|
-
},
|
|
921
|
-
"description": "The key in styles.customStyles to use for custom styles"
|
|
922
|
-
}
|
|
923
|
-
],
|
|
924
|
-
"description": "Utility function to add custom styles to a web component's shadow root"
|
|
925
|
-
}
|
|
926
|
-
],
|
|
915
|
+
{
|
|
916
|
+
"kind": "javascript-module",
|
|
917
|
+
"path": "src/main/index.ts",
|
|
918
|
+
"declarations": [],
|
|
927
919
|
"exports": [
|
|
928
920
|
{
|
|
929
921
|
"kind": "js",
|
|
930
|
-
"name": "
|
|
922
|
+
"name": "*",
|
|
931
923
|
"declaration": {
|
|
932
|
-
"name": "
|
|
933
|
-
"
|
|
924
|
+
"name": "*",
|
|
925
|
+
"package": "./expression-builder"
|
|
934
926
|
}
|
|
935
927
|
},
|
|
936
928
|
{
|
|
937
929
|
"kind": "js",
|
|
938
|
-
"name": "
|
|
930
|
+
"name": "*",
|
|
939
931
|
"declaration": {
|
|
940
|
-
"name": "
|
|
941
|
-
"
|
|
932
|
+
"name": "*",
|
|
933
|
+
"package": "./expression-builder.styles"
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
"kind": "js",
|
|
938
|
+
"name": "*",
|
|
939
|
+
"declaration": {
|
|
940
|
+
"name": "*",
|
|
941
|
+
"package": "./expression-builder.template"
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
944
|
]
|
|
@@ -971,7 +971,7 @@
|
|
|
971
971
|
{
|
|
972
972
|
"kind": "variable",
|
|
973
973
|
"name": "template",
|
|
974
|
-
"default": "html<ExpressionGroup>`\n ${(context) => {\n const buttonTag = context.styles?.customElements?.button || 'button';\n const maybeRadioBlock = context.styles?.customElements?.radio;\n const { radioTag, radioGroupTag } = maybeRadioBlock\n ? { radioTag: maybeRadioBlock.input, radioGroupTag: maybeRadioBlock.group }\n : { radioTag: 'input', radioGroupTag: 'div' };\n\n return html<ExpressionGroup>`\n <div class=\"rules-group-container\">\n <div class=\"rules-group-header\">\n <div class=\"btn-group float-end group-actions\">\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"rule\"\n @click=\"${(x, c) => x.dispatchAddRule(c.event)}\"\n >\n Add Rule\n </${buttonTag}>\n ${when(\n (x) => x.allowNestedGroup,\n html<ExpressionGroup>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"group\"\n @click=\"${(x, c) => x.dispatchAddGroup(c.event)}\"\n >\n Add Group\n </${buttonTag}>\n `,\n )}\n ${when(\n (x) => typeof x.index === 'number',\n html<ExpressionGroup>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-danger\"\n data-delete=\"group\"\n @click=\"${(x, c) => x.dispatchDeleteGroup(c.event)}\"\n >\n Delete Group\n </${buttonTag}>\n `,\n )}\n <div class=\"btn-group group-conditions\">\n ${whenElse(\n (_) => radioTag !== 'input',\n html<ExpressionGroup>`\n <${radioGroupTag}\n class=\"radio-group-container\"\n name=\"combinator\"\n @change=\"${(x, c) => x.handleCombinatorChange(c.event)}\"\n value=\"${(x) => x.model?.combinator?.type}\"\n >\n ${repeat(\n (x) => x.config.combinators,\n html<Combinator, ExpressionGroup>`\n <${radioTag}\n value=\"${(x) => x.type}\"\n ?checked=${(x, c) => c.parent.model?.combinator?.type === x.type}\n >\n ${(x) => x.label ?? x.type}\n </${radioTag}>\n `,\n )}\n </${radioGroupTag}>\n `,\n html<ExpressionGroup>`\n <div class=\"radio-group-container\">\n ${repeat(\n (x) => x.config.combinators,\n html<Combinator, ExpressionGroup>`\n <label class=\"btn btn-sm btn-primary\">\n <input\n type=\"radio\"\n name=\"combinator\"\n value=\"${(x) => x.type}\"\n @change=\"${(_, c) => c.parent.handleCombinatorChange(c.event)}\"\n ?checked=${(x, c) => c.parent.model?.combinator?.type === x.type}\n />\n ${(x) => x.label ?? x.type}\n </label>\n `,\n )}\n </div>\n `,\n )}\n </div>\n </div>\n <div class=\"rules-group-body\">\n <div class=\"rules-list\">\n ${repeat(\n (x) => x.model?.children ?? [],\n html<ModelRule | ModelGroup, ExpressionBuilder>`\n ${whenElse(\n (x) => 'children' in x,\n html<ModelGroup>`\n <expression-group\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-group>\n `,\n html<ModelRule>`\n <expression-rule\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-rule>\n `,\n )}\n `,\n { recycle: false, positioning: true },\n )}\n </div>\n </div>\n </div>\n </div>\n `;\n }}\n`"
|
|
974
|
+
"default": "html<ExpressionGroup>`\n ${(context) => {\n const buttonTag = context.styles?.customElements?.button || 'button';\n const maybeRadioBlock = context.styles?.customElements?.radio;\n const { radioTag, radioGroupTag } = maybeRadioBlock\n ? { radioTag: maybeRadioBlock.input, radioGroupTag: maybeRadioBlock.group }\n : { radioTag: 'input', radioGroupTag: 'div' };\n\n const ruleTooltip = `Add a new condition with field (e.g. CURRENCY), operator (e.g. EQUALS), and value (e.g. GBP) that will be combined with other conditions in this group using the selected logic (e.g. ${context.config.combinators[0].type})`;\n\n const groupTooltip = `Add a new nested sub-group to create more complex expressions, joined by combinatorial logic (e.g. ${context.config.combinators[0].type})`;\n\n return html<ExpressionGroup>`\n <div class=\"rules-group-container\">\n <div class=\"rules-group-header\">\n <div class=\"btn-group float-end group-actions\">\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"rule\"\n @click=\"${(x, c) => x.dispatchAddRule(c.event)}\"\n title=${(_) => ruleTooltip}\n >\n Add Rule\n </${buttonTag}>\n ${when(\n (x) => x.allowNestedGroup,\n html<ExpressionGroup>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-success\"\n data-add=\"group\"\n @click=\"${(x, c) => x.dispatchAddGroup(c.event)}\"\n title=\"${(_) => groupTooltip}\"\n >\n Add Group\n </${buttonTag}>\n `,\n )}\n ${when(\n (x) => typeof x.index === 'number',\n html<ExpressionGroup>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-danger\"\n data-delete=\"group\"\n @click=\"${(x, c) => x.dispatchDeleteGroup(c.event)}\"\n >\n Delete Group\n </${buttonTag}>\n `,\n )}\n <div class=\"btn-group group-conditions\">\n ${whenElse(\n (_) => radioTag !== 'input',\n html<ExpressionGroup>`\n <${radioGroupTag}\n class=\"radio-group-container\"\n name=\"combinator\"\n @change=\"${(x, c) => x.handleCombinatorChange(c.event)}\"\n value=\"${(x) => x.model?.combinator?.type}\"\n >\n ${repeat(\n (x) => x.config.combinators,\n html<Combinator, ExpressionGroup>`\n <${radioTag}\n value=\"${(x) => x.type}\"\n ?checked=${(x, c) => c.parent.model?.combinator?.type === x.type}\n >\n ${(x) => x.label ?? x.type}\n </${radioTag}>\n `,\n )}\n </${radioGroupTag}>\n `,\n html<ExpressionGroup>`\n <div class=\"radio-group-container\">\n ${repeat(\n (x) => x.config.combinators,\n html<Combinator, ExpressionGroup>`\n <label class=\"btn btn-sm btn-primary\">\n <input\n type=\"radio\"\n name=\"combinator\"\n value=\"${(x) => x.type}\"\n @change=\"${(_, c) => c.parent.handleCombinatorChange(c.event)}\"\n ?checked=${(x, c) => c.parent.model?.combinator?.type === x.type}\n />\n ${(x) => x.label ?? x.type}\n </label>\n `,\n )}\n </div>\n `,\n )}\n </div>\n </div>\n <div class=\"rules-group-body\">\n <div class=\"rules-list\">\n ${repeat(\n (x) => x.model?.children ?? [],\n html<ModelRule | ModelGroup, ExpressionBuilder>`\n ${whenElse(\n (x) => 'children' in x,\n html<ModelGroup>`\n <expression-group\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-group>\n `,\n html<ModelRule>`\n <expression-rule\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :model=${(x) => x}\n :index=${(_, c) => c.index}\n ></expression-rule>\n `,\n )}\n ${when(\n (_, loopCtx) => !loopCtx.isLast,\n html<ModelRule | ModelGroup, ExpressionBuilder>`\n <p class=\"group-combinator-link\">\n ${(_, innerCtx) => innerCtx.parent.model.combinator.type}\n </p>\n `,\n )}\n `,\n { recycle: false, positioning: true },\n )}\n </div>\n </div>\n </div>\n </div>\n `;\n }}\n`"
|
|
975
975
|
}
|
|
976
976
|
],
|
|
977
977
|
"exports": [
|
|
@@ -1166,6 +1166,18 @@
|
|
|
1166
1166
|
}
|
|
1167
1167
|
]
|
|
1168
1168
|
},
|
|
1169
|
+
{
|
|
1170
|
+
"kind": "function",
|
|
1171
|
+
"name": "getValue",
|
|
1172
|
+
"parameters": [
|
|
1173
|
+
{
|
|
1174
|
+
"name": "m",
|
|
1175
|
+
"type": {
|
|
1176
|
+
"text": "ModelRule"
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
1180
|
+
},
|
|
1169
1181
|
{
|
|
1170
1182
|
"kind": "function",
|
|
1171
1183
|
"name": "fieldDefault",
|
|
@@ -1177,6 +1189,88 @@
|
|
|
1177
1189
|
}
|
|
1178
1190
|
}
|
|
1179
1191
|
]
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
"kind": "function",
|
|
1195
|
+
"name": "operatorChangedUpdatedModel",
|
|
1196
|
+
"return": {
|
|
1197
|
+
"type": {
|
|
1198
|
+
"text": "Rule"
|
|
1199
|
+
}
|
|
1200
|
+
},
|
|
1201
|
+
"parameters": [
|
|
1202
|
+
{
|
|
1203
|
+
"name": "newOperator",
|
|
1204
|
+
"type": {
|
|
1205
|
+
"text": "Operator"
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"name": "model",
|
|
1210
|
+
"type": {
|
|
1211
|
+
"text": "ModelRule"
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
]
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"kind": "function",
|
|
1218
|
+
"name": "valueChangedUpdateModel",
|
|
1219
|
+
"return": {
|
|
1220
|
+
"type": {
|
|
1221
|
+
"text": "Rule"
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
"parameters": [
|
|
1225
|
+
{
|
|
1226
|
+
"name": "model",
|
|
1227
|
+
"type": {
|
|
1228
|
+
"text": "ModelRule"
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
"name": "value",
|
|
1233
|
+
"type": {
|
|
1234
|
+
"text": "any"
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"name": "argIndex",
|
|
1239
|
+
"type": {
|
|
1240
|
+
"text": "number"
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
]
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
"kind": "function",
|
|
1247
|
+
"name": "isValueInvalid",
|
|
1248
|
+
"parameters": [
|
|
1249
|
+
{
|
|
1250
|
+
"name": "x",
|
|
1251
|
+
"type": {
|
|
1252
|
+
"text": "any"
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
],
|
|
1256
|
+
"description": "Test a value considered to be allowed for validation reasons\nA boolean cast to falsy is considered invalid, except special case\nthat we allow `0` because that's a valid numeric comparison.\nThis will consider blank strings invalid, to test against that explicitly the user\nshould define an operator such as `is_blank`\nThis shouldn't be used on a boolean value"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"kind": "function",
|
|
1260
|
+
"name": "isPartialRuleError",
|
|
1261
|
+
"return": {
|
|
1262
|
+
"type": {
|
|
1263
|
+
"text": "boolean"
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
"parameters": [
|
|
1267
|
+
{
|
|
1268
|
+
"name": "model",
|
|
1269
|
+
"type": {
|
|
1270
|
+
"text": "ModelRule"
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
]
|
|
1180
1274
|
}
|
|
1181
1275
|
],
|
|
1182
1276
|
"exports": [
|
|
@@ -1188,6 +1282,14 @@
|
|
|
1188
1282
|
"module": "src/main/expression-rule/expression-rule.helpers.ts"
|
|
1189
1283
|
}
|
|
1190
1284
|
},
|
|
1285
|
+
{
|
|
1286
|
+
"kind": "js",
|
|
1287
|
+
"name": "getValue",
|
|
1288
|
+
"declaration": {
|
|
1289
|
+
"name": "getValue",
|
|
1290
|
+
"module": "src/main/expression-rule/expression-rule.helpers.ts"
|
|
1291
|
+
}
|
|
1292
|
+
},
|
|
1191
1293
|
{
|
|
1192
1294
|
"kind": "js",
|
|
1193
1295
|
"name": "fieldDefault",
|
|
@@ -1195,6 +1297,38 @@
|
|
|
1195
1297
|
"name": "fieldDefault",
|
|
1196
1298
|
"module": "src/main/expression-rule/expression-rule.helpers.ts"
|
|
1197
1299
|
}
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
"kind": "js",
|
|
1303
|
+
"name": "operatorChangedUpdatedModel",
|
|
1304
|
+
"declaration": {
|
|
1305
|
+
"name": "operatorChangedUpdatedModel",
|
|
1306
|
+
"module": "src/main/expression-rule/expression-rule.helpers.ts"
|
|
1307
|
+
}
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"kind": "js",
|
|
1311
|
+
"name": "valueChangedUpdateModel",
|
|
1312
|
+
"declaration": {
|
|
1313
|
+
"name": "valueChangedUpdateModel",
|
|
1314
|
+
"module": "src/main/expression-rule/expression-rule.helpers.ts"
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
"kind": "js",
|
|
1319
|
+
"name": "isValueInvalid",
|
|
1320
|
+
"declaration": {
|
|
1321
|
+
"name": "isValueInvalid",
|
|
1322
|
+
"module": "src/main/expression-rule/expression-rule.helpers.ts"
|
|
1323
|
+
}
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
"kind": "js",
|
|
1327
|
+
"name": "isPartialRuleError",
|
|
1328
|
+
"declaration": {
|
|
1329
|
+
"name": "isPartialRuleError",
|
|
1330
|
+
"module": "src/main/expression-rule/expression-rule.helpers.ts"
|
|
1331
|
+
}
|
|
1198
1332
|
}
|
|
1199
1333
|
]
|
|
1200
1334
|
},
|
|
@@ -1205,7 +1339,7 @@
|
|
|
1205
1339
|
{
|
|
1206
1340
|
"kind": "variable",
|
|
1207
1341
|
"name": "styles",
|
|
1208
|
-
"default": "css`\n .rule-container {\n border: 1px solid #eee;\n margin-bottom: 5px;\n padding: 5px;\n display: grid;\n grid-template-columns: auto 1fr;\n }\n\n .margin {\n margin-left: calc(var(--design-unit) * 1px);\n margin-right: calc(var(--design-unit) * 1px);\n }\n\n .rule-header {\n margin-bottom: 5px;\n display: flex;\n justify-content: flex-end;\n }\n\n .rule-actions {\n display: inline-block;\n }\n\n .rule-content {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .rule-field-container,\n .rule-operator-container,\n .rule-value-container {\n display: inline-block;\n margin: 0 5px 0 0;\n vertical-align: middle;\n }\n\n .rule-value-container {\n border-left: var(--rule-value-separator);\n padding-left: 5px;\n }\n\n .rule-value-container label {\n margin-bottom: 0;\n font-weight: normal;\n }\n\n .rule-value-container label.block {\n display: block;\n }\n\n expression-rule-value {\n display: flex;\n }\n`"
|
|
1342
|
+
"default": "css`\n .rule-container {\n border: 1px solid #eee;\n margin-bottom: 5px;\n padding: 5px;\n display: grid;\n grid-template-columns: auto 1fr;\n }\n\n .rule-container.error {\n border-color: red;\n }\n\n .margin {\n margin-left: calc(var(--design-unit) * 1px);\n margin-right: calc(var(--design-unit) * 1px);\n }\n\n .rule-header {\n margin-bottom: 5px;\n display: flex;\n justify-content: flex-end;\n }\n\n .rule-actions {\n display: inline-block;\n }\n\n .rule-content {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n }\n\n .rule-field-container,\n .rule-operator-container,\n .rule-value-container {\n display: inline-block;\n margin: 0 5px 0 0;\n vertical-align: middle;\n }\n\n .rule-value-container {\n border-left: var(--rule-value-separator);\n padding-left: 5px;\n }\n\n .rule-value-container label {\n margin-bottom: 0;\n font-weight: normal;\n }\n\n .rule-value-container label.block {\n display: block;\n }\n\n expression-rule-value {\n display: flex;\n }\n`"
|
|
1209
1343
|
}
|
|
1210
1344
|
],
|
|
1211
1345
|
"exports": [
|
|
@@ -1226,7 +1360,7 @@
|
|
|
1226
1360
|
{
|
|
1227
1361
|
"kind": "variable",
|
|
1228
1362
|
"name": "template",
|
|
1229
|
-
"default": "html<ExpressionRule>`\n ${(context) => {\n const buttonTag = context.styles?.customElements?.button || 'button';\n\n return html<ExpressionRule>`\n <div class=\"rule-container\">\n <div class=\"rule-content\">\n <expression-rule-field\nclass=\"margin\"\n :fields=${(x) => x.config.fields}\n :field=${(x) => x.model?.field}\n :config=${(x) => x.config}\n :styles=${(x) => x.styles}\n @field-selected=${(x, c) =>\n x.handleFieldSelected(c.event as CustomEvent<EventsDetailMap[Events.FieldSelected]>)}\n ></expression-rule-field>\n <expression-rule-operator\nclass=\"margin\"\n :operators=${(x) => x.config.operators}\n :field=${(x) => x.model.field}\n :operator=${(x) => x.model?.operator}\n :config=${(x) => x.config}\n :styles=${(x) => x.styles}\n @operator-selected=${(x, c) =>\n x.handleOperatorSelected(\n c.event as CustomEvent<EventsDetailMap[Events.OperatorSelected]>,\n )}\n ></expression-rule-operator>\n ${repeat(\n (x) => x.operandIterator,\n html<true, ExpressionRule>`\n <expression-rule-value\n class=\"margin\"\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :field=${(_, c) => c.parent.model.field}\n :value=${(_, c) => c.parent.operandValue(c.index)}\n value-index=${(_, c) => c.index}\n ?variadic=${(_, c) => c.parent.model?.operator?.nbInputs === 'many'}\n @value-updated=${(_, c) =>\n c.parent.handleValueChanged(\n c.event as CustomEvent<EventsDetailMap[Events.ValueUpdated]>,\n )}\n @remove-variadic-operand=${(_, c) =>\n c.parent.handleRemoveVarArg(\n c.event as CustomEvent<EventsDetailMap[Events.RemoveVarArg]>,\n )}\n ></expression-rule-value>\n `,\n { positioning: true, recycle: false },\n )}\n ${when(\n (x) => x.model?.operator?.nbInputs === 'many',\n html<ExpressionRule>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-accept\"\n @click=\"${(x) => x.dispatchAddVarArg()}\"\n >\n +\n </${buttonTag}>\n `,\n )}\n </div>\n\n <div class=\"rule-header\">\n <div class=\"btn-group rule-actions\">\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-danger\"\n data-delete=\"rule\"\n @click=\"${(x, c) => x.dispatchDeleteRule(c.event)}\"\n >\n Delete Rule\n </${buttonTag}>\n </div>\n </div>\n </div>\n `;\n }}\n`"
|
|
1363
|
+
"default": "html<ExpressionRule>`\n ${(context) => {\n const buttonTag = context.styles?.customElements?.button || 'button';\n\n return html<ExpressionRule>`\n <div class=\"rule-container ${(x) => classNames(['error', x.error])}\">\n <div class=\"rule-content\">\n <expression-rule-field\nclass=\"margin\"\n :fields=${(x) => x.config.fields}\n :field=${(x) => x.model?.field}\n :config=${(x) => x.config}\n :styles=${(x) => x.styles}\n @field-selected=${(x, c) =>\n x.handleFieldSelected(c.event as CustomEvent<EventsDetailMap[Events.FieldSelected]>)}\n ></expression-rule-field>\n <expression-rule-operator\nclass=\"margin\"\n :operators=${(x) => x.config.operators}\n :field=${(x) => x.model.field}\n :operator=${(x) => x.model?.operator}\n :config=${(x) => x.config}\n :styles=${(x) => x.styles}\n @operator-selected=${(x, c) =>\n x.handleOperatorSelected(\n c.event as CustomEvent<EventsDetailMap[Events.OperatorSelected]>,\n )}\n ></expression-rule-operator>\n ${repeat(\n (x) => x.operandIterator,\n html<true, ExpressionRule>`\n <expression-rule-value\n class=\"margin\"\n :config=${(_, c) => c.parent.config}\n :styles=${(_, c) => c.parent.styles}\n :field=${(_, c) => c.parent.model.field}\n :value=${(_, c) => c.parent.operandValue(c.index)}\n value-index=${(_, c) => c.index}\n ?variadic=${(_, c) => c.parent.model?.operator?.nbInputs === 'many'}\n @value-updated=${(_, c) =>\n c.parent.handleValueChanged(\n c.event as CustomEvent<EventsDetailMap[Events.ValueUpdated]>,\n )}\n @remove-variadic-operand=${(_, c) =>\n c.parent.handleRemoveVarArg(\n c.event as CustomEvent<EventsDetailMap[Events.RemoveVarArg]>,\n )}\n ></expression-rule-value>\n `,\n { positioning: true, recycle: false },\n )}\n ${when(\n (x) => x.model?.operator?.nbInputs === 'many',\n html<ExpressionRule>`\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-accept\"\n @click=\"${(x) => x.dispatchAddVarArg()}\"\n >\n +\n </${buttonTag}>\n `,\n )}\n </div>\n\n <div class=\"rule-header\">\n <div class=\"btn-group rule-actions\">\n <${buttonTag}\n type=\"button\"\n class=\"btn btn-sm btn-danger\"\n data-delete=\"rule\"\n @click=\"${(x, c) => x.dispatchDeleteRule(c.event)}\"\n >\n Delete Rule\n </${buttonTag}>\n </div>\n </div>\n </div>\n `;\n }}\n`"
|
|
1230
1364
|
}
|
|
1231
1365
|
],
|
|
1232
1366
|
"exports": [
|
|
@@ -1277,6 +1411,14 @@
|
|
|
1277
1411
|
"text": "number"
|
|
1278
1412
|
}
|
|
1279
1413
|
},
|
|
1414
|
+
{
|
|
1415
|
+
"kind": "field",
|
|
1416
|
+
"name": "error",
|
|
1417
|
+
"type": {
|
|
1418
|
+
"text": "boolean"
|
|
1419
|
+
},
|
|
1420
|
+
"default": "false"
|
|
1421
|
+
},
|
|
1280
1422
|
{
|
|
1281
1423
|
"kind": "method",
|
|
1282
1424
|
"name": "variadicRule",
|
|
@@ -1388,6 +1530,15 @@
|
|
|
1388
1530
|
}
|
|
1389
1531
|
}
|
|
1390
1532
|
],
|
|
1533
|
+
"attributes": [
|
|
1534
|
+
{
|
|
1535
|
+
"type": {
|
|
1536
|
+
"text": "boolean"
|
|
1537
|
+
},
|
|
1538
|
+
"default": "false",
|
|
1539
|
+
"fieldName": "error"
|
|
1540
|
+
}
|
|
1541
|
+
],
|
|
1391
1542
|
"superclass": {
|
|
1392
1543
|
"name": "GenesisElement",
|
|
1393
1544
|
"package": "@genesislcap/web-core"
|
|
@@ -1417,12 +1568,12 @@
|
|
|
1417
1568
|
},
|
|
1418
1569
|
{
|
|
1419
1570
|
"kind": "javascript-module",
|
|
1420
|
-
"path": "src/main/rule-
|
|
1571
|
+
"path": "src/main/rule-field/rule-field.template.ts",
|
|
1421
1572
|
"declarations": [
|
|
1422
1573
|
{
|
|
1423
1574
|
"kind": "variable",
|
|
1424
1575
|
"name": "template",
|
|
1425
|
-
"default": "html<
|
|
1576
|
+
"default": "html<RuleField>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = 'optgroup'; // Not supporting custom optgroup for now\n\n return html<RuleField>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.dispatchFieldsChanged(c.event)}\n value=${(x) => x.field?.fieldId}\n >\n <${optionTag} value=\"\">Select a field</${optionTag}>\n ${repeat(\n (x) => x.groupedFieldss,\n html<{ optgroup: string | null; xs: Field[] } | Field, RuleField>`\n ${(groupOrFields) => {\n if ('xs' in groupOrFields) {\n return html<{\n optgroup: string | null;\n xs: Field[];\n }>`\n <${optgroupTag} label=\"${(x) => x.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parentContext.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Field>`\n <${optionTag}\n value=\"${(x) => x.fieldId}\"\n ?selected=${(x, c) => x.fieldId === c.parent?.field?.fieldId}\n >\n ${(x) => x.label}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
|
|
1426
1577
|
}
|
|
1427
1578
|
],
|
|
1428
1579
|
"exports": [
|
|
@@ -1431,42 +1582,34 @@
|
|
|
1431
1582
|
"name": "template",
|
|
1432
1583
|
"declaration": {
|
|
1433
1584
|
"name": "template",
|
|
1434
|
-
"module": "src/main/rule-
|
|
1585
|
+
"module": "src/main/rule-field/rule-field.template.ts"
|
|
1435
1586
|
}
|
|
1436
1587
|
}
|
|
1437
1588
|
]
|
|
1438
1589
|
},
|
|
1439
1590
|
{
|
|
1440
1591
|
"kind": "javascript-module",
|
|
1441
|
-
"path": "src/main/rule-
|
|
1592
|
+
"path": "src/main/rule-field/rule-field.ts",
|
|
1442
1593
|
"declarations": [
|
|
1443
1594
|
{
|
|
1444
1595
|
"kind": "class",
|
|
1445
1596
|
"description": "",
|
|
1446
|
-
"name": "
|
|
1597
|
+
"name": "RuleField",
|
|
1447
1598
|
"members": [
|
|
1448
1599
|
{
|
|
1449
1600
|
"kind": "field",
|
|
1450
|
-
"name": "
|
|
1601
|
+
"name": "fields",
|
|
1451
1602
|
"type": {
|
|
1452
|
-
"text": "
|
|
1603
|
+
"text": "Field[]"
|
|
1453
1604
|
},
|
|
1454
1605
|
"default": "[]"
|
|
1455
1606
|
},
|
|
1456
|
-
{
|
|
1457
|
-
"kind": "field",
|
|
1458
|
-
"name": "operator",
|
|
1459
|
-
"type": {
|
|
1460
|
-
"text": "Operator"
|
|
1461
|
-
}
|
|
1462
|
-
},
|
|
1463
1607
|
{
|
|
1464
1608
|
"kind": "field",
|
|
1465
1609
|
"name": "field",
|
|
1466
1610
|
"type": {
|
|
1467
|
-
"text": "Field
|
|
1468
|
-
}
|
|
1469
|
-
"default": "null"
|
|
1611
|
+
"text": "Field"
|
|
1612
|
+
}
|
|
1470
1613
|
},
|
|
1471
1614
|
{
|
|
1472
1615
|
"kind": "field",
|
|
@@ -1484,23 +1627,15 @@
|
|
|
1484
1627
|
},
|
|
1485
1628
|
{
|
|
1486
1629
|
"kind": "field",
|
|
1487
|
-
"name": "
|
|
1488
|
-
"type": {
|
|
1489
|
-
"text": "Operator[]"
|
|
1490
|
-
},
|
|
1491
|
-
"readonly": true
|
|
1492
|
-
},
|
|
1493
|
-
{
|
|
1494
|
-
"kind": "field",
|
|
1495
|
-
"name": "groupedOperators",
|
|
1630
|
+
"name": "groupedFieldss",
|
|
1496
1631
|
"type": {
|
|
1497
|
-
"text": "(
|
|
1632
|
+
"text": "(Field | { optgroup: string | null; xs: Field[] })[]"
|
|
1498
1633
|
},
|
|
1499
1634
|
"readonly": true
|
|
1500
1635
|
},
|
|
1501
1636
|
{
|
|
1502
1637
|
"kind": "method",
|
|
1503
|
-
"name": "
|
|
1638
|
+
"name": "dispatchFieldsChanged",
|
|
1504
1639
|
"parameters": [
|
|
1505
1640
|
{
|
|
1506
1641
|
"name": "event",
|
|
@@ -1522,37 +1657,37 @@
|
|
|
1522
1657
|
"name": "GenesisElement",
|
|
1523
1658
|
"package": "@genesislcap/web-core"
|
|
1524
1659
|
},
|
|
1525
|
-
"tagName": "expression-rule-
|
|
1660
|
+
"tagName": "expression-rule-field",
|
|
1526
1661
|
"customElement": true
|
|
1527
1662
|
}
|
|
1528
1663
|
],
|
|
1529
1664
|
"exports": [
|
|
1530
1665
|
{
|
|
1531
1666
|
"kind": "js",
|
|
1532
|
-
"name": "
|
|
1667
|
+
"name": "RuleField",
|
|
1533
1668
|
"declaration": {
|
|
1534
|
-
"name": "
|
|
1535
|
-
"module": "src/main/rule-
|
|
1669
|
+
"name": "RuleField",
|
|
1670
|
+
"module": "src/main/rule-field/rule-field.ts"
|
|
1536
1671
|
}
|
|
1537
1672
|
},
|
|
1538
1673
|
{
|
|
1539
1674
|
"kind": "custom-element-definition",
|
|
1540
|
-
"name": "expression-rule-
|
|
1675
|
+
"name": "expression-rule-field",
|
|
1541
1676
|
"declaration": {
|
|
1542
|
-
"name": "
|
|
1543
|
-
"module": "src/main/rule-
|
|
1677
|
+
"name": "RuleField",
|
|
1678
|
+
"module": "src/main/rule-field/rule-field.ts"
|
|
1544
1679
|
}
|
|
1545
1680
|
}
|
|
1546
1681
|
]
|
|
1547
1682
|
},
|
|
1548
1683
|
{
|
|
1549
1684
|
"kind": "javascript-module",
|
|
1550
|
-
"path": "src/main/rule-
|
|
1685
|
+
"path": "src/main/rule-operator/rule-operator.template.ts",
|
|
1551
1686
|
"declarations": [
|
|
1552
1687
|
{
|
|
1553
1688
|
"kind": "variable",
|
|
1554
1689
|
"name": "template",
|
|
1555
|
-
"default": "html<
|
|
1690
|
+
"default": "html<RuleOperator>`\n ${(context) => {\n const selectTag = context.styles?.customElements?.select || 'select';\n const optionTag = context.styles?.customElements?.option || 'option';\n const optgroupTag = 'optgroup'; // Not supporting custom optgroup for now\n\n return html<RuleOperator>`\n <${selectTag}\n class=\"form-select\"\n @change=${(x, c) => x.handleOperatorChange(c.event)}\n value=${(x) => x.operator?.type}\n >\n <${optionTag} value=\"\">Select an operator</${optionTag}>\n ${repeat(\n (x) => x.groupedOperators,\n html<{ optgroup: string | null; xs: Operator[] } | Operator, RuleOperator>`\n ${(groupOrOperator) => {\n if ('xs' in groupOrOperator) {\n return html<{ optgroup: string | null; xs: Operator[] }, RuleOperator>`\n <${optgroupTag} label=\"${groupOrOperator.optgroup}\">\n ${repeat(\n (x) => x.xs,\n html<Operator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => x.type === c.parentContext.parent.operator?.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.type}\n </${optionTag}>\n `,\n )}\n </${optgroupTag}>\n `;\n } else {\n return html<Operator, RuleOperator>`\n <${optionTag}\n value=\"${(x) => x.type}\"\n ?selected=${(x, c) => c.parent.operator?.type === x.type}\n title=${(x) => x.tooltip}\n >\n ${(x) => x.type}\n </${optionTag}>\n `;\n }\n }}\n `,\n )}\n </${selectTag}>\n `;\n }}\n`"
|
|
1556
1691
|
}
|
|
1557
1692
|
],
|
|
1558
1693
|
"exports": [
|
|
@@ -1561,35 +1696,43 @@
|
|
|
1561
1696
|
"name": "template",
|
|
1562
1697
|
"declaration": {
|
|
1563
1698
|
"name": "template",
|
|
1564
|
-
"module": "src/main/rule-
|
|
1699
|
+
"module": "src/main/rule-operator/rule-operator.template.ts"
|
|
1565
1700
|
}
|
|
1566
1701
|
}
|
|
1567
1702
|
]
|
|
1568
1703
|
},
|
|
1569
1704
|
{
|
|
1570
1705
|
"kind": "javascript-module",
|
|
1571
|
-
"path": "src/main/rule-
|
|
1706
|
+
"path": "src/main/rule-operator/rule-operator.ts",
|
|
1572
1707
|
"declarations": [
|
|
1573
1708
|
{
|
|
1574
1709
|
"kind": "class",
|
|
1575
1710
|
"description": "",
|
|
1576
|
-
"name": "
|
|
1711
|
+
"name": "RuleOperator",
|
|
1577
1712
|
"members": [
|
|
1578
1713
|
{
|
|
1579
1714
|
"kind": "field",
|
|
1580
|
-
"name": "
|
|
1715
|
+
"name": "operators",
|
|
1581
1716
|
"type": {
|
|
1582
|
-
"text": "
|
|
1717
|
+
"text": "Operator[]"
|
|
1583
1718
|
},
|
|
1584
1719
|
"default": "[]"
|
|
1585
1720
|
},
|
|
1586
1721
|
{
|
|
1587
1722
|
"kind": "field",
|
|
1588
|
-
"name": "
|
|
1723
|
+
"name": "operator",
|
|
1589
1724
|
"type": {
|
|
1590
|
-
"text": "
|
|
1725
|
+
"text": "Operator"
|
|
1591
1726
|
}
|
|
1592
1727
|
},
|
|
1728
|
+
{
|
|
1729
|
+
"kind": "field",
|
|
1730
|
+
"name": "field",
|
|
1731
|
+
"type": {
|
|
1732
|
+
"text": "Field | null"
|
|
1733
|
+
},
|
|
1734
|
+
"default": "null"
|
|
1735
|
+
},
|
|
1593
1736
|
{
|
|
1594
1737
|
"kind": "field",
|
|
1595
1738
|
"name": "config",
|
|
@@ -1606,15 +1749,23 @@
|
|
|
1606
1749
|
},
|
|
1607
1750
|
{
|
|
1608
1751
|
"kind": "field",
|
|
1609
|
-
"name": "
|
|
1752
|
+
"name": "allowedOperators",
|
|
1610
1753
|
"type": {
|
|
1611
|
-
"text": "
|
|
1754
|
+
"text": "Operator[]"
|
|
1755
|
+
},
|
|
1756
|
+
"readonly": true
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"kind": "field",
|
|
1760
|
+
"name": "groupedOperators",
|
|
1761
|
+
"type": {
|
|
1762
|
+
"text": "(Operator | { optgroup: string | null; xs: Operator[] })[]"
|
|
1612
1763
|
},
|
|
1613
1764
|
"readonly": true
|
|
1614
1765
|
},
|
|
1615
1766
|
{
|
|
1616
1767
|
"kind": "method",
|
|
1617
|
-
"name": "
|
|
1768
|
+
"name": "handleOperatorChange",
|
|
1618
1769
|
"parameters": [
|
|
1619
1770
|
{
|
|
1620
1771
|
"name": "event",
|
|
@@ -1636,25 +1787,25 @@
|
|
|
1636
1787
|
"name": "GenesisElement",
|
|
1637
1788
|
"package": "@genesislcap/web-core"
|
|
1638
1789
|
},
|
|
1639
|
-
"tagName": "expression-rule-
|
|
1790
|
+
"tagName": "expression-rule-operator",
|
|
1640
1791
|
"customElement": true
|
|
1641
1792
|
}
|
|
1642
1793
|
],
|
|
1643
1794
|
"exports": [
|
|
1644
1795
|
{
|
|
1645
1796
|
"kind": "js",
|
|
1646
|
-
"name": "
|
|
1797
|
+
"name": "RuleOperator",
|
|
1647
1798
|
"declaration": {
|
|
1648
|
-
"name": "
|
|
1649
|
-
"module": "src/main/rule-
|
|
1799
|
+
"name": "RuleOperator",
|
|
1800
|
+
"module": "src/main/rule-operator/rule-operator.ts"
|
|
1650
1801
|
}
|
|
1651
1802
|
},
|
|
1652
1803
|
{
|
|
1653
1804
|
"kind": "custom-element-definition",
|
|
1654
|
-
"name": "expression-rule-
|
|
1805
|
+
"name": "expression-rule-operator",
|
|
1655
1806
|
"declaration": {
|
|
1656
|
-
"name": "
|
|
1657
|
-
"module": "src/main/rule-
|
|
1807
|
+
"name": "RuleOperator",
|
|
1808
|
+
"module": "src/main/rule-operator/rule-operator.ts"
|
|
1658
1809
|
}
|
|
1659
1810
|
}
|
|
1660
1811
|
]
|