@limetech/lime-crm-building-blocks 2.3.1 → 2.4.1
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/CHANGELOG.md +20 -0
- package/dist/cjs/{condition-tree-translate-B_qIQz9s.js → condition-tree-translate-BQwKtiNZ.js} +1 -1
- package/dist/cjs/{filter-group-logic-Bt5tIbfP.js → filter-group-logic-CeGmYgsu.js} +1 -1
- package/dist/cjs/{filter-operators-CzIq9qKC.js → filter-operators-C3T2czC_.js} +1 -1
- package/dist/cjs/{index-mDIvByXc.js → index-Du4GyM0Y.js} +13 -8
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{index.esm-D1EzGa8X.js → index.esm-C2zw0QJK.js} +2 -2
- package/dist/cjs/lime-crm-building-blocks.cjs.js +3 -3
- package/dist/cjs/{lime-query-validation-Df4GZRGm.js → lime-query-validation-CzYkphmi.js} +1 -1
- package/dist/cjs/limebb-alert-dialog.cjs.entry.js +1 -1
- package/dist/cjs/limebb-browser.cjs.entry.js +2 -2
- package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +2 -2
- package/dist/cjs/limebb-chat-list.cjs.entry.js +2 -2
- package/dist/cjs/limebb-color-palette-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +1 -1
- package/dist/cjs/limebb-component-config.cjs.entry.js +3 -3
- package/dist/cjs/limebb-component-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/limebb-condition-tree-editor.cjs.entry.js +24 -9
- package/dist/cjs/limebb-condition-tree.cjs.entry.js +121 -34
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
- package/dist/cjs/limebb-data-cells.cjs.entry.js +2 -2
- package/dist/cjs/limebb-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
- package/dist/cjs/limebb-document-chips.cjs.entry.js +1 -1
- package/dist/cjs/limebb-document-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-feed.cjs.entry.js +2 -2
- package/dist/cjs/limebb-filter-chip_6.cjs.entry.js +4 -4
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +3 -3
- package/dist/cjs/limebb-inline-image.cjs.entry.js +2 -2
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +2 -2
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +4 -4
- package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +1 -1
- package/dist/cjs/limebb-loader.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-list.cjs.entry.js +2 -2
- package/dist/cjs/limebb-object-chip.cjs.entry.js +3 -3
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-property-selector.cjs.entry.js +3 -3
- package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +2 -2
- package/dist/cjs/limebb-rule-condition-chip.cjs.entry.js +71 -0
- package/dist/cjs/limebb-rule-condition-editor-CHWTMOmi.js +285 -0
- package/dist/cjs/limebb-rule-condition-editor.cjs.entry.js +9 -0
- package/dist/cjs/limebb-rule-editor.cjs.entry.js +217 -573
- package/dist/cjs/limebb-rule-gate.cjs.entry.js +3 -3
- package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-text-editor.cjs.entry.js +3 -3
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +2 -2
- package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +3 -3
- package/dist/cjs/{limetype-BPuuRLtH.js → limetype-BzVDjAKS.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{web-component-template-DRMW9wHN.js → web-component-template-C-AkY5as.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/condition-tree/condition-tree-editor/condition-tree-editor.js +46 -5
- package/dist/collection/components/condition-tree/condition-tree-nodes.js +13 -6
- package/dist/collection/components/condition-tree/condition-tree.js +69 -18
- package/dist/collection/components/condition-tree/group-node-view.js +41 -5
- package/dist/collection/components/condition-tree/leaf-node-view.js +19 -2
- package/dist/collection/components/rule-editor/condition-tree-adapter.js +229 -0
- package/dist/collection/components/rule-editor/rule-condition-chip/rule-condition-chip.css +4 -0
- package/dist/collection/components/rule-editor/rule-condition-chip/rule-condition-chip.js +322 -0
- package/dist/collection/components/rule-editor/rule-condition-editor/rule-condition-editor.css +5 -0
- package/dist/collection/components/rule-editor/rule-condition-editor/rule-condition-editor.js +259 -0
- package/dist/collection/components/rule-editor/rule-editor.css +1 -73
- package/dist/collection/components/rule-editor/rule-editor.js +143 -153
- package/dist/collection/components/rule-editor/rule-issues.js +89 -0
- package/dist/collection/components/rule-editor/view-helpers.js +19 -41
- package/dist/collection/components/rule-gate/rule-gate.css +3 -3
- package/dist/components/condition-tree-adapter.js +1 -0
- package/dist/components/condition-tree-editor.js +1 -1
- package/dist/components/condition-tree.js +1 -0
- package/dist/components/limebb-condition-tree.js +1 -1
- package/dist/components/limebb-rule-condition-chip.d.ts +11 -0
- package/dist/components/limebb-rule-condition-chip.js +1 -0
- package/dist/components/limebb-rule-condition-editor.d.ts +11 -0
- package/dist/components/limebb-rule-condition-editor.js +1 -0
- package/dist/components/limebb-rule-editor.js +1 -1
- package/dist/components/limebb-rule-gate.js +1 -1
- package/dist/esm/{condition-tree-translate-CBeXbZ_z.js → condition-tree-translate-ZQptbaXF.js} +1 -1
- package/dist/esm/{filter-group-logic-CzThKf85.js → filter-group-logic-nqCMmV0e.js} +1 -1
- package/dist/esm/{filter-operators-u3T1PKhm.js → filter-operators-QbKK26m2.js} +1 -1
- package/dist/esm/{index-COtSgrC5.js → index-BK566_jX.js} +13 -8
- package/dist/esm/{index.esm-B9D_MXA6.js → index.esm-C__n3hug.js} +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/lime-crm-building-blocks.js +4 -4
- package/dist/esm/{lime-query-validation-dGoN_93p.js → lime-query-validation-BvB2v-yP.js} +1 -1
- package/dist/esm/limebb-alert-dialog.entry.js +1 -1
- package/dist/esm/limebb-browser.entry.js +2 -2
- package/dist/esm/limebb-chat-icon-list_3.entry.js +2 -2
- package/dist/esm/limebb-chat-list.entry.js +2 -2
- package/dist/esm/limebb-color-palette-picker.entry.js +1 -1
- package/dist/esm/limebb-color-palette-swatches.entry.js +1 -1
- package/dist/esm/limebb-component-config.entry.js +3 -3
- package/dist/esm/limebb-component-picker.entry.js +2 -2
- package/dist/esm/limebb-composer-toolbar.entry.js +2 -2
- package/dist/esm/limebb-condition-tree-editor.entry.js +24 -9
- package/dist/esm/limebb-condition-tree.entry.js +121 -34
- package/dist/esm/limebb-currency-picker.entry.js +2 -2
- package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
- package/dist/esm/limebb-data-cells.entry.js +2 -2
- package/dist/esm/limebb-date-picker.entry.js +2 -2
- package/dist/esm/limebb-date-range.entry.js +1 -1
- package/dist/esm/limebb-document-chips.entry.js +1 -1
- package/dist/esm/limebb-document-item.entry.js +1 -1
- package/dist/esm/limebb-document-picker.entry.js +1 -1
- package/dist/esm/limebb-empty-state.entry.js +1 -1
- package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +2 -2
- package/dist/esm/limebb-feed.entry.js +2 -2
- package/dist/esm/limebb-filter-chip_6.entry.js +4 -4
- package/dist/esm/limebb-icon-picker.entry.js +1 -1
- package/dist/esm/limebb-info-tile-currency-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-date-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-decimal-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-relative-date-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-unit-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +3 -3
- package/dist/esm/limebb-inline-image.entry.js +2 -2
- package/dist/esm/limebb-kanban-group.entry.js +2 -2
- package/dist/esm/limebb-kanban-item.entry.js +2 -2
- package/dist/esm/limebb-kanban.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +3 -3
- package/dist/esm/limebb-lime-query-filter-builder.entry.js +3 -3
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +4 -4
- package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +3 -3
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +3 -3
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
- package/dist/esm/limebb-live-docs-info.entry.js +1 -1
- package/dist/esm/limebb-loader.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +2 -2
- package/dist/esm/limebb-mention-group-counter.entry.js +1 -1
- package/dist/esm/limebb-mention.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +1 -1
- package/dist/esm/limebb-notification-item.entry.js +2 -2
- package/dist/esm/limebb-notification-list.entry.js +2 -2
- package/dist/esm/limebb-object-chip.entry.js +3 -3
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-property-selector.entry.js +3 -3
- package/dist/esm/limebb-rule-arg-filter-editor.entry.js +2 -2
- package/dist/esm/limebb-rule-condition-chip.entry.js +69 -0
- package/dist/esm/limebb-rule-condition-editor-DeY758N-.js +281 -0
- package/dist/esm/limebb-rule-condition-editor.entry.js +3 -0
- package/dist/esm/limebb-rule-editor.entry.js +217 -573
- package/dist/esm/limebb-rule-gate.entry.js +3 -3
- package/dist/esm/limebb-text-editor-picker.entry.js +1 -1
- package/dist/esm/limebb-text-editor.entry.js +3 -3
- package/dist/esm/limebb-trend-indicator.entry.js +2 -2
- package/dist/esm/limebb-value-comparison-editor.entry.js +3 -3
- package/dist/esm/{limetype-BcELY1NF.js → limetype-Muf9VutX.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{web-component-template-DxbwHsvw.js → web-component-template-D1JpeNy_.js} +1 -1
- package/dist/lime-crm-building-blocks/index.esm.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-0621e884.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-ab0f8170.entry.js → p-087d5651.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ce2755a0.entry.js → p-1917956c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-07a9c8f2.entry.js → p-1ae4962d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-021e452a.entry.js → p-23d2632b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ffca266e.entry.js → p-251784bf.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-635a45ad.entry.js → p-27240bb0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-2adeac66.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-6a8422d2.entry.js → p-32339f09.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1990e369.entry.js → p-3446290c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d495cc19.entry.js → p-35d9b3ad.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-eed0b2c2.entry.js → p-3865eec4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-dacf9e77.entry.js → p-394b521a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8c36b847.entry.js → p-39a36450.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-97e75dee.entry.js → p-3b672249.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ad5dcefd.entry.js → p-47b56a75.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-402a9c97.entry.js → p-4af3ea2c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0cc47cad.entry.js → p-4bdaf436.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-cf66256a.entry.js → p-4f60b7bc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-90f0c96b.entry.js → p-4fd9d615.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-28550961.entry.js → p-53b44865.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7ae27308.entry.js → p-550606f6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-573f9e95.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-a5f3913d.entry.js → p-5c541d0c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ce723c21.entry.js → p-612c6b28.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6f923112.entry.js → p-621ab65a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-5f682c06.entry.js → p-627b0c79.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-49d042aa.entry.js → p-6303201b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8e9fcf3c.entry.js → p-6bd61290.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-dcb49a62.entry.js → p-6d2dba20.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0193ed83.entry.js → p-6e2553b4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-Cz5s8qGk.js → p-7DQ7qvMa.js} +1 -1
- package/dist/lime-crm-building-blocks/p-7c3d3e06.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-dd02821e.entry.js → p-7d53756b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-79d743bb.entry.js → p-895c8966.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-da35bcc7.entry.js → p-8c0455e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-a201df35.entry.js → p-8f80d024.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-32a81271.entry.js → p-949ed056.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-cf03a756.entry.js → p-985ae787.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-9959019d.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-DLec4QaM.js → p-B7whyaAL.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-COtSgrC5.js → p-BK566_jX.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ClYOFrOo.js +1 -0
- package/dist/lime-crm-building-blocks/{p-DVypQWZ4.js → p-Cve-3L4y.js} +1 -1
- package/dist/lime-crm-building-blocks/p-DOULPRTn.js +1 -0
- package/dist/lime-crm-building-blocks/{p-Cj_3f9vm.js → p-DhGRAeCH.js} +1 -1
- package/dist/lime-crm-building-blocks/p-DjoMDjMo.js +1 -0
- package/dist/lime-crm-building-blocks/p-DuWEcQ7n.js +1 -0
- package/dist/lime-crm-building-blocks/{p-dfaef740.entry.js → p-a1052482.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3babfbe0.entry.js → p-a14bed52.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-cc53a8ca.entry.js → p-a2e291b4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8a17a7ea.entry.js → p-a2ebd5a4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0cbe2180.entry.js → p-a4556649.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f5c1ed0c.entry.js → p-a598f92f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b44b9dbc.entry.js → p-a938384f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f3539042.entry.js → p-ab0210b2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c0d49532.entry.js → p-b272730c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0370200d.entry.js → p-b4571d32.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-551a36f6.entry.js → p-b72c748b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0ed9a7cc.entry.js → p-bac9d3a9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-bd6c12bc.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-81783bd4.entry.js → p-bf693702.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e6cc320a.entry.js → p-c58067ec.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-08797129.entry.js → p-c7bfa2e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-a953d48e.entry.js → p-d4635a39.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d3c58bc1.entry.js → p-d6099dc7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-bf05d9de.entry.js → p-d6c7cf0f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1ebe45b8.entry.js → p-da79c5fc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-e18a2cef.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-f9991c35.entry.js → p-e19f4b3b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-46aec244.entry.js → p-eb95767a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ddc4ede8.entry.js → p-ec9b5e30.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-95ba7a84.entry.js → p-f49250f3.entry.js} +1 -1
- package/dist/types/components/condition-tree/condition-tree-editor/condition-tree-editor.d.ts +20 -3
- package/dist/types/components/condition-tree/condition-tree-nodes.d.ts +11 -4
- package/dist/types/components/condition-tree/condition-tree-view-context.d.ts +3 -2
- package/dist/types/components/condition-tree/condition-tree.d.ts +41 -8
- package/dist/types/components/condition-tree/condition-tree.types.d.ts +21 -2
- package/dist/types/components/rule-editor/condition-tree-adapter.d.ts +67 -0
- package/dist/types/components/rule-editor/rule-condition-chip/rule-condition-chip.d.ts +82 -0
- package/dist/types/components/rule-editor/rule-condition-editor/rule-condition-editor.d.ts +61 -0
- package/dist/types/components/rule-editor/rule-editor.d.ts +105 -47
- package/dist/types/components/rule-editor/rule-issues.d.ts +12 -0
- package/dist/types/components/rule-editor/view-helpers.d.ts +16 -35
- package/dist/types/components.d.ts +304 -79
- package/dist/types/stencil-public-runtime.d.ts +61 -55
- package/package.json +4 -4
- package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +0 -82
- package/dist/collection/components/rule-editor/chip-picker-view.js +0 -148
- package/dist/collection/components/rule-editor/group-node-view.js +0 -79
- package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.css +0 -36
- package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +0 -344
- package/dist/collection/components/rule-editor/rule-editor-views.js +0 -43
- package/dist/collection/components/rule-editor/rule-operations.js +0 -145
- package/dist/components/limebb-rule-chip-popover.d.ts +0 -11
- package/dist/components/limebb-rule-chip-popover.js +0 -1
- package/dist/components/rule-chip-popover.js +0 -1
- package/dist/esm/limebb-rule-chip-popover.entry.js +0 -80
- package/dist/lime-crm-building-blocks/p-1578c8f0.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-229d018c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6331f9c5.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-705c53c0.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-84ad9159.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-BxCq236x.js +0 -1
- package/dist/lime-crm-building-blocks/p-Css8537O.js +0 -1
- package/dist/lime-crm-building-blocks/p-a58c9e1e.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-hsyotUav.js +0 -1
- package/dist/types/components/rule-editor/chip-picker-view.d.ts +0 -35
- package/dist/types/components/rule-editor/group-node-view.d.ts +0 -11
- package/dist/types/components/rule-editor/rule-chip-popover/rule-chip-popover.d.ts +0 -43
- package/dist/types/components/rule-editor/rule-editor-views.d.ts +0 -58
- package/dist/types/components/rule-editor/rule-operations.d.ts +0 -70
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { appendChild, issuesAt, wrapNegated, } from "./rule-operations";
|
|
3
|
-
import { IssuesView, RuleNodeView, } from "./rule-editor-views";
|
|
4
|
-
import { nodeClasses } from "./view-helpers";
|
|
5
|
-
import { extractRef, GroupChipsView } from "./chip-picker-view";
|
|
6
|
-
export const GroupNodeView = ({ node, path, isNegated, ctx }) => {
|
|
7
|
-
const groupBasePath = isNegated ? [...path, 'rule'] : path;
|
|
8
|
-
const issuesHere = isNegated
|
|
9
|
-
? [
|
|
10
|
-
...issuesAt(ctx.issues, path),
|
|
11
|
-
...issuesAt(ctx.issues, groupBasePath),
|
|
12
|
-
]
|
|
13
|
-
: issuesAt(ctx.issues, path);
|
|
14
|
-
const chipChildren = [];
|
|
15
|
-
const nestedGroups = [];
|
|
16
|
-
for (const [index, child] of node.rules.entries()) {
|
|
17
|
-
const extracted = extractRef(child);
|
|
18
|
-
if (extracted) {
|
|
19
|
-
chipChildren.push(Object.assign(Object.assign({}, extracted), { index }));
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
nestedGroups.push({ child, index });
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
const options = combinatorOptions(ctx);
|
|
26
|
-
const selectedCombinator = options.find((option) => option.value === node.type);
|
|
27
|
-
return (h("div", { class: nodeClasses(node.type, issuesHere), key: pathKey(path) }, h("div", { class: "rule-node__header" }, h("limel-select", { class: "rule-node__combinator-select", value: selectedCombinator, options: options, disabled: !ctx.isMutable, onChange: combinatorChangeHandler(node, path, isNegated, ctx) }), renderMutableGroupActions(node, path, isNegated, ctx)), h("div", { class: "rule-node__body" }, h(IssuesView, { issues: issuesHere }), h(GroupChipsView, { groupNode: node, groupPath: groupBasePath, chipChildren: chipChildren, ctx: ctx }), renderNestedGroups(nestedGroups, groupBasePath, ctx), renderAddGroupFooter(node, path, isNegated, ctx))));
|
|
28
|
-
};
|
|
29
|
-
function pathKey(path) {
|
|
30
|
-
return path.length === 0 ? 'root' : path.join('/');
|
|
31
|
-
}
|
|
32
|
-
function combinatorOptions(ctx) {
|
|
33
|
-
return [
|
|
34
|
-
{
|
|
35
|
-
value: 'all',
|
|
36
|
-
text: ctx.translator.get('webclient.combinator.all'),
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
value: 'any',
|
|
40
|
-
text: ctx.translator.get('webclient.combinator.any'),
|
|
41
|
-
},
|
|
42
|
-
];
|
|
43
|
-
}
|
|
44
|
-
function renderMutableGroupActions(node, path, isNegated, ctx) {
|
|
45
|
-
if (!ctx.isMutable) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return (h("div", { class: "rule-node__header-actions" }, h("limel-switch", { class: "rule-node__negate-switch", label: ctx.translator.get('webclient.negate'), value: isNegated, onChange: negateGroupHandler(node, path, ctx) }), h("limel-icon-button", { icon: "trash", label: ctx.translator.get('webclient.rule-editor.delete'), onClick: () => ctx.onDelete(path) })));
|
|
49
|
-
}
|
|
50
|
-
function renderNestedGroups(nestedGroups, groupBasePath, ctx) {
|
|
51
|
-
if (nestedGroups.length === 0) {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
return (h("div", { class: "rule-node__children" }, nestedGroups.map((entry) => (h(RuleNodeView, { node: entry.child, path: [...groupBasePath, 'rules', entry.index], ctx: ctx })))));
|
|
55
|
-
}
|
|
56
|
-
function renderAddGroupFooter(node, path, isNegated, ctx) {
|
|
57
|
-
if (!ctx.isMutable) {
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
return (h("div", { class: "rule-node__footer" }, h("limel-button", { icon: "add", label: ctx.translator.get('webclient.rule-editor.add-nested-group'), onClick: addGroupHandler(node, path, isNegated, ctx) })));
|
|
61
|
-
}
|
|
62
|
-
function replaceGroup(nextGroup, path, isNegated, ctx) {
|
|
63
|
-
ctx.onReplaceNode(path, wrapNegated(nextGroup, isNegated));
|
|
64
|
-
}
|
|
65
|
-
const combinatorChangeHandler = (node, path, isNegated, ctx) => (event) => {
|
|
66
|
-
event.stopPropagation();
|
|
67
|
-
const newType = event.detail.value;
|
|
68
|
-
if (newType !== node.type) {
|
|
69
|
-
replaceGroup(Object.assign(Object.assign({}, node), { type: newType }), path, isNegated, ctx);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const addGroupHandler = (node, path, isNegated, ctx) => () => {
|
|
73
|
-
const expanded = appendChild(node, { type: 'all', rules: [] });
|
|
74
|
-
replaceGroup(expanded, path, isNegated, ctx);
|
|
75
|
-
};
|
|
76
|
-
const negateGroupHandler = (node, path, ctx) => (event) => {
|
|
77
|
-
event.stopPropagation();
|
|
78
|
-
ctx.onReplaceNode(path, wrapNegated(node, event.detail));
|
|
79
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
:host {
|
|
2
|
-
display: block;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.popover {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
min-width: 24rem;
|
|
9
|
-
background-color: rgb(var(--contrast-100));
|
|
10
|
-
border: 1px solid rgb(var(--contrast-700));
|
|
11
|
-
border-radius: 0.5rem;
|
|
12
|
-
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.popover__header {
|
|
17
|
-
--header-background-color: rgba(var(--contrast-300));
|
|
18
|
-
padding-right: 0.5rem;
|
|
19
|
-
gap: 1rem;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.popover__header-actions {
|
|
23
|
-
display: grid;
|
|
24
|
-
grid-auto-flow: column;
|
|
25
|
-
grid-gap: 0.75rem;
|
|
26
|
-
padding: 0.25rem;
|
|
27
|
-
align-items: center;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.popover__delete-button {
|
|
31
|
-
color: rgb(var(--contrast-1100));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.popover__body {
|
|
35
|
-
padding: 1rem;
|
|
36
|
-
}
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else
|
|
6
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
7
|
-
if (d = decorators[i])
|
|
8
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
-
};
|
|
11
|
-
import { PlatformServiceName, ProvideContext, } from "@limetech/lime-web-components";
|
|
12
|
-
import { h } from "@stencil/core";
|
|
13
|
-
import { LimeWebComponentTemplate } from "../../../util/web-component-template";
|
|
14
|
-
/**
|
|
15
|
-
* Popover content for a rule-editor chip. Carries its own styles so
|
|
16
|
-
* they travel with the element when `limel-popover` portals it out of
|
|
17
|
-
* the rule-editor's shadow DOM.
|
|
18
|
-
*
|
|
19
|
-
* @private
|
|
20
|
-
*/
|
|
21
|
-
export class RuleChipPopover {
|
|
22
|
-
constructor() {
|
|
23
|
-
this.isNegated = false;
|
|
24
|
-
this.readonly = false;
|
|
25
|
-
this.disabled = false;
|
|
26
|
-
this.isMutable = true;
|
|
27
|
-
/**
|
|
28
|
-
* Forwarded to the embedded config component so it can pull focus
|
|
29
|
-
* when this popover opens. The rule editor sets it only when the chip
|
|
30
|
-
* was just added via the picker, so clicking an existing chip does
|
|
31
|
-
* not steal focus. The component decides when it is ready to receive
|
|
32
|
-
* focus (e.g. after loading its own data).
|
|
33
|
-
*/
|
|
34
|
-
this.focusOnOpen = false;
|
|
35
|
-
this.handleNegateChange = (event) => {
|
|
36
|
-
event.stopPropagation();
|
|
37
|
-
this.negate.emit(event.detail);
|
|
38
|
-
};
|
|
39
|
-
this.handleArgsChange = (event) => {
|
|
40
|
-
event.stopPropagation();
|
|
41
|
-
this.updateArgs.emit(event.detail);
|
|
42
|
-
};
|
|
43
|
-
this.handleDelete = () => {
|
|
44
|
-
this.deleteChip.emit();
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
render() {
|
|
48
|
-
return (h("div", { key: 'ac5344dc612841a6b1332f30542d61118874037f', class: "popover" }, this.renderHeader(), this.renderBody()));
|
|
49
|
-
}
|
|
50
|
-
renderHeader() {
|
|
51
|
-
var _a, _b, _c, _d;
|
|
52
|
-
const title = ((_a = this.metadata) === null || _a === void 0 ? void 0 : _a.title)
|
|
53
|
-
? this.translator.get(this.metadata.title)
|
|
54
|
-
: ((_c = (_b = this.refNode) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : '');
|
|
55
|
-
return (h("limel-header", { class: "popover__header is-narrow", heading: title, icon: (_d = this.metadata) === null || _d === void 0 ? void 0 : _d.icon }, this.renderHeaderActions()));
|
|
56
|
-
}
|
|
57
|
-
renderHeaderActions() {
|
|
58
|
-
if (!this.isMutable) {
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
return (h("div", { slot: "actions", class: "popover__header-actions" }, h("limel-switch", { class: "popover__negate-switch", label: this.translator.get('webclient.negate'), value: this.isNegated, onChange: this.handleNegateChange }), h("limel-icon-button", { class: "popover__delete-button", icon: "trash", label: this.translator.get('webclient.rule-editor.delete'), onClick: this.handleDelete })));
|
|
62
|
-
}
|
|
63
|
-
get translator() {
|
|
64
|
-
return this.platform.get(PlatformServiceName.Translate);
|
|
65
|
-
}
|
|
66
|
-
renderBody() {
|
|
67
|
-
var _a, _b;
|
|
68
|
-
const configComponent = (_a = this.metadata) === null || _a === void 0 ? void 0 : _a.configComponent;
|
|
69
|
-
if (!configComponent) {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
return (h("div", { class: "popover__body" }, h(LimeWebComponentTemplate, { platform: this.platform, context: this.context, name: configComponent.name, props: Object.assign(Object.assign({}, configComponent.props), { value: (_b = this.refNode) === null || _b === void 0 ? void 0 : _b.args, readonly: this.readonly, disabled: this.disabled, focusOnOpen: this.focusOnOpen, onChange: this.handleArgsChange }) })));
|
|
73
|
-
}
|
|
74
|
-
static get is() { return "limebb-rule-chip-popover"; }
|
|
75
|
-
static get encapsulation() { return "shadow"; }
|
|
76
|
-
static get originalStyleUrls() {
|
|
77
|
-
return {
|
|
78
|
-
"$": ["rule-chip-popover.scss"]
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
static get styleUrls() {
|
|
82
|
-
return {
|
|
83
|
-
"$": ["rule-chip-popover.css"]
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
static get properties() {
|
|
87
|
-
return {
|
|
88
|
-
"platform": {
|
|
89
|
-
"type": "unknown",
|
|
90
|
-
"mutable": false,
|
|
91
|
-
"complexType": {
|
|
92
|
-
"original": "LimeWebComponentPlatform",
|
|
93
|
-
"resolved": "LimeWebComponentPlatform",
|
|
94
|
-
"references": {
|
|
95
|
-
"LimeWebComponentPlatform": {
|
|
96
|
-
"location": "import",
|
|
97
|
-
"path": "@limetech/lime-web-components",
|
|
98
|
-
"id": "node_modules::LimeWebComponentPlatform",
|
|
99
|
-
"referenceLocation": "LimeWebComponentPlatform"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
"required": false,
|
|
104
|
-
"optional": false,
|
|
105
|
-
"docs": {
|
|
106
|
-
"tags": [],
|
|
107
|
-
"text": ""
|
|
108
|
-
},
|
|
109
|
-
"getter": false,
|
|
110
|
-
"setter": false
|
|
111
|
-
},
|
|
112
|
-
"context": {
|
|
113
|
-
"type": "unknown",
|
|
114
|
-
"mutable": false,
|
|
115
|
-
"complexType": {
|
|
116
|
-
"original": "LimeWebComponentContext",
|
|
117
|
-
"resolved": "LimeWebComponentContext",
|
|
118
|
-
"references": {
|
|
119
|
-
"LimeWebComponentContext": {
|
|
120
|
-
"location": "import",
|
|
121
|
-
"path": "@limetech/lime-web-components",
|
|
122
|
-
"id": "node_modules::LimeWebComponentContext",
|
|
123
|
-
"referenceLocation": "LimeWebComponentContext"
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
},
|
|
127
|
-
"required": false,
|
|
128
|
-
"optional": false,
|
|
129
|
-
"docs": {
|
|
130
|
-
"tags": [],
|
|
131
|
-
"text": "Bridges the rule editor's context across the `limel-popover`\nportal."
|
|
132
|
-
},
|
|
133
|
-
"getter": false,
|
|
134
|
-
"setter": false
|
|
135
|
-
},
|
|
136
|
-
"refNode": {
|
|
137
|
-
"type": "unknown",
|
|
138
|
-
"mutable": false,
|
|
139
|
-
"complexType": {
|
|
140
|
-
"original": "RuleRef",
|
|
141
|
-
"resolved": "RuleRef",
|
|
142
|
-
"references": {
|
|
143
|
-
"RuleRef": {
|
|
144
|
-
"location": "import",
|
|
145
|
-
"path": "@limetech/lime-web-components",
|
|
146
|
-
"id": "node_modules::RuleRef",
|
|
147
|
-
"referenceLocation": "RuleRef"
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
"required": false,
|
|
152
|
-
"optional": false,
|
|
153
|
-
"docs": {
|
|
154
|
-
"tags": [],
|
|
155
|
-
"text": ""
|
|
156
|
-
},
|
|
157
|
-
"getter": false,
|
|
158
|
-
"setter": false
|
|
159
|
-
},
|
|
160
|
-
"isNegated": {
|
|
161
|
-
"type": "boolean",
|
|
162
|
-
"mutable": false,
|
|
163
|
-
"complexType": {
|
|
164
|
-
"original": "boolean",
|
|
165
|
-
"resolved": "boolean",
|
|
166
|
-
"references": {}
|
|
167
|
-
},
|
|
168
|
-
"required": false,
|
|
169
|
-
"optional": false,
|
|
170
|
-
"docs": {
|
|
171
|
-
"tags": [],
|
|
172
|
-
"text": ""
|
|
173
|
-
},
|
|
174
|
-
"getter": false,
|
|
175
|
-
"setter": false,
|
|
176
|
-
"reflect": false,
|
|
177
|
-
"attribute": "is-negated",
|
|
178
|
-
"defaultValue": "false"
|
|
179
|
-
},
|
|
180
|
-
"metadata": {
|
|
181
|
-
"type": "unknown",
|
|
182
|
-
"mutable": false,
|
|
183
|
-
"complexType": {
|
|
184
|
-
"original": "PrimitiveMetadata",
|
|
185
|
-
"resolved": "ConfigMetadata & { id: string; reads: readonly (keyof ContextMap)[]; } | undefined",
|
|
186
|
-
"references": {
|
|
187
|
-
"PrimitiveMetadata": {
|
|
188
|
-
"location": "import",
|
|
189
|
-
"path": "@limetech/lime-web-components",
|
|
190
|
-
"id": "node_modules::PrimitiveMetadata",
|
|
191
|
-
"referenceLocation": "PrimitiveMetadata"
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
"required": false,
|
|
196
|
-
"optional": true,
|
|
197
|
-
"docs": {
|
|
198
|
-
"tags": [],
|
|
199
|
-
"text": ""
|
|
200
|
-
},
|
|
201
|
-
"getter": false,
|
|
202
|
-
"setter": false
|
|
203
|
-
},
|
|
204
|
-
"readonly": {
|
|
205
|
-
"type": "boolean",
|
|
206
|
-
"mutable": false,
|
|
207
|
-
"complexType": {
|
|
208
|
-
"original": "boolean",
|
|
209
|
-
"resolved": "boolean",
|
|
210
|
-
"references": {}
|
|
211
|
-
},
|
|
212
|
-
"required": false,
|
|
213
|
-
"optional": false,
|
|
214
|
-
"docs": {
|
|
215
|
-
"tags": [],
|
|
216
|
-
"text": ""
|
|
217
|
-
},
|
|
218
|
-
"getter": false,
|
|
219
|
-
"setter": false,
|
|
220
|
-
"reflect": false,
|
|
221
|
-
"attribute": "readonly",
|
|
222
|
-
"defaultValue": "false"
|
|
223
|
-
},
|
|
224
|
-
"disabled": {
|
|
225
|
-
"type": "boolean",
|
|
226
|
-
"mutable": false,
|
|
227
|
-
"complexType": {
|
|
228
|
-
"original": "boolean",
|
|
229
|
-
"resolved": "boolean",
|
|
230
|
-
"references": {}
|
|
231
|
-
},
|
|
232
|
-
"required": false,
|
|
233
|
-
"optional": false,
|
|
234
|
-
"docs": {
|
|
235
|
-
"tags": [],
|
|
236
|
-
"text": ""
|
|
237
|
-
},
|
|
238
|
-
"getter": false,
|
|
239
|
-
"setter": false,
|
|
240
|
-
"reflect": false,
|
|
241
|
-
"attribute": "disabled",
|
|
242
|
-
"defaultValue": "false"
|
|
243
|
-
},
|
|
244
|
-
"isMutable": {
|
|
245
|
-
"type": "boolean",
|
|
246
|
-
"mutable": false,
|
|
247
|
-
"complexType": {
|
|
248
|
-
"original": "boolean",
|
|
249
|
-
"resolved": "boolean",
|
|
250
|
-
"references": {}
|
|
251
|
-
},
|
|
252
|
-
"required": false,
|
|
253
|
-
"optional": false,
|
|
254
|
-
"docs": {
|
|
255
|
-
"tags": [],
|
|
256
|
-
"text": ""
|
|
257
|
-
},
|
|
258
|
-
"getter": false,
|
|
259
|
-
"setter": false,
|
|
260
|
-
"reflect": false,
|
|
261
|
-
"attribute": "is-mutable",
|
|
262
|
-
"defaultValue": "true"
|
|
263
|
-
},
|
|
264
|
-
"focusOnOpen": {
|
|
265
|
-
"type": "boolean",
|
|
266
|
-
"mutable": false,
|
|
267
|
-
"complexType": {
|
|
268
|
-
"original": "boolean",
|
|
269
|
-
"resolved": "boolean",
|
|
270
|
-
"references": {}
|
|
271
|
-
},
|
|
272
|
-
"required": false,
|
|
273
|
-
"optional": false,
|
|
274
|
-
"docs": {
|
|
275
|
-
"tags": [],
|
|
276
|
-
"text": "Forwarded to the embedded config component so it can pull focus\nwhen this popover opens. The rule editor sets it only when the chip\nwas just added via the picker, so clicking an existing chip does\nnot steal focus. The component decides when it is ready to receive\nfocus (e.g. after loading its own data)."
|
|
277
|
-
},
|
|
278
|
-
"getter": false,
|
|
279
|
-
"setter": false,
|
|
280
|
-
"reflect": false,
|
|
281
|
-
"attribute": "focus-on-open",
|
|
282
|
-
"defaultValue": "false"
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
static get events() {
|
|
287
|
-
return [{
|
|
288
|
-
"method": "negate",
|
|
289
|
-
"name": "negate",
|
|
290
|
-
"bubbles": true,
|
|
291
|
-
"cancelable": true,
|
|
292
|
-
"composed": true,
|
|
293
|
-
"docs": {
|
|
294
|
-
"tags": [],
|
|
295
|
-
"text": ""
|
|
296
|
-
},
|
|
297
|
-
"complexType": {
|
|
298
|
-
"original": "boolean",
|
|
299
|
-
"resolved": "boolean",
|
|
300
|
-
"references": {}
|
|
301
|
-
}
|
|
302
|
-
}, {
|
|
303
|
-
"method": "updateArgs",
|
|
304
|
-
"name": "updateArgs",
|
|
305
|
-
"bubbles": true,
|
|
306
|
-
"cancelable": true,
|
|
307
|
-
"composed": true,
|
|
308
|
-
"docs": {
|
|
309
|
-
"tags": [],
|
|
310
|
-
"text": ""
|
|
311
|
-
},
|
|
312
|
-
"complexType": {
|
|
313
|
-
"original": "JsonValue",
|
|
314
|
-
"resolved": "JsonValue[] | boolean | null | number | string | { [key: string]: JsonValue; }",
|
|
315
|
-
"references": {
|
|
316
|
-
"JsonValue": {
|
|
317
|
-
"location": "import",
|
|
318
|
-
"path": "@limetech/lime-web-components",
|
|
319
|
-
"id": "node_modules::JsonValue",
|
|
320
|
-
"referenceLocation": "JsonValue"
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}, {
|
|
325
|
-
"method": "deleteChip",
|
|
326
|
-
"name": "deleteChip",
|
|
327
|
-
"bubbles": true,
|
|
328
|
-
"cancelable": true,
|
|
329
|
-
"composed": true,
|
|
330
|
-
"docs": {
|
|
331
|
-
"tags": [],
|
|
332
|
-
"text": ""
|
|
333
|
-
},
|
|
334
|
-
"complexType": {
|
|
335
|
-
"original": "void",
|
|
336
|
-
"resolved": "void",
|
|
337
|
-
"references": {}
|
|
338
|
-
}
|
|
339
|
-
}];
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
__decorate([
|
|
343
|
-
ProvideContext('context')
|
|
344
|
-
], RuleChipPopover.prototype, "context", void 0);
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { GroupNodeView } from "./group-node-view";
|
|
3
|
-
/**
|
|
4
|
-
* Render a `Rule` node and recurse into its children.
|
|
5
|
-
* @param props
|
|
6
|
-
*/
|
|
7
|
-
export const RuleNodeView = (props) => {
|
|
8
|
-
const { node, path, ctx } = props;
|
|
9
|
-
const group = extractGroup(node);
|
|
10
|
-
if (!group) {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
return (h(GroupNodeView, { node: group.node, path: path, isNegated: group.isNegated, ctx: ctx }));
|
|
14
|
-
};
|
|
15
|
-
const isNegatedGroup = (node) => node.type === 'not' &&
|
|
16
|
-
(node.rule.type === 'all' || node.rule.type === 'any');
|
|
17
|
-
/**
|
|
18
|
-
* If `node` is a group (`all`/`any`) or a negated group, return the
|
|
19
|
-
* inner group together with its negation flag. Otherwise `null`.
|
|
20
|
-
* Used by the dispatcher and by the editor's input normalization.
|
|
21
|
-
* @param node
|
|
22
|
-
*/
|
|
23
|
-
export function extractGroup(node) {
|
|
24
|
-
if (node.type === 'all' || node.type === 'any') {
|
|
25
|
-
return { node, isNegated: false };
|
|
26
|
-
}
|
|
27
|
-
if (isNegatedGroup(node)) {
|
|
28
|
-
return { node: node.rule, isNegated: true };
|
|
29
|
-
}
|
|
30
|
-
if (node.type === 'not') {
|
|
31
|
-
const inner = extractGroup(node.rule);
|
|
32
|
-
if (inner) {
|
|
33
|
-
return { node: inner.node, isNegated: !inner.isNegated };
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
export const IssuesView = ({ issues }) => {
|
|
39
|
-
if (issues.length === 0) {
|
|
40
|
-
return null;
|
|
41
|
-
}
|
|
42
|
-
return issues.map((issue) => (h("div", { class: "rule-node__issue" }, issue.message)));
|
|
43
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Remove the node at `path`.
|
|
3
|
-
*
|
|
4
|
-
* Removing the root yields an empty `all`-group so the tree always has
|
|
5
|
-
* something to render. Returns `rule` unchanged when `path` does not
|
|
6
|
-
* address a removable node.
|
|
7
|
-
* @param rule
|
|
8
|
-
* @param path
|
|
9
|
-
*/
|
|
10
|
-
export function deleteNode(rule, path) {
|
|
11
|
-
if (path.length === 0) {
|
|
12
|
-
return { type: 'all', rules: [] };
|
|
13
|
-
}
|
|
14
|
-
const parentPath = path.slice(0, -1);
|
|
15
|
-
const key = path.at(-1);
|
|
16
|
-
const parent = getNode(rule, parentPath);
|
|
17
|
-
if (parent === undefined) {
|
|
18
|
-
return rule;
|
|
19
|
-
}
|
|
20
|
-
if ((parent.type === 'all' || parent.type === 'any') &&
|
|
21
|
-
typeof key === 'number') {
|
|
22
|
-
const rules = [...parent.rules];
|
|
23
|
-
rules.splice(key, 1);
|
|
24
|
-
return replaceAt(rule, parentPath, Object.assign(Object.assign({}, parent), { rules }));
|
|
25
|
-
}
|
|
26
|
-
if (parent.type === 'not' && key === 'rule') {
|
|
27
|
-
return replaceAt(rule, parentPath, { type: 'all', rules: [] });
|
|
28
|
-
}
|
|
29
|
-
return rule;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Replace the `args` of a `ref` node. Returns `rule` unchanged when
|
|
33
|
-
* `path` does not resolve to a `ref`.
|
|
34
|
-
* @param rule
|
|
35
|
-
* @param path
|
|
36
|
-
* @param args
|
|
37
|
-
*/
|
|
38
|
-
export function updateArgs(rule, path, args) {
|
|
39
|
-
const node = getNode(rule, path);
|
|
40
|
-
if (node === undefined || node.type !== 'ref') {
|
|
41
|
-
return rule;
|
|
42
|
-
}
|
|
43
|
-
return replaceAt(rule, path, Object.assign(Object.assign({}, node), { args }));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Replace the node at `path` with `replacement`, returning a new rule
|
|
47
|
-
* tree. Used by callers that need to apply a non-atomic change as a
|
|
48
|
-
* single emit (e.g. updating a group's whole `rules` array at once).
|
|
49
|
-
* @param rule
|
|
50
|
-
* @param path
|
|
51
|
-
* @param replacement
|
|
52
|
-
*/
|
|
53
|
-
export function replaceNode(rule, path, replacement) {
|
|
54
|
-
return replaceAt(rule, path, replacement);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Wrap `group` in a `not` when `isNegated`, otherwise return it
|
|
58
|
-
* unchanged. Used when re-emitting a group whose negation flag should
|
|
59
|
-
* be preserved.
|
|
60
|
-
* @param group
|
|
61
|
-
* @param isNegated
|
|
62
|
-
*/
|
|
63
|
-
export function wrapNegated(group, isNegated) {
|
|
64
|
-
return isNegated ? { type: 'not', rule: group } : group;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Append `child` to a group's `rules`, returning a new group. The
|
|
68
|
-
* input is not mutated.
|
|
69
|
-
* @param group
|
|
70
|
-
* @param child
|
|
71
|
-
*/
|
|
72
|
-
export function appendChild(group, child) {
|
|
73
|
-
return Object.assign(Object.assign({}, group), { rules: [...group.rules, child] });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Structural equality on two paths.
|
|
77
|
-
* @param a
|
|
78
|
-
* @param b
|
|
79
|
-
*/
|
|
80
|
-
export function pathsEqual(a, b) {
|
|
81
|
-
if (a.length !== b.length) {
|
|
82
|
-
return false;
|
|
83
|
-
}
|
|
84
|
-
return a.every((value, index) => value === b[index]);
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Filter validation issues to those whose `path` matches `path`.
|
|
88
|
-
* @param issues
|
|
89
|
-
* @param path
|
|
90
|
-
*/
|
|
91
|
-
export function issuesAt(issues, path) {
|
|
92
|
-
return issues.filter((issue) => pathsEqual(issue.path, path));
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Resolve the node at `path` by walking each segment from the root.
|
|
96
|
-
* Returns `undefined` when a segment indexes past the end of a
|
|
97
|
-
* combinator's `rules`, so callers must guard the result.
|
|
98
|
-
* @param rule
|
|
99
|
-
* @param path
|
|
100
|
-
*/
|
|
101
|
-
export function getNode(rule, path) {
|
|
102
|
-
let node = rule;
|
|
103
|
-
for (const key of path) {
|
|
104
|
-
if (node === undefined) {
|
|
105
|
-
return undefined;
|
|
106
|
-
}
|
|
107
|
-
node = stepIntoNode(node, key);
|
|
108
|
-
}
|
|
109
|
-
return node;
|
|
110
|
-
}
|
|
111
|
-
function replaceAt(root, path, replacement) {
|
|
112
|
-
if (path.length === 0) {
|
|
113
|
-
return replacement;
|
|
114
|
-
}
|
|
115
|
-
const [head, ...tail] = path;
|
|
116
|
-
if (root.type === 'not' && head === 'rule') {
|
|
117
|
-
return Object.assign(Object.assign({}, root), { rule: replaceAt(root.rule, tail, replacement) });
|
|
118
|
-
}
|
|
119
|
-
if ((root.type === 'all' || root.type === 'any') && head === 'rules') {
|
|
120
|
-
if (tail.length === 0) {
|
|
121
|
-
return replacement;
|
|
122
|
-
}
|
|
123
|
-
const [index, ...rest] = tail;
|
|
124
|
-
if (typeof index !== 'number') {
|
|
125
|
-
return root;
|
|
126
|
-
}
|
|
127
|
-
const rules = [...root.rules];
|
|
128
|
-
rules[index] = replaceAt(rules[index], rest, replacement);
|
|
129
|
-
return Object.assign(Object.assign({}, root), { rules });
|
|
130
|
-
}
|
|
131
|
-
return root;
|
|
132
|
-
}
|
|
133
|
-
function stepIntoNode(node, key) {
|
|
134
|
-
if (node.type === 'not' && key === 'rule') {
|
|
135
|
-
return node.rule;
|
|
136
|
-
}
|
|
137
|
-
if ((node.type === 'all' || node.type === 'any') && key === 'rules') {
|
|
138
|
-
return node;
|
|
139
|
-
}
|
|
140
|
-
if ((node.type === 'all' || node.type === 'any') &&
|
|
141
|
-
typeof key === 'number') {
|
|
142
|
-
return node.rules[key];
|
|
143
|
-
}
|
|
144
|
-
return node;
|
|
145
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Components, JSX } from "../types/components";
|
|
2
|
-
|
|
3
|
-
interface LimebbRuleChipPopover extends Components.LimebbRuleChipPopover, HTMLElement {}
|
|
4
|
-
export const LimebbRuleChipPopover: {
|
|
5
|
-
prototype: LimebbRuleChipPopover;
|
|
6
|
-
new (): LimebbRuleChipPopover;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Used to define this component and all nested components recursively.
|
|
10
|
-
*/
|
|
11
|
-
export const defineCustomElement: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as o,d as p}from"./rule-chip-popover.js";const r=o,s=p;export{r as LimebbRuleChipPopover,s as defineCustomElement}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as t,createEvent as o,h as i,transformTag as r}from"@stencil/core/internal/client";import{k as s,n}from"./index.esm.js";import{L as l}from"./web-component-template.js";const a=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.negate=o(this,"negate",7),this.updateArgs=o(this,"updateArgs",7),this.deleteChip=o(this,"deleteChip",7),this.isNegated=!1,this.readonly=!1,this.disabled=!1,this.isMutable=!0,this.focusOnOpen=!1,this.handleNegateChange=e=>{e.stopPropagation(),this.negate.emit(e.detail)},this.handleArgsChange=e=>{e.stopPropagation(),this.updateArgs.emit(e.detail)},this.handleDelete=()=>{this.deleteChip.emit()}}render(){return i("div",{key:"ac5344dc612841a6b1332f30542d61118874037f",class:"popover"},this.renderHeader(),this.renderBody())}renderHeader(){var e,t,o,r;const s=(null===(e=this.metadata)||void 0===e?void 0:e.title)?this.translator.get(this.metadata.title):null!==(o=null===(t=this.refNode)||void 0===t?void 0:t.id)&&void 0!==o?o:"";return i("limel-header",{class:"popover__header is-narrow",heading:s,icon:null===(r=this.metadata)||void 0===r?void 0:r.icon},this.renderHeaderActions())}renderHeaderActions(){return this.isMutable?i("div",{slot:"actions",class:"popover__header-actions"},i("limel-switch",{class:"popover__negate-switch",label:this.translator.get("webclient.negate"),value:this.isNegated,onChange:this.handleNegateChange}),i("limel-icon-button",{class:"popover__delete-button",icon:"trash",label:this.translator.get("webclient.rule-editor.delete"),onClick:this.handleDelete})):null}get translator(){return this.platform.get(n.Translate)}renderBody(){var e,t;const o=null===(e=this.metadata)||void 0===e?void 0:e.configComponent;return o?i("div",{class:"popover__body"},i(l,{platform:this.platform,context:this.context,name:o.name,props:Object.assign(Object.assign({},o.props),{value:null===(t=this.refNode)||void 0===t?void 0:t.args,readonly:this.readonly,disabled:this.disabled,focusOnOpen:this.focusOnOpen,onChange:this.handleArgsChange})})):null}static get style(){return":host{display:block}.popover{display:flex;flex-direction:column;min-width:24rem;background-color:rgb(var(--contrast-100));border:1px solid rgb(var(--contrast-700));border-radius:0.5rem;box-shadow:0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);overflow:hidden}.popover__header{--header-background-color:rgba(var(--contrast-300));padding-right:0.5rem;gap:1rem}.popover__header-actions{display:grid;grid-auto-flow:column;grid-gap:0.75rem;padding:0.25rem;align-items:center}.popover__delete-button{color:rgb(var(--contrast-1100))}.popover__body{padding:1rem}"}},[1,"limebb-rule-chip-popover",{platform:[16],context:[16],refNode:[16],isNegated:[4,"is-negated"],metadata:[16],readonly:[4],disabled:[4],isMutable:[4,"is-mutable"],focusOnOpen:[4,"focus-on-open"]}]);function d(){"undefined"!=typeof customElements&&["limebb-rule-chip-popover"].forEach((e=>{"limebb-rule-chip-popover"===e&&(customElements.get(r(e))||customElements.define(r(e),a))}))}!function(e,t,o,i){var r,s=arguments.length,n=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,i);else for(var l=e.length-1;l>=0;l--)(r=e[l])&&(n=(s<3?r(n):s>3?r(t,o,n):r(t,o))||n);s>3&&n&&Object.defineProperty(t,o,n)}([s("context")],a.prototype,"context",void 0);export{a as R,d}
|