@limetech/lime-crm-building-blocks 1.92.2 → 1.93.1
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 +20 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +94 -72
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/limeobject/file-viewer/extension-mapping.js +51 -0
- package/dist/collection/components/limeobject/file-viewer/file-viewer.js +44 -44
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-limeobject-file-viewer.js +101 -73
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +94 -72
- 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-1d06c167.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-a1818969.entry.js +1 -0
- package/dist/types/components/limeobject/file-viewer/extension-mapping.d.ts +9 -0
- package/dist/types/components/limeobject/file-viewer/file-viewer.d.ts +1 -1
- package/package.json +1 -1
- package/dist/lime-crm-building-blocks/p-42f6a0d2.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-bebe4db0.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [1.93.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.93.0...v1.93.1) (2025-09-26)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **feed:** prevent re-rendering the entire feed, when load more is clicked ([8cb99f6](https://github.com/Lundalogik/lime-crm-building-blocks/commit/8cb99f66986f19a5b351ebae7367ba4da2dcde3a))
|
|
7
|
+
|
|
8
|
+
## [1.93.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.92.2...v1.93.0) (2025-09-26)
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
* **file-viwer:** add support for unsupported LiveDocs rendering ([9120fbd](https://github.com/Lundalogik/lime-crm-building-blocks/commit/9120fbdfa29b15fcabe83a57ee3fb1178d5cb44d))
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* **file-viewer:** allow opening a file in a new tab ([6a58065](https://github.com/Lundalogik/lime-crm-building-blocks/commit/6a580659be92117f0f2cc21e386df27e41b2ceb8))
|
|
18
|
+
* **file-viewer:** prevent downloading a file ([0149b46](https://github.com/Lundalogik/lime-crm-building-blocks/commit/0149b46f9526da9f368f4894e618d0383022b291))
|
|
19
|
+
* **file-viwer:** show live doc info message when the feature switch is false ([a805989](https://github.com/Lundalogik/lime-crm-building-blocks/commit/a805989701c9f3ed8bd90cb1120b253612c3db76))
|
|
20
|
+
|
|
1
21
|
## [1.92.2](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.92.1...v1.92.2) (2025-09-26)
|
|
2
22
|
|
|
3
23
|
### Bug Fixes
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["limebb-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":["highlightedItemIdChanged"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":["handleItemsChange"]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":["watchOpen"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-
|
|
22
|
+
return index.bootstrapLazy([["limebb-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":["highlightedItemIdChanged"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":["handleItemsChange"]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":["watchOpen"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]},null,{"formInfo":["watchFormInfo"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker.cjs",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[513,"filter-id"],"disabled":[4],"icon":[513],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"format":[16],"config":[32],"filters":[32],"value":[32],"loading":[32],"error":[32]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format.cjs",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format.cjs",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format.cjs",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format.cjs",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format.cjs",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-loader.cjs",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["limebb-locale-picker.cjs",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["limebb-mention.cjs",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter.cjs",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-percentage-visualizer.cjs",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":["valueChanged"]}]]],["limebb-trend-indicator.cjs",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":["valueChanged"]}]]],["limebb-feed-item-thumbnail-file-info.cjs",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["limebb-navigation-button_2.cjs",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-kanban-group.cjs",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["limebb-text-editor-picker.cjs",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"platform":[16],"context":[16],"label":[513],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[1]}]]],["limebb-date-picker.cjs",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["limebb-live-docs-info.cjs",[[1,"limebb-live-docs-info"]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-chat-item_2.cjs",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["limebb-empty-state.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -255,7 +255,7 @@ const Feed = class {
|
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
renderFeedItems() {
|
|
258
|
-
return this.groupedItems.map((group) => (index.h("section", { class: "date-group", key: `date-group-${group.date}
|
|
258
|
+
return this.groupedItems.map((group) => (index.h("section", { class: "date-group", key: `date-group-${group.date}` }, index.h("a", { class: "date-heading" }, group.date), group.items.map(({ item, index: index$1 }) => [
|
|
259
259
|
this.renderNewItemsIndicator(item.timestamp, index$1),
|
|
260
260
|
index.h("limebb-feed-timeline-item", { platform: this.platform, context: this.context, item: item, key: item.id, ui: item === null || item === void 0 ? void 0 : item.ui, helperText: item === null || item === void 0 ? void 0 : item.helperText, hasError: item === null || item === void 0 ? void 0 : item.hasError, isBundled: this.isBundled(item, index$1) }),
|
|
261
261
|
]))));
|
|
@@ -7,35 +7,58 @@ const index_esm = require('./index.esm-a894ac76.js');
|
|
|
7
7
|
const negate = require('./negate-e0a2bf77.js');
|
|
8
8
|
|
|
9
9
|
const LIVE_DOCS_TYPES = ['pdf', 'edit', 'view'];
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
'
|
|
29
|
-
'
|
|
30
|
-
'
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
|
|
10
|
+
|
|
11
|
+
// Map of file extensions to their preview type
|
|
12
|
+
const previewExtensionMap = {
|
|
13
|
+
// Browser-native preview
|
|
14
|
+
avi: 'browser',
|
|
15
|
+
bmp: 'browser',
|
|
16
|
+
csv: 'browser', // CSV shows as plain text
|
|
17
|
+
gif: 'browser',
|
|
18
|
+
heic: 'browser',
|
|
19
|
+
html: 'browser',
|
|
20
|
+
jpeg: 'browser',
|
|
21
|
+
jpg: 'browser',
|
|
22
|
+
json: 'browser',
|
|
23
|
+
mp3: 'browser',
|
|
24
|
+
mp4: 'browser',
|
|
25
|
+
mov: 'browser',
|
|
26
|
+
ogg: 'browser',
|
|
27
|
+
pdf: 'browser',
|
|
28
|
+
png: 'browser',
|
|
29
|
+
svg: 'browser',
|
|
30
|
+
svgz: 'browser',
|
|
31
|
+
txt: 'browser',
|
|
32
|
+
wav: 'browser',
|
|
33
|
+
wmv: 'browser',
|
|
34
|
+
xml: 'browser',
|
|
35
|
+
// SharePoint PDF preview
|
|
36
|
+
doc: 'sharepoint',
|
|
37
|
+
docx: 'sharepoint',
|
|
38
|
+
dot: 'sharepoint',
|
|
39
|
+
dotx: 'sharepoint',
|
|
40
|
+
odp: 'sharepoint',
|
|
41
|
+
ods: 'sharepoint',
|
|
42
|
+
pot: 'sharepoint',
|
|
43
|
+
ppt: 'sharepoint',
|
|
44
|
+
pptx: 'sharepoint',
|
|
45
|
+
pps: 'sharepoint',
|
|
46
|
+
ppsx: 'sharepoint',
|
|
47
|
+
xls: 'sharepoint',
|
|
48
|
+
xlsb: 'sharepoint',
|
|
49
|
+
xlsm: 'sharepoint',
|
|
50
|
+
xlsx: 'sharepoint',
|
|
51
|
+
odt: 'sharepoint',
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Determines how a file can be previewed.
|
|
55
|
+
*
|
|
56
|
+
* @param extension - The file extension (case-insensitive).
|
|
57
|
+
* @returns The preview type.
|
|
58
|
+
*/
|
|
59
|
+
function getPreviewType(extension) {
|
|
60
|
+
return previewExtensionMap[extension.toLowerCase()] || 'unsupported';
|
|
61
|
+
}
|
|
39
62
|
|
|
40
63
|
const fileViewerCss = ".not-found{display:flex;flex-direction:column;height:100%;align-items:center;justify-content:center;line-height:1rem;color:rgb(var(--contrast-1100))}.not-found limel-icon{color:rgb(var(--color-red-default))}iframe{height:100%;width:100%}";
|
|
41
64
|
const LimebbLimeobjectFileViewerStyle0 = fileViewerCss;
|
|
@@ -59,41 +82,51 @@ const FileViewer = class {
|
|
|
59
82
|
* The first available one will be used
|
|
60
83
|
*/
|
|
61
84
|
this.fileTypes = ['view', 'contents', 'download'];
|
|
85
|
+
this.renderLiveDocs = (file) => {
|
|
86
|
+
if (!this.isLiveDocsAvailable(file)) {
|
|
87
|
+
return index.h("limebb-live-docs-info", null);
|
|
88
|
+
}
|
|
89
|
+
if (!this.platform.isFeatureEnabled('useOfficeFilePreview')) {
|
|
90
|
+
return (index.h("limebb-empty-state", { value: 'Preview of this file type will be available soon', icon: {
|
|
91
|
+
name: 'attention',
|
|
92
|
+
color: 'rgb(var(--color-blue-light))',
|
|
93
|
+
} }));
|
|
94
|
+
}
|
|
95
|
+
const url = this.getLiveDocsUrl(file);
|
|
96
|
+
return (index.h("iframe", { src: url, frameBorder: 0, marginHeight: 0, marginWidth: 0 }));
|
|
97
|
+
};
|
|
98
|
+
this.renderFileViewer = (file) => {
|
|
99
|
+
const filename = file.filename;
|
|
100
|
+
const url = this.getFileUrl(file);
|
|
101
|
+
if (!url) {
|
|
102
|
+
return this.renderNotFound();
|
|
103
|
+
}
|
|
104
|
+
return (index.h("limel-file-viewer", { filename: filename, url: url, allowFullscreen: true, allowOpenInNewTab: true }));
|
|
105
|
+
};
|
|
106
|
+
this.renderUnsupported = (file) => {
|
|
107
|
+
return (index.h("limel-file-viewer", { filename: file.filename, url: undefined, allowFullscreen: true, allowOpenInNewTab: true }));
|
|
108
|
+
};
|
|
109
|
+
this.renderNotFound = () => {
|
|
110
|
+
return [
|
|
111
|
+
index.h("section", { class: "not-found" }, index.h("limel-icon", { name: "error", size: "large" }), index.h("h2", null, this.translator.get('webclient.not-found')), index.h("p", null, this.translator.get('webclient.no-files-attached', {
|
|
112
|
+
object: this.getDescriptive(this.limeobject),
|
|
113
|
+
}))),
|
|
114
|
+
];
|
|
115
|
+
};
|
|
62
116
|
}
|
|
63
117
|
render() {
|
|
64
118
|
const file = this.getFile();
|
|
65
119
|
if (!file) {
|
|
66
120
|
return this.renderNotFound();
|
|
67
121
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
renderLiveDocs(file) {
|
|
77
|
-
const url = this.getLiveDocsUrl(file);
|
|
78
|
-
if (!url) {
|
|
79
|
-
return this.renderNotFound();
|
|
80
|
-
}
|
|
81
|
-
return (index.h("iframe", { src: url, frameBorder: 0, marginHeight: 0, marginWidth: 0 }));
|
|
82
|
-
}
|
|
83
|
-
renderFileViewer(file) {
|
|
84
|
-
const filename = file.filename;
|
|
85
|
-
const url = this.getFileUrl(file);
|
|
86
|
-
if (!url) {
|
|
87
|
-
return this.renderNotFound();
|
|
88
|
-
}
|
|
89
|
-
return (index.h("limel-file-viewer", { filename: filename, url: url, allowDownload: true, allowFullscreen: true }));
|
|
90
|
-
}
|
|
91
|
-
renderNotFound() {
|
|
92
|
-
return [
|
|
93
|
-
index.h("section", { class: "not-found" }, index.h("limel-icon", { name: "error", size: "large" }), index.h("h2", null, this.translator.get('webclient.not-found')), index.h("p", null, this.translator.get('webclient.no-files-attached', {
|
|
94
|
-
object: this.getDescriptive(this.limeobject),
|
|
95
|
-
}))),
|
|
96
|
-
];
|
|
122
|
+
const fileType = getPreviewType(file.extension);
|
|
123
|
+
const fileViewerFunctions = {
|
|
124
|
+
browser: this.renderFileViewer,
|
|
125
|
+
sharepoint: this.renderLiveDocs,
|
|
126
|
+
unsupported: this.renderUnsupported,
|
|
127
|
+
};
|
|
128
|
+
const fileViewerFunction = fileViewerFunctions[fileType];
|
|
129
|
+
return fileViewerFunction(file);
|
|
97
130
|
}
|
|
98
131
|
getLiveDocsUrl(file) {
|
|
99
132
|
let fileTypes = [...this.fileTypes];
|
|
@@ -118,9 +151,6 @@ const FileViewer = class {
|
|
|
118
151
|
}
|
|
119
152
|
return this.limeobject.getFile(property.name);
|
|
120
153
|
}
|
|
121
|
-
isLiveDocsExtension(file) {
|
|
122
|
-
return LIVE_DOCS_EXTENSIONS.includes(file.extension);
|
|
123
|
-
}
|
|
124
154
|
isLiveDocsAvailable(file) {
|
|
125
155
|
return LIVE_DOCS_TYPES.some((type) => file.getUrl(type));
|
|
126
156
|
}
|
|
@@ -129,17 +159,9 @@ const FileViewer = class {
|
|
|
129
159
|
}
|
|
130
160
|
getDescriptive(limeobject) {
|
|
131
161
|
var _a;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
if (!descriptive) {
|
|
137
|
-
descriptive = (_a = this.limetype) === null || _a === void 0 ? void 0 : _a.localname.singular;
|
|
138
|
-
}
|
|
139
|
-
if (!descriptive) {
|
|
140
|
-
descriptive = this.translator.get('object');
|
|
141
|
-
}
|
|
142
|
-
return descriptive;
|
|
162
|
+
return ((limeobject === null || limeobject === void 0 ? void 0 : limeobject.descriptive) ||
|
|
163
|
+
((_a = this.limetype) === null || _a === void 0 ? void 0 : _a.localname.singular) ||
|
|
164
|
+
this.translator.get('object'));
|
|
143
165
|
}
|
|
144
166
|
get fileProperty() {
|
|
145
167
|
if (!this.limeobject) {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["limebb-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":["highlightedItemIdChanged"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":["handleItemsChange"]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":["watchOpen"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-
|
|
11
|
+
return index.bootstrapLazy([["limebb-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"heading":[1],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"direction":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":["highlightedItemIdChanged"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":["handleItemsChange"]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":["watchOpen"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[1,"limebb-date-range",{"platform":[16],"context":[16],"startTime":[16],"endTime":[16],"startTimeLabel":[1,"start-time-label"],"endTimeLabel":[1,"end-time-label"],"language":[1],"timeFormat":[1,"time-format"],"type":[1]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[1,"limebb-component-config",{"platform":[16],"context":[16],"value":[16],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"formInfo":[16],"type":[1],"nameField":[1,"name-field"],"configComponent":[32],"configViewType":[32]},null,{"formInfo":["watchFormInfo"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker.cjs",[[1,"limebb-component-picker",{"platform":[16],"context":[16],"type":[1],"tags":[16],"value":[1],"copyLabel":[1,"copy-label"],"hideCopyButton":[4,"hide-copy-button"],"required":[4],"readonly":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[1,"limebb-info-tile",{"platform":[16],"context":[16],"filterId":[513,"filter-id"],"disabled":[4],"icon":[513],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"format":[16],"config":[32],"filters":[32],"value":[32],"loading":[32],"error":[32]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format.cjs",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format.cjs",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format.cjs",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format.cjs",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format.cjs",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-loader.cjs",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["limebb-locale-picker.cjs",[[1,"limebb-locale-picker",{"platform":[16],"context":[16],"value":[1],"required":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"],"readonly":[4],"multipleChoice":[4,"multiple-choice"],"allLanguages":[32]}]]],["limebb-mention.cjs",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter.cjs",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-percentage-visualizer.cjs",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":["valueChanged"]}]]],["limebb-trend-indicator.cjs",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":["valueChanged"]}]]],["limebb-feed-item-thumbnail-file-info.cjs",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["limebb-navigation-button_2.cjs",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-kanban-group.cjs",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["limebb-text-editor-picker.cjs",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"platform":[16],"context":[16],"label":[513],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[1]}]]],["limebb-date-picker.cjs",[[1,"limebb-date-picker",{"platform":[16],"context":[16],"disabled":[516],"readonly":[516],"invalid":[516],"label":[513],"placeholder":[513],"helperText":[513,"helper-text"],"required":[516],"value":[1],"type":[513]}]]],["limebb-live-docs-info.cjs",[[1,"limebb-live-docs-info"]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-chat-item_2.cjs",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["limebb-empty-state.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -117,7 +117,7 @@ export class Feed {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
renderFeedItems() {
|
|
120
|
-
return this.groupedItems.map((group) => (h("section", { class: "date-group", key: `date-group-${group.date}
|
|
120
|
+
return this.groupedItems.map((group) => (h("section", { class: "date-group", key: `date-group-${group.date}` }, h("a", { class: "date-heading" }, group.date), group.items.map(({ item, index }) => [
|
|
121
121
|
this.renderNewItemsIndicator(item.timestamp, index),
|
|
122
122
|
h("limebb-feed-timeline-item", { platform: this.platform, context: this.context, item: item, key: item.id, ui: item === null || item === void 0 ? void 0 : item.ui, helperText: item === null || item === void 0 ? void 0 : item.helperText, hasError: item === null || item === void 0 ? void 0 : item.hasError, isBundled: this.isBundled(item, index) }),
|
|
123
123
|
]))));
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Map of file extensions to their preview type
|
|
2
|
+
const previewExtensionMap = {
|
|
3
|
+
// Browser-native preview
|
|
4
|
+
avi: 'browser',
|
|
5
|
+
bmp: 'browser',
|
|
6
|
+
csv: 'browser', // CSV shows as plain text
|
|
7
|
+
gif: 'browser',
|
|
8
|
+
heic: 'browser',
|
|
9
|
+
html: 'browser',
|
|
10
|
+
jpeg: 'browser',
|
|
11
|
+
jpg: 'browser',
|
|
12
|
+
json: 'browser',
|
|
13
|
+
mp3: 'browser',
|
|
14
|
+
mp4: 'browser',
|
|
15
|
+
mov: 'browser',
|
|
16
|
+
ogg: 'browser',
|
|
17
|
+
pdf: 'browser',
|
|
18
|
+
png: 'browser',
|
|
19
|
+
svg: 'browser',
|
|
20
|
+
svgz: 'browser',
|
|
21
|
+
txt: 'browser',
|
|
22
|
+
wav: 'browser',
|
|
23
|
+
wmv: 'browser',
|
|
24
|
+
xml: 'browser',
|
|
25
|
+
// SharePoint PDF preview
|
|
26
|
+
doc: 'sharepoint',
|
|
27
|
+
docx: 'sharepoint',
|
|
28
|
+
dot: 'sharepoint',
|
|
29
|
+
dotx: 'sharepoint',
|
|
30
|
+
odp: 'sharepoint',
|
|
31
|
+
ods: 'sharepoint',
|
|
32
|
+
pot: 'sharepoint',
|
|
33
|
+
ppt: 'sharepoint',
|
|
34
|
+
pptx: 'sharepoint',
|
|
35
|
+
pps: 'sharepoint',
|
|
36
|
+
ppsx: 'sharepoint',
|
|
37
|
+
xls: 'sharepoint',
|
|
38
|
+
xlsb: 'sharepoint',
|
|
39
|
+
xlsm: 'sharepoint',
|
|
40
|
+
xlsx: 'sharepoint',
|
|
41
|
+
odt: 'sharepoint',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Determines how a file can be previewed.
|
|
45
|
+
*
|
|
46
|
+
* @param extension - The file extension (case-insensitive).
|
|
47
|
+
* @returns The preview type.
|
|
48
|
+
*/
|
|
49
|
+
export function getPreviewType(extension) {
|
|
50
|
+
return previewExtensionMap[extension.toLowerCase()] || 'unsupported';
|
|
51
|
+
}
|
|
@@ -11,7 +11,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
11
11
|
import { h } from "@stencil/core";
|
|
12
12
|
import { PlatformServiceName, SelectCurrentLimeObject, SelectCurrentLimeType, } from "@limetech/lime-web-components";
|
|
13
13
|
import { negate } from "lodash-es";
|
|
14
|
-
import {
|
|
14
|
+
import { LIVE_DOCS_TYPES } from "./constants";
|
|
15
|
+
import { getPreviewType } from "./extension-mapping";
|
|
15
16
|
/**
|
|
16
17
|
* Component for displaying the contents of an attached file on a limeobject
|
|
17
18
|
*
|
|
@@ -30,41 +31,51 @@ export class FileViewer {
|
|
|
30
31
|
* The first available one will be used
|
|
31
32
|
*/
|
|
32
33
|
this.fileTypes = ['view', 'contents', 'download'];
|
|
34
|
+
this.renderLiveDocs = (file) => {
|
|
35
|
+
if (!this.isLiveDocsAvailable(file)) {
|
|
36
|
+
return h("limebb-live-docs-info", null);
|
|
37
|
+
}
|
|
38
|
+
if (!this.platform.isFeatureEnabled('useOfficeFilePreview')) {
|
|
39
|
+
return (h("limebb-empty-state", { value: 'Preview of this file type will be available soon', icon: {
|
|
40
|
+
name: 'attention',
|
|
41
|
+
color: 'rgb(var(--color-blue-light))',
|
|
42
|
+
} }));
|
|
43
|
+
}
|
|
44
|
+
const url = this.getLiveDocsUrl(file);
|
|
45
|
+
return (h("iframe", { src: url, frameBorder: 0, marginHeight: 0, marginWidth: 0 }));
|
|
46
|
+
};
|
|
47
|
+
this.renderFileViewer = (file) => {
|
|
48
|
+
const filename = file.filename;
|
|
49
|
+
const url = this.getFileUrl(file);
|
|
50
|
+
if (!url) {
|
|
51
|
+
return this.renderNotFound();
|
|
52
|
+
}
|
|
53
|
+
return (h("limel-file-viewer", { filename: filename, url: url, allowFullscreen: true, allowOpenInNewTab: true }));
|
|
54
|
+
};
|
|
55
|
+
this.renderUnsupported = (file) => {
|
|
56
|
+
return (h("limel-file-viewer", { filename: file.filename, url: undefined, allowFullscreen: true, allowOpenInNewTab: true }));
|
|
57
|
+
};
|
|
58
|
+
this.renderNotFound = () => {
|
|
59
|
+
return [
|
|
60
|
+
h("section", { class: "not-found" }, h("limel-icon", { name: "error", size: "large" }), h("h2", null, this.translator.get('webclient.not-found')), h("p", null, this.translator.get('webclient.no-files-attached', {
|
|
61
|
+
object: this.getDescriptive(this.limeobject),
|
|
62
|
+
}))),
|
|
63
|
+
];
|
|
64
|
+
};
|
|
33
65
|
}
|
|
34
66
|
render() {
|
|
35
67
|
const file = this.getFile();
|
|
36
68
|
if (!file) {
|
|
37
69
|
return this.renderNotFound();
|
|
38
70
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
renderLiveDocs(file) {
|
|
48
|
-
const url = this.getLiveDocsUrl(file);
|
|
49
|
-
if (!url) {
|
|
50
|
-
return this.renderNotFound();
|
|
51
|
-
}
|
|
52
|
-
return (h("iframe", { src: url, frameBorder: 0, marginHeight: 0, marginWidth: 0 }));
|
|
53
|
-
}
|
|
54
|
-
renderFileViewer(file) {
|
|
55
|
-
const filename = file.filename;
|
|
56
|
-
const url = this.getFileUrl(file);
|
|
57
|
-
if (!url) {
|
|
58
|
-
return this.renderNotFound();
|
|
59
|
-
}
|
|
60
|
-
return (h("limel-file-viewer", { filename: filename, url: url, allowDownload: true, allowFullscreen: true }));
|
|
61
|
-
}
|
|
62
|
-
renderNotFound() {
|
|
63
|
-
return [
|
|
64
|
-
h("section", { class: "not-found" }, h("limel-icon", { name: "error", size: "large" }), h("h2", null, this.translator.get('webclient.not-found')), h("p", null, this.translator.get('webclient.no-files-attached', {
|
|
65
|
-
object: this.getDescriptive(this.limeobject),
|
|
66
|
-
}))),
|
|
67
|
-
];
|
|
71
|
+
const fileType = getPreviewType(file.extension);
|
|
72
|
+
const fileViewerFunctions = {
|
|
73
|
+
browser: this.renderFileViewer,
|
|
74
|
+
sharepoint: this.renderLiveDocs,
|
|
75
|
+
unsupported: this.renderUnsupported,
|
|
76
|
+
};
|
|
77
|
+
const fileViewerFunction = fileViewerFunctions[fileType];
|
|
78
|
+
return fileViewerFunction(file);
|
|
68
79
|
}
|
|
69
80
|
getLiveDocsUrl(file) {
|
|
70
81
|
let fileTypes = [...this.fileTypes];
|
|
@@ -89,9 +100,6 @@ export class FileViewer {
|
|
|
89
100
|
}
|
|
90
101
|
return this.limeobject.getFile(property.name);
|
|
91
102
|
}
|
|
92
|
-
isLiveDocsExtension(file) {
|
|
93
|
-
return LIVE_DOCS_EXTENSIONS.includes(file.extension);
|
|
94
|
-
}
|
|
95
103
|
isLiveDocsAvailable(file) {
|
|
96
104
|
return LIVE_DOCS_TYPES.some((type) => file.getUrl(type));
|
|
97
105
|
}
|
|
@@ -100,17 +108,9 @@ export class FileViewer {
|
|
|
100
108
|
}
|
|
101
109
|
getDescriptive(limeobject) {
|
|
102
110
|
var _a;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
if (!descriptive) {
|
|
108
|
-
descriptive = (_a = this.limetype) === null || _a === void 0 ? void 0 : _a.localname.singular;
|
|
109
|
-
}
|
|
110
|
-
if (!descriptive) {
|
|
111
|
-
descriptive = this.translator.get('object');
|
|
112
|
-
}
|
|
113
|
-
return descriptive;
|
|
111
|
+
return ((limeobject === null || limeobject === void 0 ? void 0 : limeobject.descriptive) ||
|
|
112
|
+
((_a = this.limetype) === null || _a === void 0 ? void 0 : _a.localname.singular) ||
|
|
113
|
+
this.translator.get('object'));
|
|
114
114
|
}
|
|
115
115
|
get fileProperty() {
|
|
116
116
|
if (!this.limeobject) {
|
|
@@ -258,7 +258,7 @@ const Feed = /*@__PURE__*/ proxyCustomElement(class Feed extends HTMLElement {
|
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
260
|
renderFeedItems() {
|
|
261
|
-
return this.groupedItems.map((group) => (h("section", { class: "date-group", key: `date-group-${group.date}
|
|
261
|
+
return this.groupedItems.map((group) => (h("section", { class: "date-group", key: `date-group-${group.date}` }, h("a", { class: "date-heading" }, group.date), group.items.map(({ item, index }) => [
|
|
262
262
|
this.renderNewItemsIndicator(item.timestamp, index),
|
|
263
263
|
h("limebb-feed-timeline-item", { platform: this.platform, context: this.context, item: item, key: item.id, ui: item === null || item === void 0 ? void 0 : item.ui, helperText: item === null || item === void 0 ? void 0 : item.helperText, hasError: item === null || item === void 0 ? void 0 : item.hasError, isBundled: this.isBundled(item, index) }),
|
|
264
264
|
]))));
|