@limetech/lime-crm-building-blocks 1.95.0 → 1.97.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 +14 -0
- package/dist/cjs/{_MapCache-2e84a981.js → _MapCache-8b125fbb.js} +0 -26
- package/dist/cjs/{_Uint8Array-1e99726d.js → _Uint8Array-95263550.js} +1 -12
- package/dist/cjs/_baseIsEqual-cb7951b0.js +496 -0
- package/dist/cjs/_defineProperty-40a6ad5d.js +15 -0
- package/dist/cjs/{get-1acf79ce.js → get-932b213e.js} +5 -4
- package/dist/cjs/isEqual-e77cce75.js +37 -0
- package/dist/cjs/isSymbol-5b36aeee.js +30 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/lime-query.types-bcb63a22.js +61 -0
- package/dist/cjs/limebb-component-config.cjs.entry.js +3 -2
- package/dist/cjs/limebb-document-item.cjs.entry.js +174 -0
- package/dist/cjs/limebb-document-picker.cjs.entry.js +82 -0
- package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +382 -150
- package/dist/cjs/limebb-lime-query-filter-and_5.cjs.entry.js +278 -0
- package/dist/cjs/limebb-lime-query-value-input.cjs.entry.js +239 -0
- package/dist/cjs/limebb-limetype-field_2.cjs.entry.js +406 -0
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +13 -498
- package/dist/cjs/limebb-mention-group-counter.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 +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-property-selector.cjs.entry.js +234 -0
- package/dist/cjs/limebb-response-format-item.cjs.entry.js +80 -0
- package/dist/cjs/limebb-text-editor.cjs.entry.js +22 -83
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/limetype-1fe0207f.js +90 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/property-resolution-fb42a46b.js +66 -0
- package/dist/cjs/random-string-aac0a74b.js +24 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/document-picker/document-item/document-item.css +64 -0
- package/dist/collection/components/document-picker/document-item/document-item.js +265 -0
- package/dist/collection/components/document-picker/document-item/document-item.types.js +1 -0
- package/dist/collection/components/document-picker/document-picker.css +139 -0
- package/dist/collection/components/document-picker/document-picker.js +304 -0
- package/dist/collection/components/document-picker/document.types.js +1 -0
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
- package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/icon-picker/icon-picker.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +1 -1
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.css +121 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-and.js +257 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.css +39 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +246 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.css +104 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-expression.js +220 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.css +107 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +212 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.css +123 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-or.js +237 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.css +48 -0
- package/dist/collection/components/lime-query-builder/expressions/lime-query-value-input.js +457 -0
- package/dist/collection/components/lime-query-builder/filter-conversion.js +118 -21
- package/dist/collection/components/lime-query-builder/lime-query-builder.css +30 -17
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +233 -28
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +435 -0
- package/dist/collection/components/lime-query-builder/property-selection-format.js +158 -0
- package/dist/collection/components/lime-query-builder/property-selector/property-selector.css +8 -0
- package/dist/collection/components/lime-query-builder/property-selector/property-selector.js +422 -0
- package/dist/collection/components/lime-query-builder/response-format-editor.css +72 -0
- package/dist/collection/components/lime-query-builder/response-format-editor.js +249 -0
- package/dist/collection/components/lime-query-builder/response-format-item.css +61 -0
- package/dist/collection/components/lime-query-builder/response-format-item.js +208 -0
- 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/summary-popover/summary-popover.js +3 -3
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/collection/util/format-bytes.js +36 -0
- package/dist/components/_MapCache.js +2 -27
- package/dist/components/_Uint8Array.js +2 -12
- package/dist/components/_baseIsEqual.js +494 -0
- package/dist/components/_defineProperty.js +13 -0
- package/dist/components/document-item.js +190 -0
- package/dist/components/feed-item-thumbnail-file-info.js +1 -1
- package/dist/components/feed-timeline-item.js +1 -1
- package/dist/components/get.js +2 -1
- package/dist/components/isEqual.js +35 -0
- package/dist/components/isSymbol.js +28 -0
- package/dist/components/kanban-group.js +1 -1
- package/dist/components/kanban-item.js +1 -1
- package/dist/components/lime-query-filter-and.js +408 -0
- package/dist/components/lime-query-filter-comparison.js +152 -0
- package/dist/components/lime-query-value-input.js +266 -0
- package/dist/components/limebb-document-item.d.ts +11 -0
- package/dist/components/limebb-document-item.js +6 -0
- package/dist/components/limebb-document-picker.d.ts +11 -0
- package/dist/components/limebb-document-picker.js +111 -0
- 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 +441 -149
- package/dist/components/limebb-lime-query-filter-and.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-and.js +6 -0
- package/dist/components/limebb-lime-query-filter-comparison.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-comparison.js +6 -0
- package/dist/components/limebb-lime-query-filter-expression.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-expression.js +6 -0
- package/dist/components/limebb-lime-query-filter-not.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-not.js +6 -0
- package/dist/components/limebb-lime-query-filter-or.d.ts +11 -0
- package/dist/components/limebb-lime-query-filter-or.js +6 -0
- package/dist/components/limebb-lime-query-value-input.d.ts +11 -0
- package/dist/components/limebb-lime-query-value-input.js +6 -0
- package/dist/components/limebb-limetype-field.d.ts +11 -0
- package/dist/components/limebb-limetype-field.js +6 -0
- package/dist/components/limebb-locale-picker.js +8 -493
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-percentage-visualizer.js +2 -2
- package/dist/components/limebb-property-selector.d.ts +11 -0
- package/dist/components/limebb-property-selector.js +6 -0
- package/dist/components/limebb-response-format-editor.d.ts +11 -0
- package/dist/components/limebb-response-format-editor.js +6 -0
- package/dist/components/limebb-response-format-item.d.ts +11 -0
- package/dist/components/limebb-response-format-item.js +6 -0
- package/dist/components/limebb-text-editor.js +8 -69
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limetype-field.js +184 -0
- package/dist/components/limetype.js +85 -0
- package/dist/components/live-docs-info.js +2 -2
- package/dist/components/notification-item.js +1 -1
- package/dist/components/property-selector.js +317 -0
- package/dist/components/random-string.js +22 -0
- package/dist/components/response-format-editor.js +278 -0
- package/dist/components/response-format-item.js +104 -0
- package/dist/components/summary-popover.js +3 -3
- package/dist/esm/{_MapCache-6484495d.js → _MapCache-af496e9d.js} +2 -27
- package/dist/esm/{_Uint8Array-e5cac922.js → _Uint8Array-d6ebd526.js} +3 -13
- package/dist/esm/_baseIsEqual-28053b81.js +494 -0
- package/dist/esm/_defineProperty-e6a185c3.js +13 -0
- package/dist/esm/{get-f9e0b2e1.js → get-3e42932b.js} +2 -1
- package/dist/esm/isEqual-57d0c223.js +35 -0
- package/dist/esm/isSymbol-1c5f65cc.js +28 -0
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/lime-query.types-f72355e1.js +59 -0
- package/dist/esm/limebb-component-config.entry.js +3 -2
- package/dist/esm/limebb-document-item.entry.js +170 -0
- package/dist/esm/limebb-document-picker.entry.js +78 -0
- package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-icon-picker.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +1 -1
- package/dist/esm/limebb-kanban-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +379 -147
- package/dist/esm/limebb-lime-query-filter-and_5.entry.js +270 -0
- package/dist/esm/limebb-lime-query-value-input.entry.js +235 -0
- package/dist/esm/limebb-limetype-field_2.entry.js +401 -0
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +9 -494
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-property-selector.entry.js +230 -0
- package/dist/esm/limebb-response-format-item.entry.js +76 -0
- package/dist/esm/limebb-text-editor.entry.js +8 -69
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/limetype-6e7552a7.js +85 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/property-resolution-fde2375e.js +63 -0
- package/dist/esm/random-string-f6ef6fbf.js +22 -0
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-85e11ff7.entry.js → p-00da9b24.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-02c0cc04.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-123190c3.js +1 -0
- package/dist/lime-crm-building-blocks/p-244ee55b.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-35897ec3.js +1 -0
- package/dist/lime-crm-building-blocks/{p-d6a07ea4.entry.js → p-3932077b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-3b0a15ec.js +1 -0
- package/dist/lime-crm-building-blocks/p-4a82410e.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-a694aae5.entry.js → p-50d3d61a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-5a6d2e7f.js +1 -0
- package/dist/lime-crm-building-blocks/p-60971d64.js +1 -0
- package/dist/lime-crm-building-blocks/{p-a44f543c.entry.js → p-61282e1a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-6c1146ca.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-70a28b93.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-16199127.entry.js → p-79d4668a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-7e6fb4af.js +1 -0
- package/dist/lime-crm-building-blocks/{p-88cc5b66.entry.js → p-82d33d43.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7db8652e.entry.js → p-8c4eb49f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-96beaabc.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-9d25ed5a.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-8dce83ad.entry.js → p-9d9f25da.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-a659d55a.js +1 -0
- package/dist/lime-crm-building-blocks/p-b7c72179.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-baf4e428.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-516210d4.entry.js → p-beb0d164.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-d298b34e.js +1 -0
- package/dist/lime-crm-building-blocks/{p-047c89de.entry.js → p-d89c44ad.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-e0ab1554.js +1 -0
- package/dist/lime-crm-building-blocks/{p-46d2f604.entry.js → p-e35299e0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8ef39ab8.entry.js → p-e9d23ef7.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ef8a5266.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-abf1c197.entry.js → p-f52125a0.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-f99c611d.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-fbda77a7.js +1 -0
- package/dist/lime-crm-building-blocks/p-fe2b91d9.js +1 -0
- package/dist/lime-crm-building-blocks/{p-d6af09a8.entry.js → p-ff0b244b.entry.js} +1 -1
- package/dist/types/components/document-picker/document-item/document-item.d.ts +46 -0
- package/dist/types/components/document-picker/document-item/document-item.types.d.ts +37 -0
- package/dist/types/components/document-picker/document-picker.d.ts +80 -0
- package/dist/types/components/document-picker/document.types.d.ts +2 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-and.d.ts +56 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-comparison.d.ts +64 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-expression.d.ts +53 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-not.d.ts +54 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-filter-or.d.ts +55 -0
- package/dist/types/components/lime-query-builder/expressions/lime-query-value-input.d.ts +92 -0
- package/dist/types/components/lime-query-builder/filter-conversion.d.ts +18 -0
- package/dist/types/components/lime-query-builder/lime-query-builder.d.ts +30 -8
- package/dist/types/components/lime-query-builder/limetype-field/limetype-field.d.ts +96 -0
- package/dist/types/components/lime-query-builder/property-selection-format.d.ts +23 -0
- package/dist/types/components/lime-query-builder/property-selector/property-selector.d.ts +71 -0
- package/dist/types/components/lime-query-builder/response-format-editor.d.ts +57 -0
- package/dist/types/components/lime-query-builder/response-format-item.d.ts +46 -0
- package/dist/types/components.d.ts +1795 -114
- package/dist/types/util/format-bytes.d.ts +20 -0
- package/package.json +2 -2
- package/dist/lime-crm-building-blocks/p-29346b1a.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-4ccce5cc.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7ef3bace.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-8044ffbd.js +0 -1
- package/dist/lime-crm-building-blocks/p-92ec9205.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-bcc23575.js +0 -1
- package/dist/lime-crm-building-blocks/p-c40a3f4b.js +0 -1
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Format a file size in bytes into a human readable string.
|
|
5
|
+
*
|
|
6
|
+
* Uses base 1024 units (binary prefixes without the "i" designation)
|
|
7
|
+
* and applies adaptive precision: one decimal for values < 10 of the
|
|
8
|
+
* chosen unit, otherwise no decimals.
|
|
9
|
+
*
|
|
10
|
+
* Examples:
|
|
11
|
+
* - 0 => "0 B"
|
|
12
|
+
* - 512 => "512 B"
|
|
13
|
+
* - 1536 => "1.5 KB"
|
|
14
|
+
* - 1048576 => "1 MB"
|
|
15
|
+
* - 5347737600 => "4.98 GB" (value < 10 so one decimal)
|
|
16
|
+
*
|
|
17
|
+
* @param bytes - the size in bytes
|
|
18
|
+
* @param decimals - max number of decimals for small unit values (default: 1)
|
|
19
|
+
* @returns formatted size string
|
|
20
|
+
*/
|
|
21
|
+
function formatBytes(bytes, decimals = 1) {
|
|
22
|
+
if (bytes == null || Number.isNaN(bytes)) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
if (bytes < 0) {
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
if (bytes === 0) {
|
|
29
|
+
return '0 B';
|
|
30
|
+
}
|
|
31
|
+
const k = 1024;
|
|
32
|
+
const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
|
33
|
+
const i = Math.min(sizes.length - 1, Math.floor(Math.log(bytes) / Math.log(k)));
|
|
34
|
+
const value = bytes / Math.pow(k, i);
|
|
35
|
+
const precision = value < 10 ? Math.max(0, decimals) : 0; // only keep decimals for small values
|
|
36
|
+
const rounded = Number.parseFloat(value.toFixed(precision));
|
|
37
|
+
return `${rounded} ${sizes[i]}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const documentItemCss = "*{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(\n --color-red-default\n );--color-sky-lighter:var(--color-red-lighter);--lime-elevated-surface-background-color:rgb(\n var(--color-yellow-default)\n )}";
|
|
41
|
+
const LimebbDocumentItemStyle0 = documentItemCss;
|
|
42
|
+
|
|
43
|
+
const DocumentItemComponent = /*@__PURE__*/ proxyCustomElement(class DocumentItemComponent extends HTMLElement {
|
|
44
|
+
constructor() {
|
|
45
|
+
super();
|
|
46
|
+
this.__registerHost();
|
|
47
|
+
this.__attachShadow();
|
|
48
|
+
this.interact = createEvent(this, "interact", 7);
|
|
49
|
+
/**
|
|
50
|
+
* The semantic role of the list item.
|
|
51
|
+
* - 'radio': renders a radio button for single selection.
|
|
52
|
+
* - 'checkbox': renders a checkbox for multiple selection.
|
|
53
|
+
*/
|
|
54
|
+
this.type = 'checkbox';
|
|
55
|
+
this.handleDocumentItemClick = (event) => {
|
|
56
|
+
if (this.isUnavailable()) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if ((event === null || event === void 0 ? void 0 : event.target) instanceof HTMLElement) {
|
|
60
|
+
const isSelectionControl = event.target.closest('limel-checkbox') ||
|
|
61
|
+
event.target.closest('limel-radio-button');
|
|
62
|
+
if (isSelectionControl) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
this.toggleSelection();
|
|
67
|
+
};
|
|
68
|
+
this.handleSelectionControlClick = (event) => {
|
|
69
|
+
var _a, _b;
|
|
70
|
+
event.stopPropagation();
|
|
71
|
+
if (this.isUnavailable()) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (this.type === 'radio' && ((_a = this.item) === null || _a === void 0 ? void 0 : _a.selected)) {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
this.forceInputUnchecked(event);
|
|
77
|
+
this.emitSelectionChange(!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected));
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
this.handleSelectionControlChange = (event) => {
|
|
81
|
+
var _a;
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
if (this.isUnavailable()) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
let isChecked;
|
|
87
|
+
if ('detail' in event &&
|
|
88
|
+
typeof event.detail === 'boolean') {
|
|
89
|
+
isChecked = event.detail;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
const input = event.target;
|
|
93
|
+
isChecked = !!(input === null || input === void 0 ? void 0 : input.checked);
|
|
94
|
+
}
|
|
95
|
+
if (this.type === 'radio' && ((_a = this.item) === null || _a === void 0 ? void 0 : _a.selected) && !isChecked) {
|
|
96
|
+
this.emitSelectionChange(false);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this.emitSelectionChange(isChecked);
|
|
100
|
+
};
|
|
101
|
+
this.handleKeyDown = (event) => {
|
|
102
|
+
if (event.key !== ' ' && event.key !== 'Enter') {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
event.preventDefault();
|
|
106
|
+
if (this.isUnavailable()) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
this.toggleSelection();
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
render() {
|
|
113
|
+
const isUnavailable = this.isUnavailable();
|
|
114
|
+
return (h(Host, { key: '625f38ae7e31ae2b900366df8ad60ff2099a2ce6', id: this.item.id.toString(), class: {
|
|
115
|
+
'has-image': !!this.item.thumbnail,
|
|
116
|
+
'has-error': !!this.item.hasError,
|
|
117
|
+
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: 'b88db5b44b9dfcd858f1e395d0837623dfe9b5a5', image: this.item.thumbnail, clickable: isUnavailable ? false : true, onClick: this.handleDocumentItemClick, onKeyDown: this.handleKeyDown }, h("div", { key: '558028048aba88caf524373cbeb7c14ebc371bdb', slot: "component" }, this.renderFileSize(), this.renderBooleanInput())), this.renderHelp()));
|
|
118
|
+
}
|
|
119
|
+
renderBooleanInput() {
|
|
120
|
+
const id = this.getControlId();
|
|
121
|
+
if (this.type === 'radio') {
|
|
122
|
+
return (h("limel-radio-button", { id: id, label: this.item.fileName, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
|
|
123
|
+
}
|
|
124
|
+
return (h("limel-checkbox", { id: id, label: this.item.fileName, disabled: this.isUnavailable(), checked: this.item.selected, onClick: this.handleSelectionControlClick, onChange: this.handleSelectionControlChange }));
|
|
125
|
+
}
|
|
126
|
+
renderFileSize() {
|
|
127
|
+
var _a;
|
|
128
|
+
const formattedFileSize = formatBytes((_a = this.item) === null || _a === void 0 ? void 0 : _a.fileSize);
|
|
129
|
+
if (!formattedFileSize) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
return h("span", { class: "file-size" }, formattedFileSize);
|
|
133
|
+
}
|
|
134
|
+
renderHelp() {
|
|
135
|
+
if (!this.item.help) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
return h("limel-help", { value: this.item.help, openDirection: "bottom-end" });
|
|
139
|
+
}
|
|
140
|
+
toggleSelection() {
|
|
141
|
+
var _a, _b;
|
|
142
|
+
if (this.type === 'radio') {
|
|
143
|
+
const nextSelectedState = !((_a = this.item) === null || _a === void 0 ? void 0 : _a.selected);
|
|
144
|
+
this.emitSelectionChange(nextSelectedState);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const nextSelectedState = !((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected);
|
|
148
|
+
this.emitSelectionChange(nextSelectedState);
|
|
149
|
+
}
|
|
150
|
+
emitSelectionChange(selected) {
|
|
151
|
+
this.interact.emit(Object.assign(Object.assign({}, this.item), { selected }));
|
|
152
|
+
}
|
|
153
|
+
getControlId() {
|
|
154
|
+
return `boolean-input-${String(this.item.id)}`;
|
|
155
|
+
}
|
|
156
|
+
isUnavailable() {
|
|
157
|
+
var _a, _b;
|
|
158
|
+
return ((_a = this.item) === null || _a === void 0 ? void 0 : _a.disabled) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.hasError);
|
|
159
|
+
}
|
|
160
|
+
forceInputUnchecked(event) {
|
|
161
|
+
const target = event.target;
|
|
162
|
+
const host = target === null || target === void 0 ? void 0 : target.closest('limel-radio-button');
|
|
163
|
+
const input = host === null || host === void 0 ? void 0 : host.querySelector('input[type="radio"]');
|
|
164
|
+
if (input) {
|
|
165
|
+
input.checked = false;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
static get delegatesFocus() { return true; }
|
|
169
|
+
static get style() { return LimebbDocumentItemStyle0; }
|
|
170
|
+
}, [17, "limebb-document-item", {
|
|
171
|
+
"platform": [16],
|
|
172
|
+
"context": [16],
|
|
173
|
+
"item": [16],
|
|
174
|
+
"type": [513]
|
|
175
|
+
}]);
|
|
176
|
+
function defineCustomElement() {
|
|
177
|
+
if (typeof customElements === "undefined") {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const components = ["limebb-document-item"];
|
|
181
|
+
components.forEach(tagName => { switch (tagName) {
|
|
182
|
+
case "limebb-document-item":
|
|
183
|
+
if (!customElements.get(tagName)) {
|
|
184
|
+
customElements.define(tagName, DocumentItemComponent);
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
} });
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export { DocumentItemComponent as D, defineCustomElement as d };
|
|
@@ -10,7 +10,7 @@ const FeedItemThumbnailFileInfo = /*@__PURE__*/ proxyCustomElement(class FeedIte
|
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
|
-
return h("span", { key: '
|
|
13
|
+
return h("span", { key: 'dd3413d387c4183a82de9b4bc2e3c276f2e0d3e5' }, this.description);
|
|
14
14
|
}
|
|
15
15
|
static get style() { return LimebbFeedItemThumbnailFileInfoStyle0; }
|
|
16
16
|
}, [1, "limebb-feed-item-thumbnail-file-info", {
|
|
@@ -193,7 +193,7 @@ const FeedTimelineItem = /*@__PURE__*/ proxyCustomElement(class FeedTimelineItem
|
|
|
193
193
|
render() {
|
|
194
194
|
var _a, _b;
|
|
195
195
|
const helperTextId = `helper-text-${this.item.id}`;
|
|
196
|
-
return (h(Host, { key: '
|
|
196
|
+
return (h(Host, { key: 'ae530cfe3aa5c54f8c1d3ceae6630b606f5ca57f', id: this.item.id, class: {
|
|
197
197
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
198
198
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
199
199
|
'shows-less': !this.showMore,
|
package/dist/components/get.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { i as isArray, S as Symbol } from './_Map.js';
|
|
2
|
-
import { i as isSymbol
|
|
2
|
+
import { i as isSymbol } from './isSymbol.js';
|
|
3
|
+
import { M as MapCache } from './_MapCache.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { b as baseIsEqual } from './_baseIsEqual.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Performs a deep comparison between two values to determine if they are
|
|
5
|
+
* equivalent.
|
|
6
|
+
*
|
|
7
|
+
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
8
|
+
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
9
|
+
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
10
|
+
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
11
|
+
* nodes are compared by strict equality, i.e. `===`.
|
|
12
|
+
*
|
|
13
|
+
* @static
|
|
14
|
+
* @memberOf _
|
|
15
|
+
* @since 0.1.0
|
|
16
|
+
* @category Lang
|
|
17
|
+
* @param {*} value The value to compare.
|
|
18
|
+
* @param {*} other The other value to compare.
|
|
19
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
20
|
+
* @example
|
|
21
|
+
*
|
|
22
|
+
* var object = { 'a': 1 };
|
|
23
|
+
* var other = { 'a': 1 };
|
|
24
|
+
*
|
|
25
|
+
* _.isEqual(object, other);
|
|
26
|
+
* // => true
|
|
27
|
+
*
|
|
28
|
+
* object === other;
|
|
29
|
+
* // => false
|
|
30
|
+
*/
|
|
31
|
+
function isEqual(value, other) {
|
|
32
|
+
return baseIsEqual(value, other);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { isEqual as i };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { a as isObjectLike, b as baseGetTag } from './_Map.js';
|
|
2
|
+
|
|
3
|
+
/** `Object#toString` result references. */
|
|
4
|
+
var symbolTag = '[object Symbol]';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
8
|
+
*
|
|
9
|
+
* @static
|
|
10
|
+
* @memberOf _
|
|
11
|
+
* @since 4.0.0
|
|
12
|
+
* @category Lang
|
|
13
|
+
* @param {*} value The value to check.
|
|
14
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
15
|
+
* @example
|
|
16
|
+
*
|
|
17
|
+
* _.isSymbol(Symbol.iterator);
|
|
18
|
+
* // => true
|
|
19
|
+
*
|
|
20
|
+
* _.isSymbol('abc');
|
|
21
|
+
* // => false
|
|
22
|
+
*/
|
|
23
|
+
function isSymbol(value) {
|
|
24
|
+
return typeof value == 'symbol' ||
|
|
25
|
+
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { isSymbol as i };
|
|
@@ -37,7 +37,7 @@ const KanbanGroup = /*@__PURE__*/ proxyCustomElement(class KanbanGroup extends H
|
|
|
37
37
|
this.renderHelp(),
|
|
38
38
|
this.renderGroupHeading(),
|
|
39
39
|
this.renderGroupSummary(),
|
|
40
|
-
h("div", { key: '
|
|
40
|
+
h("div", { key: 'f02bad3d0fc87d2359dfb1a9b6ee72c93433d3f2', class: "items" }, this.renderKanbanItems(), this.renderSpinner(), this.renderLoadMore()),
|
|
41
41
|
];
|
|
42
42
|
}
|
|
43
43
|
renderGroupSummary() {
|
|
@@ -55,7 +55,7 @@ const KanbanItemComponent = /*@__PURE__*/ proxyCustomElement(class KanbanItemCom
|
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
57
|
var _a, _b;
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '4219ff4f6c63ffdf95d24ad12000c4e23b1b53c2', id: this.item.id.toString(), class: {
|
|
59
59
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
60
60
|
'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
|
|
61
61
|
}, style: {
|