@redvars/peacock 3.11.0 → 3.13.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.
Files changed (67) hide show
  1. package/dist/cb-divider.js +7 -6
  2. package/dist/cb-divider.js.map +1 -1
  3. package/dist/cb-group-base-D9gv7SDY.js +114 -0
  4. package/dist/cb-group-base-D9gv7SDY.js.map +1 -0
  5. package/dist/cb-group-base-DsX_2aFl.js +325 -0
  6. package/dist/cb-group-base-DsX_2aFl.js.map +1 -0
  7. package/dist/cb-group.js +96 -0
  8. package/dist/cb-group.js.map +1 -0
  9. package/dist/cb-rule.js +212 -0
  10. package/dist/cb-rule.js.map +1 -0
  11. package/dist/condition-builder.js +90 -35
  12. package/dist/condition-builder.js.map +1 -1
  13. package/dist/custom-elements-jsdocs.json +176 -96
  14. package/dist/custom-elements.json +1348 -151
  15. package/dist/field.js +6 -5
  16. package/dist/field.js.map +1 -1
  17. package/dist/index.js +4 -3
  18. package/dist/index.js.map +1 -1
  19. package/dist/loader.js +40 -22
  20. package/dist/loader.js.map +1 -1
  21. package/dist/src/LoaderUtils.d.ts +10 -2
  22. package/dist/src/condition-builder/cb-divider.d.ts +3 -1
  23. package/dist/src/condition-builder/cb-drag.d.ts +10 -0
  24. package/dist/src/condition-builder/cb-group-base.d.ts +59 -0
  25. package/dist/src/condition-builder/cb-group.d.ts +34 -0
  26. package/dist/src/condition-builder/cb-rule.d.ts +32 -0
  27. package/dist/src/condition-builder/cb-types.d.ts +13 -0
  28. package/dist/src/condition-builder/condition-builder.d.ts +35 -14
  29. package/dist/src/condition-builder/index.d.ts +3 -3
  30. package/dist/src/index.d.ts +2 -1
  31. package/dist/test/condition-builder.test.d.ts +1 -0
  32. package/dist/test/loader.test.d.ts +1 -0
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +1 -1
  35. package/readme.md +2 -2
  36. package/src/LoaderUtils.ts +41 -13
  37. package/src/condition-builder/cb-divider.scss +4 -5
  38. package/src/condition-builder/cb-divider.ts +3 -1
  39. package/src/condition-builder/cb-drag.ts +35 -0
  40. package/src/condition-builder/cb-group-base.scss +97 -0
  41. package/src/condition-builder/cb-group-base.ts +335 -0
  42. package/src/condition-builder/cb-group.scss +21 -0
  43. package/src/condition-builder/cb-group.ts +72 -0
  44. package/src/condition-builder/cb-rule.scss +90 -0
  45. package/src/condition-builder/cb-rule.ts +129 -0
  46. package/src/condition-builder/cb-types.ts +16 -0
  47. package/src/condition-builder/condition-builder.scss +12 -9
  48. package/src/condition-builder/condition-builder.ts +77 -17
  49. package/src/condition-builder/index.ts +7 -3
  50. package/src/field/field.scss +11 -6
  51. package/src/index.ts +7 -3
  52. package/src/loader.ts +6 -13
  53. package/dist/cb-compound-expression.js +0 -133
  54. package/dist/cb-compound-expression.js.map +0 -1
  55. package/dist/cb-expression.js +0 -78
  56. package/dist/cb-expression.js.map +0 -1
  57. package/dist/cb-predicate.js +0 -141
  58. package/dist/cb-predicate.js.map +0 -1
  59. package/dist/src/condition-builder/cb-compound-expression.d.ts +0 -30
  60. package/dist/src/condition-builder/cb-expression.d.ts +0 -30
  61. package/dist/src/condition-builder/cb-predicate.d.ts +0 -29
  62. package/src/condition-builder/cb-compound-expression.scss +0 -41
  63. package/src/condition-builder/cb-compound-expression.ts +0 -79
  64. package/src/condition-builder/cb-expression.scss +0 -13
  65. package/src/condition-builder/cb-expression.ts +0 -48
  66. package/src/condition-builder/cb-predicate.scss +0 -35
  67. package/src/condition-builder/cb-predicate.ts +0 -101
@@ -165,10 +165,14 @@
165
165
  {
166
166
  "kind": "field",
167
167
  "name": "_observer",
168
- "type": {
169
- "text": "MutationObserver | undefined"
170
- },
171
- "privacy": "private"
168
+ "privacy": "private",
169
+ "default": "new MutationObserver(mutations => { for (const { addedNodes } of mutations) { for (const node of addedNodes) { if (node.nodeType === Node.ELEMENT_NODE) { this.load(node as Element); } } } })"
170
+ },
171
+ {
172
+ "kind": "field",
173
+ "name": "_observed",
174
+ "privacy": "private",
175
+ "default": "new WeakSet<Node>()"
172
176
  },
173
177
  {
174
178
  "kind": "method",
@@ -193,6 +197,11 @@
193
197
  "kind": "method",
194
198
  "name": "start"
195
199
  },
200
+ {
201
+ "kind": "method",
202
+ "name": "watchShadowRoots",
203
+ "description": "Watches every shadow root attached from now on, as it is attached, so lazy components that a\ncomponent renders in its shadow root load as they do in the document."
204
+ },
196
205
  {
197
206
  "kind": "method",
198
207
  "name": "eagerLoadComponents"
@@ -226,7 +235,7 @@
226
235
  {
227
236
  "name": "root",
228
237
  "type": {
229
- "text": "Element | Document"
238
+ "text": "LoadRoot"
230
239
  }
231
240
  }
232
241
  ]
@@ -238,10 +247,11 @@
238
247
  {
239
248
  "name": "root",
240
249
  "type": {
241
- "text": "any"
250
+ "text": "Document | Element | ShadowRoot"
242
251
  }
243
252
  }
244
- ]
253
+ ],
254
+ "description": "Loads the lazy components in `root` (a document or a shadow root) and those added later."
245
255
  }
246
256
  ]
247
257
  },
@@ -33383,22 +33393,89 @@
33383
33393
  },
