@limetech/lime-crm-building-blocks 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +9 -4
- 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 +2 -2
- 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/chat-list/chat-list.js +7 -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/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-chat-list.js +1 -1
- 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/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 +9 -4
- 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 +2 -2
- 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-e7dee7ac.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-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-6f923112.entry.js → p-687640ed.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 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as r}from"./p-
|
|
1
|
+
import{r as t,c as i,h as e,H as r}from"./p-BK566_jX.js";import{n as o}from"./p-DhGRAeCH.js";const a=class{constructor(r){t(this,r),this.interact=i(this,"interact"),this.handleClick=()=>{this.isItemClickable()&&this.handleNotificationListItemClick()},this.handleKeyDown=t=>{this.isItemClickable()&&"Enter"===t.key&&this.handleNotificationListItemClick()},this.renderHeading=()=>{if(!this.item.heading)return;if(!this.item.author)return e("limel-markdown",{value:this.translator.get(this.item.heading)});const t=this.getAuthorLink(),i=this.translator.get(this.item.heading,{author:t});return e("limel-markdown",{class:"heading",value:i})},this.createMenuItem=t=>{var i,e;return"separator"in t?t:{value:t,text:null!==(i=t.label)&&void 0!==i?i:"",secondaryText:t.description,disabled:t.disabled,icon:null!==(e=t.icon)&&void 0!==e?e:""}},this.handleMenuItemSelect=t=>{var i;t.stopPropagation();const e=null===(i=t.detail.value)||void 0===i?void 0:i.command;e&&this.commandbus.handle(e)},this.handleNotificationListItemClick=()=>{this.interact.emit(this.item)}}render(){var t,i;return e(r,{key:"821047fce457dc9646aa5c6c6f6afa1d8a53bd49",id:this.item.id,class:{"is-clickable":this.isItemClickable(),"is-read":!!(null===(t=this.item)||void 0===t?void 0:t.read),"is-selected":!!(null===(i=this.item)||void 0===i?void 0:i.selected)},onClick:this.handleClick,onKeyDown:this.handleKeyDown,tabindex:0},this.renderSource(),this.renderContent())}isItemClickable(){var t;return!!(null===(t=this.item)||void 0===t?void 0:t.clickable)}renderSource(){return e("div",{class:"header"},this.renderIcon(),this.renderCaption(),this.renderTimestamp(),this.renderUnpromotedActionsMenu())}renderIcon(){var t,i,r,o;if(this.item.icon)return e("limel-icon",{class:"icon",badge:!0,name:null!==(i=null===(t=this.item.icon)||void 0===t?void 0:t.name)&&void 0!==i?i:"dot_circle",style:{color:`${null===(r=this.item.icon)||void 0===r?void 0:r.color}`,"background-color":`${null===(o=this.item.icon)||void 0===o?void 0:o.backgroundColor}`}})}renderContent(){return e("div",{class:"content"},e("div",{class:"body"},this.renderHeadline(),this.renderValue()),this.renderAuthorPicture())}renderHeadline(){if(this.item.heading)return e("div",{class:"headline"},this.renderHeading())}getAuthorLink(){if(!this.item.author)return;if("string"==typeof this.item.author.name)return this.item.author.name;const{href:t,text:i}=this.item.author.name;return`[${i}](${t})`}renderAuthorPicture(){var t;if(null===(t=this.item.author)||void 0===t?void 0:t.picture)return e("img",{class:"author-avatar",loading:"lazy",src:this.item.author.picture})}renderCaption(){if(this.item.caption)return e("h2",{class:"caption"},this.item.caption)}renderValue(){if(this.item.value)return e("limel-markdown",{class:"body-text",value:this.item.value})}renderUnpromotedActionsMenu(){var t,i;if(!(null===(t=this.item.unpromotedActions)||void 0===t?void 0:t.length))return;const r=this.item.unpromotedActions.map(this.createMenuItem);return e("limel-menu",{class:"unpromoted-actions-menu",items:r,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},e("limel-icon-button",{icon:"menu_2",slot:"trigger",label:null===(i=this.translator)||void 0===i?void 0:i.get("webclient.more-actions")}))}renderTimestamp(){const t=this.item.timestamp;if(t)return e("span",{class:"timestamp"},this.dateTimeFormatter.format(t,"timeofday"))}get dateTimeFormatter(){return this.platform.get(o.DateTimeFormatter)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.Translate)}get commandbus(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(o.CommandBus)}};a.style='@charset "UTF-8";*{box-sizing:border-box}:host(limebb-notification-item){isolation:isolate;position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:0.25rem;margin-left:0.5rem;border-radius:0.75rem;border:1px solid rgb(var(--contrast-500))}:host(limebb-notification-item):before{content:"";display:block;position:absolute;left:-1rem;top:0.85rem;border-radius:50%;height:0.5rem;width:0.5rem;transition:background-color 0.2s ease, scale 0.2s cubic-bezier(0.82, 0.3, 0.14, 1.36);scale:var(--limebb-notification-item-unread-badge-scale, 0.6);background-color:var(--limebb-notification-item-unread-badge-color, transparent)}:host(limebb-notification-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-notification-item:hover) .body-text{opacity:1}.header{display:flex;align-items:center;gap:0.25rem;min-height:2rem;padding:0 0 0 0.25rem;margin-bottom:0.25rem}.header:not(:has(.icon)){padding-left:0.75rem}.header:not(:has(.unpromoted-actions-menu)){padding-right:0.5rem}.caption,.timestamp{font-size:0.75rem}.caption{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0;flex-grow:1;font-weight:600;color:rgb(var(--contrast-900))}.timestamp{flex-shrink:0;margin-left:auto;transition:color 0.4s ease, opacity 0.2s ease;color:rgb(var(--contrast-900))}.headline{display:flex;gap:0.25rem;align-items:center}.content{display:flex;min-width:0;gap:0.5rem;padding:0 0.75rem 0.5rem 0.75rem}.heading{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.5rem;font-size:0.875rem;--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.body{display:flex;flex-direction:column;gap:0.5rem}.body-text{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:4.25rem;transition:opacity 0.2s ease;opacity:0.7}.icon{--icon-background-color:var(--limebb-feed-background-color);flex-shrink:0;width:1.5rem;padding:0.125rem}.author-avatar{border-radius:50%;width:2rem;height:2rem;object-fit:cover;margin-top:auto;margin-right:-0.25rem;margin-left:auto;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}';export{a as limebb_notification_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i,g as a}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e,H as i,g as a}from"./p-BK566_jX.js";import{a as r}from"./p-CwMJvF_Z.js";const n=class{constructor(e){t(this,e),this.cancel=s(this,"cancel"),this.itemSelected=s(this,"itemSelected"),this.items=[],this.open=!1,this.isSearching=!1,this.emptyMessage="",this.handleCancel=t=>{t instanceof KeyboardEvent&&t.key!==r||(t.stopPropagation(),t.preventDefault(),this.cancel.emit())},this.selectOnInteract=t=>{t.stopPropagation(),t.preventDefault(),this.itemSelected.emit(t.detail)}}watchOpen(t){!0===t?this.setupHandlers():!1===t&&this.teardownHandlers()}connectedCallback(){this.open&&this.setupHandlers()}disconnectedCallback(){this.teardownHandlers()}setupHandlers(){this.host.addEventListener("keyup",this.handleCancel)}teardownHandlers(){this.host&&this.host.removeEventListener("keyup",this.handleCancel)}render(){return 0===this.items.length?this.isSearching?this.renderSpinner():e(i,{onMouseDown:this.handleMouseDown},e("limebb-empty-state",{value:this.emptyMessage,icon:{name:"search_more",color:"rgb(var(--contrast-800))"}})):e(i,{onMouseDown:this.handleMouseDown},[e("div",null,e("limel-list",{type:"selectable",items:this.getItems(),onInteract:this.selectOnInteract}),e("div",{class:"spinner-in-list"},this.renderSpinner()))])}renderSpinner(){if(this.isSearching)return e("limel-spinner",{size:"small",class:"search-spinner"})}handleMouseDown(t){t.preventDefault()}getItems(){return this.items.map((t=>"separator"in t?t:Object.assign(Object.assign({},t),{disabled:t.disabled||this.isSearching})))}get host(){return a(this)}static get watchers(){return{open:[{watchOpen:0}]}}};n.style=":host(limebb-text-editor-picker){animation:fade-in 0.3s ease forwards;animation-delay:0.1s;display:block;max-width:calc(100vw - 2rem);padding:0.125rem;border-radius:0.5rem;background-color:rgba(var(--contrast-100));box-shadow:var(--shadow-depth-16);max-height:50vh;overflow-y:auto}limel-menu-list{position:relative}limel-spinner{margin:0 auto}.spinner-in-list{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@keyframes fade-in{0%{opacity:0}100%{opacity:1}}";export{n as limebb_text_editor_picker}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-BK566_jX.js";const h=class{constructor(s){t(this,s),this.remove=i(this,"remove"),this.negated=!1,this.invalid=!1,this.selected=!1,this.readonly=!1,this.disabled=!1,this.removable=!0,this.handleRemove=t=>{t.stopPropagation(),this.remove.emit()}}render(){return s("limel-chip",{key:"3b1e45748efbdd1bdbf8effd7bca4976f9ba537c",text:this.text,icon:this.glyph,invalid:this.invalid,selected:this.selected,disabled:this.disabled,removable:this.removable&&!this.readonly,onRemove:this.handleRemove})}get glyph(){return this.icon&&this.iconColor?{name:this.icon,color:this.iconColor}:this.icon}get text(){return this.negated?`¬ ${this.label}`:this.label}};h.style=":host{display:inline-flex;min-width:0}";export{h as limebb_rule_condition_chip}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s,H as i}from"./p-
|
|
1
|
+
import{r as e,c as t,h as s,H as i}from"./p-BK566_jX.js";import{C as r}from"./p-1N3bZuHj.js";const o={display:"block",order:3,width:"6rem",flexShrink:0,marginRight:"-0.5rem"},l=class{constructor(s){e(this,s),this.change=t(this,"change"),this.options=[],this.optionsById=new Map,this.handleChange=e=>{var t;e.stopPropagation();const s=e.detail,i=Array.isArray(s)?s[0]:s;this.change.emit(null!==(t=null==i?void 0:i.value)&&void 0!==t?t:"")}}componentWillLoad(){this.options=[{text:"",value:""},...r.map((e=>({text:e.title,secondaryText:e.description,value:e.id,primaryComponent:{name:"limebb-color-palette-swatches",props:{colors:e.colors,style:o}}})))],this.optionsById=new Map(this.options.map((e=>[e.value,e])))}render(){return s(i,{key:"5144d7eed8495f7880a5b9b84f6d21e057823f6f"},s("limel-select",{key:"592ba7009714d5585c3ec4051ff87780bfaf7ce0",label:this.label,helperText:this.helperText,disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,required:this.required,options:this.options,value:this.getSelectedOption(),onChange:this.handleChange}))}getSelectedOption(){if(!this.value)return;return this.optionsById.get(this.value)||(this.lastWarnedValue!==this.value&&(console.warn(`limebb-color-palette-picker: palette "${this.value}" was not found in the registry. Rendering as (none).`),this.lastWarnedValue=this.value),this.optionsById.get(""))}};l.style=":host(limebb-color-palette-picker){box-sizing:border-box;display:block;--color-palette-swatches-transform:scale(0.9) translateX(0.5rem)}";export{l as limebb_color_palette_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i}from"./p-
|
|
1
|
+
import{r as e,h as i}from"./p-BK566_jX.js";const r=class{constructor(i){e(this,i)}render(){return i("span",{key:"a19af68f2f240a1bb36645509e42b337cec8be01"},this.description)}};r.style='@charset "UTF-8";:host(limebb-feed-item-thumbnail-file-info){display:flex;align-items:center;gap:0.5rem;padding:0 0.25rem 0.125rem 0.25rem}span{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:normal;color:rgb(var(--contrast-1000));flex-grow:1;font-size:0.75rem}';export{r as limebb_feed_item_thumbnail_file_info}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as r,h as i}from"./p-
|
|
1
|
+
import{r as e,c as r,h as i}from"./p-BK566_jX.js";const t=class{constructor(i){e(this,i),this.changeStartTime=r(this,"changeStartTime"),this.changeEndTime=r(this,"changeEndTime"),this.handleStartTimeChange=e=>{e.stopPropagation(),this.changeStartTime.emit(e.detail)},this.handleEndTimeChange=e=>{e.stopPropagation(),this.changeEndTime.emit(e.detail)}}componentWillLoad(){this.originalStartTime=this.startTime,this.originalEndTime=this.endTime}render(){return i("div",{key:"b7061f4bc5dbca336514fcf45ff4560c4aa91403",class:"date-pickers"},this.renderStartDatePicker(),this.renderEndDatePicker())}renderStartDatePicker(){if(this.originalStartTime)return i("div",{class:"start-time"},this.renderDatePicker(this.startTimeLabel,this.startTime,!this.startTime,this.handleStartTimeChange))}renderEndDatePicker(){if(this.originalEndTime)return i("div",{class:"end-time"},this.renderDatePicker(this.endTimeLabel,this.endTime,!this.endTime,this.handleEndTimeChange))}renderDatePicker(e,r,t,a){const l=this.platform&&i("limebb-date-picker",{platform:this.platform,context:this.context,type:this.type,value:r,onChange:a,invalid:t});return[i("div",{class:"label-group"},i("span",{class:"circle"}),i("span",{class:"label"},e),i("span",{class:"line"})),l||i("limel-date-picker",{type:this.type,value:r,format:this.timeFormat,language:this.language,onChange:a,invalid:t})]}};t.style=":host(limebb-date-range){isolation:isolate;display:block;position:relative}*{box-sizing:border-box}.date-pickers{display:grid;grid-template-columns:repeat(auto-fit, minmax(13.5rem, 1fr));gap:0.5rem;padding:0.75rem 1rem 1.25rem 1rem}.label-group{display:flex;align-items:center;margin-bottom:0.25rem}.end-time .label-group{flex-direction:row-reverse}.label-group .label{font-size:0.75rem;padding:0 0.25rem}.label-group .circle{flex-shrink:0;width:0.5rem;height:0.5rem;border-radius:50%}.start-time .label-group .circle{background-color:rgb(var(--color-green-default))}.end-time .label-group .circle{background-color:rgb(var(--color-coral-default))}.label-group .line{flex-grow:1;height:0.25rem;border-radius:1rem}.start-time .label-group .line{background-image:linear-gradient(to right, rgb(var(--color-green-light)), rgb(var(--contrast-400)) 30%)}.end-time .label-group .line{background-image:linear-gradient(to left, rgb(var(--color-coral-light)), rgb(var(--contrast-400)) 30%)}.date-pickers:has(>:last-child:nth-child(2)) .start-time .line{margin-right:-0.5rem}.date-pickers:has(>:last-child:nth-child(2)) .end-time .line{margin-left:-0.5rem}";export{t as limebb_date_range}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-COtSgrC5.js";function o(t,e,i){if(null===i)return void t.push({path:e});const o=i,s="_alias"in o,n="#description"in o,a=Object.keys(o).filter((t=>"_alias"!==t&&"#description"!==t));if(0!==a.length)if(s||n){const i={};for(const t of a)i[t]=o[t];t.push(...r(i,e))}else t.push(...r(i,e));else{const i=o._alias,r=o["#description"];t.push(i||r?{path:e,alias:i,description:r}:{path:e})}}function r(t,e=""){if(!t)return[];const i=[];for(const[r,s]of Object.entries(t))"object"==typeof s&&o(i,e?`${e}.${r}`:r,s);return i}const s="_id",n=new Set(["_alias","#description"]);function a(t){return!(!t||"object"!=typeof t)&&Object.keys(t).some((t=>!n.has(t)))}function l(t,e,i){const o=t[e];if(a(o))return void l(o,"_id",i);const r={};i.alias&&""!==i.alias.trim()&&(r._alias=i.alias),i.description&&""!==i.description.trim()&&(r["#description"]=i.description),t[e]=Object.keys(r).length>0?r:null}function c(t,e){const i=t[e];if(void 0===i)return t[e]={},t[e];if(a(i))return i;const o={[s]:i};return t[e]=o,o}const p=class{constructor(i){t(this,i),this.change=e(this,"change"),this.label="Properties",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,this.items=i,this.emitChange()},this.handleAddProperty=()=>{this.items=[...this.items,{path:""}],this.emitChange()}}componentWillLoad(){this.items=this.value?this.isEmptyResponseFormat(this.value)?[]:this.value.object?r(this.value.object):[]:[{path:"_id"}]}componentWillUpdate(){if(this.value)if(this.value.object&&!this.isEmptyResponseFormat(this.value)){const t=r(this.value.object);(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];return i&&t.path===i.path&&t.alias===i.alias&&t.description===i.description})))&&(this.items=t)}else this.items.length>0&&(this.items=[])}render(){return this.limetype?0===this.items.length?i("div",{class:"response-format-editor"},i("h4",{class:"header"},this.label),i("div",{class:"empty-state"},i("p",{class:"empty-state-message"},"No properties selected. The response will return empty objects."),i("limel-button",{label:"Add Property",icon:"plus_math",onClick:this.handleAddProperty}))):i("div",{class:"response-format-editor"},i("limel-header",{subheading:this.label},this.renderPropertyCount()),i("div",{class:"property-list"},this.items.map(((t,e)=>this.renderItem(t,e))),i("limel-button",{label:"Property",disabled:this.items.some((t=>!t.path||""===t.path.trim())),icon:{name:"plus_math",title:"Add"},onClick:this.handleAddProperty}))):i("div",{class:"empty-state"},i("p",null,"Select a limetype to choose properties"))}renderPropertyCount(){return[i("limel-badge",{slot:"actions",id:"counter-badge",label:this.items.length.toString()}),i("limel-tooltip",{elementId:"counter-badge",slot:"actions",label:"Number of selected properties"})]}renderItem(t,e){return i("limebb-lime-query-response-format-item",{key:`${t.path}-${e}`,class:"property-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){const t=function(t){const e={};for(const i of t){const t=i.path.split(".");let o=e;for(let e=0;e<t.length;e++){const r=t[e];e===t.length-1?l(o,r,i):o=c(o,r)}}return e}(this.items);this.change.emit({object:t})}isEmptyResponseFormat(t){return!(!t||0!==Object.keys(t).length&&(!t.object||0!==Object.keys(t.object).length||t.aggregates))}};p.style=":host(limebb-lime-query-response-format-editor){display:block;width:100%}.response-format-editor{display:flex;flex-direction:column;padding:1rem 0}limel-badge[slot=actions]{--badge-background-color:rgb(var(--contrast-200));margin-right:0.25rem}.property-list{display:flex;flex-direction:column;border-radius:0 0 0.75rem 0.75rem;padding:0.25rem;background-color:rgb(var(--contrast-300))}.empty-state{padding:2rem;text-align:center;color:rgb(var(--contrast-700));font-style:italic}.empty-state p{margin:0}.empty-state .empty-state-message{margin-bottom:1rem;font-size:0.875rem}.empty-state limel-button{margin:0 auto;max-width:200px}";const d=class{constructor(i){t(this,i),this.itemChange=e(this,"itemChange"),this.showAliasInput=!1,this.showDescriptionInput=!1,this.handlePathChange=t=>{t.stopPropagation(),this.itemChange.emit(Object.assign(Object.assign({},this.item),{path:t.detail}))},this.toggleAliasInput=()=>{this.showAliasInput=!this.showAliasInput},this.toggleDescriptionInput=()=>{this.showDescriptionInput=!this.showDescriptionInput},this.handleAliasChange=t=>{t.stopPropagation();const e=t.detail;this.itemChange.emit(Object.assign(Object.assign({},this.item),{alias:e||void 0}))},this.handleDescriptionChange=t=>{t.stopPropagation();const e=t.detail;this.itemChange.emit(Object.assign(Object.assign({},this.item),{description:e||void 0}))},this.handleAliasBlur=()=>{if(this.item.alias){const t=this.item.alias.trim();t!==this.item.alias&&this.itemChange.emit(Object.assign(Object.assign({},this.item),{alias:t||void 0}))}},this.handleDescriptionBlur=()=>{if(this.item.description){const t=this.item.description.trim();t!==this.item.description&&this.itemChange.emit(Object.assign(Object.assign({},this.item),{description:t||void 0}))}},this.handleRemove=()=>{this.itemChange.emit(null)}}componentWillLoad(){this.showAliasInput=!!this.item.alias,this.showDescriptionInput=!!this.item.description}componentWillUpdate(){this.item.alias&&!this.showAliasInput&&(this.showAliasInput=!0),this.item.description&&!this.showDescriptionInput&&(this.showDescriptionInput=!0)}render(){return[i("div",{key:"98e81e906b0c80695dd53b0b0d7ea3ba6118f3bc",class:"property-controls"},i("div",{key:"f0c9a96327bba0c035c90b4d7934412f8614be5b",class:"property-path"},i("limebb-property-selector",{key:"b0ba031060bbb090a91d820a31e817f0120488a4",platform:this.platform,context:this.context,limetype:this.limetype,label:"Property",value:this.item.path,required:!0,onChange:this.handlePathChange}),i("div",{key:"742c0f917ebbfa6b5b1b03a704c3616804656cd9",class:"input-grid"},this.renderAliasInput()),i("div",{key:"55f90ebd7647a73b893d6d4551086727eb7ef2fe",class:"input-grid"},this.renderDescriptionInput()),i("div",{key:"0693b46f6d34b30ddaa239172105d1ec2a996312",class:"button-group"},this.renderAliasButton(),this.renderDescriptionButton())),i("limel-icon-button",{key:"c408f278f1eeea5faf3f1ebdb771ad562e578e5f",icon:"trash",label:"Remove property",onClick:this.handleRemove}))]}renderAliasButton(){if(!this.showAliasInput)return i("button",{type:"button",class:"alias",onClick:this.toggleAliasInput},"+ Alias")}renderDescriptionButton(){if(!this.showDescriptionInput)return i("button",{type:"button",class:"description",onClick:this.toggleDescriptionInput},"+ Description")}renderAliasInput(){if(this.showAliasInput)return i("div",{class:"input-group"},i("limel-input-field",{label:"Alias",value:this.item.alias||"",placeholder:"Custom property name...",onChange:this.handleAliasChange,onBlur:this.handleAliasBlur,leadingIcon:"add_tag"}),i("limel-icon-button",{class:"remove-alias",icon:"multiply",onClick:this.toggleAliasInput,label:"Remove alias",disabled:!!this.item.alias}))}renderDescriptionInput(){if(this.showDescriptionInput)return i("div",{class:"input-group"},i("limel-input-field",{label:"Description",value:this.item.description||"",placeholder:"Describe this property for AI...",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur,leadingIcon:"comments"}),i("limel-icon-button",{class:"remove-description",icon:"multiply",onClick:this.toggleDescriptionInput,label:"Remove description",disabled:!!this.item.description}))}};d.style='@charset "UTF-8";*{box-sizing:border-box;min-width:0}:host(limebb-lime-query-response-format-item){display:flex;flex-direction:column;gap:0.5rem}.property-controls{transition:box-shadow 0.4s ease, background-color 0.6s ease;display:flex;align-items:flex-start;gap:0.5rem;width:100%;padding:0.75rem 0.75rem 0 0.75rem;border-radius:0.75rem}.property-controls:hover,.property-controls:focus,.property-controls:focus-within{transition-duration:0.2s;background-color:rgb(var(--contrast-100));box-shadow:var(--shadow-inflated-16)}.property-controls limel-icon-button{margin-top:0.125rem}.property-path{flex-grow:1;display:flex;flex-direction:column;padding-bottom:0.25rem}.button-group,.input-group{padding-left:1rem}.button-group:not(:empty),.input-group:not(:empty){padding-top:0.25rem;padding-bottom:0.25rem}.button-group{display:flex;gap:0.5rem;align-items:center}.button-group button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.button-group button:hover,.button-group button:focus,.button-group button:focus-visible{will-change:color, background-color, box-shadow, transform}.button-group button:hover,.button-group button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button-group button:hover{box-shadow:var(--button-shadow-hovered)}.button-group button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.button-group button:hover,.button-group button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button-group button:focus{outline:none}.button-group button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.button-group button{font-size:0.625rem;padding:0 0.5rem 0 0.25rem;display:flex;align-items:center;gap:0.25rem;border-radius:0.25rem}.button-group button:hover{transform:scale(1.2)}.button-group limel-icon{width:1rem}.input-group{display:flex;align-items:center}.input-group limel-input-field{flex-grow:1}.input-group limel-icon-button{transform:scale(0.85)}.metadata{flex-grow:1;padding-left:1rem}@media (max-width: 768px){.property-controls{flex-direction:column;gap:0.5rem}}.input-grid{--limebb-l-q-r-f-i--opacity-transition-speed:0.1s;--limebb-l-q-r-f-i--opacity-transition-delay:0s;--limebb-l-q-r-f-i--grid-template-rows-transition-speed:0.3s;transition:grid-template-rows var(--limebb-l-q-r-f-i--grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0fr}.input-grid .input-group{transition:opacity var(--limebb-l-q-r-f-i--opacity-transition-speed) ease var(--limebb-l-q-r-f-i--opacity-transition-delay), padding var(--limebb-l-q-r-f-i--opacity-transition-speed) ease var(--limebb-l-q-r-f-i--opacity-transition-delay);overflow:hidden;opacity:0}.input-grid:not(:empty){--limebb-l-q-r-f-i--opacity-transition-speed:0.2s;--limebb-l-q-r-f-i--opacity-transition-delay:0.1s;--limebb-l-q-r-f-i--grid-template-rows-transition-speed:0.2s;grid-template-rows:1fr}.input-grid:not(:empty) .input-group{opacity:1}.button-group:hover .input-grid{will-change:grid-template-rows}.button-group:hover .input-group{will-change:opacity, padding}';export{p as limebb_lime_query_response_format_editor,d as limebb_lime_query_response_format_item}
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-BK566_jX.js";function o(t,e,i){if(null===i)return void t.push({path:e});const o=i,s="_alias"in o,n="#description"in o,a=Object.keys(o).filter((t=>"_alias"!==t&&"#description"!==t));if(0!==a.length)if(s||n){const i={};for(const t of a)i[t]=o[t];t.push(...r(i,e))}else t.push(...r(i,e));else{const i=o._alias,r=o["#description"];t.push(i||r?{path:e,alias:i,description:r}:{path:e})}}function r(t,e=""){if(!t)return[];const i=[];for(const[r,s]of Object.entries(t))"object"==typeof s&&o(i,e?`${e}.${r}`:r,s);return i}const s="_id",n=new Set(["_alias","#description"]);function a(t){return!(!t||"object"!=typeof t)&&Object.keys(t).some((t=>!n.has(t)))}function l(t,e,i){const o=t[e];if(a(o))return void l(o,"_id",i);const r={};i.alias&&""!==i.alias.trim()&&(r._alias=i.alias),i.description&&""!==i.description.trim()&&(r["#description"]=i.description),t[e]=Object.keys(r).length>0?r:null}function c(t,e){const i=t[e];if(void 0===i)return t[e]={},t[e];if(a(i))return i;const o={[s]:i};return t[e]=o,o}const p=class{constructor(i){t(this,i),this.change=e(this,"change"),this.label="Properties",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const i=[...this.items];null===e.detail?i.splice(t,1):i[t]=e.detail,this.items=i,this.emitChange()},this.handleAddProperty=()=>{this.items=[...this.items,{path:""}],this.emitChange()}}componentWillLoad(){this.items=this.value?this.isEmptyResponseFormat(this.value)?[]:this.value.object?r(this.value.object):[]:[{path:"_id"}]}componentWillUpdate(){if(this.value)if(this.value.object&&!this.isEmptyResponseFormat(this.value)){const t=r(this.value.object);(t.length!==this.items.length||!t.every(((t,e)=>{const i=this.items[e];return i&&t.path===i.path&&t.alias===i.alias&&t.description===i.description})))&&(this.items=t)}else this.items.length>0&&(this.items=[])}render(){return this.limetype?0===this.items.length?i("div",{class:"response-format-editor"},i("h4",{class:"header"},this.label),i("div",{class:"empty-state"},i("p",{class:"empty-state-message"},"No properties selected. The response will return empty objects."),i("limel-button",{label:"Add Property",icon:"plus_math",onClick:this.handleAddProperty}))):i("div",{class:"response-format-editor"},i("limel-header",{subheading:this.label},this.renderPropertyCount()),i("div",{class:"property-list"},this.items.map(((t,e)=>this.renderItem(t,e))),i("limel-button",{label:"Property",disabled:this.items.some((t=>!t.path||""===t.path.trim())),icon:{name:"plus_math",title:"Add"},onClick:this.handleAddProperty}))):i("div",{class:"empty-state"},i("p",null,"Select a limetype to choose properties"))}renderPropertyCount(){return[i("limel-badge",{slot:"actions",id:"counter-badge",label:this.items.length.toString()}),i("limel-tooltip",{elementId:"counter-badge",slot:"actions",label:"Number of selected properties"})]}renderItem(t,e){return i("limebb-lime-query-response-format-item",{key:`${t.path}-${e}`,class:"property-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){const t=function(t){const e={};for(const i of t){const t=i.path.split(".");let o=e;for(let e=0;e<t.length;e++){const r=t[e];e===t.length-1?l(o,r,i):o=c(o,r)}}return e}(this.items);this.change.emit({object:t})}isEmptyResponseFormat(t){return!(!t||0!==Object.keys(t).length&&(!t.object||0!==Object.keys(t.object).length||t.aggregates))}};p.style=":host(limebb-lime-query-response-format-editor){display:block;width:100%}.response-format-editor{display:flex;flex-direction:column;padding:1rem 0}limel-badge[slot=actions]{--badge-background-color:rgb(var(--contrast-200));margin-right:0.25rem}.property-list{display:flex;flex-direction:column;border-radius:0 0 0.75rem 0.75rem;padding:0.25rem;background-color:rgb(var(--contrast-300))}.empty-state{padding:2rem;text-align:center;color:rgb(var(--contrast-700));font-style:italic}.empty-state p{margin:0}.empty-state .empty-state-message{margin-bottom:1rem;font-size:0.875rem}.empty-state limel-button{margin:0 auto;max-width:200px}";const d=class{constructor(i){t(this,i),this.itemChange=e(this,"itemChange"),this.showAliasInput=!1,this.showDescriptionInput=!1,this.handlePathChange=t=>{t.stopPropagation(),this.itemChange.emit(Object.assign(Object.assign({},this.item),{path:t.detail}))},this.toggleAliasInput=()=>{this.showAliasInput=!this.showAliasInput},this.toggleDescriptionInput=()=>{this.showDescriptionInput=!this.showDescriptionInput},this.handleAliasChange=t=>{t.stopPropagation();const e=t.detail;this.itemChange.emit(Object.assign(Object.assign({},this.item),{alias:e||void 0}))},this.handleDescriptionChange=t=>{t.stopPropagation();const e=t.detail;this.itemChange.emit(Object.assign(Object.assign({},this.item),{description:e||void 0}))},this.handleAliasBlur=()=>{if(this.item.alias){const t=this.item.alias.trim();t!==this.item.alias&&this.itemChange.emit(Object.assign(Object.assign({},this.item),{alias:t||void 0}))}},this.handleDescriptionBlur=()=>{if(this.item.description){const t=this.item.description.trim();t!==this.item.description&&this.itemChange.emit(Object.assign(Object.assign({},this.item),{description:t||void 0}))}},this.handleRemove=()=>{this.itemChange.emit(null)}}componentWillLoad(){this.showAliasInput=!!this.item.alias,this.showDescriptionInput=!!this.item.description}componentWillUpdate(){this.item.alias&&!this.showAliasInput&&(this.showAliasInput=!0),this.item.description&&!this.showDescriptionInput&&(this.showDescriptionInput=!0)}render(){return[i("div",{key:"98e81e906b0c80695dd53b0b0d7ea3ba6118f3bc",class:"property-controls"},i("div",{key:"f0c9a96327bba0c035c90b4d7934412f8614be5b",class:"property-path"},i("limebb-property-selector",{key:"b0ba031060bbb090a91d820a31e817f0120488a4",platform:this.platform,context:this.context,limetype:this.limetype,label:"Property",value:this.item.path,required:!0,onChange:this.handlePathChange}),i("div",{key:"742c0f917ebbfa6b5b1b03a704c3616804656cd9",class:"input-grid"},this.renderAliasInput()),i("div",{key:"55f90ebd7647a73b893d6d4551086727eb7ef2fe",class:"input-grid"},this.renderDescriptionInput()),i("div",{key:"0693b46f6d34b30ddaa239172105d1ec2a996312",class:"button-group"},this.renderAliasButton(),this.renderDescriptionButton())),i("limel-icon-button",{key:"c408f278f1eeea5faf3f1ebdb771ad562e578e5f",icon:"trash",label:"Remove property",onClick:this.handleRemove}))]}renderAliasButton(){if(!this.showAliasInput)return i("button",{type:"button",class:"alias",onClick:this.toggleAliasInput},"+ Alias")}renderDescriptionButton(){if(!this.showDescriptionInput)return i("button",{type:"button",class:"description",onClick:this.toggleDescriptionInput},"+ Description")}renderAliasInput(){if(this.showAliasInput)return i("div",{class:"input-group"},i("limel-input-field",{label:"Alias",value:this.item.alias||"",placeholder:"Custom property name...",onChange:this.handleAliasChange,onBlur:this.handleAliasBlur,leadingIcon:"add_tag"}),i("limel-icon-button",{class:"remove-alias",icon:"multiply",onClick:this.toggleAliasInput,label:"Remove alias",disabled:!!this.item.alias}))}renderDescriptionInput(){if(this.showDescriptionInput)return i("div",{class:"input-group"},i("limel-input-field",{label:"Description",value:this.item.description||"",placeholder:"Describe this property for AI...",onChange:this.handleDescriptionChange,onBlur:this.handleDescriptionBlur,leadingIcon:"comments"}),i("limel-icon-button",{class:"remove-description",icon:"multiply",onClick:this.toggleDescriptionInput,label:"Remove description",disabled:!!this.item.description}))}};d.style='@charset "UTF-8";*{box-sizing:border-box;min-width:0}:host(limebb-lime-query-response-format-item){display:flex;flex-direction:column;gap:0.5rem}.property-controls{transition:box-shadow 0.4s ease, background-color 0.6s ease;display:flex;align-items:flex-start;gap:0.5rem;width:100%;padding:0.75rem 0.75rem 0 0.75rem;border-radius:0.75rem}.property-controls:hover,.property-controls:focus,.property-controls:focus-within{transition-duration:0.2s;background-color:rgb(var(--contrast-100));box-shadow:var(--shadow-inflated-16)}.property-controls limel-icon-button{margin-top:0.125rem}.property-path{flex-grow:1;display:flex;flex-direction:column;padding-bottom:0.25rem}.button-group,.input-group{padding-left:1rem}.button-group:not(:empty),.input-group:not(:empty){padding-top:0.25rem;padding-bottom:0.25rem}.button-group{display:flex;gap:0.5rem;align-items:center}.button-group button{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent}.button-group button:hover,.button-group button:focus,.button-group button:focus-visible{will-change:color, background-color, box-shadow, transform}.button-group button:hover,.button-group button:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.button-group button:hover{box-shadow:var(--button-shadow-hovered)}.button-group button:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.button-group button:hover,.button-group button:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.button-group button:focus{outline:none}.button-group button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.button-group button{font-size:0.625rem;padding:0 0.5rem 0 0.25rem;display:flex;align-items:center;gap:0.25rem;border-radius:0.25rem}.button-group button:hover{transform:scale(1.2)}.button-group limel-icon{width:1rem}.input-group{display:flex;align-items:center}.input-group limel-input-field{flex-grow:1}.input-group limel-icon-button{transform:scale(0.85)}.metadata{flex-grow:1;padding-left:1rem}@media (max-width: 768px){.property-controls{flex-direction:column;gap:0.5rem}}.input-grid{--limebb-l-q-r-f-i--opacity-transition-speed:0.1s;--limebb-l-q-r-f-i--opacity-transition-delay:0s;--limebb-l-q-r-f-i--grid-template-rows-transition-speed:0.3s;transition:grid-template-rows var(--limebb-l-q-r-f-i--grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0fr}.input-grid .input-group{transition:opacity var(--limebb-l-q-r-f-i--opacity-transition-speed) ease var(--limebb-l-q-r-f-i--opacity-transition-delay), padding var(--limebb-l-q-r-f-i--opacity-transition-speed) ease var(--limebb-l-q-r-f-i--opacity-transition-delay);overflow:hidden;opacity:0}.input-grid:not(:empty){--limebb-l-q-r-f-i--opacity-transition-speed:0.2s;--limebb-l-q-r-f-i--opacity-transition-delay:0.1s;--limebb-l-q-r-f-i--grid-template-rows-transition-speed:0.2s;grid-template-rows:1fr}.input-grid:not(:empty) .input-group{opacity:1}.button-group:hover .input-grid{will-change:grid-template-rows}.button-group:hover .input-group{will-change:opacity, padding}';export{p as limebb_lime_query_response_format_editor,d as limebb_lime_query_response_format_item}
|
package/dist/types/components/condition-tree/condition-tree-editor/condition-tree-editor.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { IconName } from '@limetech/lime-elements';
|
|
2
3
|
import { ComponentDescriptor, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
3
4
|
/**
|
|
4
5
|
* The body of a condition's editor popover: the consumer's editor, and — for a
|
|
@@ -43,6 +44,12 @@ export declare class ConditionTreeEditor {
|
|
|
43
44
|
* show at all.
|
|
44
45
|
*/
|
|
45
46
|
heading?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The condition's glyph, shown beside the heading. The same one the chip
|
|
49
|
+
* carries, so that the popover reads as the chip opened up rather than as
|
|
50
|
+
* somewhere else.
|
|
51
|
+
*/
|
|
52
|
+
icon?: IconName;
|
|
46
53
|
/**
|
|
47
54
|
* Whether the condition is negated. `undefined` means the condition
|
|
48
55
|
* expresses its own polarity and no switch is offered.
|
|
@@ -71,11 +78,21 @@ export declare class ConditionTreeEditor {
|
|
|
71
78
|
conditionChange: EventEmitter<any>;
|
|
72
79
|
render(): any[] | null;
|
|
73
80
|
/**
|
|
74
|
-
* The header
|
|
75
|
-
*
|
|
76
|
-
*
|
|
81
|
+
* The header names the condition being edited, and holds the switch that
|
|
82
|
+
* negates it.
|
|
83
|
+
*
|
|
84
|
+
* A condition that owns its polarity gets no header at all — its editor is
|
|
85
|
+
* the whole popover, exactly as if this element weren't here. Its chip has
|
|
86
|
+
* just been clicked, so a heading directly beneath it would only say again
|
|
87
|
+
* what the chip already says, and there is nothing else for the header to
|
|
88
|
+
* carry.
|
|
77
89
|
*/
|
|
78
90
|
private renderHeader;
|
|
91
|
+
/**
|
|
92
|
+
* Nothing while the tree is read-only — but the heading above stays, so
|
|
93
|
+
* that a condition nobody may change is still one the reader can name.
|
|
94
|
+
*/
|
|
95
|
+
private renderNegate;
|
|
79
96
|
private renderBody;
|
|
80
97
|
private get negateLabel();
|
|
81
98
|
private handleNegate;
|
|
@@ -109,15 +109,22 @@ export declare class ConditionTreeWalker<T> {
|
|
|
109
109
|
*/
|
|
110
110
|
rejoinAt(root: T, path: ConditionTreePath, combinator: ConditionTreeCombinator): T | undefined;
|
|
111
111
|
/**
|
|
112
|
-
* The
|
|
112
|
+
* The condition at `path`, negated or not — the condition itself, not a
|
|
113
|
+
* tree holding it.
|
|
113
114
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
115
|
+
* Handed back on its own because negating replaces the condition, and
|
|
116
|
+
* whatever is watching the one being replaced has to be told which object
|
|
117
|
+
* takes its place before the new tree goes out. Putting it into the tree is
|
|
118
|
+
* `replaceAt`, one step later.
|
|
119
|
+
*
|
|
120
|
+
* `undefined` when there is nothing at `path`, or when the adapter has no
|
|
121
|
+
* way to rebuild a negated condition — it has already told the tree not to
|
|
122
|
+
* offer the control.
|
|
116
123
|
* @param root
|
|
117
124
|
* @param path
|
|
118
125
|
* @param negated
|
|
119
126
|
*/
|
|
120
|
-
|
|
127
|
+
negated(root: T, path: ConditionTreePath, negated: boolean): T | undefined;
|
|
121
128
|
/**
|
|
122
129
|
* A group holding `children`, or nothing at all when there are none left: a
|
|
123
130
|
* group with nothing in it says nothing, so it goes the way of its last
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionalComponent } from '../../stencil-public-runtime';
|
|
2
|
-
import { ListSeparator, MenuItem } from '@limetech/lime-elements';
|
|
2
|
+
import { ListSeparator, MenuItem, MenuSearcher } from '@limetech/lime-elements';
|
|
3
3
|
import { LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
4
4
|
import { ConditionTreeCombinator } from './condition-tree.types';
|
|
5
5
|
import { ConditionTreePath, ConditionTreeWalker } from './condition-tree-nodes';
|
|
@@ -23,8 +23,9 @@ export interface ConditionTreeRenderContext {
|
|
|
23
23
|
negatable: boolean;
|
|
24
24
|
openNode: unknown;
|
|
25
25
|
addOptions?: Array<MenuItem | ListSeparator>;
|
|
26
|
+
addSearcher?: MenuSearcher;
|
|
26
27
|
onAddLeaf: (path: ConditionTreePath, item?: MenuItem) => void;
|
|
27
|
-
onAddGroup: (path: ConditionTreePath) => void;
|
|
28
|
+
onAddGroup: (path: ConditionTreePath, item?: MenuItem) => void;
|
|
28
29
|
onDelete: (path: ConditionTreePath) => void;
|
|
29
30
|
onCombinator: (path: ConditionTreePath, combinator: ConditionTreeCombinator) => void;
|
|
30
31
|
onNegate: (path: ConditionTreePath, negated: boolean) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
3
3
|
import { ConditionTreeAdapter, ConditionTreeCombinator } from './condition-tree.types';
|
|
4
|
-
import { ListSeparator, MenuItem } from '@limetech/lime-elements';
|
|
4
|
+
import { ListSeparator, MenuItem, MenuSearcher } from '@limetech/lime-elements';
|
|
5
5
|
/**
|
|
6
6
|
* The shared skeleton for editing a tree of conditions: nested groups joined by
|
|
7
7
|
* "All of the following" or "Any of the following", or the negations of those
|
|
@@ -78,6 +78,16 @@ export declare class ConditionTree implements LimeWebComponent {
|
|
|
78
78
|
* the button it hangs from lives inside this component.
|
|
79
79
|
*/
|
|
80
80
|
addOptions?: Array<MenuItem | ListSeparator>;
|
|
81
|
+
/**
|
|
82
|
+
* How to narrow `addOptions` as the user types, which is what puts a search
|
|
83
|
+
* field at the top of the add menu.
|
|
84
|
+
*
|
|
85
|
+
* Worth setting as soon as the kinds on offer stop fitting on a screen —
|
|
86
|
+
* and a consumer whose kinds are contributed by add-ons cannot know that
|
|
87
|
+
* they still do. `addOptions` is still what the menu opens on, so an
|
|
88
|
+
* unsearched menu reads exactly as it did before.
|
|
89
|
+
*/
|
|
90
|
+
addSearcher?: MenuSearcher;
|
|
81
91
|
/**
|
|
82
92
|
* Set to `true` when the tree is not the viewer's to change: the add,
|
|
83
93
|
* delete and negate controls are not rendered at all, leaving the
|
|
@@ -123,6 +133,18 @@ export declare class ConditionTree implements LimeWebComponent {
|
|
|
123
133
|
*/
|
|
124
134
|
private renderEmptyState;
|
|
125
135
|
private renderContext;
|
|
136
|
+
/**
|
|
137
|
+
* Negate the condition at `path`, or stop negating it.
|
|
138
|
+
*
|
|
139
|
+
* Negating rebuilds the condition, so the one an open editor is bound to
|
|
140
|
+
* is about to be a different object. Saying which object that is, before
|
|
141
|
+
* the edit goes out, is what keeps the editor from shutting under the very
|
|
142
|
+
* switch the user just reached for — the same courtesy an editor's own
|
|
143
|
+
* change already gets.
|
|
144
|
+
* @param path
|
|
145
|
+
* @param negated
|
|
146
|
+
*/
|
|
147
|
+
private negate;
|
|
126
148
|
private addLeaf;
|
|
127
149
|
/**
|
|
128
150
|
* A nested group is joined the other way round from the one holding it: a
|
|
@@ -130,15 +152,26 @@ export declare class ConditionTree implements LimeWebComponent {
|
|
|
130
152
|
* not already say.
|
|
131
153
|
* @param path
|
|
132
154
|
*/
|
|
133
|
-
private addGroup;
|
|
134
155
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
156
|
+
* Add a group, holding the one condition it was asked for.
|
|
157
|
+
*
|
|
158
|
+
* A group is never handed over with nothing in it, which is the same rule
|
|
159
|
+
* by which a group emptied of its last condition is dropped rather than
|
|
160
|
+
* kept — and here it is not tidiness but arithmetic. An empty group is not
|
|
161
|
+
* an undecided one: `all` of nothing is true and `any` of nothing is
|
|
162
|
+
* false, so a group left unfilled answers for itself. Since a new group
|
|
163
|
+
* joins the other way round from the one holding it, that answer is always
|
|
164
|
+
* the one that settles its parent, and every real condition beside it
|
|
165
|
+
* stops counting.
|
|
166
|
+
*
|
|
167
|
+
* So the consumer that names its kinds is asked which one first — the same
|
|
168
|
+
* question the add-condition button asks, put before the group is made
|
|
169
|
+
* rather than after. One that names none has only one kind to make, and
|
|
170
|
+
* the tree makes it.
|
|
171
|
+
* @param path
|
|
172
|
+
* @param item
|
|
140
173
|
*/
|
|
141
|
-
private
|
|
174
|
+
private addGroup;
|
|
142
175
|
/**
|
|
143
176
|
* Add a condition, or a group to put conditions in.
|
|
144
177
|
*
|
|
@@ -113,7 +113,8 @@ export interface ConditionTreeLeafDescription {
|
|
|
113
113
|
* the tree knowing what it edits. See {@link ConditionEditor} for the
|
|
114
114
|
* contract that editor is held to.
|
|
115
115
|
*
|
|
116
|
-
* A
|
|
116
|
+
* A condition with no editor and no `negated` is not clickable: there
|
|
117
|
+
* would be nothing in its popover to show.
|
|
117
118
|
*/
|
|
118
119
|
editor?: ComponentDescriptor;
|
|
119
120
|
/**
|
|
@@ -225,6 +226,11 @@ export interface ConditionTreeAdapter<T> {
|
|
|
225
226
|
* the tree was given no options to offer: the consumer is then free to
|
|
226
227
|
* decide what a new condition is — typically a blank one, left for its
|
|
227
228
|
* editor to fill in.
|
|
229
|
+
*
|
|
230
|
+
* Build a fresh one every time, rather than handing back a shared blank.
|
|
231
|
+
* The tree tells conditions apart by identity, so two that are the same
|
|
232
|
+
* object are one condition to it: they open, highlight and count as visited
|
|
233
|
+
* together, and only the first of them ever opens itself.
|
|
228
234
|
* @param item
|
|
229
235
|
*/
|
|
230
236
|
createLeaf(item?: MenuItem): T;
|
|
@@ -302,6 +308,17 @@ export interface ConditionChip extends Omit<ConditionTreeChip, 'component'> {
|
|
|
302
308
|
*/
|
|
303
309
|
selected: boolean;
|
|
304
310
|
/**
|
|
311
|
+
* Whether the condition is the viewer's to change.
|
|
312
|
+
*
|
|
313
|
+
* What it takes away is the chip's own writing on the rule — nothing
|
|
314
|
+
* more. Whether the chip still opens is the chip's to decide, and the two
|
|
315
|
+
* that ship here decide it differently on purpose: a filter condition
|
|
316
|
+
* reads in full while collapsed, so `limebb-filter-chip` goes inert, while
|
|
317
|
+
* a rule condition keeps its arguments behind the chip and nowhere else,
|
|
318
|
+
* so `limebb-rule-condition-chip` stays clickable. The tree does not
|
|
319
|
+
* insist either way — it refuses the edit rather than the click, and
|
|
320
|
+
* `disabled`, which does close the popover, is separate.
|
|
321
|
+
*
|
|
305
322
|
* @inheritdoc
|
|
306
323
|
*/
|
|
307
324
|
readonly: boolean;
|
|
@@ -311,7 +328,9 @@ export interface ConditionChip extends Omit<ConditionTreeChip, 'component'> {
|
|
|
311
328
|
disabled: boolean;
|
|
312
329
|
/**
|
|
313
330
|
* Whether the chip offers a control that deletes the condition. It is
|
|
314
|
-
* `false` while the tree is read-only
|
|
331
|
+
* `false` while the tree is read-only — and a chip that withholds
|
|
332
|
+
* `readonly` from whatever it draws the cross with owes it the same
|
|
333
|
+
* answer itself.
|
|
315
334
|
*/
|
|
316
335
|
removable: boolean;
|
|
317
336
|
/**
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { PrimitiveMetadata, Rule, RuleRef } from '@limetech/lime-web-components';
|
|
2
|
+
import { ConditionTreeAdapter, ConditionTreeCombinator } from '../condition-tree/condition-tree.types';
|
|
3
|
+
/**
|
|
4
|
+
* Everything the adapter needs to read a rule that is not in the rule itself.
|
|
5
|
+
*
|
|
6
|
+
* What changes without the rule changing is a field, and a new adapter is what
|
|
7
|
+
* redraws the tree for it. What changes with the rule is a handle, so that
|
|
8
|
+
* validation can write what it found into the redraw already under way.
|
|
9
|
+
*/
|
|
10
|
+
export interface RuleConditionSource {
|
|
11
|
+
/**
|
|
12
|
+
* Every registered primitive, by id — including the ones the add menu does
|
|
13
|
+
* not offer, so that a condition already in the tree still reads by its
|
|
14
|
+
* proper name.
|
|
15
|
+
*/
|
|
16
|
+
metadata: Map<string, PrimitiveMetadata>;
|
|
17
|
+
/**
|
|
18
|
+
* How each primitive reads, by id, translated once where it is indexed —
|
|
19
|
+
* `describe` runs several times per node per edit, and the platform's
|
|
20
|
+
* translator parses the message afresh on every call.
|
|
21
|
+
*/
|
|
22
|
+
titles: Map<string, string>;
|
|
23
|
+
/**
|
|
24
|
+
* The adapter's own wording, with the English to fall back on when the
|
|
25
|
+
* platform has no translation for it.
|
|
26
|
+
*/
|
|
27
|
+
translate: (key: string, fallback: string) => string;
|
|
28
|
+
/**
|
|
29
|
+
* What validation found, by the node it belongs to. See `rule-issues.ts`.
|
|
30
|
+
*/
|
|
31
|
+
issues: () => Map<Rule, string[]>;
|
|
32
|
+
/**
|
|
33
|
+
* The conditions the author has just added, which a `RuleRef` does not
|
|
34
|
+
* record: two references to the same primitive are the same rule whether
|
|
35
|
+
* one arrived a moment ago or both came from storage. Only a condition in
|
|
36
|
+
* here opens its own editor.
|
|
37
|
+
*/
|
|
38
|
+
created: () => WeakSet<object>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* How `limebb-condition-tree` reads and rebuilds a {@link Rule}. Everything
|
|
42
|
+
* structural belongs to the tree; everything about what a rule *is* belongs
|
|
43
|
+
* here.
|
|
44
|
+
* @param source
|
|
45
|
+
*/
|
|
46
|
+
export declare function createRuleConditionTreeAdapter(source: RuleConditionSource): ConditionTreeAdapter<Rule>;
|
|
47
|
+
/**
|
|
48
|
+
* How the rule joins what is inside it, and what that is — or nothing when it
|
|
49
|
+
* is a single condition rather than a group. A `not` is transparent: it becomes
|
|
50
|
+
* the group's combinator, and chains of them fold down to one.
|
|
51
|
+
* @param rule
|
|
52
|
+
*/
|
|
53
|
+
export declare function groupOf(rule: Rule): {
|
|
54
|
+
combinator: ConditionTreeCombinator;
|
|
55
|
+
rules: Rule[];
|
|
56
|
+
} | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The primitive a rule refers to, and whether it is negated — or nothing when
|
|
59
|
+
* the rule refers to none. Wrapping in a `not` is the only negation a rule
|
|
60
|
+
* condition has, having no "is not" vocabulary of its own.
|
|
61
|
+
* @param rule
|
|
62
|
+
*/
|
|
63
|
+
export declare function refOf(rule: Rule): {
|
|
64
|
+
ref: RuleRef;
|
|
65
|
+
negated: boolean;
|
|
66
|
+
} | undefined;
|
|
67
|
+
//# sourceMappingURL=condition-tree-adapter.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { IconName } from '@limetech/lime-elements';
|
|
3
|
+
import { LimeWebComponentPlatform } from '@limetech/lime-web-components';
|
|
4
|
+
/**
|
|
5
|
+
* A rule condition as a chip, in place of the `limebb-filter-chip` the tree
|
|
6
|
+
* draws by default.
|
|
7
|
+
*
|
|
8
|
+
* A filter condition is a sentence and that chip lays it out as one, with the
|
|
9
|
+
* property captioned above the value. A rule condition is a name with no value
|
|
10
|
+
* under it, so the name is the whole chip. Implements `ConditionChip`.
|
|
11
|
+
*
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
export declare class RuleConditionChip {
|
|
15
|
+
/**
|
|
16
|
+
* Platform service provider. Unread, but declared so that the tree setting
|
|
17
|
+
* it does not leave it in the DOM as an attribute.
|
|
18
|
+
*/
|
|
19
|
+
platform: LimeWebComponentPlatform;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the condition.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* The condition's glyph.
|
|
26
|
+
*/
|
|
27
|
+
icon?: IconName;
|
|
28
|
+
/**
|
|
29
|
+
* The glyph's colour, which travels beside the name because
|
|
30
|
+
* `ConditionTreeChip.icon` has no room for it.
|
|
31
|
+
*/
|
|
32
|
+
iconColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the condition is negated. The chip has to say so: the switch that
|
|
35
|
+
* sets it is out of sight inside the editor.
|
|
36
|
+
*/
|
|
37
|
+
negated: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritdoc
|
|
40
|
+
*/
|
|
41
|
+
invalid: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether this condition's editor is the one currently open.
|
|
44
|
+
*/
|
|
45
|
+
selected: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Deliberately not passed on to `limel-chip`, which would render it as a
|
|
48
|
+
* disabled button. A condition's arguments live behind this chip and
|
|
49
|
+
* nowhere else, so a chip that cannot be opened is a rule that cannot be
|
|
50
|
+
* read. It takes the delete control away instead — see `removable`.
|
|
51
|
+
*
|
|
52
|
+
* @inheritdoc
|
|
53
|
+
*/
|
|
54
|
+
readonly: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* @inheritdoc
|
|
57
|
+
*/
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the chip offers a control that deletes the condition. `readonly`
|
|
61
|
+
* overrules it here rather than in the caller, since withholding `readonly`
|
|
62
|
+
* from `limel-chip` also withholds the lock it puts on the cross.
|
|
63
|
+
*/
|
|
64
|
+
removable: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Emitted when the author asks for the condition to be deleted.
|
|
67
|
+
*/
|
|
68
|
+
remove: EventEmitter<void>;
|
|
69
|
+
render(): any;
|
|
70
|
+
/**
|
|
71
|
+
* The glyph, with its colour put back on when it has one.
|
|
72
|
+
*/
|
|
73
|
+
private get glyph();
|
|
74
|
+
/**
|
|
75
|
+
* The name, behind `¬` when negated — a symbol rather than a word, so it
|
|
76
|
+
* does not compete with the "not" the tree writes between the rows of a
|
|
77
|
+
* negated group.
|
|
78
|
+
*/
|
|
79
|
+
private get text();
|
|
80
|
+
private handleRemove;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=rule-condition-chip.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../stencil-public-runtime';
|
|
2
|
+
import { ComponentDescriptor, LimeWebComponentContext, LimeWebComponentPlatform, Rule } from '@limetech/lime-web-components';
|
|
3
|
+
/**
|
|
4
|
+
* The editor `limebb-condition-tree` opens for one rule condition: whatever
|
|
5
|
+
* component the primitive named as its `configComponent`.
|
|
6
|
+
*
|
|
7
|
+
* The two sides speak about different things. The tree passes a whole condition
|
|
8
|
+
* and listens for `conditionChange`; a config component edits the reference's
|
|
9
|
+
* `args` and reports a plain `change`. Config components are registered by
|
|
10
|
+
* add-ons this repo does not own, so this side is the one that translates.
|
|
11
|
+
*
|
|
12
|
+
* @alpha
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
export declare class RuleConditionEditor {
|
|
16
|
+
/**
|
|
17
|
+
* Platform service provider
|
|
18
|
+
*/
|
|
19
|
+
platform: LimeWebComponentPlatform;
|
|
20
|
+
/**
|
|
21
|
+
* Component context
|
|
22
|
+
*/
|
|
23
|
+
context: LimeWebComponentContext;
|
|
24
|
+
/**
|
|
25
|
+
* The condition being edited: a reference to a primitive, or the `not`
|
|
26
|
+
* around one.
|
|
27
|
+
*/
|
|
28
|
+
value: Rule;
|
|
29
|
+
/**
|
|
30
|
+
* The component the primitive declared for editing its args.
|
|
31
|
+
*/
|
|
32
|
+
configComponent: ComponentDescriptor;
|
|
33
|
+
/**
|
|
34
|
+
* Forwarded so that component can take focus as it appears. Set only for a
|
|
35
|
+
* condition the author has just added.
|
|
36
|
+
*/
|
|
37
|
+
focusOnOpen: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* @inheritdoc
|
|
40
|
+
*/
|
|
41
|
+
readonly: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritdoc
|
|
44
|
+
*/
|
|
45
|
+
disabled: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Emitted with the whole condition, args and negation together, whenever
|
|
48
|
+
* the config component reports new args.
|
|
49
|
+
*/
|
|
50
|
+
conditionChange: EventEmitter<Rule>;
|
|
51
|
+
render(): any;
|
|
52
|
+
private get reference();
|
|
53
|
+
/**
|
|
54
|
+
* The config component's `change` bubbles and is composed, so it would
|
|
55
|
+
* otherwise reach the rule editor and be taken for the whole rule changing.
|
|
56
|
+
* It stops here and leaves as the event the tree listens for.
|
|
57
|
+
* @param event
|
|
58
|
+
*/
|
|
59
|
+
private handleChange;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=rule-condition-editor.d.ts.map
|