@limetech/lime-crm-building-blocks 1.113.4 → 1.114.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 +15 -0
- package/dist/cjs/extension-mapping-63bdafd3.js +57 -0
- package/dist/cjs/file-extension-7c2eae39.js +22 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-document-chips.cjs.entry.js +407 -0
- package/dist/cjs/limebb-document-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/limebb-lime-query-filter-builder_3.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-group_3.cjs.entry.js +3 -3
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -55
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +25 -3
- package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-object-chip.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/document-chips/document-chips.css +20 -0
- package/dist/collection/components/document-chips/document-chips.js +178 -0
- package/dist/collection/components/document-chips/document-chips.types.js +1 -0
- 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/lime-query-filter-comparison.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +2 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
- 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/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/object-chip/object-chip.css +1 -0
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/summary-popover/summary-popover.js +49 -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/file-extension.js +18 -0
- package/dist/collection/util/file-icon-background-colors.js +98 -0
- package/dist/collection/util/file-icon-fill-colors.js +98 -0
- package/dist/collection/util/file-icon.js +18 -0
- package/dist/collection/util/file-icons.js +99 -0
- package/dist/components/document-item.js +2 -2
- package/dist/components/extension-mapping.js +55 -0
- 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-comparison.js +1 -1
- package/dist/components/lime-query-filter-expression.js +3 -3
- package/dist/components/limebb-document-chips.d.ts +11 -0
- package/dist/components/limebb-document-chips.js +437 -0
- 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-response-format-builder.js +1 -1
- package/dist/components/limebb-limeobject-file-viewer.js +1 -54
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-object-chip.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 +2 -2
- package/dist/components/notification-item.js +1 -1
- package/dist/components/order-by-editor.js +1 -1
- package/dist/components/order-by-item.js +2 -2
- package/dist/components/percentage-visualizer.js +2 -2
- package/dist/components/response-format-item.js +1 -1
- package/dist/components/summary-popover.js +45 -4
- package/dist/esm/extension-mapping-fcade195.js +55 -0
- package/dist/esm/file-extension-568475d1.js +20 -0
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-document-chips.entry.js +403 -0
- package/dist/esm/limebb-document-item.entry.js +2 -2
- package/dist/esm/limebb-document-picker.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/limebb-lime-query-filter-builder_3.entry.js +2 -2
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-group_3.entry.js +3 -3
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +1 -1
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -54
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +25 -3
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-object-chip.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-0c25d565.entry.js → p-0d0f4c0f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-35b75e49.entry.js → p-18d1ab86.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-551ffa9f.entry.js → p-1e3e06be.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ddf0dcbc.entry.js → p-20b5ff30.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b2e705bc.entry.js → p-22fffe85.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-83ff2b4c.entry.js → p-2ed843e9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-14cd62c1.entry.js → p-375f40d9.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c09dcd4c.entry.js → p-3a7b37cc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3443a292.entry.js → p-3b3e7328.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-a4f367f8.entry.js → p-4dad4ce8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-50aad872.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-9161869b.entry.js → p-53d54dc8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-1d44c670.entry.js → p-6bd5c65f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-6bf1ab6d.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-0536bf83.entry.js → p-7a6c1595.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-9aad6195.entry.js → p-7b5a1e83.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-df13ebba.entry.js → p-812bf26e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-385020b4.entry.js → p-81f8e5df.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-4d9244e7.entry.js → p-94e6f0de.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-6c67ed0e.entry.js → p-9bc5caac.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-283a6f9e.entry.js → p-9c204549.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-00414464.entry.js → p-a7e55181.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ab2a95a6.js +1 -0
- package/dist/lime-crm-building-blocks/p-b42e9740.js +1 -0
- package/dist/lime-crm-building-blocks/{p-5d0874f6.entry.js → p-d5b835a6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-d7fc530f.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-401ccdec.entry.js → p-d9f76810.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2395476f.entry.js → p-dddd8a43.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-77ef7ad1.entry.js → p-ed14ca30.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-711df3e6.entry.js → p-f8520955.entry.js} +1 -1
- package/dist/types/components/document-chips/document-chips.d.ts +45 -0
- package/dist/types/components/document-chips/document-chips.types.d.ts +23 -0
- package/dist/types/components/summary-popover/summary-popover.d.ts +10 -1
- package/dist/types/components.d.ts +110 -0
- package/dist/types/interface.d.ts +1 -0
- package/dist/types/util/file-extension.d.ts +10 -0
- package/dist/types/util/file-icon-background-colors.d.ts +3 -0
- package/dist/types/util/file-icon-fill-colors.d.ts +3 -0
- package/dist/types/util/file-icon.d.ts +9 -0
- package/dist/types/util/file-icons.d.ts +3 -0
- package/package.json +2 -2
- package/dist/lime-crm-building-blocks/p-7b9981b9.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-d2bd2fc3.entry.js +0 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { getPreviewType } from "../limeobject/file-viewer/extension-mapping";
|
|
3
|
+
import { getFileExtension } from "../../util/file-extension";
|
|
4
|
+
import { getFileIcon } from "../../util/file-icon";
|
|
5
|
+
/**
|
|
6
|
+
* Renders a list of document chips, each wrapped in a
|
|
7
|
+
* `limebb-summary-popover` that shows a file preview on hover or
|
|
8
|
+
* keyboard focus.
|
|
9
|
+
*
|
|
10
|
+
* Supports browser-previewable files (images, PDFs, video, audio, text).
|
|
11
|
+
* Office file types show a fallback message instead of an unsupported preview.
|
|
12
|
+
*
|
|
13
|
+
* The component manages blob URL creation for local files internally
|
|
14
|
+
* and cleans them up when files are removed or the component is destroyed.
|
|
15
|
+
*
|
|
16
|
+
* @exampleComponent limebb-example-document-chips-basic
|
|
17
|
+
* @exampleComponent limebb-example-document-chips-upload-states
|
|
18
|
+
*
|
|
19
|
+
* @beta
|
|
20
|
+
*/
|
|
21
|
+
export class DocumentChips {
|
|
22
|
+
constructor() {
|
|
23
|
+
/**
|
|
24
|
+
* The list of files to display as document chips.
|
|
25
|
+
*/
|
|
26
|
+
this.files = [];
|
|
27
|
+
this.blobUrls = new Map();
|
|
28
|
+
this.handleRemove = (event) => {
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
const fileId = event.detail;
|
|
31
|
+
this.revokeBlobUrl(fileId);
|
|
32
|
+
this.removeFile.emit(fileId);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
onFilesChanged(newFiles, oldFiles) {
|
|
36
|
+
const currentIds = new Set(newFiles.map((file) => file.id));
|
|
37
|
+
for (const file of oldFiles) {
|
|
38
|
+
if (!currentIds.has(file.id)) {
|
|
39
|
+
this.revokeBlobUrl(file.id);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
disconnectedCallback() {
|
|
44
|
+
this.revokeAllBlobUrls();
|
|
45
|
+
}
|
|
46
|
+
render() {
|
|
47
|
+
return (h(Host, { key: '6c8347de35ccd6061c8fa282820210f6a3bcc2c8', role: "list", "aria-label": this.accessibleLabel }, this.files.map((file) => this.renderFile(file))));
|
|
48
|
+
}
|
|
49
|
+
renderFile(file) {
|
|
50
|
+
const isReady = !file.uploadState || file.uploadState === 'done';
|
|
51
|
+
const icon = this.getIcon(file);
|
|
52
|
+
const chip = (h("limel-chip", { role: isReady ? undefined : 'listitem', slot: isReady ? 'trigger' : undefined, removable: true, identifier: file.id, text: file.filename, icon: icon, invalid: file.uploadState === 'failed', progress: file.uploadState === 'uploading'
|
|
53
|
+
? file.uploadProgress
|
|
54
|
+
: undefined, loading: file.uploadState === 'added' ||
|
|
55
|
+
file.uploadState === 'finalizing', onRemove: this.handleRemove }));
|
|
56
|
+
if (!isReady) {
|
|
57
|
+
return chip;
|
|
58
|
+
}
|
|
59
|
+
return (h("limebb-summary-popover", { role: "listitem", file: Object.assign(Object.assign({}, file), { href: this.getPreviewUrl(file) }), popoverMaxWidth: "32rem", popoverMaxHeight: "32rem", triggerDelay: 1000 }, chip));
|
|
60
|
+
}
|
|
61
|
+
getIcon(file) {
|
|
62
|
+
if (file.icon) {
|
|
63
|
+
return file.icon;
|
|
64
|
+
}
|
|
65
|
+
return getFileIcon(file.filename);
|
|
66
|
+
}
|
|
67
|
+
getPreviewUrl(file) {
|
|
68
|
+
const extension = getFileExtension(file.filename);
|
|
69
|
+
const previewType = getPreviewType(extension);
|
|
70
|
+
if (previewType === 'sharepoint') {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (file.href) {
|
|
74
|
+
return file.href;
|
|
75
|
+
}
|
|
76
|
+
if (file.fileContent) {
|
|
77
|
+
if (!this.blobUrls.has(file.id)) {
|
|
78
|
+
this.blobUrls.set(file.id, URL.createObjectURL(file.fileContent));
|
|
79
|
+
}
|
|
80
|
+
return this.blobUrls.get(file.id);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
revokeBlobUrl(fileId) {
|
|
84
|
+
const url = this.blobUrls.get(fileId);
|
|
85
|
+
if (url) {
|
|
86
|
+
URL.revokeObjectURL(url);
|
|
87
|
+
this.blobUrls.delete(fileId);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
revokeAllBlobUrls() {
|
|
91
|
+
for (const url of this.blobUrls.values())
|
|
92
|
+
URL.revokeObjectURL(url);
|
|
93
|
+
this.blobUrls.clear();
|
|
94
|
+
}
|
|
95
|
+
static get is() { return "limebb-document-chips"; }
|
|
96
|
+
static get encapsulation() { return "shadow"; }
|
|
97
|
+
static get originalStyleUrls() {
|
|
98
|
+
return {
|
|
99
|
+
"$": ["document-chips.scss"]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static get styleUrls() {
|
|
103
|
+
return {
|
|
104
|
+
"$": ["document-chips.css"]
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
static get properties() {
|
|
108
|
+
return {
|
|
109
|
+
"accessibleLabel": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"complexType": {
|
|
113
|
+
"original": "string",
|
|
114
|
+
"resolved": "string | undefined",
|
|
115
|
+
"references": {}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": true,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": "A label used to describe the purpose of the list to users\nof assistive technologies, like screen readers."
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"attribute": "accessible-label",
|
|
126
|
+
"reflect": true
|
|
127
|
+
},
|
|
128
|
+
"files": {
|
|
129
|
+
"type": "unknown",
|
|
130
|
+
"mutable": false,
|
|
131
|
+
"complexType": {
|
|
132
|
+
"original": "DocumentChipFile[]",
|
|
133
|
+
"resolved": "DocumentChipFile[]",
|
|
134
|
+
"references": {
|
|
135
|
+
"DocumentChipFile": {
|
|
136
|
+
"location": "import",
|
|
137
|
+
"path": "./document-chips.types",
|
|
138
|
+
"id": "src/components/document-chips/document-chips.types.ts::DocumentChipFile"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"required": false,
|
|
143
|
+
"optional": false,
|
|
144
|
+
"docs": {
|
|
145
|
+
"tags": [],
|
|
146
|
+
"text": "The list of files to display as document chips."
|
|
147
|
+
},
|
|
148
|
+
"getter": false,
|
|
149
|
+
"setter": false,
|
|
150
|
+
"defaultValue": "[]"
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
static get events() {
|
|
155
|
+
return [{
|
|
156
|
+
"method": "removeFile",
|
|
157
|
+
"name": "removeFile",
|
|
158
|
+
"bubbles": true,
|
|
159
|
+
"cancelable": true,
|
|
160
|
+
"composed": true,
|
|
161
|
+
"docs": {
|
|
162
|
+
"tags": [],
|
|
163
|
+
"text": "Fired when a document chip's remove button is clicked.\nThe event detail contains the file's `id`."
|
|
164
|
+
},
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "string | number",
|
|
167
|
+
"resolved": "number | string",
|
|
168
|
+
"references": {}
|
|
169
|
+
}
|
|
170
|
+
}];
|
|
171
|
+
}
|
|
172
|
+
static get watchers() {
|
|
173
|
+
return [{
|
|
174
|
+
"propName": "files",
|
|
175
|
+
"methodName": "onFilesChanged"
|
|
176
|
+
}];
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -78,10 +78,10 @@ export class DocumentItemComponent {
|
|
|
78
78
|
render() {
|
|
79
79
|
const isUnavailable = this.isUnavailable();
|
|
80
80
|
const image = this.getImage();
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: 'b8c73e13073f66162b66a62f88b8b301a6a139d4', id: String(this.item.file.id), class: {
|
|
82
82
|
'has-image': !!image,
|
|
83
83
|
'has-error': !!this.item.hasError,
|
|
84
|
-
}, 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: '
|
|
84
|
+
}, 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: '19cf30dc7a3ce2647ddc2abbd177b9f18db8001d', image: image, clickable: isUnavailable ? false : true, onClick: this.handleDocumentItemClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'd3a2c411d3cbbe4e554f9701af6f2191a4b2078d', slot: "component" }, this.renderFileSize(), this.renderBooleanInput())), this.renderHelp()));
|
|
85
85
|
}
|
|
86
86
|
renderBooleanInput() {
|
|
87
87
|
const id = this.getControlId();
|
|
@@ -76,7 +76,7 @@ export class DocumentPicker {
|
|
|
76
76
|
this.labelId = createRandomString();
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: '8f6613354bdee3af42920f78325b2e1a76bbf91e' }, h("limel-notched-outline", { key: '9b4b665b76f4c1fc1047052824c7cff1dcd7c495', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, hasFloatingLabel: true }, h("limel-masonry-layout", { key: '1578066ee0b76f4344389a91c68b09b5955bae90', slot: "content", role: this.type === 'radio' ? 'radiogroup' : 'group', "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderItems())), this.renderHelperLine()));
|
|
80
80
|
}
|
|
81
81
|
renderItems() {
|
|
82
82
|
return this.items.map((item) => (h("limebb-document-item", { platform: this.platform, context: this.context, item: item, key: item.file.id, type: this.type, onInteract: this.handleItemInteract })));
|
|
@@ -205,7 +205,7 @@ export class FeedTimelineItem {
|
|
|
205
205
|
render() {
|
|
206
206
|
var _a, _b;
|
|
207
207
|
const helperTextId = `helper-text-${this.item.id}`;
|
|
208
|
-
return (h(Host, { key: '
|
|
208
|
+
return (h(Host, { key: 'de138a29c33bcf4b77e6699b4ecc5dd4acde1c56', id: this.item.id, class: {
|
|
209
209
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
210
210
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
211
211
|
'shows-less': !this.showMore,
|
|
@@ -8,7 +8,7 @@ import { h } from "@stencil/core";
|
|
|
8
8
|
*/
|
|
9
9
|
export class FeedItemThumbnailFileInfo {
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: 'e651265e23288802ee6d89e3cfe5e0f7bd8073c3' }, this.description);
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "limebb-feed-item-thumbnail-file-info"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -103,7 +103,7 @@ export class Feed {
|
|
|
103
103
|
this.highlighter.unregisterFeed(this.feedItemElement);
|
|
104
104
|
}
|
|
105
105
|
render() {
|
|
106
|
-
return (h(Host, { key: '
|
|
106
|
+
return (h(Host, { key: 'b56f2996447a80c5cf12f83fce2ca05de53553e4', role: "log", "aria-busy": this.loading ? 'true' : 'false', style: {
|
|
107
107
|
'--limebb-feed-highlight-duration': `${ITEM_HIGHLIGHT_DURATION}ms`,
|
|
108
108
|
} }, this.renderLoadMore(), this.renderEmptyFeedMessage(), this.renderSpinner(), this.renderFeedItems()));
|
|
109
109
|
}
|
|
@@ -35,7 +35,7 @@ export class IconPicker {
|
|
|
35
35
|
icon: this.value,
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
return (h("limel-picker", { key: '
|
|
38
|
+
return (h("limel-picker", { key: 'd86348e6a8d4e6aa03ac880565cfd53eccfa4aff', label: this.label, helperText: this.helperText, disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, required: this.required, value: value, searcher: this.search, onChange: this.handleChange, badgeIcons: false, leadingIcon: "search", searchLabel: "Start typing to find the right icon" }));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "limebb-icon-picker"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -92,7 +92,7 @@ export class InfoTileAdminConfig {
|
|
|
92
92
|
},
|
|
93
93
|
];
|
|
94
94
|
return [
|
|
95
|
-
h("limel-button-group", { key: '
|
|
95
|
+
h("limel-button-group", { key: 'cac8e4793eb19e3f4d959a7a53115954b190eddf', value: buttons.filter(this.isValidButton), onChange: this.handleChangeType }),
|
|
96
96
|
this.renderFormatConfig(),
|
|
97
97
|
];
|
|
98
98
|
}
|
|
@@ -100,7 +100,7 @@ export class InfoTile {
|
|
|
100
100
|
const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
|
|
101
101
|
const normalProps = Object.assign(Object.assign({}, baseProps), { label: this.getLabel(filter), link: this.getLink(filter), loading: this.loading, value: value === null || value === void 0 ? void 0 : value.value.trim() });
|
|
102
102
|
const props = !filter || this.error ? errorProps : normalProps;
|
|
103
|
-
return (h("limel-info-tile", Object.assign({ key: '
|
|
103
|
+
return (h("limel-info-tile", Object.assign({ key: '1211ee931d2cf7a5a3c13896515812ddbcab29f2', class: { error: !filter || this.error } }, props)));
|
|
104
104
|
}
|
|
105
105
|
getFormattedValue() {
|
|
106
106
|
if (!this.value && this.value !== 0) {
|
|
@@ -27,7 +27,7 @@ export class KanbanGroup {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '45122f5462476d2c0c9a44af4c5281ef510fdea1' }, this.renderHelp(), this.renderGroupHeading(), this.renderGroupSummary(), this.renderItems()));
|
|
31
31
|
}
|
|
32
32
|
renderGroupSummary() {
|
|
33
33
|
if (!this.summary || !this.totalCount) {
|
|
@@ -55,7 +55,7 @@ export class KanbanItemComponent {
|
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
57
|
var _a, _b;
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: 'b426be161e49623843ff6c47cddad048177ca441', 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: {
|
package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js
CHANGED
|
@@ -122,7 +122,7 @@ export class LimeQueryFilterComparisonComponent {
|
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
render() {
|
|
125
|
-
return (h(Host, { key: '
|
|
125
|
+
return (h(Host, { key: '008be722e21a16f4e2f80f655f70a564a9b1e38d' }, this.renderHeader(), h("div", { key: '2cd041b142596671c7ead3849406b8fa65c29926', class: "expression-container" }, this.renderPropertySelector(), this.renderOperator(), this.renderValueInput(), h("limel-icon-button", { key: '1fb2fc8a0cec0b70f5d3c24a976f0f436a294eae', class: "remove", icon: "trash", label: "Remove condition", onClick: this.removeExpression }))));
|
|
126
126
|
}
|
|
127
127
|
renderHeader() {
|
|
128
128
|
if (!this.label) {
|
package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js
CHANGED
|
@@ -72,9 +72,9 @@ export class LimeQueryFilterGroupComponent {
|
|
|
72
72
|
(this.expression.op === Operator.AND ? 'and' : 'or')) || this.options[0];
|
|
73
73
|
}
|
|
74
74
|
render() {
|
|
75
|
-
return (h(Host, { key: '
|
|
75
|
+
return (h(Host, { key: 'a93a715b9bd65e6e9381083aef11951588471fc5', style: {
|
|
76
76
|
'--limebb-lime-query-filter-group-operator': `"${this.expression.op === Operator.AND ? 'AND' : 'OR'}"`,
|
|
77
|
-
} }, h("div", { key: '
|
|
77
|
+
} }, h("div", { key: 'efbf025924e34613504f38db66affa1650bfe70c', class: "expression" }, this.renderHeader(), h("ul", { key: '6e287058fb7969124e4f22b42b32b14d80c0511f' }, this.expression.exp.map(this.renderChildExpression), this.renderAddButton()), this.renderAddGroupButton())));
|
|
78
78
|
}
|
|
79
79
|
renderHeader() {
|
|
80
80
|
const subheading = this.getSubheading();
|
|
@@ -35,7 +35,7 @@ export class LimeQueryFilterNotComponent {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (h("div", { key: '
|
|
38
|
+
return (h("div", { key: '2967dd36cabe81bc1f140be7d11d471b1f29f5e7', class: "expression" }, this.label && h("limel-header", { key: '5a7ab204d8c0d45706ad61b1db8d1ef3acfb0731', heading: this.label }), h("limebb-lime-query-filter-expression", { key: 'ee8ea7f9eeb111d77abbcecd98d61e550ff8cdb9', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.exp, onExpressionChange: this.handleExpressionChange })));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "limebb-lime-query-filter-not"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -172,7 +172,7 @@ export class LimeQueryBuilder {
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
render() {
|
|
175
|
-
return (h(Host, { key: '
|
|
175
|
+
return (h(Host, { key: '883901b3f445419dad53e7c02dd160ad7483c0cb' }, this.renderHeader(), this.renderContent()));
|
|
176
176
|
}
|
|
177
177
|
renderContent() {
|
|
178
178
|
const visualModeSupported = this.checkVisualModeSupport();
|
|
@@ -154,7 +154,7 @@ export class LimeQueryResponseFormatBuilder {
|
|
|
154
154
|
}
|
|
155
155
|
render() {
|
|
156
156
|
const visualModeSupported = this.checkVisualModeSupport();
|
|
157
|
-
return (h("div", { key: '
|
|
157
|
+
return (h("div", { key: '7f4adae0e3f4d14194fc558600db983f45fe760a', class: "response-format-builder" }, this.label && h("h1", { key: 'eeb78bdccf2f8e344de742618b72a7bb341e5bf5', class: "builder-label" }, this.label), this.helperText && (h("p", { key: '03ff96e0645d03377b28c048f02d868046f17903', class: "builder-helper-text" }, this.helperText)), this.visualModeEnabled && (h("div", { key: '65ca3551326e0ec4deff00aff4a19aec2fee9702', class: "mode-controls" }, this.renderModeSwitch(visualModeSupported))), !this.visualModeEnabled || this.mode === 'code' ? (h("div", { class: "code-mode" }, this.renderCodeEditor(visualModeSupported))) : (h("div", { class: "visual-mode" }, this.renderVisualMode()))));
|
|
158
158
|
}
|
|
159
159
|
renderModeSwitch(support) {
|
|
160
160
|
const visualDisabled = !support.visualModeSupported;
|
|
@@ -78,7 +78,7 @@ export class LimetypeField {
|
|
|
78
78
|
value: '',
|
|
79
79
|
};
|
|
80
80
|
options.unshift(emptyOption);
|
|
81
|
-
return (h("limel-select", { key: '
|
|
81
|
+
return (h("limel-select", { key: '6157ed54a38920f001fa79b5a39c48b677826dd5', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
|
|
82
82
|
}
|
|
83
83
|
componentWillRender() {
|
|
84
84
|
this.updatePropertyFields(this.value || '');
|
|
@@ -69,7 +69,7 @@ export class OrderByEditor {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: 'accbc6c9e4d55d7480a0742da0bc96db3077fbf1' }, this.renderEmptyState(), this.renderOrderByEditor()));
|
|
73
73
|
}
|
|
74
74
|
renderEmptyState() {
|
|
75
75
|
if (this.limetype) {
|
|
@@ -38,9 +38,9 @@ export class OrderByItemComponent {
|
|
|
38
38
|
render() {
|
|
39
39
|
const propertyPath = Object.keys(this.item)[0] || '';
|
|
40
40
|
const direction = this.item[propertyPath] || 'ASC';
|
|
41
|
-
return (h(Host, { key: '
|
|
41
|
+
return (h(Host, { key: 'd9acb6f013d44d467410a7ed0f318d668bf54055' }, h("limebb-property-selector", { key: '419cfc3264a1fcae40888cc43f5c60a68f2f23db', platform: this.platform, context: this.context, limetype: this.limetype, label: "Property", value: propertyPath, required: true, onChange: this.handlePathChange }), h("div", { key: 'b85f69b1596a61d6d0b63cf857e5b0382f2b6e8c', class: "control-buttons" }, h("limel-icon-button", { key: 'd7beb38b2452bd41ab1cd5f273292c9e58be15cf', icon: direction === 'ASC'
|
|
42
42
|
? 'sort_ascending'
|
|
43
|
-
: 'sort_descending', label: direction === 'ASC' ? 'Ascending' : 'Descending', onClick: this.handleToggleDirection }), h("limel-icon-button", { key: '
|
|
43
|
+
: 'sort_descending', label: direction === 'ASC' ? 'Ascending' : 'Descending', onClick: this.handleToggleDirection }), h("limel-icon-button", { key: '0407b6a44822a4ee182aa95140fe8d9fd01dc377', icon: "trash", label: "Remove", onClick: this.handleRemove }))));
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "limebb-lime-query-order-by-item"; }
|
|
46
46
|
static get encapsulation() { return "shadow"; }
|
package/dist/collection/components/lime-query-builder/response-format/response-format-item.js
CHANGED
|
@@ -66,7 +66,7 @@ export class ResponseFormatItem {
|
|
|
66
66
|
}
|
|
67
67
|
render() {
|
|
68
68
|
return [
|
|
69
|
-
h("div", { key: '
|
|
69
|
+
h("div", { key: '5f95a0ebd3f9eb632405f2bf8f1ac14a00042c5a', class: "property-controls" }, h("div", { key: '26d132043bf28e243749b97f7e5d3e439b2756dc', class: "property-path" }, h("limebb-property-selector", { key: '7c7616d91cd4a51648e22171ba921e7586b2e1f0', platform: this.platform, context: this.context, limetype: this.limetype, label: "Property", value: this.item.path, required: true, onChange: this.handlePathChange }), h("div", { key: '805a1a1776eaf1c1e46ebeabe899d6c0d0576043', class: "input-grid" }, this.renderAliasInput()), h("div", { key: 'd38b4d3b5d9e58a112dbadcf847102aa29659ddb', class: "input-grid" }, this.renderDescriptionInput()), h("div", { key: '7cecdf95dc03bc55ab267c8357139360cde63a1c', class: "button-group" }, this.renderAliasButton(), this.renderDescriptionButton())), h("limel-icon-button", { key: '1e98658175aa6c02abc647425c87f8f4e9680520', icon: "trash", label: "Remove property", onClick: this.handleRemove })),
|
|
70
70
|
];
|
|
71
71
|
}
|
|
72
72
|
renderAliasButton() {
|
|
@@ -5,8 +5,8 @@ import { h } from "@stencil/core";
|
|
|
5
5
|
export class LiveDocsInfo {
|
|
6
6
|
render() {
|
|
7
7
|
return [
|
|
8
|
-
h("div", { key: '
|
|
9
|
-
h("p", { key: '
|
|
8
|
+
h("div", { key: 'c3152fe06ce8121b41d8cea5e2e072960f4f2dbd', class: "header" }, h("limel-icon", { key: '75ae76ece389f6b65ca9ae8b1859404e3c344f20', name: "not_showing_video_frames" }), h("h2", { key: '97ec2ce77d697daccdc32c0150be556e77e314c6' }, "Viewing this file type requires ", h("em", { key: '4a851090390b307193f2df2a4129ce9e661d3046' }, "Live Docs"))),
|
|
9
|
+
h("p", { key: 'f2326f85486bc9f8864b56bcee179eb5a2aeedd4' }, h("em", { key: 'c01d97bf47d22fa51b0955ca6dae2bfb48e3bcc6' }, "Live Docs"), " not only enables you to view many file formats such as Microsoft Office documents, but it also empowers you to edit them right in the CRM. No need to download anything on your device!", h("a", { key: '92719f5981b74442abcf951cd187236140d7e5b5', target: "_blank", href: "https://www.lime-technologies.com/en/lime-crm/live-docs/" }, "Learn more")),
|
|
10
10
|
];
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "limebb-live-docs-info"; }
|
|
@@ -53,7 +53,7 @@ export class LocalePicker {
|
|
|
53
53
|
const value = this.value;
|
|
54
54
|
selectedOptions = options.find((option) => option.value === value);
|
|
55
55
|
}
|
|
56
|
-
return (h("limel-select", { key: '
|
|
56
|
+
return (h("limel-select", { key: '146ecba3fc26664d49336cb4576887caee2b7f9f', value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "limebb-locale-picker"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,7 +56,7 @@ export class NotificationListItem {
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
var _a, _b;
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: 'b3568cd406313837db0baae97446cc00800e174c', id: this.item.id, class: {
|
|
60
60
|
'is-clickable': this.isItemClickable(),
|
|
61
61
|
'is-read': !!((_a = this.item) === null || _a === void 0 ? void 0 : _a.read),
|
|
62
62
|
'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
|
|
@@ -91,11 +91,11 @@ export class PercentageVisualizer {
|
|
|
91
91
|
render() {
|
|
92
92
|
const normalizedValue = this.getNormalizedValue();
|
|
93
93
|
const zeroPoint = this.getZeroPointPosition();
|
|
94
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: '0546d64013773f4c73fee3fffc7a9679ef6c95c5', class: this.getContainerClassList(), style: {
|
|
95
95
|
'--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
|
|
96
96
|
'--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
|
|
97
97
|
'--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
|
|
98
|
-
} }, h("limel-notched-outline", { key: '
|
|
98
|
+
} }, h("limel-notched-outline", { key: 'df29f109a2d606b2b8d724e92be4161f19d8e025', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, h("div", { key: '7a4f7c2fb608f0006e3963e5d6d0eaefba0ecbbe', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
|
|
99
99
|
}
|
|
100
100
|
renderVisualization() {
|
|
101
101
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { getPreviewType } from "../limeobject/file-viewer/extension-mapping";
|
|
3
|
+
import { getFileExtension } from "../../util/file-extension";
|
|
2
4
|
/**
|
|
3
5
|
* This component uses
|
|
4
6
|
* [limel-popover](https://lundalogik.github.io/lime-elements/versions/latest/#/component/limel-popover/)
|
|
@@ -56,6 +58,7 @@ import { h } from "@stencil/core";
|
|
|
56
58
|
*
|
|
57
59
|
* @exampleComponent limebb-example-summary-popover-basic
|
|
58
60
|
* @exampleComponent limebb-example-summary-popover-image
|
|
61
|
+
* @exampleComponent limebb-example-summary-popover-file-preview
|
|
59
62
|
* @exampleComponent limebb-example-summary-popover-actions
|
|
60
63
|
* @exampleComponent limebb-example-summary-popover-trigger-delay
|
|
61
64
|
*
|
|
@@ -125,14 +128,34 @@ export class SummaryPopover {
|
|
|
125
128
|
top: '0.125rem',
|
|
126
129
|
right: '0.125rem',
|
|
127
130
|
};
|
|
128
|
-
return (h("limel-popover", { key: '
|
|
131
|
+
return (h("limel-popover", { key: '26159e81e1fd3547fe0f9b59f5edd9144778cc15', style: {
|
|
129
132
|
'--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
|
|
130
|
-
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '
|
|
133
|
+
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, h("div", { key: '5f6c72787f4dafebbce1428da6ba1515ecce451e', slot: "trigger", onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocusin: this.openPopoverWithDelay }, h("slot", { key: '4a5d186f511a245d6d4c48df754add7eaf3380df', name: "trigger" }), h("div", { key: '64a9db4b3ff460b84345a60b9efccc80aa75a2cd', class: "opening-countdown-indicator" })), this.renderCard(closeButtonStyle)));
|
|
134
|
+
}
|
|
135
|
+
renderCard(closeButtonStyle) {
|
|
136
|
+
return (h("limel-card", { style: {
|
|
131
137
|
'max-width': this.popoverMaxWidth,
|
|
132
138
|
'max-height': this.popoverMaxHeight,
|
|
133
139
|
'min-width': '7rem',
|
|
134
140
|
'min-height': '3rem',
|
|
135
|
-
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, h("limebb-navigation-button", {
|
|
141
|
+
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, this.renderFileViewer(), h("limebb-navigation-button", { slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick })));
|
|
142
|
+
}
|
|
143
|
+
renderFileViewer() {
|
|
144
|
+
var _a;
|
|
145
|
+
if (!this.file) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
const extension = getFileExtension((_a = this.file.filename) !== null && _a !== void 0 ? _a : '');
|
|
149
|
+
const previewType = getPreviewType(extension);
|
|
150
|
+
const isUnsupported = previewType === 'sharepoint' || previewType === 'unsupported';
|
|
151
|
+
const isPdf = extension === 'pdf';
|
|
152
|
+
const style = {
|
|
153
|
+
flex: '1',
|
|
154
|
+
overflow: 'hidden',
|
|
155
|
+
borderRadius: '0.5rem',
|
|
156
|
+
minHeight: isPdf ? '20rem' : undefined,
|
|
157
|
+
};
|
|
158
|
+
return (h("limel-file-viewer", { slot: "component", style: style, url: this.file.href, filename: isUnsupported ? undefined : this.file.filename }));
|
|
136
159
|
}
|
|
137
160
|
static get is() { return "limebb-summary-popover"; }
|
|
138
161
|
static get encapsulation() { return "shadow"; }
|
|
@@ -229,6 +252,29 @@ export class SummaryPopover {
|
|
|
229
252
|
"getter": false,
|
|
230
253
|
"setter": false
|
|
231
254
|
},
|
|
255
|
+
"file": {
|
|
256
|
+
"type": "unknown",
|
|
257
|
+
"mutable": false,
|
|
258
|
+
"complexType": {
|
|
259
|
+
"original": "FileInfo",
|
|
260
|
+
"resolved": "FileInfo | undefined",
|
|
261
|
+
"references": {
|
|
262
|
+
"FileInfo": {
|
|
263
|
+
"location": "import",
|
|
264
|
+
"path": "@limetech/lime-elements",
|
|
265
|
+
"id": "node_modules::FileInfo"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": true,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": "A file to preview in the popover.\nWhen provided, a `limel-file-viewer` is rendered\ninside the card alongside any other card content."
|
|
274
|
+
},
|
|
275
|
+
"getter": false,
|
|
276
|
+
"setter": false
|
|
277
|
+
},
|
|
232
278
|
"icon": {
|
|
233
279
|
"type": "string",
|
|
234
280
|
"mutable": false,
|
|
@@ -13,8 +13,8 @@ export class MentionGroupCounter {
|
|
|
13
13
|
render() {
|
|
14
14
|
const label = this.getLabel();
|
|
15
15
|
return [
|
|
16
|
-
h("span", { key: '
|
|
17
|
-
h("limel-tooltip", { key: '
|
|
16
|
+
h("span", { key: 'c4ad6f97f70c527ff27ed51ab61e99cb16cb23bd', id: this.tooltipId }, label),
|
|
17
|
+
h("limel-tooltip", { key: '0d8e7488f6974d7012eb15ae36bb212dbcfad367', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
|
|
18
18
|
];
|
|
19
19
|
}
|
|
20
20
|
getLabel() {
|
|
@@ -391,7 +391,7 @@ export class LimeBBTextEditor {
|
|
|
391
391
|
}
|
|
392
392
|
render() {
|
|
393
393
|
return [
|
|
394
|
-
h("limel-text-editor", { key: '
|
|
394
|
+
h("limel-text-editor", { key: '4b9a47363ae1ad08fdcf09159ba5fa1d7c97cdc2', ref: (el) => (this.textEditor = el), 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 }),
|
|
395
395
|
this.renderPicker(),
|
|
396
396
|
];
|
|
397
397
|
}
|
|
@@ -52,7 +52,7 @@ export class TrendIndicator {
|
|
|
52
52
|
this.numValue = this.parseValue(this.value);
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '87197f593d5d5354a773e459a99f410f4c4f6306', class: this.getContainerClassList() }, h("limel-notched-outline", { key: 'e836c618cdafffafef15bbfeb71e865786ad2c51', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, h("div", { key: '62cc0bce82b42cf447183f5d049bc92863b5e145', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
|
|
56
56
|
}
|
|
57
57
|
renderVisualization() {
|
|
58
58
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts the file extension from a filename.
|
|
3
|
+
*
|
|
4
|
+
* Returns the lowercased extension without the dot,
|
|
5
|
+
* or an empty string if the filename has no extension.
|
|
6
|
+
*
|
|
7
|
+
* @param filename - the filename to extract the extension from
|
|
8
|
+
*/
|
|
9
|
+
export function getFileExtension(filename) {
|
|
10
|
+
if (!filename) {
|
|
11
|
+
return '';
|
|
12
|
+
}
|
|
13
|
+
const lastDot = filename.lastIndexOf('.');
|
|
14
|
+
if (lastDot < 1) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
return filename.slice(lastDot + 1).toLowerCase();
|
|
18
|
+
}
|