33384
33394
  {
33385
33395
  "kind": "javascript-module",
33386
- "path": "src/condition-builder/condition-builder.ts",
33396
+ "path": "src/condition-builder/cb-types.ts",
33397
+ "declarations": [],
33398
+ "exports": []
33399
+ },
33400
+ {
33401
+ "kind": "javascript-module",
33402
+ "path": "src/condition-builder/cb-rule.ts",
33387
33403
  "declarations": [
33388
33404
  {
33389
33405
  "kind": "class",
33390
33406
  "description": "",
33391
- "name": "ConditionBuilder",
33392
- "members": [],
33407
+ "name": "CbRule",
33408
+ "cssProperties": [
33409
+ {
33410
+ "description": "Height of the slotted fields (wc-select, wc-input…). Defaults to `2.5rem`.",
33411
+ "name": "--cb-rule-field-height"
33412
+ }
33413
+ ],
33414
+ "members": [
33415
+ {
33416
+ "kind": "field",
33417
+ "name": "_handleEl",
33418
+ "type": {
33419
+ "text": "HTMLElement | undefined"
33420
+ },
33421
+ "privacy": "private",
33422
+ "readonly": true
33423
+ },
33424
+ {
33425
+ "kind": "method",
33426
+ "name": "_onDragStart",
33427
+ "privacy": "private",
33428
+ "parameters": [
33429
+ {
33430
+ "name": "event",
33431
+ "type": {
33432
+ "text": "DragEvent"
33433
+ }
33434
+ }
33435
+ ]
33436
+ },
33437
+ {
33438
+ "kind": "method",
33439
+ "name": "_onDragEnd",
33440
+ "privacy": "private"
33441
+ },
33442
+ {
33443
+ "kind": "method",
33444
+ "name": "_onHandleKeyDown",
33445
+ "privacy": "private",
33446
+ "parameters": [
33447
+ {
33448
+ "name": "event",
33449
+ "type": {
33450
+ "text": "KeyboardEvent"
33451
+ }
33452
+ }
33453
+ ]
33454
+ },
33455
+ {
33456
+ "kind": "method",
33457
+ "name": "_onRemoveClick",
33458
+ "privacy": "private"
33459
+ }
33460
+ ],
33461
+ "events": [
33462
+ {
33463
+ "type": {
33464
+ "text": "CustomEvent<{rule: CbRule, group: HTMLElement | null}>"
33465
+ },
33466
+ "description": "Dispatched when the remove button is clicked. Cancelable: unless prevented, the rule removes itself.",
33467
+ "name": "rule-remove"
33468
+ }
33469
+ ],
33393
33470
  "superclass": {
33394
33471
  "name": "LitElement",
33395
33472
  "package": "lit"
33396
33473
  },
33397
- "tagName": "wc-condition-builder",
33474
+ "tagName": "wc-cb-rule",
33398
33475
  "customElement": true,
33399
- "summary": "A condition builder component that allows users to construct complex filter conditions using a visual rule-based interface with predicates, compound expressions, and logical operators.",
33476
+ "summary": "One condition row in a condition builder: a drag handle, the slotted field, operator and value controls, and a remove button.",
33400
33477
  "rawTag": {
33401
- "name": "condition-builder",
33478
+ "name": "cb-rule",
33402
33479
  "description": ""
33403
33480
  }
33404
33481
  }
@@ -33406,275 +33483,1353 @@
33406
33483
  "exports": [
33407
33484
  {
33408
33485
  "kind": "js",
33409
- "name": "ConditionBuilder",
33486
+ "name": "CbRule",
33410
33487
  "declaration": {
33411
- "name": "ConditionBuilder",
33412
- "module": "src/condition-builder/condition-builder.ts"
33488
+ "name": "CbRule",
33489
+ "module": "src/condition-builder/cb-rule.ts"
33413
33490
  }
33414
33491
  }
33415
33492
  ]
33416
33493
  },
33417
33494
  {
33418
33495
  "kind": "javascript-module",
33419
- "path": "src/condition-builder/cb-predicate.ts",
33496
+ "path": "src/condition-builder/cb-drag.ts",
33497
+ "declarations": [
33498
+ {
33499
+ "kind": "function",
33500
+ "name": "getActiveRule",
33501
+ "return": {
33502
+ "type": {
33503
+ "text": "CbRule | null"
33504
+ }
33505
+ }
33506
+ },
33507
+ {
33508
+ "kind": "function",
33509
+ "name": "setActiveRule",
33510
+ "parameters": [
33511
+ {
33512
+ "name": "rule",
33513
+ "type": {
33514
+ "text": "CbRule | null"
33515
+ }
33516
+ }
33517
+ ]
33518
+ },
33519
+ {
33520
+ "kind": "function",
33521
+ "name": "claimDropTarget",
33522
+ "parameters": [
33523
+ {
33524
+ "name": "clear",
33525
+ "type": {
33526
+ "text": "(() => void) | null"
33527
+ }
33528
+ }
33529
+ ],
33530
+ "description": "Makes `clear` the current drop target's cleanup, running the previous one\nso only one group shows a drop indicator at a time. Pass `null` to clear."
33531
+ },
33532
+ {
33533
+ "kind": "function",
33534
+ "name": "releaseDropTarget",
33535
+ "parameters": [
33536
+ {
33537
+ "name": "clear",
33538
+ "type": {
33539
+ "text": "() => void"
33540
+ }
33541
+ }
33542
+ ],
33543
+ "description": "Clears the drop target if `clear` still owns it."
33544
+ }
33545
+ ],
33546
+ "exports": [
33547
+ {
33548
+ "kind": "js",
33549
+ "name": "getActiveRule",
33550
+ "declaration": {
33551
+ "name": "getActiveRule",
33552
+ "module": "src/condition-builder/cb-drag.ts"
33553
+ }
33554
+ },
33555
+ {
33556
+ "kind": "js",
33557
+ "name": "setActiveRule",
33558
+ "declaration": {
33559
+ "name": "setActiveRule",
33560
+ "module": "src/condition-builder/cb-drag.ts"
33561
+ }
33562
+ },
33563
+ {
33564
+ "kind": "js",
33565
+ "name": "claimDropTarget",
33566
+ "declaration": {
33567
+ "name": "claimDropTarget",
33568
+ "module": "src/condition-builder/cb-drag.ts"
33569
+ }
33570
+ },
33571
+ {
33572
+ "kind": "js",
33573
+ "name": "releaseDropTarget",
33574
+ "declaration": {
33575
+ "name": "releaseDropTarget",
33576
+ "module": "src/condition-builder/cb-drag.ts"
33577
+ }
33578
+ }
33579
+ ]
33580
+ },
33581
+ {
33582
+ "kind": "javascript-module",
33583
+ "path": "src/condition-builder/cb-group-base.ts",
33420
33584
  "declarations": [
33421
33585
  {
33422
33586
  "kind": "class",
33423
- "description": "",
33424
- "name": "CbPredicate",
33587
+ "description": "Shared behaviour of `wc-condition-builder` and `wc-cb-group`: the And/Or\noperator pill, the bracket joining the items, and dropping dragged rules.",
33588
+ "name": "CbGroupBase",
33425
33589
  "members": [
33590
+ {
33591
+ "kind": "method",
33592
+ "name": "_rowCenter",
33593
+ "privacy": "private",
33594
+ "static": true,
33595
+ "return": {
33596
+ "type": {
33597
+ "text": "number"
33598
+ }
33599
+ },
33600
+ "parameters": [
33601
+ {
33602
+ "name": "item",
33603
+ "type": {
33604
+ "text": "Element"
33605
+ }
33606
+ }
33607
+ ],
33608
+ "description": "Viewport Y of the middle of an item's first row, where the bracket meets it."
33609
+ },
33426
33610
  {
33427
33611
  "kind": "field",
33428
- "name": "conditionOperator",
33612
+ "name": "operator",
33429
33613
  "type": {
33430
- "text": "'and' | 'or' | undefined"
33614
+ "text": "CbOperator"
33431
33615
  },
33432
- "description": "The logical operator shown between predicates ('and' or 'or').",
33433
- "attribute": "condition-operator",
33434
- "reflects": true
33616
+ "default": "'and'",
33617
+ "description": "The logical operator joining the rules and groups in this group.",
33618
+ "attribute": "operator",
33619
+ "reflects": true,
33620
+ "expandedType": {
33621
+ "text": "'and' | 'or'"
33622
+ }
33435
33623
  },
33436
33624
  {
33437
33625
  "kind": "field",
33438
- "name": "vertical",
33626
+ "name": "_itemCount",
33627
+ "type": {
33628
+ "text": "number"
33629
+ },
33630
+ "privacy": "private",
33631
+ "default": "0",
33632
+ "description": "Number of rules and groups in the default slot."
33633
+ },
33634
+ {
33635
+ "kind": "field",
33636
+ "name": "_dropIndicatorTop",
33637
+ "type": {
33638
+ "text": "number | null"
33639
+ },
33640
+ "privacy": "private",
33641
+ "default": "null",
33642
+ "description": "Y of the drop indicator inside `.items`, or `null` when nothing is dragged over."
33643
+ },
33644
+ {
33645
+ "kind": "field",
33646
+ "name": "_menuOpen",
33439
33647
  "type": {
33440
33648
  "text": "boolean"
33441
33649
  },
33650
+ "privacy": "private",
33442
33651
  "default": "false",
33443
- "description": "Whether to render the predicate in vertical layout.",
33444
- "attribute": "vertical",
33445
- "reflects": true
33652
+ "description": "Whether the operator menu is open."
33653
+ },
33654
+ {
33655
+ "kind": "field",
33656
+ "name": "_itemsEl",
33657
+ "type": {
33658
+ "text": "HTMLElement | undefined"
33659
+ },
33660
+ "privacy": "private",
33661
+ "readonly": true
33662
+ },
33663
+ {
33664
+ "kind": "field",
33665
+ "name": "_connectorEl",
33666
+ "type": {
33667
+ "text": "HTMLElement | undefined"
33668
+ },
33669
+ "privacy": "private",
33670
+ "readonly": true
33671
+ },
33672
+ {
33673
+ "kind": "field",
33674
+ "name": "_pillEl",
33675
+ "type": {
33676
+ "text": "HTMLElement | undefined"
33677
+ },
33678
+ "privacy": "private",
33679
+ "readonly": true
33680
+ },
33681
+ {
33682
+ "kind": "field",
33683
+ "name": "_menuEl",
33684
+ "type": {
33685
+ "text": "MenuElement | undefined"
33686
+ },
33687
+ "privacy": "private",
33688
+ "readonly": true
33689
+ },
33690
+ {
33691
+ "kind": "field",
33692
+ "name": "_menuId",
33693
+ "privacy": "private",
33694
+ "readonly": true,
33695
+ "default": "`cb-operator-menu-${Math.random().toString(36).slice(2, 9)}`",
33696
+ "description": "Id linking the operator pill to its menu."
33697
+ },
33698
+ {
33699
+ "kind": "field",
33700
+ "name": "_resizeObserver",
33701
+ "privacy": "private",
33702
+ "readonly": true,
33703
+ "default": "new ResizeObserver(() => this._layoutConnector(), )",
33704
+ "description": "Re-measures the bracket when any item changes size."
33705
+ },
33706
+ {
33707
+ "kind": "field",
33708
+ "name": "_dropIndex",
33709
+ "type": {
33710
+ "text": "number"
33711
+ },
33712
+ "privacy": "private",
33713
+ "default": "-1",
33714
+ "description": "Index the dragged rule would be inserted at, or -1."
33715
+ },
33716
+ {
33717
+ "kind": "field",
33718
+ "name": "items",
33719
+ "type": {
33720
+ "text": "HTMLElement[]"
33721
+ },
33722
+ "description": "The rules and groups in this group, in order.",
33723
+ "readonly": true
33446
33724
  },
33447
33725
  {
33448
33726
  "kind": "method",
33449
- "name": "__adjustSlotEndPadding",
33727
+ "name": "moveRule",
33728
+ "return": {
33729
+ "type": {
33730
+ "text": "boolean"
33731
+ }
33732
+ },
33733
+ "parameters": [
33734
+ {
33735
+ "name": "rule",
33736
+ "type": {
33737
+ "text": "CbRule"
33738
+ }
33739
+ },
33740
+ {
33741
+ "name": "index",
33742
+ "type": {
33743
+ "text": "number"
33744
+ }
33745
+ }
33746
+ ],
33747
+ "description": "Moves `rule` into this group at `index` (counted without the rule itself).\nFires a cancelable `rule-move` event first. Returns whether it moved."
33748
+ },
33749
+ {
33750
+ "kind": "method",
33751
+ "name": "_onSlotChange",
33450
33752
  "privacy": "private"
33451
33753
  },
33452
33754
  {
33453
33755
  "kind": "method",
33454
- "name": "__renderHorizontalOperator",
33756
+ "name": "_layoutConnector",
33757
+ "privacy": "private",
33758
+ "description": "Spans the bracket from the first to the last item's first row."
33759
+ },
33760
+ {
33761
+ "kind": "method",
33762
+ "name": "_onPillClick",
33763
+ "privacy": "private",
33764
+ "parameters": [
33765
+ {
33766
+ "name": "event",
33767
+ "type": {
33768
+ "text": "MouseEvent"
33769
+ }
33770
+ }
33771
+ ]
33772
+ },
33773
+ {
33774
+ "kind": "method",
33775
+ "name": "_onMenuActivate",
33776
+ "privacy": "private",
33777
+ "parameters": [
33778
+ {
33779
+ "name": "event",
33780
+ "type": {
33781
+ "text": "CustomEvent<{ item: { value: string } }>"
33782
+ }
33783
+ }
33784
+ ]
33785
+ },
33786
+ {
33787
+ "kind": "field",
33788
+ "name": "_clearDropIndicator",
33789
+ "privacy": "private",
33790
+ "readonly": true
33791
+ },
33792
+ {
33793
+ "kind": "method",
33794
+ "name": "_onDragOver",
33795
+ "privacy": "private",
33796
+ "parameters": [
33797
+ {
33798
+ "name": "event",
33799
+ "type": {
33800
+ "text": "DragEvent"
33801
+ }
33802
+ }
33803
+ ]
33804
+ },
33805
+ {
33806
+ "kind": "method",
33807
+ "name": "_onDragLeave",
33808
+ "privacy": "private",
33809
+ "parameters": [
33810
+ {
33811
+ "name": "event",
33812
+ "type": {
33813
+ "text": "DragEvent"
33814
+ }
33815
+ }
33816
+ ]
33817
+ },
33818
+ {
33819
+ "kind": "method",
33820
+ "name": "_onDrop",
33821
+ "privacy": "private",
33822
+ "parameters": [
33823
+ {
33824
+ "name": "event",
33825
+ "type": {
33826
+ "text": "DragEvent"
33827
+ }
33828
+ }
33829
+ ]
33830
+ },
33831
+ {
33832
+ "kind": "method",
33833
+ "name": "renderFooter",
33834
+ "privacy": "protected",
33835
+ "return": {
33836
+ "type": {
33837
+ "text": "TemplateResult | typeof nothing"
33838
+ }
33839
+ },
33840
+ "description": "Content placed after the items; each group type renders its own actions."
33841
+ },
33842
+ {
33843
+ "kind": "method",
33844
+ "name": "_renderConnector",
33455
33845
  "privacy": "private"
33456
33846
  },
33457
33847
  {
33458
33848
  "kind": "method",
33459
- "name": "__renderVerticalOperator",
33849
+ "name": "_renderOperatorMenu",
33460
33850
  "privacy": "private"
33461
33851
  }
33462
33852
  ],
33463
- "attributes": [
33853
+ "events": [
33464
33854
  {
33465
- "name": "condition-operator",
33855
+ "name": "operator-change",
33466
33856
  "type": {
33467
- "text": "'and' | 'or' | undefined"
33468
- },
33469
- "description": "The logical operator shown between predicates ('and' or 'or').",
33470
- "fieldName": "conditionOperator"
33471
- },
33857
+ "text": "CustomEvent"
33858
+ }
33859
+ }
33860
+ ],
33861
+ "attributes": [
33472
33862
  {
33473
- "name": "vertical",
33863
+ "name": "operator",
33474
33864
  "type": {
33475
- "text": "boolean"
33865
+ "text": "CbOperator"
33476
33866
  },
33477
- "default": "false",
33478
- "description": "Whether to render the predicate in vertical layout.",
33479
- "fieldName": "vertical"
33867
+ "default": "'and'",
33868
+ "description": "The logical operator joining the rules and groups in this group.",
33869
+ "fieldName": "operator",
33870
+ "expandedType": {
33871
+ "text": "'and' | 'or'"
33872
+ }
33480
33873
  }
33481
33874
  ],
33482
33875
  "superclass": {
33483
33876
  "name": "LitElement",
33484
33877
  "package": "lit"
33485
33878
  },
33486
- "tagName": "wc-cb-predicate",
33487
- "customElement": true,
33488
- "summary": "A predicate container in a condition builder that can display conditions in horizontal or vertical layout with an optional logical operator divider.",
33489
- "rawTag": {
33490
- "name": "cb-predicate",
33491
- "description": ""
33492
- }
33879
+ "customElement": true
33493
33880
  }
33494
33881
  ],
33495
33882
  "exports": [
33496
33883
  {
33497
33884
  "kind": "js",
33498
- "name": "CbPredicate",
33885
+ "name": "CbGroupBase",
33499
33886
  "declaration": {
33500
- "name": "CbPredicate",
33501
- "module": "src/condition-builder/cb-predicate.ts"
33887
+ "name": "CbGroupBase",
33888
+ "module": "src/condition-builder/cb-group-base.ts"
33502
33889
  }
33503
33890
  }
33504
33891
  ]
33505
33892
  },
