@limetech/lime-crm-building-blocks 1.124.0 → 1.126.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/color-palettes-BWuwMtwv.js +334 -0
- package/dist/cjs/index.cjs.js +5 -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 +85 -0
- package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +21 -0
- package/dist/cjs/limebb-component-config.cjs.entry.js +2 -14
- package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +3 -3
- 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-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-builder_3.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +3 -3
- 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 +59 -0
- package/dist/cjs/limebb-rule-editor.cjs.entry.js +646 -0
- package/dist/cjs/limebb-rule-gate.cjs.entry.js +5 -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/loader.cjs.js +1 -1
- package/dist/cjs/web-component-template-BWCutZB6.js +18 -0
- package/dist/collection/collection-manifest.json +4 -0
- 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.css +5 -0
- package/dist/collection/components/color-palette-picker/color-palette-picker.js +295 -0
- package/dist/collection/components/color-palette-picker/color-palette-swatches/color-palette-swatches.css +28 -0
- package/dist/collection/components/color-palette-picker/color-palette-swatches/color-palette-swatches.js +61 -0
- package/dist/collection/components/composer-toolbar/composer-toolbar.js +3 -3
- 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/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.js +1 -1
- 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/chip-picker-view.js +141 -0
- package/dist/collection/components/rule-editor/group-node-view.js +79 -0
- package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.css +36 -0
- package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +301 -0
- package/dist/collection/components/rule-editor/rule-editor-views.js +43 -0
- package/dist/collection/components/rule-editor/rule-editor.css +96 -0
- package/dist/collection/components/rule-editor/rule-editor.js +457 -0
- package/dist/collection/components/rule-editor/rule-operations.js +132 -0
- package/dist/collection/components/rule-editor/view-helpers.js +70 -0
- package/dist/collection/components/rule-gate/rule-gate.js +9 -4
- 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 +1 -0
- package/dist/collection/util/color-palettes.js +329 -0
- package/dist/components/chat-icon-list.js +1 -1
- package/dist/components/chat-item.js +1 -1
- package/dist/components/color-palettes.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/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.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.d.ts +11 -0
- package/dist/components/limebb-color-palette-picker.js +1 -0
- package/dist/components/limebb-color-palette-swatches.d.ts +11 -0
- package/dist/components/limebb-color-palette-swatches.js +1 -0
- package/dist/components/limebb-component-config.js +1 -1
- package/dist/components/limebb-composer-toolbar.js +1 -1
- 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-chip-popover.d.ts +11 -0
- package/dist/components/limebb-rule-chip-popover.js +1 -0
- package/dist/components/limebb-rule-editor.d.ts +11 -0
- package/dist/components/limebb-rule-editor.js +1 -0
- 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/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 -0
- package/dist/components/summary-popover.js +1 -1
- package/dist/components/typing-indicator.js +1 -1
- package/dist/components/web-component-template.js +1 -0
- package/dist/esm/color-palettes-1N3bZuHj.js +331 -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 +83 -0
- package/dist/esm/limebb-color-palette-swatches.entry.js +19 -0
- package/dist/esm/limebb-component-config.entry.js +2 -14
- package/dist/esm/limebb-composer-toolbar.entry.js +3 -3
- 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-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-builder_3.entry.js +2 -2
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-group_3.entry.js +3 -3
- 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 +57 -0
- package/dist/esm/limebb-rule-editor.entry.js +644 -0
- package/dist/esm/limebb-rule-gate.entry.js +5 -1
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-component-template-6zRYia86.js +16 -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-e8425a2c.entry.js → p-057e1638.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0f2d1ea7.entry.js → p-0c572fe9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f0a5076c.entry.js → p-11494f30.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-1747221f.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-1831e571.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-8f8108c1.entry.js → p-184ae23d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-1N3bZuHj.js +1 -0
- package/dist/lime-crm-building-blocks/{p-4f042496.entry.js → p-20206710.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-529dbe46.entry.js → p-24fc049c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e3e2852a.entry.js → p-277b6ad4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e4ff2906.entry.js → p-2cb31064.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2caf01c8.entry.js → p-3313e357.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ad27bd5d.entry.js → p-3781a766.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-85caaf36.entry.js → p-43a7facd.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-5f97c392.entry.js → p-6cceabf1.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-67326d92.entry.js → p-6d3a9ed3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-09c63bce.entry.js → p-71a6f624.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-25c4e389.entry.js → p-731820f0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-74455a30.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-7922726c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-9214b92e.entry.js → p-7a125570.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-dd07a1ac.entry.js → p-7d51a34c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-287780c1.entry.js → p-7fee7ef3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-27798ace.entry.js → p-8084e825.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-861ac606.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-fcedbc77.entry.js → p-8d3fa274.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b0567904.entry.js → p-9f7992b0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-C_tMNOSt.js +1 -0
- package/dist/lime-crm-building-blocks/{p-bb5d40b1.entry.js → p-abcb1e49.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f7114acb.entry.js → p-b1a8d1a0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-b8d9ff68.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-52bddb06.entry.js → p-bec4231f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-5fa5e7f4.entry.js → p-c139ab98.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-774cd93c.entry.js → p-c4f41ec4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4b275818.entry.js → p-c609b5ec.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6a05192a.entry.js → p-c6a913af.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-dd38e0ba.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-6cb2d9dd.entry.js → p-de6f4670.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0cbe7498.entry.js → p-e6ed33ff.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-e717bdff.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-9d56503d.entry.js → p-ef62c7d8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9a42ae42.entry.js → p-f0a567f3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b07b3ae3.entry.js → p-fd6dcfe3.entry.js} +1 -1
- package/dist/types/components/color-palette-picker/color-palette-picker.d.ts +89 -0
- package/dist/types/components/color-palette-picker/color-palette-swatches/color-palette-swatches.d.ts +23 -0
- package/dist/types/components/rule-editor/chip-picker-view.d.ts +27 -0
- package/dist/types/components/rule-editor/group-node-view.d.ts +11 -0
- package/dist/types/components/rule-editor/rule-chip-popover/rule-chip-popover.d.ts +31 -0
- package/dist/types/components/rule-editor/rule-editor-views.d.ts +51 -0
- package/dist/types/components/rule-editor/rule-editor.d.ts +118 -0
- package/dist/types/components/rule-editor/rule-operations.d.ts +62 -0
- package/dist/types/components/rule-editor/view-helpers.d.ts +40 -0
- package/dist/types/components/rule-gate/rule-gate.d.ts +5 -2
- package/dist/types/components.d.ts +588 -6
- package/dist/types/index.d.ts +1 -0
- package/dist/types/util/color-palettes.d.ts +67 -0
- package/package.json +4 -4
- package/dist/lime-crm-building-blocks/p-51ab9d60.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-628ce56b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6318fd46.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-c6caa3f9.entry.js +0 -1
|
@@ -66,7 +66,7 @@ export class DatePicker {
|
|
|
66
66
|
if (this.value) {
|
|
67
67
|
this.shouldEmitValueAsString = typeof this.value === 'string';
|
|
68
68
|
}
|
|
69
|
-
return (h("limel-date-picker", { key: '
|
|
69
|
+
return (h("limel-date-picker", { key: '9a27ee751c1928a442651e8473b0c588778dbdc0', disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, language: this.language, formatter: this.formatter, onChange: this.handleChange }));
|
|
70
70
|
}
|
|
71
71
|
parseDateValue() {
|
|
72
72
|
const value = this.value;
|
|
@@ -33,7 +33,7 @@ export class DateRange {
|
|
|
33
33
|
this.originalEndTime = this.endTime;
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: '8dc6bd4fda6f6e713d422bf0f03b10dd7a613c48', class: "date-pickers" }, this.renderStartDatePicker(), this.renderEndDatePicker()));
|
|
37
37
|
}
|
|
38
38
|
renderStartDatePicker() {
|
|
39
39
|
if (!this.originalStartTime) {
|
|
@@ -44,7 +44,7 @@ export class DocumentChips {
|
|
|
44
44
|
this.revokeAllBlobUrls();
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: 'db1a1db2daeb513826e3fb8e03bc0a1fb223b7f6', role: "list", "aria-label": this.accessibleLabel }, this.files.map((file) => this.renderFile(file))));
|
|
48
48
|
}
|
|
49
49
|
renderFile(file) {
|
|
50
50
|
const isReady = !file.uploadState || file.uploadState === 'done';
|
|
@@ -78,10 +78,10 @@ export class DocumentItemComponent {
|
|
|
78
78
|
render() {
|
|
79
79
|
const isUnavailable = this.isUnavailable();
|
|
80
80
|
const image = this.getImage();
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '4e7f632c97cd078ee44cc262b3531b87409344fb', id: String(this.item.file.id), class: {
|
|
82
82
|
'has-image': !!image,
|
|
83
83
|
'has-error': !!this.item.hasError,
|
|
84
|
-
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: '
|
|
84
|
+
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: 'b560d107ba3bfee84158b2867fb594eb698072c3', image: image, clickable: isUnavailable ? false : true, onClick: this.handleDocumentItemClick, onKeyDown: this.handleKeyDown }, h("div", { key: '798a25ef8ef4ca1470a91afaaf2fc3e975473368', slot: "component" }, this.renderFileSize(), this.renderBooleanInput())), this.renderHelp()));
|
|
85
85
|
}
|
|
86
86
|
renderBooleanInput() {
|
|
87
87
|
const id = this.getControlId();
|
|
@@ -76,7 +76,7 @@ export class DocumentPicker {
|
|
|
76
76
|
this.labelId = createRandomString();
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: 'cf8c1618a2d98a0278e16a634df162b9e0e7cb3e' }, h("limel-notched-outline", { key: '07e5f29db31eb7fc89b915e311bba3c2c6e2826a', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, hasFloatingLabel: true }, h("limel-masonry-layout", { key: '65a36951d5ffa6e23ee90fc98e2bac82ba26e6ed', slot: "content", role: this.type === 'radio' ? 'radiogroup' : 'group', "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderItems())), this.renderHelperLine()));
|
|
80
80
|
}
|
|
81
81
|
renderItems() {
|
|
82
82
|
return this.items.map((item) => (h("limebb-document-item", { platform: this.platform, context: this.context, item: item, key: item.file.id, type: this.type, onInteract: this.handleItemInteract })));
|
|
@@ -205,7 +205,7 @@ export class FeedTimelineItem {
|
|
|
205
205
|
render() {
|
|
206
206
|
var _a, _b;
|
|
207
207
|
const helperTextId = `helper-text-${this.item.id}`;
|
|
208
|
-
return (h(Host, { key: '
|
|
208
|
+
return (h(Host, { key: 'ddc74b89e09e4bd56f2ce64ef2f9ddca011b7acb', id: this.item.id, class: {
|
|
209
209
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
210
210
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
211
211
|
'shows-less': !this.showMore,
|
|
@@ -8,7 +8,7 @@ import { h } from "@stencil/core";
|
|
|
8
8
|
*/
|
|
9
9
|
export class FeedItemThumbnailFileInfo {
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '0205a9ad6caeae2ec0f8380da61b193b16c2cf76' }, this.description);
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "limebb-feed-item-thumbnail-file-info"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -103,7 +103,7 @@ export class Feed {
|
|
|
103
103
|
this.highlighter.unregisterFeed(this.feedItemElement);
|
|
104
104
|
}
|
|
105
105
|
render() {
|
|
106
|
-
return (h(Host, { key: '
|
|
106
|
+
return (h(Host, { key: '5d1c5d6ff9949229a0bafbdb060a0bc386a8eb03', role: "log", "aria-busy": this.loading ? 'true' : 'false', style: {
|
|
107
107
|
'--limebb-feed-highlight-duration': `${ITEM_HIGHLIGHT_DURATION}ms`,
|
|
108
108
|
} }, this.renderLoadMore(), this.renderEmptyFeedMessage(), this.renderSpinner(), this.renderFeedItems()));
|
|
109
109
|
}
|
|
@@ -35,7 +35,7 @@ export class IconPicker {
|
|
|
35
35
|
icon: this.value,
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
return (h("limel-picker", { key: '
|
|
38
|
+
return (h("limel-picker", { key: '5fe87f699b12aaa523a1823e287736a6ca3b5379', label: this.label, helperText: this.helperText, disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, required: this.required, value: value, searcher: this.search, onChange: this.handleChange, badgeIcons: false, leadingIcon: "search", searchLabel: "Start typing to find the right icon" }));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "limebb-icon-picker"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -92,7 +92,7 @@ export class InfoTileAdminConfig {
|
|
|
92
92
|
},
|
|
93
93
|
];
|
|
94
94
|
return [
|
|
95
|
-
h("limel-button-group", { key: '
|
|
95
|
+
h("limel-button-group", { key: '142f19b2441e11b3d1ad151edb9603f7656e10be', value: buttons.filter(this.isValidButton), onChange: this.handleChangeType }),
|
|
96
96
|
this.renderFormatConfig(),
|
|
97
97
|
];
|
|
98
98
|
}
|
|
@@ -103,7 +103,7 @@ export class InfoTile {
|
|
|
103
103
|
const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
|
|
104
104
|
const normalProps = Object.assign(Object.assign({}, baseProps), { label: this.getLabel(filter), link: this.getLink(filter), loading: this.loading, value: value === null || value === void 0 ? void 0 : value.value.trim() });
|
|
105
105
|
const props = !filter || this.error ? errorProps : normalProps;
|
|
106
|
-
return (h("limel-info-tile", Object.assign({ key: '
|
|
106
|
+
return (h("limel-info-tile", Object.assign({ key: 'd96335bf647a10a786c7294da2ede4b6bd4ee38f', class: { error: !filter || this.error } }, props)));
|
|
107
107
|
}
|
|
108
108
|
getFormattedValue() {
|
|
109
109
|
if (!this.value && this.value !== 0) {
|
|
@@ -27,7 +27,7 @@ export class KanbanGroup {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '7c08e70a3e4ea0641b3e556098ccaff818bf11c3' }, this.renderHelp(), this.renderGroupHeading(), this.renderGroupSummary(), this.renderItems()));
|
|
31
31
|
}
|
|
32
32
|
renderGroupSummary() {
|
|
33
33
|
if (!this.summary || !this.totalCount) {
|
|
@@ -55,7 +55,7 @@ export class KanbanItemComponent {
|
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
57
|
var _a, _b;
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '0d3c75642c2ea8ec42e475ef7a5e206f408eb446', id: this.item.id.toString(), class: {
|
|
59
59
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
60
60
|
'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
|
|
61
61
|
}, style: {
|
package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js
CHANGED
|
@@ -122,7 +122,7 @@ export class LimeQueryFilterComparisonComponent {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
render() {
|
|
125
|
-
return (h(Host, { key: '
|
|
125
|
+
return (h(Host, { key: '29ddf92b2e83eafe695faeb9a4ce6b8d29aa973e' }, this.renderHeader(), h("div", { key: '258f8aeee98a2435d324a1e5b816f111188cf3cc', class: "expression-container" }, this.renderPropertySelector(), this.renderOperator(), this.renderValueInput(), h("limel-icon-button", { key: 'c9e4cf456908fb82507e2599af631691e96ab8e4', class: "remove", icon: "trash", label: "Remove condition", onClick: this.removeExpression }))));
|
|
126
126
|
}
|
|
127
127
|
renderHeader() {
|
|
128
128
|
if (!this.label) {
|
package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js
CHANGED
|
@@ -72,9 +72,9 @@ export class LimeQueryFilterGroupComponent {
|
|
|
72
72
|
(this.expression.op === Operator.AND ? 'and' : 'or')) || this.options[0];
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: '4b1647c741b78253b4ce4ed1bd347800da394563', style: {
|
|
76
76
|
'--limebb-lime-query-filter-group-operator': `"${this.expression.op === Operator.AND ? 'AND' : 'OR'}"`,
|
|
77
|
-
} }, h("div", { key: '
|
|
77
|
+
} }, h("div", { key: '47fd3000275e17ef70d86af5e6abcb492806ffba', class: "expression" }, this.renderHeader(), h("ul", { key: '224249a4b305eb2b20c1aedad98d2c3191d47e83' }, this.expression.exp.map(this.renderChildExpression), this.renderAddButton()), this.renderAddGroupButton())));
|
|
78
78
|
}
|
|
79
79
|
renderHeader() {
|
|
80
80
|
const subheading = this.getSubheading();
|
|
@@ -35,7 +35,7 @@ export class LimeQueryFilterNotComponent {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h("div", { key: '
|
|
38
|
+
return (h("div", { key: '16246e10be820ad18713cb097146040d30e242bf', class: "expression" }, this.label && h("limel-header", { key: '539d60a4567727282463dec2a90e06a3630501aa', heading: this.label }), h("limebb-lime-query-filter-expression", { key: '67f892704ea3e5a061acdcb8f3ffe22271971569', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.exp, onExpressionChange: this.handleExpressionChange })));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "limebb-lime-query-filter-not"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -172,7 +172,7 @@ export class LimeQueryBuilder {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
render() {
|
|
175
|
-
return (h(Host, { key: '
|
|
175
|
+
return (h(Host, { key: '9a121529165f1691e32b2b156b128977c5b5ba3a' }, this.renderHeader(), this.renderContent()));
|
|
176
176
|
}
|
|
177
177
|
renderContent() {
|
|
178
178
|
const visualModeSupported = this.checkVisualModeSupport();
|
|
@@ -154,7 +154,7 @@ export class LimeQueryResponseFormatBuilder {
|
|
|
154
154
|
}
|
|
155
155
|
render() {
|
|
156
156
|
const visualModeSupported = this.checkVisualModeSupport();
|
|
157
|
-
return (h("div", { key: '
|
|
157
|
+
return (h("div", { key: '65a41f46fe1088f0d52be0337c427177a1aa1a44', class: "response-format-builder" }, this.label && h("h1", { key: '5a75e321aee3ff6753baccbd72d17c5377f28d28', class: "builder-label" }, this.label), this.helperText && (h("p", { key: 'e13518253b52ff8f847575b4465dc2295c7452f0', class: "builder-helper-text" }, this.helperText)), this.visualModeEnabled && (h("div", { key: '2122357f51fd2185d1b544381eb2199de5b1f56c', class: "mode-controls" }, this.renderModeSwitch(visualModeSupported))), !this.visualModeEnabled || this.mode === 'code' ? (h("div", { class: "code-mode" }, this.renderCodeEditor(visualModeSupported))) : (h("div", { class: "visual-mode" }, this.renderVisualMode()))));
|
|
158
158
|
}
|
|
159
159
|
renderModeSwitch(support) {
|
|
160
160
|
const visualDisabled = !support.visualModeSupported;
|
|
@@ -78,7 +78,7 @@ export class LimetypeField {
|
|
|
78
78
|
value: '',
|
|
79
79
|
};
|
|
80
80
|
options.unshift(emptyOption);
|
|
81
|
-
return (h("limel-select", { key: '
|
|
81
|
+
return (h("limel-select", { key: '20a7d5eb86c746d11ad805083be5ef9f5fd2397d', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
|
|
82
82
|
}
|
|
83
83
|
componentWillRender() {
|
|
84
84
|
this.updatePropertyFields(this.value || '');
|
|
@@ -69,7 +69,7 @@ export class OrderByEditor {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: '6ef5ee3cf7b67cc0f821272f9d552eab48b60065' }, this.renderEmptyState(), this.renderOrderByEditor()));
|
|
73
73
|
}
|
|
74
74
|
renderEmptyState() {
|
|
75
75
|
if (this.limetype) {
|
|
@@ -38,9 +38,9 @@ export class OrderByItemComponent {
|
|
|
38
38
|
render() {
|
|
39
39
|
const propertyPath = Object.keys(this.item)[0] || '';
|
|
40
40
|
const direction = this.item[propertyPath] || 'ASC';
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'f8b1d7505feec325eae8668672afe3768a4892aa' }, h("limebb-property-selector", { key: '03f71edd8692c6a46612f87a9df21aabd2bf71eb', platform: this.platform, context: this.context, limetype: this.limetype, label: "Property", value: propertyPath, required: true, onChange: this.handlePathChange }), h("div", { key: 'a1a6db7060f8dc862d7acfb5750861293e2411d3', class: "control-buttons" }, h("limel-icon-button", { key: '76703911899c38d71f116dc8256d00cb7c937971', icon: direction === 'ASC'
|
|
42
42
|
? 'sort_ascending'
|
|
43
|
-
: 'sort_descending', label: direction === 'ASC' ? 'Ascending' : 'Descending', onClick: this.handleToggleDirection }), h("limel-icon-button", { key: '
|
|
43
|
+
: 'sort_descending', label: direction === 'ASC' ? 'Ascending' : 'Descending', onClick: this.handleToggleDirection }), h("limel-icon-button", { key: '91a3370d5c6151370b96e7b67d59f226ad526f21', icon: "trash", label: "Remove", onClick: this.handleRemove }))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "limebb-lime-query-order-by-item"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/lime-query-builder/response-format/response-format-item.js
CHANGED
|
@@ -66,7 +66,7 @@ export class ResponseFormatItem {
|
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
68
|
return [
|
|
69
|
-
h("div", { key: '
|
|
69
|
+
h("div", { key: '1fc4a0dbdaa2b362e56a53a82483ca3afe21f6bf', class: "property-controls" }, h("div", { key: '5269250030c559943d4f610734d1ac490a8355ad', class: "property-path" }, h("limebb-property-selector", { key: '2602b66035849922fc413cbc0c82b8163a928ecd', platform: this.platform, context: this.context, limetype: this.limetype, label: "Property", value: this.item.path, required: true, onChange: this.handlePathChange }), h("div", { key: '4974a2c7ff30c527b0328d0fbed3b8bac519fdcd', class: "input-grid" }, this.renderAliasInput()), h("div", { key: 'fb058b3a5d5599c387b852e409bd5ac8e8afbc30', class: "input-grid" }, this.renderDescriptionInput()), h("div", { key: '97a5e7e2ed68fdbac160bdd60498541f3a16371d', class: "button-group" }, this.renderAliasButton(), this.renderDescriptionButton())), h("limel-icon-button", { key: '42ab29e5e8e5fc08e90bc4afe6c6d504e434d33e', icon: "trash", label: "Remove property", onClick: this.handleRemove })),
|
|
70
70
|
];
|
|
71
71
|
}
|
|
72
72
|
renderAliasButton() {
|
|
@@ -5,8 +5,8 @@ import { h } from "@stencil/core";
|
|
|
5
5
|
export class LiveDocsInfo {
|
|
6
6
|
render() {
|
|
7
7
|
return [
|
|
8
|
-
h("div", { key: '
|
|
9
|
-
h("p", { key: '
|
|
8
|
+
h("div", { key: 'ace2c3e78a926a405e6bb9a15db259953820ca1a', class: "header" }, h("limel-icon", { key: 'd1d94917a24d4b066ee2a389082a48c3b3ab29af', name: "not_showing_video_frames" }), h("h2", { key: '3d164cdece408fef99df8a0c18b03a33118f6737' }, "Viewing this file type requires ", h("em", { key: '3f46b83b55eb9474df36b18c71cd02a12696a41f' }, "Live Docs"))),
|
|
9
|
+
h("p", { key: 'e691f783583a0a3d421a033087accf825981e935' }, h("em", { key: '9bd0d29362de47d35cdc1e765c85dfd2c459b5d6' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", h("a", { key: 'e4a575a382890c7c52e78dd363e695f2b97b9a9f', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
|
|
10
10
|
];
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "limebb-live-docs-info"; }
|
|
@@ -53,7 +53,7 @@ export class LocalePicker {
|
|
|
53
53
|
const value = this.value;
|
|
54
54
|
selectedOptions = options.find((option) => option.value === value);
|
|
55
55
|
}
|
|
56
|
-
return (h("limel-select", { key: '
|
|
56
|
+
return (h("limel-select", { key: 'b5aad60b10237826f58f096a343beb7fcbfe2b9b', value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "limebb-locale-picker"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,7 +56,7 @@ export class NotificationListItem {
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
var _a, _b;
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '951b650d804bfe49133743bc461e344d9dd0324b', id: this.item.id, class: {
|
|
60
60
|
'is-clickable': this.isItemClickable(),
|
|
61
61
|
'is-read': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.read),
|
|
62
62
|
'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
|
|
@@ -108,11 +108,11 @@ export class PercentageVisualizer {
|
|
|
108
108
|
render() {
|
|
109
109
|
const normalizedValue = this.getNormalizedValue();
|
|
110
110
|
const zeroPoint = this.getZeroPointPosition();
|
|
111
|
-
return (h(Host, { key: '
|
|
111
|
+
return (h(Host, { key: 'c57fbde9785115a91c28db17ccebee42a335a80f', class: this.getContainerClassList(), style: {
|
|
112
112
|
'--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
|
|
113
113
|
'--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
|
|
114
114
|
'--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
|
|
115
|
-
} }, h("limel-notched-outline", { key: '
|
|
115
|
+
} }, h("limel-notched-outline", { key: '27d6dada52041ce9ebec9d987bae303afacfff89', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: '2afd6d0ff95eace6fac444fd3e2732d22ab97728', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
|
|
116
116
|
}
|
|
117
117
|
renderVisualization() {
|
|
118
118
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { pathsEqual } from "./rule-operations";
|
|
3
|
+
import { createSearcher, resolveItem, } from "./view-helpers";
|
|
4
|
+
const CHIP_TOKEN_PREFIX = '__chip__:';
|
|
5
|
+
function chipTokenFor(index) {
|
|
6
|
+
return `${CHIP_TOKEN_PREFIX}${index}`;
|
|
7
|
+
}
|
|
8
|
+
// The address of a chip inside a group is the group's path followed
|
|
9
|
+
// by a two-segment suffix `['rules', index]`. Build and parse via
|
|
10
|
+
// these helpers so both sides stay in sync.
|
|
11
|
+
const CHIP_PATH_SUFFIX_LENGTH = 2;
|
|
12
|
+
function buildChipPath(groupPath, index) {
|
|
13
|
+
return [...groupPath, 'rules', index];
|
|
14
|
+
}
|
|
15
|
+
function parentGroupPath(chipPath) {
|
|
16
|
+
return chipPath.slice(0, -CHIP_PATH_SUFFIX_LENGTH);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* If `node` is a `ref` or a `not(ref)`, return the underlying ref
|
|
20
|
+
* together with its negation flag. Used to decide whether a child of a
|
|
21
|
+
* group renders as a chip (this returns non-null) or as a nested box
|
|
22
|
+
* (this returns null).
|
|
23
|
+
* @param node
|
|
24
|
+
*/
|
|
25
|
+
export function extractRef(node) {
|
|
26
|
+
if (node.type === 'ref') {
|
|
27
|
+
return { ref: node, isNegated: false };
|
|
28
|
+
}
|
|
29
|
+
if (node.type === 'not' && node.rule.type === 'ref') {
|
|
30
|
+
return { ref: node.rule, isNegated: true };
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
export const GroupChipsView = ({ groupNode, groupPath, chipChildren, ctx }) => {
|
|
35
|
+
const chipsByToken = new Map();
|
|
36
|
+
const value = chipChildren.map((entry) => {
|
|
37
|
+
const token = chipTokenFor(entry.index);
|
|
38
|
+
chipsByToken.set(token, entry);
|
|
39
|
+
const base = resolveItem(ctx.primitiveOptions, entry.ref.id);
|
|
40
|
+
return Object.assign(Object.assign({}, base), { text: entry.isNegated ? `¬ ${base.text}` : base.text, value: token });
|
|
41
|
+
});
|
|
42
|
+
const searcher = createSearcher(ctx.primitiveOptions);
|
|
43
|
+
const openChip = findOpenChip(chipChildren, groupPath, ctx.openChipPath);
|
|
44
|
+
const delimiter = groupNode.type === 'all' ? '&' : '|';
|
|
45
|
+
return (h("limel-popover", { class: "rule-node__chips-popover", open: openChip !== null, openDirection: "bottom-start", onClose: ctx.onPopoverClose }, h("div", { slot: "trigger", class: "rule-node__chips" }, h("limel-picker", { multiple: true, label: ctx.translator.get('webclient.rule-editor.rules-label'), value: value, searcher: searcher, delimiter: delimiter, readonly: ctx.readonly, disabled: ctx.disabled, onChange: chipsChangeHandler(groupNode, groupPath, chipsByToken, ctx), onInteract: chipInteractHandler(groupPath, chipsByToken, ctx) })), h("div", null, renderChipPopoverContent(openChip, groupPath, ctx))));
|
|
46
|
+
};
|
|
47
|
+
function renderChipPopoverContent(openChip, groupPath, ctx) {
|
|
48
|
+
if (!openChip) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
const openChipPath = buildChipPath(groupPath, openChip.index);
|
|
52
|
+
return (h("limebb-rule-chip-popover", { platform: ctx.platform, context: ctx.context, refNode: openChip.ref, isNegated: openChip.isNegated, metadata: ctx.metadataById.get(openChip.ref.id), readonly: ctx.readonly, disabled: ctx.disabled, isMutable: ctx.isMutable, onNegate: chipNegateHandler(openChip, openChipPath, ctx), onUpdateArgs: chipArgsHandler(openChip, openChipPath, ctx), onDeleteChip: chipDeleteHandler(openChipPath, ctx) }));
|
|
53
|
+
}
|
|
54
|
+
const chipsChangeHandler = (groupNode, groupPath, chipsByToken, ctx) => (event) => {
|
|
55
|
+
event.stopPropagation();
|
|
56
|
+
const items = Array.isArray(event.detail) ? event.detail : [];
|
|
57
|
+
const openIndex = openChipIndexInGroup(groupPath, ctx.openChipPath);
|
|
58
|
+
if (openIndex !== null) {
|
|
59
|
+
const openToken = chipTokenFor(openIndex);
|
|
60
|
+
if (items.every((item) => item.value !== openToken)) {
|
|
61
|
+
ctx.onPopoverClose();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
const newChipNodes = items.flatMap((item) => {
|
|
65
|
+
if (typeof item.value !== 'string') {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
const existing = chipsByToken.get(item.value);
|
|
69
|
+
if (existing) {
|
|
70
|
+
return [
|
|
71
|
+
existing.isNegated
|
|
72
|
+
? { type: 'not', rule: existing.ref }
|
|
73
|
+
: existing.ref,
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
return [{ type: 'ref', id: item.value }];
|
|
77
|
+
});
|
|
78
|
+
const nestedGroupRules = groupNode.rules.filter((rule) => extractRef(rule) === null);
|
|
79
|
+
ctx.onReplaceNode(groupPath, Object.assign(Object.assign({}, groupNode), { rules: [...newChipNodes, ...nestedGroupRules] }));
|
|
80
|
+
};
|
|
81
|
+
const chipInteractHandler = (groupPath, chipsByToken, ctx) => (event) => {
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
const token = interactedToken(event.detail);
|
|
84
|
+
const chip = token ? chipsByToken.get(token) : undefined;
|
|
85
|
+
if (!chip) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
ctx.onChipInteract([...groupPath, 'rules', chip.index]);
|
|
89
|
+
};
|
|
90
|
+
const chipNegateHandler = (openChip, openChipPath, ctx) => (event) => {
|
|
91
|
+
event.stopPropagation();
|
|
92
|
+
const next = event.detail
|
|
93
|
+
? { type: 'not', rule: openChip.ref }
|
|
94
|
+
: openChip.ref;
|
|
95
|
+
ctx.onReplaceNode(openChipPath, next);
|
|
96
|
+
};
|
|
97
|
+
const chipArgsHandler = (openChip, openChipPath, ctx) => (event) => {
|
|
98
|
+
event.stopPropagation();
|
|
99
|
+
const argsPath = openChip.isNegated
|
|
100
|
+
? [...openChipPath, 'rule']
|
|
101
|
+
: openChipPath;
|
|
102
|
+
ctx.onUpdateArgs(argsPath, event.detail);
|
|
103
|
+
};
|
|
104
|
+
const chipDeleteHandler = (openChipPath, ctx) => () => {
|
|
105
|
+
ctx.onDelete(openChipPath);
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* `limel-picker` declares its `interact` event as
|
|
109
|
+
* `EventEmitter<ListItem<PickerValue>>` but the runtime actually emits
|
|
110
|
+
* the chip's value (a string) — see picker.tsx's handleInteract. This
|
|
111
|
+
* unwraps either shape into the string token.
|
|
112
|
+
* @param detail
|
|
113
|
+
*/
|
|
114
|
+
function interactedToken(detail) {
|
|
115
|
+
if (typeof detail === 'string') {
|
|
116
|
+
return detail;
|
|
117
|
+
}
|
|
118
|
+
if (detail && typeof detail === 'object' && 'value' in detail) {
|
|
119
|
+
const value = detail.value;
|
|
120
|
+
return typeof value === 'string' ? value : undefined;
|
|
121
|
+
}
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
124
|
+
function findOpenChip(chipChildren, groupPath, openChipPath) {
|
|
125
|
+
var _a;
|
|
126
|
+
const index = openChipIndexInGroup(groupPath, openChipPath);
|
|
127
|
+
if (index === null) {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
return (_a = chipChildren.find((entry) => entry.index === index)) !== null && _a !== void 0 ? _a : null;
|
|
131
|
+
}
|
|
132
|
+
function openChipIndexInGroup(groupPath, openChipPath) {
|
|
133
|
+
if (!openChipPath || openChipPath.length < CHIP_PATH_SUFFIX_LENGTH) {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
if (!pathsEqual(parentGroupPath(openChipPath), groupPath)) {
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
const lastKey = openChipPath.at(-1);
|
|
140
|
+
return typeof lastKey === 'number' ? lastKey : null;
|
|
141
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { appendChild, issuesAt, wrapNegated, } from "./rule-operations";
|
|
3
|
+
import { IssuesView, RuleNodeView, } from "./rule-editor-views";
|
|
4
|
+
import { nodeClasses } from "./view-helpers";
|
|
5
|
+
import { extractRef, GroupChipsView } from "./chip-picker-view";
|
|
6
|
+
export const GroupNodeView = ({ node, path, isNegated, ctx }) => {
|
|
7
|
+
const groupBasePath = isNegated ? [...path, 'rule'] : path;
|
|
8
|
+
const issuesHere = isNegated
|
|
9
|
+
? [
|
|
10
|
+
...issuesAt(ctx.issues, path),
|
|
11
|
+
...issuesAt(ctx.issues, groupBasePath),
|
|
12
|
+
]
|
|
13
|
+
: issuesAt(ctx.issues, path);
|
|
14
|
+
const chipChildren = [];
|
|
15
|
+
const nestedGroups = [];
|
|
16
|
+
for (const [index, child] of node.rules.entries()) {
|
|
17
|
+
const extracted = extractRef(child);
|
|
18
|
+
if (extracted) {
|
|
19
|
+
chipChildren.push(Object.assign(Object.assign({}, extracted), { index }));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
nestedGroups.push({ child, index });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const options = combinatorOptions(ctx);
|
|
26
|
+
const selectedCombinator = options.find((option) => option.value === node.type);
|
|
27
|
+
return (h("div", { class: nodeClasses(node.type, issuesHere), key: pathKey(path) }, h("div", { class: "rule-node__header" }, h("limel-select", { class: "rule-node__combinator-select", value: selectedCombinator, options: options, disabled: !ctx.isMutable, onChange: combinatorChangeHandler(node, path, isNegated, ctx) }), renderMutableGroupActions(node, path, isNegated, ctx)), h("div", { class: "rule-node__body" }, h(IssuesView, { issues: issuesHere }), h(GroupChipsView, { groupNode: node, groupPath: groupBasePath, chipChildren: chipChildren, ctx: ctx }), renderNestedGroups(nestedGroups, groupBasePath, ctx), renderAddGroupFooter(node, path, isNegated, ctx))));
|
|
28
|
+
};
|
|
29
|
+
function pathKey(path) {
|
|
30
|
+
return path.length === 0 ? 'root' : path.join('/');
|
|
31
|
+
}
|
|
32
|
+
function combinatorOptions(ctx) {
|
|
33
|
+
return [
|
|
34
|
+
{
|
|
35
|
+
value: 'all',
|
|
36
|
+
text: ctx.translator.get('webclient.rule-editor.combinator.all'),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
value: 'any',
|
|
40
|
+
text: ctx.translator.get('webclient.rule-editor.combinator.any'),
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
function renderMutableGroupActions(node, path, isNegated, ctx) {
|
|
45
|
+
if (!ctx.isMutable) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return (h("div", { class: "rule-node__header-actions" }, h("limel-switch", { class: "rule-node__negate-switch", label: ctx.translator.get('webclient.rule-editor.negate'), value: isNegated, onChange: negateGroupHandler(node, path, ctx) }), h("limel-icon-button", { icon: "trash", label: ctx.translator.get('webclient.rule-editor.delete'), onClick: () => ctx.onDelete(path) })));
|
|
49
|
+
}
|
|
50
|
+
function renderNestedGroups(nestedGroups, groupBasePath, ctx) {
|
|
51
|
+
if (nestedGroups.length === 0) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return (h("div", { class: "rule-node__children" }, nestedGroups.map((entry) => (h(RuleNodeView, { node: entry.child, path: [...groupBasePath, 'rules', entry.index], ctx: ctx })))));
|
|
55
|
+
}
|
|
56
|
+
function renderAddGroupFooter(node, path, isNegated, ctx) {
|
|
57
|
+
if (!ctx.isMutable) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
return (h("div", { class: "rule-node__footer" }, h("limel-button", { icon: "add", label: ctx.translator.get('webclient.rule-editor.add-nested-group'), onClick: addGroupHandler(node, path, isNegated, ctx) })));
|
|
61
|
+
}
|
|
62
|
+
function replaceGroup(nextGroup, path, isNegated, ctx) {
|
|
63
|
+
ctx.onReplaceNode(path, wrapNegated(nextGroup, isNegated));
|
|
64
|
+
}
|
|
65
|
+
const combinatorChangeHandler = (node, path, isNegated, ctx) => (event) => {
|
|
66
|
+
event.stopPropagation();
|
|
67
|
+
const newType = event.detail.value;
|
|
68
|
+
if (newType !== node.type) {
|
|
69
|
+
replaceGroup(Object.assign(Object.assign({}, node), { type: newType }), path, isNegated, ctx);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const addGroupHandler = (node, path, isNegated, ctx) => () => {
|
|
73
|
+
const expanded = appendChild(node, { type: 'all', rules: [] });
|
|
74
|
+
replaceGroup(expanded, path, isNegated, ctx);
|
|
75
|
+
};
|
|
76
|
+
const negateGroupHandler = (node, path, ctx) => (event) => {
|
|
77
|
+
event.stopPropagation();
|
|
78
|
+
ctx.onReplaceNode(path, wrapNegated(node, event.detail));
|
|
79
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.popover {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
min-width: 24rem;
|
|
9
|
+
background-color: rgb(var(--contrast-100));
|
|
10
|
+
border: 1px solid rgb(var(--contrast-700));
|
|
11
|
+
border-radius: 0.5rem;
|
|
12
|
+
box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.popover__header {
|
|
17
|
+
--header-background-color: rgba(var(--contrast-300));
|
|
18
|
+
padding-right: 0.5rem;
|
|
19
|
+
gap: 1rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.popover__header-actions {
|
|
23
|
+
display: grid;
|
|
24
|
+
grid-auto-flow: column;
|
|
25
|
+
grid-gap: 0.75rem;
|
|
26
|
+
padding: 0.25rem;
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.popover__delete-button {
|
|
31
|
+
color: rgb(var(--contrast-1100));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.popover__body {
|
|
35
|
+
padding: 1rem;
|
|
36
|
+
}
|