@limetech/lime-crm-building-blocks 1.130.0 → 1.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/filter-group-logic-Bwk6B784.js +136 -0
- package/dist/cjs/{index-C_OnxXhP.js → index-dBY184XR.js} +12 -0
- package/dist/cjs/{index.esm-g8gOl7RV.js → index.esm-DcWSoSRE.js} +2 -2
- package/dist/cjs/lime-crm-building-blocks.cjs.js +2 -2
- package/dist/cjs/lime-query-operators-Ci-RNshi.js +65 -0
- package/dist/cjs/{lime-query-validation-DTurSvtv.js → lime-query-validation-nql4N6Z8.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-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 +4 -4
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +3 -3
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +3 -3
- package/dist/cjs/limebb-kanban.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +4 -4
- package/dist/cjs/limebb-lime-query-filter-builder.cjs.entry.js +4 -8
- package/dist/cjs/{limebb-lime-query-filter-group_3.cjs.entry.js → limebb-lime-query-filter-comparison-editor_4.cjs.entry.js} +158 -187
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +83 -121
- package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +5 -5
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +4 -4
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +3 -3
- package/dist/cjs/limebb-loader.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +3 -3
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +3 -3
- package/dist/cjs/limebb-mention.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-notification-item.cjs.entry.js +3 -3
- 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 +4 -4
- package/dist/cjs/limebb-property-selector.cjs.entry.js +42 -19
- package/dist/cjs/limebb-rule-arg-filter-editor.cjs.entry.js +2 -2
- package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +4 -4
- package/dist/cjs/limebb-rule-editor.cjs.entry.js +4 -4
- package/dist/cjs/limebb-rule-gate.cjs.entry.js +3 -3
- 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 +3 -3
- package/dist/cjs/{limetype-DJNXULgk.js → limetype-CNjUGemK.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{web-component-template-BWCutZB6.js → web-component-template-CZ0lPHIg.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/alert-dialog/alert-dialog.js +1 -1
- package/dist/collection/components/browser/browser.js +2 -2
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +1 -1
- package/dist/collection/components/chat-list/chat-item/chat-item.js +2 -2
- package/dist/collection/components/chat-list/chat-list.js +1 -1
- package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/color-palette-picker/color-palette-picker.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/icon-picker/icon-picker.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +1 -1
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/filter-group-logic.js +75 -72
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-builder.js +2 -6
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison-editor.css +12 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison-editor.js +231 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.css +2 -17
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +91 -118
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +9 -14
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.css +105 -179
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +93 -94
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-operators.js +60 -0
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
- package/dist/collection/components/lime-query-builder/property-selector/property-selector.js +39 -16
- package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +1 -1
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +1 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +1 -1
- package/dist/collection/components/rule-editor/rule-editor.css +1 -0
- package/dist/collection/components/rule-editor/rule-editor.js +1 -1
- package/dist/collection/components/rule-gate/rule-gate.js +1 -1
- package/dist/collection/components/summary-popover/summary-popover.js +2 -2
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/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/kanban-group.js +1 -1
- package/dist/components/kanban-item.js +1 -1
- package/dist/components/lime-query-filter-builder.js +1 -1
- package/dist/components/lime-query-filter-comparison-editor.js +1 -0
- package/dist/components/lime-query-filter-comparison.js +1 -1
- package/dist/components/lime-query-filter-expression.js +1 -1
- package/dist/components/limebb-alert-dialog.js +1 -1
- package/dist/components/limebb-browser.js +1 -1
- package/dist/components/limebb-chat-list.js +1 -1
- package/dist/components/limebb-color-palette-picker.js +1 -1
- package/dist/components/limebb-color-palette-swatches.js +1 -1
- package/dist/components/limebb-composer-toolbar.js +1 -1
- package/dist/components/limebb-dashboard-widget.js +1 -1
- package/dist/components/limebb-date-range.js +1 -1
- package/dist/components/limebb-document-chips.js +1 -1
- package/dist/components/limebb-document-picker.js +1 -1
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-icon-picker.js +1 -1
- package/dist/components/limebb-info-tile-format.js +1 -1
- package/dist/components/limebb-info-tile.js +1 -1
- package/dist/components/limebb-lime-query-builder.js +1 -1
- package/dist/components/limebb-lime-query-filter-comparison-editor.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-comparison-editor.js +1 -0
- package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +1 -1
- package/dist/components/limebb-rule-arg-filter-editor.js +1 -1
- package/dist/components/limebb-rule-editor.js +1 -1
- package/dist/components/limebb-rule-gate.js +1 -1
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limetype-field.js +1 -1
- package/dist/components/live-docs-info.js +1 -1
- package/dist/components/notification-item.js +1 -1
- package/dist/components/order-by-editor.js +1 -1
- package/dist/components/order-by-item.js +1 -1
- package/dist/components/percentage-visualizer.js +1 -1
- package/dist/components/property-selector.js +1 -1
- package/dist/components/response-format-item.js +1 -1
- package/dist/components/rule-chip-popover.js +1 -1
- package/dist/components/summary-popover.js +1 -1
- package/dist/components/typing-indicator.js +1 -1
- package/dist/esm/filter-group-logic-RXn-GGk1.js +126 -0
- package/dist/esm/{index-BIwHMk6j.js → index-DYpn0EkA.js} +12 -0
- package/dist/esm/{index.esm-CJU4N9K8.js → index.esm-DAe4_MLR.js} +1 -1
- package/dist/esm/lime-crm-building-blocks.js +3 -3
- package/dist/esm/lime-query-operators-DYlN1dAt.js +63 -0
- package/dist/esm/{lime-query-validation-COGfPUFN.js → lime-query-validation-DXxPZ2CH.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-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 +4 -4
- package/dist/esm/limebb-kanban-group.entry.js +3 -3
- package/dist/esm/limebb-kanban-item.entry.js +3 -3
- package/dist/esm/limebb-kanban.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +4 -4
- package/dist/esm/limebb-lime-query-filter-builder.entry.js +4 -8
- package/dist/esm/{limebb-lime-query-filter-group_3.entry.js → limebb-lime-query-filter-comparison-editor_4.entry.js} +158 -188
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +83 -121
- package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +5 -5
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +3 -3
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +4 -4
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +2 -2
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +2 -2
- package/dist/esm/limebb-live-docs-info.entry.js +3 -3
- package/dist/esm/limebb-loader.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +3 -3
- package/dist/esm/limebb-mention-group-counter.entry.js +3 -3
- package/dist/esm/limebb-mention.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
- package/dist/esm/limebb-notification-item.entry.js +3 -3
- 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 +4 -4
- package/dist/esm/limebb-property-selector.entry.js +42 -19
- package/dist/esm/limebb-rule-arg-filter-editor.entry.js +2 -2
- package/dist/esm/limebb-rule-chip-popover.entry.js +4 -4
- package/dist/esm/limebb-rule-editor.entry.js +4 -4
- package/dist/esm/limebb-rule-gate.entry.js +3 -3
- 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 +3 -3
- package/dist/esm/{limetype-Dc4uQPMG.js → limetype-C1wEJnPI.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{web-component-template-6zRYia86.js → web-component-template-D6zkEjKN.js} +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-34eb61da.entry.js → p-00d00277.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-072756ea.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-32c3789e.entry.js → p-07ef2fd0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c609b5ec.entry.js → p-0ba1294a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7fee7ef3.entry.js → p-0fac2307.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-97e6712f.entry.js → p-16fa6f3e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0c572fe9.entry.js → p-18ce3ce5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-1dfdf045.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-20206710.entry.js → p-22296e19.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1747221f.entry.js → p-24337de2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-de6f4670.entry.js → p-3996a598.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d2a01f51.entry.js → p-3bff70d2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7c96b265.entry.js → p-3c437049.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3a112b17.entry.js → p-43af24b5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2cb31064.entry.js → p-464b02c2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-02565865.entry.js → p-47a7b3fd.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e6083593.entry.js → p-4c10bea0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e7a10082.entry.js → p-4e0d077b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-25d8a718.entry.js → p-5006c5ea.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c678f22f.entry.js → p-52c07130.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-492b1b0c.entry.js → p-55692241.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b2383e7f.entry.js → p-5573a867.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-bec4231f.entry.js → p-563d69ff.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-32f8477f.entry.js → p-571777c3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4446f170.entry.js → p-58e63c29.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-31d8f414.entry.js → p-5a718d20.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9c27e558.entry.js → p-5eef1781.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-861ac606.entry.js → p-603ab702.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3252e153.entry.js → p-661e4700.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-184ae23d.entry.js → p-68a951f5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ed1e7e34.entry.js → p-692084d2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1428aa13.entry.js → p-6ee28dfc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-fdd236ff.entry.js → p-725e6748.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c394c1f6.entry.js → p-7a4704dc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-48c2b617.entry.js → p-7b9359cc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6ff38954.entry.js → p-7d969bbe.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-eb8d58ab.entry.js → p-7f5c97fe.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6cceabf1.entry.js → p-81655182.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-8238723b.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-2a3098a7.entry.js → p-898b097e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-46c00a4b.entry.js → p-8d14a58a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-48deac2a.entry.js → p-8d5311e4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-08eb070d.entry.js → p-8ed7b025.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-99464fa7.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-C_tMNOSt.js → p-BKtEmDNs.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-BV8CPdbi.js → p-BbFGcMnU.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-C84z8BwL.js → p-CqRNpSRV.js} +1 -1
- package/dist/lime-crm-building-blocks/p-D3UYWGdn.js +1 -0
- package/dist/lime-crm-building-blocks/p-DYpn0EkA.js +2 -0
- package/dist/lime-crm-building-blocks/{p-BsNp-hBU.js → p-DzXJyKRS.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d910699a.entry.js → p-a5850f04.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8d3fa274.entry.js → p-a6103d04.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b24b7338.entry.js → p-b01f2045.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-731820f0.entry.js → p-b16bbda2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-dabb227b.entry.js → p-b424f55f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f1d9e133.entry.js → p-b95b94b6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2a46f4be.entry.js → p-bd264cfa.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9e5862de.entry.js → p-c7c5991f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c9003b76.entry.js → p-dc1d543d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e4fe45d3.entry.js → p-dc3a86f3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ec335be5.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-5743a74e.entry.js → p-ecd0280d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-efab4f7e.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-9f7992b0.entry.js → p-efb70fbb.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3263f8d5.entry.js → p-f011673a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-y_s8hZmV.js +1 -0
- package/dist/types/components/lime-query-builder/expressions/filter-group-logic.d.ts +56 -54
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison-editor.d.ts +29 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison.d.ts +12 -9
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +4 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-group.d.ts +14 -30
- package/dist/types/components/lime-query-builder/expressions/lime-query-operators.d.ts +12 -0
- package/dist/types/components/lime-query-builder/property-selector/property-selector.d.ts +1 -0
- package/dist/types/components.d.ts +106 -47
- package/package.json +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.css +0 -137
- package/dist/lime-crm-building-blocks/p-6002654f.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7acd06eb.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-89b43ac5.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-BIwHMk6j.js +0 -2
- package/dist/lime-crm-building-blocks/p-a3556715.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-c6a913af.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-c6fee2bd.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,g as s}from"./p-BIwHMk6j.js";import{b as r,r as n,c as o,L as h}from"./p-C84z8BwL.js";import{A as a,a as c,b as u,E as l,T as d}from"./p-CwMJvF_Z.js";import{o as f,U as v,c as m,a as b,d as p,n as g,i as y,S as j,g as w}from"./p-CtcTT7BK.js";import{d as O}from"./p-Ceen0vzd.js";import{c as x,e as C,S as k,i as S,a as I,r as T}from"./p-BgAfMcRA.js";import{c as A}from"./p-C2JP2nLw.js";import{h as F,b as M,c as P}from"./p-BV8CPdbi.js";import{i as E}from"./p-CkTg5UPD.js";import{i as N}from"./p-6PYziigk.js";var L=/\s/,$=/^\s+/;var _=/^[-+]0x[0-9a-f]+$/i,z=/^0b[01]+$/i,D=/^0o[0-7]+$/i,R=parseInt;function B(t){if("number"==typeof t)return t;if(N(t))return NaN;if(x(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=x(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&L.test(t.charAt(i)););return i}(e)+1).replace($,""):e;var s=z.test(t);return s||D.test(t)?R(t.slice(2),s?2:8):_.test(t)?NaN:+t}var U=Object.create,G=function(){function t(){}return function(i){if(!x(i))return{};if(U)return U(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),H=Object.prototype.hasOwnProperty;var Q=f(Object.getPrototypeOf,Object);"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module;var W=Object.prototype.hasOwnProperty;function q(t){var i=new t.constructor(t.byteLength);return new v(i).set(new v(t)),i}var J=/\w*$/,K=k?k.prototype:void 0,V=K?K.valueOf:void 0;var Y=g&&g.isMap,Z=Y?p(Y):function(t){return S(t)&&"[object Map]"==b(t)},X=g&&g.isSet,tt=X?p(X):function(t){return S(t)&&"[object Set]"==b(t)},it="[object Arguments]",et="[object Function]",st="[object Object]",rt={};function nt(t,i,e,s,r,n){var o;if(void 0!==o)return o;if(!x(t))return t;var h=I(t);if(h)o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&W.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t);else{var a=b(t),c=a==et||"[object GeneratorFunction]"==a;if(y(t))return t.slice();if(a==st||a==it||c&&!r)o=c?{}:function(t){return"function"!=typeof t.constructor||m(t)?{}:G(Q(t))}(t);else{if(!rt[a])return r?t:{};o=function(t,i){var e,s,r,n,o=t.constructor;switch(i){case"[object ArrayBuffer]":return q(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return n=q((r=t).buffer),new r.constructor(n,r.byteOffset,r.byteLength);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 i=q(t.buffer);return new t.constructor(i,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(s=new(e=t).constructor(e.source,J.exec(e))).lastIndex=e.lastIndex,s;case"[object Symbol]":return V?Object(V.call(t)):{}}}(t,a)}}n||(n=new j);var u=n.get(t);if(u)return u;n.set(t,o),tt(t)?t.forEach((function(s){o.add(nt(s,i,e,0,t,n))})):Z(t)&&t.forEach((function(s,r){o.set(r,nt(s,i,e,0,t,n))}));var l=h?void 0:w(t);return function(t,i){for(var e=-1,s=null==t?0:t.length;++e<s&&!1!==i(t[e],e););}(l||t,(function(s,r){l&&(s=t[r=s]),function(t,i,e){var s=t[i];H.call(t,i)&&C(s,e)&&(void 0!==e||i in t)||function(t,i,e){"__proto__"==i&&O?O(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}(t,i,e)}(o,r,nt(s,i,e,0,t,n))})),o}rt[it]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object DataView]"]=rt["[object Boolean]"]=rt["[object Date]"]=rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Map]"]=rt["[object Number]"]=rt[st]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object Symbol]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Error]"]=rt[et]=rt["[object WeakMap]"]=!1;var ot=function(){return T.Date.now()},ht=Math.max,at=Math.min;class ct{get limeObjectService(){return this.platform.get(r.LimeObjectRepository)}get queryService(){return this.platform.get(r.Query)}get viewFactoryRegistry(){return this.platform.get(r.ViewFactoryRegistry)}get contextRegistry(){return this.platform.get(r.ContextRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(r.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e,s){this.platform=t,this.context=i,this.searchableLimetypes=e,this.host=s,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),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:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const s=this.triggerHandler.nodeDefinition;s&&t.insert({node:{tagName:s.customElement.tagName,attributes:s.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!M(t,"user")&&F(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=P(t,"user"),s=t.name;try{const t=await this.queryService.execute({limetype:s,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:n.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[s]:{}};const r=this.createGroupCount(t.objects,e.name);return{[s]:r}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[s]:{}}}}createGroupCount(t,i){const e={};for(const s of t){const{_id:t,[i]:r}=s;e[t]=r.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(E)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const s=i(e,this.contextRegistry.scope({host:this.host})),r=this.getGroupCountComponent(e);return Object.assign(Object.assign({},s),r?{primaryComponent:r}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),s=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],r=P(e,"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 ut{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(o.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)}}class lt{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),s=null==e?void 0:e.href;return s&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(s):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new ut(t.fileContent,this.http);await e.initialize();const s=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===s.progress&&(s.state="uploading"),s.progress=t,100===t&&(s.state="finalizing")};const r=await e.upload();return s.fileId=r.id,s.filename=r.filename,s.extension=r.extension,s.contentType=r.contentType,s.size=r.size,s.state="done",s.href=null===(i=r._links)||void 0===i?void 0:i.contents.href,s}get http(){return this.platform.get(r.Http)}}const dt=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){t(this,e),this.change=i(this,"change"),this.metadataChange=i(this,"metadataChange"),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.allowInlineImages=!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.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![c,u,a,l,d].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[c]:this.handleEscapeKey,[l]:this.handleEnterOrTabKey,[d]:this.handleEnterOrTabKey,[a]:this.handleArrowKeyPress,[u]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const s=((t,i,e)=>(i+(t===a?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[s])?this.findNonSeparatorIndex(t,s,e+1):s},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),s=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(s)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},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 i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,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 i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger||(null==e?void 0:e.disabled))return;const s=this.registeredTriggerMap[this.activeTrigger];try{s.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=A(),this.debouncedSearchFn=function(t,i,e){var s,r,n,o,h,a,c=0,u=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(i){var e=s,n=r;return s=r=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-a;return void 0===a||e>=i||e<0||l&&t-c>=n}function m(){var t=ot();if(v(t))return b(t);h=setTimeout(m,function(t){var e=i-(t-a);return l?at(e,n-(t-c)):e}(t))}function b(t){return h=void 0,d&&s?f(t):(s=r=void 0,o)}function p(){var t=ot(),e=v(t);if(s=arguments,r=this,a=t,e){if(void 0===h)return function(t){return c=t,h=setTimeout(m,i),u?f(t):o}(a);if(l)return clearTimeout(h),h=setTimeout(m,i),f(a)}return void 0===h&&(h=setTimeout(m,i)),o}return i=B(i)||0,x(e)&&(u=!!e.leading,n=(l="maxWait"in e)?ht(B(e.maxWait)||0,i):n,d="trailing"in e?!!e.trailing:d),p.cancel=function(){void 0!==h&&clearTimeout(h),c=0,s=a=r=h=void 0},p.flush=function(){return void 0===h?o:b(ot())},p}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,s;if(this.draftIdentifier){const r=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(s=null===(e=this.context)||void 0===e?void 0:e.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)),this.uploadHandler=new lt(this.platform)}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 ct(this.platform,this.context,this.searchableLimetypes,this.host),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.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[e("limel-text-editor",{key:"3ef0538b3df2cfbd3e363868add7dad46559e035",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,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,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 e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const s=nt(t,5);return Object.assign(Object.assign({},s),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}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,i,e,s;if(!this.textEditorInnerId)return;const r=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);r&&r!==n?null===(e=this.userDataService)||void 0===e||e.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(r.UserDataRepository)}static get delegatesFocus(){return!0}get host(){return s(this)}static get watchers(){return{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}}};(function(t,i,e,s){var r,n=arguments.length,o=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(r=t[h])&&(o=(n<3?r(o):n>3?r(i,e,o):r(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)})([h({map:[function(t){return Object.values(t).filter((t=>M(t,"user")||F(t,"user")))}]})],dt.prototype,"searchableLimetypes",void 0),dt.style=":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))}";export{dt as limebb_text_editor}
|
|
1
|
+
import{r as t,c as i,h as e,g as s}from"./p-DYpn0EkA.js";import{b as r,r as n,c as o,L as h}from"./p-CqRNpSRV.js";import{A as a,a as c,b as u,E as l,T as d}from"./p-CwMJvF_Z.js";import{o as f,U as v,c as m,a as b,d as p,n as g,i as y,S as j,g as w}from"./p-CtcTT7BK.js";import{d as O}from"./p-Ceen0vzd.js";import{c as x,e as S,S as k,i as C,a as T,r as A}from"./p-BgAfMcRA.js";import{c as I}from"./p-C2JP2nLw.js";import{h as F,b as E,c as M}from"./p-BbFGcMnU.js";import{i as P}from"./p-CkTg5UPD.js";import{i as N}from"./p-6PYziigk.js";var R=/\s/,D=/^\s+/;var $=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,L=/^0o[0-7]+$/i,U=parseInt;function z(t){if("number"==typeof t)return t;if(N(t))return NaN;if(x(t)){var i="function"==typeof t.valueOf?t.valueOf():t;t=x(i)?i+"":i}if("string"!=typeof t)return 0===t?t:+t;var e;t=(e=t)?e.slice(0,function(t){for(var i=t.length;i--&&R.test(t.charAt(i)););return i}(e)+1).replace(D,""):e;var s=_.test(t);return s||L.test(t)?U(t.slice(2),s?2:8):$.test(t)?NaN:+t}var G=Object.create,B=function(){function t(){}return function(i){if(!x(i))return{};if(G)return G(i);t.prototype=i;var e=new t;return t.prototype=void 0,e}}(),q=Object.prototype.hasOwnProperty;var Q=f(Object.getPrototypeOf,Object);"object"==typeof exports&&exports&&!exports.nodeType&&exports&&"object"==typeof module&&module&&!module.nodeType&&module;var W=Object.prototype.hasOwnProperty;function H(t){var i=new t.constructor(t.byteLength);return new v(i).set(new v(t)),i}var J=/\w*$/,K=k?k.prototype:void 0,V=K?K.valueOf:void 0;var Y=g&&g.isMap,Z=Y?p(Y):function(t){return C(t)&&"[object Map]"==b(t)},X=g&&g.isSet,tt=X?p(X):function(t){return C(t)&&"[object Set]"==b(t)},it="[object Arguments]",et="[object Function]",st="[object Object]",rt={};function nt(t,i,e,s,r,n){var o;if(void 0!==o)return o;if(!x(t))return t;var h=T(t);if(h)o=function(t){var i=t.length,e=new t.constructor(i);return i&&"string"==typeof t[0]&&W.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(t);else{var a=b(t),c=a==et||"[object GeneratorFunction]"==a;if(y(t))return t.slice();if(a==st||a==it||c&&!r)o=c?{}:function(t){return"function"!=typeof t.constructor||m(t)?{}:B(Q(t))}(t);else{if(!rt[a])return r?t:{};o=function(t,i){var e,s,r,n,o=t.constructor;switch(i){case"[object ArrayBuffer]":return H(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return n=H((r=t).buffer),new r.constructor(n,r.byteOffset,r.byteLength);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 i=H(t.buffer);return new t.constructor(i,t.byteOffset,t.length)}(t);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(s=new(e=t).constructor(e.source,J.exec(e))).lastIndex=e.lastIndex,s;case"[object Symbol]":return V?Object(V.call(t)):{}}}(t,a)}}n||(n=new j);var u=n.get(t);if(u)return u;n.set(t,o),tt(t)?t.forEach((function(s){o.add(nt(s,i,e,0,t,n))})):Z(t)&&t.forEach((function(s,r){o.set(r,nt(s,i,e,0,t,n))}));var l=h?void 0:w(t);return function(t,i){for(var e=-1,s=null==t?0:t.length;++e<s&&!1!==i(t[e],e););}(l||t,(function(s,r){l&&(s=t[r=s]),function(t,i,e){var s=t[i];q.call(t,i)&&S(s,e)&&(void 0!==e||i in t)||function(t,i,e){"__proto__"==i&&O?O(t,i,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[i]=e}(t,i,e)}(o,r,nt(s,i,e,0,t,n))})),o}rt[it]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object DataView]"]=rt["[object Boolean]"]=rt["[object Date]"]=rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Map]"]=rt["[object Number]"]=rt[st]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object Symbol]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Error]"]=rt[et]=rt["[object WeakMap]"]=!1;var ot=function(){return A.Date.now()},ht=Math.max,at=Math.min;class ct{get limeObjectService(){return this.platform.get(r.LimeObjectRepository)}get queryService(){return this.platform.get(r.Query)}get viewFactoryRegistry(){return this.platform.get(r.ViewFactoryRegistry)}get contextRegistry(){return this.platform.get(r.ContextRegistry)}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(r.Translate)}get triggerCharacter(){return this._triggerCharacter}get triggerHandler(){return this._triggerHandler}constructor(t,i,e,s){this.platform=t,this.context=i,this.searchableLimetypes=e,this.host=s,this.groupCounts={},this._triggerCharacter="@",this._triggerHandler={searcher:t=>this.searcher(t),inserter:(t,i)=>this.inserter(t,i),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:i}=await this.limeObjectService.search(t,this.searchableLimetypes,10);return this.createSearchListItems(i)},this.inserter=async(t,i)=>{var e;const s=this.triggerHandler.nodeDefinition;s&&t.insert({node:{tagName:s.customElement.tagName,attributes:s.mapAttributes(i)},children:[null===(e=i.value)||void 0===e?void 0:e.descriptive]})}}async initialize(){await this.loadGroupCounts()}async loadGroupCounts(){const t=this.searchableLimetypes.filter((t=>!E(t,"user")&&F(t,"user"))).map((t=>this.getGroupCounts(t)));for(const i of await Promise.all(t))Object.assign(this.groupCounts,i)}async getGroupCounts(t){var i;const e=M(t,"user"),s=t.name;try{const t=await this.queryService.execute({limetype:s,responseFormat:{object:{_id:null,[e.name]:{count:{aggregate:{op:n.Count}}}}}});if(!(null===(i=t.objects)||void 0===i?void 0:i.length))return{[s]:{}};const r=this.createGroupCount(t.objects,e.name);return{[s]:r}}catch(i){return console.error(`Error fetching group count for limetype: ${t.name}`,i),{[s]:{}}}}createGroupCount(t,i){const e={};for(const s of t){const{_id:t,[i]:r}=s;e[t]=r.count}return e}createSearchListItems(t=[]){return t.map((t=>this.createSearchListItem(t))).filter(P)}createSearchListItem(t){const i=this.viewFactoryRegistry.getFactory("search"),e=this.limeObjectService.getObject(t._limetype,t._id);if(!e)return null;const s=i(e,this.contextRegistry.scope({host:this.host})),r=this.getGroupCountComponent(e);return Object.assign(Object.assign({},s),r?{primaryComponent:r}:{})}getGroupCountComponent(t){var i;const e=t.getLimetype(),s=null===(i=this.groupCounts[e.name])||void 0===i?void 0:i[t.id],r=M(e,"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 ut{constructor(t,i){this.file=t,this.http=i,this.uploadCancelled=!1,this.getUrl=t=>`api/v1/file/${null!=t?t:""}`}async initialize(){this.uploadService=await this.http.createFileUpload(o.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)}}class lt{constructor(t){this.platform=t}async handleImagePasted(t){const i=null==t?void 0:t.fileInfo;if(!i)return;if(!this.validateImageSize(i))return;t.insertThumbnail();const e=await this.createFileUpload(i),s=null==e?void 0:e.href;return s&&void 0!==(null==e?void 0:e.fileId)?t.insertImage(s):t.insertFailedThumbnail(),e}parseFileIdFromSrc(t){if(t){const i=/\/(\d+)\/contents\/?$/.exec(t);if(i&&i[1])return Number(i[1])}}validateImageSize(t){return!!t.fileContent&&t.fileContent.size<=52428800}async createFileUpload(t){var i;if(!t.fileContent)return;const e=new ut(t.fileContent,this.http);await e.initialize();const s=Object.assign(Object.assign({},t),{progress:0,file:e,state:"added",fileId:void 0,href:void 0,id:t.id});e.onProgress=t=>{0===s.progress&&(s.state="uploading"),s.progress=t,100===t&&(s.state="finalizing")};const r=await e.upload();return s.fileId=r.id,s.filename=r.filename,s.extension=r.extension,s.contentType=r.contentType,s.size=r.size,s.state="done",s.href=null===(i=r._links)||void 0===i?void 0:i.contents.href,s}get http(){return this.platform.get(r.Http)}}const dt=class{watchOpen(){this.setupHandlers(),this.setPickerMessage()}watchQuery(){this.setPickerMessage()}constructor(e){t(this,e),this.change=i(this,"change"),this.metadataChange=i(this,"metadataChange"),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.allowInlineImages=!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.handleMouseClick=t=>{this.textEditorPickerElement&&(t.target===this.textEditorPickerElement||this.resetTriggerAndPicker())},this.handleKeyPress=t=>{if(!this.isPickerOpen||!this.activeTrigger)return;if(![c,u,a,l,d].includes(t.key))return;if(t.stopPropagation(),t.preventDefault(),"keyup"===t.type)return;const i={[c]:this.handleEscapeKey,[l]:this.handleEnterOrTabKey,[d]:this.handleEnterOrTabKey,[a]:this.handleArrowKeyPress,[u]:this.handleArrowKeyPress}[t.key];i&&i(t)},this.handleArrowKeyPress=t=>{this.highlightedItemIndex=this.findNonSeparatorIndex(t.key,this.highlightedItemIndex)},this.findNonSeparatorIndex=(t,i,e=0)=>{if(0===this.items.length||e>this.items.length)return i;const s=((t,i,e)=>(i+(t===a?1:-1)+e)%e)(t,i,this.items.length);return this.isListSeparator(this.items[s])?this.findNonSeparatorIndex(t,s,e+1):s},this.handleEscapeKey=()=>{var t;null===(t=this.triggerFunction)||void 0===t||t.stopTrigger(),this.resetTriggerAndPicker()},this.handleEnterOrTabKey=t=>{this.handleItemSelection(t)},this.handleMetadataChange=t=>{t.stopPropagation();const i=t.detail,e=this.getEnhancedImages(i.images||[]),s=Object.assign(Object.assign({},i),{images:e});this.metadataChange.emit(s)},this.handleImagePasted=t=>{t.stopPropagation(),this.allowInlineImages&&this.uploadHandler.handleImagePasted(t.detail)},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 i;t.stopImmediatePropagation(),this.editorPickerQuery=t.detail.value;const e=null===(i=this.registeredTriggerMap[t.detail.trigger])||void 0===i?void 0:i.searcher;e&&(this.isSearching=!0,this.debouncedSearchFn(e,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 i;let e;if(t instanceof CustomEvent)e=t.detail;else{if(!(t instanceof KeyboardEvent))return;{const t=this.items[this.highlightedItemIndex];if(this.isListSeparator(t))return;e=t}}if(!this.activeTrigger||(null==e?void 0:e.disabled))return;const s=this.registeredTriggerMap[this.activeTrigger];try{s.inserter(this.triggerFunction,e)}catch(t){console.error("Error inserting",t)}this.resetTriggerAndPicker(),null===(i=this.textEditor)||void 0===i||i.focus()},this.handleVisibilityChange=()=>{"hidden"===document.visibilityState&&this.saveDraft()},this.handleBeforeUnload=()=>{this.saveDraft()},this.portalId=I(),this.debouncedSearchFn=function(t,i,e){var s,r,n,o,h,a,c=0,u=!1,l=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(i){var e=s,n=r;return s=r=void 0,c=i,o=t.apply(n,e)}function v(t){var e=t-a;return void 0===a||e>=i||e<0||l&&t-c>=n}function m(){var t=ot();if(v(t))return b(t);h=setTimeout(m,function(t){var e=i-(t-a);return l?at(e,n-(t-c)):e}(t))}function b(t){return h=void 0,d&&s?f(t):(s=r=void 0,o)}function p(){var t=ot(),e=v(t);if(s=arguments,r=this,a=t,e){if(void 0===h)return function(t){return c=t,h=setTimeout(m,i),u?f(t):o}(a);if(l)return clearTimeout(h),h=setTimeout(m,i),f(a)}return void 0===h&&(h=setTimeout(m,i)),o}return i=z(i)||0,x(e)&&(u=!!e.leading,n=(l="maxWait"in e)?ht(z(e.maxWait)||0,i):n,d="trailing"in e?!!e.trailing:d),p.cancel=function(){void 0!==h&&clearTimeout(h),c=0,s=a=r=h=void 0},p.flush=function(){return void 0===h?o:b(ot())},p}((async(t,i)=>{try{const e=await t(i);if(i!==this.editorPickerQuery||!this.activeTrigger)return;this.items=e}catch(t){console.error("Error searching",t)}finally{this.isSearching=!1}}),300)}connectedCallback(){var t,i,e,s;if(this.draftIdentifier){const r=null!==(i=null===(t=this.context)||void 0===t?void 0:t.id)&&void 0!==i?i:"no-limeobject",n=null!==(s=null===(e=this.context)||void 0===e?void 0:e.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)),this.uploadHandler=new lt(this.platform)}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 ct(this.platform,this.context,this.searchableLimetypes,this.host),i=t.triggerHandler.nodeDefinition;i&&(this.registeredCustomElements.push(i.customElement),this.registeredTriggerMap[t.triggerCharacter]=t.triggerHandler,t.initialize())}registerTriggers(){this.registeredTriggers=Object.keys(this.registeredTriggerMap)}setPickerMessage(){var t;if(!this.activeTrigger)return;const i=this.registeredTriggerMap[this.activeTrigger];this.pickerMessage=(null===(t=this.editorPickerQuery)||void 0===t?void 0:t.length)>0?i.noItemsFoundMessage:i.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[e("limel-text-editor",{key:"58b3a06b62159010bab0d99fe48ae3d9ebc0bc5e",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,onImagePasted:this.handleImagePasted,onMetadataChange:this.handleMetadataChange,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 e("limel-portal",{containerId:this.portalId,visible:this.isPickerOpen,openDirection:"top",inheritParentWidth:!0,anchor:this.textEditor},e("limebb-text-editor-picker",{ref:t=>this.textEditorPickerElement=t,items:(t=this.items,i=this.highlightedItemIndex,t.map(((t,e)=>{const s=nt(t,5);return Object.assign(Object.assign({},s),{selected:e===i})}))),onItemSelected:this.handleItemSelection,emptyMessage:this.pickerMessage,isSearching:this.isSearching}));var t,i}getEnhancedImages(t){return t.map((t=>{let i;return"success"===t.state&&(i=this.uploadHandler.parseFileIdFromSrc(t.src)),i?Object.assign(Object.assign({},t),{fileId:i}):t}))}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,i,e,s;if(!this.textEditorInnerId)return;const r=null===(t=this.value)||void 0===t?void 0:t.trim(),n=null===(i=this.userDataService)||void 0===i?void 0:i.get(this.textEditorInnerId);r&&r!==n?null===(e=this.userDataService)||void 0===e||e.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(r.UserDataRepository)}static get delegatesFocus(){return!0}get host(){return s(this)}static get watchers(){return{isPickerOpen:[{watchOpen:0}],editorPickerQuery:[{watchQuery:0}]}}};(function(t,i,e,s){var r,n=arguments.length,o=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,e,s);else for(var h=t.length-1;h>=0;h--)(r=t[h])&&(o=(n<3?r(o):n>3?r(i,e,o):r(i,e))||o);n>3&&o&&Object.defineProperty(i,e,o)})([h({map:[function(t){return Object.values(t).filter((t=>E(t,"user")||F(t,"user")))}]})],dt.prototype,"searchableLimetypes",void 0),dt.style=":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))}";export{dt as limebb_text_editor}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i}from"./p-DYpn0EkA.js";import{b as l}from"./p-CqRNpSRV.js";const n=[{trigger:"rich-text",icon:"font_style_formatting",translationKey:"webclient.composer-toolbar.rich-text"},{trigger:"mention",icon:"email_sign_92447",translationKey:"webclient.composer-toolbar.mention",helperLabel:"@"},{trigger:"text-snippet",icon:"add_text",translationKey:"webclient.composer-toolbar.text-snippet",helperLabel:"!"},{trigger:"internal-link",icon:"hashtag_large",translationKey:"webclient.composer-toolbar.internal-link",helperLabel:"#"}],o=class{constructor(i){t(this,i),this.triggerInsert=e(this,"triggerInsert"),this.filesSelected=e(this,"filesSelected"),this.mentions=!1,this.textSnippets=!1,this.internalLinks=!1,this.richText=!1,this.handleTriggerSelected=t=>{t.stopPropagation(),this.triggerInsert.emit(t.detail.value)},this.handleFilesSelected=t=>{t.stopPropagation(),this.filesSelected.emit(t.detail)}}render(){return[i("div",{key:"47990ebd44bdb54bd555b4bc3d556467d6288072",class:"actions"},i("slot",{key:"4efcba8ee2d3dfc3a0e710e2837c7ed3148d4917",name:"leading"}),this.renderFileInput(),this.renderTriggerActions(),i("slot",{key:"ced71524a1aceb0c0cb1a3350478e6e203b76432",name:"trailing"})),i("slot",{key:"e46c67fd7a785c6373c2518023d2a8af1702b3c3",name:"primary-action"})]}get translator(){var t;return null===(t=this.platform)||void 0===t?void 0:t.get(l.Translate)}get triggerActions(){const t={mention:this.mentions,"text-snippet":this.textSnippets,"internal-link":this.internalLinks,"rich-text":this.richText};return n.filter((e=>t[e.trigger])).map((t=>{var e,i;return{text:null!==(i=null===(e=this.translator)||void 0===e?void 0:e.get(t.translationKey))&&void 0!==i?i:t.trigger,commandText:t.helperLabel,icon:t.icon,iconOnly:!0,value:t.trigger}}))}renderTriggerActions(){const t=this.triggerActions;if(0!==t.length)return i("limel-action-bar",{actions:t,onItemSelected:this.handleTriggerSelected})}renderFileInput(){var t,e,l,n,o,r;if(this.fileInput)return i("limel-file-input",{accept:null!==(t=this.fileInput.accept)&&void 0!==t?t:"*",multiple:null!==(e=this.fileInput.multiple)&&void 0!==e&&e,disabled:null!==(l=this.fileInput.disabled)&&void 0!==l&&l,onFilesSelected:this.handleFilesSelected},i("limel-icon-button",{icon:"attach",disabled:null!==(n=this.fileInput.disabled)&&void 0!==n&&n,label:null===(o=this.translator)||void 0===o?void 0:o.get("webclient.attach-files"),helperLabel:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.attach-files-helper")}))}};o.style="*{box-sizing:border-box;min-width:0}:host(limebb-composer-toolbar){box-sizing:border-box;display:flex;align-items:center;width:100%;max-width:100%;gap:0.5rem}.actions{display:flex;align-items:center;flex-wrap:nowrap;flex-grow:1}limel-icon-button,::slotted(limel-icon-button){display:inline-block;scale:0.86}limel-file-input{flex-shrink:0}";export{o as limebb_composer_toolbar}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as e,h as t,H as o}from"./p-
|
|
1
|
+
import{r as i,c as e,h as t,H as o}from"./p-DYpn0EkA.js";const r=class{constructor(t){i(this,t),this.interact=e(this,"interact"),this.type="checkbox",this.fileTypes=["view","contents","download"],this.handleDocumentItemClick=i=>{if(!this.isUnavailable()){if((null==i?void 0:i.target)instanceof HTMLElement&&(i.target.closest("limel-checkbox")||i.target.closest("limel-radio-button")))return;this.toggleSelection()}},this.handleSelectionControlClick=i=>{var e,t;i.stopPropagation(),this.isUnavailable()||"radio"===this.type&&(null===(e=this.item)||void 0===e?void 0:e.selected)&&(i.preventDefault(),this.forceInputUnchecked(i),this.emitSelectionChange(!(null===(t=this.item)||void 0===t?void 0:t.selected)))},this.handleSelectionControlChange=i=>{var e;if(i.stopPropagation(),this.isUnavailable())return;let t;if("detail"in i&&"boolean"==typeof i.detail)t=i.detail;else{const e=i.target;t=!!(null==e?void 0:e.checked)}"radio"!==this.type||!(null===(e=this.item)||void 0===e?void 0:e.selected)||t?this.emitSelectionChange(t):this.emitSelectionChange(!1)},this.handleKeyDown=i=>{" "!==i.key&&"Enter"!==i.key||(i.preventDefault(),this.isUnavailable()||this.toggleSelection())}}render(){const i=this.isUnavailable(),e=this.getImage();return t(o,{key:"885c9721b9bdedbbb3d74d9e49e646bdf4e54d49",id:String(this.item.file.id),class:{"has-image":!!e,"has-error":!!this.item.hasError},role:"radio"===this.type?"radio":"checkbox","aria-checked":this.item.selected?"true":"false","aria-disabled":i?"true":"false",tabIndex:i?-1:0},t("limel-card",{key:"f33b96a2624f6f890259f8c47edcd5058dd3d908",image:e,clickable:!i,onClick:this.handleDocumentItemClick,onKeyDown:this.handleKeyDown},t("div",{key:"e0b3efdf16c5455c2fabb052908896ca5fc5ce5b",slot:"component"},this.renderFileSize(),this.renderBooleanInput())),this.renderHelp())}renderBooleanInput(){const i=this.getControlId();return t("radio"===this.type?"limel-radio-button":"limel-checkbox",{id:i,label:this.item.file.filename,disabled:this.isUnavailable(),checked:this.item.selected,onClick:this.handleSelectionControlClick,onChange:this.handleSelectionControlChange})}renderFileSize(){var i,e;const o=function(i,e=1){if(null==i||Number.isNaN(i))return"";if(i<0)return"";if(0===i)return"0 B";const t=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.min(t.length-1,Math.floor(Math.log(i)/Math.log(1024))),r=i/Math.pow(1024,o),l=r<10?Math.max(0,e):0;return`${Number.parseFloat(r.toFixed(l))} ${t[o]}`}(null===(e=null===(i=this.item)||void 0===i?void 0:i.file)||void 0===e?void 0:e.size);if(o)return t("span",{class:"file-size"},o)}renderHelp(){if(this.item.help)return t("limel-help",{value:this.item.help,openDirection:"bottom-end"})}toggleSelection(){var i,e;if("radio"===this.type){const e=!(null===(i=this.item)||void 0===i?void 0:i.selected);return void this.emitSelectionChange(e)}const t=!(null===(e=this.item)||void 0===e?void 0:e.selected);this.emitSelectionChange(t)}emitSelectionChange(i){this.interact.emit(Object.assign(Object.assign({},this.item),{selected:i}))}getControlId(){return`boolean-input-${String(this.item.file.id)}`}isUnavailable(){var i,e;return(null===(i=this.item)||void 0===i?void 0:i.disabled)||(null===(e=this.item)||void 0===e?void 0:e.hasError)}forceInputUnchecked(i){const e=i.target,t=null==e?void 0:e.closest("limel-radio-button"),o=null==t?void 0:t.querySelector('input[type="radio"]');o&&(o.checked=!1)}getImage(){const i=this.hrefForFile();if(i)return{src:i,alt:this.item.file.filename}}hrefForFile(){return["preview",...this.fileTypes].map((i=>this.item.file.getUrl(i))).find(Boolean)}static get delegatesFocus(){return!0}};r.style="*{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-document-item){position:relative}limel-card:not([clickable]):not([clickable=true]){pointer-events:none;opacity:0.75}div[slot=component]{pointer-events:none;display:flex;flex-direction:column;margin-top:-0.25rem;padding:0 0.25rem}limel-checkbox,limel-radio-button{width:100%}.file-size{pointer-events:none;width:fit-content;padding:0 0.375rem;font-size:0.6875rem;color:rgb(var(--color-white));border-radius:1rem;opacity:0.75;background-color:rgb(var(--color-glaucous-darker), 0.8);box-shadow:var(--shadow-brighten-edges-outside);backdrop-filter:blur(0.75rem);margin-top:0.5rem}:host(.has-image) .file-size{margin-top:-1.5rem;margin-bottom:0.5rem}limel-help{position:absolute;top:0;right:0}:host(.has-error) limel-card{box-shadow:0 0 0 1px rgb(var(--color-red-light))}:host(.has-error) limel-help{--color-sky-default:var( --color-red-default );--color-sky-lighter:var(--color-red-lighter);--lime-elevated-surface-background-color:rgb( var(--color-yellow-default) )}";export{r as limebb_document_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as r,H as i}from"./p-DYpn0EkA.js";import{b as o,n as s,L as l}from"./p-CqRNpSRV.js";import{L as a}from"./p-D3UYWGdn.js";import{g as n,s as c,b as h,u as d,c as u,d as p,e as m}from"./p-y_s8hZmV.js";import{g as b}from"./p-CQUZjrU4.js";const f=class{constructor(r){e(this,r),this.expressionChange=t(this,"expressionChange"),this.handlePropertyChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{key:e.detail}))},this.handleOperatorChange=e=>{e.stopPropagation();const t=e.detail.value,r=this.expression.op;let i=this.expression.exp;t!==s.IN||Array.isArray(i)?r===s.IN&&t!==s.IN&&Array.isArray(i)&&(i=i.length>0?i[0]:""):i=void 0!==i&&""!==i?[i]:[],this.expressionChange.emit({key:this.expression.key,op:t,exp:i})},this.handleValueChange=e=>{e.stopPropagation(),this.expressionChange.emit(Object.assign(Object.assign({},this.expression),{exp:e.detail}))}}componentDidLoad(){var e;null===(e=this.propertySelectorEl)||void 0===e||e.focus()}render(){return r(i,{key:"8b70eaef1906fd9eaa69c9e4d6c42937406d2fcc"},this.renderPropertySelector(),this.renderOperator(),this.renderValueInput())}renderPropertySelector(){return r("limebb-property-selector",{ref:e=>this.propertySelectorEl=e,class:"property",label:"Property",platform:this.platform,context:this.context,limetype:this.limetype,value:this.expression.key,required:!0,onChange:this.handlePropertyChange})}renderOperator(){const e=!!this.expression.op,t=a.map((e=>{var t,r;return{text:null!==(r=null===(t=this.translator)||void 0===t?void 0:t.get(e.label))&&void 0!==r?r:e.label,value:e.value,icon:e.icon?{name:e.icon}:void 0}})),i=t.find((e=>e.value===this.expression.op));return r("limel-select",{class:"operator",label:"Operator",value:i,options:t,disabled:!e&&!this.expression.key,onChange:this.handleOperatorChange})}renderValueInput(){return this.expression.op?r("limebb-lime-query-value-input",{class:"value",label:"Value",platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,propertyPath:this.expression.key,operator:this.expression.op,value:this.expression.exp,onChange:this.handleValueChange}):null}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(o.Translate)}static get delegatesFocus(){return!0}};f.style=":host{display:grid;grid-template-columns:3fr 1fr;gap:0.5rem;padding:0.75rem;min-width:30rem;align-items:center}.value{grid-column:1/-1}";const g={AND:{color:"rgb(var(--contrast-900))",iconName:"dot_circle",text:"All of",secondaryText:"True when every condition is true"},OR:{color:"rgb(var(--color-sky-default))",iconName:"centre_point",text:"Any of",secondaryText:"True when at least one condition is true"},NOT_AND:{color:"rgb(var(--color-orange-default))",iconName:"dot_circle",text:"Not all of",secondaryText:"True when at least one condition is false"},NOT_OR:{color:"rgb(var(--color-red-default))",iconName:"centre_point",text:"None of",secondaryText:"True when every condition is false"}},v=["AND","OR","NOT_AND","NOT_OR"].map((e=>({text:g[e].text,secondaryText:g[e].secondaryText,value:e,icon:{name:g[e].iconName,color:g[e].color}}))),y=class{constructor(i){e(this,i),this.expressionChange=t(this,"expressionChange"),this.renderChildExpression=(e,t)=>r("li",{class:"row"},r("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:e,onExpressionChange:this.handleChildExpressionChange(t)})),this.handleCombinatorChange=e=>{e.stopPropagation();const t=e.detail.value;t&&t!==n(this.expression)&&this.expressionChange.emit(c(this.expression,t))},this.handleDeleteGroup=()=>{this.expressionChange.emit()},this.handleAddChildExpression=()=>{const e=u(this.expression),t=h(e,m());this.expressionChange.emit(this.wrap(t))},this.handleAddChildGroup=()=>{const e=u(this.expression),t=p(e.op),r=h(e,t);this.expressionChange.emit(this.wrap(r))},this.handleChildExpressionChange=e=>t=>{t.stopPropagation();const r=u(this.expression),i=d(r,e,t.detail);this.expressionChange.emit("removed"!==i.type?this.isNegated?{op:s.NOT,exp:i.expression}:i.expression:void 0)}}render(){const e=n(this.expression),t=u(this.expression),o=v.find((t=>t.value===e));return r(i,{key:"c9ca20c6b893416088807266fede19e5a24e360d","data-op":e,style:{"--limebb-query-filter-group-color-code":g[e].color}},r("div",{key:"8efe9e6e4d1ba552b8a761ec23b18668a1aef7f3",class:"group"},r("div",{key:"e99bb85a9532431a63ce0916dc4882a2f73d2307",class:"group-header"},r("limel-select",{key:"981fd5c1d4755ef937451144245640228ed515a9",class:"combinator",label:"Match",value:o,options:v,onChange:this.handleCombinatorChange}),r("limel-icon-button",{key:"caa427e897501a12a98a370c4d2364564904c042",class:"delete-group",icon:"trash",label:"Delete this group",onClick:this.handleDeleteGroup})),r("ul",{key:"8a21efdd1d783b11bb00f39c3579eec7277a505e",class:"rows"},t.exp.map(this.renderChildExpression),r("limel-chip",{key:"b4612f1899060f2f553283cc7afac53777b0c1ef",role:"listitem",class:"add-condition",text:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddChildExpression})),r("limel-chip",{key:"7046abfe1929fa13f4de3e90285610280467fd76",class:"add-group",size:"small",text:"Group",icon:{name:"plus_math",title:"Add",color:"var(--group-rail-color)"},onClick:this.handleAddChildGroup})))}get isNegated(){return this.expression.op===s.NOT}wrap(e){return this.isNegated?{op:s.NOT,exp:e}:e}};y.style='*,*:before,*::after{box-sizing:border-box}:host(limebb-lime-query-filter-group){--group-rail-color:var(--limebb-query-filter-group-color-code);display:flex;flex-direction:column;gap:1.5rem}:host([data-op=AND]){--combinator-symbol:"&"}:host([data-op=NOT_AND]){--combinator-symbol:"- &"}:host([data-op=OR]){--combinator-symbol:"or"}:host([data-op=NOT_OR]){--combinator-symbol:"- or"}.group{position:relative;display:flex;flex-direction:column;gap:1rem;padding:0.5rem;border-radius:0.75rem;background-color:rgb(var(--contrast-800), 0.15);transition:box-shadow 120ms ease}.group:before{content:"";position:absolute;top:1rem;bottom:calc(1rem + 1.75rem);left:0;width:0.125rem;transform:translateX(-50%);border-radius:1rem;background-color:var(--group-rail-color)}.group:has(limel-icon-button.delete-group:hover),.group:has(limel-icon-button.delete-group:focus-within){box-shadow:var(--shadow-error-state)}.group-header{display:flex;align-items:center;gap:0.5rem}limel-select.combinator{min-width:9rem}limel-icon-button.delete-group{margin-left:auto;opacity:0;transition:opacity 120ms ease}limel-chip.add-group{--lime-elevated-surface-background-color:transparent;--button-shadow-normal:none;isolation:isolate;position:relative;margin-right:auto}limel-chip.add-group:after{content:"";position:absolute;width:0.5rem;height:1.75rem;top:0;left:calc(0.5rem * -1 - 0.125rem / 2);border-width:0 0 0.125rem 0.125rem;border-color:var(--group-rail-color);border-style:solid;border-radius:0 0 0 0.5rem;transform:translateY(calc(-50% - 0.125rem / 2))}.group:hover>.group-header>limel-icon-button.delete-group,limel-icon-button.delete-group:focus-within{opacity:1}ul.rows{list-style:none;margin:0;display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:0.5rem;row-gap:0.5rem;padding:0 0.5rem 0.5rem 0.5rem}li.row{list-style:none;position:relative}li.row:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group){flex-basis:100%;align-self:stretch}li.row+li.row:before{content:var(--combinator-symbol);color:var(--limebb-query-filter-group-color-code);font-size:0.75rem;font-weight:600}li.row+li.row:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group):before{position:absolute;left:0;top:0;transform:translate(-50%, -50%)}li.row+li.row:not(:has(>limebb-lime-query-filter-expression>limebb-lime-query-filter-group)):before{margin-right:0.5rem}';const x=class{constructor(r){e(this,r),this.expressionChange=t(this,"expressionChange"),this.handleExpressionChange=e=>{var t;e.stopPropagation();const r=null!==(t=e.detail)&&void 0!==t?t:void 0;this.expressionChange.emit(void 0!==r?{op:s.NOT,exp:r}:void 0)}}render(){return r("div",{key:"30b9f2fbe27c8277633ef02fbebbafb227387ed8",class:"expression"},this.label&&r("limel-header",{key:"05b193ac0ec191b1f9394ed48691c24e534ba66c",heading:this.label}),r("limebb-lime-query-filter-expression",{key:"83b6a42631b886735502a8ec6454f5e9c868cc4c",platform:this.platform,context:this.context,label:"Not",limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression.exp,onExpressionChange:this.handleExpressionChange}))}};x.style='@charset "UTF-8";.expression{display:flex;flex-direction:column;margin-bottom:1rem;gap:1rem;padding:1rem;border-left:0.25rem solid rgb(var(--contrast-400));background-color:rgb(var(--contrast-100))}';const w={timestamp:"time",createdtime:"time",updatedtime:"time",id:"integer",createduser:"integer",updateduser:"integer",descriptive:"string"},k={date:"date",time:"datetime",timeofday:"time",month:"month",quarter:"quarter",year:"year"};const _=class{constructor(r){e(this,r),this.change=t(this,"change"),this.label="Value",this.inputMode="value",this.handleTextChange=e=>{e.stopPropagation();const t=e.detail,r=Number(t);Number.isNaN(r)||""===t?this.change.emit(t):this.change.emit(r)},this.handleSelectChange=e=>{e.stopPropagation();const t=e.detail;Array.isArray(t)?this.change.emit(t.map((e=>e.value))):this.change.emit(null==t?void 0:t.value)},this.handleBooleanChange=e=>{e.stopPropagation();const t=e.detail;Array.isArray(t)||this.change.emit("true"===(null==t?void 0:t.value))},this.handleDateChange=e=>{e.stopPropagation();const t=e.detail;this.change.emit(t?t.toISOString():null)},this.handleMultiValueChange=e=>{e.stopPropagation();const t=e.detail.split(",").map((e=>e.trim())).filter((e=>e.length>0));this.change.emit(t)},this.handleModeToggle=()=>{"value"===this.inputMode?(this.inputMode="placeholder",this.change.emit("%activeObject%")):(this.inputMode="value",this.change.emit(""))},this.handlePlaceholderPropertyChange=e=>{e.stopPropagation();const t=this.buildPlaceholderValue(e.detail);this.change.emit(t)}}componentWillLoad(){this.isPlaceholder(this.value)&&(this.inputMode="placeholder")}componentWillUpdate(){this.isPlaceholder(this.value)&&"placeholder"!==this.inputMode?this.inputMode="placeholder":this.isPlaceholder(this.value)||"placeholder"!==this.inputMode||(this.inputMode="value")}isPlaceholder(e){return"string"==typeof e&&e.startsWith("%activeObject%")}parsePlaceholderPath(e){return this.isPlaceholder(e)?e.replace(/^%activeObject%\.?/,""):""}buildPlaceholderValue(e){return e?`%activeObject%.${e}`:"%activeObject%"}render(){return this.operator?r(i,null,this.renderModeToggle(),this.renderInputByMode()):null}renderInputByMode(){return"placeholder"===this.inputMode?this.renderPlaceholderInput():this.renderValueInputByType()}renderModeToggle(){if(!this.activeLimetype)return null;const e="placeholder"===this.inputMode;return r("limel-icon-button",{class:"mode-toggle",icon:e?"text":"link",label:e?"Use Value":"Use Placeholder",onClick:this.handleModeToggle})}renderPlaceholderInput(){const e=this.parsePlaceholderPath(this.value);return r("div",{class:"placeholder-input"},r("limebb-property-selector",{platform:this.platform,context:this.context,limetype:this.activeLimetype,label:"Active Object Property",value:e,required:!1,helperText:"Select property from the active object",onChange:this.handlePlaceholderPropertyChange}),this.renderPlaceholderPreview())}renderPlaceholderPreview(){if(this.isPlaceholder(this.value))return r("div",{class:"placeholder-preview"},r("limel-icon",{name:"info",size:"small"}),r("span",null,"Placeholder: ",this.value))}renderValueInputByType(){if(this.operator===s.IN)return this.renderMultiValueInput();const e=this.getProperty();if(!e)return this.renderTextInput();const t=function(e){return"system"===e.type?function(e){const t=e.replace(/^_/,"");return w[t]||"string"}(e.name):e.type}(e);switch(t){case"integer":case"decimal":return this.renderNumberInput(t);case"yesno":return this.renderBooleanInput();case"option":return this.renderOptionInput(e);case"date":case"time":case"timeofday":case"year":case"month":case"quarter":return this.renderDateTimeInput(t);default:return this.renderTextInput()}}renderTextInput(){var e;return r("limel-input-field",{label:this.label,value:(null===(e=this.value)||void 0===e?void 0:e.toString())||"",placeholder:"Enter value",onChange:this.handleTextChange})}renderNumberInput(e){var t;const i="integer"===e?1:.01;return r("limel-input-field",{label:this.label,type:"number",value:(null===(t=this.value)||void 0===t?void 0:t.toString())||"",step:i,onChange:this.handleTextChange})}renderBooleanInput(){const e=[{text:"True",value:"true"},{text:"False",value:"false"}],t=!0===this.value||"true"===this.value?"true":"false",i=e.find((e=>e.value===t));return r("limel-select",{label:this.label,options:e,value:i,onChange:this.handleBooleanChange})}renderOptionInput(e){if(!e.options||0===e.options.length)return this.renderTextInput();const t=e.options.map((e=>({text:e.text||e.key,value:e.key}))),i=t.find((e=>e.value===this.value));return r("limel-select",{label:this.label,options:t,value:i,onChange:this.handleSelectChange})}renderDateTimeInput(e){const t="string"==typeof this.value?new Date(this.value):this.value;return r("limel-date-picker",{label:this.label,value:t,type:k[e]||"date",onChange:this.handleDateChange})}renderMultiValueInput(){const e=Array.isArray(this.value)?this.value.join(", "):this.value||"";return r("limel-input-field",{label:this.label+" (comma-separated)",value:e,placeholder:"e.g., won, lost, tender",onChange:this.handleMultiValueChange})}getProperty(){if(this.limetypes&&this.limetype&&this.propertyPath)return b(this.limetypes,this.limetype,this.propertyPath)}};(function(e,t,r,i){var o,s=arguments.length,l=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(l=(s<3?o(l):s>3?o(t,r,l):o(t,r))||l);s>3&&l&&Object.defineProperty(t,r,l)})([l()],_.prototype,"limetypes",void 0),_.style=":host{display:flex;gap:0.5rem}:host>*{flex-grow:1}*{box-sizing:border-box}.value-input-container{display:flex;flex-direction:row;align-items:flex-start;gap:0.5rem;width:100%}.mode-toggle{flex-shrink:0;flex-grow:0}.placeholder-input{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem}.placeholder-preview{display:flex;align-items:center;gap:0.5rem;padding:0.5rem;background-color:rgba(var(--color-blue-light), 0.1);border-radius:var(--border-radius-small);font-size:0.875rem;color:rgb(var(--color-blue-default));border-left:3px solid rgb(var(--color-blue-default))}.placeholder-preview limel-icon{flex-shrink:0;color:rgb(var(--color-blue-default))}.placeholder-preview span{font-family:var(--font-monospace);word-break:break-all}";export{f as limebb_lime_query_filter_comparison_editor,y as limebb_lime_query_filter_group,x as limebb_lime_query_filter_not,_ as limebb_lime_query_value_input}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as s,g as i}from"./p-
|
|
1
|
+
import{r as t,h as e,H as s,g as i}from"./p-DYpn0EkA.js";import{b as o}from"./p-CqRNpSRV.js";const h=class{constructor(e){t(this,e),this.shouldRender=!1}componentWillLoad(){this.compileAndEvaluate()}onRuleChange(){this.compileAndEvaluate()}onScopeChange(){this.compileAndEvaluate()}render(){return e(s,{key:"8fe8b9fad90211b80b4672563f6d599ce1cb11c3",hidden:!this.shouldRender},e("slot",{key:"f434d25308b85fd084d369ccf2b0e22bd3513210"}))}get ruleRegistry(){return this.platform.get(o.RuleRegistry)}compileAndEvaluate(){var t;if(this.rule)try{const e=this.ruleRegistry.compile(this.rule),s=null!==(t=this.scope)&&void 0!==t?t:this.ruleRegistry.scope({host:this.host});this.shouldRender=e(s)}catch(t){console.warn("rule-gate failed to compile rule; hiding slot",{rule:this.rule,error:t}),this.shouldRender=!1}else this.shouldRender=!0}get host(){return i(this)}static get watchers(){return{rule:[{onRuleChange:0}],scope:[{onScopeChange:0}]}}};h.style=":host{display:block}:host([hidden]){display:none}";export{h as limebb_rule_gate}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as r,H as a}from"./p-BIwHMk6j.js";import{b as l}from"./p-C84z8BwL.js";import{g as t,n as o}from"./p-Cg1DC15C.js";const i=1e-4,s=class{constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.locale="en",this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(e){this.numValue=this.parseValue(e)}componentWillLoad(){try{this.locale=this.platform.get(l.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(e){console.warn(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"c57fbde9785115a91c28db17ccebee42a335a80f",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"27d6dada52041ce9ebec9d987bae303afacfff89",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"2afd6d0ff95eace6fac444fd3e2732d22ab97728",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=t(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,i)*(100-a):e/Math.max(Math.abs(this.rangeMin),i)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(o(this.unifyMinusSign(e),this.locale)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=this.numberFormat.format(r);return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:[{valueChanged:0}]}}};s.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{s as limebb_percentage_visualizer}
|
|
1
|
+
import{r as e,h as r,H as a}from"./p-DYpn0EkA.js";import{b as l}from"./p-CqRNpSRV.js";import{g as t,n as o}from"./p-Cg1DC15C.js";const i=1e-4,s=class{constructor(a){e(this,a),this.rangeMax=100,this.rangeMin=0,this.multiplier=1,this.reducePresence=!0,this.displayPercentageColors=!1,this.locale="en",this.labelId="label-"+crypto.randomUUID(),this.helperTextId="helper-text-"+crypto.randomUUID(),this.zeroPointId="zero-point-"+crypto.randomUUID(),this.renderHelperLine=()=>{if(this.hasHelperText())return r("limel-helper-line",{helperTextId:this.helperTextId,helperText:this.helperText,invalid:this.invalid})},this.hasHelperText=()=>null!=this.helperText}valueChanged(e){this.numValue=this.parseValue(e)}componentWillLoad(){try{this.locale=this.platform.get(l.UserPreferencesRepository).get("locale"),this.numberFormat=new Intl.NumberFormat(this.locale)}catch(e){console.warn(`Could not get user's locale (${this.locale}), falling back to 'en'.`),this.locale="en",this.numberFormat=new Intl.NumberFormat("en")}this.numValue=this.parseValue(this.value)}componentDidLoad(){this.triggerRangeWarning()}componentWillUpdate(){this.triggerRangeWarning()}triggerRangeWarning(){this.rangeMin>=this.rangeMax&&console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`)}render(){const e=this.getNormalizedValue(),l=this.getZeroPointPosition();return r(a,{key:"ea0690be403aa9c1e4e1fc82b788ad159a8a4cc3",class:this.getContainerClassList(),style:{"--limebb-percentage-visualizer-zero-point-position":`${l}%`,"--limebb-percentage-visualizer-width":`${Math.abs(e)}%`,"--limebb-percentage-visualizer-rotate":e>=0?"0deg":"180deg"}},r("limel-notched-outline",{key:"77b09269ca09806a33b6297692ca7cf79ee68a53",tabIndex:0,role:"meter","aria-valuemin":this.rangeMin,"aria-valuemax":this.rangeMax,"aria-valuenow":this.numValue,"aria-labelledby":this.labelId,"aria-describedby":this.helperTextId,label:this.label,labelId:this.labelId,invalid:this.invalid,required:this.required,hasValue:!0,hasFloatingLabel:!0,"aria-controls":this.helperTextId},r("div",{key:"7b3905e69e8d5b372f7736a9ec40576a23b10385",slot:"content"},this.renderVisualization())),this.renderHelperLine())}renderVisualization(){if(!this.reducePresence||0!==this.numValue&&this.hasValue())return this.hasValue()?[r("div",{class:"percentage-bar"},r("div",{class:"percentage-fill"}),this.renderZeroPoint()),r("span",{class:"percentage-text"},this.formatValue(this.numValue),r("span",{class:"percent-sign"},"%"))]:r("span",{class:"no-value"},"–")}renderZeroPoint(){if(!(this.rangeMin>=0||this.rangeMax<=0))return[r("div",{id:this.zeroPointId,class:"zero-point"}),r("limel-tooltip",{elementId:this.zeroPointId,openDirection:"top",label:"0"})]}hasValue(){return null!=this.value&&""!==this.value}getContainerClassList(){if(!this.hasValue())return;const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=t(e);return Object.assign({},r&&{[r]:!0})}getZeroPointPosition(){const e=this.rangeMax-this.rangeMin;return e<=0?0:(0-this.rangeMin)/e*100}getNormalizedValue(){const e=this.roundValue(this.multiplyByMultiplier(this.numValue)),r=this.rangeMax-this.rangeMin;if(r<=0)return 0;const a=(0-this.rangeMin)/r*100;return e>=0?e/Math.max(this.rangeMax,i)*(100-a):e/Math.max(Math.abs(this.rangeMin),i)*a}multiplyByMultiplier(e){return e*this.multiplier}roundValue(e){return Math.round(10*e)/10}unifyMinusSign(e){return e.replaceAll("−","-")}convertToUnicodeMinus(e){return e.replaceAll("-","−")}parseValue(e){return"string"==typeof e?Number.parseFloat(o(this.unifyMinusSign(e),this.locale)):e}formatValue(e){const r=this.roundValue(this.multiplyByMultiplier(e)),a=this.numberFormat.format(r);return r<0?this.convertToUnicodeMinus(a):a}static get watchers(){return{value:[{valueChanged:0}]}}};s.style='@charset "UTF-8";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^="-"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:"";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^="-"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}';export{s as limebb_percentage_visualizer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as r}from"./p-
|
|
1
|
+
import{r as e,h as r}from"./p-DYpn0EkA.js";import{b as t}from"./p-CqRNpSRV.js";import{c as o}from"./p-C2JP2nLw.js";const i=36e5,n=24*i,a=[{unit:"year",ms:365*n},{unit:"month",ms:30*n},{unit:"week",ms:7*n},{unit:"day",ms:n},{unit:"hour",ms:i},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}];function s(e,r){var t;const o=e.getTime()-Date.now(),{unit:i,ms:n}=null!==(t=a.find((e=>Math.abs(o)>=e.ms)))&&void 0!==t?t:a.at(-1);return new Intl.RelativeTimeFormat(r,{style:"long"}).format(Math.round(o/n),i)}const l=class{constructor(t){e(this,t),this.items=[],this.relativeDates=!0,this.renderCell=e=>r("div",null,r("dt",null,r("span",null,e.label)),r("dd",null,r("span",null,this.renderValue(e))))}render(){const e=this.items.some((e=>!e.secondary));return[this.renderPrimary(e),this.renderSecondary(e)]}renderPrimary(e){if(!e)return;const t=this.items.filter((e=>!e.secondary));return r("dl",{class:"primary"},this.renderImageCell(),t.map(this.renderCell))}renderSecondary(e){const t=this.items.filter((e=>e.secondary));if(0!==t.length)return r("dl",{class:"secondary"},!e&&this.renderImageCell(),t.map(this.renderCell))}renderImageCell(){var e;if(this.image)return r("div",{class:"image-cell"},r("img",{src:this.image.src,alt:this.image.alt,loading:null!==(e=this.image.loading)&&void 0!==e?e:"lazy"}))}renderValue(e){if(null==e.value||""===e.value)return"–";if("belongsto"===e.type){const t=this.getBelongsToHref(e.field);return t?r("a",{class:"belongs-to",href:t},e.value):e.value}if("phone"===e.type)return r("a",{href:this.toTelUri(e.value)},e.value);if("email"===e.type)return r("a",{href:`mailto:${e.value}`},e.value);if("link"===e.type)return r("a",{href:this.ensureUrlProtocol(e.value),target:"_blank",rel:"noopener"},this.stripUrlPrefix(e.value));if("time"===e.type||"date"===e.type){const t=new Date(e.value);if(Number.isNaN(t.getTime()))return e.value;if(!this.relativeDates)return this.formatAbsoluteDate(t,e.type);const i=o();return[r("span",{id:i},s(t,this.language)),r("limel-tooltip",{elementId:i,label:this.formatAbsoluteDate(t,e.type)})]}return"percent"===e.type?r("limebb-percentage-visualizer",{value:Number(e.value),multiplier:100,displayPercentageColors:!0,reducePresence:!1}):e.value}toTelUri(e){return`tel:${e.replaceAll(" ","")}`}ensureUrlProtocol(e){return/^https?:\/\//i.test(e)?e:`https://${e}`}stripUrlPrefix(e){return e.replace(/^https?:\/\//,"").replace(/^www\./,"")}getBelongsToHref(e){var r;if(this.limeobject&&e)try{const t=this.limeobject.getValue(e);if(!t||"object"!=typeof t)return;const o=null===(r=t.getLimetype)||void 0===r?void 0:r.call(t);if(!(null==o?void 0:o.name)||!t.id)return;return`object/${o.name}/${t.id}`}catch(e){return}}get language(){var e;try{return null===(e=this.platform)||void 0===e?void 0:e.get(t.Application).getLanguage()}catch(e){return navigator.language}}formatAbsoluteDate(e,r){var o;try{const i=null===(o=this.platform)||void 0===o?void 0:o.get(t.DateTimeFormatter);if(i)return i.format(e,r)}catch(e){}return e.toLocaleString(this.language,{dateStyle:"long",timeStyle:"time"===r?"short":void 0})}};l.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-data-cells){box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;padding:var(--limebb-data-cells-padding)}div{display:flex;flex-direction:column}dl{display:flex;flex-wrap:wrap;gap:0.75rem 1rem;margin:0;padding:0;list-style:none}dd,dt{display:flex;align-items:center}dd span,dt span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}dd{margin:0;font-size:var(--limel-theme-default-font-size);line-height:1.25rem;height:1.25rem;font-weight:500;color:rgb(var(--contrast-1100))}dd a{text-decoration:none;border-radius:1.25rem}dd a:focus{outline:none}dd a:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}dd a:not(.belongs-to){position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}dd a:not(.belongs-to):hover{color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):hover:before{opacity:0.3;transform:scale(1)}dd a.belongs-to{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);color:inherit;background-color:rgb(var(--contrast-400));padding:1px 0.375rem}dd a.belongs-to:hover,dd a.belongs-to:focus-visible{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default))}dd:has(.belongs-to){transform:translateX(-0.375rem)}dt{order:1;transition:color 0.2s ease;font-size:0.65rem;color:rgb(var(--contrast-800))}:host(:hover) dt,:host(:focus-within) dt{color:rgb(var(--contrast-900))}.primary+.secondary{padding-top:0.5rem;border-top:1px dashed rgb(var(--contrast-500))}.secondary dd{font-size:0.75rem;font-weight:400;line-height:1rem;height:1rem}div.image-cell{flex-shrink:0}div.image-cell img{display:block;width:2.5rem;height:2.5rem;border-radius:var(--data-cells-image-border-radius, 50%);object-fit:var(--data-cells-image-object-fit, cover);background-color:rgb(var(--color-white));box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.25)}';export{l as limebb_data_cells}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as r,h as i,H as o}from"./p-BIwHMk6j.js";import{b as a}from"./p-C84z8BwL.js";const s=class{constructor(o){e(this,o),this.interact=r(this,"interact"),this.renderRelations=()=>{var e,r,o;if(null===(r=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===r?void 0:r.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderAssigneesAvatar=e=>e.picture?i("img",{loading:"lazy",src:e.picture,alt:e.name.text}):i("limel-icon",{name:e.icon.name,style:{color:`${e.icon.color}`,"background-color":`${e.icon.backgroundColor}`}}),this.createMenuItem=e=>{var r,i;return"separator"in e?e:{value:e,text:null!==(r=e.label)&&void 0!==r?r:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=e=>{var r;e.stopPropagation();const i=null===(r=e.detail.value)||void 0===r?void 0:r.command;i&&this.commandbus.handle(i)},this.handleKeyDown=e=>{"Enter"===e.key&&this.handleKanbanItemClick()},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,r;return i(o,{key:"0d3c75642c2ea8ec42e475ef7a5e206f408eb446",id:this.item.id.toString(),class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"is-selected":!!(null===(r=this.item)||void 0===r?void 0:r.selected)},style:{"--limebb-kanban-item-color-code":`${this.item.color}`},onClick:this.handleKanbanItemClick,onKeyDown:this.handleKeyDown},this.renderHeader(),this.renderContent(),this.renderSlot(),this.renderRelations(),this.renderFooter())}renderHeader(){return i("div",{class:"header"},this.renderIcon(),this.renderHeading(),this.renderUnpromotedActionsMenu())}renderIcon(){var e,r,o,a;if(this.item.icon)return i("limel-icon",{class:"icon",badge:!0,name:null!==(r=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==r?r:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){if(this.item.value)return i("div",{class:"content"},this.renderValue())}renderHeading(){if(this.item.heading)return i("limel-markdown",{class:"heading",value:this.item.heading})}renderValue(){if(this.item.value)return i("limel-markdown",{class:"body reset-img-height",value:this.item.value})}renderUnpromotedActionsMenu(){var e,r;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon",{class:"actions",name:"menu_2",slot:"trigger",size:"small",id:"item-actions-tooltip"}),i("limel-tooltip",{elementId:"item-actions-tooltip",label:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.more-actions"),openDirection:"top-end"}))}renderSlot(){var e;if(null===(e=this.item)||void 0===e?void 0:e.bodyComponent)return i("slot",{name:"body"})}renderFooter(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"footer"},this.renderAssignees())}renderAssignees(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"assignees"},this.item.assignees.map((e=>{var r;return i("limebb-summary-popover",Object.assign({icon:null===(r=e.icon)||void 0===r?void 0:r.name},e.picture&&{image:{src:e.picture,alt:e.name.text||""}},{heading:e.name.text,value:this.createLinkToAssignee(e)}),i("a",{slot:"trigger",class:"assignee",href:e.name.href,title:e.name.text},this.renderAssigneesAvatar(e),i("span",null,e.name.text)))})))}createLinkToAssignee(e){const r=this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+e.name.text+"</b>"});return`<a class="author" href="${e.name.href}" title="${e.name.text}">${r}</a>`}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}};s.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-kanban-item){position:relative;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}:host(limebb-kanban-item):before{content:"";display:block;position:absolute;top:1rem;bottom:1rem;right:0;transform:translateX(50%);width:0.25rem;border-radius:1rem;background-color:var(--limebb-kanban-item-color-code)}.content{padding-top:0.25rem}.header{display:flex;align-items:flex-start;gap:0.5rem;min-height:1.75rem;padding:0.25rem 0.5rem;border-radius:0.5rem 0.5rem 0 0;background-color:rgb(var(--contrast-300))}.header a{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary);text-decoration:none}.header a:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}.header a:hover{color:rgb(var(--color-teal-light))}.header a:hover:before{opacity:0.3;transform:scale(1)}.heading{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.unpromoted-actions-menu{margin:-0.5rem -0.5rem -0.25rem auto}.body{--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:0.5rem;display:block;padding-left:0.5rem;padding-right:0.5rem;margin-top:-0.5rem;color:rgb(var(--contrast-1100));max-height:12rem;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem)}limel-chip-set{--limel-chip-size:1.5rem;display:block;margin-left:-0.5rem;margin-right:0.5rem;padding-bottom:0.5rem}.footer{position:relative;display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.25rem 0.125rem;margin:0 0.25rem;border-top:1px dashed rgb(var(--contrast-300))}.header limel-icon,.footer limel-icon{flex-shrink:0;width:1.25rem;height:1.25rem}.header .actions{margin:0.5rem 0.25rem 0}.header .actions:hover{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.header .actions:hover:hover,.header .actions:hover:focus,.header .actions:hover:focus-visible{will-change:color, background-color, box-shadow, transform}.header .actions:hover:hover,.header .actions:hover:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.header .actions:hover:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.header .actions:hover:hover,.header .actions:hover:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.footer img{border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);flex-shrink:0;width:1.25rem;height:1.25rem}.assignees{display:flex;align-items:center;gap:0.25rem}.assignees:has(>:nth-child(2)) span{display:none}.assignees:has(>:nth-child(2)) img,.assignees:has(>:nth-child(2)) limel-icon{margin-right:-0.5rem}.assignees:hover img,.assignees:hover limel-icon,.assignees:focus-within img,.assignees:focus-within limel-icon{margin-right:0rem}.assignees:hover .assignee:not(:hover):not(:focus-visible) img,.assignees:hover .assignee:not(:hover):not(:focus-visible) limel-icon,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) img,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) limel-icon{filter:grayscale(1);opacity:0.6}.assignee{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent;display:flex;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.assignee:hover,.assignee:focus,.assignee:focus-visible{will-change:color, background-color, box-shadow, transform}.assignee:hover,.assignee:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.assignee:hover{box-shadow:var(--button-shadow-hovered)}.assignee:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.assignee:hover,.assignee:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.assignee:focus{outline:none}.assignee:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.assignee limel-icon,.assignee img{transition:margin 0.2s ease, opacity 0.2s ease, filter 0.2s ease}.assignee limel-icon{padding:0.125rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);background-color:rgb(var(--contrast-100))}.assignee span{font-size:0.75rem;color:rgb(var(--contrast-900));padding-right:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}slot[name=body]{display:block;padding:0.5rem}';export{s as limebb_kanban_item}
|
|
1
|
+
import{r as e,c as r,h as i,H as o}from"./p-DYpn0EkA.js";import{b as a}from"./p-CqRNpSRV.js";const s=class{constructor(o){e(this,o),this.interact=r(this,"interact"),this.renderRelations=()=>{var e,r,o;if(null===(r=null===(e=this.item)||void 0===e?void 0:e.relations)||void 0===r?void 0:r.length)return i("limel-chip-set",{value:null===(o=this.item)||void 0===o?void 0:o.relations})},this.renderAssigneesAvatar=e=>e.picture?i("img",{loading:"lazy",src:e.picture,alt:e.name.text}):i("limel-icon",{name:e.icon.name,style:{color:`${e.icon.color}`,"background-color":`${e.icon.backgroundColor}`}}),this.createMenuItem=e=>{var r,i;return"separator"in e?e:{value:e,text:null!==(r=e.label)&&void 0!==r?r:"",secondaryText:e.description,disabled:e.disabled,icon:null!==(i=e.icon)&&void 0!==i?i:""}},this.handleMenuItemSelect=e=>{var r;e.stopPropagation();const i=null===(r=e.detail.value)||void 0===r?void 0:r.command;i&&this.commandbus.handle(i)},this.handleKeyDown=e=>{"Enter"===e.key&&this.handleKanbanItemClick()},this.handleKanbanItemClick=()=>{this.interact.emit(this.item)}}render(){var e,r;return i(o,{key:"ee9ebc5f113a4fd3202c3d8a7f4d4c52d6b6fd82",id:this.item.id.toString(),class:{"has-unpromoted-actions":!!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length),"is-selected":!!(null===(r=this.item)||void 0===r?void 0:r.selected)},style:{"--limebb-kanban-item-color-code":`${this.item.color}`},onClick:this.handleKanbanItemClick,onKeyDown:this.handleKeyDown},this.renderHeader(),this.renderContent(),this.renderSlot(),this.renderRelations(),this.renderFooter())}renderHeader(){return i("div",{class:"header"},this.renderIcon(),this.renderHeading(),this.renderUnpromotedActionsMenu())}renderIcon(){var e,r,o,a;if(this.item.icon)return i("limel-icon",{class:"icon",badge:!0,name:null!==(r=null===(e=this.item.icon)||void 0===e?void 0:e.name)&&void 0!==r?r:"dot_circle",style:{color:`${null===(o=this.item.icon)||void 0===o?void 0:o.color}`,"background-color":`${null===(a=this.item.icon)||void 0===a?void 0:a.backgroundColor}`}})}renderContent(){if(this.item.value)return i("div",{class:"content"},this.renderValue())}renderHeading(){if(this.item.heading)return i("limel-markdown",{class:"heading",value:this.item.heading})}renderValue(){if(this.item.value)return i("limel-markdown",{class:"body reset-img-height",value:this.item.value})}renderUnpromotedActionsMenu(){var e,r;if(!(null===(e=this.item.unpromotedActions)||void 0===e?void 0:e.length))return;const o=this.item.unpromotedActions.map(this.createMenuItem);return i("limel-menu",{class:"unpromoted-actions-menu",items:o,openDirection:"bottom-end",onSelect:this.handleMenuItemSelect},i("limel-icon",{class:"actions",name:"menu_2",slot:"trigger",size:"small",id:"item-actions-tooltip"}),i("limel-tooltip",{elementId:"item-actions-tooltip",label:null===(r=this.translator)||void 0===r?void 0:r.get("webclient.more-actions"),openDirection:"top-end"}))}renderSlot(){var e;if(null===(e=this.item)||void 0===e?void 0:e.bodyComponent)return i("slot",{name:"body"})}renderFooter(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"footer"},this.renderAssignees())}renderAssignees(){var e;if(null===(e=this.item.assignees)||void 0===e?void 0:e.length)return i("div",{class:"assignees"},this.item.assignees.map((e=>{var r;return i("limebb-summary-popover",Object.assign({icon:null===(r=e.icon)||void 0===r?void 0:r.name},e.picture&&{image:{src:e.picture,alt:e.name.text||""}},{heading:e.name.text,value:this.createLinkToAssignee(e)}),i("a",{slot:"trigger",class:"assignee",href:e.name.href,title:e.name.text},this.renderAssigneesAvatar(e),i("span",null,e.name.text)))})))}createLinkToAssignee(e){const r=this.translator.get("webclient.actions.goto-object",{limetype:": <br><b>"+e.name.text+"</b>"});return`<a class="author" href="${e.name.href}" title="${e.name.text}">${r}</a>`}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.Translate)}get commandbus(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(a.CommandBus)}};s.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box}:host(limebb-kanban-item){position:relative;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem}:host(limebb-kanban-item):before{content:"";display:block;position:absolute;top:1rem;bottom:1rem;right:0;transform:translateX(50%);width:0.25rem;border-radius:1rem;background-color:var(--limebb-kanban-item-color-code)}.content{padding-top:0.25rem}.header{display:flex;align-items:flex-start;gap:0.5rem;min-height:1.75rem;padding:0.25rem 0.5rem;border-radius:0.5rem 0.5rem 0 0;background-color:rgb(var(--contrast-300))}.header a{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary);text-decoration:none}.header a:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:"";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}.header a:hover{color:rgb(var(--color-teal-light))}.header a:hover:before{opacity:0.3;transform:scale(1)}.heading{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.unpromoted-actions-menu{margin:-0.5rem -0.5rem -0.25rem auto}.body{--limel-top-edge-fade-height:0.5rem;--limel-bottom-edge-fade-height:0.5rem;display:block;padding-left:0.5rem;padding-right:0.5rem;margin-top:-0.5rem;color:rgb(var(--contrast-1100));max-height:12rem;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem)}limel-chip-set{--limel-chip-size:1.5rem;display:block;margin-left:-0.5rem;margin-right:0.5rem;padding-bottom:0.5rem}.footer{position:relative;display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.25rem 0.125rem;margin:0 0.25rem;border-top:1px dashed rgb(var(--contrast-300))}.header limel-icon,.footer limel-icon{flex-shrink:0;width:1.25rem;height:1.25rem}.header .actions{margin:0.5rem 0.25rem 0}.header .actions:hover{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal)}.header .actions:hover:hover,.header .actions:hover:focus,.header .actions:hover:focus-visible{will-change:color, background-color, box-shadow, transform}.header .actions:hover:hover,.header .actions:hover:focus-visible{transform:translate3d(0, -0.04rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.header .actions:hover:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.header .actions:hover:hover,.header .actions:hover:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.footer img{border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);flex-shrink:0;width:1.25rem;height:1.25rem}.assignees{display:flex;align-items:center;gap:0.25rem}.assignees:has(>:nth-child(2)) span{display:none}.assignees:has(>:nth-child(2)) img,.assignees:has(>:nth-child(2)) limel-icon{margin-right:-0.5rem}.assignees:hover img,.assignees:hover limel-icon,.assignees:focus-within img,.assignees:focus-within limel-icon{margin-right:0rem}.assignees:hover .assignee:not(:hover):not(:focus-visible) img,.assignees:hover .assignee:not(:hover):not(:focus-visible) limel-icon,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) img,.assignees:focus-within .assignee:not(:hover):not(:focus-visible) limel-icon{filter:grayscale(1);opacity:0.6}.assignee{transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:transparent;display:flex;align-items:center;text-decoration:none;gap:0.25rem;margin-left:0;border-radius:1rem}.assignee:hover,.assignee:focus,.assignee:focus-visible{will-change:color, background-color, box-shadow, transform}.assignee:hover,.assignee:focus-visible{transform:translate3d(0, 0.01rem, 0);color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}.assignee:hover{box-shadow:var(--button-shadow-hovered)}.assignee:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}.assignee:hover,.assignee:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}.assignee:focus{outline:none}.assignee:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.assignee limel-icon,.assignee img{transition:margin 0.2s ease, opacity 0.2s ease, filter 0.2s ease}.assignee limel-icon{padding:0.125rem;box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.4);background-color:rgb(var(--contrast-100))}.assignee span{font-size:0.75rem;color:rgb(var(--contrast-900));padding-right:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}slot[name=body]{display:block;padding:0.5rem}';export{s as limebb_kanban_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as e}from"./p-DYpn0EkA.js";import{n as s}from"./p-CqRNpSRV.js";import{i as o}from"./p-y_s8hZmV.js";const r=class{constructor(e){i(this,e),this.expressionChange=t(this,"expressionChange"),this.handleAddFirstCondition=()=>{this.expressionChange.emit({key:"",op:s.EQUALS,exp:""})},this.handlePromoteAndAdd=()=>{this.expression&&this.expressionChange.emit({op:s.AND,exp:[this.expression,{key:"",op:s.EQUALS,exp:""}]})},this.handleExpressionChange=i=>{var t;i.stopPropagation(),this.expressionChange.emit(null!==(t=i.detail)&&void 0!==t?t:void 0)}}render(){return this.expression?this.needsPromotion()?this.renderWithPromotionButton():e("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}):this.renderEmptyState()}needsPromotion(){return!!this.expression&&!o(this.expression)}renderEmptyState(){return e("limel-button",{label:"Condition",icon:{name:"plus_math",title:"Add"},onClick:this.handleAddFirstCondition})}renderWithPromotionButton(){return e("div",{class:"expression-with-promotion"},e("limebb-lime-query-filter-expression",{platform:this.platform,context:this.context,limetype:this.limetype,activeLimetype:this.activeLimetype,expression:this.expression,onExpressionChange:this.handleExpressionChange}),e("limel-button",{label:"Add another condition",icon:"plus_math",onClick:this.handlePromoteAndAdd}))}};r.style=".expression-with-promotion{display:flex;flex-direction:column;gap:1rem}limel-button{width:100%}.query-options-section{margin-top:1rem}";export{r as limebb_lime_query_filter_builder}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t}from"./p-
|
|
1
|
+
import{h as t}from"./p-DYpn0EkA.js";const e=(e,c)=>t(e.name,Object.assign({class:e.class},function(t){let e={};return t.props&&(e=Object.assign({},t.props)),Object.assign({context:t.context,platform:t.platform},e)}(e),{key:e.key}),c);export{e as L}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as n,a as r}from"./p-
|
|
1
|
+
import{i as n,a as r}from"./p-CqRNpSRV.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 u(o,t){const i=e(o,t);return!!i&&function(o){return n(o)&&!r(o)}(i)}function l(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{l as a,i as b,e as c,t as g,u as h}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,g as n}from"./p-BIwHMk6j.js";var r={};function e(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function i(t){return t&&["belongsto","hasone"].includes(t.type)}function o(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}r.LimeTypeRepository="state.limetypes";var u="context-request";function c(t,n){let r,e={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:e})),r}function f(t){if(t.platform)return t.platform;let r=c(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}var s="context";function a(t){return t.context?t.context:c(n(t),s)}var l=function(t,n){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},l(t,n)};function h(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}l(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function v(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],e=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),o=[];try{for(;!(r=i.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o}function b(t,n,r){if(2===arguments.length)for(var e,i=0,o=n.length;i<o;i++)(e||!(i in n))&&(e||=Array.prototype.slice.call(n,0,i),e[i]=n[i]);return t.concat(e||Array.prototype.slice.call(n))}function m(t){return"function"==typeof t}function p(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var d=p((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function g(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var w=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,e,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=v(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(m(f))try{f()}catch(t){i=t instanceof d?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=v(s),l=a.next();!l.done;l=a.next()){var h=l.value;try{x(h)}catch(t){i??=[],t instanceof d?i=b(b([],y(i)),y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}}if(i)throw new d(i)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)x(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&g(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&g(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),j=w.EMPTY;function O(t){return t instanceof w||t&&"closed"in t&&m(t.remove)&&m(t.add)&&m(t.unsubscribe)}function x(t){m(t)?t():t.unsubscribe()}function R(){}function E(t){t()}var S=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O(n)&&n.add(r)):r.destination=M,r}return h(n,t),n.create=function(t,n,r){return new A(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(w),k=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){C(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){C(t)}else C(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){C(t)}},t}(),A=function(t){function n(n,r,e){var i,o=t.call(this)||this;return i=m(n)||!n?{next:n??void 0,error:r??void 0,complete:e??void 0}:n,o.destination=new k(i),o}return h(n,t),n}(S);function C(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,b([t,n],y(r)))}((function(){throw t}))}(t)}var M={closed:!0,next:R,error:function(t){throw t},complete:R},T="function"==typeof Symbol&&Symbol.observable||"@@observable";function W(t){return t}var P=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var e=this,i=function(t){return t&&t instanceof S||function(t){return t&&m(t.next)&&m(t.error)&&m(t.complete)}(t)&&O(t)}(t)?t:new A(t,n,r);return E((function(){var t=e.operator,n=e.source;i.add(t?t.call(i,n):n?e._subscribe(i):e._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=$(n))((function(n,e){var i=new A({next:function(n){try{t(n)}catch(t){e(t),i.unsubscribe()}},error:e,complete:n});r.subscribe(i)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[T]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?W:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=$(t))((function(t,r){var e;n.subscribe((function(t){return e=t}),(function(t){return r(t)}),(function(){return t(e)}))}))},t.create=function(n){return new t(n)},t}();function $(t){return t??undefined??Promise}var _=p((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),q=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return h(n,t),n.prototype.lift=function(t){var n=new F(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new _},n.prototype.next=function(t){var n=this;E((function(){var r,e;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var i=v(n.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;E((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;E((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,e=r.observers;return r.hasError||r.isStopped?j:(this.currentObservers=null,e.push(t),new w((function(){n.currentObservers=null,g(e,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new P;return t.source=this,t},n.create=function(t,n){return new F(t,n)},n}(P),F=function(t){function n(n,r){var e=t.call(this)||this;return e.destination=n,e.source=r,e}return h(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??j},n}(q),L=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return h(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(q);function N(t){return t}function U(t,n){return(r,e)=>{let i=function(t,n,r,e){let i=B.get(t);return i||(i=[],B.set(t,i)),i.push({options:r,name:n,optionFactory:e.optionFactory||N,service:{name:e.name,method:e.method||"subscribe"}}),i}(r,e,t,n);1===i.length&&function(t,n){t.connectedCallback=I(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===H.get(this)?t?t.apply(this,r):void 0:I(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=G(t.componentDidUnload),t.disconnectedCallback=G(t.disconnectedCallback)}(r,i)}}var B=new WeakMap,D=new WeakMap,H=new WeakMap;function I(t,r){return function(...e){H.set(this,!0);let i=[];D.set(this,i);let c=new L(a(this));i.push(function(t,r){let e=n(t);return s in e?function(t,n){let r=Object.getOwnPropertyDescriptor(t,s),e=o(t,s);return n(e?.get?.call(t)),Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e?.get?.call(t),set:r=>{e?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,s,r):Reflect.deleteProperty(t,s)}}(e,r):function(t,n,r){let e,i={context:s,subscribe:!0,callback:(t,n)=>{r(t),n&&(e=n)}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:i})),()=>e?.()}(e,0,r)}(this,(t=>c.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),z(t.options)&&(t.options.context=c),J(this,t);if(t)return t.apply(this,e)}}function G(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=D.get(t);for(let t of n)t();D.set(t,[])}(this),r}}function z(t){return"context"in t}function J(t,n){let r=function(t,n){let r={...n.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(r,t);let e=n.service.name,i=f(t);if(!i.has(e))throw Error(`Service ${e} does not exist`);return i.get(e)[n.service.method](function(t,n){return r=>{t[n]=r}}(t,n.name),r)}(t,n);"function"==typeof r&&D.get(t).push(r)}function K(t={}){return U(t,{name:r.LimeTypeRepository})}function Q(t={}){let n={name:r.LimeTypeRepository};return t.map=[V,...t.map||[]],t.context=null,U(t,n)}function V(t){let n=a(this);if(n)return t[n.limetype]}function X(t={}){let n={name:r.LimeObjectRepository};return t.map=[Y,...t.map||[]],t.context=null,U(t,n)}function Y(t){let n=a(this);if(!n)return;let{limetype:r,id:e}=n;return t[r]?t[r].find((t=>t.id===e)):void 0}function Z(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],e=t;for(;n=tt(e);)r=[...r,n],e=Object.getPrototypeOf(e);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function tt(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function nt(t,n,r,e){var i,o=arguments.length,u=o<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(o<3?i(u):o>3?i(n,r,u):i(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var rt=class{context;filter;relation};rt=nt([Z({id:"limeobject.bulk-create-dialog"})],rt);var et=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};et=nt([Z({id:"limeobject.create-dialog"})],et);var it=class{context};it=nt([Z({id:"limeobject.delete-object"})],it);var ot=class{context};ot=nt([Z({id:"limeobject.object-access"})],ot);var ut=class{context;limeobject;route=!1;label};ut=nt([Z({id:"limeobject.save-object"})],ut);var ct=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ft={Count:"COUNT"};r.Query="query";var st={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var at,lt,ht=class{path;query;hash;state};function vt(t){return U(t,{name:r.ConfigRepository})}function yt(t={}){return U(t,{name:r.FilterRepository})}function bt(t,r){let e=new WeakMap;t.connectedCallback=function(t,r,e){return async function(...i){let o=r({component:this,host:n(this),registry:mt(this)});return e.set(this,o),t?.apply(this,i)}}(t.connectedCallback,r,e),t.disconnectedCallback=function(t,n){return function(...r){let e=t?.apply(this,r);return n.get(this)?.(),n.delete(this),e}}(t.disconnectedCallback,e)}function mt(t){let n=f(t),e=r.ContextRegistry;if(!n.has(e))throw Error(`Service ${e} does not exist`);return n.get(e)}function pt(t){return(n,r)=>{bt(n,function(t,n){let r=new WeakMap,e=new WeakMap,i=new WeakSet;function u(t,n){return{configurable:!0,enumerable:!0,get(){return t?.get?t.get.call(this):e.get(n)},set(i){let o=e.get(n);t?.set?.call(this,i),e.set(n,i),o!==i&&r.get(n)?.notify()}}}function c(t,r){let c=function(t,r){return function(t,n){let r=t;for(;r&&r!==HTMLElement.prototype;){if(Object.getOwnPropertyDescriptor(r,n))return!0;r=Object.getPrototypeOf(r)}return!1}(r,n)?r:t}(t,r);if(e.set(t,Reflect.get(c,n)),i.has(c))return;i.add(c);let f=o(Object.getPrototypeOf(c),n);Object.defineProperty(c,n,u(f,t))}function f(n,i,o){let u=o.provide(t,i,(()=>e.get(n)));return r.set(n,u),u}function s(t,n){return()=>{n.teardown(),r.delete(t)}}return({component:t,host:n,registry:r})=>(c(t,n),s(t,f(t,n,r)))}(t,r))}}function dt(t){return(n,r)=>{bt(n,function(t,n){return({component:r,host:e,registry:i})=>i.subscribe(t,e,(t=>{Reflect.set(r,n,t)}))}(t,r))}}function gt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===lt&&(lt=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),e=r.lastIndexOf("/");return-1===e?null:r.slice(e+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===at?at="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():at)),lt&&(t=`${lt}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}ht=nt([Z({id:"navigator.navigate"})],ht),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var wt=null;try{t((function(t,n){wt||=gt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let e=t instanceof Error?t.message:String(t),i=t instanceof Error?t:void 0;wt.error(e,i,r)}))}catch{}export{X as G,Z as H,K as L,gt as M,dt as O,Q as R,pt as T,i as a,r as b,st as c,yt as d,e as i,vt as l,ct as n,ft as r}
|
|
1
|
+
import{a as t,g as n}from"./p-DYpn0EkA.js";var r={};function e(t){return t&&["belongsto","hasone","hasmany","hasandbelongstomany"].includes(t.type)}function i(t){return t&&["belongsto","hasone"].includes(t.type)}function o(t,n){let r=t;for(;r;){let t=Object.getOwnPropertyDescriptor(r,n);if(t)return t;r=Object.getPrototypeOf(r)}}r.LimeTypeRepository="state.limetypes";var u="context-request";function c(t,n){let r,e={context:n,callback:t=>{r=t}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:e})),r}function f(t){if(t.platform)return t.platform;let r=c(n(t),"platform");if(!r)throw Error("Platform not available. Set the @Prop() platform value or provide it via ContextRegistry.provide('platform', ...) at boot.");return r}var s="context";function a(t){return t.context?t.context:c(n(t),s)}var l=function(t,n){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])},l(t,n)};function h(t,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}l(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function v(t){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&t[n],e=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,e,i=n.call(t),o=[];try{for(;!(r=i.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return o}function b(t,n,r){if(2===arguments.length)for(var e,i=0,o=n.length;i<o;i++)(e||!(i in n))&&(e||=Array.prototype.slice.call(n,0,i),e[i]=n[i]);return t.concat(e||Array.prototype.slice.call(n))}function m(t){return"function"==typeof t}function p(t){var n=t((function(t){Error.call(t),t.stack=Error().stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var d=p((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function g(t,n){if(t){var r=t.indexOf(n);0<=r&&t.splice(r,1)}}var w=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var t,n,r,e,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var u=v(o),c=u.next();!c.done;c=u.next())c.value.remove(this)}catch(n){t={error:n}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}else o.remove(this);var f=this.initialTeardown;if(m(f))try{f()}catch(t){i=t instanceof d?t.errors:[t]}var s=this._finalizers;if(s){this._finalizers=null;try{for(var a=v(s),l=a.next();!l.done;l=a.next()){var h=l.value;try{x(h)}catch(t){i??=[],t instanceof d?i=b(b([],y(i)),y(t.errors)):i.push(t)}}}catch(t){r={error:t}}finally{try{l&&!l.done&&(e=a.return)&&e.call(a)}finally{if(r)throw r.error}}}if(i)throw new d(i)}},t.prototype.add=function(n){if(n&&n!==this)if(this.closed)x(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=this._finalizers??[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&g(n,t)},t.prototype.remove=function(n){var r=this._finalizers;r&&g(r,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t;var n}(),j=w.EMPTY;function O(t){return t instanceof w||t&&"closed"in t&&m(t.remove)&&m(t.add)&&m(t.unsubscribe)}function x(t){m(t)?t():t.unsubscribe()}function R(){}function E(t){t()}var S=function(t){function n(n){var r=t.call(this)||this;return r.isStopped=!1,n?(r.destination=n,O(n)&&n.add(r)):r.destination=M,r}return h(n,t),n.create=function(t,n,r){return new A(t,n,r)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(w),k=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){C(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){C(t)}else C(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){C(t)}},t}(),A=function(t){function n(n,r,e){var i,o=t.call(this)||this;return i=m(n)||!n?{next:n??void 0,error:r??void 0,complete:e??void 0}:n,o.destination=new k(i),o}return h(n,t),n}(S);function C(t){!function(t){!function(t,n){var r=[...arguments].slice(2);setTimeout.apply(void 0,b([t,n],y(r)))}((function(){throw t}))}(t)}var M={closed:!0,next:R,error:function(t){throw t},complete:R},T="function"==typeof Symbol&&Symbol.observable||"@@observable";function W(t){return t}var P=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var r=new t;return r.source=this,r.operator=n,r},t.prototype.subscribe=function(t,n,r){var e=this,i=function(t){return t&&t instanceof S||function(t){return t&&m(t.next)&&m(t.error)&&m(t.complete)}(t)&&O(t)}(t)?t:new A(t,n,r);return E((function(){var t=e.operator,n=e.source;i.add(t?t.call(i,n):n?e._subscribe(i):e._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var r=this;return new(n=$(n))((function(n,e){var i=new A({next:function(n){try{t(n)}catch(t){e(t),i.unsubscribe()}},error:e,complete:n});r.subscribe(i)}))},t.prototype._subscribe=function(t){return this.source?.subscribe(t)},t.prototype[T]=function(){return this},t.prototype.pipe=function(){return function(t){return 0===t.length?W:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}([...arguments])(this)},t.prototype.toPromise=function(t){var n=this;return new(t=$(t))((function(t,r){var e;n.subscribe((function(t){return e=t}),(function(t){return r(t)}),(function(){return t(e)}))}))},t.create=function(n){return new t(n)},t}();function $(t){return t??undefined??Promise}var _=p((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),q=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return h(n,t),n.prototype.lift=function(t){var n=new D(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new _},n.prototype.next=function(t){var n=this;E((function(){var r,e;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||=Array.from(n.observers);try{for(var i=v(n.currentObservers),o=i.next();!o.done;o=i.next())o.value.next(t)}catch(t){r={error:t}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(r)throw r.error}}}}))},n.prototype.error=function(t){var n=this;E((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var r=n.observers;r.length;)r.shift().error(t)}}))},n.prototype.complete=function(){var t=this;E((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,r=this,e=r.observers;return r.hasError||r.isStopped?j:(this.currentObservers=null,e.push(t),new w((function(){n.currentObservers=null,g(e,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,r=n.isStopped;n.hasError?t.error(n.thrownError):r&&t.complete()},n.prototype.asObservable=function(){var t=new P;return t.source=this,t},n.create=function(t,n){return new D(t,n)},n}(P),D=function(t){function n(n,r){var e=t.call(this)||this;return e.destination=n,e.source=r,e}return h(n,t),n.prototype.next=function(t){var n,r;null==(r=(n=this.destination)?.next)||r.call(n,t)},n.prototype.error=function(t){var n,r;null==(r=(n=this.destination)?.error)||r.call(n,t)},n.prototype.complete=function(){var t,n;null==(n=(t=this.destination)?.complete)||n.call(t)},n.prototype._subscribe=function(t){return this.source?.subscribe(t)??j},n}(q),F=function(t){function n(n){var r=t.call(this)||this;return r._value=n,r}return h(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var r=t.prototype._subscribe.call(this,n);return!r.closed&&n.next(this._value),r},n.prototype.getValue=function(){var t=this,n=t._value;if(t.hasError)throw t.thrownError;return this._throwIfClosed(),n},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)},n}(q);function L(t){return t}function N(t,n){return(r,e)=>{let i=function(t,n,r,e){let i=U.get(t);return i||(i=[],U.set(t,i)),i.push({options:r,name:n,optionFactory:e.optionFactory||L,service:{name:e.name,method:e.method||"subscribe"}}),i}(r,e,t,n);1===i.length&&function(t,n){t.connectedCallback=H(t.connectedCallback,n),t.componentWillLoad=function(t,n){return function(...r){return!0===G.get(this)?t?t.apply(this,r):void 0:H(t,n).apply(this,r)}}(t.componentWillLoad,n),t.componentDidUnload=I(t.componentDidUnload),t.disconnectedCallback=I(t.disconnectedCallback)}(r,i)}}var U=new WeakMap,B=new WeakMap,G=new WeakMap;function H(t,r){return function(...e){G.set(this,!0);let i=[];B.set(this,i);let c=new F(a(this));i.push(function(t,r){let e=n(t);return s in e?function(t,n){let r=Object.getOwnPropertyDescriptor(t,s),e=o(t,s);return n(e?.get?.call(t)),Object.defineProperty(t,s,{configurable:!0,enumerable:!0,get:()=>e?.get?.call(t),set:r=>{e?.set?.call(t,r),n(r)}}),()=>{r?Object.defineProperty(t,s,r):Reflect.deleteProperty(t,s)}}(e,r):function(t,n,r){let e,i={context:s,subscribe:!0,callback:(t,n)=>{r(t),n&&(e=n)}};return t.dispatchEvent(new CustomEvent(u,{bubbles:!0,composed:!0,detail:i})),()=>e?.()}(e,0,r)}(this,(t=>c.next(t))));for(let t of r)t.options=t.optionFactory(t.options,this),Y(t.options)&&(t.options.context=c),z(this,t);if(t)return t.apply(this,e)}}function I(t){return async function(...n){let r;return t&&(r=t.apply(this,n)),function(t){let n=B.get(t);for(let t of n)t();B.set(t,[])}(this),r}}function Y(t){return"context"in t}function z(t,n){let r=function(t,n){let r={...n.options};!function(t,n){t.filter&&=t.filter.map((t=>t.bind(n))),t.map&&=t.map.map((t=>t.bind(n)))}(r,t);let e=n.service.name,i=f(t);if(!i.has(e))throw Error(`Service ${e} does not exist`);return i.get(e)[n.service.method](function(t,n){return r=>{t[n]=r}}(t,n.name),r)}(t,n);"function"==typeof r&&B.get(t).push(r)}function J(t={}){return N(t,{name:r.LimeTypeRepository})}function K(t={}){let n={name:r.LimeTypeRepository};return t.map=[Q,...t.map||[]],t.context=null,N(t,n)}function Q(t){let n=a(this);if(n)return t[n.limetype]}function V(t={}){let n={name:r.LimeObjectRepository};return t.map=[X,...t.map||[]],t.context=null,N(t,n)}function X(t){let n=a(this);if(!n)return;let{limetype:r,id:e}=n;return t[r]?t[r].find((t=>t.id===e)):void 0}function Z(t){return n=>{(function(t,n){t.commandId=n})(n,t.id),function(t,n){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let n,r=[],e=t;for(;n=tt(e);)r=[...r,n],e=Object.getPrototypeOf(e);return[...new Set(r)]}(t).includes(n)})}(n,t.id)}}function tt(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}function nt(t,n,r,e){var i,o=arguments.length,u=o<3?n:null===e?e=Object.getOwnPropertyDescriptor(n,r):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,n,r,e);else for(var c=t.length-1;c>=0;c--)(i=t[c])&&(u=(o<3?i(u):o>3?i(n,r,u):i(n,r))||u);return o>3&&u&&Object.defineProperty(n,r,u),u}r.LimeObjectRepository="state.limeobjects",r.CommandBus="commandBus";var rt=class{context;filter;relation};rt=nt([Z({id:"limeobject.bulk-create-dialog"})],rt);var et=class{limetype;limeobject;route=!1;title;subtitle;context;autoAttachRelation;saveCommand};et=nt([Z({id:"limeobject.create-dialog"})],et);var it=class{context};it=nt([Z({id:"limeobject.delete-object"})],it);var ot=class{context};ot=nt([Z({id:"limeobject.object-access"})],ot);var ut=class{context;limeobject;route=!1;label};ut=nt([Z({id:"limeobject.save-object"})],ut);var ct=function(t){return t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$",t}({}),ft={Count:"COUNT"};r.Query="query";var st={Post:"POST"};r.Http="http",r.EventDispatcher="eventDispatcher",r.Translate="translate",r.Dialog="dialog",r.KeybindingRegistry="keybindingRegistry",r.Navigator="navigator";var at,lt,ht=class{path;query;hash;state};function vt(t){return N(t,{name:r.ConfigRepository})}function yt(t={}){return N(t,{name:r.FilterRepository})}function bt(t,r){let e=new WeakMap;t.connectedCallback=function(t,r,e){return async function(...i){let o=r({component:this,host:n(this),registry:mt(this)});return e.set(this,o),t?.apply(this,i)}}(t.connectedCallback,r,e),t.disconnectedCallback=function(t,n){return function(...r){let e=t?.apply(this,r);return n.get(this)?.(),n.delete(this),e}}(t.disconnectedCallback,e)}function mt(t){let n=f(t),e=r.ContextRegistry;if(!n.has(e))throw Error(`Service ${e} does not exist`);return n.get(e)}function pt(t){return(n,r)=>{bt(n,function(t,n){let r=new WeakMap,e=new WeakMap,i=new WeakSet;function u(t,n){return{configurable:!0,enumerable:!0,get(){return t?.get?t.get.call(this):e.get(n)},set(i){let o=e.get(n);t?.set?.call(this,i),e.set(n,i),o!==i&&r.get(n)?.notify()}}}function c(t,r){let c=function(t,r){return function(t,n){let r=t;for(;r&&r!==HTMLElement.prototype;){if(Object.getOwnPropertyDescriptor(r,n))return!0;r=Object.getPrototypeOf(r)}return!1}(r,n)?r:t}(t,r);if(e.set(t,Reflect.get(c,n)),i.has(c))return;i.add(c);let f=o(Object.getPrototypeOf(c),n);Object.defineProperty(c,n,u(f,t))}function f(n,i,o){let u=o.provide(t,i,(()=>e.get(n)));return r.set(n,u),u}function s(t,n){return()=>{n.teardown(),r.delete(t)}}return({component:t,host:n,registry:r})=>(c(t,n),s(t,f(t,n,r)))}(t,r))}}function dt(t){return(n,r)=>{bt(n,function(t,n){return({component:r,host:e,registry:i})=>i.subscribe(t,e,(t=>{Reflect.set(r,n,t)}))}(t,r))}}function gt(t){let n=window.Lime?.logger?.createLogger;return"function"==typeof n?(void 0===lt&&(lt=function(t){return t&&(function(t){let n=t.match(/\/([^/]+)-lwc-components\//);return n?n[1]:null}(t)||function(t){let n=t.match(/\/packages\/(?:@[^/]+\/)?([^/]+)/);return n?n[1]:null}(t)||function(t){let n=t.indexOf("+");if(-1===n)return null;let r=t.slice(0,n),e=r.lastIndexOf("/");return-1===e?null:r.slice(e+1)}(t)||function(t){let n=t.match(/\/static\/([^/]+)\//);return n?n[1]:null}(t))||null}(void 0===at?at="string"==typeof import.meta.url?import.meta.url:function(){try{let t=Error(".").stack;if(!t)return null;let n=t.split("\n");for(let t of n){let n=t.match(/(https?:\/\/[^)\s:]+)/);if(n)return n[1]}return null}catch{return null}}():at)),lt&&(t=`${lt}:${t}`),n(t)):(console.warn(`Logger factory is not configured. Returning console logger for scope "${t}".`),console)}ht=nt([Z({id:"navigator.navigate"})],ht),r.Notification="notifications",r.RouteRegistry="routeRegistry",r.TaskRepository="state.tasks",r.ConfigRepository="state.configs",r.Device="state.device",r.FilterRepository="state.filters",r.UserDataRepository="state.user-data",r.Application="state.application",r.UserPreferencesRepository="userPreferences",r.DateTimeFormatter="datetimeformatter",r.ConditionRegistry="conditionRegistry",r.ContextRegistry="contextRegistry",r.RuleRegistry="ruleRegistry",r.ViewFactoryRegistry="viewFactoryRegistry",r.WebComponentRegistry="webComponentRegistry",r.NotificationRepository="state.notifications",r.PollerFactory="pollerFactory",r.Logger="logger",r.ProblemRepository="problemRepository",r.AIContextRegistry="aiContextRegistry";var wt=null;try{t((function(t,n){wt||=gt("uncaught-error");let r={};n&&(r.element=n.tagName,n.id&&(r.elementId=n.id));let e=t instanceof Error?t.message:String(t),i=t instanceof Error?t:void 0;wt.error(e,i,r)}))}catch{}export{V as G,Z as H,J as L,gt as M,dt as O,K as R,pt as T,i as a,r as b,st as c,yt as d,e as i,vt as l,ct as n,ft as r}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./p-CqRNpSRV.js";const l=[{value:e.EQUALS,label:"webclient.operator.equals",icon:"-lime-filter-equal"},{value:e.NOT_EQUALS,label:"webclient.operator.not-equals",icon:"-lime-filter-equal-not"},{value:e.GREATER,label:"webclient.operator.greater-than",icon:"-lime-filter-greater",applicableTypes:["integer","decimal","date","time"]},{value:e.GREATER_OR_EQUAL,label:"webclient.operator.greater-than-or-equal-to",icon:"-lime-filter-greater-equal",applicableTypes:["integer","decimal","date","time"]},{value:e.LESS,label:"webclient.operator.less-than",icon:"-lime-filter-less",applicableTypes:["integer","decimal","date","time"]},{value:e.LESS_OR_EQUAL,label:"webclient.operator.less-than-or-equal-to",icon:"-lime-filter-less-equal",applicableTypes:["integer","decimal","date","time"]},{value:e.IN,label:"webclient.operator.in-filter",icon:"-lime-filter-set-included"},{value:e.LIKE,label:"webclient.operator.contains",icon:"-lime-filter-contain",applicableTypes:["string","text"]},{value:e.BEGINS,label:"webclient.operator.begins-with",icon:"-lime-filter-starts-with",applicableTypes:["string","text"]},{value:e.ENDS,label:"webclient.operator.ends-with",icon:"-lime-filter-ends-with",applicableTypes:["string","text"]}];export{l as L}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function t(t,e,n){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,e);if(o&&(!n||o.get))return o;t=Object.getPrototypeOf(t)}}var e,n,o=(e,n)=>{var o;Object.entries(null!=(o=n.o.t)?o:{}).map((([o,[l]])=>{if(31&l||32&l){const l=e[o],i=t(Object.getPrototypeOf(e),o,!0)||Object.getOwnPropertyDescriptor(e,o);i&&Object.defineProperty(e,o,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(o)?e[o]=n.l.get(o):void 0!==l&&(e[o]=l)}}))},l=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},i=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&o(t,e))},s=(t,e)=>e in t,r=(t,n)=>(e||console.error)(t,n),c=t=>e=t,u=new Map,f=new Map,a="http://www.w3.org/1999/xlink",d="undefined"!=typeof window?window:{},p={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),m=(()=>{try{return!!d.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),v=!!m&&(()=>!!d.document&&Object.getOwnPropertyDescriptor(d.document.adoptedStyleSheets,"length").writable)(),y=!1,b=[],$=[],w=(t,e)=>n=>{t.push(n),y||(y=!0,e&&4&p.u?S(j):p.raf(j))},g=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){r(t)}t.length=0},j=()=>{g(b),g($),(y=b.length>0)&&p.raf(j)},S=t=>h().then(t),O=w($,!0);function k(t){const e={mode:"open"};e.delegatesFocus=!!(16&t.u);const o=this.attachShadow(e);void 0===n&&(n=null),n&&(v?o.adoptedStyleSheets.push(n):o.adoptedStyleSheets=[...o.adoptedStyleSheets,n])}function E(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}var M,C,x=new WeakMap,A=t=>"sc-"+t.h,L=t=>"object"==(t=typeof t)||"function"===t,N=(t,e,...n)=>{let o=null,l=null,i=!1,s=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!L(o))&&(o+=""),i&&s?r[r.length-1].m+=o:r.push(i?R(null,o):o),s=i)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}if("function"==typeof t)return t(null===e?{}:e,r,H);const u=R(t,null);return u.v=e,r.length>0&&(u.$=r),u.j=l,u},R=(t,e)=>({u:0,S:t,m:null!=e?e:null,O:null,$:null,v:null,j:null}),D={},H={forEach:(t,e)=>t.map(P).forEach(e),map:(t,e)=>t.map(P).map(e).map(T)},P=t=>({vattrs:t.v,vchildren:t.$,vkey:t.j,vname:t.k,vtag:t.S,vtext:t.m}),T=t=>{if("function"==typeof t.vtag){const e={...t.vattrs};return t.vkey&&(e.key=t.vkey),t.vname&&(e.name=t.vname),N(t.vtag,e,...t.vchildren||[])}const e=R(t.vtag,t.vtext);return e.v=t.vattrs,e.$=t.vchildren,e.j=t.vkey,e.k=t.vname,e},U=t=>{if(!t)return;const e=Object.keys(t);if(0===e.length)return;let n=!1;for(const o of e){if(n)break;for(const e of t[o])if("string"==typeof e){n=!0;break}}if(!n)return t;const o={};for(const n of e)o[n]=t[n].map((t=>"string"==typeof t?{[t]:0}:t));return o},W=(t,e)=>null==t||L(t)?t:4&e?"false"!==t&&(""===t||!!t):2&e?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&e?t+"":t,z=t=>{var e;return null==(e=l(t))?void 0:e.$hostElement$},F=(t,e)=>{const n=z(t);return{emit:t=>V(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},V=(t,e,n)=>{const o=p.ce(e,n);return t.dispatchEvent(o),o},q=(t,e,n,o,i,r)=>{if(n===o)return;let c=s(t,e),u=e.toLowerCase();if("class"===e){const e=t.classList,l=Y(n);let i=Y(o);e.remove(...l.filter((t=>t&&!i.includes(t)))),e.add(...i.filter((t=>t&&!l.includes(t))))}else if("style"===e){for(const e in n)o&&null!=o[e]||(e.includes("-")?t.style.removeProperty(e):t.style[e]="");for(const e in o)n&&o[e]===n[e]||(e.includes("-")?t.style.setProperty(e,o[e]):t.style[e]=o[e])}else if("key"===e);else if("ref"===e)o&&st(o,t);else if(c||"o"!==e[0]||"n"!==e[1]){if("a"===e[0]&&e.startsWith("attr:")){const n=e.slice(5);let i;{const e=l(t);if(e&&e.o&&e.o.t){const t=e.o.t[n];t&&t[1]&&(i=t[1])}}return i||(i=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(i)||t.removeAttribute(i):t.setAttribute(i,!0===o?"":o))}if("p"===e[0]&&e.startsWith("prop:")){const n=e.slice(5);try{t[n]=o}catch(t){}return}{const l=L(o);if((c||l&&null!==o)&&!i)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?c=!1:null!=n&&t[e]===l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}let s=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(e=u,s=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(e)||(s?t.removeAttributeNS(a,e):t.removeAttribute(e)):(!c||4&r||i)&&!l&&1===t.nodeType&&(o=!0===o?"":o,s?t.setAttributeNS(a,e,o):t.setAttribute(e,o))}}else if(e="-"===e[2]?e.slice(3):s(d,u)?u.slice(2):u[2]+e.slice(3),n||o){const l=e.endsWith(Z);e=e.replace(_,""),n&&p.rel(t,e,n,l),o&&p.ael(t,e,o,l)}},G=/\s/,Y=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(G):[]),Z="Capture",_=RegExp(Z+"$"),B=(t,e,n)=>{const o=11===e.O.nodeType&&e.O.host?e.O.host:e.O,l=t&&t.v||{},i=e.v||{};for(const t of I(Object.keys(l)))t in i||q(o,t,l[t],void 0,n,e.u);for(const t of I(Object.keys(i)))q(o,t,l[t],i[t],n,e.u)};function I(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var J=!1,K=!1,Q=[],X=[],tt=(t,e,n)=>{const o=e.$[n];let l,i,s=0;if(null!=o.m)l=o.O=d.document.createTextNode(o.m);else{if(!d.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(l=o.O=d.document.createElement(o.S),B(null,o,K),null!=M&&void 0!==M&&l["s-si"]!==M&&l.classList.add(l["s-si"]=M),o.$){const e="template"===o.S?l.content:l;for(s=0;s<o.$.length;++s)i=tt(t,o,s),i&&e.appendChild(i)}}return l["s-hn"]=C,l},et=(t,e,n,o,l,i)=>{let s,r=t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot),"template"===n.S&&(r=r.content);l<=i;++l)o[l]&&(s=tt(null,n,l),s&&(o[l].O=s,rt(r,s,e)))},nt=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.O;it(e),t&&t.remove()}}},ot=(t,e,n=!1)=>t.S===e.S&&(n?(n&&!t.j&&e.j&&(t.j=e.j),!0):t.j===e.j),lt=(t,e,n=!1)=>{const o=e.O=t.O,l=t.$,i=e.$,s=e.m;null==s?("slot"!==e.S||J||t.k!==e.k&&(e.O["s-sn"]=e.k||"",(t=>{p.u|=1;const e=t.closest(C.toLowerCase());if(null!=e){const n=Array.from(e.__childNodes||e.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of n?o.reverse():o)null!=t["s-sh"]&&(rt(e,t,null!=n?n:null),t["s-sh"]=void 0)}p.u&=-2})(e.O.parentElement)),B(t,e,K),null!==l&&null!==i?((t,e,n,o,l=!1)=>{let i,s,r=0,c=0,u=0,f=0,a=e.length-1,d=e[0],p=e[a],h=o.length-1,m=o[0],v=o[h];const y="template"===n.S?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=e[++r];else if(null==p)p=e[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--h];else if(ot(d,m,l))lt(d,m,l),d=e[++r],m=o[++c];else if(ot(p,v,l))lt(p,v,l),p=e[--a],v=o[--h];else if(ot(d,v,l))lt(d,v,l),rt(y,d.O,p.O.nextSibling),d=e[++r],v=o[--h];else if(ot(p,m,l))lt(p,m,l),rt(y,p.O,d.O),p=e[--a],m=o[++c];else{for(u=-1,f=r;f<=a;++f)if(e[f]&&null!==e[f].j&&e[f].j===m.j){u=f;break}u>=0?(s=e[u],s.S!==m.S?i=tt(e&&e[c],n,u):(lt(s,m,l),e[u]=void 0,i=s.O),m=o[++c]):(i=tt(e&&e[c],n,c),m=o[++c]),i&&rt(d.O.parentNode,i,d.O)}r>a?et(t,null==o[h+1]?null:o[h+1].O,n,o,c,h):c>h&&nt(e,r,a)})(o,l,e,i,n):null!==i?(null!==t.m&&(o.textContent=""),et(o,null,e,i,0,i.length-1)):!n&&null!==l&&nt(l,0,l.length-1)):t.m!==s&&(o.data=s)},it=t=>{t.v&&t.v.ref&&Q.push((()=>t.v.ref(null))),t.$&&t.$.map(it)},st=(t,e)=>{X.push((()=>t(e)))},rt=(t,e,n)=>t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n),ct=(t,e)=>{if(e&&!t.M&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.M=()=>{e["s-p"].splice(n-1,1),o()})))}},ut=(t,e)=>{if(t.u|=16,4&t.u)return void(t.u|=512);ct(t,t.C);const n=()=>ft(t,e);if(!e)return O(n);queueMicrotask((()=>{n()}))},ft=(t,e)=>{const n=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e?(t.A.length&&t.A.forEach((t=>t(n))),l=yt(o,"componentWillLoad",void 0,n)):l=yt(o,"componentWillUpdate",void 0,n),l=at(l,(()=>yt(o,"componentWillRender",void 0,n))),at(l,(()=>pt(t,o,e)))},at=(t,e)=>dt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),dt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,pt=async(t,e,n)=>{var o;const l=t.$hostElement$,i=l["s-rc"];n&&(t=>{const e=t.o,n=t.$hostElement$,o=e.u,l=((t,e)=>{var n,o,l;const i=A(e),s=f.get(i);if(!d.document)return i;if(t=11===t.nodeType?t:d.document,s)if("string"==typeof s){let l,r=x.get(t=t.head||t);if(r||x.set(t,r=new Set),!r.has(i)){l=d.document.createElement("style"),l.textContent=s;const c=null!=(n=p.L)?n:E(d.document);if(null!=c&&l.setAttribute("nonce",c),!(1&e.u))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(m){const e=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(s),v?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.textContent=s+e.textContent:t.prepend(l)}else t.append(l);1&e.u&&t.insertBefore(l,null),4&e.u&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),r&&r.add(i)}}else{let e=x.get(t);if(e||x.set(t,e=new Set),!e.has(i)){const n=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(s.constructor===n.CSSStyleSheet)o=s;else{o=new n.CSSStyleSheet;for(let t=0;t<s.cssRules.length;t++)o.insertRule(s.cssRules[t].cssText,t)}v?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],e.add(i)}}return i})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);ht(t,e,l,n),i&&(i.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>mt(t);0===e.length?n():(Promise.all(e).then(n).catch(n),t.u|=4,e.length=0)}},ht=(t,e,n,o)=>{try{e=e.render&&e.render(),t.u&=-17,t.u|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.o,i=t.N||R(null,null),s=(t=>t&&t.S===D)(e)?e:N(null,null,e);if(C=o.tagName,l.R&&(s.v=s.v||{},l.R.forEach((([t,e])=>{s.v[e]=o[t]}))),n&&s.v)for(const t of Object.keys(s.v))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(s.v[t]=o[t]);s.S=null,s.u|=4,t.N=s,s.O=i.O=o.shadowRoot||o,M=o["s-sc"],J=!(!(1&l.u)||128&l.u),lt(i,s,n),Q.forEach((t=>t())),Q.length=0,X.forEach((t=>t())),X.length=0})(t,e,o)}catch(e){r(e,t.$hostElement$)}return null},mt=t=>{const e=t.$hostElement$,n=t.i,o=t.C;yt(n,"componentDidRender",void 0,e),64&t.u?yt(n,"componentDidUpdate",void 0,e):(t.u|=64,bt(e),yt(n,"componentDidLoad",void 0,e),t.D(e),o||vt()),t.M&&(t.M(),t.M=void 0),512&t.u&&S((()=>ut(t,!1))),t.u&=-517},vt=()=>{S((()=>V(d,"appload",{detail:{namespace:"lime-crm-building-blocks"}})))},yt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){r(t,o)}},bt=t=>t.classList.add("hydrated"),$t=(t,e,n,o)=>{const i=l(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${o.h}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const s=i.$hostElement$,c=i.l.get(e),u=i.u,f=i.i;if(n=W(n,o.t[e][0]),!(8&u&&void 0!==c||n===c||Number.isNaN(c)&&Number.isNaN(n))){if(i.l.set(e,n),o.H){const t=o.H[e];t&&t.map((t=>{try{const[[o,l]]=Object.entries(t);(128&u||1&l)&&(f?f[o](n,c,e):i.A.push((()=>{i.i[o](n,c,e)})))}catch(t){r(t,s)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(n,c,e)&&!(16&u))return;16&u||ut(i,!1)}}},wt=(e,n,o)=>{var i,s;const r=e.prototype;{e.watchers&&!n.H&&(n.H=U(e.watchers)),e.deserializers&&!n.P&&(n.P=e.deserializers),e.serializers&&!n.T&&(n.T=e.serializers);const c=Object.entries(null!=(i=n.t)?i:{});if(c.map((([e,[i]])=>{if(31&i||2&o&&32&i){const{get:s,set:c}=t(r,e)||{};s&&(n.t[e][0]|=2048),c&&(n.t[e][0]|=4096),(1&o||!s)&&Object.defineProperty(r,e,{get(){{if(!(2048&n.t[e][0]))return((t,e)=>l(this).l.get(e))(0,e);const t=l(this),o=t?t.i:r;if(!o)return;return o[e]}},configurable:!0,enumerable:!0}),Object.defineProperty(r,e,{set(t){const s=l(this);if(s){if(c)return void 0===(32&i?this[e]:s.$hostElement$[e])&&s.l.get(e)&&(t=s.l.get(e)),c.call(this,W(t,i)),void $t(this,e,t=32&i?this[e]:s.$hostElement$[e],n);{if(!(1&o&&4096&n.t[e][0]))return $t(this,e,t,n),void(1&o&&!s.i&&s.A.push((()=>{4096&n.t[e][0]&&s.i[e]!==s.l.get(e)&&(s.i[e]=t)})));const l=()=>{const o=s.i[e];!s.l.get(e)&&o&&s.l.set(e,o),s.i[e]=W(t,i),$t(this,e,s.i[e],n)};s.i?l():s.A.push((()=>{l()}))}}}})}})),1&o){const t=new Map;r.attributeChangedCallback=function(e,o,i){p.jmp((()=>{var s;const u=t.get(e),f=l(this);if(this.hasOwnProperty(u)&&(i=this[u],delete this[u]),r.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==i)return;if(null==u){const t=null==f?void 0:f.u;if(f&&t&&!(8&t)&&i!==o){const l=f.i,r=null==(s=n.H)?void 0:s[e];null==r||r.forEach((n=>{const[[s,r]]=Object.entries(n);null!=l[s]&&(128&t||1&r)&&l[s].call(l,i,o,e)}))}return}const a=c.find((([t])=>t===u)),d=a&&4&a[1][0],p=d&&null===i&&void 0===this[u];d&&(i=null!==i&&"false"!==i);const h=Object.getOwnPropertyDescriptor(r,u);p||i==this[u]||h.get&&!h.set||(this[u]=i)}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.H)?s:{}),...c.filter((([t,e])=>31&e[0])).map((([e,o])=>{var l;const i=o[1]||e;return t.set(i,e),512&o[0]&&(null==(l=n.R)||l.push([e,i])),i}))]))}}return e},gt=(t,e)=>{yt(t,"connectedCallback",void 0,e)},jt=(t,e)=>{yt(t,"disconnectedCallback",void 0,e||t)},St=(t,e={})=>{var n;if(!d.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const o=[],i=e.exclude||[],s=d.customElements,c=d.document.head,a=c.querySelector("meta[charset]"),h=d.document.createElement("style"),v=[];let y,b=!0;if(Object.assign(p,e),p.p=new URL(e.resourcesUrl||"./",d.document.baseURI).href,t.map((t=>{t[1].map((e=>{var n,c;const a={u:e[0],h:e[1],t:e[2],U:e[3]};a.t=e[2],a.R=[],a.H=U(e[4]),a.T=null!=(n=e[5])?n:{},a.P=null!=(c=e[6])?c:{};const d=a.h,h=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,e)=>{const n={u:0,$hostElement$:t,o:e,l:new Map,W:new Map};n.F=new Promise((t=>n.D=t)),t["s-p"]=[],t["s-rc"]=[],n.A=[];const o=n;t.__stencil__getHostRef=()=>o})(t=this,a),1&a.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${a.h}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else k.call(t,a)}connectedCallback(){l(this)&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),y&&(clearTimeout(y),y=null),b?v.push(this):p.jmp((()=>(t=>{if(!(1&p.u)){const e=l(t);if(!e)return;const n=e.o,o=()=>{};if(1&e.u)(null==e?void 0:e.i)?gt(e.i,t):(null==e?void 0:e.F)&&e.F.then((()=>gt(e.i,t)));else{e.u|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){ct(e,e.C=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;try{if(!(32&e.u)){if(e.u|=32,n.V){const l=((t,e)=>{const n=t.h.replace(/-/g,"_"),o=t.V;if(!o)return;const l=u.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(u.set(o,t),t[n])),(t=>{r(t,e.$hostElement$)}))
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.h}#${e.q}" was not found`);o.isProxied||(n.H=U(o.watchers),n.T=o.serializers,n.P=o.deserializers,wt(o,n,2),o.isProxied=!0);const i=()=>{};e.u|=8;try{new o(e)}catch(e){r(e,t)}e.u&=-9,e.u|=128,i(),gt(e.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=A(n);if(!f.has(e)){const o=()=>{};((t,e,n)=>{let o=f.get(t);m&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,f.set(t,o)})(e,t,!!(1&n.u)),o()}}}const l=e.C,i=()=>ut(e,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(n){r(n,t),e.M&&(e.M(),e.M=void 0),e.D&&e.D(t)}})(t,e,n)}o()}})(this))))}disconnectedCallback(){p.jmp((()=>(async t=>{if(!(1&p.u)){const e=l(t);(null==e?void 0:e.i)?jt(e.i,t):(null==e?void 0:e.F)&&e.F.then((()=>jt(e.i,t)))}x.has(t)&&x.delete(t),t.shadowRoot&&x.has(t.shadowRoot)&&x.delete(t.shadowRoot)})(this))),p.raf((()=>{var t;const e=l(this);if(!e)return;const n=v.findIndex((t=>t===this));n>-1&&v.splice(n,1),(null==(t=null==e?void 0:e.N)?void 0:t.O)instanceof Node&&!e.N.O.isConnected&&delete e.N.O}))}componentOnReady(){var t;return null==(t=l(this))?void 0:t.F}};a.V=t[0],i.includes(d)||s.get(d)||(o.push(d),s.define(d,wt(h,a,1)))}))})),o.length>0&&(h.textContent+=o.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",h.innerHTML.length)){h.setAttribute("data-styles","");const t=null!=(n=p.L)?n:E(d.document);null!=t&&h.setAttribute("nonce",t),c.insertBefore(h,a?a.nextSibling:c.firstChild)}b=!1,v.length?v.map((t=>t.connectedCallback())):p.jmp((()=>y=setTimeout(vt,30)))},Ot=t=>p.L=t;export{D as H,c as a,St as b,F as c,z as g,N as h,h as p,i as r,Ot as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as r}from"./p-
|
|
1
|
+
import{n as r}from"./p-CqRNpSRV.js";import{g as t,a as o,v as e}from"./p-CQUZjrU4.js";const n=new Set(["$yesterday","$now","$today","$tomorrow","$this_week","$this_month","$this_quarter","$this_year"]),i=/^\$(previous|next)_(day|week|month|quarter|year)\(\d+\)$/,s=/^\$me(\.\w+)*$/;function a(r,o,e){if(function(r){return"string"==typeof r&&(n.has(r)||i.test(r)||s.test(r))}(r))return{valid:!0};if("string"!=typeof r||!r.startsWith("%activeObject%"))return{valid:!0};if(!o)return{valid:!0};const a=r.replace(/^%activeObject%\.?/,"");if(!a)return{valid:!0};try{return t(e,o,a)?{valid:!0}:{valid:!1,error:`Property path '${a}' does not exist on limetype '${o}'`}}catch(r){return{valid:!1,error:`Invalid placeholder path: ${r.message}`}}}function u(r,t,o=!0){const e=Object.keys(r),n=[];if(o){const r=e.filter((r=>r.startsWith("#")&&"#description"!==r));r.length>0&&n.push(`Property '${t}' contains # properties not supported in visual mode: ${r.join(", ")}`)}return{keys:e.filter((r=>"_alias"!==r&&!r.startsWith("#"))),visualModeLimitations:n}}function l(r,t,o,e,n,i=!0){if(""===r){if(i&&null!==t)throw new Error("Empty property name must have null value");return[]}const s=o[r];if(!s)throw new Error(`Property '${r}' does not exist on limetype '${n}'`);return s.relation?function(r,t,o,e,n=!0){if(null===t)return[];if("object"!=typeof t)throw new TypeError(`Relation property '${r}' must be null or an object`);const i=t,{keys:s,visualModeLimitations:a}=u(i,r,n);if(0===s.length)return a;const l=e.relation.getLimetype();if(!l)throw new Error(`Could not determine related limetype for property '${r}'`);const f={};for(const r of s)f[r]=i[r];const p=c(f,o,l.name,n);return[...a,...p]}(r,t,e,s,i):function(r,t,o=!0){if(null===t)return[];if("object"==typeof t){const{keys:e,visualModeLimitations:n}=u(t,r,o);if(0===e.length)return n;throw new Error(`Non-relation property '${r}' cannot have nested properties other than _alias or # properties (got: ${e.join(", ")})`)}throw new Error(`Non-relation property '${r}' must be null or an object (got ${typeof t})`)}(r,t,i)}function c(r,t,e,n=!0){const i=t[e];if(!i)throw new Error(`Unknown limetype: ${e}`);const s=o(i),a=[];for(const[o,i]of Object.entries(r)){if(o.startsWith("#"))continue;const r=l(o,i,s,t,e,n);a.push(...r)}return a}function f(t,o,n,i,s=!0){t&&("key"in t?function(t,o,n,i){if(!Object.values(r).includes(t.op))throw new Error(`Unsupported filter operator: ${t.op}`);const s=function(r,t,o,n){if(!r)return{valid:!1,error:"Filter key cannot be empty"};if(r.startsWith("%activeObject%")){const o=a(r,n,t);if(!o.valid)return o;const i=r.replace(/^%activeObject%\.?/,"");if(i&&n){const{error:r}=e(t,n,i);if(r)return{valid:!1,error:r}}return o}const{error:i}=e(t,o,r);return i?{valid:!1,error:i}:{valid:!0}}(t.key,n,i,o);if(!s.valid)throw new Error(`Invalid filter key '${t.key}': ${s.error}`);const u=a(t.exp,o,n);if(!u.valid)throw new Error(`Invalid placeholder in filter '${t.key}': ${u.error}`)}(t,o,n,i):"exp"in t&&function(t,o,e,n,i){if(t.op!==r.AND&&t.op!==r.OR&&t.op!==r.NOT)throw new Error(`Unsupported group operator: ${t.op}`);if(t.op===r.NOT)f(t.exp,o,e,n,i);else if(t.op===r.AND||t.op===r.OR){const r=t.exp;for(const t of r)f(t,o,e,n,i)}}(t,o,n,i,s))}function p(r,o,e,n){const i=[],s=function(r,t){return"object"!=typeof r||null===r?`orderBy[${t}] must be an object`:null}(r,o);if(s)return[s];const a=Object.keys(r),u=function(r,t){return 0===r.length?`orderBy[${t}] must have a property path`:r.length>1?`orderBy[${t}] must have exactly one property, got ${r.length}`:null}(a,o);if(u)return[u];const l=a[0],c=function(r,t){return"ASC"!==r&&"DESC"!==r?`orderBy[${t}]: direction must be 'ASC' or 'DESC', got '${r}'`:null}(r[l],o);c&&i.push(c);const f=function(r,o,e,n){if(!r||""===r)return null;return t(o,e,r)?null:`orderBy[${n}]: property path '${r}' does not exist on limetype '${e}'`}(l,e,n,o);return f&&i.push(f),i}function d(r,t,o,e){const n=[],i=[];try{const n=function(r,t,o,e=!0){const n=[];if(e&&r.aggregates&&n.push("responseFormat.aggregates is not yet supported in visual mode"),r.object){const i=c(r.object,t,o,e);n.push(...i)}return n}(r,t,o,e);i.push(...n)}catch(r){n.push(`Invalid responseFormat: ${r.message}`)}return{errors:n,limitations:i}}function y(r,t,o,e=!0){if(!r)return{valid:!0,visualModeSupported:!0,validationErrors:[],visualModeLimitations:[]};const n=[],i=[];if(r.limetype&&!t[r.limetype]&&n.push(`Unknown limetype: ${r.limetype}`),void 0===r.offset||r.orderBy||n.push("offset requires orderBy to be specified"),r.orderBy){const o=function(r,t,o){const e=[];if(!Array.isArray(r))return e.push("orderBy must be an array"),e;if(!o||!t[o])return e;for(const[n,i]of r.entries()){const r=p(i,n,t,o);e.push(...r)}return e}(r.orderBy,t,r.limetype);n.push(...o)}if(e&&void 0!==r.offset&&i.push("offset is not yet supported in visual mode"),r.filter){const{errors:s,limitations:a}=function(r,t,o,e,n){const i=[],s=[];try{f(r,t,o,e,n)}catch(r){const t=r.message;t.includes("Invalid filter key")||t.includes("Cannot filter on many-relation")?(i.push(`Invalid filter: ${t}`),s.push(t)):i.push(`Invalid filter: ${t}`)}return{errors:i,limitations:s}}(r.filter,o,t,r.limetype,e);n.push(...s),i.push(...a)}if(r.responseFormat){const{errors:o,limitations:s}=d(r.responseFormat,t,r.limetype,e);n.push(...o),i.push(...s)}return{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}function v(r,t,o,e=!0){const n=[],i=[];if(!t[o])return n.push(`Unknown limetype: ${o}`),{valid:!1,visualModeSupported:!1,validationErrors:n,visualModeLimitations:i};const{errors:s,limitations:a}=d(r,t,o,e);return n.push(...s),i.push(...a),{valid:0===n.length,visualModeSupported:0===i.length,validationErrors:n,visualModeLimitations:i}}export{y as i,v}
|