33506
33893
  {
33507
33894
  "kind": "javascript-module",
33508
- "path": "src/condition-builder/cb-compound-expression.ts",
33895
+ "path": "src/condition-builder/condition-builder.ts",
33509
33896
  "declarations": [
33510
33897
  {
33511
33898
  "kind": "class",
33512
33899
  "description": "",
33513
- "name": "CbCompoundExpression",
33900
+ "name": "ConditionBuilder",
33901
+ "slots": [
33902
+ {
33903
+ "description": "Rules (`wc-cb-rule`) and groups (`wc-cb-group`).",
33904
+ "name": ""
33905
+ },
33906
+ {
33907
+ "description": "Replaces the default \"Add rule\" and \"Add inner group\" buttons.",
33908
+ "name": "actions"
33909
+ },
33910
+ {
33911
+ "description": "Actions aligned to the end of the footer, such as a \"Run query\" button.",
33912
+ "name": "actions-end"
33913
+ }
33914
+ ],
33514
33915
  "members": [
33916
+ {
33917
+ "kind": "method",
33918
+ "name": "_dispatchAdd",
33919
+ "privacy": "private",
33920
+ "parameters": [
33921
+ {
33922
+ "name": "type",
33923
+ "type": {
33924
+ "text": "'add-rule' | 'add-group'"
33925
+ }
33926
+ }
33927
+ ]
33928
+ },
33929
+ {
33930
+ "kind": "method",
33931
+ "name": "renderFooter",
33932
+ "privacy": "protected",
33933
+ "return": {
33934
+ "type": {
33935
+ "text": "TemplateResult | typeof nothing"
33936
+ }
33937
+ },
33938
+ "description": "Content placed after the items; each group type renders its own actions.",
33939
+ "inheritedFrom": {
33940
+ "name": "CbGroupBase",
33941
+ "module": "src/condition-builder/cb-group-base.ts"
33942
+ }
33943
+ },
33944
+ {
33945
+ "kind": "method",
33946
+ "name": "_rowCenter",
33947
+ "privacy": "private",
33948
+ "static": true,
33949
+ "return": {
33950
+ "type": {
33951
+ "text": "number"
33952
+ }
33953
+ },
33954
+ "parameters": [
33955
+ {
33956
+ "name": "item",
33957
+ "type": {
33958
+ "text": "Element"
33959
+ }
33960
+ }
33961
+ ],
33962
+ "description": "Viewport Y of the middle of an item's first row, where the bracket meets it.",
33963
+ "inheritedFrom": {
33964
+ "name": "CbGroupBase",
33965
+ "module": "src/condition-builder/cb-group-base.ts"
33966
+ }
33967
+ },
33515
33968
  {
33516
33969
  "kind": "field",
33517
- "name": "conditionOperator",
33970
+ "name": "operator",
33518
33971
  "type": {
33519
- "text": "'and' | 'or' | undefined"
33972
+ "text": "CbOperator"
33520
33973
  },
33521
- "description": "The logical operator joining conditions in this group ('and' or 'or').",
33522
- "attribute": "condition-operator",
33523
- "reflects": true
33974
+ "default": "'and'",
33975
+ "description": "The logical operator joining the rules and groups in this group.",
33976
+ "attribute": "operator",
33977
+ "reflects": true,
33978
+ "expandedType": {
33979
+ "text": "'and' | 'or'"
33980
+ },
33981
+ "inheritedFrom": {
33982
+ "name": "CbGroupBase",
33983
+ "module": "src/condition-builder/cb-group-base.ts"
33984
+ }
33524
33985
  },
33525
33986
  {
33526
33987
  "kind": "field",
33527
- "name": "fieldName",
33988
+ "name": "_itemCount",
33528
33989
  "type": {
33529
- "text": "string"
33990
+ "text": "number"
33530
33991
  },
33531
- "default": "''",
33532
- "description": "The field name for the compound expression.",
33533
- "attribute": "field-name"
33992
+ "privacy": "private",
33993
+ "default": "0",
33994
+ "description": "Number of rules and groups in the default slot.",
33995
+ "inheritedFrom": {
33996
+ "name": "CbGroupBase",
33997
+ "module": "src/condition-builder/cb-group-base.ts"
33998
+ }
33534
33999
  },
33535
34000
  {
33536
34001
  "kind": "field",
33537
- "name": "fieldLabel",
34002
+ "name": "_dropIndicatorTop",
33538
34003
  "type": {
33539
- "text": "string"
34004
+ "text": "number | null"
33540
34005
  },
33541
- "default": "''",
33542
- "description": "The display label for the field.",
33543
- "attribute": "field-label"
34006
+ "privacy": "private",
34007
+ "default": "null",
34008
+ "description": "Y of the drop indicator inside `.items`, or `null` when nothing is dragged over.",
34009
+ "inheritedFrom": {
34010
+ "name": "CbGroupBase",
34011
+ "module": "src/condition-builder/cb-group-base.ts"
34012
+ }
34013
+ },
34014
+ {
34015
+ "kind": "field",
34016
+ "name": "_menuOpen",
34017
+ "type": {
34018
+ "text": "boolean"
34019
+ },
34020
+ "privacy": "private",
34021
+ "default": "false",
34022
+ "description": "Whether the operator menu is open.",
34023
+ "inheritedFrom": {
34024
+ "name": "CbGroupBase",
34025
+ "module": "src/condition-builder/cb-group-base.ts"
34026
+ }
34027
+ },
34028
+ {
34029
+ "kind": "field",
34030
+ "name": "_itemsEl",
34031
+ "type": {
34032
+ "text": "HTMLElement | undefined"
34033
+ },
34034
+ "privacy": "private",
34035
+ "readonly": true,
34036
+ "inheritedFrom": {
34037
+ "name": "CbGroupBase",
34038
+ "module": "src/condition-builder/cb-group-base.ts"
34039
+ }
34040
+ },
34041
+ {
34042
+ "kind": "field",
34043
+ "name": "_connectorEl",
34044
+ "type": {
34045
+ "text": "HTMLElement | undefined"
34046
+ },
34047
+ "privacy": "private",
34048
+ "readonly": true,
34049
+ "inheritedFrom": {
34050
+ "name": "CbGroupBase",
34051
+ "module": "src/condition-builder/cb-group-base.ts"
34052
+ }
34053
+ },
34054
+ {
34055
+ "kind": "field",
34056
+ "name": "_pillEl",
34057
+ "type": {
34058
+ "text": "HTMLElement | undefined"
34059
+ },
34060
+ "privacy": "private",
34061
+ "readonly": true,
34062
+ "inheritedFrom": {
34063
+ "name": "CbGroupBase",
34064
+ "module": "src/condition-builder/cb-group-base.ts"
34065
+ }
34066
+ },
34067
+ {
34068
+ "kind": "field",
34069
+ "name": "_menuEl",
34070
+ "type": {
34071
+ "text": "MenuElement | undefined"
34072
+ },
34073
+ "privacy": "private",
34074
+ "readonly": true,
34075
+ "inheritedFrom": {
34076
+ "name": "CbGroupBase",
34077
+ "module": "src/condition-builder/cb-group-base.ts"
34078
+ }
34079
+ },
34080
+ {
34081
+ "kind": "field",
34082
+ "name": "_menuId",
34083
+ "privacy": "private",
34084
+ "readonly": true,
34085
+ "default": "`cb-operator-menu-${Math.random().toString(36).slice(2, 9)}`",
34086
+ "description": "Id linking the operator pill to its menu.",
34087
+ "inheritedFrom": {
34088
+ "name": "CbGroupBase",
34089
+ "module": "src/condition-builder/cb-group-base.ts"
34090
+ }
34091
+ },
34092
+ {
34093
+ "kind": "field",
34094
+ "name": "_resizeObserver",
34095
+ "privacy": "private",
34096
+ "readonly": true,
34097
+ "default": "new ResizeObserver(() => this._layoutConnector(), )",
34098
+ "description": "Re-measures the bracket when any item changes size.",
34099
+ "inheritedFrom": {
34100
+ "name": "CbGroupBase",
34101
+ "module": "src/condition-builder/cb-group-base.ts"
34102
+ }
34103
+ },
34104
+ {
34105
+ "kind": "field",
34106
+ "name": "_dropIndex",
34107
+ "type": {
34108
+ "text": "number"
34109
+ },
34110
+ "privacy": "private",
34111
+ "default": "-1",
34112
+ "description": "Index the dragged rule would be inserted at, or -1.",
34113
+ "inheritedFrom": {
34114
+ "name": "CbGroupBase",
34115
+ "module": "src/condition-builder/cb-group-base.ts"
34116
+ }
34117
+ },
34118
+ {
34119
+ "kind": "field",
34120
+ "name": "items",
34121
+ "type": {
34122
+ "text": "HTMLElement[]"
34123
+ },
34124
+ "description": "The rules and groups in this group, in order.",
34125
+ "readonly": true,
34126
+ "inheritedFrom": {
34127
+ "name": "CbGroupBase",
34128
+ "module": "src/condition-builder/cb-group-base.ts"
34129
+ }
33544
34130
  },
33545
34131
  {
33546
34132
  "kind": "method",
33547
- "name": "__adjustSlotEndPadding",
33548
- "privacy": "private"
34133
+ "name": "moveRule",
34134
+ "return": {
34135
+ "type": {
34136
+ "text": "boolean"
34137
+ }
34138
+ },
34139
+ "parameters": [
34140
+ {
34141
+ "name": "rule",
34142
+ "type": {
34143
+ "text": "CbRule"
34144
+ }
34145
+ },
34146
+ {
34147
+ "name": "index",
34148
+ "type": {
34149
+ "text": "number"
34150
+ }
34151
+ }
34152
+ ],
34153
+ "description": "Moves `rule` into this group at `index` (counted without the rule itself).\nFires a cancelable `rule-move` event first. Returns whether it moved.",
34154
+ "inheritedFrom": {
34155
+ "name": "CbGroupBase",
34156
+ "module": "src/condition-builder/cb-group-base.ts"
34157
+ }
33549
34158
  },
33550
34159
  {
33551
34160
  "kind": "method",
33552
- "name": "__renderOperatorDivider",
33553
- "privacy": "private"
34161
+ "name": "_onSlotChange",
34162
+ "privacy": "private",
34163
+ "inheritedFrom": {
34164
+ "name": "CbGroupBase",
34165
+ "module": "src/condition-builder/cb-group-base.ts"
34166
+ }
34167
+ },
34168
+ {
34169
+ "kind": "method",
34170
+ "name": "_layoutConnector",
34171
+ "privacy": "private",
34172
+ "description": "Spans the bracket from the first to the last item's first row.",
34173
+ "inheritedFrom": {
34174
+ "name": "CbGroupBase",
34175
+ "module": "src/condition-builder/cb-group-base.ts"
34176
+ }
34177
+ },
34178
+ {
34179
+ "kind": "method",
34180
+ "name": "_onPillClick",
34181
+ "privacy": "private",
34182
+ "parameters": [
34183
+ {
34184
+ "name": "event",
34185
+ "type": {
34186
+ "text": "MouseEvent"
34187
+ }
34188
+ }
34189
+ ],
34190
+ "inheritedFrom": {
34191
+ "name": "CbGroupBase",
34192
+ "module": "src/condition-builder/cb-group-base.ts"
34193
+ }
34194
+ },
34195
+ {
34196
+ "kind": "method",
34197
+ "name": "_onMenuActivate",
34198
+ "privacy": "private",
34199
+ "parameters": [
34200
+ {
34201
+ "name": "event",
34202
+ "type": {
34203
+ "text": "CustomEvent<{ item: { value: string } }>"
34204
+ }
34205
+ }
34206
+ ],
34207
+ "inheritedFrom": {
34208
+ "name": "CbGroupBase",
34209
+ "module": "src/condition-builder/cb-group-base.ts"
34210
+ }
34211
+ },
34212
+ {
34213
+ "kind": "field",
34214
+ "name": "_clearDropIndicator",
34215
+ "privacy": "private",
34216
+ "readonly": true,
34217
+ "inheritedFrom": {
34218
+ "name": "CbGroupBase",
34219
+ "module": "src/condition-builder/cb-group-base.ts"
34220
+ }
34221
+ },
34222
+ {
34223
+ "kind": "method",
34224
+ "name": "_onDragOver",
34225
+ "privacy": "private",
34226
+ "parameters": [
34227
+ {
34228
+ "name": "event",
34229
+ "type": {
34230
+ "text": "DragEvent"
34231
+ }
34232
+ }
34233
+ ],
34234
+ "inheritedFrom": {
34235
+ "name": "CbGroupBase",
34236
+ "module": "src/condition-builder/cb-group-base.ts"
34237
+ }
34238
+ },
34239
+ {
34240
+ "kind": "method",
34241
+ "name": "_onDragLeave",
34242
+ "privacy": "private",
34243
+ "parameters": [
34244
+ {
34245
+ "name": "event",
34246
+ "type": {
34247
+ "text": "DragEvent"
34248
+ }
34249
+ }
34250
+ ],
34251
+ "inheritedFrom": {
34252
+ "name": "CbGroupBase",
34253
+ "module": "src/condition-builder/cb-group-base.ts"
34254
+ }
34255
+ },
34256
+ {
34257
+ "kind": "method",
34258
+ "name": "_onDrop",
34259
+ "privacy": "private",
34260
+ "parameters": [
34261
+ {
34262
+ "name": "event",
34263
+ "type": {
34264
+ "text": "DragEvent"
34265
+ }
34266
+ }
34267
+ ],
34268
+ "inheritedFrom": {
34269
+ "name": "CbGroupBase",
34270
+ "module": "src/condition-builder/cb-group-base.ts"
34271
+ }
34272
+ },
34273
+ {
34274
+ "kind": "method",
34275
+ "name": "_renderConnector",
34276
+ "privacy": "private",
34277
+ "inheritedFrom": {
34278
+ "name": "CbGroupBase",
34279
+ "module": "src/condition-builder/cb-group-base.ts"
34280
+ }
34281
+ },
34282
+ {
34283
+ "kind": "method",
34284
+ "name": "_renderOperatorMenu",
34285
+ "privacy": "private",
34286
+ "inheritedFrom": {
34287
+ "name": "CbGroupBase",
34288
+ "module": "src/condition-builder/cb-group-base.ts"
34289
+ }
33554
34290
  }
33555
34291
  ],
33556
- "attributes": [
34292
+ "events": [
34293
+ {
34294
+ "name": "type",
34295
+ "type": {
34296
+ "text": "CustomEvent"
34297
+ }
34298
+ },
33557
34299
  {
33558
- "name": "condition-operator",
34300
+ "name": "operator-change",
33559
34301
  "type": {
33560
- "text": "'and' | 'or' | undefined"
34302
+ "text": "CustomEvent"
33561
34303
  },
33562
- "description": "The logical operator joining conditions in this group ('and' or 'or').",
33563
- "fieldName": "conditionOperator"
34304
+ "description": "Dispatched when the user picks a different operator, on this or a nested group.",
34305
+ "inheritedFrom": {
34306
+ "name": "CbGroupBase",
34307
+ "module": "src/condition-builder/cb-group-base.ts"
34308
+ }
33564
34309
  },
33565
34310
  {
33566
- "name": "field-name",
33567
34311
  "type": {
33568
- "text": "string"
34312
+ "text": "CustomEvent<{rule: CbRule, from: HTMLElement | null, to: HTMLElement, index: number}>"
33569
34313
  },
33570
- "default": "''",
33571
- "description": "The field name for the compound expression.",
33572
- "fieldName": "fieldName"
34314
+ "description": "Dispatched before a rule is moved. Cancelable: unless prevented, the target group moves the rule.",
34315
+ "name": "rule-move"
33573
34316
  },
33574
34317
  {
33575
- "name": "field-label",
33576
34318
  "type": {
33577
- "text": "string"
34319
+ "text": "CustomEvent<{rule: CbRule, group: HTMLElement | null}>"
33578
34320
  },
33579
- "default": "''",
33580
- "description": "The display label for the field.",
33581
- "fieldName": "fieldLabel"
34321
+ "description": "Dispatched when a rule's remove button is clicked. Cancelable: unless prevented, the rule removes itself.",
34322
+ "name": "rule-remove"
34323
+ },
34324
+ {
34325
+ "type": {
34326
+ "text": "CustomEvent<{group: HTMLElement}>"
34327
+ },
34328
+ "description": "Dispatched when \"Add rule\" (or a nested group's \"Add condition\") is clicked.",
34329
+ "name": "add-rule"
34330
+ },
34331
+ {
34332
+ "type": {
34333
+ "text": "CustomEvent<{group: HTMLElement}>"
34334
+ },
34335
+ "description": "Dispatched when \"Add inner group\" is clicked.",
34336
+ "name": "add-group"
33582
34337
  }
33583
34338
  ],
33584
34339
  "superclass": {
33585
- "name": "LitElement",
33586
- "package": "lit"
34340
+ "name": "CbGroupBase",
34341
+ "module": "/src/condition-builder/cb-group-base.js"
33587
34342
  },
33588
- "tagName": "wc-cb-compound-expression",
34343
+ "tagName": "wc-condition-builder",
33589
34344
  "customElement": true,
33590
- "summary": "A compound expression group in a condition builder that displays a field label, an optional condition operator divider, and slots for child expressions.",
34345
+ "summary": "A query builder for composing filter conditions from rules and nested groups joined by And/Or.",
33591
34346
  "rawTag": {
33592
- "name": "cb-compound-expression",
34347
+ "name": "condition-builder",
33593
34348
  "description": ""
33594
- }
34349
+ },
34350
+ "attributes": [
34351
+ {
34352
+ "name": "operator",
34353
+ "type": {
34354
+ "text": "CbOperator"
34355
+ },
34356
+ "default": "'and'",
34357
+ "description": "The logical operator joining the rules and groups in this group.",
34358
+ "fieldName": "operator",
34359
+ "expandedType": {
34360
+ "text": "'and' | 'or'"
34361
+ },
34362
+ "inheritedFrom": {
34363
+ "name": "CbGroupBase",
34364
+ "module": "src/condition-builder/cb-group-base.ts"
34365
+ }
34366
+ }
34367
+ ]
33595
34368
  }
33596
34369
  ],
33597
34370
  "exports": [
33598
34371
  {
33599
34372
  "kind": "js",
33600
- "name": "CbCompoundExpression",
34373
+ "name": "ConditionBuilder",
33601
34374
  "declaration": {
33602
- "name": "CbCompoundExpression",
33603
- "module": "src/condition-builder/cb-compound-expression.ts"
34375
+ "name": "ConditionBuilder",
34376
+ "module": "src/condition-builder/condition-builder.ts"
33604
34377
  }
33605
34378
  }
33606
34379
  ]
33607
34380
  },
