@limetech/lime-crm-building-blocks 1.116.0 → 1.116.2
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 +14 -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 +15 -20
- package/dist/cjs/limebb-chat-list.cjs.entry.js +11 -12
- 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 +3 -2
- package/dist/collection/components/alert-dialog/alert-dialog.css +133 -1
- 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 +9 -11
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +3 -2
- package/dist/collection/components/chat-list/chat-item/chat-item.css +9 -0
- package/dist/collection/components/chat-list/chat-item/chat-item.js +11 -8
- package/dist/collection/components/chat-list/chat-list.css +9 -0
- package/dist/collection/components/chat-list/chat-list.js +15 -12
- 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.css +9 -0
- 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.css +9 -0
- 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.css +41 -11
- 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.css +9 -0
- 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.css +25 -9
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +19 -16
- package/dist/collection/components/kanban/kanban-item/kanban-item.css +9 -0
- 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.css +9 -0
- 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.css +9 -0
- 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.css +9 -0
- 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.css +17 -1
- 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.css +24 -1
- package/dist/collection/components/navigation-button/navigation-button.js +10 -9
- package/dist/collection/components/notification-list/notification-item/notification-item.css +9 -0
- package/dist/collection/components/notification-list/notification-item/notification-item.js +9 -5
- package/dist/collection/components/notification-list/notification-list.css +9 -0
- 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.css +9 -0
- 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.css +9 -0
- 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 -55
- 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.js +1 -6
- package/dist/components/limebb-chat-item.js +1 -6
- package/dist/components/limebb-chat-list.js +1 -302
- 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 +15 -18
- package/dist/esm/limebb-chat-list.entry.js +11 -10
- 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-1a61674f.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-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-43e22f6d.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-4625a9c5.entry.js +1 -0
- 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-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-685dd8a1.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-5277ceca.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-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-6fb504cb.entry.js → p-b3ee6683.entry.js} +1 -1
- 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-be8dc8ae.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-0707d5b0.entry.js → p-c3b13800.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b3ad9f5e.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-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-0190354e.entry.js → p-fa41a9e6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-fcedbc77.entry.js +1 -0
- 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.d.ts +608 -114
- 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/esm/index.esm-11a8b9e2.js +0 -963
- package/dist/lime-crm-building-blocks/p-121877f3.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-123190c3.js +0 -1
- package/dist/lime-crm-building-blocks/p-1317cdfa.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-199799ff.js +0 -1
- package/dist/lime-crm-building-blocks/p-1a89328d.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-1b361f60.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-2612f2f6.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-2babfa69.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-2d5e5ab5.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-331fced5.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-35897ec3.js +0 -1
- package/dist/lime-crm-building-blocks/p-3a16d7cf.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-3da67f32.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-3dd32e10.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4894ca5d.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-4eb7a47c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-50abea43.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-520df198.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-548e0f2a.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-7365ec1c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7e6fb4af.js +0 -1
- package/dist/lime-crm-building-blocks/p-81583fc8.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-85709273.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-87d3f42c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-8dca4e46.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-9c25aa2b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-a959dd49.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-b2763851.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-d9045aaa.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d994067b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-da42650a.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-dae67f66.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-dce9c951.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-dd5af257.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-ea4daa32.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-eb56d4eb.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,626 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { c, a as ar, f as fr, Z as Ze, s as sr, r as re } from './index.esm.js';
|
|
3
|
-
import { i as isArrayLike, a as isBuffer, b as isTypedArray, c as isArguments, g as getTag, d as isPrototype, e as baseKeys } from './_getTag.js';
|
|
4
|
-
import { i as isArray } from './_Map.js';
|
|
5
|
-
|
|
6
|
-
/** `Object#toString` result references. */
|
|
7
|
-
var mapTag = '[object Map]',
|
|
8
|
-
setTag = '[object Set]';
|
|
9
|
-
|
|
10
|
-
/** Used for built-in method references. */
|
|
11
|
-
var objectProto = Object.prototype;
|
|
12
|
-
|
|
13
|
-
/** Used to check objects for own properties. */
|
|
14
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Checks if `value` is an empty object, collection, map, or set.
|
|
18
|
-
*
|
|
19
|
-
* Objects are considered empty if they have no own enumerable string keyed
|
|
20
|
-
* properties.
|
|
21
|
-
*
|
|
22
|
-
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
23
|
-
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
24
|
-
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
25
|
-
*
|
|
26
|
-
* @static
|
|
27
|
-
* @memberOf _
|
|
28
|
-
* @since 0.1.0
|
|
29
|
-
* @category Lang
|
|
30
|
-
* @param {*} value The value to check.
|
|
31
|
-
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
32
|
-
* @example
|
|
33
|
-
*
|
|
34
|
-
* _.isEmpty(null);
|
|
35
|
-
* // => true
|
|
36
|
-
*
|
|
37
|
-
* _.isEmpty(true);
|
|
38
|
-
* // => true
|
|
39
|
-
*
|
|
40
|
-
* _.isEmpty(1);
|
|
41
|
-
* // => true
|
|
42
|
-
*
|
|
43
|
-
* _.isEmpty([1, 2, 3]);
|
|
44
|
-
* // => false
|
|
45
|
-
*
|
|
46
|
-
* _.isEmpty({ 'a': 1 });
|
|
47
|
-
* // => false
|
|
48
|
-
*/
|
|
49
|
-
function isEmpty(value) {
|
|
50
|
-
if (value == null) {
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
if (isArrayLike(value) &&
|
|
54
|
-
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
55
|
-
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
56
|
-
return !value.length;
|
|
57
|
-
}
|
|
58
|
-
var tag = getTag(value);
|
|
59
|
-
if (tag == mapTag || tag == setTag) {
|
|
60
|
-
return !value.size;
|
|
61
|
-
}
|
|
62
|
-
if (isPrototype(value)) {
|
|
63
|
-
return !baseKeys(value).length;
|
|
64
|
-
}
|
|
65
|
-
for (var key in value) {
|
|
66
|
-
if (hasOwnProperty.call(value, key)) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Context provider for the info-tile component.
|
|
75
|
-
*
|
|
76
|
-
* This provider contributes contextual information about an info tile
|
|
77
|
-
* to the AI chat feature, including the limetype, filter, aggregation
|
|
78
|
-
* method, and current value.
|
|
79
|
-
*
|
|
80
|
-
* @alpha
|
|
81
|
-
*/
|
|
82
|
-
class InfoTileContextProvider {
|
|
83
|
-
/**
|
|
84
|
-
* Create an InfoTileContextProvider.
|
|
85
|
-
*
|
|
86
|
-
* @param getState - Function that returns the current tile state
|
|
87
|
-
*/
|
|
88
|
-
constructor(getState) {
|
|
89
|
-
this.getState = getState;
|
|
90
|
-
this.contextType = 'info-tile';
|
|
91
|
-
}
|
|
92
|
-
getContext() {
|
|
93
|
-
const { limetype, filterId, filterName, aggregateOperator, propertyName, value, label, } = this.getState();
|
|
94
|
-
if (!limetype || !filterId) {
|
|
95
|
-
console.debug('InfoTileContextProvider: No limetype or filterId available');
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
const data = {
|
|
99
|
-
widgetType: 'info-tile',
|
|
100
|
-
limetype,
|
|
101
|
-
filterId,
|
|
102
|
-
};
|
|
103
|
-
if (filterName) {
|
|
104
|
-
data.filterName = filterName;
|
|
105
|
-
}
|
|
106
|
-
data.aggregateOperator = aggregateOperator;
|
|
107
|
-
if (propertyName) {
|
|
108
|
-
data.propertyName = propertyName;
|
|
109
|
-
}
|
|
110
|
-
if (value !== undefined) {
|
|
111
|
-
data.value = value;
|
|
112
|
-
}
|
|
113
|
-
if (label) {
|
|
114
|
-
data.label = label;
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
data,
|
|
118
|
-
purpose: 'Shows an aggregated value from a filter. ' +
|
|
119
|
-
'Clicking navigates to the explorer with that filter applied.',
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
class InfoTileLoader {
|
|
125
|
-
constructor(platform, filters = []) {
|
|
126
|
-
this.platform = platform;
|
|
127
|
-
this.filters = filters;
|
|
128
|
-
}
|
|
129
|
-
async load(aggregator, context) {
|
|
130
|
-
let value;
|
|
131
|
-
if (this.isObjectIdentifier(context)) {
|
|
132
|
-
value = await this.loadLimeObjectInfoTile(aggregator, context);
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
value = await this.loadBasicInfoTile(aggregator);
|
|
136
|
-
}
|
|
137
|
-
return value;
|
|
138
|
-
}
|
|
139
|
-
async loadBasicInfoTile(aggregator) {
|
|
140
|
-
const filter = this.getFilter(aggregator.filter);
|
|
141
|
-
if (!filter) {
|
|
142
|
-
throw new Error(`Filter "${aggregator.filter}" not found`);
|
|
143
|
-
}
|
|
144
|
-
const result = await this.query.execute({
|
|
145
|
-
limetype: filter.limetype,
|
|
146
|
-
responseFormat: {
|
|
147
|
-
aggregates: {
|
|
148
|
-
infotiles: {
|
|
149
|
-
value: {
|
|
150
|
-
op: aggregator.operator,
|
|
151
|
-
key: aggregator.name,
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
},
|
|
156
|
-
filter: filter.filter,
|
|
157
|
-
});
|
|
158
|
-
return result.aggregates.infotiles[0].value;
|
|
159
|
-
}
|
|
160
|
-
async loadLimeObjectInfoTile(aggregator, identifier) {
|
|
161
|
-
await this.objectRepository.loadObject(identifier.limetype, identifier.id, {
|
|
162
|
-
properties: [aggregator],
|
|
163
|
-
});
|
|
164
|
-
const limeobject = this.objectRepository.getObject(identifier.limetype, identifier.id);
|
|
165
|
-
return limeobject === null || limeobject === void 0 ? void 0 : limeobject.getValue([aggregator.name, aggregator.key].join('.'));
|
|
166
|
-
}
|
|
167
|
-
isObjectIdentifier(context) {
|
|
168
|
-
return Boolean((context === null || context === void 0 ? void 0 : context.limetype) && (context === null || context === void 0 ? void 0 : context.id));
|
|
169
|
-
}
|
|
170
|
-
getFilter(id) {
|
|
171
|
-
return this.filters.find((filter) => filter.id === id);
|
|
172
|
-
}
|
|
173
|
-
get query() {
|
|
174
|
-
return this.platform.get(c.Query);
|
|
175
|
-
}
|
|
176
|
-
get objectRepository() {
|
|
177
|
-
return this.platform.get(c.LimeObjectRepository);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
class BasicFormatter {
|
|
182
|
-
constructor(locale) {
|
|
183
|
-
this.locale = locale;
|
|
184
|
-
}
|
|
185
|
-
format(value) {
|
|
186
|
-
let formattedValue = String(value);
|
|
187
|
-
if (typeof value === 'number') {
|
|
188
|
-
formattedValue = new Intl.NumberFormat(this.locale).format(value);
|
|
189
|
-
}
|
|
190
|
-
else if (new Date(value).getTime()) {
|
|
191
|
-
formattedValue = new Intl.DateTimeFormat(this.locale).format(new Date(value));
|
|
192
|
-
}
|
|
193
|
-
return {
|
|
194
|
-
value: formattedValue,
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
class DateTimeFormatter {
|
|
200
|
-
constructor(locale) {
|
|
201
|
-
this.locale = locale;
|
|
202
|
-
}
|
|
203
|
-
format(value, format) {
|
|
204
|
-
const date = new Date(value);
|
|
205
|
-
return {
|
|
206
|
-
prefix: this.formatAffix('prefix', date, format),
|
|
207
|
-
value: this.formatValue(date, format),
|
|
208
|
-
suffix: this.formatAffix('suffix', date, format),
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
formatValue(date, format) {
|
|
212
|
-
const options = Object.assign({}, format.options);
|
|
213
|
-
if (format.prefix)
|
|
214
|
-
for (const prefix of format.prefix) {
|
|
215
|
-
delete options[prefix];
|
|
216
|
-
}
|
|
217
|
-
if (format.suffix)
|
|
218
|
-
for (const suffix of format.suffix) {
|
|
219
|
-
delete options[suffix];
|
|
220
|
-
}
|
|
221
|
-
const formatter = new Intl.DateTimeFormat(this.locale, options);
|
|
222
|
-
return formatter.format(date);
|
|
223
|
-
}
|
|
224
|
-
formatAffix(affix, date, format) {
|
|
225
|
-
const options = Object.assign({}, format.options);
|
|
226
|
-
for (const option of Object.keys(options)) {
|
|
227
|
-
if (option === 'hour12') {
|
|
228
|
-
continue;
|
|
229
|
-
}
|
|
230
|
-
if ((format[affix] || []).includes(option)) {
|
|
231
|
-
continue;
|
|
232
|
-
}
|
|
233
|
-
delete options[option];
|
|
234
|
-
}
|
|
235
|
-
if (Object.values(options).filter(Boolean).length === 0) {
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
const formatter = new Intl.DateTimeFormat(this.locale, options);
|
|
239
|
-
return formatter.format(date);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
class NumberFormatter {
|
|
244
|
-
constructor(locale) {
|
|
245
|
-
this.locale = locale;
|
|
246
|
-
}
|
|
247
|
-
format(value, format) {
|
|
248
|
-
var _a, _b;
|
|
249
|
-
const formatter = new Intl.NumberFormat(this.locale, format.options);
|
|
250
|
-
const parts = formatter.formatToParts(value);
|
|
251
|
-
let prefix = '';
|
|
252
|
-
let number = '';
|
|
253
|
-
let suffix = '';
|
|
254
|
-
for (const part of parts) {
|
|
255
|
-
if ((_a = format.prefix) === null || _a === void 0 ? void 0 : _a.includes(part.type)) {
|
|
256
|
-
prefix += part.value;
|
|
257
|
-
}
|
|
258
|
-
else if ((_b = format.suffix) === null || _b === void 0 ? void 0 : _b.includes(part.type)) {
|
|
259
|
-
suffix += part.value;
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
number += part.value;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
if (!number) {
|
|
266
|
-
number = formatter.format(value);
|
|
267
|
-
prefix = '';
|
|
268
|
-
suffix = '';
|
|
269
|
-
}
|
|
270
|
-
return {
|
|
271
|
-
prefix: prefix,
|
|
272
|
-
value: number,
|
|
273
|
-
suffix: suffix,
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
class RelativeDateFormatter {
|
|
279
|
-
constructor(locale) {
|
|
280
|
-
this.locale = locale;
|
|
281
|
-
}
|
|
282
|
-
format(value, format) {
|
|
283
|
-
const formatter = new Intl.RelativeTimeFormat(this.locale, format.options);
|
|
284
|
-
const { value: relativeTime, unit } = this.getRelativeTime(value);
|
|
285
|
-
const parts = formatter.formatToParts(relativeTime, unit);
|
|
286
|
-
let prefix = '';
|
|
287
|
-
let formattedValue = '';
|
|
288
|
-
let suffix = '';
|
|
289
|
-
for (const part of parts) {
|
|
290
|
-
if (part.type === 'literal' && !formattedValue) {
|
|
291
|
-
prefix += part.value;
|
|
292
|
-
}
|
|
293
|
-
else if (part.type === 'literal' && formattedValue) {
|
|
294
|
-
suffix += part.value;
|
|
295
|
-
}
|
|
296
|
-
else {
|
|
297
|
-
formattedValue += part.value;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
if (!formattedValue) {
|
|
301
|
-
formattedValue = prefix || suffix;
|
|
302
|
-
prefix = '';
|
|
303
|
-
suffix = '';
|
|
304
|
-
}
|
|
305
|
-
return {
|
|
306
|
-
prefix: prefix,
|
|
307
|
-
value: formattedValue,
|
|
308
|
-
suffix: suffix,
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
getRelativeTime(value) {
|
|
312
|
-
const date = new Date(value);
|
|
313
|
-
const now = new Date();
|
|
314
|
-
const diffInMs = date.getTime() - now.getTime();
|
|
315
|
-
const times = [
|
|
316
|
-
{ unit: 'year', value: 1000 * 60 * 60 * 24 * 365 },
|
|
317
|
-
{ unit: 'month', value: 1000 * 60 * 60 * 24 * 30 },
|
|
318
|
-
{ unit: 'week', value: 1000 * 60 * 60 * 24 * 7 },
|
|
319
|
-
{ unit: 'day', value: 1000 * 60 * 60 * 24 },
|
|
320
|
-
{ unit: 'hour', value: 1000 * 60 * 60 },
|
|
321
|
-
{ unit: 'minute', value: 1000 * 60 },
|
|
322
|
-
{ unit: 'second', value: 1000 },
|
|
323
|
-
];
|
|
324
|
-
for (const time of times) {
|
|
325
|
-
const diff = diffInMs / time.value;
|
|
326
|
-
if (Math.abs(diff) >= 1) {
|
|
327
|
-
return { value: Math.round(diff), unit: time.unit };
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
return { value: 0, unit: 'second' };
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
class InfoTileFormatterFactory {
|
|
335
|
-
constructor(locale) {
|
|
336
|
-
this.locale = locale;
|
|
337
|
-
}
|
|
338
|
-
createFormatter(format, value) {
|
|
339
|
-
if ((format === null || format === void 0 ? void 0 : format.type) === 'number' && typeof value === 'number') {
|
|
340
|
-
return new NumberFormatter(this.locale);
|
|
341
|
-
}
|
|
342
|
-
if ((format === null || format === void 0 ? void 0 : format.type) === 'date' && typeof value === 'string') {
|
|
343
|
-
return new DateTimeFormatter(this.locale);
|
|
344
|
-
}
|
|
345
|
-
if ((format === null || format === void 0 ? void 0 : format.type) === 'relative-date' && typeof value === 'string') {
|
|
346
|
-
return new RelativeDateFormatter(this.locale);
|
|
347
|
-
}
|
|
348
|
-
return new BasicFormatter(this.locale);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
const infoTileCss = ":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}";
|
|
353
|
-
const LimebbInfoTileStyle0 = infoTileCss;
|
|
354
|
-
|
|
355
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
356
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
357
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
358
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
359
|
-
else
|
|
360
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
361
|
-
if (d = decorators[i])
|
|
362
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
363
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
364
|
-
};
|
|
365
|
-
const InfoTile = /*@__PURE__*/ proxyCustomElement(class InfoTile extends HTMLElement {
|
|
366
|
-
constructor() {
|
|
367
|
-
super();
|
|
368
|
-
this.__registerHost();
|
|
369
|
-
this.__attachShadow();
|
|
370
|
-
/**
|
|
371
|
-
* Type of aggregation operator to use
|
|
372
|
-
*/
|
|
373
|
-
this.aggregateOperator = sr.Count;
|
|
374
|
-
this.loading = false;
|
|
375
|
-
this.error = false;
|
|
376
|
-
}
|
|
377
|
-
connectedCallback() {
|
|
378
|
-
this.registerContextProvider();
|
|
379
|
-
}
|
|
380
|
-
disconnectedCallback() {
|
|
381
|
-
var _a;
|
|
382
|
-
(_a = this.unregisterContextProvider) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
383
|
-
}
|
|
384
|
-
componentWillLoad() {
|
|
385
|
-
this.loadInfoTileValue();
|
|
386
|
-
}
|
|
387
|
-
watchFilterId() {
|
|
388
|
-
this.loadInfoTileValue();
|
|
389
|
-
}
|
|
390
|
-
watchPropertyName() {
|
|
391
|
-
this.loadInfoTileValue();
|
|
392
|
-
}
|
|
393
|
-
watchAggregateOperator() {
|
|
394
|
-
this.loadInfoTileValue();
|
|
395
|
-
}
|
|
396
|
-
async loadInfoTileValue() {
|
|
397
|
-
this.loading = true;
|
|
398
|
-
this.error = false;
|
|
399
|
-
const filter = this.getFilter();
|
|
400
|
-
if (!filter) {
|
|
401
|
-
this.error = true;
|
|
402
|
-
return;
|
|
403
|
-
}
|
|
404
|
-
try {
|
|
405
|
-
const aggregator = {
|
|
406
|
-
key: this.getKey(),
|
|
407
|
-
name: this.propertyName,
|
|
408
|
-
operator: this.aggregateOperator,
|
|
409
|
-
filter: this.filterId,
|
|
410
|
-
};
|
|
411
|
-
this.value = await this.loader.load(aggregator, this.context);
|
|
412
|
-
}
|
|
413
|
-
catch (error) {
|
|
414
|
-
console.error(error);
|
|
415
|
-
this.error = true;
|
|
416
|
-
}
|
|
417
|
-
this.loading = false;
|
|
418
|
-
}
|
|
419
|
-
getKey() {
|
|
420
|
-
const RADIX = 36;
|
|
421
|
-
const START = 2;
|
|
422
|
-
// eslint-disable-next-line sonarjs/pseudo-random
|
|
423
|
-
return Math.random().toString(RADIX).slice(START);
|
|
424
|
-
}
|
|
425
|
-
render() {
|
|
426
|
-
var _a, _b;
|
|
427
|
-
const filter = this.getFilter();
|
|
428
|
-
const value = this.getFormattedValue();
|
|
429
|
-
const baseProps = {
|
|
430
|
-
disabled: this.disabled,
|
|
431
|
-
icon: this.icon,
|
|
432
|
-
prefix: ((_a = value === null || value === void 0 ? void 0 : value.prefix) === null || _a === void 0 ? void 0 : _a.trim()) || this.prefix,
|
|
433
|
-
suffix: ((_b = value === null || value === void 0 ? void 0 : value.suffix) === null || _b === void 0 ? void 0 : _b.trim()) || this.suffix,
|
|
434
|
-
};
|
|
435
|
-
const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
|
|
436
|
-
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() });
|
|
437
|
-
const props = !filter || this.error ? errorProps : normalProps;
|
|
438
|
-
return (h("limel-info-tile", Object.assign({ key: '95cff868253a68eefdf7845a344c41c5b37a2bb8', class: { error: !filter || this.error } }, props)));
|
|
439
|
-
}
|
|
440
|
-
getFormattedValue() {
|
|
441
|
-
if (!this.value && this.value !== 0) {
|
|
442
|
-
return {
|
|
443
|
-
value: '',
|
|
444
|
-
};
|
|
445
|
-
}
|
|
446
|
-
try {
|
|
447
|
-
return this.getFormatter(this.value).format(this.value, this.format);
|
|
448
|
-
}
|
|
449
|
-
catch (_a) {
|
|
450
|
-
const formatter = new BasicFormatter(this.language);
|
|
451
|
-
return formatter.format(this.value);
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
getLabel(filter) {
|
|
455
|
-
if (!filter) {
|
|
456
|
-
return 'No filter set is selected';
|
|
457
|
-
}
|
|
458
|
-
if (typeof this.label === 'string') {
|
|
459
|
-
return this.translator.get(this.label);
|
|
460
|
-
}
|
|
461
|
-
if (this.label && typeof this.label === 'object') {
|
|
462
|
-
return this.getLocalizedString(this.label);
|
|
463
|
-
}
|
|
464
|
-
return this.getLocalizedString(filter.name);
|
|
465
|
-
}
|
|
466
|
-
getLocalizedString(strings) {
|
|
467
|
-
if (isEmpty(strings)) {
|
|
468
|
-
return '';
|
|
469
|
-
}
|
|
470
|
-
let localizedString = strings[this.language];
|
|
471
|
-
if (!localizedString) {
|
|
472
|
-
localizedString =
|
|
473
|
-
strings.en ||
|
|
474
|
-
strings.en_us ||
|
|
475
|
-
Object.values(localizedString !== null && localizedString !== void 0 ? localizedString : {}).find((name) => !!name);
|
|
476
|
-
}
|
|
477
|
-
return localizedString !== null && localizedString !== void 0 ? localizedString : '';
|
|
478
|
-
}
|
|
479
|
-
getLink(filter) {
|
|
480
|
-
if (!filter) {
|
|
481
|
-
return { href: '#' };
|
|
482
|
-
}
|
|
483
|
-
const baseHref = ['explorer', filter.limetype, filter.id].join('/');
|
|
484
|
-
const relationPropertyName = this.getRelationPropertyName(this.limetypes[filter.limetype]);
|
|
485
|
-
const contextAwareFilter = this.buildContextAwareFilter(filter.filter, relationPropertyName);
|
|
486
|
-
if (!contextAwareFilter) {
|
|
487
|
-
return { href: baseHref };
|
|
488
|
-
}
|
|
489
|
-
const filterQuery = encodeURIComponent(JSON.stringify(contextAwareFilter));
|
|
490
|
-
return { href: `${baseHref}?filter=${filterQuery}` };
|
|
491
|
-
}
|
|
492
|
-
buildContextAwareFilter(filter, relationPropertyName) {
|
|
493
|
-
if (!relationPropertyName) {
|
|
494
|
-
return filter;
|
|
495
|
-
}
|
|
496
|
-
const relationFilter = {
|
|
497
|
-
key: relationPropertyName,
|
|
498
|
-
op: re.EQUALS,
|
|
499
|
-
exp: this.context.id,
|
|
500
|
-
};
|
|
501
|
-
if (!filter) {
|
|
502
|
-
return {
|
|
503
|
-
relationFilter,
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
return {
|
|
507
|
-
op: re.AND,
|
|
508
|
-
exp: [relationFilter, filter],
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
getFilter() {
|
|
512
|
-
var _a;
|
|
513
|
-
return (_a = this.filters) === null || _a === void 0 ? void 0 : _a.find((filter) => filter.id === this.filterId);
|
|
514
|
-
}
|
|
515
|
-
getFormatter(value) {
|
|
516
|
-
return new InfoTileFormatterFactory(this.language).createFormatter(this.format, value);
|
|
517
|
-
}
|
|
518
|
-
getRelationPropertyName(limetype) {
|
|
519
|
-
var _a, _b, _c;
|
|
520
|
-
if (!limetype || !this.context.limetype || !this.context.id) {
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
if (this.propertyName) {
|
|
524
|
-
const currentLimeType = this.limetypes[this.context.limetype];
|
|
525
|
-
const backReference = (_b = (_a = currentLimeType === null || currentLimeType === void 0 ? void 0 : currentLimeType.getProperty(this.propertyName)) === null || _a === void 0 ? void 0 : _a.relation) === null || _b === void 0 ? void 0 : _b.getBackreference();
|
|
526
|
-
if (backReference) {
|
|
527
|
-
return backReference.name;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
return (_c = Object.values(limetype.properties).find((property) => {
|
|
531
|
-
var _a;
|
|
532
|
-
return (((_a = property.relation) === null || _a === void 0 ? void 0 : _a.getLimetype().name) === this.context.limetype);
|
|
533
|
-
})) === null || _c === void 0 ? void 0 : _c.name;
|
|
534
|
-
}
|
|
535
|
-
get translator() {
|
|
536
|
-
return this.platform.get(c.Translate);
|
|
537
|
-
}
|
|
538
|
-
get language() {
|
|
539
|
-
return this.platform.get(c.Application).getLanguage();
|
|
540
|
-
}
|
|
541
|
-
get loader() {
|
|
542
|
-
return new InfoTileLoader(this.platform, this.filters);
|
|
543
|
-
}
|
|
544
|
-
registerContextProvider() {
|
|
545
|
-
const registry = this.platform.get(c.AIContextRegistry);
|
|
546
|
-
if (!(registry === null || registry === void 0 ? void 0 : registry.register)) {
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
const provider = new InfoTileContextProvider(() => {
|
|
550
|
-
const filter = this.getFilter();
|
|
551
|
-
return {
|
|
552
|
-
limetype: filter === null || filter === void 0 ? void 0 : filter.limetype,
|
|
553
|
-
filterId: this.filterId,
|
|
554
|
-
filterName: filter
|
|
555
|
-
? this.getLocalizedString(filter.name)
|
|
556
|
-
: undefined,
|
|
557
|
-
aggregateOperator: this.aggregateOperator,
|
|
558
|
-
propertyName: this.propertyName,
|
|
559
|
-
value: this.value,
|
|
560
|
-
label: this.getLabel(filter),
|
|
561
|
-
};
|
|
562
|
-
});
|
|
563
|
-
this.unregisterContextProvider = registry.register(provider,
|
|
564
|
-
// This cast is needed because there's a type conflict between
|
|
565
|
-
// `HTMLElement.prefix` and `HTMLLimebbInfoTileElement.prefix`.
|
|
566
|
-
// The problem here is that this info-tile component has a property
|
|
567
|
-
// (`prefix`) with the same name as one of the native HTML attributes.
|
|
568
|
-
this.host);
|
|
569
|
-
}
|
|
570
|
-
get host() { return this; }
|
|
571
|
-
static get watchers() { return {
|
|
572
|
-
"filterId": ["watchFilterId"],
|
|
573
|
-
"propertyName": ["watchPropertyName"],
|
|
574
|
-
"aggregateOperator": ["watchAggregateOperator"]
|
|
575
|
-
}; }
|
|
576
|
-
static get style() { return LimebbInfoTileStyle0; }
|
|
577
|
-
}, [1, "limebb-info-tile", {
|
|
578
|
-
"platform": [16],
|
|
579
|
-
"context": [16],
|
|
580
|
-
"filterId": [513, "filter-id"],
|
|
581
|
-
"disabled": [4],
|
|
582
|
-
"icon": [513],
|
|
583
|
-
"label": [1],
|
|
584
|
-
"prefix": [1],
|
|
585
|
-
"suffix": [1],
|
|
586
|
-
"propertyName": [1, "property-name"],
|
|
587
|
-
"aggregateOperator": [1, "aggregate-operator"],
|
|
588
|
-
"format": [16],
|
|
589
|
-
"config": [32],
|
|
590
|
-
"filters": [32],
|
|
591
|
-
"value": [32],
|
|
592
|
-
"loading": [32],
|
|
593
|
-
"error": [32],
|
|
594
|
-
"limetypes": [32]
|
|
595
|
-
}, undefined, {
|
|
596
|
-
"filterId": ["watchFilterId"],
|
|
597
|
-
"propertyName": ["watchPropertyName"],
|
|
598
|
-
"aggregateOperator": ["watchAggregateOperator"]
|
|
599
|
-
}]);
|
|
600
|
-
__decorate([
|
|
601
|
-
ar({})
|
|
602
|
-
], InfoTile.prototype, "config", void 0);
|
|
603
|
-
__decorate([
|
|
604
|
-
fr()
|
|
605
|
-
], InfoTile.prototype, "filters", void 0);
|
|
606
|
-
__decorate([
|
|
607
|
-
Ze()
|
|
608
|
-
], InfoTile.prototype, "limetypes", void 0);
|
|
609
|
-
function defineCustomElement$1() {
|
|
610
|
-
if (typeof customElements === "undefined") {
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
const components = ["limebb-info-tile"];
|
|
614
|
-
components.forEach(tagName => { switch (tagName) {
|
|
615
|
-
case "limebb-info-tile":
|
|
616
|
-
if (!customElements.get(tagName)) {
|
|
617
|
-
customElements.define(tagName, InfoTile);
|
|
618
|
-
}
|
|
619
|
-
break;
|
|
620
|
-
} });
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
const LimebbInfoTile = InfoTile;
|
|
624
|
-
const defineCustomElement = defineCustomElement$1;
|
|
625
|
-
|
|
626
|
-
export { LimebbInfoTile, defineCustomElement };
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,h as i,transformTag as r}from"@stencil/core/internal/client";import{n as o,r as s,b as n,j as l,Z as a,X as u}from"./index.esm.js";import{i as h,a as c,b as f,c as d,g as p,d as v,e as g}from"./_getTag.js";import{a as m}from"./_Map.js";var b=Object.prototype.hasOwnProperty;class y{constructor(t){this.getState=t,this.contextType="info-tile"}getContext(){const{limetype:t,filterId:e,filterName:i,aggregateOperator:r,propertyName:o,value:s,label:n}=this.getState();if(!t||!e)return console.debug("InfoTileContextProvider: No limetype or filterId available"),null;const l={widgetType:"info-tile",limetype:t,filterId:e};return i&&(l.filterName=i),l.aggregateOperator=r,o&&(l.propertyName=o),void 0!==s&&(l.value=s),n&&(l.label=n),{data:l,purpose:"Shows an aggregated value from a filter. Clicking navigates to the explorer with that filter applied."}}}class w{constructor(t,e=[]){this.platform=t,this.filters=e}async load(t,e){let i;return i=this.isObjectIdentifier(e)?await this.loadLimeObjectInfoTile(t,e):await this.loadBasicInfoTile(t),i}async loadBasicInfoTile(t){const e=this.getFilter(t.filter);if(!e)throw Error(`Filter "${t.filter}" not found`);return(await this.query.execute({limetype:e.limetype,responseFormat:{aggregates:{infotiles:{value:{op:t.operator,key:t.name}}}},filter:e.filter})).aggregates.infotiles[0].value}async loadLimeObjectInfoTile(t,e){await this.objectRepository.loadObject(e.limetype,e.id,{properties:[t]});const i=this.objectRepository.getObject(e.limetype,e.id);return null==i?void 0:i.getValue([t.name,t.key].join("."))}isObjectIdentifier(t){return!(!(null==t?void 0:t.limetype)||!(null==t?void 0:t.id))}getFilter(t){return this.filters.find((e=>e.id===t))}get query(){return this.platform.get(o.Query)}get objectRepository(){return this.platform.get(o.LimeObjectRepository)}}class x{constructor(t){this.locale=t}format(t){let e=t+"";return"number"==typeof t?e=new Intl.NumberFormat(this.locale).format(t):new Date(t).getTime()&&(e=new Intl.DateTimeFormat(this.locale).format(new Date(t))),{value:e}}}class O{constructor(t){this.locale=t}format(t,e){const i=new Date(t);return{prefix:this.formatAffix("prefix",i,e),value:this.formatValue(i,e),suffix:this.formatAffix("suffix",i,e)}}formatValue(t,e){const i=Object.assign({},e.options);if(e.prefix)for(const t of e.prefix)delete i[t];if(e.suffix)for(const t of e.suffix)delete i[t];return new Intl.DateTimeFormat(this.locale,i).format(t)}formatAffix(t,e,i){const r=Object.assign({},i.options);for(const e of Object.keys(r))"hour12"!==e&&((i[t]||[]).includes(e)||delete r[e]);if(0!==Object.values(r).filter(Boolean).length)return new Intl.DateTimeFormat(this.locale,r).format(e)}}class j{constructor(t){this.locale=t}format(t,e){var i,r;const o=new Intl.NumberFormat(this.locale,e.options),s=o.formatToParts(t);let n="",l="",a="";for(const t of s)(null===(i=e.prefix)||void 0===i?void 0:i.includes(t.type))?n+=t.value:(null===(r=e.suffix)||void 0===r?void 0:r.includes(t.type))?a+=t.value:l+=t.value;return l||(l=o.format(t),n="",a=""),{prefix:n,value:l,suffix:a}}}class I{constructor(t){this.locale=t}format(t,e){const i=new Intl.RelativeTimeFormat(this.locale,e.options),{value:r,unit:o}=this.getRelativeTime(t),s=i.formatToParts(r,o);let n="",l="",a="";for(const t of s)"literal"!==t.type||l?"literal"===t.type&&l?a+=t.value:l+=t.value:n+=t.value;return l||(l=n||a,n="",a=""),{prefix:n,value:l,suffix:a}}getRelativeTime(t){const e=new Date(t),i=new Date,r=e.getTime()-i.getTime(),o=[{unit:"year",value:31536e6},{unit:"month",value:2592e6},{unit:"week",value:6048e5},{unit:"day",value:864e5},{unit:"hour",value:36e5},{unit:"minute",value:6e4},{unit:"second",value:1e3}];for(const t of o){const e=r/t.value;if(Math.abs(e)>=1)return{value:Math.round(e),unit:t.unit}}return{value:0,unit:"second"}}}class N{constructor(t){this.locale=t}createFormatter(t,e){return"number"===(null==t?void 0:t.type)&&"number"==typeof e?new j(this.locale):"date"===(null==t?void 0:t.type)&&"string"==typeof e?new O(this.locale):"relative-date"===(null==t?void 0:t.type)&&"string"==typeof e?new I(this.locale):new x(this.locale)}}var k=function(t,e,i,r){var o,s=arguments.length,n=s<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,r);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(n=(s<3?o(n):s>3?o(e,i,n):o(e,i))||n);return s>3&&n&&Object.defineProperty(e,i,n),n};const F=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.aggregateOperator=a.Count,this.loading=!1,this.error=!1}connectedCallback(){this.registerContextProvider()}disconnectedCallback(){var t;null===(t=this.unregisterContextProvider)||void 0===t||t.call(this)}componentWillLoad(){this.loadInfoTileValue()}watchFilterId(){this.loadInfoTileValue()}watchPropertyName(){this.loadInfoTileValue()}watchAggregateOperator(){this.loadInfoTileValue()}async loadInfoTileValue(){if(this.loading=!0,this.error=!1,this.getFilter()){try{const t={key:this.getKey(),name:this.propertyName,operator:this.aggregateOperator,filter:this.filterId};this.value=await this.loader.load(t,this.context)}catch(t){console.error(t),this.error=!0}this.loading=!1}else this.error=!0}getKey(){return Math.random().toString(36).slice(2)}render(){var t,e;const r=this.getFilter(),o=this.getFormattedValue(),s={disabled:this.disabled,icon:this.icon,prefix:(null===(t=null==o?void 0:o.prefix)||void 0===t?void 0:t.trim())||this.prefix,suffix:(null===(e=null==o?void 0:o.suffix)||void 0===e?void 0:e.trim())||this.suffix},n=Object.assign(Object.assign({},s),{icon:"error",prefix:"ERROR",loading:!0,label:this.getLabel(r)}),l=Object.assign(Object.assign({},s),{label:this.getLabel(r),link:this.getLink(r),loading:this.loading,value:null==o?void 0:o.value.trim()});return i("limel-info-tile",Object.assign({key:"ed37d3978ead3c591dc1e357b0583c6c2e5350a1",class:{error:!r||this.error}},!r||this.error?n:l))}getFormattedValue(){if(!this.value&&0!==this.value)return{value:""};try{return this.getFormatter(this.value).format(this.value,this.format)}catch(t){return new x(this.language).format(this.value)}}getLabel(t){return t?"string"==typeof this.label?this.translator.get(this.label):this.getLocalizedString(this.label&&"object"==typeof this.label?this.label:t.name):"No filter set is selected"}getLocalizedString(t){if(function(t){if(null==t)return!0;if(h(t)&&(m(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||f(t)||d(t)))return!t.length;var e=p(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(v(t))return!g(t).length;for(var i in t)if(b.call(t,i))return!1;return!0}(t))return"";let e=t[this.language];return e||(e=t.en||t.en_us||Object.values(null!=e?e:{}).find((t=>!!t))),null!=e?e:""}getLink(t){if(!t)return{href:"#"};const e=["explorer",t.limetype,t.id].join("/"),i=this.getRelationPropertyName(this.limetypes[t.limetype]),r=this.buildContextAwareFilter(t.filter,i);return r?{href:`${e}?filter=${encodeURIComponent(JSON.stringify(r))}`}:{href:e}}buildContextAwareFilter(t,e){if(!e)return t;const i={key:e,op:u.EQUALS,exp:this.context.id};return t?{op:u.AND,exp:[i,t]}:{relationFilter:i}}getFilter(){var t;return null===(t=this.filters)||void 0===t?void 0:t.find((t=>t.id===this.filterId))}getFormatter(t){return new N(this.language).createFormatter(this.format,t)}getRelationPropertyName(t){var e,i,r;if(t&&this.context.limetype&&this.context.id){if(this.propertyName){const t=this.limetypes[this.context.limetype],r=null===(i=null===(e=null==t?void 0:t.getProperty(this.propertyName))||void 0===e?void 0:e.relation)||void 0===i?void 0:i.getBackreference();if(r)return r.name}return null===(r=Object.values(t.properties).find((t=>{var e;return(null===(e=t.relation)||void 0===e?void 0:e.getLimetype().name)===this.context.limetype})))||void 0===r?void 0:r.name}}get translator(){return this.platform.get(o.Translate)}get language(){return this.platform.get(o.Application).getLanguage()}get loader(){return new w(this.platform,this.filters)}registerContextProvider(){const t=this.platform.get(o.AIContextRegistry);if(!(null==t?void 0:t.register))return;const e=new y((()=>{const t=this.getFilter();return{limetype:null==t?void 0:t.limetype,filterId:this.filterId,filterName:t?this.getLocalizedString(t.name):void 0,aggregateOperator:this.aggregateOperator,propertyName:this.propertyName,value:this.value,label:this.getLabel(t)}}));this.unregisterContextProvider=t.register(e,this.host)}get host(){return this}static get watchers(){return{filterId:[{watchFilterId:0}],propertyName:[{watchPropertyName:0}],aggregateOperator:[{watchAggregateOperator:0}]}}static get style(){return":host(limebb-info-tile){display:block;overflow:visible !important;background-color:transparent !important}limel-info-tile.error{--info-tile-icon-color:rgb(var(--color-red-dark));border:1px dashed rgb(var(--contrast-500));border-radius:var(--info-tile-border-radius, 1rem)}"}},[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32],limetypes:[32]},void 0,{filterId:[{watchFilterId:0}],propertyName:[{watchPropertyName:0}],aggregateOperator:[{watchAggregateOperator:0}]}]);k([s({})],F.prototype,"config",void 0),k([n()],F.prototype,"filters",void 0),k([l()],F.prototype,"limetypes",void 0);const R=F,C=function(){"undefined"!=typeof customElements&&["limebb-info-tile"].forEach((t=>{"limebb-info-tile"===t&&(customElements.get(r(t))||customElements.define(r(t),F))}))};export{R as LimebbInfoTile,C as defineCustomElement}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const LimebbKanbanGroup = KanbanGroup;
|
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
|
5
|
-
|
|
6
|
-
export { LimebbKanbanGroup, defineCustomElement };
|
|
1
|
+
import{K as o,d as a}from"./kanban-group.js";const r=o,s=a;export{r as LimebbKanbanGroup,s as defineCustomElement}
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const LimebbKanbanItem = KanbanItemComponent;
|
|
4
|
-
const defineCustomElement = defineCustomElement$1;
|
|
5
|
-
|
|
6
|
-
export { LimebbKanbanItem, defineCustomElement };
|
|
1
|
+
import{K as a,d as o}from"./kanban-item.js";const s=a,t=o;export{s as LimebbKanbanItem,t as defineCustomElement}
|