@limetech/lime-crm-building-blocks 2.0.4 → 2.2.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 +19 -0
- package/dist/cjs/condition-tree-translate-B_qIQz9s.js +27 -0
- package/dist/cjs/index.cjs.js +6 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.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 +4 -4
- package/dist/cjs/limebb-chat-list.cjs.entry.js +1 -1
- 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-composer-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/limebb-condition-tree-editor.cjs.entry.js +90 -0
- package/dist/cjs/limebb-condition-tree.cjs.entry.js +882 -0
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/limebb-document-picker.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 +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-filter-chip_6.cjs.entry.js +7 -7
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +2 -2
- package/dist/cjs/limebb-rule-editor.cjs.entry.js +162 -22
- package/dist/cjs/limebb-rule-gate.cjs.entry.js +1 -1
- package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/rule-editor-modes-Dc6rnwD2.js +76 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/alert-dialog/alert-dialog.js +1 -1
- package/dist/collection/components/browser/browser.js +2 -2
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +1 -1
- package/dist/collection/components/chat-list/chat-item/chat-item.js +2 -2
- package/dist/collection/components/chat-list/chat-list.js +1 -1
- package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/color-palette-picker/color-palette-picker.js +1 -1
- package/dist/collection/components/color-palette-picker/color-palette-swatches/color-palette-swatches.js +1 -1
- package/dist/collection/components/composer-toolbar/composer-toolbar.js +2 -2
- package/dist/collection/components/condition-tree/condition-tree-combinators.js +78 -0
- package/dist/collection/components/condition-tree/condition-tree-editor/condition-tree-editor.css +17 -0
- package/dist/collection/components/condition-tree/condition-tree-editor/condition-tree-editor.js +333 -0
- package/dist/collection/components/condition-tree/condition-tree-nodes.js +218 -0
- package/dist/collection/components/condition-tree/condition-tree-open-state.js +127 -0
- package/dist/collection/components/condition-tree/condition-tree-translate.js +22 -0
- package/dist/collection/components/condition-tree/condition-tree-view-context.js +22 -0
- package/dist/collection/components/condition-tree/condition-tree.css +132 -0
- package/dist/collection/components/condition-tree/condition-tree.js +461 -0
- package/dist/collection/components/condition-tree/condition-tree.types.js +1 -0
- package/dist/collection/components/condition-tree/group-node-view.js +153 -0
- package/dist/collection/components/condition-tree/leaf-node-view.js +74 -0
- package/dist/collection/components/currency-picker/currency-picker.js +1 -1
- package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-range/date-range.js +1 -1
- package/dist/collection/components/document-chips/document-chips.js +1 -1
- package/dist/collection/components/document-picker/document-item/document-item.js +2 -2
- package/dist/collection/components/document-picker/document-picker.js +1 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
- package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/filter-chip/filter-chip.js +2 -2
- package/dist/collection/components/filter-condition-picker/filter-condition-picker.js +1 -1
- package/dist/collection/components/icon-picker/icon-picker.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +1 -1
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison-editor.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +2 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +2 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
- package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +1 -1
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +1 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/rule-editor/group-node-view.js +3 -3
- package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +2 -2
- package/dist/collection/components/rule-editor/rule-editor-mode-view.js +32 -0
- package/dist/collection/components/rule-editor/rule-editor-modes.js +68 -0
- package/dist/collection/components/rule-editor/rule-editor.css +153 -12
- package/dist/collection/components/rule-editor/rule-editor.js +201 -19
- package/dist/collection/components/rule-editor/rule-editor.types.js +1 -0
- package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js +1 -1
- package/dist/collection/components/rule-gate/rule-gate.js +1 -1
- package/dist/collection/components/summary-popover/summary-popover.js +2 -2
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/collection/index.js +2 -0
- package/dist/components/chat-icon-list.js +1 -1
- package/dist/components/chat-item.js +1 -1
- package/dist/components/condition-tree-editor.js +1 -0
- package/dist/components/currency-picker.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/document-item.js +1 -1
- package/dist/components/feed-item-thumbnail-file-info.js +1 -1
- package/dist/components/feed-timeline-item.js +1 -1
- package/dist/components/filter-chip.js +1 -1
- package/dist/components/filter-condition-picker.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/kanban-group.js +1 -1
- package/dist/components/kanban-item.js +1 -1
- package/dist/components/lime-query-filter-comparison-editor.js +1 -1
- package/dist/components/lime-query-filter-comparison.js +1 -1
- package/dist/components/lime-query-filter-expression.js +1 -1
- package/dist/components/limebb-alert-dialog.js +1 -1
- package/dist/components/limebb-browser.js +1 -1
- package/dist/components/limebb-chat-list.js +1 -1
- package/dist/components/limebb-color-palette-picker.js +1 -1
- package/dist/components/limebb-color-palette-swatches.js +1 -1
- package/dist/components/limebb-composer-toolbar.js +1 -1
- package/dist/components/limebb-condition-tree-editor.d.ts +11 -0
- package/dist/components/limebb-condition-tree-editor.js +1 -0
- package/dist/components/limebb-condition-tree.d.ts +11 -0
- package/dist/components/limebb-condition-tree.js +1 -0
- package/dist/components/limebb-dashboard-widget.js +1 -1
- package/dist/components/limebb-date-range.js +1 -1
- package/dist/components/limebb-document-chips.js +1 -1
- package/dist/components/limebb-document-picker.js +1 -1
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-icon-picker.js +1 -1
- package/dist/components/limebb-info-tile-format.js +1 -1
- package/dist/components/limebb-info-tile.js +1 -1
- package/dist/components/limebb-lime-query-builder.js +1 -1
- package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +1 -1
- package/dist/components/limebb-rule-editor.js +1 -1
- package/dist/components/limebb-rule-gate.js +1 -1
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limebb-value-comparison-editor.js +1 -1
- package/dist/components/limetype-field.js +1 -1
- package/dist/components/live-docs-info.js +1 -1
- package/dist/components/notification-item.js +1 -1
- package/dist/components/order-by-editor.js +1 -1
- package/dist/components/order-by-item.js +1 -1
- package/dist/components/percentage-visualizer.js +1 -1
- package/dist/components/response-format-item.js +1 -1
- package/dist/components/rule-chip-popover.js +1 -1
- package/dist/components/rule-editor-modes.js +1 -0
- package/dist/components/summary-popover.js +1 -1
- package/dist/components/typing-indicator.js +1 -1
- package/dist/esm/condition-tree-translate-CBeXbZ_z.js +25 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/lime-crm-building-blocks.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 +4 -4
- package/dist/esm/limebb-chat-list.entry.js +1 -1
- 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-composer-toolbar.entry.js +2 -2
- package/dist/esm/limebb-condition-tree-editor.entry.js +88 -0
- package/dist/esm/limebb-condition-tree.entry.js +880 -0
- package/dist/esm/limebb-currency-picker.entry.js +1 -1
- package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/limebb-document-picker.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 +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-filter-chip_6.entry.js +7 -7
- package/dist/esm/limebb-icon-picker.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +1 -1
- package/dist/esm/limebb-kanban-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +2 -2
- package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +2 -2
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +1 -1
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +2 -2
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-rule-chip-popover.entry.js +2 -2
- package/dist/esm/limebb-rule-editor.entry.js +163 -23
- package/dist/esm/limebb-rule-gate.entry.js +1 -1
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/limebb-value-comparison-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/rule-editor-modes-BCglve2Z.js +70 -0
- 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-2f8540ab.entry.js → p-02fba38e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-76151fce.entry.js → p-0445035f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4f0a4893.entry.js → p-0a05b3e9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-0dd64440.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-1578c8f0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-76064593.entry.js → p-170ab4be.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-542047c4.entry.js → p-27b9c824.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2628fe8e.entry.js → p-2d1c7b6f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c2c181f1.entry.js → p-3fd84800.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c7daffb6.entry.js → p-45dd8663.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-cede8095.entry.js → p-4e4d096c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-51eb53ee.entry.js → p-54735042.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c2899d68.entry.js → p-568c4e76.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9907deb1.entry.js → p-584a48e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ac4bddfc.entry.js → p-5b97d4f4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-615770be.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-edfaf566.entry.js → p-6d8efe87.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-705c53c0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-031b1648.entry.js → p-73f23d08.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2baab674.entry.js → p-7c5ecffe.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1fac8130.entry.js → p-7cd8dffd.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-93af3e81.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-247fcace.entry.js → p-97e2e5c9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-BCglve2Z.js +1 -0
- package/dist/lime-crm-building-blocks/p-BxCq236x.js +1 -0
- package/dist/lime-crm-building-blocks/p-a2b9c410.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-f9f7020f.entry.js → p-a716b3a8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-b3529254.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-2bfd351d.entry.js → p-b48d7d23.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b373c60f.entry.js → p-b6807166.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-318369ae.entry.js → p-b6c2d93b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d82a2424.entry.js → p-c46802cd.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9099b440.entry.js → p-c635f826.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-fec173db.entry.js → p-d816fcc8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4594c2b1.entry.js → p-d8ce3497.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0f74d662.entry.js → p-d8d32cb1.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-99556fc0.entry.js → p-de7724f0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-92403251.entry.js → p-e910963c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4274cbe3.entry.js → p-ea6ab8b0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-eedbf69a.entry.js → p-ee7bd504.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e1f35866.entry.js → p-f024c185.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7bb2788b.entry.js → p-f102f169.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2984005d.entry.js → p-f1060c88.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-17588c29.entry.js → p-f3905fa2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ac97c7cc.entry.js → p-fc372344.entry.js} +1 -1
- package/dist/types/components/condition-tree/condition-tree-combinators.d.ts +47 -0
- package/dist/types/components/condition-tree/condition-tree-editor/condition-tree-editor.d.ts +84 -0
- package/dist/types/components/condition-tree/condition-tree-nodes.d.ts +130 -0
- package/dist/types/components/condition-tree/condition-tree-open-state.d.ts +76 -0
- package/dist/types/components/condition-tree/condition-tree-translate.d.ts +11 -0
- package/dist/types/components/condition-tree/condition-tree-view-context.d.ts +48 -0
- package/dist/types/components/condition-tree/condition-tree.d.ts +177 -0
- package/dist/types/components/condition-tree/condition-tree.types.d.ts +323 -0
- package/dist/types/components/condition-tree/group-node-view.d.ts +30 -0
- package/dist/types/components/condition-tree/leaf-node-view.d.ts +21 -0
- package/dist/types/components/rule-editor/rule-editor-mode-view.d.ts +22 -0
- package/dist/types/components/rule-editor/rule-editor-modes.d.ts +43 -0
- package/dist/types/components/rule-editor/rule-editor.d.ts +129 -5
- package/dist/types/components/rule-editor/rule-editor.types.d.ts +16 -0
- package/dist/types/components.d.ts +412 -4
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interface.d.ts +2 -0
- package/package.json +3 -3
- package/dist/lime-crm-building-blocks/p-1e83a491.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-73f79d42.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-761deada.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-b8d74591.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-e8a7a94c.entry.js +0 -1
|
@@ -1,23 +1,138 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
/**
|
|
3
|
+
* Root-level entry point for consuming @limetech/lime-elements SCSS utilities.
|
|
4
|
+
*
|
|
5
|
+
* This file enables the clean import path:
|
|
6
|
+
* `@use '@limetech/lime-elements' as lime-elements;`
|
|
7
|
+
*
|
|
8
|
+
* It simply forwards everything from the built exports file.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Public SCSS exports for consumers of @limetech/lime-elements.
|
|
12
|
+
*
|
|
13
|
+
* This file provides reusable styling utilities.
|
|
14
|
+
*
|
|
15
|
+
* Import this file using:
|
|
16
|
+
* `@use '@limetech/lime-elements' as lime-elements;`
|
|
17
|
+
*
|
|
18
|
+
* For detailed documentation of each utility, its parameters,
|
|
19
|
+
* and usage examples, refer to the respective source files.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Note! This file is forwarded via `src/style/exports.scss`
|
|
23
|
+
* and exposed to consumers through the root `index.scss`.
|
|
24
|
+
*
|
|
25
|
+
* Consumers import it using:
|
|
26
|
+
* `@use '@limetech/lime-elements' as lime-elements;`
|
|
27
|
+
*
|
|
28
|
+
* Legacy import paths (`dist/scss/mixins`) are maintained
|
|
29
|
+
* for backward compatibility via copy rules in the Stencil config.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Neutralizes the user-agent styles that browsers apply to `<button>` elements
|
|
33
|
+
* (their default background, border, padding, font, etc.), without stripping
|
|
34
|
+
* the useful defaults that `all: unset;` would also remove
|
|
35
|
+
* (such as `display`, `cursor`, and focus behavior).
|
|
36
|
+
*
|
|
37
|
+
* Prefer this mixin over `all: unset;` on `<button>` elements, then layer
|
|
38
|
+
* the styling you want on top — often one of the `is-*-clickable` mixins.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
42
|
+
*/
|
|
43
|
+
/**
|
|
44
|
+
* This mixin will mask out the content that is close to
|
|
45
|
+
* the edges of a scrollable area.
|
|
46
|
+
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
47
|
+
* as an argument for `$direction`.
|
|
48
|
+
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
49
|
+
* as an argument for `$direction`.
|
|
50
|
+
*
|
|
51
|
+
* For the visual effect to work smoothly, we need to make sure that
|
|
52
|
+
* the size of the fade-out edge effect is the same as the
|
|
53
|
+
* internal paddings of the scrollable area. Otherwise, content of a
|
|
54
|
+
* scrollable area that does not have a padding will fade out before
|
|
55
|
+
* any scrolling has been done.
|
|
56
|
+
* This is why this mixin already adds paddings, which automatically
|
|
57
|
+
* default to the size of the fade-out effect.
|
|
58
|
+
* This size defaults to `1rem`, but to override the size use
|
|
59
|
+
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
60
|
+
* when `vertically` argument is set, and use
|
|
61
|
+
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
62
|
+
* when `horizontally` argument is set.
|
|
63
|
+
* Of course you can also programmatically increase and decrease the
|
|
64
|
+
* size of these variables for each edge, based on the amount of
|
|
65
|
+
* scrolling that has been done by the user. In this case, make sure
|
|
66
|
+
* to add a custom padding where the mixin is used, to override
|
|
67
|
+
* the paddings that are automatically added by the mixin in the
|
|
68
|
+
* compiled CSS code.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
72
|
+
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
73
|
+
* before using this mixin.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* This mixin creates a cross-browser font stack.
|
|
77
|
+
* - `sans-serif` can be used for the UI of the components.
|
|
78
|
+
* - `monospace` can be used for code.
|
|
79
|
+
*
|
|
80
|
+
* ⚠️ If we change the font stacks, we need to update
|
|
81
|
+
* 1. the consumer documentation in `README.md`, and
|
|
82
|
+
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
83
|
+
* in the `<style>` tag of `index.html`.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* This mixin is a hack, using old CSS syntax
|
|
87
|
+
* to enable you to truncate a piece of text,
|
|
88
|
+
* after a certain number of lines.
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* This mixin will add a chessboard background pattern,
|
|
92
|
+
* typically used to visualize transparency.
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* Make a container resizable by the user.
|
|
96
|
+
* This is used in the documentations and examples
|
|
97
|
+
* of some components, to demonstrate how the component
|
|
98
|
+
* behaves in a resizable container.
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* Drag to reorder mixins
|
|
102
|
+
*/
|
|
103
|
+
/**
|
|
104
|
+
* The breakpoints below are used to create responsive designs
|
|
105
|
+
* in Lime's products. Therefore, they are here to get distributed
|
|
106
|
+
* to all components in other private repos, which rely on this `mixins`
|
|
107
|
+
* file, to create consistent styles.
|
|
108
|
+
*
|
|
109
|
+
* :::important
|
|
110
|
+
* In very rare cases you should used media queries!
|
|
111
|
+
* Nowadays, there are many better ways of achieving responsive design
|
|
112
|
+
* without media queries. For example, using CSS Grid, Flexbox, and their features.
|
|
113
|
+
* :::
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* Media query mixins for responsive design based on screen width.
|
|
117
|
+
* Note that these mixins do not detect the device type!
|
|
118
|
+
*/
|
|
1
119
|
:host {
|
|
2
120
|
display: block;
|
|
121
|
+
position: relative;
|
|
3
122
|
}
|
|
4
123
|
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
-
|
|
124
|
+
.limel-notched-outline {
|
|
125
|
+
--limel-notched-outline-background-color: transparent;
|
|
126
|
+
padding: 0.5rem 0 0 0;
|
|
8
127
|
}
|
|
9
128
|
|
|
10
|
-
.
|
|
11
|
-
|
|
12
|
-
font-weight: 600;
|
|
13
|
-
color: rgb(var(--contrast-1500));
|
|
14
|
-
margin-bottom: 0.25rem;
|
|
129
|
+
limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline {
|
|
130
|
+
--limel-notched-outline-border-color: transparent;
|
|
15
131
|
}
|
|
16
132
|
|
|
17
|
-
.rule-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
margin-top: 0.25rem;
|
|
133
|
+
.rule-editor--disabled {
|
|
134
|
+
opacity: 0.6;
|
|
135
|
+
pointer-events: none;
|
|
21
136
|
}
|
|
22
137
|
|
|
23
138
|
.rule-node {
|
|
@@ -94,4 +209,30 @@ limel-popover.rule-node__chips-popover {
|
|
|
94
209
|
.rule-node__issue {
|
|
95
210
|
color: rgb(var(--color-red-default));
|
|
96
211
|
font-size: 0.875rem;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host(limebb-rule-editor:focus),
|
|
215
|
+
:host(limebb-rule-editor:focus-visible),
|
|
216
|
+
:host(limebb-rule-editor:focus-within) {
|
|
217
|
+
--limel-h-l-grid-template-rows-transition-speed: 0.46s;
|
|
218
|
+
--limel-h-l-grid-template-rows: 1fr;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
:host(limebb-rule-editor) {
|
|
222
|
+
--limel-h-l-grid-template-rows-transition-speed: 0.3s;
|
|
223
|
+
--limel-h-l-grid-template-rows: 0fr;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
:host(limebb-rule-editor:focus) limel-helper-line,
|
|
227
|
+
:host(limebb-rule-editor:focus-visible) limel-helper-line,
|
|
228
|
+
:host(limebb-rule-editor:focus-within) limel-helper-line,
|
|
229
|
+
:host(limebb-rule-editor:hover) limel-helper-line {
|
|
230
|
+
will-change: grid-template-rows;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
limel-help {
|
|
234
|
+
position: absolute;
|
|
235
|
+
top: calc(var(--form-row-gap, 1rem) * -0.5);
|
|
236
|
+
left: calc(var(--form-column-gap, 1rem) * -0.5);
|
|
237
|
+
z-index: 1;
|
|
97
238
|
}
|
|
@@ -8,12 +8,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
9
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
10
|
};
|
|
11
|
-
import { h, } from "@stencil/core";
|
|
11
|
+
import { Host, h, } from "@stencil/core";
|
|
12
12
|
import { PlatformServiceName, SelectContext, } from "@limetech/lime-web-components";
|
|
13
13
|
import { deleteNode, getNode, replaceNode, updateArgs, } from "./rule-operations";
|
|
14
14
|
import { extractGroup, RuleNodeView, } from "./rule-editor-views";
|
|
15
15
|
import { buildChipPath, extractRef } from "./chip-picker-view";
|
|
16
16
|
import { createPrimitiveOptions, primitiveReadsCovered } from "./view-helpers";
|
|
17
|
+
import { RuleModeView } from "./rule-editor-mode-view";
|
|
18
|
+
import { ALWAYS_PRIMITIVE_ID, ruleForMode, ruleMode, } from "./rule-editor-modes";
|
|
19
|
+
import { createRandomString } from "../../util/random-string";
|
|
17
20
|
/**
|
|
18
21
|
* Tree editor for {@link Rule}.
|
|
19
22
|
*
|
|
@@ -44,7 +47,17 @@ import { createPrimitiveOptions, primitiveReadsCovered } from "./view-helpers";
|
|
|
44
47
|
* default (e.g. an admin form's "no selection" context) doesn't shadow a
|
|
45
48
|
* DOM-provided one.
|
|
46
49
|
*
|
|
50
|
+
* Pass `modes` to offer the author a few pre-defined answers above the
|
|
51
|
+
* tree — "Never", "Always", "Conditionally" — so an
|
|
52
|
+
* unconditional state is one click instead of an empty tree they have
|
|
53
|
+
* to reason about. A mode is a way of writing a rule, not a second
|
|
54
|
+
* output: all of them end up in `value`, and `ruleForMode` builds the
|
|
55
|
+
* same rule a click does.
|
|
56
|
+
*
|
|
47
57
|
* @exampleComponent limebb-example-rule-editor
|
|
58
|
+
* @exampleComponent limebb-example-rule-editor-modes
|
|
59
|
+
* @exampleComponent limebb-example-rule-editor-invalid
|
|
60
|
+
* @exampleComponent limebb-example-rule-editor-help
|
|
48
61
|
*
|
|
49
62
|
* @alpha
|
|
50
63
|
* @private
|
|
@@ -53,6 +66,16 @@ export class RuleEditor {
|
|
|
53
66
|
constructor() {
|
|
54
67
|
this.issues = [];
|
|
55
68
|
this.openChipPath = null;
|
|
69
|
+
/**
|
|
70
|
+
* The mode the author last clicked, held until `value` reads back
|
|
71
|
+
* as it.
|
|
72
|
+
*
|
|
73
|
+
* A purely derived mode cannot express one case: `conditional` with
|
|
74
|
+
* nothing to restore emits no rule, so the derivation would fall
|
|
75
|
+
* back to the first offered mode and snap the control away from
|
|
76
|
+
* what the author just clicked.
|
|
77
|
+
*/
|
|
78
|
+
this.modeOverride = null;
|
|
56
79
|
this.focusOnOpen = false;
|
|
57
80
|
this.metadataById = new Map();
|
|
58
81
|
this.allPrimitiveOptions = [];
|
|
@@ -60,6 +83,26 @@ export class RuleEditor {
|
|
|
60
83
|
this.reachableSlots = new Set();
|
|
61
84
|
this.normalizedCache = null;
|
|
62
85
|
this.hasLoaded = false;
|
|
86
|
+
this.labelId = createRandomString();
|
|
87
|
+
this.helperTextId = createRandomString();
|
|
88
|
+
/**
|
|
89
|
+
* Write the picked mode as a rule and emit it. The tree the author
|
|
90
|
+
* had is stashed on the way out, so picking `conditional` again
|
|
91
|
+
* puts it back instead of starting from empty. An emptied tree is
|
|
92
|
+
* stashed too — restoring it is what tells the author their
|
|
93
|
+
* conditions are gone, rather than handing back the ones they
|
|
94
|
+
* removed. With nothing stashed, `conditional` emits no rule, which
|
|
95
|
+
* is how the editor already says "the author cleared this".
|
|
96
|
+
* @param mode
|
|
97
|
+
*/
|
|
98
|
+
this.handleModeChange = (mode) => {
|
|
99
|
+
var _a;
|
|
100
|
+
if (this.currentMode === 'conditional') {
|
|
101
|
+
this.stashedTree = this.value;
|
|
102
|
+
}
|
|
103
|
+
this.modeOverride = mode;
|
|
104
|
+
this.change.emit((_a = ruleForMode(mode)) !== null && _a !== void 0 ? _a : this.stashedTree);
|
|
105
|
+
};
|
|
63
106
|
this.handleDelete = (path) => {
|
|
64
107
|
this.openChipPath = null;
|
|
65
108
|
this.focusOnOpen = false;
|
|
@@ -113,6 +156,7 @@ export class RuleEditor {
|
|
|
113
156
|
this.emitNormalization();
|
|
114
157
|
}
|
|
115
158
|
onValueChange() {
|
|
159
|
+
this.clearReachedModeOverride();
|
|
116
160
|
if (this.emitNormalization()) {
|
|
117
161
|
return;
|
|
118
162
|
}
|
|
@@ -122,23 +166,42 @@ export class RuleEditor {
|
|
|
122
166
|
this.rebuildFromRegistries();
|
|
123
167
|
}
|
|
124
168
|
render() {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
169
|
+
return (h(Host, { key: '4b342b249b781177e52a63b864e85ba3d17f7239' }, this.renderHelp(), h("limel-notched-outline", { key: 'e6ffe3d2dc9226e99be1f56bdd3274528b4d917f', label: this.label, labelId: this.labelId, required: this.required, readonly: this.readonly, disabled: this.disabled, invalid: this.invalid, hasValue: true, hasFloatingLabel: true }, h("div", { key: '790a6c064d07647ab3bbe5687af7a763f49e1982', slot: "content", class: {
|
|
170
|
+
'rule-editor': true,
|
|
171
|
+
'rule-editor--disabled': this.disabled,
|
|
172
|
+
}, role: "group", "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderModes(), this.renderTree())), this.renderHelperLine()));
|
|
173
|
+
}
|
|
174
|
+
renderModes() {
|
|
175
|
+
const modes = this.modes;
|
|
176
|
+
const selected = this.currentMode;
|
|
177
|
+
if (!modes || !selected) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
return (h(RuleModeView, { modes: modes, selected: selected, disabled: this.disabled || this.readonly, translator: this.translator, onModeChange: this.handleModeChange }));
|
|
130
181
|
}
|
|
131
|
-
|
|
132
|
-
|
|
182
|
+
/**
|
|
183
|
+
* The condition tree, shown unless a mode other than `conditional`
|
|
184
|
+
* is selected — an unconditional rule has no conditions to show.
|
|
185
|
+
* A caller offering no modes at all gets the tree, as before.
|
|
186
|
+
*/
|
|
187
|
+
renderTree() {
|
|
188
|
+
const mode = this.currentMode;
|
|
189
|
+
if (mode && mode !== 'conditional') {
|
|
133
190
|
return null;
|
|
134
191
|
}
|
|
135
|
-
return h(
|
|
192
|
+
return (h(RuleNodeView, { node: this.normalizedValue, path: [], ctx: this.createRenderContext() }));
|
|
136
193
|
}
|
|
137
|
-
|
|
194
|
+
renderHelperLine() {
|
|
138
195
|
if (!this.helperText) {
|
|
139
196
|
return null;
|
|
140
197
|
}
|
|
141
|
-
return h("
|
|
198
|
+
return (h("limel-helper-line", { helperText: this.helperText, helperTextId: this.helperTextId, invalid: this.invalid }));
|
|
199
|
+
}
|
|
200
|
+
renderHelp() {
|
|
201
|
+
if (!this.help) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
return h("limel-help", { value: this.help });
|
|
142
205
|
}
|
|
143
206
|
createRenderContext() {
|
|
144
207
|
return {
|
|
@@ -161,6 +224,39 @@ export class RuleEditor {
|
|
|
161
224
|
onPopoverClose: this.handlePopoverClose,
|
|
162
225
|
};
|
|
163
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* The mode the editor is in, or `undefined` when it offers none —
|
|
229
|
+
* then it is the plain tree editor it was before modes existed.
|
|
230
|
+
*
|
|
231
|
+
* Derived from `value`, falling back to the first offered mode for
|
|
232
|
+
* a caller who has not stored a rule yet: the control has to show
|
|
233
|
+
* something, and nothing is emitted until the author picks.
|
|
234
|
+
*/
|
|
235
|
+
get currentMode() {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
const modes = this.modes;
|
|
238
|
+
if (!(modes === null || modes === void 0 ? void 0 : modes.length)) {
|
|
239
|
+
return undefined;
|
|
240
|
+
}
|
|
241
|
+
return (_b = (_a = this.modeOverride) !== null && _a !== void 0 ? _a : ruleMode(this.value)) !== null && _b !== void 0 ? _b : modes[0];
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Drop the override once `value` contradicts it, handing the mode
|
|
245
|
+
* back to the derivation — that is how a later value from the
|
|
246
|
+
* caller wins over the mode the author picked.
|
|
247
|
+
*
|
|
248
|
+
* A value that expresses no mode at all does not contradict
|
|
249
|
+
* anything: an emptied tree emits no rule, and the author is still
|
|
250
|
+
* in `conditional`. Dropping the override there would read the
|
|
251
|
+
* empty value back as the first offered mode and rewrite the
|
|
252
|
+
* setting under the author.
|
|
253
|
+
*/
|
|
254
|
+
clearReachedModeOverride() {
|
|
255
|
+
const mode = ruleMode(this.value);
|
|
256
|
+
if (mode !== undefined && mode !== this.modeOverride) {
|
|
257
|
+
this.modeOverride = null;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
164
260
|
/**
|
|
165
261
|
* Path of a newly added chip whose primitive declares a config
|
|
166
262
|
* component, so its args editor opens immediately on add. The new
|
|
@@ -219,14 +315,18 @@ export class RuleEditor {
|
|
|
219
315
|
/**
|
|
220
316
|
* The subset of registered metadata offered for adding in the
|
|
221
317
|
* palette: primitives whose `reads` aren't fully covered by the
|
|
222
|
-
* reachable slots are dropped
|
|
223
|
-
*
|
|
224
|
-
*
|
|
318
|
+
* reachable slots are dropped, and so is the always primitive —
|
|
319
|
+
* it reads nothing, so it is always covered, but an "Always" chip
|
|
320
|
+
* among a group's conditions says nothing. Filtering only the
|
|
321
|
+
* palette — not the full `allPrimitiveOptions` — keeps
|
|
322
|
+
* already-placed chips resolving to their proper title even when
|
|
323
|
+
* their read slot isn't reachable.
|
|
225
324
|
*/
|
|
226
325
|
availablePrimitiveMetadata() {
|
|
227
326
|
const filtered = new Map();
|
|
228
327
|
for (const [id, meta] of this.metadataById) {
|
|
229
|
-
if (
|
|
328
|
+
if (id !== ALWAYS_PRIMITIVE_ID &&
|
|
329
|
+
primitiveReadsCovered(meta, this.reachableSlots)) {
|
|
230
330
|
filtered.set(id, meta);
|
|
231
331
|
}
|
|
232
332
|
}
|
|
@@ -267,10 +367,18 @@ export class RuleEditor {
|
|
|
267
367
|
]);
|
|
268
368
|
this.issues = result.ok ? [] : result.issues;
|
|
269
369
|
}
|
|
370
|
+
/**
|
|
371
|
+
* Emit an edited tree. Editing the tree is only possible in
|
|
372
|
+
* `conditional`, so the edit itself records the mode: an edit that
|
|
373
|
+
* empties the tree emits no rule, and without this the empty value
|
|
374
|
+
* would read back as the first offered mode.
|
|
375
|
+
* @param next
|
|
376
|
+
*/
|
|
270
377
|
emitIfChanged(next) {
|
|
271
378
|
if (next === this.normalizedValue) {
|
|
272
379
|
return;
|
|
273
380
|
}
|
|
381
|
+
this.modeOverride = 'conditional';
|
|
274
382
|
this.change.emit(collapseEmptyRoot(next));
|
|
275
383
|
}
|
|
276
384
|
/**
|
|
@@ -280,17 +388,23 @@ export class RuleEditor {
|
|
|
280
388
|
* `emitNormalization` will *not* push that placeholder back to the
|
|
281
389
|
* caller, so an unset value stays unset until the user edits.
|
|
282
390
|
*
|
|
391
|
+
* An unconditional mode is the exception: its sentinel is left
|
|
392
|
+
* exactly as it came in, because wrapping it would rewrite the
|
|
393
|
+
* shape the mode is read back from.
|
|
394
|
+
*
|
|
283
395
|
* Memoized so callers that read this several times in one handler
|
|
284
396
|
* see the same reference — the identity check in `emitIfChanged`
|
|
285
397
|
* depends on it.
|
|
286
398
|
*/
|
|
287
399
|
get normalizedValue() {
|
|
400
|
+
const mode = this.currentMode;
|
|
288
401
|
if (this.normalizedCache !== null &&
|
|
289
|
-
this.normalizedCache.source === this.value
|
|
402
|
+
this.normalizedCache.source === this.value &&
|
|
403
|
+
this.normalizedCache.mode === mode) {
|
|
290
404
|
return this.normalizedCache.normalized;
|
|
291
405
|
}
|
|
292
|
-
const normalized = normalize(this.value);
|
|
293
|
-
this.normalizedCache = { source: this.value, normalized };
|
|
406
|
+
const normalized = normalize(this.value, mode);
|
|
407
|
+
this.normalizedCache = { source: this.value, mode, normalized };
|
|
294
408
|
return normalized;
|
|
295
409
|
}
|
|
296
410
|
/**
|
|
@@ -444,6 +558,30 @@ export class RuleEditor {
|
|
|
444
558
|
"getter": false,
|
|
445
559
|
"setter": false
|
|
446
560
|
},
|
|
561
|
+
"modes": {
|
|
562
|
+
"type": "unknown",
|
|
563
|
+
"mutable": false,
|
|
564
|
+
"complexType": {
|
|
565
|
+
"original": "RuleEditorMode[]",
|
|
566
|
+
"resolved": "RuleEditorMode[] | undefined",
|
|
567
|
+
"references": {
|
|
568
|
+
"RuleEditorMode": {
|
|
569
|
+
"location": "import",
|
|
570
|
+
"path": "./rule-editor.types",
|
|
571
|
+
"id": "src/components/rule-editor/rule-editor.types.ts::RuleEditorMode",
|
|
572
|
+
"referenceLocation": "RuleEditorMode"
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"required": false,
|
|
577
|
+
"optional": true,
|
|
578
|
+
"docs": {
|
|
579
|
+
"tags": [],
|
|
580
|
+
"text": "The ways of writing a rule offered above the tree, in the order\ngiven. Leave it unset to offer none, and render the tree alone.\n\nWhich modes make sense is the caller's to decide, because it\ndiffers per setting: a \"when to show\" toggle offers `always` and\n`conditional`, while a \"when to make required\" one also offers\n`never`. `conditional` is not forced into the list \u2014 a caller\npassing only the unconditional modes usually gets a plain toggle\nwith no tree, which is a legitimate thing to want.\n\n\"Usually\", because the offered modes do not constrain `value`. A\nstored condition tree is still drawn, and the control then shows\nno mode as selected, because none of the offered ones describes\nwhat is stored. Hiding a rule the author cannot otherwise see\nwould be worse than an unselected control."
|
|
581
|
+
},
|
|
582
|
+
"getter": false,
|
|
583
|
+
"setter": false
|
|
584
|
+
},
|
|
447
585
|
"required": {
|
|
448
586
|
"type": "boolean",
|
|
449
587
|
"mutable": false,
|
|
@@ -510,6 +648,25 @@ export class RuleEditor {
|
|
|
510
648
|
"reflect": true,
|
|
511
649
|
"attribute": "disabled"
|
|
512
650
|
},
|
|
651
|
+
"invalid": {
|
|
652
|
+
"type": "boolean",
|
|
653
|
+
"mutable": false,
|
|
654
|
+
"complexType": {
|
|
655
|
+
"original": "boolean",
|
|
656
|
+
"resolved": "boolean",
|
|
657
|
+
"references": {}
|
|
658
|
+
},
|
|
659
|
+
"required": false,
|
|
660
|
+
"optional": false,
|
|
661
|
+
"docs": {
|
|
662
|
+
"tags": [],
|
|
663
|
+
"text": "Set to `true` to mark the rule as invalid, which reddens the\noutline and the helper text.\n\nThis is the caller's verdict on the rule as a whole \u2014 typically a\nform reporting that the field is required and empty. It is\nseparate from the diagnostics the editor finds itself, which mark\nthe individual nodes they belong to and show regardless of this\nprop."
|
|
664
|
+
},
|
|
665
|
+
"getter": false,
|
|
666
|
+
"setter": false,
|
|
667
|
+
"reflect": true,
|
|
668
|
+
"attribute": "invalid"
|
|
669
|
+
},
|
|
513
670
|
"label": {
|
|
514
671
|
"type": "string",
|
|
515
672
|
"mutable": false,
|
|
@@ -553,6 +710,25 @@ export class RuleEditor {
|
|
|
553
710
|
"setter": false,
|
|
554
711
|
"reflect": false,
|
|
555
712
|
"attribute": "helper-text"
|
|
713
|
+
},
|
|
714
|
+
"help": {
|
|
715
|
+
"type": "string",
|
|
716
|
+
"mutable": false,
|
|
717
|
+
"complexType": {
|
|
718
|
+
"original": "string",
|
|
719
|
+
"resolved": "string | undefined",
|
|
720
|
+
"references": {}
|
|
721
|
+
},
|
|
722
|
+
"required": false,
|
|
723
|
+
"optional": true,
|
|
724
|
+
"docs": {
|
|
725
|
+
"tags": [],
|
|
726
|
+
"text": "Contextual help for the setting as a whole, rendered as a `?`\nbeside the label that opens a popover on click. Markdown.\n\nFor what a rule *is* rather than what this one is for \u2014 the\nhelper text is the shorter, always-legible answer, and the two\nare meant to be used together rather than instead of each other."
|
|
727
|
+
},
|
|
728
|
+
"getter": false,
|
|
729
|
+
"setter": false,
|
|
730
|
+
"reflect": false,
|
|
731
|
+
"attribute": "help"
|
|
556
732
|
}
|
|
557
733
|
};
|
|
558
734
|
}
|
|
@@ -561,6 +737,7 @@ export class RuleEditor {
|
|
|
561
737
|
"resolvedContext": {},
|
|
562
738
|
"issues": {},
|
|
563
739
|
"openChipPath": {},
|
|
740
|
+
"modeOverride": {},
|
|
564
741
|
"availablePrimitiveOptions": {}
|
|
565
742
|
};
|
|
566
743
|
}
|
|
@@ -607,10 +784,15 @@ const EMPTY_CONTEXT = Object.freeze({
|
|
|
607
784
|
limetype: null,
|
|
608
785
|
id: null,
|
|
609
786
|
});
|
|
610
|
-
function normalize(value) {
|
|
787
|
+
function normalize(value, mode) {
|
|
611
788
|
if (!value) {
|
|
612
789
|
return { type: 'all', rules: [] };
|
|
613
790
|
}
|
|
791
|
+
// Neither sentinel is a group, and wrapping one would rewrite the
|
|
792
|
+
// very shape the mode is read back from.
|
|
793
|
+
if (mode === 'always' || mode === 'never') {
|
|
794
|
+
return value;
|
|
795
|
+
}
|
|
614
796
|
if (extractGroup(value)) {
|
|
615
797
|
return value;
|
|
616
798
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js
CHANGED
|
@@ -174,7 +174,7 @@ export class ValueComparisonEditor {
|
|
|
174
174
|
}
|
|
175
175
|
render() {
|
|
176
176
|
const selectedType = TYPE_OPTIONS.find((option) => option.value === this.valueType);
|
|
177
|
-
return (h("div", { key: '
|
|
177
|
+
return (h("div", { key: 'adecd47e558632637dec3506429c285dcddf7746', class: "rule" }, h("limel-select", { key: '41032f0494cccf8ab9ef429e0648e84b70de7a80', class: "type-select", label: "Compare as", options: TYPE_OPTIONS, value: selectedType, onChange: this.handleTypeChange }), h("limebb-filter-condition-picker", { key: '118a34ec6bf0b057ad504690ea2bbb50295697ef', class: "operator-select", platform: this.platform, propertyType: PROPERTY_TYPE_BY_VALUE_TYPE[this.valueType], conditions: COMPARISON_CONDITIONS, value: operatorToCondition(this.currentOperator), onChange: this.handleConditionChange }), this.renderOperand()));
|
|
178
178
|
}
|
|
179
179
|
renderOperand() {
|
|
180
180
|
if (TEMPORAL_TYPES.has(this.valueType)) {
|
|
@@ -33,7 +33,7 @@ export class RuleGate {
|
|
|
33
33
|
this.evaluate();
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: 'ce41c51b7f8b049d7d89374ef0c452b2e961aa23', hidden: !this.shouldRender }, h("slot", { key: 'ad04db83bceca78bf7bb2eb7b7b2dae018025319' })));
|
|
37
37
|
}
|
|
38
38
|
get ruleRegistry() {
|
|
39
39
|
return this.platform.get(PlatformServiceName.RuleRegistry);
|
|
@@ -128,9 +128,9 @@ export class SummaryPopover {
|
|
|
128
128
|
top: '0.125rem',
|
|
129
129
|
right: '0.125rem',
|
|
130
130
|
};
|
|
131
|
-
return (h("limel-popover", { key: '
|
|
131
|
+
return (h("limel-popover", { key: '0eebed7c2685d3d162d8987bca7f3ce3acd38a62', style: {
|
|
132
132
|
'--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
|
|
133
|
-
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '
|
|
133
|
+
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: 'df2242c223d4b6a2a61e822f63f50757ebfa16c4', slot: "trigger", onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocusin: this.openPopoverWithDelay }, h("slot", { key: '8f0bfcc7295cf604a4d395bc535cd4cf72069ecd', name: "trigger" }), h("div", { key: '804bb712139d21944fb5ce8e1fbb918115ba3dd8', class: "opening-countdown-indicator" })), this.renderCard(closeButtonStyle)));
|
|
134
134
|
}
|
|
135
135
|
renderCard(closeButtonStyle) {
|
|
136
136
|
return (h("limel-card", { style: {
|
|
@@ -13,8 +13,8 @@ export class MentionGroupCounter {
|
|
|
13
13
|
render() {
|
|
14
14
|
const label = this.getLabel();
|
|
15
15
|
return [
|
|
16
|
-
h("span", { key: '
|
|
17
|
-
h("limel-tooltip", { key: '
|
|
16
|
+
h("span", { key: 'b6e816b8efd22fdaff81f6669d11ab8efae9e05e', id: this.tooltipId }, label),
|
|
17
|
+
h("limel-tooltip", { key: '62294172fabc48ad688b14ae75fe43d142ac0cb7', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
|
|
18
18
|
];
|
|
19
19
|
}
|
|
20
20
|
getLabel() {
|
|
@@ -382,7 +382,7 @@ export class LimeBBTextEditor {
|
|
|
382
382
|
}
|
|
383
383
|
render() {
|
|
384
384
|
return [
|
|
385
|
-
h("limel-text-editor", { key: '
|
|
385
|
+
h("limel-text-editor", { key: '7c5597fd2affe6f7a625c3fabfbaaef70ac41b00', ref: (el) => (this.textEditor = el), tabindex: this.disabled ? -1 : 0, value: this.value, contentType: this.contentType, customElements: this.registeredCustomElements, "aria-disabled": this.disabled, language: this.language, triggers: this.registeredTriggers, onTriggerStart: this.handleTriggerStart, onTriggerStop: this.handleTriggerStop, onTriggerChange: this.handleTriggerChange, inlineImages: this.inlineImages, ui: this.ui, allowResize: this.allowResize, required: this.required, disabled: this.disabled, readonly: this.readonly, helperText: this.helperText, placeholder: this.placeholder, label: this.label, invalid: this.invalid }),
|
|
386
386
|
this.renderPicker(),
|
|
387
387
|
];
|
|
388
388
|
}
|
|
@@ -69,7 +69,7 @@ export class TrendIndicator {
|
|
|
69
69
|
this.numValue = this.parseValue(this.value);
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: 'b963d9086b70b11dce31375284e54574f54b4f0c', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'd2d2587a0239cba584177dbc1806762e9d783460', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: '8e7b6c37d803c5c682220681e93c3a096d4e02d2', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
|
|
73
73
|
}
|
|
74
74
|
renderVisualization() {
|
|
75
75
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
package/dist/collection/index.js
CHANGED
|
@@ -5,4 +5,6 @@ export * from './util/color-palettes';
|
|
|
5
5
|
export * from './components/filter-chip/filter-chip.types';
|
|
6
6
|
export * from './components/filter-chip/filter-condition-icons';
|
|
7
7
|
export * from './components/filter-chip/filter-operators';
|
|
8
|
+
export * from './components/rule-editor/rule-editor.types';
|
|
9
|
+
export * from './components/rule-editor/rule-editor-modes';
|
|
8
10
|
import "@lundalogik/lime-icons8";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as i,h as n,Host as o,transformTag as t}from"@stencil/core/internal/client";const r=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return n(o,{key:"
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as i,h as n,Host as o,transformTag as t}from"@stencil/core/internal/client";const r=e(class extends i{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow()}render(){return n(o,{key:"5f1f10992e05f44d64189dfb622e4294ca325417",id:this.item.id},this.renderLabel(),n("div",{key:"80f8b801710cb713f019897cac35ea2de1b6384f",class:"icons"},this.item.icons.map(((e,i)=>this.renderIcon(e,i)))))}renderLabel(){if(this.item.label)return n("span",{class:"label"},this.item.label)}renderIcon(e,i){const o=`icon-${this.item.id}-${i}`;return[n("limel-icon",{tabIndex:0,key:i,id:o,badge:!0,name:e.name,class:{"is-pending":!!e.pending,"is-clickable":!!e.onClick},style:{color:e.color,"background-color":e.backgroundColor},onClick:e.onClick}),this.renderTooltip(e,o)]}renderTooltip(e,i){if(e.title)return n("limel-tooltip",{label:e.title,elementId:i})}static get style(){return'@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-chat-icon-list){display:flex;align-items:center;gap:0.5rem;margin-right:auto;max-width:calc(100% - 2rem);padding:0 0.25rem}.label{font-size:0.75rem;color:rgb(var(--contrast-900))}.icons{display:flex;align-items:center;gap:0.25rem}.icons:hover limel-icon,.icons:focus-within limel-icon{margin-left:0 !important}limel-icon{--icon-background-color:rgb(var(--contrast-500), 0.5)}limel-icon.is-clickable{cursor:pointer}limel-icon:focus{outline:none}limel-icon:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-icon{transition:margin-left 0.2s cubic-bezier(0.075, 0.82, 0.165, 1), opacity 0.2s ease, box-shadow 0.2s ease;position:relative;width:1.75rem;padding:0.375rem;flex-shrink:0}limel-icon:not(.is-pending):not(:first-child){margin-left:-0.75rem}limel-icon.is-pending{animation:pending 3s linear infinite;padding:0.5rem}limel-icon.is-pending:after{content:"";position:absolute;inset:0;width:1.75rem;height:1.75rem;border-radius:50%;pointer-events:none;border-radius:50%;border:0.125rem solid rgb(var(--color-white), 0.5);border-top-color:rgb(var(--color-black), 0.8);mix-blend-mode:color-dodge;animation:spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite}@keyframes pending{0%,20%,80%,100%{filter:grayscale(0%)}45%,55%{filter:grayscale(100%)}}@keyframes spin{to{transform:rotate(360deg)}}'}},[1,"limebb-chat-icon-list",{item:[16]}]);function s(){"undefined"!=typeof customElements&&["limebb-chat-icon-list"].forEach((e=>{"limebb-chat-icon-list"===e&&(customElements.get(t(e))||customElements.define(t(e),r))}))}export{r as C,s as d}
|