@limetech/lime-crm-building-blocks 1.115.1 → 1.116.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/{_Map-60aae0ed.js → _Map-BlpAtLvq.js} +12 -24
- package/dist/cjs/{_MapCache-8b125fbb.js → _MapCache-De1Fwe0H.js} +5 -7
- package/dist/cjs/{_Uint8Array-95263550.js → _Uint8Array-C_lvn5HO.js} +6 -14
- package/dist/cjs/{_baseIsEqual-f2d60d3e.js → _baseIsEqual-BtwicGmu.js} +4 -4
- package/dist/cjs/{_defineProperty-40a6ad5d.js → _defineProperty-eImBwVFM.js} +2 -4
- package/dist/cjs/{_getTag-8809c5c6.js → _getTag-CdUodI28.js} +18 -39
- package/dist/cjs/{get-932b213e.js → get-BRGtX379.js} +6 -14
- package/dist/cjs/{index-519b904a.js → index-C_OnxXhP.js} +541 -322
- package/dist/cjs/index.esm-DhBVH875.js +838 -0
- package/dist/cjs/{isSymbol-5b36aeee.js → isSymbol-D8S28StA.js} +1 -1
- package/dist/cjs/lime-crm-building-blocks.cjs.js +7 -7
- package/dist/cjs/{lime-query-validation-c118b96d.js → lime-query-validation-CWlZPm8m.js} +8 -8
- package/dist/cjs/limebb-alert-dialog.cjs.entry.js +5 -8
- package/dist/cjs/limebb-browser.cjs.entry.js +11 -14
- package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +212 -0
- package/dist/cjs/limebb-chat-list.cjs.entry.js +46 -45
- package/dist/cjs/limebb-component-config.cjs.entry.js +17 -16
- package/dist/cjs/limebb-component-picker.cjs.entry.js +9 -12
- package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +9 -12
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1907 -1790
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +4 -7
- package/dist/cjs/limebb-data-cells.cjs.entry.js +5 -8
- package/dist/cjs/limebb-date-picker.cjs.entry.js +7 -9
- package/dist/cjs/limebb-date-range.cjs.entry.js +6 -9
- package/dist/cjs/limebb-document-chips.cjs.entry.js +10 -11
- package/dist/cjs/limebb-document-item.cjs.entry.js +6 -9
- package/dist/cjs/limebb-document-picker.cjs.entry.js +6 -9
- package/dist/cjs/limebb-empty-state.cjs.entry.js +3 -6
- package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +4 -7
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +8 -11
- package/dist/cjs/limebb-feed.cjs.entry.js +430 -168
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +4 -6
- package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +2 -4
- package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +4 -7
- package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +2 -4
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +5 -8
- package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +2 -4
- package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +2 -4
- package/dist/cjs/limebb-info-tile.cjs.entry.js +27 -24
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +8 -11
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +8 -11
- package/dist/cjs/limebb-kanban.cjs.entry.js +5 -8
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +9 -12
- package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +27 -29
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +26 -30
- package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +25 -30
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +6 -9
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +9 -12
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +8 -12
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +9 -12
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +5 -8
- package/dist/cjs/limebb-loader.cjs.entry.js +12 -10
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +29 -49
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +5 -8
- package/dist/cjs/limebb-mention.cjs.entry.js +6 -9
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +10 -14
- package/dist/cjs/limebb-notification-item.cjs.entry.js +9 -12
- package/dist/cjs/limebb-notification-list.cjs.entry.js +10 -11
- package/dist/cjs/limebb-object-chip.cjs.entry.js +16 -15
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +9 -10
- package/dist/cjs/limebb-property-selector.cjs.entry.js +9 -12
- package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +9 -10
- package/dist/cjs/limebb-text-editor.cjs.entry.js +53 -307
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +8 -9
- package/dist/cjs/{limetype-3c1c53b6.js → limetype-6tkuY6nm.js} +2 -2
- package/dist/cjs/loader.cjs.js +3 -5
- package/dist/collection/collection-manifest.json +4 -2
- package/dist/collection/components/alert-dialog/alert-dialog.js +11 -10
- package/dist/collection/components/browser/browser.js +14 -9
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.css +199 -0
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +75 -0
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.types.js +1 -0
- package/dist/collection/components/chat-list/chat-item/chat-item.js +11 -8
- package/dist/collection/components/chat-list/chat-list.js +30 -17
- package/dist/collection/components/chat-list/chat-list.types.js +1 -0
- package/dist/collection/components/chat-list/process-chat-items.js +26 -33
- package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/component-command-picker/component-config/component-config.js +23 -19
- package/dist/collection/components/component-command-picker/component-picker/component-picker.js +21 -18
- package/dist/collection/components/composer-toolbar/composer-toolbar.js +14 -10
- package/dist/collection/components/currency-picker/currency-picker.js +15 -13
- package/dist/collection/components/dashboard-widget/dashboard-widget.js +11 -10
- package/dist/collection/components/data-cells/data-cells.js +8 -5
- package/dist/collection/components/date-picker/date-picker.js +20 -17
- package/dist/collection/components/date-range/date-range.js +19 -15
- package/dist/collection/components/document-chips/document-chips.js +5 -4
- package/dist/collection/components/document-picker/document-item/document-item.js +13 -8
- package/dist/collection/components/document-picker/document-picker.js +18 -13
- package/dist/collection/components/empty-state/empty-state.js +6 -5
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +12 -9
- package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +3 -3
- package/dist/collection/components/feed/feed.js +21 -18
- package/dist/collection/components/icon-picker/icon-picker.js +15 -15
- package/dist/collection/components/info-tile/format/config/info-tile-currency-format.js +8 -4
- package/dist/collection/components/info-tile/format/config/info-tile-date-format.js +4 -2
- package/dist/collection/components/info-tile/format/config/info-tile-decimal-format.js +4 -2
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +11 -7
- package/dist/collection/components/info-tile/format/config/info-tile-relative-date-format.js +4 -2
- package/dist/collection/components/info-tile/format/config/info-tile-unit-format.js +4 -2
- package/dist/collection/components/info-tile/info-tile.js +29 -23
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +19 -16
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +9 -5
- package/dist/collection/components/kanban/kanban.js +10 -5
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.js +12 -8
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +11 -9
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +14 -10
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +14 -10
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +15 -11
- package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +17 -14
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +13 -9
- package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +13 -9
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +22 -19
- package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +12 -8
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +12 -8
- package/dist/collection/components/lime-query-builder/property-selector/property-selector.js +12 -10
- package/dist/collection/components/lime-query-builder/response-format/response-format-editor.js +11 -7
- package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +11 -7
- package/dist/collection/components/limeobject/file-viewer/file-viewer.js +8 -5
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/loader/loader.js +4 -2
- package/dist/collection/components/locale-picker/locale-picker.js +23 -19
- package/dist/collection/components/mention/mention.js +4 -4
- package/dist/collection/components/navigation-button/navigation-button.js +10 -9
- package/dist/collection/components/notification-list/notification-item/notification-item.js +9 -5
- package/dist/collection/components/notification-list/notification-list.js +12 -8
- package/dist/collection/components/object-chip/object-chip.js +7 -6
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +21 -19
- package/dist/collection/components/summary-popover/summary-popover.js +28 -21
- package/dist/collection/components/text-editor/mention-group-counter.js +8 -7
- package/dist/collection/components/text-editor/text-editor-picker.js +10 -7
- package/dist/collection/components/text-editor/text-editor.js +37 -29
- package/dist/collection/components/trend-indicator/trend-indicator.js +19 -17
- package/dist/components/_Map.js +1 -342
- package/dist/components/_MapCache.js +1 -433
- package/dist/components/_Uint8Array.js +1 -349
- package/dist/components/_baseIsEqual.js +1 -494
- package/dist/components/_defineProperty.js +1 -13
- package/dist/components/_getTag.js +1 -421
- package/dist/components/chat-icon-list.js +1 -0
- package/dist/components/chat-item.js +1 -184
- package/dist/components/currency-picker.js +1 -1917
- package/dist/components/date-picker.js +1 -151
- package/dist/components/document-item.js +1 -212
- package/dist/components/dom.js +1 -26
- package/dist/components/empty-state.js +1 -61
- package/dist/components/extension-mapping.js +1 -55
- package/dist/components/feed-item-thumbnail-file-info.js +1 -33
- package/dist/components/feed-timeline-item.js +1 -453
- package/dist/components/get.js +1 -308
- package/dist/components/highlight-item.handler.js +1 -36
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.esm.js +1 -963
- package/dist/components/index.js +1 -1
- package/dist/components/isSymbol.js +1 -28
- package/dist/components/kanban-group.js +1 -148
- package/dist/components/kanban-item.js +1 -182
- package/dist/components/keycodes.js +1 -7
- package/dist/components/lime-query-filter-builder.js +1 -132
- package/dist/components/lime-query-filter-comparison.js +1 -180
- package/dist/components/lime-query-filter-expression.js +1 -420
- package/dist/components/lime-query-validation.js +1 -617
- package/dist/components/lime-query-value-input.js +1 -387
- package/dist/components/limebb-alert-dialog.js +1 -71
- package/dist/components/limebb-browser.js +1 -116
- package/dist/components/limebb-chat-icon-list.d.ts +11 -0
- package/dist/components/limebb-chat-icon-list.js +1 -0
- package/dist/components/limebb-chat-item.js +1 -6
- package/dist/components/limebb-chat-list.js +1 -294
- package/dist/components/limebb-component-config.js +1 -176
- package/dist/components/limebb-component-picker.js +1 -180
- package/dist/components/limebb-composer-toolbar.js +1 -136
- package/dist/components/limebb-currency-picker.js +1 -6
- package/dist/components/limebb-dashboard-widget.js +1 -48
- package/dist/components/limebb-data-cells.js +1 -169
- package/dist/components/limebb-date-picker.js +1 -6
- package/dist/components/limebb-date-range.js +1 -83
- package/dist/components/limebb-document-chips.js +1 -437
- package/dist/components/limebb-document-item.js +1 -6
- package/dist/components/limebb-document-picker.js +1 -111
- package/dist/components/limebb-empty-state.js +1 -6
- package/dist/components/limebb-feed-item-thumbnail-file-info.js +1 -6
- package/dist/components/limebb-feed-timeline-item.js +1 -6
- package/dist/components/limebb-feed.js +1 -398
- package/dist/components/limebb-icon-picker.js +1 -53026
- package/dist/components/limebb-info-tile-currency-format.js +1 -116
- package/dist/components/limebb-info-tile-date-format.js +1 -272
- package/dist/components/limebb-info-tile-decimal-format.js +1 -95
- package/dist/components/limebb-info-tile-format.js +1 -144
- package/dist/components/limebb-info-tile-relative-date-format.js +1 -72
- package/dist/components/limebb-info-tile-unit-format.js +1 -183
- package/dist/components/limebb-info-tile.js +1 -626
- package/dist/components/limebb-kanban-group.js +1 -6
- package/dist/components/limebb-kanban-item.js +1 -6
- package/dist/components/limebb-kanban.js +1 -79
- package/dist/components/limebb-lime-query-builder.js +1 -424
- package/dist/components/limebb-lime-query-filter-builder.js +1 -6
- package/dist/components/limebb-lime-query-filter-comparison.js +1 -6
- package/dist/components/limebb-lime-query-filter-expression.js +1 -6
- package/dist/components/limebb-lime-query-filter-group.js +1 -6
- package/dist/components/limebb-lime-query-filter-not.js +1 -6
- package/dist/components/limebb-lime-query-order-by-editor.js +1 -6
- package/dist/components/limebb-lime-query-order-by-item.js +1 -6
- package/dist/components/limebb-lime-query-response-format-builder.js +1 -310
- package/dist/components/limebb-lime-query-response-format-editor.js +1 -6
- package/dist/components/limebb-lime-query-response-format-item.js +1 -6
- package/dist/components/limebb-lime-query-value-input.js +1 -6
- package/dist/components/limebb-limeobject-file-viewer.js +1 -175
- package/dist/components/limebb-limetype-field.js +1 -6
- package/dist/components/limebb-live-docs-info.js +1 -6
- package/dist/components/limebb-loader.js +1 -78
- package/dist/components/limebb-locale-picker.js +1 -1165
- package/dist/components/limebb-mention-group-counter.js +1 -48
- package/dist/components/limebb-mention.js +1 -79
- package/dist/components/limebb-navigation-button.js +1 -6
- package/dist/components/limebb-notification-item.js +1 -6
- package/dist/components/limebb-notification-list.js +1 -253
- package/dist/components/limebb-object-chip.js +1 -253
- package/dist/components/limebb-percentage-visualizer.js +1 -6
- package/dist/components/limebb-property-selector.js +1 -6
- package/dist/components/limebb-summary-popover.js +1 -6
- package/dist/components/limebb-text-editor-picker.js +1 -6
- package/dist/components/limebb-text-editor.js +1 -1902
- package/dist/components/limebb-trend-indicator.js +1 -175
- package/dist/components/limebb-typing-indicator.js +1 -6
- package/dist/components/limetype-field.js +1 -216
- package/dist/components/limetype.js +1 -85
- package/dist/components/live-docs-info.js +1 -34
- package/dist/components/navigation-button.js +1 -74
- package/dist/components/negate.js +1 -40
- package/dist/components/non-null.js +1 -10
- package/dist/components/notification-item.js +1 -168
- package/dist/components/order-by-editor.js +1 -139
- package/dist/components/order-by-item.js +1 -73
- package/dist/components/percentage-class.js +1 -64
- package/dist/components/percentage-visualizer.js +1 -219
- package/dist/components/property-selector.js +1 -372
- package/dist/components/random-string.js +1 -22
- package/dist/components/response-format-editor.js +1 -331
- package/dist/components/response-format-item.js +1 -126
- package/dist/components/summary-popover.js +1 -159
- package/dist/components/text-editor-picker.js +1 -128
- package/dist/components/typing-indicator.js +1 -31
- package/dist/esm/{_Map-aede53b6.js → _Map-ByjZfyP_.js} +8 -20
- package/dist/esm/{_MapCache-af496e9d.js → _MapCache-C_kVhYUl.js} +5 -7
- package/dist/esm/{_Uint8Array-d6ebd526.js → _Uint8Array-DVXPnoWk.js} +6 -10
- package/dist/esm/{_baseIsEqual-077b6bb3.js → _baseIsEqual-DB13O4pD.js} +4 -4
- package/dist/esm/{_defineProperty-e6a185c3.js → _defineProperty-DSmG08hO.js} +2 -4
- package/dist/esm/{_getTag-d02a95fa.js → _getTag-DZlkp9mJ.js} +12 -32
- package/dist/esm/{get-3e42932b.js → get-Bo260bSC.js} +6 -14
- package/dist/esm/{index-d86e55c0.js → index-BIwHMk6j.js} +539 -300
- package/dist/esm/index.esm-BjlE4usG.js +823 -0
- package/dist/esm/{isSymbol-1c5f65cc.js → isSymbol-Ci8cASb6.js} +1 -1
- package/dist/esm/lime-crm-building-blocks.js +6 -5
- package/dist/esm/{lime-query-validation-01797a51.js → lime-query-validation-S9h8L6bg.js} +8 -8
- package/dist/esm/limebb-alert-dialog.entry.js +5 -6
- package/dist/esm/limebb-browser.entry.js +11 -12
- package/dist/esm/limebb-chat-icon-list_3.entry.js +208 -0
- package/dist/esm/limebb-chat-list.entry.js +46 -43
- package/dist/esm/limebb-component-config.entry.js +17 -14
- package/dist/esm/limebb-component-picker.entry.js +9 -10
- package/dist/esm/limebb-composer-toolbar.entry.js +9 -10
- package/dist/esm/limebb-currency-picker.entry.js +1908 -1789
- package/dist/esm/limebb-dashboard-widget.entry.js +4 -5
- package/dist/esm/limebb-data-cells.entry.js +5 -6
- package/dist/esm/limebb-date-picker.entry.js +7 -7
- package/dist/esm/limebb-date-range.entry.js +6 -7
- package/dist/esm/limebb-document-chips.entry.js +10 -9
- package/dist/esm/limebb-document-item.entry.js +6 -7
- package/dist/esm/limebb-document-picker.entry.js +6 -7
- package/dist/esm/limebb-empty-state.entry.js +3 -4
- package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +4 -5
- package/dist/esm/limebb-feed-timeline-item.entry.js +8 -9
- package/dist/esm/limebb-feed.entry.js +430 -166
- package/dist/esm/limebb-icon-picker.entry.js +4 -4
- package/dist/esm/limebb-info-tile-currency-format.entry.js +2 -2
- package/dist/esm/limebb-info-tile-date-format.entry.js +4 -5
- package/dist/esm/limebb-info-tile-decimal-format.entry.js +2 -2
- package/dist/esm/limebb-info-tile-format.entry.js +5 -6
- package/dist/esm/limebb-info-tile-relative-date-format.entry.js +2 -2
- package/dist/esm/limebb-info-tile-unit-format.entry.js +2 -2
- package/dist/esm/limebb-info-tile.entry.js +27 -22
- package/dist/esm/limebb-kanban-group.entry.js +8 -9
- package/dist/esm/limebb-kanban-item.entry.js +8 -9
- package/dist/esm/limebb-kanban.entry.js +5 -6
- package/dist/esm/limebb-lime-query-builder.entry.js +9 -10
- package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +27 -27
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +26 -28
- package/dist/esm/limebb-lime-query-filter-group_3.entry.js +25 -28
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +6 -7
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +9 -10
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +8 -10
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +9 -10
- package/dist/esm/limebb-live-docs-info.entry.js +5 -6
- package/dist/esm/limebb-loader.entry.js +12 -8
- package/dist/esm/limebb-locale-picker.entry.js +29 -47
- package/dist/esm/limebb-mention-group-counter.entry.js +5 -6
- package/dist/esm/limebb-mention.entry.js +6 -7
- package/dist/esm/limebb-navigation-button_2.entry.js +10 -12
- package/dist/esm/limebb-notification-item.entry.js +9 -10
- package/dist/esm/limebb-notification-list.entry.js +10 -9
- package/dist/esm/limebb-object-chip.entry.js +16 -13
- package/dist/esm/limebb-percentage-visualizer.entry.js +9 -8
- package/dist/esm/limebb-property-selector.entry.js +9 -10
- package/dist/esm/limebb-text-editor-picker.entry.js +9 -8
- package/dist/esm/limebb-text-editor.entry.js +53 -305
- package/dist/esm/limebb-trend-indicator.entry.js +8 -7
- package/dist/esm/{limetype-12fbba0f.js → limetype-B3nph1qc.js} +3 -3
- package/dist/esm/loader.js +4 -4
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-eb4aa158.entry.js → p-0afc0db2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-12aadae6.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-1428aa13.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-152edb10.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-1f02a411.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-21ec697f.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-283270c5.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-3252e153.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-3263f8d5.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-32f8477f.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-35a51259.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-38201f65.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-3ef87b11.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-e79f16ca.entry.js → p-4446f170.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-77e7d7da.entry.js → p-49afe71b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-4ddd75bc.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-528f3635.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-52fb2a66.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-5d87cb38.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-60e22f51.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-62437a1d.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-626421bf.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-62981791.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-685dd8a1.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-94e6f0de.entry.js → p-6cb2d9dd.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-6fdee70a.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-71191041.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-f7122d8e.entry.js → p-740ae712.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-79f3fd73.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-8477cb5d.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-50aad872.entry.js → p-8e2cc2e8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-9ae55a96.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-B8RiYkLS.js +1 -0
- package/dist/lime-crm-building-blocks/p-BIwHMk6j.js +2 -0
- package/dist/lime-crm-building-blocks/p-BJ8HvfgI.js +1 -0
- package/dist/lime-crm-building-blocks/p-ByjZfyP_.js +1 -0
- package/dist/lime-crm-building-blocks/{p-0a266c26.js → p-CMfAKLlA.js} +1 -1
- package/dist/lime-crm-building-blocks/p-CQ-z_HTt.js +1 -0
- package/dist/lime-crm-building-blocks/p-CcGMZOP-.js +1 -0
- package/dist/lime-crm-building-blocks/p-Dm_AIMQj.js +1 -0
- package/dist/lime-crm-building-blocks/p-V3xfp9dg.js +1 -0
- package/dist/lime-crm-building-blocks/p-aaeecca6.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-ac59093c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-acbc40f5.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-b2383e7f.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-b36ad4e8.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-ba42e434.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-bac3d599.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-7a6c1595.entry.js → p-bc3de5e3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-375f40d9.entry.js → p-c3b13800.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d9f76810.entry.js → p-c6bbcbee.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-cff9bccd.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-d2a01f51.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-dabb227b.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-dbe2c5df.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-e2e9adff.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-ebe6040f.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-eec0a0c8.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-f23ea0e7.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-22fffe85.entry.js → p-fa41a9e6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-fdf269f7.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-mljVfXwO.js +1 -0
- package/dist/lime-crm-building-blocks/p-wbuFLk-j.js +1 -0
- package/dist/lime-crm-building-blocks/p-yc--7_7T.js +1 -0
- package/dist/types/components/chat-list/chat-icon-list/chat-icon-list.d.ts +19 -0
- package/dist/types/components/chat-list/chat-icon-list/chat-icon-list.types.d.ts +52 -0
- package/dist/types/components/chat-list/chat-list.d.ts +7 -2
- package/dist/types/components/chat-list/chat-list.types.d.ts +13 -0
- package/dist/types/components/chat-list/process-chat-items.d.ts +20 -28
- package/dist/types/components.d.ts +664 -117
- package/dist/types/interface.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +192 -12
- package/package.json +10 -10
- package/dist/cjs/index.esm-e01e9bd4.js +0 -977
- package/dist/cjs/limebb-chat-item_2.cjs.entry.js +0 -181
- package/dist/esm/index.esm-11a8b9e2.js +0 -963
- package/dist/esm/limebb-chat-item_2.entry.js +0 -176
- package/dist/lime-crm-building-blocks/p-0d0f4c0f.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-0eac6b68.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-103654ac.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-123190c3.js +0 -1
- package/dist/lime-crm-building-blocks/p-18d1ab86.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-199799ff.js +0 -1
- package/dist/lime-crm-building-blocks/p-20939cd4.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-20b5ff30.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-2ed843e9.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-35897ec3.js +0 -1
- package/dist/lime-crm-building-blocks/p-3a7b37cc.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-3b3e7328.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-3da67f32.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4066e17a.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4b494de7.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4ca1caf4.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4dad4ce8.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-52cf8641.js +0 -2
- package/dist/lime-crm-building-blocks/p-5322fd19.js +0 -1
- package/dist/lime-crm-building-blocks/p-53d54dc8.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-579be797.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6a87a407.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6ad6a88d.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6bd5c65f.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6bf1ab6d.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-703fa2fe.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7b5a1e83.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7e6fb4af.js +0 -1
- package/dist/lime-crm-building-blocks/p-7f72be40.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-812bf26e.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-81583fc8.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-81f8e5df.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-87d3f42c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-8c3f563e.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-95b6eaf5.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-973146f7.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-9bc5caac.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-9c204549.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-9c334694.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-a7e55181.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-b31772c8.js +0 -1
- package/dist/lime-crm-building-blocks/p-b675d5f0.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-b7959ddb.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d298b34e.js +0 -1
- package/dist/lime-crm-building-blocks/p-d47b6c3c.js +0 -1
- package/dist/lime-crm-building-blocks/p-d5b835a6.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d7fc530f.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-dddd8a43.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-eb56d4eb.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-f31eeeaa.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-f788a48d.js +0 -1
- package/dist/lime-crm-building-blocks/p-fb292b3f.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-fe2b91d9.js +0 -1
- package/loader/package.json +0 -11
- /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
- /package/dist/cjs/{dom-2ea30350.js → dom--t_vVnyU.js} +0 -0
- /package/dist/cjs/{extension-mapping-63bdafd3.js → extension-mapping-CvK-Mz3f.js} +0 -0
- /package/dist/cjs/{file-extension-7c2eae39.js → file-extension-DolkaRwB.js} +0 -0
- /package/dist/cjs/{highlight-item.handler-584ab58a.js → highlight-item.handler-BVqvzXiD.js} +0 -0
- /package/dist/cjs/{keycodes-88522d7f.js → keycodes-BCQoLEdB.js} +0 -0
- /package/dist/cjs/{negate-e0a2bf77.js → negate-Bg3SqQh6.js} +0 -0
- /package/dist/cjs/{non-null-3bf14aa1.js → non-null-BMnREsqJ.js} +0 -0
- /package/dist/cjs/{percentage-class-012e94d9.js → percentage-class-DVoYzFLR.js} +0 -0
- /package/dist/cjs/{property-resolution-5f798b03.js → property-resolution-Bz1zPcfq.js} +0 -0
- /package/dist/cjs/{random-string-aac0a74b.js → random-string-BdZGIsGg.js} +0 -0
- /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
- /package/dist/esm/{dom-9cc051d7.js → dom-B95D7tDb.js} +0 -0
- /package/dist/esm/{extension-mapping-fcade195.js → extension-mapping-Bcm94u_z.js} +0 -0
- /package/dist/esm/{file-extension-568475d1.js → file-extension-DtnPTzDv.js} +0 -0
- /package/dist/esm/{highlight-item.handler-dfbf11c0.js → highlight-item.handler-BWMpG2bS.js} +0 -0
- /package/dist/esm/{keycodes-58a1fcc9.js → keycodes-CwMJvF_Z.js} +0 -0
- /package/dist/esm/{negate-55744008.js → negate-ooVD-6_a.js} +0 -0
- /package/dist/esm/{non-null-5a66a269.js → non-null-CkTg5UPD.js} +0 -0
- /package/dist/esm/{percentage-class-2766f8ef.js → percentage-class-BaQl_Elp.js} +0 -0
- /package/dist/esm/{property-resolution-e4e8dcf7.js → property-resolution-CQUZjrU4.js} +0 -0
- /package/dist/esm/{random-string-f6ef6fbf.js → random-string-C2JP2nLw.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-4a85590d.js → p-B95D7tDb.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-66352a1e.js → p-BWMpG2bS.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-a99197b1.js → p-BaQl_Elp.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-ab2a95a6.js → p-Bcm94u_z.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-fbda77a7.js → p-C2JP2nLw.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-b02c99d5.js → p-CQUZjrU4.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-1484e300.js → p-CkTg5UPD.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-463d3174.js → p-CwMJvF_Z.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-e1255160.js → p-DQuL1Twl.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-b42e9740.js → p-DtnPTzDv.js} +0 -0
- /package/dist/lime-crm-building-blocks/{p-7c9484b1.js → p-ooVD-6_a.js} +0 -0
|
@@ -1,219 +1 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as getPercentageClass } from './percentage-class.js';
|
|
3
|
-
|
|
4
|
-
const percentageVisualizerCss = "@charset \"UTF-8\";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^=\"-\"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:\"\";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}";
|
|
5
|
-
const LimebbPercentageVisualizerStyle0 = percentageVisualizerCss;
|
|
6
|
-
|
|
7
|
-
const DEFAULT_MULTIPLIER_FACTOR = 1;
|
|
8
|
-
const DEFAULT_RANGE_MAX = 100;
|
|
9
|
-
const DEFAULT_RANGE_MIN = 0;
|
|
10
|
-
const PERCENTAGE = 100;
|
|
11
|
-
const DECIMALS = 10;
|
|
12
|
-
const EPSILON = 0.0001;
|
|
13
|
-
const PercentageVisualizer = /*@__PURE__*/ proxyCustomElement(class PercentageVisualizer extends HTMLElement {
|
|
14
|
-
valueChanged(newValue) {
|
|
15
|
-
this.numValue = this.parseValue(newValue);
|
|
16
|
-
}
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
this.__registerHost();
|
|
20
|
-
this.__attachShadow();
|
|
21
|
-
/**
|
|
22
|
-
* The maximum value of the visualization range.
|
|
23
|
-
* This defines the upper bound of the scale used for visualization.
|
|
24
|
-
* Must be greater than rangeMin.
|
|
25
|
-
*/
|
|
26
|
-
this.rangeMax = DEFAULT_RANGE_MAX;
|
|
27
|
-
/**
|
|
28
|
-
* The minimum value of the visualization range.
|
|
29
|
-
* This defines the lower bound of the scale used for visualization.
|
|
30
|
-
* Must be less than rangeMax.
|
|
31
|
-
*/
|
|
32
|
-
this.rangeMin = DEFAULT_RANGE_MIN;
|
|
33
|
-
/**
|
|
34
|
-
* A multiplier factor to convert input values to percentages.
|
|
35
|
-
* For example, if your input is 0.75 and you want to display it as 75%, use a multiplier of 100.
|
|
36
|
-
*/
|
|
37
|
-
this.multiplier = DEFAULT_MULTIPLIER_FACTOR;
|
|
38
|
-
/**
|
|
39
|
-
* When set to `false`, if the `value` equals `0` or there is no value
|
|
40
|
-
* (_undefined_, _null_ or empty string), the component will
|
|
41
|
-
* render the visualization. See the examples for more details.
|
|
42
|
-
*/
|
|
43
|
-
this.reducePresence = true;
|
|
44
|
-
/**
|
|
45
|
-
* When set to `true`, makes the filled section showing the percentage colorful.
|
|
46
|
-
* Colors change follow Lime CRM's conventions:
|
|
47
|
-
* - with intervals of 10%, from 0% to 100% (when the range doesn't start with a negative value).
|
|
48
|
-
* - with intervals of 20%, from -200% to +200% (when the range starts with a negative value).
|
|
49
|
-
*/
|
|
50
|
-
this.displayPercentageColors = false;
|
|
51
|
-
this.labelId = 'label-' + crypto.randomUUID();
|
|
52
|
-
this.helperTextId = 'helper-text-' + crypto.randomUUID();
|
|
53
|
-
this.zeroPointId = 'zero-point-' + crypto.randomUUID();
|
|
54
|
-
this.renderHelperLine = () => {
|
|
55
|
-
if (!this.hasHelperText()) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
return (h("limel-helper-line", { helperTextId: this.helperTextId, helperText: this.helperText, invalid: this.invalid }));
|
|
59
|
-
};
|
|
60
|
-
this.hasHelperText = () => {
|
|
61
|
-
return this.helperText !== null && this.helperText !== undefined;
|
|
62
|
-
};
|
|
63
|
-
this.numValue = this.parseValue(this.value);
|
|
64
|
-
}
|
|
65
|
-
componentDidLoad() {
|
|
66
|
-
this.triggerRangeWarning();
|
|
67
|
-
}
|
|
68
|
-
componentWillUpdate() {
|
|
69
|
-
this.triggerRangeWarning();
|
|
70
|
-
}
|
|
71
|
-
triggerRangeWarning() {
|
|
72
|
-
if (this.rangeMin >= this.rangeMax) {
|
|
73
|
-
console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
render() {
|
|
77
|
-
const normalizedValue = this.getNormalizedValue();
|
|
78
|
-
const zeroPoint = this.getZeroPointPosition();
|
|
79
|
-
return (h(Host, { key: '0546d64013773f4c73fee3fffc7a9679ef6c95c5', class: this.getContainerClassList(), style: {
|
|
80
|
-
'--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
|
|
81
|
-
'--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
|
|
82
|
-
'--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
|
|
83
|
-
} }, h("limel-notched-outline", { key: 'df29f109a2d606b2b8d724e92be4161f19d8e025', 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: '7a4f7c2fb608f0006e3963e5d6d0eaefba0ecbbe', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
|
|
84
|
-
}
|
|
85
|
-
renderVisualization() {
|
|
86
|
-
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (!this.hasValue()) {
|
|
90
|
-
return h("span", { class: "no-value" }, "\u2013");
|
|
91
|
-
}
|
|
92
|
-
return [
|
|
93
|
-
h("div", { class: "percentage-bar" }, h("div", { class: "percentage-fill" }), this.renderZeroPoint()),
|
|
94
|
-
h("span", { class: "percentage-text" }, this.formatValue(this.numValue), h("span", { class: "percent-sign" }, "%")),
|
|
95
|
-
];
|
|
96
|
-
}
|
|
97
|
-
renderZeroPoint() {
|
|
98
|
-
if (this.rangeMin >= 0 || this.rangeMax <= 0) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
return [
|
|
102
|
-
h("div", { id: this.zeroPointId, class: "zero-point" }),
|
|
103
|
-
h("limel-tooltip", { elementId: this.zeroPointId, openDirection: "top", label: "0" }),
|
|
104
|
-
];
|
|
105
|
-
}
|
|
106
|
-
hasValue() {
|
|
107
|
-
return (this.value !== undefined && this.value !== null && this.value !== '');
|
|
108
|
-
}
|
|
109
|
-
getContainerClassList() {
|
|
110
|
-
if (!this.hasValue()) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
const processedValue = this.roundValue(this.multiplyByMultiplier(this.numValue));
|
|
114
|
-
const percentageClass = getPercentageClass(processedValue);
|
|
115
|
-
return Object.assign({}, (percentageClass && { [percentageClass]: true }));
|
|
116
|
-
}
|
|
117
|
-
getZeroPointPosition() {
|
|
118
|
-
const totalRange = this.rangeMax - this.rangeMin;
|
|
119
|
-
if (totalRange <= 0) {
|
|
120
|
-
// Handle invalid range by providing a safe default
|
|
121
|
-
return 0; // Align zero point at the start as a consistent fallback
|
|
122
|
-
}
|
|
123
|
-
return ((0 - this.rangeMin) / totalRange) * PERCENTAGE;
|
|
124
|
-
}
|
|
125
|
-
getNormalizedValue() {
|
|
126
|
-
const processedValue = this.roundValue(this.multiplyByMultiplier(this.numValue));
|
|
127
|
-
const totalRange = this.rangeMax - this.rangeMin;
|
|
128
|
-
if (totalRange <= 0) {
|
|
129
|
-
return 0;
|
|
130
|
-
}
|
|
131
|
-
const zeroRelativePosition = ((0 - this.rangeMin) / totalRange) * PERCENTAGE;
|
|
132
|
-
// Calculate the position relative to the zero point
|
|
133
|
-
// Using the EPSILON value serves several purposes:
|
|
134
|
-
// 1. Prevents Division by Zero:
|
|
135
|
-
// If this.maxValue or this.minValue is exactly 0,
|
|
136
|
-
// we'd get an infinity or NaN result without this protection.
|
|
137
|
-
// 2. Handles Edge Cases:
|
|
138
|
-
// Even though we validate that minValue < maxValue,
|
|
139
|
-
// there could still be cases where one of them is very close to zero,
|
|
140
|
-
// which could cause unstable calculations.
|
|
141
|
-
// 3. Defensive Programming:
|
|
142
|
-
// It ensures that the component degrades gracefully
|
|
143
|
-
// even in unexpected scenarios (like when a consumer sets maxValue to 0).
|
|
144
|
-
// .4 Numerical Stability:
|
|
145
|
-
// In floating-point math, using a small epsilon value
|
|
146
|
-
// is a best practice to avoid precision issues.
|
|
147
|
-
if (processedValue >= 0) {
|
|
148
|
-
return ((processedValue / Math.max(this.rangeMax, EPSILON)) *
|
|
149
|
-
(PERCENTAGE - zeroRelativePosition));
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
return ((processedValue / Math.max(Math.abs(this.rangeMin), EPSILON)) *
|
|
153
|
-
zeroRelativePosition);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
multiplyByMultiplier(value) {
|
|
157
|
-
return value * this.multiplier;
|
|
158
|
-
}
|
|
159
|
-
roundValue(value) {
|
|
160
|
-
// Round to 1 decimal place
|
|
161
|
-
return Math.round(value * DECIMALS) / DECIMALS;
|
|
162
|
-
}
|
|
163
|
-
unifyMinusSign(input) {
|
|
164
|
-
// Replace Unicode minus sign (−) with ASCII hyphen-minus (-)
|
|
165
|
-
return input.replaceAll('−', '-');
|
|
166
|
-
}
|
|
167
|
-
convertToUnicodeMinus(input) {
|
|
168
|
-
// Replace ASCII hyphen-minus (-) with Unicode minus sign (−)
|
|
169
|
-
return input.replaceAll('-', '−');
|
|
170
|
-
}
|
|
171
|
-
parseValue(value) {
|
|
172
|
-
if (typeof value === 'string') {
|
|
173
|
-
return Number.parseFloat(this.unifyMinusSign(value));
|
|
174
|
-
}
|
|
175
|
-
return value;
|
|
176
|
-
}
|
|
177
|
-
formatValue(value) {
|
|
178
|
-
const processedValue = this.roundValue(this.multiplyByMultiplier(value));
|
|
179
|
-
const constructedValue = `${processedValue}`;
|
|
180
|
-
if (processedValue < 0) {
|
|
181
|
-
return this.convertToUnicodeMinus(constructedValue);
|
|
182
|
-
}
|
|
183
|
-
return constructedValue;
|
|
184
|
-
}
|
|
185
|
-
static get watchers() { return {
|
|
186
|
-
"value": ["valueChanged"]
|
|
187
|
-
}; }
|
|
188
|
-
static get style() { return LimebbPercentageVisualizerStyle0; }
|
|
189
|
-
}, [1, "limebb-percentage-visualizer", {
|
|
190
|
-
"platform": [16],
|
|
191
|
-
"context": [16],
|
|
192
|
-
"value": [520],
|
|
193
|
-
"rangeMax": [514, "range-max"],
|
|
194
|
-
"rangeMin": [514, "range-min"],
|
|
195
|
-
"multiplier": [514],
|
|
196
|
-
"label": [513],
|
|
197
|
-
"invalid": [516],
|
|
198
|
-
"required": [516],
|
|
199
|
-
"helperText": [513, "helper-text"],
|
|
200
|
-
"reducePresence": [516, "reduce-presence"],
|
|
201
|
-
"displayPercentageColors": [516, "display-percentage-colors"]
|
|
202
|
-
}, undefined, {
|
|
203
|
-
"value": ["valueChanged"]
|
|
204
|
-
}]);
|
|
205
|
-
function defineCustomElement() {
|
|
206
|
-
if (typeof customElements === "undefined") {
|
|
207
|
-
return;
|
|
208
|
-
}
|
|
209
|
-
const components = ["limebb-percentage-visualizer"];
|
|
210
|
-
components.forEach(tagName => { switch (tagName) {
|
|
211
|
-
case "limebb-percentage-visualizer":
|
|
212
|
-
if (!customElements.get(tagName)) {
|
|
213
|
-
customElements.define(tagName, PercentageVisualizer);
|
|
214
|
-
}
|
|
215
|
-
break;
|
|
216
|
-
} });
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export { PercentageVisualizer as P, defineCustomElement as d };
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as r,h as a,Host as l,transformTag as t}from"@stencil/core/internal/client";import{g as i}from"./percentage-class.js";const o=1e-4,s=e(class extends r{valueChanged(e){this.numValue=this.parseValue(e)}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return a("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText,this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),r=this.getZeroPointPosition();return a(l,{key:"c4441d7dec4161e552ff323d65b7897d8f1cbf1d",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${r}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},a("limel-notched-outline",{key:"253d0bcd609dfeffa7a38d4c60dce4f844550071",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:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},a("div",{key:"ae9e96a420963b143347d13252b1986a67da3172",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[a("div",{class:"percentage-bar"},a("div",{class:"percentage-fill"}),this.renderZeroPoint()),a("span",{class:"percentage-text"},this.formatValue(this.numValue),a("span",{class:"percent-sign"},"%"))]:a("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[a("div",{id:this.zeroPointId,class:"zero-point"}),a("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=i(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,o)*(100-a):e/Math.max(Math.abs(this.rangeMin),o)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(this.unifyMinusSign(e)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=`${r}`;return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:[{valueChanged:0}]}}static get style(){return'@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}'}},[1,"limebb-percentage-visualizer",{platform:[16],context:[16],value:[520],rangeMax:[514,"range-max"],rangeMin:[514,"range-min"],multiplier:[514],label:[513],invalid:[516],required:[516],helperText:[513,"helper-text"],reducePresence:[516,"reduce-presence"],displayPercentageColors:[516,"display-percentage-colors"]},void 0,{value:[{valueChanged:0}]}]);function n(){"undefined"!=typeof customElements&&["limebb-percentage-visualizer"].forEach((e=>{"limebb-percentage-visualizer"===e&&(customElements.get(t(e))||customElements.define(t(e),s))}))}export{s as P,n as d}
|
|
@@ -1,372 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Z as Ze, c } from './index.esm.js';
|
|
3
|
-
import { g as getIcon } from './limetype.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Get normalized properties for a limetype
|
|
7
|
-
* Adds system properties (_id, _timestamp, etc.) that map to the actual limeobject attributes
|
|
8
|
-
* @param limetype The limetype to normalize
|
|
9
|
-
* @returns Normalized properties with system properties prefixed with underscore
|
|
10
|
-
*/
|
|
11
|
-
function getNormalizedProperties(limetype) {
|
|
12
|
-
if (!(limetype === null || limetype === void 0 ? void 0 : limetype.properties)) {
|
|
13
|
-
return {};
|
|
14
|
-
}
|
|
15
|
-
const properties = Object.assign({}, limetype.properties);
|
|
16
|
-
// System properties that are exposed by the backend
|
|
17
|
-
// Map from internal property name to API property name
|
|
18
|
-
const systemProperties = {
|
|
19
|
-
id: '_id',
|
|
20
|
-
timestamp: '_timestamp',
|
|
21
|
-
descriptive: '_descriptive',
|
|
22
|
-
createduser: '_createduser',
|
|
23
|
-
createdtime: '_createdtime',
|
|
24
|
-
updateduser: '_updateduser',
|
|
25
|
-
};
|
|
26
|
-
// Find and normalize system properties by name
|
|
27
|
-
for (const [propName, systemPropName] of Object.entries(systemProperties)) {
|
|
28
|
-
const property = properties[propName];
|
|
29
|
-
if (property) {
|
|
30
|
-
properties[systemPropName] = property;
|
|
31
|
-
delete properties[propName];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return properties;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Get property from limetype by path (e.g., "company.name")
|
|
38
|
-
* Supports relation traversal with dot-notation
|
|
39
|
-
* @param limetypes
|
|
40
|
-
* @param limetype
|
|
41
|
-
* @param path
|
|
42
|
-
*/
|
|
43
|
-
function getPropertyFromPath(limetypes, limetype, path) {
|
|
44
|
-
if (!path || !limetype || !limetypes) {
|
|
45
|
-
return undefined;
|
|
46
|
-
}
|
|
47
|
-
const parts = path.split('.');
|
|
48
|
-
let currentType = limetypes[limetype];
|
|
49
|
-
let property;
|
|
50
|
-
for (const part of parts) {
|
|
51
|
-
if (!currentType) {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
const normalizedProperties = getNormalizedProperties(currentType);
|
|
55
|
-
property = normalizedProperties[part];
|
|
56
|
-
if (!property) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
// If this is a relation, get the related limetype for next iteration
|
|
60
|
-
if (property.relation) {
|
|
61
|
-
currentType = property.relation.getLimetype();
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return property;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Validates a property path to ensure no intermediate properties are hasMany or hasAndBelongsToMany relations.
|
|
68
|
-
* These relation types cannot be traversed in filter expressions.
|
|
69
|
-
* @param limetypes All limetype definitions
|
|
70
|
-
* @param limetype The starting limetype
|
|
71
|
-
* @param path The property path to validate (e.g., "company.name")
|
|
72
|
-
* @returns The property at the end of the path if valid, or undefined with error if invalid
|
|
73
|
-
*/
|
|
74
|
-
function validatePropertyPath(limetypes, limetype, path) {
|
|
75
|
-
if (!path || !limetype || !limetypes) {
|
|
76
|
-
return { property: undefined };
|
|
77
|
-
}
|
|
78
|
-
const parts = path.split('.');
|
|
79
|
-
let currentType = limetypes[limetype];
|
|
80
|
-
let property;
|
|
81
|
-
for (let i = 0; i < parts.length; i++) {
|
|
82
|
-
const part = parts[i];
|
|
83
|
-
if (!currentType) {
|
|
84
|
-
return { property: undefined };
|
|
85
|
-
}
|
|
86
|
-
const normalizedProperties = getNormalizedProperties(currentType);
|
|
87
|
-
property = normalizedProperties[part];
|
|
88
|
-
if (!property) {
|
|
89
|
-
return {
|
|
90
|
-
property: undefined,
|
|
91
|
-
error: `Property '${part}' does not exist on limetype '${currentType.name}'`,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
// Check if this property is a hasMany/hasAndBelongsToMany relation
|
|
95
|
-
// These cannot be traversed in filter expressions
|
|
96
|
-
if (property.type === 'hasmany' ||
|
|
97
|
-
property.type === 'hasandbelongstomany') {
|
|
98
|
-
// Build the path up to this point for the error message
|
|
99
|
-
const invalidPath = parts.slice(0, i + 1).join('.');
|
|
100
|
-
return {
|
|
101
|
-
property: undefined,
|
|
102
|
-
error: `Cannot filter on many-relation '${invalidPath}'. Use a related limetype's filter instead.`,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
// If this is a relation, get the related limetype for next iteration
|
|
106
|
-
if (property.relation) {
|
|
107
|
-
currentType = property.relation.getLimetype();
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return { property };
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const propertySelectorCss = ":host(limebb-property-selector){display:block}limel-menu{display:block;width:100%}";
|
|
114
|
-
const LimebbPropertySelectorStyle0 = propertySelectorCss;
|
|
115
|
-
|
|
116
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
117
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
118
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
119
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
120
|
-
else
|
|
121
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
122
|
-
if (d = decorators[i])
|
|
123
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
124
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
125
|
-
};
|
|
126
|
-
const PropertySelector = /*@__PURE__*/ proxyCustomElement(class PropertySelector extends HTMLElement {
|
|
127
|
-
constructor() {
|
|
128
|
-
super();
|
|
129
|
-
this.__registerHost();
|
|
130
|
-
this.__attachShadow();
|
|
131
|
-
this.change = createEvent(this, "change", 7);
|
|
132
|
-
/**
|
|
133
|
-
* Label for the input
|
|
134
|
-
*/
|
|
135
|
-
this.label = 'Property';
|
|
136
|
-
/**
|
|
137
|
-
* Whether the field is required
|
|
138
|
-
*/
|
|
139
|
-
this.required = false;
|
|
140
|
-
this.isOpen = false;
|
|
141
|
-
this.navigationPath = '';
|
|
142
|
-
this.menuItems = [];
|
|
143
|
-
this.handleChipSetWrapperClick = (event) => {
|
|
144
|
-
// Stop all clicks on the chip-set from bubbling
|
|
145
|
-
// This prevents the menu from opening when clicking chip remove buttons
|
|
146
|
-
event.stopPropagation();
|
|
147
|
-
};
|
|
148
|
-
this.handleChipSetFocus = () => {
|
|
149
|
-
// Open menu when the chip-set input receives focus
|
|
150
|
-
// This happens when user clicks to type/edit
|
|
151
|
-
if (!this.isOpen) {
|
|
152
|
-
this.navigationPath = this.value || '';
|
|
153
|
-
this.loadMenuItems();
|
|
154
|
-
this.isOpen = true;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
this.handleSelect = (event) => {
|
|
158
|
-
event.stopPropagation();
|
|
159
|
-
const selectedPath = event.detail.value;
|
|
160
|
-
if (!selectedPath) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
// Check if this is a complete path (leaf property, not a relation)
|
|
164
|
-
const property = getPropertyFromPath(this.limetypes, this.limetype, selectedPath);
|
|
165
|
-
if (property === null || property === void 0 ? void 0 : property.relation) {
|
|
166
|
-
// This is a relation - update navigation but don't emit
|
|
167
|
-
this.navigationPath = selectedPath;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
// This is a leaf property - emit and close
|
|
171
|
-
this.change.emit(selectedPath);
|
|
172
|
-
this.isOpen = false;
|
|
173
|
-
this.navigationPath = '';
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
this.handleNavigateMenu = (event) => {
|
|
177
|
-
var _a;
|
|
178
|
-
event.stopPropagation();
|
|
179
|
-
if ((_a = event.detail) === null || _a === void 0 ? void 0 : _a.value) {
|
|
180
|
-
// Update navigation path when drilling down
|
|
181
|
-
this.navigationPath = event.detail.value;
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
this.handleCancel = () => {
|
|
185
|
-
this.isOpen = false;
|
|
186
|
-
this.navigationPath = '';
|
|
187
|
-
};
|
|
188
|
-
this.handleChipSetChange = (event) => {
|
|
189
|
-
event.stopPropagation();
|
|
190
|
-
const detail = event.detail;
|
|
191
|
-
// Handle both single chip and array of chips
|
|
192
|
-
if (!detail) {
|
|
193
|
-
// Clear all was clicked
|
|
194
|
-
this.change.emit('');
|
|
195
|
-
this.navigationPath = '';
|
|
196
|
-
return;
|
|
197
|
-
}
|
|
198
|
-
// Convert to array if it's a single chip
|
|
199
|
-
const chips = Array.isArray(detail) ? detail : [detail];
|
|
200
|
-
if (chips.length === 0) {
|
|
201
|
-
// All chips removed
|
|
202
|
-
this.change.emit('');
|
|
203
|
-
this.navigationPath = '';
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
// A chip was removed - emit the last remaining chip's value
|
|
207
|
-
const lastChip = chips.at(-1);
|
|
208
|
-
if (lastChip) {
|
|
209
|
-
this.change.emit(lastChip.value);
|
|
210
|
-
}
|
|
211
|
-
this.navigationPath = '';
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
componentWillLoad() {
|
|
216
|
-
const language = this.platform
|
|
217
|
-
.get(c.Application)
|
|
218
|
-
.getLanguage();
|
|
219
|
-
this.collator = new Intl.Collator(language, {
|
|
220
|
-
numeric: true,
|
|
221
|
-
sensitivity: 'base',
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
render() {
|
|
225
|
-
if (!this.limetype || !this.limetypes) {
|
|
226
|
-
return null;
|
|
227
|
-
}
|
|
228
|
-
const chips = this.getChipsForPath(this.navigationPath || this.value || '');
|
|
229
|
-
return (h("limel-menu", { items: this.menuItems, open: this.isOpen, emptyResultMessage: "No available properties", surfaceWidth: "inherit-from-trigger", openDirection: "bottom-end", onSelect: this.handleSelect, onNavigateMenu: this.handleNavigateMenu, onCancel: this.handleCancel }, h("div", { slot: "trigger" }, h("div", { onClick: this.handleChipSetWrapperClick }, h("limel-chip-set", { type: "input", label: this.label, value: chips, required: this.required, helperText: this.helperText, delimiter: "\u203A", maxItems: 1, onChange: this.handleChipSetChange, onFocus: this.handleChipSetFocus })))));
|
|
230
|
-
}
|
|
231
|
-
loadMenuItems() {
|
|
232
|
-
// Get the limetype we're currently navigating in
|
|
233
|
-
const currentLimetype = this.getCurrentLimetype();
|
|
234
|
-
if (!currentLimetype) {
|
|
235
|
-
this.menuItems = [];
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
this.menuItems = this.createMenuItems(currentLimetype, '');
|
|
239
|
-
}
|
|
240
|
-
getCurrentLimetype() {
|
|
241
|
-
if (!this.navigationPath) {
|
|
242
|
-
return this.limetypes[this.limetype];
|
|
243
|
-
}
|
|
244
|
-
// Get the limetype at the current navigation path
|
|
245
|
-
const property = getPropertyFromPath(this.limetypes, this.limetype, this.navigationPath);
|
|
246
|
-
if (property === null || property === void 0 ? void 0 : property.relation) {
|
|
247
|
-
return property.relation.getLimetype();
|
|
248
|
-
}
|
|
249
|
-
return this.limetypes[this.limetype];
|
|
250
|
-
}
|
|
251
|
-
createMenuItems(limetype, pathPrefix) {
|
|
252
|
-
const results = [];
|
|
253
|
-
if (!limetype) {
|
|
254
|
-
return results;
|
|
255
|
-
}
|
|
256
|
-
const normalizedProperties = getNormalizedProperties(limetype);
|
|
257
|
-
for (const [propName, property] of Object.entries(normalizedProperties)) {
|
|
258
|
-
// Skip hasMany and hasAndBelongsToMany relations
|
|
259
|
-
if (property.type === 'hasmany' ||
|
|
260
|
-
property.type === 'hasandbelongstomany') {
|
|
261
|
-
continue;
|
|
262
|
-
}
|
|
263
|
-
const fullPath = pathPrefix
|
|
264
|
-
? `${pathPrefix}.${propName}`
|
|
265
|
-
: propName;
|
|
266
|
-
const isRelation = !!property.relation;
|
|
267
|
-
let items;
|
|
268
|
-
if (isRelation && property.relation) {
|
|
269
|
-
// Create submenu for relation (only belongsto at this point)
|
|
270
|
-
const relatedLimetype = property.relation.getLimetype();
|
|
271
|
-
if (relatedLimetype) {
|
|
272
|
-
items = async () => this.createMenuItems(relatedLimetype, fullPath);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
results.push({
|
|
276
|
-
text: property.localname || propName,
|
|
277
|
-
secondaryText: this.getSecondaryText(property),
|
|
278
|
-
icon: this.getIconForProperty(property),
|
|
279
|
-
value: fullPath,
|
|
280
|
-
items: items,
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
// Sort properties alphabetically by display text
|
|
284
|
-
results.sort((a, b) => { var _a, _b; return this.collator.compare((_a = a.text) !== null && _a !== void 0 ? _a : '', (_b = b.text) !== null && _b !== void 0 ? _b : ''); });
|
|
285
|
-
if (results.length === 0) {
|
|
286
|
-
return [
|
|
287
|
-
{
|
|
288
|
-
text: 'No available properties',
|
|
289
|
-
value: '',
|
|
290
|
-
disabled: true,
|
|
291
|
-
},
|
|
292
|
-
];
|
|
293
|
-
}
|
|
294
|
-
return results;
|
|
295
|
-
}
|
|
296
|
-
getSecondaryText(property) {
|
|
297
|
-
var _a;
|
|
298
|
-
if (property.relation) {
|
|
299
|
-
const relatedLimetype = property.relation.getLimetype();
|
|
300
|
-
return ((_a = relatedLimetype === null || relatedLimetype === void 0 ? void 0 : relatedLimetype.localname) === null || _a === void 0 ? void 0 : _a.singular) || 'Object';
|
|
301
|
-
}
|
|
302
|
-
// Return the property type as the secondary text
|
|
303
|
-
return property.type.charAt(0).toUpperCase() + property.type.slice(1);
|
|
304
|
-
}
|
|
305
|
-
getIconForProperty(property) {
|
|
306
|
-
if (property.relation) {
|
|
307
|
-
return getIcon(property.relation.getLimetype());
|
|
308
|
-
}
|
|
309
|
-
// Use generic property icon
|
|
310
|
-
return {
|
|
311
|
-
name: 'dot_circle',
|
|
312
|
-
color: 'rgb(var(--color-gray-default))',
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
getChipsForPath(path) {
|
|
316
|
-
if (!path) {
|
|
317
|
-
return [];
|
|
318
|
-
}
|
|
319
|
-
const parts = path.split('.');
|
|
320
|
-
const chips = [];
|
|
321
|
-
let currentLimetype = this.limetypes[this.limetype];
|
|
322
|
-
let currentPath = '';
|
|
323
|
-
for (const part of parts) {
|
|
324
|
-
currentPath = currentPath ? `${currentPath}.${part}` : part;
|
|
325
|
-
// Use getNormalizedProperties to include _id and _timestamp
|
|
326
|
-
const normalizedProperties = getNormalizedProperties(currentLimetype);
|
|
327
|
-
const property = normalizedProperties[part];
|
|
328
|
-
if (property) {
|
|
329
|
-
chips.push({
|
|
330
|
-
id: currentPath,
|
|
331
|
-
text: property.localname || part,
|
|
332
|
-
icon: this.getIconForProperty(property),
|
|
333
|
-
value: currentPath,
|
|
334
|
-
});
|
|
335
|
-
if (property.relation) {
|
|
336
|
-
currentLimetype = property.relation.getLimetype();
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
return chips;
|
|
341
|
-
}
|
|
342
|
-
static get style() { return LimebbPropertySelectorStyle0; }
|
|
343
|
-
}, [1, "limebb-property-selector", {
|
|
344
|
-
"platform": [16],
|
|
345
|
-
"context": [16],
|
|
346
|
-
"limetype": [1],
|
|
347
|
-
"value": [1],
|
|
348
|
-
"label": [1],
|
|
349
|
-
"required": [4],
|
|
350
|
-
"helperText": [1, "helper-text"],
|
|
351
|
-
"limetypes": [32],
|
|
352
|
-
"isOpen": [32],
|
|
353
|
-
"navigationPath": [32]
|
|
354
|
-
}]);
|
|
355
|
-
__decorate([
|
|
356
|
-
Ze()
|
|
357
|
-
], PropertySelector.prototype, "limetypes", void 0);
|
|
358
|
-
function defineCustomElement() {
|
|
359
|
-
if (typeof customElements === "undefined") {
|
|
360
|
-
return;
|
|
361
|
-
}
|
|
362
|
-
const components = ["limebb-property-selector"];
|
|
363
|
-
components.forEach(tagName => { switch (tagName) {
|
|
364
|
-
case "limebb-property-selector":
|
|
365
|
-
if (!customElements.get(tagName)) {
|
|
366
|
-
customElements.define(tagName, PropertySelector);
|
|
367
|
-
}
|
|
368
|
-
break;
|
|
369
|
-
} });
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
export { PropertySelector as P, getNormalizedProperties as a, defineCustomElement as d, getPropertyFromPath as g, validatePropertyPath as v };
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,transformTag as r}from"@stencil/core/internal/client";import{j as o,n}from"./index.esm.js";import{g as l}from"./limetype.js";function h(t){if(!(null==t?void 0:t.properties))return{};const e=Object.assign({},t.properties),i={id:"_id",timestamp:"_timestamp",descriptive:"_descriptive",createduser:"_createduser",createdtime:"_createdtime",updateduser:"_updateduser"};for(const[t,s]of Object.entries(i)){const i=e[t];i&&(e[s]=i,delete e[t])}return e}function c(t,e,i){if(!i||!e||!t)return;const s=i.split(".");let r,o=t[e];for(const t of s){if(!o)return;if(r=h(o)[t],!r)return;r.relation&&(o=r.relation.getLimetype())}return r}function a(t,e,i){if(!i||!e||!t)return{property:void 0};const s=i.split(".");let r,o=t[e];for(let t=0;t<s.length;t++){const e=s[t];if(!o)return{property:void 0};if(r=h(o)[e],!r)return{property:void 0,error:`Property '${e}' does not exist on limetype '${o.name}'`};if("hasmany"===r.type||"hasandbelongstomany"===r.type)return{property:void 0,error:`Cannot filter on many-relation '${s.slice(0,t+1).join(".")}'. Use a related limetype's filter instead.`};r.relation&&(o=r.relation.getLimetype())}return{property:r}}const u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.label="Property",this.required=!1,this.isOpen=!1,this.navigationPath="",this.menuItems=[],this.handleChipSetWrapperClick=t=>{t.stopPropagation()},this.handleChipSetFocus=()=>{this.isOpen||(this.navigationPath=this.value||"",this.loadMenuItems(),this.isOpen=!0)},this.handleSelect=t=>{t.stopPropagation();const e=t.detail.value;if(!e)return;const i=c(this.limetypes,this.limetype,e);(null==i?void 0:i.relation)?this.navigationPath=e:(this.change.emit(e),this.isOpen=!1,this.navigationPath="")},this.handleNavigateMenu=t=>{var e;t.stopPropagation(),(null===(e=t.detail)||void 0===e?void 0:e.value)&&(this.navigationPath=t.detail.value)},this.handleCancel=()=>{this.isOpen=!1,this.navigationPath=""},this.handleChipSetChange=t=>{t.stopPropagation();const e=t.detail;if(!e)return this.change.emit(""),void(this.navigationPath="");const i=Array.isArray(e)?e:[e];if(0===i.length)this.change.emit(""),this.navigationPath="";else{const t=i.at(-1);t&&this.change.emit(t.value),this.navigationPath=""}}}componentWillLoad(){const t=this.platform.get(n.Application).getLanguage();this.collator=new Intl.Collator(t,{numeric:!0,sensitivity:"base"})}render(){if(!this.limetype||!this.limetypes)return null;const t=this.getChipsForPath(this.navigationPath||this.value||"");return s("limel-menu",{items:this.menuItems,open:this.isOpen,emptyResultMessage:"No available properties",surfaceWidth:"inherit-from-trigger",openDirection:"bottom-end",onSelect:this.handleSelect,onNavigateMenu:this.handleNavigateMenu,onCancel:this.handleCancel},s("div",{slot:"trigger"},s("div",{onClick:this.handleChipSetWrapperClick},s("limel-chip-set",{type:"input",label:this.label,value:t,required:this.required,helperText:this.helperText,delimiter:"›",maxItems:1,onChange:this.handleChipSetChange,onFocus:this.handleChipSetFocus}))))}loadMenuItems(){const t=this.getCurrentLimetype();this.menuItems=t?this.createMenuItems(t,""):[]}getCurrentLimetype(){if(!this.navigationPath)return this.limetypes[this.limetype];const t=c(this.limetypes,this.limetype,this.navigationPath);return(null==t?void 0:t.relation)?t.relation.getLimetype():this.limetypes[this.limetype]}createMenuItems(t,e){const i=[];if(!t)return i;const s=h(t);for(const[t,r]of Object.entries(s)){if("hasmany"===r.type||"hasandbelongstomany"===r.type)continue;const s=e?`${e}.${t}`:t;let o;if(r.relation&&r.relation){const t=r.relation.getLimetype();t&&(o=async()=>this.createMenuItems(t,s))}i.push({text:r.localname||t,secondaryText:this.getSecondaryText(r),icon:this.getIconForProperty(r),value:s,items:o})}return i.sort(((t,e)=>{var i,s;return this.collator.compare(null!==(i=t.text)&&void 0!==i?i:"",null!==(s=e.text)&&void 0!==s?s:"")})),0===i.length?[{text:"No available properties",value:"",disabled:!0}]:i}getSecondaryText(t){var e;if(t.relation){const i=t.relation.getLimetype();return(null===(e=null==i?void 0:i.localname)||void 0===e?void 0:e.singular)||"Object"}return t.type.charAt(0).toUpperCase()+t.type.slice(1)}getIconForProperty(t){return t.relation?l(t.relation.getLimetype()):{name:"dot_circle",color:"rgb(var(--color-gray-default))"}}getChipsForPath(t){if(!t)return[];const e=t.split("."),i=[];let s=this.limetypes[this.limetype],r="";for(const t of e){r=r?`${r}.${t}`:t;const e=h(s)[t];e&&(i.push({id:r,text:e.localname||t,icon:this.getIconForProperty(e),value:r}),e.relation&&(s=e.relation.getLimetype()))}return i}static get style(){return":host(limebb-property-selector){display:block}limel-menu{display:block;width:100%}"}},[1,"limebb-property-selector",{platform:[16],context:[16],limetype:[1],value:[1],label:[1],required:[4],helperText:[1,"helper-text"],limetypes:[32],isOpen:[32],navigationPath:[32]}]);function p(){"undefined"!=typeof customElements&&["limebb-property-selector"].forEach((t=>{"limebb-property-selector"===t&&(customElements.get(r(t))||customElements.define(r(t),u))}))}!function(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);o>3&&n&&Object.defineProperty(e,i,n)}([o()],u.prototype,"limetypes",void 0);export{u as P,h as a,p as d,c as g,a as v}
|