33608
34381
  {
33609
34382
  "kind": "javascript-module",
33610
- "path": "src/condition-builder/cb-expression.ts",
34383
+ "path": "src/condition-builder/cb-group.ts",
33611
34384
  "declarations": [
33612
34385
  {
33613
34386
  "kind": "class",
33614
34387
  "description": "",
33615
- "name": "CbExpression",
34388
+ "name": "CbGroup",
34389
+ "slots": [
34390
+ {
34391
+ "description": "Rules (`wc-cb-rule`) and nested groups.",
34392
+ "name": ""
34393
+ },
34394
+ {
34395
+ "description": "Replaces the default \"Add condition\" link.",
34396
+ "name": "actions"
34397
+ }
34398
+ ],
33616
34399
  "members": [
34400
+ {
34401
+ "kind": "method",
34402
+ "name": "_onAddRuleClick",
34403
+ "privacy": "private"
34404
+ },
34405
+ {
34406
+ "kind": "method",
34407
+ "name": "renderFooter",
34408
+ "privacy": "protected",
34409
+ "return": {
34410
+ "type": {
34411
+ "text": "TemplateResult | typeof nothing"
34412
+ }
34413
+ },
34414
+ "description": "Content placed after the items; each group type renders its own actions.",
34415
+ "inheritedFrom": {
34416
+ "name": "CbGroupBase",
34417
+ "module": "src/condition-builder/cb-group-base.ts"
34418
+ }
34419
+ },
34420
+ {
34421
+ "kind": "method",
34422
+ "name": "_rowCenter",
34423
+ "privacy": "private",
34424
+ "static": true,
34425
+ "return": {
34426
+ "type": {
34427
+ "text": "number"
34428
+ }
34429
+ },
34430
+ "parameters": [
34431
+ {
34432
+ "name": "item",
34433
+ "type": {
34434
+ "text": "Element"
34435
+ }
34436
+ }
34437
+ ],
34438
+ "description": "Viewport Y of the middle of an item's first row, where the bracket meets it.",
34439
+ "inheritedFrom": {
34440
+ "name": "CbGroupBase",
34441
+ "module": "src/condition-builder/cb-group-base.ts"
34442
+ }
34443
+ },
33617
34444
  {
33618
34445
  "kind": "field",
33619
- "name": "operators",
34446
+ "name": "operator",
33620
34447
  "type": {
33621
- "text": "{ label: string; value: string; icon?: string }[]"
34448
+ "text": "CbOperator"
33622
34449
  },
33623
- "default": "[]",
33624
- "description": "The list of operator options to display in the operator select.\nEach item should have at least `label` and `value` properties.",
33625
- "attribute": "operators"
34450
+ "default": "'and'",
34451
+ "description": "The logical operator joining the rules and groups in this group.",
34452
+ "attribute": "operator",
34453
+ "reflects": true,
34454
+ "expandedType": {
34455
+ "text": "'and' | 'or'"
34456
+ },
34457
+ "inheritedFrom": {
34458
+ "name": "CbGroupBase",
34459
+ "module": "src/condition-builder/cb-group-base.ts"
34460
+ }
33626
34461
  },
33627
34462
  {
33628
34463
  "kind": "field",
33629
- "name": "operatorValue",
34464
+ "name": "_itemCount",
33630
34465
  "type": {
33631
- "text": "string"
34466
+ "text": "number"
33632
34467
  },
33633
- "default": "''",
33634
- "description": "The currently selected operator value.",
33635
- "attribute": "operator-value"
34468
+ "privacy": "private",
34469
+ "default": "0",
34470
+ "description": "Number of rules and groups in the default slot.",
34471
+ "inheritedFrom": {
34472
+ "name": "CbGroupBase",
34473
+ "module": "src/condition-builder/cb-group-base.ts"
34474
+ }
34475
+ },
34476
+ {
34477
+ "kind": "field",
34478
+ "name": "_dropIndicatorTop",
34479
+ "type": {
34480
+ "text": "number | null"
34481
+ },
34482
+ "privacy": "private",
34483
+ "default": "null",
34484
+ "description": "Y of the drop indicator inside `.items`, or `null` when nothing is dragged over.",
34485
+ "inheritedFrom": {
34486
+ "name": "CbGroupBase",
34487
+ "module": "src/condition-builder/cb-group-base.ts"
34488
+ }
34489
+ },
34490
+ {
34491
+ "kind": "field",
34492
+ "name": "_menuOpen",
34493
+ "type": {
34494
+ "text": "boolean"
34495
+ },
34496
+ "privacy": "private",
34497
+ "default": "false",
34498
+ "description": "Whether the operator menu is open.",
34499
+ "inheritedFrom": {
34500
+ "name": "CbGroupBase",
34501
+ "module": "src/condition-builder/cb-group-base.ts"
34502
+ }
34503
+ },
34504
+ {
34505
+ "kind": "field",
34506
+ "name": "_itemsEl",
34507
+ "type": {
34508
+ "text": "HTMLElement | undefined"
34509
+ },
34510
+ "privacy": "private",
34511
+ "readonly": true,
34512
+ "inheritedFrom": {
34513
+ "name": "CbGroupBase",
34514
+ "module": "src/condition-builder/cb-group-base.ts"
34515
+ }
34516
+ },
34517
+ {
34518
+ "kind": "field",
34519
+ "name": "_connectorEl",
34520
+ "type": {
34521
+ "text": "HTMLElement | undefined"
34522
+ },
34523
+ "privacy": "private",
34524
+ "readonly": true,
34525
+ "inheritedFrom": {
34526
+ "name": "CbGroupBase",
34527
+ "module": "src/condition-builder/cb-group-base.ts"
34528
+ }
34529
+ },
34530
+ {
34531
+ "kind": "field",
34532
+ "name": "_pillEl",
34533
+ "type": {
34534
+ "text": "HTMLElement | undefined"
34535
+ },
34536
+ "privacy": "private",
34537
+ "readonly": true,
34538
+ "inheritedFrom": {
34539
+ "name": "CbGroupBase",
34540
+ "module": "src/condition-builder/cb-group-base.ts"
34541
+ }
34542
+ },
34543
+ {
34544
+ "kind": "field",
34545
+ "name": "_menuEl",
34546
+ "type": {
34547
+ "text": "MenuElement | undefined"
34548
+ },
34549
+ "privacy": "private",
34550
+ "readonly": true,
34551
+ "inheritedFrom": {
34552
+ "name": "CbGroupBase",
34553
+ "module": "src/condition-builder/cb-group-base.ts"
34554
+ }
34555
+ },
34556
+ {
34557
+ "kind": "field",
34558
+ "name": "_menuId",
34559
+ "privacy": "private",
34560
+ "readonly": true,
34561
+ "default": "`cb-operator-menu-${Math.random().toString(36).slice(2, 9)}`",
34562
+ "description": "Id linking the operator pill to its menu.",
34563
+ "inheritedFrom": {
34564
+ "name": "CbGroupBase",
34565
+ "module": "src/condition-builder/cb-group-base.ts"
34566
+ }
34567
+ },
34568
+ {
34569
+ "kind": "field",
34570
+ "name": "_resizeObserver",
34571
+ "privacy": "private",
34572
+ "readonly": true,
34573
+ "default": "new ResizeObserver(() => this._layoutConnector(), )",
34574
+ "description": "Re-measures the bracket when any item changes size.",
34575
+ "inheritedFrom": {
34576
+ "name": "CbGroupBase",
34577
+ "module": "src/condition-builder/cb-group-base.ts"
34578
+ }
34579
+ },
34580
+ {
34581
+ "kind": "field",
34582
+ "name": "_dropIndex",
34583
+ "type": {
34584
+ "text": "number"
34585
+ },
34586
+ "privacy": "private",
34587
+ "default": "-1",
34588
+ "description": "Index the dragged rule would be inserted at, or -1.",
34589
+ "inheritedFrom": {
34590
+ "name": "CbGroupBase",
34591
+ "module": "src/condition-builder/cb-group-base.ts"
34592
+ }
34593
+ },
34594
+ {
34595
+ "kind": "field",
34596
+ "name": "items",
34597
+ "type": {
34598
+ "text": "HTMLElement[]"
34599
+ },
34600
+ "description": "The rules and groups in this group, in order.",
34601
+ "readonly": true,
34602
+ "inheritedFrom": {
34603
+ "name": "CbGroupBase",
34604
+ "module": "src/condition-builder/cb-group-base.ts"
34605
+ }
34606
+ },
34607
+ {
34608
+ "kind": "method",
34609
+ "name": "moveRule",
34610
+ "return": {
34611
+ "type": {
34612
+ "text": "boolean"
34613
+ }
34614
+ },
34615
+ "parameters": [
34616
+ {
34617
+ "name": "rule",
34618
+ "type": {
34619
+ "text": "CbRule"
34620
+ }
34621
+ },
34622
+ {
34623
+ "name": "index",
34624
+ "type": {
34625
+ "text": "number"
34626
+ }
34627
+ }
34628
+ ],
34629
+ "description": "Moves `rule` into this group at `index` (counted without the rule itself).\nFires a cancelable `rule-move` event first. Returns whether it moved.",
34630
+ "inheritedFrom": {
34631
+ "name": "CbGroupBase",
34632
+ "module": "src/condition-builder/cb-group-base.ts"
34633
+ }
34634
+ },
34635
+ {
34636
+ "kind": "method",
34637
+ "name": "_onSlotChange",
34638
+ "privacy": "private",
34639
+ "inheritedFrom": {
34640
+ "name": "CbGroupBase",
34641
+ "module": "src/condition-builder/cb-group-base.ts"
34642
+ }
34643
+ },
34644
+ {
34645
+ "kind": "method",
34646
+ "name": "_layoutConnector",
34647
+ "privacy": "private",
34648
+ "description": "Spans the bracket from the first to the last item's first row.",
34649
+ "inheritedFrom": {
34650
+ "name": "CbGroupBase",
34651
+ "module": "src/condition-builder/cb-group-base.ts"
34652
+ }
34653
+ },
34654
+ {
34655
+ "kind": "method",
34656
+ "name": "_onPillClick",
34657
+ "privacy": "private",
34658
+ "parameters": [
34659
+ {
34660
+ "name": "event",
34661
+ "type": {
34662
+ "text": "MouseEvent"
34663
+ }
34664
+ }
34665
+ ],
34666
+ "inheritedFrom": {
34667
+ "name": "CbGroupBase",
34668
+ "module": "src/condition-builder/cb-group-base.ts"
34669
+ }
34670
+ },
34671
+ {
34672
+ "kind": "method",
34673
+ "name": "_onMenuActivate",
34674
+ "privacy": "private",
34675
+ "parameters": [
34676
+ {
34677
+ "name": "event",
34678
+ "type": {
34679
+ "text": "CustomEvent<{ item: { value: string } }>"
34680
+ }
34681
+ }
34682
+ ],
34683
+ "inheritedFrom": {
34684
+ "name": "CbGroupBase",
34685
+ "module": "src/condition-builder/cb-group-base.ts"
34686
+ }
34687
+ },
34688
+ {
34689
+ "kind": "field",
34690
+ "name": "_clearDropIndicator",
34691
+ "privacy": "private",
34692
+ "readonly": true,
34693
+ "inheritedFrom": {
34694
+ "name": "CbGroupBase",
34695
+ "module": "src/condition-builder/cb-group-base.ts"
34696
+ }
34697
+ },
34698
+ {
34699
+ "kind": "method",
34700
+ "name": "_onDragOver",
34701
+ "privacy": "private",
34702
+ "parameters": [
34703
+ {
34704
+ "name": "event",
34705
+ "type": {
34706
+ "text": "DragEvent"
34707
+ }
34708
+ }
34709
+ ],
34710
+ "inheritedFrom": {
34711
+ "name": "CbGroupBase",
34712
+ "module": "src/condition-builder/cb-group-base.ts"
34713
+ }
34714
+ },
34715
+ {
34716
+ "kind": "method",
34717
+ "name": "_onDragLeave",
34718
+ "privacy": "private",
34719
+ "parameters": [
34720
+ {
34721
+ "name": "event",
34722
+ "type": {
34723
+ "text": "DragEvent"
34724
+ }
34725
+ }
34726
+ ],
34727
+ "inheritedFrom": {
34728
+ "name": "CbGroupBase",
34729
+ "module": "src/condition-builder/cb-group-base.ts"
34730
+ }
34731
+ },
34732
+ {
34733
+ "kind": "method",
34734
+ "name": "_onDrop",
34735
+ "privacy": "private",
34736
+ "parameters": [
34737
+ {
34738
+ "name": "event",
34739
+ "type": {
34740
+ "text": "DragEvent"
34741
+ }
34742
+ }
34743
+ ],
34744
+ "inheritedFrom": {
34745
+ "name": "CbGroupBase",
34746
+ "module": "src/condition-builder/cb-group-base.ts"
34747
+ }
34748
+ },
34749
+ {
34750
+ "kind": "method",
34751
+ "name": "_renderConnector",
34752
+ "privacy": "private",
34753
+ "inheritedFrom": {
34754
+ "name": "CbGroupBase",
34755
+ "module": "src/condition-builder/cb-group-base.ts"
34756
+ }
34757
+ },
34758
+ {
34759
+ "kind": "method",
34760
+ "name": "_renderOperatorMenu",
34761
+ "privacy": "private",
34762
+ "inheritedFrom": {
34763
+ "name": "CbGroupBase",
34764
+ "module": "src/condition-builder/cb-group-base.ts"
34765
+ }
33636
34766
  }
33637
34767
  ],
33638
- "attributes": [
34768
+ "events": [
33639
34769
  {
33640
- "name": "operators",
34770
+ "name": "add-rule",
33641
34771
  "type": {
33642
- "text": "{ label: string; value: string; icon?: string }[]"
34772
+ "text": "CustomEvent<{group: HTMLElement}>"
33643
34773
  },
33644
- "default": "[]",
33645
- "description": "The list of operator options to display in the operator select.\nEach item should have at least `label` and `value` properties.",
33646
- "fieldName": "operators"
34774
+ "description": "Dispatched when the default \"Add condition\" link is clicked."
33647
34775
  },
33648
34776
  {
33649
- "name": "operator-value",
34777
+ "name": "operator-change",
33650
34778
  "type": {
33651
- "text": "string"
34779
+ "text": "CustomEvent"
33652
34780
  },
33653
- "default": "''",
33654
- "description": "The currently selected operator value.",
33655
- "fieldName": "operatorValue"
34781
+ "description": "Dispatched when the user picks a different operator.",
34782
+ "inheritedFrom": {
34783
+ "name": "CbGroupBase",
34784
+ "module": "src/condition-builder/cb-group-base.ts"
34785
+ }
34786
+ },
34787
+ {
34788
+ "type": {
34789
+ "text": "CustomEvent<{rule: CbRule, from: HTMLElement | null, to: HTMLElement, index: number}>"
34790
+ },
34791
+ "description": "Dispatched before a rule is moved into this group. Cancelable: unless prevented, the group moves the rule.",
34792
+ "name": "rule-move"
33656
34793
  }
33657
34794
  ],
33658
34795
  "superclass": {
33659
- "name": "LitElement",
33660
- "package": "lit"
34796
+ "name": "CbGroupBase",
34797
+ "module": "/src/condition-builder/cb-group-base.js"
33661
34798
  },
33662
- "tagName": "wc-cb-expression",
34799
+ "tagName": "wc-cb-group",
33663
34800
  "customElement": true,
33664
- "summary": "An expression row within a condition builder, containing an operator select and a slot for value inputs.",
34801
+ "summary": "A bordered, nested group of rules in a condition builder, joined by its own And/Or operator.",
33665
34802
  "rawTag": {
33666
- "name": "cb-expression",
34803
+ "name": "cb-group",
33667
34804
  "description": ""
33668
- }
34805
+ },
34806
+ "attributes": [
34807
+ {
34808
+ "name": "operator",
34809
+ "type": {
34810
+ "text": "CbOperator"
34811
+ },
34812
+ "default": "'and'",
34813
+ "description": "The logical operator joining the rules and groups in this group.",
34814
+ "fieldName": "operator",
34815
+ "expandedType": {
34816
+ "text": "'and' | 'or'"
34817
+ },
34818
+ "inheritedFrom": {
34819
+ "name": "CbGroupBase",
34820
+ "module": "src/condition-builder/cb-group-base.ts"
34821
+ }
34822
+ }
34823
+ ]
33669
34824
  }
33670
34825
  ],
33671
34826
  "exports": [
33672
34827
  {
33673
34828
  "kind": "js",
33674
- "name": "CbExpression",
34829
+ "name": "CbGroup",
33675
34830
  "declaration": {
33676
- "name": "CbExpression",
33677
- "module": "src/condition-builder/cb-expression.ts"
34831
+ "name": "CbGroup",
34832
+ "module": "src/condition-builder/cb-group.ts"
33678
34833
  }
33679
34834
  }
33680
34835
  ]
@@ -33687,6 +34842,16 @@
33687
34842
  "kind": "class",
33688
34843
  "description": "",
33689
34844
  "name": "CbDivider",
34845
+ "cssProperties": [
34846
+ {
34847
+ "description": "Color of the divider line.",
34848
+ "name": "--cb-divider-line-color"
34849
+ },
34850
+ {
34851
+ "description": "Length of the connecting arms drawn by `connect-start` and `connect-end`.",
34852
+ "name": "--cb-divider-arm-length"
34853
+ }
34854
+ ],
33690
34855
  "members": [
33691
34856
  {
33692
34857
  "kind": "field",
@@ -33757,7 +34922,7 @@
33757
34922
  },
33758
34923
  "tagName": "wc-cb-divider",
33759
34924
  "customElement": true,
33760
- "summary": "A divider line used within a condition builder to visually connect expressions with operator tags.",
34925
+ "summary": "A divider line used within a condition builder to visually connect rules with an operator.",
33761
34926
  "rawTag": {
33762
34927
  "name": "cb-divider",
33763
34928
  "description": ""
@@ -33790,34 +34955,50 @@
33790
34955
  },
33791
34956
  {
33792
34957
  "kind": "js",
33793
- "name": "CbPredicate",
34958
+ "name": "CbGroup",
34959
+ "declaration": {
34960
+ "name": "CbGroup",
34961
+ "module": "./cb-group.js"
34962
+ }
34963
+ },
34964
+ {
34965
+ "kind": "js",
34966
+ "name": "CbRule",
33794
34967
  "declaration": {
33795
- "name": "CbPredicate",
33796
- "module": "./cb-predicate.js"
34968
+ "name": "CbRule",
34969
+ "module": "./cb-rule.js"
33797
34970
  }
33798
34971
  },
33799
34972
  {
33800
34973
  "kind": "js",
33801
- "name": "CbCompoundExpression",
34974
+ "name": "CbDivider",
33802
34975
  "declaration": {
33803
- "name": "CbCompoundExpression",
33804
- "module": "./cb-compound-expression.js"
34976
+ "name": "CbDivider",
34977
+ "module": "./cb-divider.js"
33805
34978
  }
33806
34979
  },
33807
34980
  {
33808
34981
  "kind": "js",
33809
- "name": "CbExpression",
34982
+ "name": "CbOperator",
33810
34983
  "declaration": {
33811
- "name": "CbExpression",
33812
- "module": "./cb-expression.js"
34984
+ "name": "CbOperator",
34985
+ "module": "./cb-types.js"
33813
34986
  }
33814
34987
  },
33815
34988
  {
33816
34989
  "kind": "js",
33817
- "name": "CbDivider",
34990
+ "name": "CbRuleMoveDetail",
33818
34991
  "declaration": {
33819
- "name": "CbDivider",
33820
- "module": "./cb-divider.js"
34992
+ "name": "CbRuleMoveDetail",
34993
+ "module": "./cb-types.js"
34994
+ }
34995
+ },
34996
+ {
34997
+ "kind": "js",
34998
+ "name": "CbRuleRemoveDetail",
34999
+ "declaration": {
35000
+ "name": "CbRuleRemoveDetail",
35001
+ "module": "./cb-types.js"
33821
35002
  }
33822
35003
  }
33823
35004
  ]
@@ -34669,33 +35850,49 @@
34669
35850
  },
