@limetech/lime-crm-building-blocks 2.0.1 → 2.0.3
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/{filter-group-logic-EDLGrkTt.js → filter-group-logic-Bt5tIbfP.js} +1 -1
- package/dist/cjs/{filter-operators-CVCyCZ7Q.js → filter-operators-CzIq9qKC.js} +1 -1
- package/dist/cjs/{index-BrWc7h0p.js → index-mDIvByXc.js} +47 -11
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/{index.esm-CcYbS__E.js → index.esm-D1EzGa8X.js} +3 -3
- package/dist/cjs/lime-crm-building-blocks.cjs.js +2 -2
- package/dist/cjs/{lime-query-validation-B0oYW7Z6.js → lime-query-validation-Df4GZRGm.js} +1 -1
- package/dist/cjs/limebb-alert-dialog.cjs.entry.js +2 -2
- package/dist/cjs/limebb-browser.cjs.entry.js +4 -4
- package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +6 -6
- package/dist/cjs/limebb-chat-list.cjs.entry.js +3 -3
- package/dist/cjs/limebb-color-palette-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +2 -2
- package/dist/cjs/limebb-component-config.cjs.entry.js +3 -3
- package/dist/cjs/limebb-component-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +4 -4
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +3 -3
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +2 -2
- package/dist/cjs/limebb-data-cells.cjs.entry.js +2 -2
- package/dist/cjs/limebb-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/limebb-date-range.cjs.entry.js +2 -2
- package/dist/cjs/limebb-document-chips.cjs.entry.js +2 -2
- package/dist/cjs/limebb-document-item.cjs.entry.js +3 -3
- package/dist/cjs/limebb-document-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-empty-state.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +3 -3
- package/dist/cjs/limebb-feed.cjs.entry.js +3 -3
- package/dist/cjs/limebb-filter-chip_6.cjs.entry.js +7 -7
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-info-tile-currency-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-date-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-decimal-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +2 -2
- package/dist/cjs/limebb-info-tile-relative-date-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-unit-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +3 -3
- package/dist/cjs/limebb-inline-image.cjs.entry.js +2 -2
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +3 -3
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +4 -4
- package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +32 -27
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +1 -1
- package/dist/cjs/limebb-loader.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +2 -2
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-notification-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-list.cjs.entry.js +2 -2
- package/dist/cjs/limebb-object-chip.cjs.entry.js +3 -3
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-property-selector.cjs.entry.js +84 -72
- package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +2 -2
- package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +3 -3
- package/dist/cjs/limebb-rule-editor.cjs.entry.js +2 -2
- package/dist/cjs/limebb-rule-gate.cjs.entry.js +2 -2
- package/dist/cjs/limebb-text-editor-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-text-editor.cjs.entry.js +4 -4
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +2 -2
- package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +4 -4
- package/dist/cjs/{limetype-C-fVThrI.js → limetype-BPuuRLtH.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{web-component-template-C9hvjrMm.js → web-component-template-DRMW9wHN.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/alert-dialog/alert-dialog.js +1 -1
- package/dist/collection/components/browser/browser.js +2 -2
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +1 -1
- package/dist/collection/components/chat-list/chat-item/chat-item.js +2 -2
- package/dist/collection/components/chat-list/chat-list.js +1 -1
- package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/color-palette-picker/color-palette-picker.js +1 -1
- package/dist/collection/components/color-palette-picker/color-palette-swatches/color-palette-swatches.js +1 -1
- package/dist/collection/components/composer-toolbar/composer-toolbar.js +2 -2
- package/dist/collection/components/currency-picker/currency-picker.js +1 -1
- package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-range/date-range.js +1 -1
- package/dist/collection/components/document-chips/document-chips.js +1 -1
- package/dist/collection/components/document-picker/document-item/document-item.js +2 -2
- package/dist/collection/components/document-picker/document-picker.js +1 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
- package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/filter-chip/filter-chip.js +2 -2
- package/dist/collection/components/filter-condition-picker/filter-condition-picker.js +1 -1
- package/dist/collection/components/icon-picker/icon-picker.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +4 -3
- package/dist/collection/components/lime-query-builder/property-selection-format.js +31 -26
- package/dist/collection/components/lime-query-builder/property-selector/property-selector.js +87 -72
- package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js +1 -1
- package/dist/collection/components/text-editor/text-editor.css +1 -1
- package/dist/components/chat-icon-list.js +1 -1
- package/dist/components/chat-item.js +1 -1
- package/dist/components/currency-picker.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/document-item.js +1 -1
- package/dist/components/feed-item-thumbnail-file-info.js +1 -1
- package/dist/components/feed-timeline-item.js +1 -1
- package/dist/components/filter-chip.js +1 -1
- package/dist/components/filter-condition-picker.js +1 -1
- package/dist/components/kanban-group.js +1 -1
- package/dist/components/limebb-alert-dialog.js +1 -1
- package/dist/components/limebb-browser.js +1 -1
- package/dist/components/limebb-chat-list.js +1 -1
- package/dist/components/limebb-color-palette-picker.js +1 -1
- package/dist/components/limebb-color-palette-swatches.js +1 -1
- package/dist/components/limebb-composer-toolbar.js +1 -1
- package/dist/components/limebb-dashboard-widget.js +1 -1
- package/dist/components/limebb-date-range.js +1 -1
- package/dist/components/limebb-document-chips.js +1 -1
- package/dist/components/limebb-document-picker.js +1 -1
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-icon-picker.js +1 -1
- package/dist/components/limebb-info-tile-format.js +1 -1
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-value-comparison-editor.js +1 -1
- package/dist/components/limetype.js +1 -1
- package/dist/components/property-selector.js +1 -1
- package/dist/components/response-format-editor.js +1 -1
- package/dist/components/typing-indicator.js +1 -1
- package/dist/esm/{filter-group-logic-DS1inQTh.js → filter-group-logic-CzThKf85.js} +1 -1
- package/dist/esm/{filter-operators-CsZi5iCV.js → filter-operators-u3T1PKhm.js} +1 -1
- package/dist/esm/{index-DwHAn7LS.js → index-COtSgrC5.js} +47 -11
- package/dist/esm/{index.esm-BjIhvFKX.js → index.esm-B9D_MXA6.js} +2 -2
- package/dist/esm/index.js +3 -3
- package/dist/esm/lime-crm-building-blocks.js +3 -3
- package/dist/esm/{lime-query-validation-CVV7mrLj.js → lime-query-validation-dGoN_93p.js} +1 -1
- package/dist/esm/limebb-alert-dialog.entry.js +2 -2
- package/dist/esm/limebb-browser.entry.js +4 -4
- package/dist/esm/limebb-chat-icon-list_3.entry.js +6 -6
- package/dist/esm/limebb-chat-list.entry.js +3 -3
- package/dist/esm/limebb-color-palette-picker.entry.js +2 -2
- package/dist/esm/limebb-color-palette-swatches.entry.js +2 -2
- package/dist/esm/limebb-component-config.entry.js +3 -3
- package/dist/esm/limebb-component-picker.entry.js +2 -2
- package/dist/esm/limebb-composer-toolbar.entry.js +4 -4
- package/dist/esm/limebb-currency-picker.entry.js +3 -3
- package/dist/esm/limebb-dashboard-widget.entry.js +2 -2
- package/dist/esm/limebb-data-cells.entry.js +2 -2
- package/dist/esm/limebb-date-picker.entry.js +3 -3
- package/dist/esm/limebb-date-range.entry.js +2 -2
- package/dist/esm/limebb-document-chips.entry.js +2 -2
- package/dist/esm/limebb-document-item.entry.js +3 -3
- package/dist/esm/limebb-document-picker.entry.js +2 -2
- package/dist/esm/limebb-empty-state.entry.js +1 -1
- package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +2 -2
- package/dist/esm/limebb-feed-timeline-item.entry.js +3 -3
- package/dist/esm/limebb-feed.entry.js +3 -3
- package/dist/esm/limebb-filter-chip_6.entry.js +7 -7
- package/dist/esm/limebb-icon-picker.entry.js +2 -2
- package/dist/esm/limebb-info-tile-currency-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-date-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-decimal-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +2 -2
- package/dist/esm/limebb-info-tile-relative-date-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile-unit-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +3 -3
- package/dist/esm/limebb-inline-image.entry.js +2 -2
- package/dist/esm/limebb-kanban-group.entry.js +3 -3
- package/dist/esm/limebb-kanban-item.entry.js +2 -2
- package/dist/esm/limebb-kanban.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +3 -3
- package/dist/esm/limebb-lime-query-filter-builder.entry.js +3 -3
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +4 -4
- package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +3 -3
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +3 -3
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +32 -27
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
- package/dist/esm/limebb-live-docs-info.entry.js +1 -1
- package/dist/esm/limebb-loader.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +2 -2
- package/dist/esm/limebb-mention-group-counter.entry.js +1 -1
- package/dist/esm/limebb-mention.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +1 -1
- package/dist/esm/limebb-notification-item.entry.js +2 -2
- package/dist/esm/limebb-notification-list.entry.js +2 -2
- package/dist/esm/limebb-object-chip.entry.js +3 -3
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-property-selector.entry.js +84 -72
- package/dist/esm/limebb-rule-arg-filter-editor.entry.js +2 -2
- package/dist/esm/limebb-rule-chip-popover.entry.js +3 -3
- package/dist/esm/limebb-rule-editor.entry.js +2 -2
- package/dist/esm/limebb-rule-gate.entry.js +2 -2
- package/dist/esm/limebb-text-editor-picker.entry.js +1 -1
- package/dist/esm/limebb-text-editor.entry.js +4 -4
- package/dist/esm/limebb-trend-indicator.entry.js +2 -2
- package/dist/esm/limebb-value-comparison-editor.entry.js +4 -4
- package/dist/esm/{limetype-BbMRN-SU.js → limetype-BcELY1NF.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{web-component-template-CAI6pXCH.js → web-component-template-DxbwHsvw.js} +1 -1
- package/dist/lime-crm-building-blocks/index.esm.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-b0b8ce73.entry.js → p-0193ed83.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-97839894.entry.js → p-021e452a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7033d408.entry.js → p-02fba38e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-5beb508a.entry.js → p-0370200d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0c4f6220.entry.js → p-07a9c8f2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-240cbd82.entry.js → p-080a1166.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-52a92d89.entry.js → p-0ed9a7cc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-a4e676a6.entry.js → p-10310a64.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ef890206.entry.js → p-10da40f8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-170ab4be.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-0253fd45.entry.js → p-1ebe45b8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-251aca46.entry.js → p-242ed59b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-662fb8b6.entry.js → p-29262c17.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-22e68812.entry.js → p-3c3009e3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-40cb2c7c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-43dfbefb.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-f4d518ec.entry.js → p-49d042aa.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-4f0939e6.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-f9e9d18e.entry.js → p-5268fc02.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-25984c90.entry.js → p-56d125c7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-73b71080.entry.js → p-584a48e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-397a6191.entry.js → p-5f682c06.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-dd7aec09.entry.js → p-63e7c191.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d43cf8d1.entry.js → p-6951dcf7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2e48601d.entry.js → p-6a8422d2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c4e5e589.entry.js → p-6d8efe87.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d78370be.entry.js → p-73f23d08.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e2e1358d.entry.js → p-78118c62.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-906b4eca.entry.js → p-79bb58b0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f6377fa5.entry.js → p-7a9d7d87.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c97c4604.entry.js → p-7ccca5e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-585f6cfe.entry.js → p-7cd8dffd.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7a5c2dda.entry.js → p-848462ee.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-84ad9159.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-e8b2df7c.entry.js → p-8a17a7ea.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-bc297cf4.entry.js → p-8fdf6a09.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-aafead4e.entry.js → p-956e466d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-COtSgrC5.js +3 -0
- package/dist/lime-crm-building-blocks/{p-b78ub0mY.js → p-Cj_3f9vm.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-Cw4kdMw3.js → p-Css8537O.js} +1 -1
- package/dist/lime-crm-building-blocks/p-Cz5s8qGk.js +1 -0
- package/dist/lime-crm-building-blocks/{p-Dhyy9Td7.js → p-DLec4QaM.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-DI3GWqfD.js → p-DVypQWZ4.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d014ec57.entry.js → p-a17d6dac.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-a58c9e1e.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-1c6e5402.entry.js → p-a5f3913d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-964b066d.entry.js → p-abe751c0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7b6c9cbf.entry.js → p-ac13feb9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1f97e235.entry.js → p-ad661a38.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-19dc7242.entry.js → p-bd89279d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-bcd8c767.entry.js → p-c85ff45b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-673226a6.entry.js → p-ce2755a0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-742926a3.entry.js → p-ce723c21.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3f537135.entry.js → p-d071bd2d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f4214745.entry.js → p-d23f4604.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-d495cc19.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-e6a85c26.entry.js → p-d816fcc8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d3fe25a7.entry.js → p-d8d32cb1.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-89f120f8.entry.js → p-da35bcc7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6c2e25d9.entry.js → p-dacf9e77.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-69b08896.entry.js → p-e5028d83.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e4a21ebe.entry.js → p-e910963c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d2e85be2.entry.js → p-ee7bd504.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6f4e2590.entry.js → p-eed0b2c2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e581d0b7.entry.js → p-f1060c88.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-896e77b9.entry.js → p-f9b1cd5e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ffca266e.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-CE43qjk3.js → p-hsyotUav.js} +1 -1
- package/dist/types/components/lime-query-builder/property-selector/property-selector.d.ts +23 -3
- package/dist/types/components.d.ts +21 -11
- package/dist/types/stencil-public-runtime.d.ts +12 -0
- package/loader/index.d.ts +1 -1
- package/package.json +14 -14
- package/dist/lime-crm-building-blocks/p-59fb624c.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-78d362b4.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-79c492b2.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7ce967b6.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-DLehg4hi.js +0 -1
- package/dist/lime-crm-building-blocks/p-DwHAn7LS.js +0 -2
- package/dist/lime-crm-building-blocks/p-a157233b.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-a3058b72.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d20404ec.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-e29c27b8.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as l,transformTag as n}from"@stencil/core/internal/client";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.handleChangeType=t=>{t.stopPropagation();const e=t.detail.id;"none"===e?this.change.emit():this.change.emit("date"===e||"relative-date"===e?{type:e}:"percent"===e?{type:"number",options:{style:"percent"},suffix:["percentSign"]}:{type:"number",options:{style:e}})},this.isValidButton=t=>!this.type||"none"===t.id||"none"!==this.type&&("date"===this.type?t.id.includes("date"):!t.id.includes("date"))}render(){var t,e,i,n,o,s,r,
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as l,transformTag as n}from"@stencil/core/internal/client";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.handleChangeType=t=>{t.stopPropagation();const e=t.detail.id;"none"===e?this.change.emit():this.change.emit("date"===e||"relative-date"===e?{type:e}:"percent"===e?{type:"number",options:{style:"percent"},suffix:["percentSign"]}:{type:"number",options:{style:e}})},this.isValidButton=t=>!this.type||"none"===t.id||"none"!==this.type&&("date"===this.type?t.id.includes("date"):!t.id.includes("date"))}render(){var t,e,i,n,o,s,d,r,a,u,m;const c=[{id:"none",title:"No formatting",selected:!(null===(t=this.value)||void 0===t?void 0:t.type)},{id:"currency",title:"Currency",selected:"number"===(null===(e=this.value)||void 0===e?void 0:e.type)&&"currency"===(null===(i=this.value.options)||void 0===i?void 0:i.style)},{id:"decimal",title:"Decimal",selected:"number"===(null===(n=this.value)||void 0===n?void 0:n.type)&&"decimal"===(null===(o=this.value.options)||void 0===o?void 0:o.style)},{id:"percent",title:"Percent",selected:"number"===(null===(s=this.value)||void 0===s?void 0:s.type)&&"percent"===(null===(d=this.value.options)||void 0===d?void 0:d.style)},{id:"unit",title:"Unit",selected:"number"===(null===(r=this.value)||void 0===r?void 0:r.type)&&"unit"===(null===(a=this.value.options)||void 0===a?void 0:a.style)},{id:"date",title:"Date",selected:"date"===(null===(u=this.value)||void 0===u?void 0:u.type)},{id:"relative-date",title:"Relative date",selected:"relative-date"===(null===(m=this.value)||void 0===m?void 0:m.type)}];return[l("limel-button-group",{key:"71fd85af5cbbb2376dd0ad87e9433872af1d9d23",value:c.filter(this.isValidButton),onChange:this.handleChangeType}),this.renderFormatConfig()]}renderFormatConfig(){var t,e;if(!(null===(t=this.value)||void 0===t?void 0:t.type))return;let i=this.value.type;this.isNumberFormat(this.value)&&(i=null===(e=this.value.options)||void 0===e?void 0:e.style);const n=`limebb-info-tile-${i}-format`;return customElements.get(n)?l(n,{platform:this.platform,context:this.context,class:"format",value:this.value}):void 0}isNumberFormat(t){return"number"===(null==t?void 0:t.type)}static get style(){return":host(limebb-info-tile-format){display:grid;gap:1rem}limel-button-group{grid-column:1/-1}.format{display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(8rem, 1fr))}"}},[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]),s=o,d=function(){"undefined"!=typeof customElements&&["limebb-info-tile-format"].forEach((t=>{"limebb-info-tile-format"===t&&(customElements.get(n(t))||customElements.define(n(t),o))}))};export{s as LimebbInfoTileFormat,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,transformTag as r}from"@stencil/core/internal/client";import{n,s as o,c as a,I as h,_ as c}from"./index.esm.js";import{A as u,E as l,b as d,a as f,T as m}from"./keycodes.js";import{o as p,U as b,c as v,a as g,d as y,n as j,i as w,S as x,g as k}from"./_Uint8Array.js";import{d as O}from"./_defineProperty.js";import{c as S,e as E,S as I,i as T,a as C,r as A}from"./_MapCache.js";import{c as P}from"./random-string.js";import{h as M,b as N,c as F}from"./limetype.js";import{i as _}from"./non-null.js";import{g as R}from"./file-contents-url.js";import{d as U}from"./empty-state.js";import{d as D}from"./text-editor-picker.js";import{i as L}from"./isSymbol.js";var z=/\s/,Q=/^\s+/;var $=/^[-+]0x[0-9a-f]+$/i,G=/^0b[01]+$/i,q=/^0o[0-7]+$/i,W=parseInt;function B(t){if("number"==typeof t)return t;if(L(t))return NaN;if(S(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=S(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&z.test(t.charAt(e)););return e}(t)+1).replace(Q,""):t}(t);var i=G.test(t);return i||q.test(t)?W(t.slice(2),i?2:8):$.test(t)?NaN:+t}var H=Object.create,K=function(){function t(){}return function(e){if(!S(e))return{};if(H)return H(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}(),V=Object.prototype.hasOwnProperty;var J=p(Object.getPrototypeOf,Object);"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module;var X=Object.prototype.hasOwnProperty;function Y(t){var e=new t.constructor(t.byteLength);return new b(e).set(new b(t)),e}var Z=/\w*$/,tt=I?I.prototype:void 0,et=tt?tt.valueOf:void 0;var it=j&&j.isMap,st=it?y(it):function(t){return T(t)&&"[object Map]"==g(t)},rt=j&&j.isSet,nt=rt?y(rt):function(t){return T(t)&&"[object Set]"==g(t)},ot="[object Arguments]",at="[object Function]",ht="[object Object]",ct={};function ut(t,e,i,s,r,n){var o;if(void 0!==o)return o;if(!S(t))return t;var a=C(t);if(a)o=function(t){var e=t.length,i=new t.constructor(e);return e&&"string"==typeof t[0]&&X.call(t,"index")&&(i.index=t.index,i.input=t.input),i}(t);else{var h=g(t),c=h==at||"[object GeneratorFunction]"==h;if(w(t))return function(t){return t.slice()}(t);if(h==ht||h==ot||c&&!r)o=c?{}:function(t){return"function"!=typeof t.constructor||v(t)?{}:K(J(t))}(t);else{if(!ct[h])return r?t:{};o=function(t,e){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return Y(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t){var e=Y(t.buffer);return new t.constructor(e,t.byteOffset,t.byteLength)}(t);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t){var e=Y(t.buffer);return new t.constructor(e,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,Z.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return function(t){return et?Object(et.call(t)):{}}(t)}}(t,h)}}n||(n=new x);var u=n.get(t);if(u)return u;n.set(t,o),nt(t)?t.forEach((function(s){o.add(ut(s,e,i,0,t,n))})):st(t)&&t.forEach((function(s,r){o.set(r,ut(s,e,i,0,t,n))}));var l=a?void 0:k(t);return function(t,e){for(var i=-1,s=null==t?0:t.length;++i<s&&!1!==e(t[i],i););}(l||t,(function(s,r){l&&(s=t[r=s]),function(t,e,i){var s=t[e];V.call(t,e)&&E(s,i)&&(void 0!==i||e in t)||function(t,e,i){"__proto__"==e&&O?O(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}(t,e,i)}(o,r,ut(s,e,i,0,t,n))})),o}ct[ot]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object DataView]"]=ct["[object Boolean]"]=ct["[object Date]"]=ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Map]"]=ct["[object Number]"]=ct[ht]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object Symbol]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Error]"]=ct[at]=ct["[object WeakMap]"]=!1;var lt=function(){return A.Date.now()},dt=Math.max,ft=Math.min;function mt(t,e){return t.map(((t,i)=>{const s=function(t){return ut(t,5)}(t);return Object.assign(Object.assign({},s),{selected:i===e})}))}class pt{get limeObjectService(){return this.platform.get(n.LimeObjectRepository)}get queryService(){return this.platform.get(n.Query)}get viewFactoryRegistry(){return this.platform.get(n.ViewFactoryRegistry)}get contextRegistry(){return this.platform.get(n.ContextRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(n.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,e,i,s){this.platform=t,this.context=e,this.searchableLimetypes=i,this.host=s,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,e)=>this.inserter(t,e),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:e}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(e)},this.inserter=async(t,e)=>{var i;const s=this.triggerHandler.nodeDefinition;s&&t.insert({node:{tagName:s.customElement.tagName,attributes:s.mapAttributes(e)},children:[null===(i=e.value)||void 0===i?void 0:i.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!N(t,"user")&&M(t,"user"))).map((t=>this.getGroupCounts(t)));for(const e of await Promise.all(t))Object.assign(this.groupCounts,e)}async getGroupCounts(t){var e;const i=F(t,"user"),s=t.name;try{const t=await this.queryService.execute({limetype:s,responseFormat:{object:{_id:null,[i.name]:{count:{aggregate:{op:o.Count}}}}}});if(!(null===(e=t.objects)||void 0===e?void 0:e.length))return{[s]:{}};const r=this.createGroupCount(t.objects,i.name);return{[s]:r}}catch(e){return console.error("Error fetching group count for limetype: "+t.name,e),{[s]:{}}}}createGroupCount(t,e){const i={};for(const s of t){const{_id:t,[e]:r}=s;i[t]=r.count}return i}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(_)}createSearchListItem(t){const e=this.viewFactoryRegistry.getFactory("search"),i=this.limeObjectService.getObject(t._limetype,t._id);if(!i)return null;const s=e(i,this.contextRegistry.scope({host:this.host})),r=this.getGroupCountComponent(i);return Object.assign(Object.assign({},s),r?{primaryComponent:r}:{})}getGroupCountComponent(t){var e;const i=t.getLimetype(),s=null===(e=this.groupCounts[i.name])||void 0===e?void 0:e[t.id],r=F(i,"user");if(void 0!==s&&r)return{name:"limebb-mention-group-counter",props:{count:s,limetype:r.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class bt{constructor(t,e){this.file=t,this.http=e,this.uploadCancelled=!1,this.getUrl=t=>"api/v1/file/"+(null!=t?t:"")}async initialize(){this.uploadService=await this.http.createFileUpload(a.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}var vt=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};const gt=t(class extends e{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.imageUploadingChange=i(this,"imageUploadingChange",7),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowPasteImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.pendingUploads=0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![l,d,u,f,m].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const e={[l]:this.handleEscapeKey,[f]:this.handleEnterOrTabKey,[m]:this.handleEnterOrTabKey,[u]:this.handleArrowKeyPress,[d]:this.handleArrowKeyPress}[t.key];e&&e(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,e,i=0)=>{if(0===this.items.length||i>this.items.length)return e;const s=((t,e,i)=>(e+(t===u?1:-1)+i)%i)(t,e,this.items.length);return this.isListSeparator(this.items[s])?this.findNonSeparatorIndex(t,s,i+1):s},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var e;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const i=null===(e=this.registeredTriggerMap[t.detail.trigger])||void 0===e?void 0:e.searcher;i&&(this.isSearching=!0,this.debouncedSearchFn(i,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var e;let i;if(t instanceof CustomEvent)i=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;i=t}}if(!this.activeTrigger||(null==i?void 0:i.disabled))return;const s=this.registeredTriggerMap[this.activeTrigger];try{s.inserter(this.triggerFunction,i)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(e=this.textEditor)||void 0===e||e.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=P(),this.debouncedSearchFn=function(t,e,i){var s,r,n,o,a,h,c=0,u=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var i=s,n=r;return s=r=void 0,c=e,o=t.apply(n,i)}function m(t){var i=t-h;return void 0===h||i>=e||i<0||l&&t-c>=n}function p(){var t=lt();if(m(t))return b(t);a=setTimeout(p,function(t){var i=e-(t-h);return l?ft(i,n-(t-c)):i}(t))}function b(t){return a=void 0,d&&s?f(t):(s=r=void 0,o)}function v(){var t=lt(),i=m(t);if(s=arguments,r=this,h=t,i){if(void 0===a)return function(t){return c=t,a=setTimeout(p,e),u?f(t):o}(h);if(l)return clearTimeout(a),a=setTimeout(p,e),f(h)}return void 0===a&&(a=setTimeout(p,e)),o}return e=B(e)||0,S(i)&&(u=!!i.leading,n=(l="maxWait"in i)?dt(B(i.maxWait)||0,e):n,d="trailing"in i?!!i.trailing:d),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,s=h=r=a=void 0},v.flush=function(){return void 0===a?o:b(lt())},v}((async(t,e)=>{try{const i=await t(e);if(e!==this.editorPickerQuery||!this.activeTrigger)return;this.items=i}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,e,i,s;if(this.draftIdentifier){const r=null!==(e=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==e?e:"no-limeobject",n=null!==(s=null===(i=this.context)||void 0===i?void 0:i.limetype)&&void 0!==s?s:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,r,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload))}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new pt(this.platform,this.context,this.searchableLimetypes,this.host),e=t.triggerHandler.nodeDefinition;e&&(this.registeredCustomElements.push(e.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const e=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?e.noItemsFoundMessage:e.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[s("limel-text-editor",{key:"7c5597fd2affe6f7a625c3fabfbaaef70ac41b00",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,inlineImages:this.inlineImages,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return s("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},s("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:mt(this.items,this.highlightedItemIndex),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}))}get inlineImages(){return Object.assign({tagName:"limebb-inline-image",getUrl:t=>R(this.appName,t)},this.allowPasteImages&&{upload:t=>this.uploadImage(t)})}async uploadImage(t){0===this.pendingUploads&&this.imageUploadingChange.emit(!0),this.pendingUploads++;try{return await this.uploadFile(t)}finally{this.pendingUploads--,0===this.pendingUploads&&this.imageUploadingChange.emit(!1)}}async uploadFile(t){if(t.size>52428800)throw Error("Image exceeds the maximum file size");const e=this.platform.get(n.Http),i=new bt(t,e);await i.initialize();const s=await i.upload();if(!s.id)throw Error("File upload response is missing an id");return s.id+""}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,e,i,s;if(!this.textEditorInnerId)return;const r=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(e=this.userDataService)||void 0===e?void 0:e.get(this.textEditorInnerId);r&&r!==n?null===(i=this.userDataService)||void 0===i||i.set(this.textEditorInnerId,r):!r&&n&&(null===(s=this.userDataService)||void 0===s||s.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(n.UserDataRepository)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}}static get style(){return":host(limebb-text-editor){display:block;width:100%;min-width:5rem;min-height:5rem;height:100%;max-height:var(--text-editor-max-height, calc(100vh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)) - 4rem))}"}},[17,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],draftIdentifier:[1,"draft-identifier"],triggerMap:[16],customElements:[16],allowPasteImages:[4,"allow-paste-images"],items:[32],highlightedItemIndex:[32],editorPickerQuery:[32],searchableLimetypes:[32],appName:[32],isPickerOpen:[32],isSearching:[32]},void 0,{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}]);vt([h({map:[function(t){return Object.values(t).filter((t=>N(t,"user")||M(t,"user")))}]})],gt.prototype,"searchableLimetypes",void 0),vt([c()],gt.prototype,"appName",void 0);const yt=gt,jt=function(){"undefined"!=typeof customElements&&["limebb-text-editor","limebb-empty-state","limebb-text-editor-picker"].forEach((t=>{switch(t){case"limebb-text-editor":customElements.get(r(t))||customElements.define(r(t),gt);break;case"limebb-empty-state":customElements.get(r(t))||U();break;case"limebb-text-editor-picker":customElements.get(r(t))||D()}}))};export{yt as LimebbTextEditor,jt as defineCustomElement}
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as s,transformTag as r}from"@stencil/core/internal/client";import{n,s as o,c as a,I as h,_ as c}from"./index.esm.js";import{A as u,E as l,b as d,a as f,T as m}from"./keycodes.js";import{o as p,U as b,c as v,a as g,d as y,n as j,i as w,S as x,g as k}from"./_Uint8Array.js";import{d as O}from"./_defineProperty.js";import{c as S,e as E,S as I,i as T,a as C,r as A}from"./_MapCache.js";import{c as P}from"./random-string.js";import{h as M,b as N,c as F}from"./limetype.js";import{i as _}from"./non-null.js";import{g as R}from"./file-contents-url.js";import{d as U}from"./empty-state.js";import{d as D}from"./text-editor-picker.js";import{i as L}from"./isSymbol.js";var z=/\s/,Q=/^\s+/;var $=/^[-+]0x[0-9a-f]+$/i,G=/^0b[01]+$/i,q=/^0o[0-7]+$/i,W=parseInt;function B(t){if("number"==typeof t)return t;if(L(t))return NaN;if(S(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=S(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=function(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&z.test(t.charAt(e)););return e}(t)+1).replace(Q,""):t}(t);var i=G.test(t);return i||q.test(t)?W(t.slice(2),i?2:8):$.test(t)?NaN:+t}var H=Object.create,K=function(){function t(){}return function(e){if(!S(e))return{};if(H)return H(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}(),V=Object.prototype.hasOwnProperty;var J=p(Object.getPrototypeOf,Object);"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module;var X=Object.prototype.hasOwnProperty;function Y(t){var e=new t.constructor(t.byteLength);return new b(e).set(new b(t)),e}var Z=/\w*$/,tt=I?I.prototype:void 0,et=tt?tt.valueOf:void 0;var it=j&&j.isMap,st=it?y(it):function(t){return T(t)&&"[object Map]"==g(t)},rt=j&&j.isSet,nt=rt?y(rt):function(t){return T(t)&&"[object Set]"==g(t)},ot="[object Arguments]",at="[object Function]",ht="[object Object]",ct={};function ut(t,e,i,s,r,n){var o;if(void 0!==o)return o;if(!S(t))return t;var a=C(t);if(a)o=function(t){var e=t.length,i=new t.constructor(e);return e&&"string"==typeof t[0]&&X.call(t,"index")&&(i.index=t.index,i.input=t.input),i}(t);else{var h=g(t),c=h==at||"[object GeneratorFunction]"==h;if(w(t))return function(t){return t.slice()}(t);if(h==ht||h==ot||c&&!r)o=c?{}:function(t){return"function"!=typeof t.constructor||v(t)?{}:K(J(t))}(t);else{if(!ct[h])return r?t:{};o=function(t,e){var i=t.constructor;switch(e){case"[object ArrayBuffer]":return Y(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t){var e=Y(t.buffer);return new t.constructor(e,t.byteOffset,t.byteLength)}(t);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t){var e=Y(t.buffer);return new t.constructor(e,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return function(t){var e=new t.constructor(t.source,Z.exec(t));return e.lastIndex=t.lastIndex,e}(t);case"[object Symbol]":return function(t){return et?Object(et.call(t)):{}}(t)}}(t,h)}}n||(n=new x);var u=n.get(t);if(u)return u;n.set(t,o),nt(t)?t.forEach((function(s){o.add(ut(s,e,i,0,t,n))})):st(t)&&t.forEach((function(s,r){o.set(r,ut(s,e,i,0,t,n))}));var l=a?void 0:k(t);return function(t,e){for(var i=-1,s=null==t?0:t.length;++i<s&&!1!==e(t[i],i););}(l||t,(function(s,r){l&&(s=t[r=s]),function(t,e,i){var s=t[e];V.call(t,e)&&E(s,i)&&(void 0!==i||e in t)||function(t,e,i){"__proto__"==e&&O?O(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}(t,e,i)}(o,r,ut(s,e,i,0,t,n))})),o}ct[ot]=ct["[object Array]"]=ct["[object ArrayBuffer]"]=ct["[object DataView]"]=ct["[object Boolean]"]=ct["[object Date]"]=ct["[object Float32Array]"]=ct["[object Float64Array]"]=ct["[object Int8Array]"]=ct["[object Int16Array]"]=ct["[object Int32Array]"]=ct["[object Map]"]=ct["[object Number]"]=ct[ht]=ct["[object RegExp]"]=ct["[object Set]"]=ct["[object String]"]=ct["[object Symbol]"]=ct["[object Uint8Array]"]=ct["[object Uint8ClampedArray]"]=ct["[object Uint16Array]"]=ct["[object Uint32Array]"]=!0,ct["[object Error]"]=ct[at]=ct["[object WeakMap]"]=!1;var lt=function(){return A.Date.now()},dt=Math.max,ft=Math.min;function mt(t,e){return t.map(((t,i)=>{const s=function(t){return ut(t,5)}(t);return Object.assign(Object.assign({},s),{selected:i===e})}))}class pt{get limeObjectService(){return this.platform.get(n.LimeObjectRepository)}get queryService(){return this.platform.get(n.Query)}get viewFactoryRegistry(){return this.platform.get(n.ViewFactoryRegistry)}get contextRegistry(){return this.platform.get(n.ContextRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(n.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,e,i,s){this.platform=t,this.context=e,this.searchableLimetypes=i,this.host=s,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,e)=>this.inserter(t,e),emptySearchMessage:"Start typing a name...",noItemsFoundMessage:"No results for your search...",nodeDefinition:{customElement:{tagName:"limebb-mention",attributes:["limetype","objectid","href"]},mapAttributes:t=>({limetype:t.value.getLimetype().name,objectid:t.value.id,href:`object/${this.context.limetype}/${this.context.id}`})}},this.searcher=async t=>{if(!t)return[];const{objects:e}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(e)},this.inserter=async(t,e)=>{var i;const s=this.triggerHandler.nodeDefinition;s&&t.insert({node:{tagName:s.customElement.tagName,attributes:s.mapAttributes(e)},children:[null===(i=e.value)||void 0===i?void 0:i.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!N(t,"user")&&M(t,"user"))).map((t=>this.getGroupCounts(t)));for(const e of await Promise.all(t))Object.assign(this.groupCounts,e)}async getGroupCounts(t){var e;const i=F(t,"user"),s=t.name;try{const t=await this.queryService.execute({limetype:s,responseFormat:{object:{_id:null,[i.name]:{count:{aggregate:{op:o.Count}}}}}});if(!(null===(e=t.objects)||void 0===e?void 0:e.length))return{[s]:{}};const r=this.createGroupCount(t.objects,i.name);return{[s]:r}}catch(e){return console.error("Error fetching group count for limetype: "+t.name,e),{[s]:{}}}}createGroupCount(t,e){const i={};for(const s of t){const{_id:t,[e]:r}=s;i[t]=r.count}return i}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(_)}createSearchListItem(t){const e=this.viewFactoryRegistry.getFactory("search"),i=this.limeObjectService.getObject(t._limetype,t._id);if(!i)return null;const s=e(i,this.contextRegistry.scope({host:this.host})),r=this.getGroupCountComponent(i);return Object.assign(Object.assign({},s),r?{primaryComponent:r}:{})}getGroupCountComponent(t){var e;const i=t.getLimetype(),s=null===(e=this.groupCounts[i.name])||void 0===e?void 0:e[t.id],r=F(i,"user");if(void 0!==s&&r)return{name:"limebb-mention-group-counter",props:{count:s,limetype:r.relation.getLimetype(),helperLabel:this.translator.get("webclient.notification-center.members-will-be-notified")}}}}class bt{constructor(t,e){this.file=t,this.http=e,this.uploadCancelled=!1,this.getUrl=t=>"api/v1/file/"+(null!=t?t:"")}async initialize(){this.uploadService=await this.http.createFileUpload(a.Post,this.getUrl(),this.file),this.progressCallback&&(this.uploadService.onProgress=this.progressCallback)}async upload(){return this.uploadService.upload()}getFileName(){return this.file.name}cancel(){this.uploadService.cancel(),this.uploadCancelled=!0}set onProgress(t){this.progressCallback=t,this.uploadService&&(this.uploadService.onProgress=t)}}var vt=function(t,e,i,s){var r,n=arguments.length,o=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n<3?r(o):n>3?r(e,i,o):r(e,i))||o);return n>3&&o&&Object.defineProperty(e,i,o),o};const gt=t(class extends e{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.imageUploadingChange=i(this,"imageUploadingChange",7),this.allowMentioning=!1,this.contentType="markdown",this.language="en",this.disabled=!1,this.readonly=!1,this.invalid=!1,this.required=!1,this.ui="standard",this.allowResize=!0,this.value="",this.triggerMap={},this.customElements=[],this.allowPasteImages=!1,this.items=[],this.highlightedItemIndex=0,this.isPickerOpen=!1,this.isSearching=!1,this.registeredTriggers=[],this.registeredTriggerMap=this.triggerMap,this.registeredCustomElements=this.customElements,this.activeTrigger=void 0,this.pendingUploads=0,this.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![l,d,u,f,m].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const e={[l]:this.handleEscapeKey,[f]:this.handleEnterOrTabKey,[m]:this.handleEnterOrTabKey,[u]:this.handleArrowKeyPress,[d]:this.handleArrowKeyPress}[t.key];e&&e(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,e,i=0)=>{if(0===this.items.length||i>this.items.length)return e;const s=((t,e,i)=>(e+(t===u?1:-1)+i)%i)(t,e,this.items.length);return this.isListSeparator(this.items[s])?this.findNonSeparatorIndex(t,s,i+1):s},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleTriggerStart=t=>{t.stopPropagation(),this.activeTrigger=t.detail.trigger,this.triggerFunction=t.detail.textEditor,this.isPickerOpen=!0},this.handleTriggerStop=t=>{t.stopPropagation(),this.resetTriggerAndPicker()},this.handleTriggerChange=t=>{var e;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const i=null===(e=this.registeredTriggerMap[t.detail.trigger])||void 0===e?void 0:e.searcher;i&&(this.isSearching=!0,this.debouncedSearchFn(i,this.editorPickerQuery))},this.resetTriggerAndPicker=()=>{this.isPickerOpen=!1,this.activeTrigger=void 0,this.triggerFunction=void 0,this.isSearching=!1,this.highlightedItemIndex=0,this.items=[]},this.handleItemSelection=t=>{var e;let i;if(t instanceof CustomEvent)i=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;i=t}}if(!this.activeTrigger||(null==i?void 0:i.disabled))return;const s=this.registeredTriggerMap[this.activeTrigger];try{s.inserter(this.triggerFunction,i)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(e=this.textEditor)||void 0===e||e.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=P(),this.debouncedSearchFn=function(t,e,i){var s,r,n,o,a,h,c=0,u=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var i=s,n=r;return s=r=void 0,c=e,o=t.apply(n,i)}function m(t){var i=t-h;return void 0===h||i>=e||i<0||l&&t-c>=n}function p(){var t=lt();if(m(t))return b(t);a=setTimeout(p,function(t){var i=e-(t-h);return l?ft(i,n-(t-c)):i}(t))}function b(t){return a=void 0,d&&s?f(t):(s=r=void 0,o)}function v(){var t=lt(),i=m(t);if(s=arguments,r=this,h=t,i){if(void 0===a)return function(t){return c=t,a=setTimeout(p,e),u?f(t):o}(h);if(l)return clearTimeout(a),a=setTimeout(p,e),f(h)}return void 0===a&&(a=setTimeout(p,e)),o}return e=B(e)||0,S(i)&&(u=!!i.leading,n=(l="maxWait"in i)?dt(B(i.maxWait)||0,e):n,d="trailing"in i?!!i.trailing:d),v.cancel=function(){void 0!==a&&clearTimeout(a),c=0,s=h=r=a=void 0},v.flush=function(){return void 0===a?o:b(lt())},v}((async(t,e)=>{try{const i=await t(e);if(e!==this.editorPickerQuery||!this.activeTrigger)return;this.items=i}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,e,i,s;if(this.draftIdentifier){const r=null!==(e=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==e?e:"no-limeobject",n=null!==(s=null===(i=this.context)||void 0===i?void 0:i.limetype)&&void 0!==s?s:"no-limetype";this.textEditorInnerId=["text-editor-draft",n,r,this.draftIdentifier].join("-")}this.textEditorInnerId&&(document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("beforeunload",this.handleBeforeUnload))}componentWillLoad(){this.allowMentioning&&this.registerMentions(),this.registerTriggers(),this.loadDraft()}disconnectedCallback(){document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("mousedown",this.handleMouseClick),this.saveDraft(),this.host&&(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0})),this.debouncedSearchFn&&this.debouncedSearchFn.cancel&&this.debouncedSearchFn.cancel()}registerMentions(){const t=new pt(this.platform,this.context,this.searchableLimetypes,this.host),e=t.triggerHandler.nodeDefinition;e&&(this.registeredCustomElements.push(e.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const e=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?e.noItemsFoundMessage:e.emptySearchMessage}setupHandlers(){this.isPickerOpen?(this.host.addEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.addEventListener("keydown",this.handleKeyPress,{capture:!0}),document.addEventListener("mousedown",this.handleMouseClick)):(this.host.removeEventListener("keyup",this.handleKeyPress,{capture:!0}),this.host.removeEventListener("keydown",this.handleKeyPress,{capture:!0}),document.removeEventListener("mousedown",this.handleMouseClick))}isListSeparator(t){return"separator"in t&&!0===t.separator}render(){return[s("limel-text-editor",{key:"7c5597fd2affe6f7a625c3fabfbaaef70ac41b00",ref:t=>this.textEditor=t,tabindex:this.disabled?-1:0,value:this.value,contentType:this.contentType,customElements:this.registeredCustomElements,"aria-disabled":this.disabled,language:this.language,triggers:this.registeredTriggers,onTriggerStart:this.handleTriggerStart,onTriggerStop:this.handleTriggerStop,onTriggerChange:this.handleTriggerChange,inlineImages:this.inlineImages,ui:this.ui,allowResize:this.allowResize,required:this.required,disabled:this.disabled,readonly:this.readonly,helperText:this.helperText,placeholder:this.placeholder,label:this.label,invalid:this.invalid}),this.renderPicker()]}renderPicker(){if(this.isPickerOpen)return s("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},s("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:mt(this.items,this.highlightedItemIndex),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}))}get inlineImages(){return Object.assign({tagName:"limebb-inline-image",getUrl:t=>R(this.appName,t)},this.allowPasteImages&&{upload:t=>this.uploadImage(t)})}async uploadImage(t){0===this.pendingUploads&&this.imageUploadingChange.emit(!0),this.pendingUploads++;try{return await this.uploadFile(t)}finally{this.pendingUploads--,0===this.pendingUploads&&this.imageUploadingChange.emit(!1)}}async uploadFile(t){if(t.size>52428800)throw Error("Image exceeds the maximum file size");const e=this.platform.get(n.Http),i=new bt(t,e);await i.initialize();const s=await i.upload();if(!s.id)throw Error("File upload response is missing an id");return s.id+""}loadDraft(){if(!this.userDataService||!this.textEditorInnerId)return;if(this.value)return;const t=this.userDataService.get(this.textEditorInnerId);t&&this.change.emit(t)}saveDraft(){var t,e,i,s;if(!this.textEditorInnerId)return;const r=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(e=this.userDataService)||void 0===e?void 0:e.get(this.textEditorInnerId);r&&r!==n?null===(i=this.userDataService)||void 0===i||i.set(this.textEditorInnerId,r):!r&&n&&(null===(s=this.userDataService)||void 0===s||s.set(this.textEditorInnerId,void 0))}get userDataService(){return this.platform.get(n.UserDataRepository)}static get delegatesFocus(){return!0}get host(){return this}static get watchers(){return{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}}static get style(){return":host(limebb-text-editor){display:block;width:100%;min-width:5rem;min-height:5rem;height:100%;max-height:var(--text-editor-max-height, calc(100svh - (env(safe-area-inset-top) + env(safe-area-inset-bottom)) - 4rem))}"}},[17,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],draftIdentifier:[1,"draft-identifier"],triggerMap:[16],customElements:[16],allowPasteImages:[4,"allow-paste-images"],items:[32],highlightedItemIndex:[32],editorPickerQuery:[32],searchableLimetypes:[32],appName:[32],isPickerOpen:[32],isSearching:[32]},void 0,{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}]);vt([h({map:[function(t){return Object.values(t).filter((t=>N(t,"user")||M(t,"user")))}]})],gt.prototype,"searchableLimetypes",void 0),vt([c()],gt.prototype,"appName",void 0);const yt=gt,jt=function(){"undefined"!=typeof customElements&&["limebb-text-editor","limebb-empty-state","limebb-text-editor-picker"].forEach((t=>{switch(t){case"limebb-text-editor":customElements.get(r(t))||customElements.define(r(t),gt);break;case"limebb-empty-state":customElements.get(r(t))||U();break;case"limebb-text-editor-picker":customElements.get(r(t))||D()}}))};export{yt as LimebbTextEditor,jt as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,createEvent as i,h as s,transformTag as r}from"@stencil/core/internal/client";import{o as a}from"./index.esm.js";import{o as n,c as o,a as l}from"./filter-operators.js";import{d as h}from"./filter-condition-picker.js";const u=[{value:"string",text:"Text"},{value:"number",text:"Number"},{value:"date",text:"Date"},{value:"datetime",text:"Date & time"},{value:"time",text:"Time"}],d=[a.EQUALS,a.NOT_EQUALS,a.LESS,a.LESS_OR_EQUAL,a.GREATER,a.GREATER_OR_EQUAL],c=n(d),m={string:"string",number:"integer",date:"date",datetime:"date",time:"time"},v="__relative_offset__",p="__specific__",f=[{value:"$now",text:"Now"},{value:"$today",text:"Today"},{value:"$tomorrow",text:"Tomorrow"},{value:"$yesterday",text:"Yesterday"},{value:"$this_week",text:"This week"},{value:"$this_month",text:"This month"},{value:"$this_quarter",text:"This quarter"},{value:"$this_year",text:"This year"}],b=new Set(f.map((e=>e.value))),x=[{value:"next",text:"Next"},{value:"previous",text:"Previous"}],y=[{value:"day",text:"days"},{value:"week",text:"weeks"},{value:"month",text:"months"},{value:"quarter",text:"quarters"},{value:"year",text:"years"}],g=/^\$(next|previous)_(day|week|month|quarter|year)\((\d+)\)$/,k=new Set(["date","datetime","time"]),w=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.change=i(this,"change",7),this.value={},this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1,this.handleTypeChange=e=>{var t,i;e.stopPropagation(),this.resetOperandState(),this.emit(this.currentOperator,void 0,null!==(i=null===(t=e.detail)||void 0===t?void 0:t.value)&&void 0!==i?i:"string")},this.handleConditionChange=e=>{e.stopPropagation();const t=o(e.detail);t&&this.emit(t,this.value.operand)},this.handleScalarOperandChange=e=>{e.stopPropagation(),this.emit(this.currentOperator,this.parseScalarOperand(e.detail))},this.handleOperandKeyChange=e=>{var t;e.stopPropagation();const i=this.currentOperator,s=null===(t=e.detail)||void 0===t?void 0:t.value;if(this.operandKey=s,s!==v)return s===p?(this.specificDate||(this.specificDate=new Date),void this.emit(i,this.formatSpecific(this.specificDate))):void this.emit(i,s||void 0);this.emit(i,this.relativeOffsetToken())},this.handleDirectionChange=e=>{var t,i;e.stopPropagation(),this.direction=null!==(i=null===(t=e.detail)||void 0===t?void 0:t.value)&&void 0!==i?i:"next",this.emitRelativeOffset()},this.handleUnitChange=e=>{var t,i;e.stopPropagation(),this.unit=null!==(i=null===(t=e.detail)||void 0===t?void 0:t.value)&&void 0!==i?i:"week",this.emitRelativeOffset()},this.handleCountChange=e=>{e.stopPropagation(),this.countInput=e.detail+"";const t=Number.parseInt(this.countInput,10);Number.isNaN(t)||t<1?this.countInvalid=!0:(this.countInvalid=!1,this.count=t,this.emitRelativeOffset())},this.handleSpecificDateChange=e=>{e.stopPropagation();const t=this.currentOperator,i=e.detail instanceof Date?e.detail:void 0;this.specificDate=i,this.emit(t,i?this.formatSpecific(i):void 0)}}componentWillLoad(){this.syncFromValue(this.value)}onValueChange(e){this.syncFromValue(e)}get valueType(){var e;return null!==(e=this.value.valueType)&&void 0!==e?e:"string"}get currentOperator(){var e;return null!==(e=this.value.operator)&&void 0!==e?e:d[0]}render(){const e=u.find((e=>e.value===this.valueType));return s("div",{key:"adecd47e558632637dec3506429c285dcddf7746",class:"rule"},s("limel-select",{key:"41032f0494cccf8ab9ef429e0648e84b70de7a80",class:"type-select",label:"Compare as",options:u,value:e,onChange:this.handleTypeChange}),s("limebb-filter-condition-picker",{key:"118a34ec6bf0b057ad504690ea2bbb50295697ef",class:"operator-select",platform:this.platform,propertyType:m[this.valueType],conditions:c,value:l(this.currentOperator),onChange:this.handleConditionChange}),this.renderOperand())}renderOperand(){return k.has(this.valueType)?this.renderTemporalOperand():this.renderScalarInput()}renderScalarInput(){return s("limel-input-field",{class:"operand-input",label:"Compared with",type:"number"===this.valueType?"number":"text",value:void 0===this.value.operand?"":this.value.operand+"",onChange:this.handleScalarOperandChange})}renderTemporalOperand(){const e=this.operandOptions(),t=e.find((e=>e.value===this.operandKey));return[s("limel-select",{key:"operand-select",class:"operand-select",label:"Compared with",options:e,value:t,onChange:this.handleOperandKeyChange}),this.renderTemporalSubControl()]}operandOptions(){if("time"===this.valueType)return[{value:"$now",text:"Now"},{value:p,text:"Specific time…"}];const e="datetime"===this.valueType?"Specific date & time…":"Specific date…";return[..."date"===this.valueType?f.filter((e=>"$now"!==e.value)):f,{value:v,text:"Relative offset…"},{value:p,text:e}]}renderTemporalSubControl(){return this.operandKey===v?this.renderOffsetBuilder():this.operandKey===p?this.renderDatePicker():null}renderOffsetBuilder(){const e=x.find((e=>e.value===this.direction)),t=y.find((e=>e.value===this.unit));return s("div",{key:"offset-builder",class:"offset-builder"},s("limel-select",{class:"offset-direction",options:x,value:e,onChange:this.handleDirectionChange}),s("limel-input-field",{class:"offset-count",label:"Amount",type:"number",required:!0,invalid:this.countInvalid,value:this.countInput,onChange:this.handleCountChange}),s("limel-select",{class:"offset-unit",options:y,value:t,onChange:this.handleUnitChange}))}renderDatePicker(){return s("limel-date-picker",{key:"specific-picker",class:"operand-picker",label:"Compared with",type:this.valueType,value:this.specificDate,onChange:this.handleSpecificDateChange})}emitRelativeOffset(){this.emit(this.currentOperator,this.relativeOffsetToken())}relativeOffsetToken(){return`$${this.direction}_${this.unit}(${this.count})`}parseScalarOperand(e){const t=e+"";if(""===t.trim())return;if("number"!==this.valueType)return t;const i=Number(t);return Number.isNaN(i)?void 0:i}formatSpecific(e){return"datetime"===this.valueType?e.toISOString():"time"===this.valueType?`${$(e.getHours())}:${$(e.getMinutes())}:${$(e.getSeconds())}`:`${e.getFullYear()}-${$(e.getMonth()+1)}-${$(e.getDate())}`}emit(e,t,i=this.valueType){const s={valueType:i};e&&(s.operator=e),void 0!==t&&(s.operand=t),this.change.emit(s)}resetOperandState(){this.operandKey=void 0,this.specificDate=void 0,this.direction="next",this.unit="week",this.count=1,this.countInput="1",this.countInvalid=!1}syncFromValue(e){const t=null==e?void 0:e.operand;if("string"!=typeof t||""===t)return;if(!k.has(this.valueType))return void(this.operandKey=void 0);const i=g.exec(t);if(i){const[,e,t,s]=i;return this.operandKey=v,this.direction=e,this.unit=t,this.count=Number(s),this.countInput=s,void(this.countInvalid=!1)}b.has(t)?this.operandKey=t:(this.operandKey=p,this.specificDate=this.parseSpecific(t))}parseSpecific(e){const t=new Date(this.specificDateText(e));return Number.isNaN(t.getTime())?void 0:t}specificDateText(e){return"time"===this.valueType?"1970-01-01T"+e:"date"===this.valueType?e+"T00:00:00":e}static get watchers(){return{value:[{onValueChange:0}]}}static get style(){return":host{display:block}.rule{display:grid;gap:0.5rem;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr))}.offset-builder{display:flex;gap:0.5rem;align-items:flex-end;grid-column:1/-1}.offset-builder .offset-count{max-width:6rem}"}},[1,"limebb-value-comparison-editor",{value:[16],platform:[16],operandKey:[32],direction:[32],unit:[32],count:[32],countInput:[32],countInvalid:[32],specificDate:[32]},void 0,{value:[{onValueChange:0}]}]);function $(e){return(e+"").padStart(2,"0")}const T=w,C=function(){"undefined"!=typeof customElements&&["limebb-value-comparison-editor","limebb-filter-condition-picker"].forEach((e=>{switch(e){case"limebb-value-comparison-editor":customElements.get(r(e))||customElements.define(r(e),w);break;case"limebb-filter-condition-picker":customElements.get(r(e))||h()}}))};export{T as LimebbValueComparisonEditor,C as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as n,a as r}from"./index.esm.js";function o(n){var r;return(o=(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.color)||"rgb(var(--color-gray-default))").startsWith("lime-")?`var(--${o})`:o;var o}function t(n){var r;return{name:(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.icon)||"decision",color:o(n)}}function i(n,r){return n.label===r}function e(n,r){return Object.values(n.properties).find((n=>n&&n.relation&&i(n.relation.getLimetype(),r)))}function
|
|
1
|
+
import{i as n,a as r}from"./index.esm.js";function o(n){var r;return(o=(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.color)||"rgb(var(--color-gray-default))").startsWith("lime-")?`var(--${o})`:o;var o}function t(n){var r;return{name:(null===(r=null==n?void 0:n.ui)||void 0===r?void 0:r.icon)||"decision",color:o(n)}}function i(n,r){return n.label===r}function e(o){return n(o)&&!r(o)}function u(n,r){return Object.values(n.properties).find((n=>n&&n.relation&&i(n.relation.getLimetype(),r)))}function l(n,r){const o=u(n,r);return!!o&&e(o)}function v(n){var r,o,t;const{targetLimetype:i,currentLimetype:e,contextLimetypeName:u,contextId:l,propertyName:v}=n;if(i&&u&&l){if(v){const n=null===(o=null===(r=null==e?void 0:e.getProperty(v))||void 0===r?void 0:r.relation)||void 0===o?void 0:o.getBackreference();if(n)return n.name}return null===(t=Object.values(i.properties).find((n=>{var r;return(null===(r=n.relation)||void 0===r?void 0:r.getLimetype().name)===u})))||void 0===t?void 0:t.name}}export{v as a,i as b,u as c,t as g,l as h,e as i}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as i,h as r,transformTag as s}from"@stencil/core/internal/client";import{I as o,n}from"./index.esm.js";import{i as l,g as c}from"./limetype.js";function a(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,r]of Object.entries(i)){const i=e[t];i&&(e[r]=i,delete e[t])}return e}function h(t,e,i){if(!i||!e||!t)return;const r=i.split(".");let s,o=t[e];for(const t of r){if(!o)return;if(s=a(o)[t],!s)return;s.relation&&(o=s.relation.getLimetype())}return s}function u(t,e,i){if(!i||!e||!t)return{property:void 0};const r=i.split(".");let s,o=t[e];for(let t=0;t<r.length;t++){const e=r[t];if(!o)return{property:void 0};if(s=a(o)[e],!s)return{property:void 0,error:`Property '${e}' does not exist on limetype '${o.name}'`};if("hasmany"===s.type||"hasandbelongstomany"===s.type)return{property:void 0,error:`Cannot filter on many-relation '${r.slice(0,t+1).join(".")}'. Use a related limetype's filter instead.`};s.relation&&(o=s.relation.getLimetype())}return{property:s}}const p=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.loadMenuItems(),this.isOpen=!0)},this.handleChipSetBlur=()=>{var t;const e=document.activeElement;(null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.startsWith("LIMEL-MENU"))||(this.isOpen=!1,this.navigationPath="")},this.handleSelect=t=>{t.stopPropagation();const e=t.detail.value;if(!e)return;const{error:i}=u(this.limetypes,this.limetype,e);i?console.warn("property-selector rejected a property path",{limetype:this.limetype,path:e,error:i}):(this.change.emit(e),this.isOpen=!1,this.navigationPath="")},this.handleNavigateMenu=t=>{var e,i;t.stopPropagation(),this.navigationPath=null!==(i=null===(e=t.detail)||void 0===e?void 0:e.value)&&void 0!==i?i:""},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 r("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},r("div",{slot:"trigger"},r("div",{onClick:this.handleChipSetWrapperClick},r("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,onStopEdit:this.handleChipSetBlur}))))}loadMenuItems(){const t=this.limetypes[this.limetype];this.menuItems=t?this.createMenuItems(t,""):[]}createMenuItems(t,e){const i=Object.entries(a(t)).filter((([,t])=>!l(t))).map((([t,i])=>this.createPropertyItem(i,d(e,t)))).sort(((t,e)=>this.collator.compare(t.text,e.text)));return 0===i.length?[{text:"No available properties",value:"",disabled:!0}]:i}createPropertyItem(t,e){return{text:this.getPropertyText(t,e),secondaryText:this.getSecondaryText(t),icon:this.getIconForProperty(t),value:e,items:this.createSubMenuLoader(t,e)}}createSubMenuLoader(t,e){var i;const r=null===(i=t.relation)||void 0===i?void 0:i.getLimetype();if(r)return async()=>this.createRelationSubMenu(t,e,r)}createRelationSubMenu(t,e,i){const r=this.createMenuItems(i,e);return[{text:this.getPropertyText(t,e),secondaryText:"Select this relation",icon:this.getIconForProperty(t),value:e},{separator:!0},...r]}getPropertyText(t,e){return t.localname||e.split(".").at(-1)||e}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?c(t.relation.getLimetype()):{name:"dot_circle",color:"rgb(var(--color-gray-default))"}}getChipsForPath(t){if(!t)return[];const e=t.split("."),i=[];let r=this.limetypes[this.limetype],s="";for(const t of e){s=d(s,t);const e=a(r)[t];e&&(i.push({id:s,text:e.localname||t,icon:this.getIconForProperty(e),value:s}),e.relation&&(r=e.relation.getLimetype()))}return i}static get delegatesFocus(){return!0}static get style(){return":host(limebb-property-selector){display:block}limel-menu{display:block;width:100%}"}},[17,"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(t,e,i,r){var s,o=arguments.length,n=o<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--)(s=t[l])&&(n=(o<3?s(n):o>3?s(e,i,n):s(e,i))||n);o>3&&n&&Object.defineProperty(e,i,n)}([o()],p.prototype,"limetypes",void 0);const d=(t,e)=>t?`${t}.${e}`:e;function m(){"undefined"!=typeof customElements&&["limebb-property-selector"].forEach((t=>{"limebb-property-selector"===t&&(customElements.get(s(t))||customElements.define(s(t),p))}))}export{p as P,a,m as d,h as g,u as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,transformTag as o}from"@stencil/core/internal/client";import{d as r}from"./response-format-item.js";import{d as n}from"./property-selector.js";function l(t,e,s){if(null===s)return void t.push({path:e});const i=s,o="_alias"in i,r="#description"in i,n=Object.keys(i).filter((t=>"_alias"!==t&&"#description"!==t));if(0!==n.length)if(o||r){const s={};for(const t of n)s[t]=i[t];t.push(...a(s,e))}else t.push(...a(s,e));else{const s=i._alias,o=i["#description"];t.push(s||o?{path:e,alias:s,description:o}:{path:e})}}function a(t,e=""){if(!t)return[];const s=[];for(const[i,o]of Object.entries(t))"object"==typeof o&&l(s,e?`${e}.${i}`:i,o);return s}
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as e,createEvent as s,h as i,transformTag as o}from"@stencil/core/internal/client";import{d as r}from"./response-format-item.js";import{d as n}from"./property-selector.js";function l(t,e,s){if(null===s)return void t.push({path:e});const i=s,o="_alias"in i,r="#description"in i,n=Object.keys(i).filter((t=>"_alias"!==t&&"#description"!==t));if(0!==n.length)if(o||r){const s={};for(const t of n)s[t]=i[t];t.push(...a(s,e))}else t.push(...a(s,e));else{const s=i._alias,o=i["#description"];t.push(s||o?{path:e,alias:s,description:o}:{path:e})}}function a(t,e=""){if(!t)return[];const s=[];for(const[i,o]of Object.entries(t))"object"==typeof o&&l(s,e?`${e}.${i}`:i,o);return s}const c="_id",m=new Set(["_alias","#description"]);function p(t){return!(!t||"object"!=typeof t)&&Object.keys(t).some((t=>!m.has(t)))}function d(t,e,s){const i=t[e];if(p(i))return void d(i,"_id",s);const o={};s.alias&&""!==s.alias.trim()&&(o._alias=s.alias),s.description&&""!==s.description.trim()&&(o["#description"]=s.description),t[e]=Object.keys(o).length>0?o:null}function h(t,e){const s=t[e];if(void 0===s)return t[e]={},t[e];if(p(s))return s;const i={[c]:s};return t[e]=i,i}const u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.change=s(this,"change",7),this.label="Properties",this.items=[],this.handleItemChange=t=>e=>{e.stopPropagation();const s=[...this.items];null===e.detail?s.splice(t,1):s[t]=e.detail,this.items=s,this.emitChange()},this.handleAddProperty=()=>{this.items=[...this.items,{path:""}],this.emitChange()}}componentWillLoad(){this.items=this.value?this.isEmptyResponseFormat(this.value)?[]:this.value.object?a(this.value.object):[]:[{path:"_id"}]}componentWillUpdate(){if(this.value)if(this.value.object&&!this.isEmptyResponseFormat(this.value)){const t=a(this.value.object);(t.length!==this.items.length||!t.every(((t,e)=>{const s=this.items[e];return s&&t.path===s.path&&t.alias===s.alias&&t.description===s.description})))&&(this.items=t)}else this.items.length>0&&(this.items=[])}render(){return this.limetype?0===this.items.length?i("div",{class:"response-format-editor"},i("h4",{class:"header"},this.label),i("div",{class:"empty-state"},i("p",{class:"empty-state-message"},"No properties selected. The response will return empty objects."),i("limel-button",{label:"Add Property",icon:"plus_math",onClick:this.handleAddProperty}))):i("div",{class:"response-format-editor"},i("limel-header",{subheading:this.label},this.renderPropertyCount()),i("div",{class:"property-list"},this.items.map(((t,e)=>this.renderItem(t,e))),i("limel-button",{label:"Property",disabled:this.items.some((t=>!t.path||""===t.path.trim())),icon:{name:"plus_math",title:"Add"},onClick:this.handleAddProperty}))):i("div",{class:"empty-state"},i("p",null,"Select a limetype to choose properties"))}renderPropertyCount(){return[i("limel-badge",{slot:"actions",id:"counter-badge",label:this.items.length.toString()}),i("limel-tooltip",{elementId:"counter-badge",slot:"actions",label:"Number of selected properties"})]}renderItem(t,e){return i("limebb-lime-query-response-format-item",{key:`${t.path}-${e}`,class:"property-item",platform:this.platform,context:this.context,limetype:this.limetype,item:t,onItemChange:this.handleItemChange(e)})}emitChange(){const t=function(t){const e={};for(const s of t){const t=s.path.split(".");let i=e;for(let e=0;e<t.length;e++){const o=t[e];e===t.length-1?d(i,o,s):i=h(i,o)}}return e}(this.items);this.change.emit({object:t})}isEmptyResponseFormat(t){return!(!t||0!==Object.keys(t).length&&(!t.object||0!==Object.keys(t.object).length||t.aggregates))}static get style(){return":host(limebb-lime-query-response-format-editor){display:block;width:100%}.response-format-editor{display:flex;flex-direction:column;padding:1rem 0}limel-badge[slot=actions]{--badge-background-color:rgb(var(--contrast-200));margin-right:0.25rem}.property-list{display:flex;flex-direction:column;border-radius:0 0 0.75rem 0.75rem;padding:0.25rem;background-color:rgb(var(--contrast-300))}.empty-state{padding:2rem;text-align:center;color:rgb(var(--contrast-700));font-style:italic}.empty-state p{margin:0}.empty-state .empty-state-message{margin-bottom:1rem;font-size:0.875rem}.empty-state limel-button{margin:0 auto;max-width:200px}"}},[1,"limebb-lime-query-response-format-editor",{platform:[16],context:[16],limetype:[1],value:[16],label:[1],items:[32]}]);function b(){"undefined"!=typeof customElements&&["limebb-lime-query-response-format-editor","limebb-lime-query-response-format-item","limebb-property-selector"].forEach((t=>{switch(t){case"limebb-lime-query-response-format-editor":customElements.get(o(t))||customElements.define(o(t),u);break;case"limebb-lime-query-response-format-item":customElements.get(o(t))||r();break;case"limebb-property-selector":customElements.get(o(t))||n()}}))}export{u as R,b as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as i,HTMLElement as e,h as t,transformTag as r}from"@stencil/core/internal/client";const
|
|
1
|
+
import{proxyCustomElement as i,HTMLElement as e,h as t,transformTag as r}from"@stencil/core/internal/client";const n=i(class extends e{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow()}render(){return t("div",{key:"bf1a80f35a31a497b05b89b0e9d4291ed78bdcd6",class:"typing-ellipsis"},t("div",{key:"6f0a9f966f53f5459c04c56e464ea1b2e0590619",class:"circle"}),t("div",{key:"155d3a3e19f419d7f385b9dd221f14f78af207b4",class:"circle"}),t("div",{key:"22d53849e2963f4a2505b9746d5a0660cff23898",class:"circle"}))}static get style(){return"*{box-sizing:border-box}.typing-ellipsis{position:relative;display:inline-flex;align-items:center;gap:0.25rem;height:1.5rem;padding:0 0.5rem;border-radius:10rem;border-bottom-left-radius:0.125rem;background-color:rgb(var(--contrast-600), 0.4);backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem)}.circle{position:relative;height:0.5rem;width:0.5rem;background:rgb(var(--contrast-800));border-radius:50%}.circle:first-of-type{animation:ellipsis-typing-indicator 1.2s infinite}.circle:nth-of-type(2){animation:ellipsis-typing-indicator 1.2s infinite 0.2s}.circle:nth-of-type(3){animation:ellipsis-typing-indicator 1.2s infinite 0.4s}@keyframes ellipsis-typing-indicator{0%{top:0}6.25%{top:-1px}12.5%{top:0;background:rgb(var(--contrast-1000))}18.75%{top:1px}25%{top:0}}"}},[1,"limebb-typing-indicator"]);function s(){"undefined"!=typeof customElements&&["limebb-typing-indicator"].forEach((i=>{"limebb-typing-indicator"===i&&(customElements.get(r(i))||customElements.define(r(i),n))}))}export{n as T,s as d}
|
|
@@ -2,7 +2,7 @@ const NAMESPACE = 'lime-crm-building-blocks';
|
|
|
2
2
|
const BUILD = /* lime-crm-building-blocks */ { hotModuleReplacement: false, hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, state: true, updatable: true};
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.44.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
|
|
@@ -93,7 +93,9 @@ var setErrorHandler = (handler) => customError = handler;
|
|
|
93
93
|
|
|
94
94
|
// src/client/client-load-module.ts
|
|
95
95
|
var cmpModules = /* @__PURE__ */ new Map();
|
|
96
|
+
var failedLoadAttempts = /* @__PURE__ */ new Map();
|
|
96
97
|
var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
98
|
+
var _a;
|
|
97
99
|
const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
|
|
98
100
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
99
101
|
if (!bundleId) {
|
|
@@ -103,21 +105,28 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
103
105
|
if (module) {
|
|
104
106
|
return module[exportName];
|
|
105
107
|
}
|
|
108
|
+
const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
|
|
109
|
+
const cacheBustParams = [
|
|
110
|
+
retryCount > 0 ? `s-retry=${retryCount}` : "",
|
|
111
|
+
""
|
|
112
|
+
].filter(Boolean).join("&");
|
|
106
113
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/
|
|
107
114
|
return import(
|
|
108
115
|
/* @vite-ignore */
|
|
109
116
|
/* webpackInclude: /\.entry\.js$/ */
|
|
110
117
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
111
118
|
/* webpackMode: "lazy" */
|
|
112
|
-
`./${bundleId}.entry.js${""}`
|
|
119
|
+
`./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
|
|
113
120
|
).then(
|
|
114
121
|
(importedModule) => {
|
|
115
122
|
{
|
|
123
|
+
failedLoadAttempts.delete(bundleId);
|
|
116
124
|
cmpModules.set(bundleId, importedModule);
|
|
117
125
|
}
|
|
118
126
|
return importedModule[exportName];
|
|
119
127
|
},
|
|
120
128
|
(e) => {
|
|
129
|
+
failedLoadAttempts.set(bundleId, retryCount + 1);
|
|
121
130
|
consoleError(e, hostRef.$hostElement$);
|
|
122
131
|
}
|
|
123
132
|
);
|
|
@@ -128,6 +137,8 @@ var styles = /* @__PURE__ */ new Map();
|
|
|
128
137
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
129
138
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
130
139
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
140
|
+
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
141
|
+
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
131
142
|
var win = typeof window !== "undefined" ? window : {};
|
|
132
143
|
var plt = {
|
|
133
144
|
$flags$: 0,
|
|
@@ -171,6 +182,10 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
|
|
|
171
182
|
var queuePending = false;
|
|
172
183
|
var queueDomReads = [];
|
|
173
184
|
var queueDomWrites = [];
|
|
185
|
+
var scheduleFlush = () => {
|
|
186
|
+
var _a;
|
|
187
|
+
return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
|
|
188
|
+
};
|
|
174
189
|
var queueTask = (queue, write) => (cb) => {
|
|
175
190
|
queue.push(cb);
|
|
176
191
|
if (!queuePending) {
|
|
@@ -178,7 +193,7 @@ var queueTask = (queue, write) => (cb) => {
|
|
|
178
193
|
if (write && plt.$flags$ & 4 /* queueSync */) {
|
|
179
194
|
nextTick(flush);
|
|
180
195
|
} else {
|
|
181
|
-
|
|
196
|
+
scheduleFlush();
|
|
182
197
|
}
|
|
183
198
|
}
|
|
184
199
|
};
|
|
@@ -197,7 +212,7 @@ var flush = () => {
|
|
|
197
212
|
{
|
|
198
213
|
consume(queueDomWrites);
|
|
199
214
|
if (queuePending = queueDomReads.length > 0) {
|
|
200
|
-
|
|
215
|
+
scheduleFlush();
|
|
201
216
|
}
|
|
202
217
|
}
|
|
203
218
|
};
|
|
@@ -395,6 +410,11 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
395
410
|
} else if (child != null && typeof child !== "boolean") {
|
|
396
411
|
if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
|
|
397
412
|
child = String(child);
|
|
413
|
+
} else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
|
|
414
|
+
{
|
|
415
|
+
consoleError("Invalid vNode child");
|
|
416
|
+
}
|
|
417
|
+
continue;
|
|
398
418
|
}
|
|
399
419
|
if (simple && lastSimple) {
|
|
400
420
|
vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
@@ -667,7 +687,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
667
687
|
}
|
|
668
688
|
}
|
|
669
689
|
if (newValue == null || newValue === false) {
|
|
670
|
-
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
690
|
+
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
671
691
|
if (xlink) {
|
|
672
692
|
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
673
693
|
} else {
|
|
@@ -684,6 +704,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
684
704
|
}
|
|
685
705
|
}
|
|
686
706
|
};
|
|
707
|
+
var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
|
|
708
|
+
var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
|
|
687
709
|
var parseClassListRegex = /\s/;
|
|
688
710
|
var parseClassList = (value) => {
|
|
689
711
|
if (typeof value === "object" && value && "baseVal" in value) {
|
|
@@ -997,9 +1019,7 @@ var flushQueuedRefCallbacks = () => {
|
|
|
997
1019
|
}
|
|
998
1020
|
};
|
|
999
1021
|
var insertBefore = (parent, newNode, reference, isInitialLoad) => {
|
|
1000
|
-
|
|
1001
|
-
return parent.__insertBefore(newNode, reference);
|
|
1002
|
-
} else {
|
|
1022
|
+
{
|
|
1003
1023
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1004
1024
|
}
|
|
1005
1025
|
};
|
|
@@ -1267,6 +1287,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1267
1287
|
};
|
|
1268
1288
|
|
|
1269
1289
|
// src/runtime/proxy-component.ts
|
|
1290
|
+
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
1270
1291
|
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1271
1292
|
var _a, _b;
|
|
1272
1293
|
const prototype = Cstr.prototype;
|
|
@@ -1388,7 +1409,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1388
1409
|
return;
|
|
1389
1410
|
}
|
|
1390
1411
|
const propFlags = members.find(([m]) => m === propName);
|
|
1391
|
-
const
|
|
1412
|
+
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
1413
|
+
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
1414
|
+
if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
|
|
1415
|
+
// one is always external
|
|
1416
|
+
!isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1392
1419
|
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1393
1420
|
if (isBooleanTarget) {
|
|
1394
1421
|
newValue = newValue === null || newValue === "false" ? false : true;
|
|
@@ -1420,10 +1447,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1420
1447
|
|
|
1421
1448
|
// src/runtime/initialize-component.ts
|
|
1422
1449
|
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1450
|
+
var _a;
|
|
1423
1451
|
let Cstr;
|
|
1424
1452
|
try {
|
|
1425
1453
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1426
1454
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1455
|
+
hostRef.$flags$ &= -1025 /* hasFailedLoad */;
|
|
1427
1456
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1428
1457
|
if (bundleId) {
|
|
1429
1458
|
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
@@ -1435,6 +1464,11 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1435
1464
|
Cstr = CstrImport;
|
|
1436
1465
|
}
|
|
1437
1466
|
if (!Cstr) {
|
|
1467
|
+
hostRef.$flags$ &= -33 /* hasInitializedComponent */;
|
|
1468
|
+
hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
|
|
1469
|
+
if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
|
|
1470
|
+
hostRef.$flags$ |= 1024 /* hasFailedLoad */;
|
|
1471
|
+
}
|
|
1438
1472
|
throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
|
|
1439
1473
|
}
|
|
1440
1474
|
if (!Cstr.isProxied) {
|
|
@@ -1496,7 +1530,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1496
1530
|
hostRef.$onRenderResolve$();
|
|
1497
1531
|
hostRef.$onRenderResolve$ = void 0;
|
|
1498
1532
|
}
|
|
1499
|
-
if (hostRef.$onReadyResolve$) {
|
|
1533
|
+
if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
|
|
1500
1534
|
hostRef.$onReadyResolve$(elm);
|
|
1501
1535
|
}
|
|
1502
1536
|
}
|
|
@@ -1543,6 +1577,8 @@ var connectedCallback = (elm) => {
|
|
|
1543
1577
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1544
1578
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1545
1579
|
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1580
|
+
} else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
|
|
1581
|
+
setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
|
|
1546
1582
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1547
1583
|
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1548
1584
|
}
|
|
@@ -1665,7 +1701,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1665
1701
|
}
|
|
1666
1702
|
disconnectedCallback() {
|
|
1667
1703
|
plt.jmp(() => disconnectedCallback(this));
|
|
1668
|
-
|
|
1704
|
+
nextTick(() => {
|
|
1669
1705
|
var _a3;
|
|
1670
1706
|
const hostRef = getHostRef(this);
|
|
1671
1707
|
if (!hostRef) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as setErrorHandler, g as getElement } from './index-
|
|
1
|
+
import { a as setErrorHandler, g as getElement } from './index-COtSgrC5.js';
|
|
2
2
|
|
|
3
3
|
//#region src/core/platform.ts
|
|
4
4
|
var n = { };
|
|
@@ -721,7 +721,7 @@ function et(e) {
|
|
|
721
721
|
//#region src/commandbus/types.ts
|
|
722
722
|
n.CommandBus = "commandBus";
|
|
723
723
|
//#endregion
|
|
724
|
-
//#region \0@oxc-project+runtime@0.
|
|
724
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorate.js
|
|
725
725
|
function W(e, t, n, r) {
|
|
726
726
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
727
727
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { C as COLOR_PALETTES, g as getColorPalette } from './color-palettes-1N3bZuHj.js';
|
|
2
2
|
export { F as FALLBACK_CONDITION_ICON, a as FILTER_CONDITION_ICONS, b as FILTER_CONDITION_LABEL_KEYS, d as getConditionsForPropertyType, g as getFilterConditionIcon, c as getFilterConditionLabelKey } from './filter-condition-icons-C_y3-T4Q.js';
|
|
3
|
-
export { c as conditionToOperator, a as operatorToCondition, o as operatorsToConditions } from './filter-operators-
|
|
3
|
+
export { c as conditionToOperator, a as operatorToCondition, o as operatorsToConditions } from './filter-operators-u3T1PKhm.js';
|
|
4
4
|
import '@lundalogik/lime-icons8';
|
|
5
|
-
import './index.esm-
|
|
6
|
-
import './index-
|
|
5
|
+
import './index.esm-B9D_MXA6.js';
|
|
6
|
+
import './index-COtSgrC5.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-COtSgrC5.js';
|
|
2
|
+
export { s as setNonce } from './index-COtSgrC5.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.44.2 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
var patchBrowser = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-COtSgrC5.js';
|
|
2
2
|
|
|
3
3
|
const alertDialogCss = () => `@charset "UTF-8";:host(limebb-alert-dialog){--dialog-width:20rem;overflow:hidden}:host([type=note]){--alert-type-background:var(--color-sky-lighter);--alert-type-color:var(--color-sky-dark)}:host([type=success]){--alert-type-background:var(--color-lime-lighter);--alert-type-color:var(--color-lime-dark)}:host([type=caution]){--alert-type-background:var(--color-orange-lighter);--alert-type-color:var(--color-orange-dark)}:host([type=warning]){--alert-type-background:var(--color-coral-lighter);--alert-type-color:var(--color-coral-dark)}.dialog-content{display:flex;flex-direction:column;align-items:center}.icon-slot{display:flex;justify-content:center;align-items:center;height:7rem;width:7rem;border-radius:50%;margin:1.5rem 0;background:rgb(var(--alert-type-background))}limel-icon{height:3.5rem;width:3.5rem;color:rgb(var(--alert-type-color))}h1{color:rgb(var(--contrast-1500));font-size:1.5rem}h2{text-align:center;color:rgb(var(--contrast-1200));margin:0 0 0.25rem 0;font-size:0.9rem;font-weight:500;line-height:1.2rem}div[slot=button]{display:flex;flex-direction:column;align-items:center;gap:0.5rem;width:100%}::slotted(limel-button){display:block;width:100%}::slotted(limel-button[primary]){color:rgb(var(--contrast-100));--lime-primary-color:rgb(var(--alert-type-color))}::slotted(limel-button:not([primary])){--lime-primary-color:rgb(var(--contrast-1000))}::slotted(button){appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-align:inherit}::slotted(a){all:unset}::slotted(button),::slotted(a){color:rgb(var(--contrast-1000));border-bottom:1px solid rgb(var(--contrast-800));text-align:center;width:fit-content;cursor:pointer}::slotted(button:focus-visible),::slotted(a:focus-visible){outline:none;box-shadow:var(--shadow-depth-8-focused)}`;
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ const LimebbAlertDialog = class {
|
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h("limel-dialog", { key: '
|
|
23
|
+
return (h("limel-dialog", { key: '72a5db212ceaa1989321fc497c40037e19456463', open: this.open, onClose: this.handleClose }, h("div", { key: 'bbe0becafcdd049be3b9161f8615a5af70abb488', class: "dialog-content" }, h("div", { key: 'cea7cdf8231ccfd159a7c32c798a8d921ca8afcd', class: "icon-slot" }, h("limel-icon", { key: '9eaa75dfaa685c6be517ce63d0d0043c3f4d7d86', name: this.getIconName(), "aria-hidden": "true" })), h("h1", { key: 'fd0b8646d81d96928917287c946d858adad06487', id: "alert-dialog-title" }, this.heading), this.renderSubheading()), h("div", { key: '746127880402f522a583d65685c9df740728be52', slot: "button" }, h("slot", { key: '613e7354a7ad0b97366e203f420e770d7644370e', name: "button" }))));
|
|
24
24
|
}
|
|
25
25
|
renderSubheading() {
|
|
26
26
|
if (!this.subheading) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
2
|
-
import { n } from './index.esm-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-COtSgrC5.js';
|
|
2
|
+
import { n } from './index.esm-B9D_MXA6.js';
|
|
3
3
|
import { E as ENTER } from './keycodes-CwMJvF_Z.js';
|
|
4
4
|
import { n as negate } from './negate-ooVD-6_a.js';
|
|
5
5
|
|
|
@@ -56,8 +56,8 @@ const Browser = class {
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
return [
|
|
59
|
-
h("limel-input-field", { key: '
|
|
60
|
-
h("limel-list", { key: '
|
|
59
|
+
h("limel-input-field", { key: 'e0bfaf51dc8ca8139205db265e9cf4efb9a2bde8', tabIndex: 0, value: this.filter, type: "search", "leading-icon": "search", placeholder: this.translator.get('webclient.global-search-route'), onChange: this.handleChangeFilter, onKeyDown: this.handleKeyDown }),
|
|
60
|
+
h("limel-list", { key: '1f788aa87ec1cfc0c3b89df0a2bf3298b123d96d', items: this.getItems(), type: "selectable", class: {
|
|
61
61
|
'has-interactive-items': true,
|
|
62
62
|
'has-grid-layout': this.layout === 'grid',
|
|
63
63
|
}, onChange: this.handleChange }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { n } from './index.esm-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-COtSgrC5.js';
|
|
2
|
+
import { n } from './index.esm-B9D_MXA6.js';
|
|
3
3
|
|
|
4
4
|
const chatIconListCss = () => `@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-chat-icon-list){display:flex;align-items:center;gap:0.5rem;margin-right:auto;max-width:calc(100% - 2rem);padding:0 0.25rem}.label{font-size:0.75rem;color:rgb(var(--contrast-900))}.icons{display:flex;align-items:center;gap:0.25rem}.icons:hover limel-icon,.icons:focus-within limel-icon{margin-left:0 !important}limel-icon{--icon-background-color:rgb(var(--contrast-500), 0.5)}limel-icon.is-clickable{cursor:pointer}limel-icon:focus{outline:none}limel-icon:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}limel-icon{transition:margin-left 0.2s cubic-bezier(0.075, 0.82, 0.165, 1), opacity 0.2s ease, box-shadow 0.2s ease;position:relative;width:1.75rem;padding:0.375rem;flex-shrink:0}limel-icon:not(.is-pending):not(:first-child){margin-left:-0.75rem}limel-icon.is-pending{animation:pending 3s linear infinite;padding:0.5rem}limel-icon.is-pending:after{content:"";position:absolute;inset:0;width:1.75rem;height:1.75rem;border-radius:50%;pointer-events:none;border-radius:50%;border:0.125rem solid rgb(var(--color-white), 0.5);border-top-color:rgb(var(--color-black), 0.8);mix-blend-mode:color-dodge;animation:spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite}@keyframes pending{0%,20%,80%,100%{filter:grayscale(0%)}45%,55%{filter:grayscale(100%)}}@keyframes spin{to{transform:rotate(360deg)}}`;
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ const ChatIconListComponent = class {
|
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '5f1f10992e05f44d64189dfb622e4294ca325417', id: this.item.id }, this.renderLabel(), h("div", { key: '80f8b801710cb713f019897cac35ea2de1b6384f', class: "icons" }, this.item.icons.map((icon, index) => this.renderIcon(icon, index)))));
|
|
12
12
|
}
|
|
13
13
|
renderLabel() {
|
|
14
14
|
if (!this.item.label) {
|
|
@@ -99,9 +99,9 @@ const ChatListItem = class {
|
|
|
99
99
|
}
|
|
100
100
|
render() {
|
|
101
101
|
const helperTextId = `helper-text-${this.item.id}`;
|
|
102
|
-
return (h(Host, { key: '
|
|
102
|
+
return (h(Host, { key: '266fdab5632ea239ee1e83042494988b7e8c5e74', id: this.item.id, "aria-describedby": this.helperText ? helperTextId : undefined, "aria-live": this.hasError ? 'assertive' : 'off', class: {
|
|
103
103
|
[`${this.item.ui}`]: true,
|
|
104
|
-
} }, h("div", { key: '
|
|
104
|
+
} }, h("div", { key: 'e0b98384093b368a03a3e7c5533aa285d46ea0f5', class: "bubble-content" }, h("div", { key: '4fd0493903e04cf8bbe7ebf2e1763f09cd5bce69', class: "icon-picture" }, this.renderIcon(), this.renderAuthorPicture()), this.renderErrorSign(), h("div", { key: '67b0f7f907d92fa16be7ba82cf239dd7ae55a6e7', class: "item" }, this.renderHeader(), this.renderValue(), h("footer", { key: 'c709ae0695ba2f658e5a8b7f93e29b8d6f70ffbb' }, this.renderHelperText(helperTextId), this.renderTimestamp()))), this.renderPromotedAction()));
|
|
105
105
|
}
|
|
106
106
|
renderErrorSign() {
|
|
107
107
|
if (!this.hasError) {
|
|
@@ -203,7 +203,7 @@ const TypingIndicator = class {
|
|
|
203
203
|
registerInstance(this, hostRef);
|
|
204
204
|
}
|
|
205
205
|
render() {
|
|
206
|
-
return (h("div", { key: '
|
|
206
|
+
return (h("div", { key: 'bf1a80f35a31a497b05b89b0e9d4291ed78bdcd6', class: "typing-ellipsis" }, h("div", { key: '6f0a9f966f53f5459c04c56e464ea1b2e0590619', class: "circle" }), h("div", { key: '155d3a3e19f419d7f385b9dd221f14f78af207b4', class: "circle" }), h("div", { key: '22d53849e2963f4a2505b9746d5a0660cff23898', class: "circle" })));
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
TypingIndicator.style = typingIndicatorCss();
|