34670
35851
  {
34671
35852
  "kind": "js",
34672
- "name": "CbPredicate",
35853
+ "name": "CbGroup",
34673
35854
  "declaration": {
34674
- "name": "CbPredicate",
35855
+ "name": "CbGroup",
34675
35856
  "module": "./condition-builder/index.js"
34676
35857
  }
34677
35858
  },
34678
35859
  {
34679
35860
  "kind": "js",
34680
- "name": "CbCompoundExpression",
35861
+ "name": "CbRule",
34681
35862
  "declaration": {
34682
- "name": "CbCompoundExpression",
35863
+ "name": "CbRule",
34683
35864
  "module": "./condition-builder/index.js"
34684
35865
  }
34685
35866
  },
34686
35867
  {
34687
35868
  "kind": "js",
34688
- "name": "CbExpression",
35869
+ "name": "CbDivider",
34689
35870
  "declaration": {
34690
- "name": "CbExpression",
35871
+ "name": "CbDivider",
34691
35872
  "module": "./condition-builder/index.js"
34692
35873
  }
34693
35874
  },
34694
35875
  {
34695
35876
  "kind": "js",
34696
- "name": "CbDivider",
35877
+ "name": "CbOperator",
34697
35878
  "declaration": {
34698
- "name": "CbDivider",
35879
+ "name": "CbOperator",
35880
+ "module": "./condition-builder/index.js"
35881
+ }
35882
+ },
35883
+ {
35884
+ "kind": "js",
35885
+ "name": "CbRuleMoveDetail",
35886
+ "declaration": {
35887
+ "name": "CbRuleMoveDetail",
35888
+ "module": "./condition-builder/index.js"
35889
+ }
35890
+ },
35891
+ {
35892
+ "kind": "js",
35893
+ "name": "CbRuleRemoveDetail",
35894
+ "declaration": {
35895
+ "name": "CbRuleRemoveDetail",
34699
35896
  "module": "./condition-builder/index.js"
34700
35897
  }
34701
35898
  }