@limetech/lime-crm-building-blocks 1.33.1 → 1.34.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 +16 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-browser.cjs.entry.js +73 -0
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +60 -0
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +2 -40
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/negate-14a67e26.js +42 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/browser/browser-item.types.js +1 -0
- package/dist/collection/components/browser/browser.css +20 -0
- package/dist/collection/components/browser/browser.js +208 -0
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +1 -0
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/components/feed-timeline-item.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/limebb-browser.d.ts +11 -0
- package/dist/components/limebb-browser.js +93 -0
- package/dist/components/limebb-icon-picker.js +60 -0
- package/dist/components/limebb-limeobject-file-viewer.js +1 -39
- package/dist/components/negate.js +40 -0
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-browser.entry.js +69 -0
- package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
- package/dist/esm/limebb-icon-picker.entry.js +60 -0
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -39
- package/dist/esm/loader.js +1 -1
- package/dist/esm/negate-a980a4fe.js +40 -0
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-227978f4.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-64122988.js +1 -0
- package/dist/lime-crm-building-blocks/p-a23868a0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-9da8083f.entry.js → p-b9f9306f.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c6220e09.entry.js → p-edb57d7d.entry.js} +1 -1
- package/dist/types/components/browser/browser-item.types.d.ts +9 -0
- package/dist/types/components/browser/browser.d.ts +49 -0
- package/dist/types/components/feed/feed.d.ts +1 -1
- package/dist/types/components.d.ts +55 -1
- package/dist/types/interface.d.ts +1 -0
- package/package.json +4 -4
- package/dist/lime-crm-building-blocks/p-575e0050.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.34.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.33.2...v1.34.0) (2024-05-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **browser:** add new component ([e76ea0d](https://github.com/Lundalogik/lime-crm-building-blocks/commit/e76ea0de19ae5574e1335d32bac9292c2156c46f))
|
|
8
|
+
|
|
9
|
+
### [1.33.2](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.33.1...v1.33.2) (2024-05-07)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
* **feed:** ensure un-promoted actions menu is always clickable ([c5ee8dc](https://github.com/Lundalogik/lime-crm-building-blocks/commit/c5ee8dcd0192bbfad259fe0c27feab2ee380fd54))
|
|
16
|
+
|
|
1
17
|
### [1.33.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.33.0...v1.33.1) (2024-04-26)
|
|
2
18
|
|
|
3
19
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[1,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-0ceb2726.js');
|
|
6
|
+
const types = require('./types-3a79f256.js');
|
|
7
|
+
const negate = require('./negate-14a67e26.js');
|
|
8
|
+
|
|
9
|
+
const browserCss = ":host(limebb-browser){isolation:isolate;display:flex;flex-direction:column;background-color:rgba(var(--contrast-100))}limel-input-field{position:sticky;top:0;z-index:1;padding:0.5rem 0.75rem;background-color:rgba(var(--contrast-100), 0.75);backdrop-filter:blur(0.25rem);-webkit-backdrop-filter:blur(0.25rem)}";
|
|
10
|
+
|
|
11
|
+
const Browser = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.change = index.createEvent(this, "change", 7);
|
|
15
|
+
/**
|
|
16
|
+
* Defines the how the list of items is rendered.
|
|
17
|
+
* - `grid` - Items are displayed in a responsive grid layout.
|
|
18
|
+
* Width of items is adjusted to fit the available space.
|
|
19
|
+
*/
|
|
20
|
+
this.layout = 'grid';
|
|
21
|
+
this.handleChangeFilter = (event) => {
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
this.filter = event.detail;
|
|
24
|
+
};
|
|
25
|
+
this.isIncluded = (filter) => (item) => {
|
|
26
|
+
if (!filter) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (this.isSeparator(item)) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return item.text
|
|
33
|
+
.toLocaleLowerCase()
|
|
34
|
+
.includes(filter.toLocaleLowerCase());
|
|
35
|
+
};
|
|
36
|
+
this.isEmptyGroup = (item, index, items) => {
|
|
37
|
+
if (!this.isSeparator(item)) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
const nextItem = items[index + 1];
|
|
41
|
+
return !nextItem || this.isSeparator(nextItem);
|
|
42
|
+
};
|
|
43
|
+
this.handleChange = (event) => {
|
|
44
|
+
event.preventDefault();
|
|
45
|
+
this.change.emit(event.detail);
|
|
46
|
+
this.navigator.navigate(event.detail.path);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
const items = this.items
|
|
51
|
+
.filter(this.isIncluded(this.filter))
|
|
52
|
+
.filter(negate.negate(this.isEmptyGroup));
|
|
53
|
+
return [
|
|
54
|
+
index.h("limel-input-field", { type: "search", "leading-icon": "search", placeholder: this.translator.get('webclient.global-search-route'), onChange: this.handleChangeFilter }),
|
|
55
|
+
index.h("limel-list", { items: items, type: "selectable", class: {
|
|
56
|
+
'has-grid-layout': this.layout === 'grid',
|
|
57
|
+
}, onChange: this.handleChange }),
|
|
58
|
+
];
|
|
59
|
+
}
|
|
60
|
+
isSeparator(item) {
|
|
61
|
+
return !!item && typeof item === 'object' && 'separator' in item;
|
|
62
|
+
}
|
|
63
|
+
get navigator() {
|
|
64
|
+
return this.platform.get(types.PlatformServiceName.Navigator);
|
|
65
|
+
}
|
|
66
|
+
get translator() {
|
|
67
|
+
var _a;
|
|
68
|
+
return (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(types.PlatformServiceName.Translate);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
Browser.style = browserCss;
|
|
72
|
+
|
|
73
|
+
exports.limebb_browser = Browser;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-0ceb2726.js');
|
|
6
6
|
const types = require('./types-3a79f256.js');
|
|
7
7
|
|
|
8
|
-
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover{color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{min-height:10.25rem}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:\"\";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}.content{position:relative}.content:before,.content:after{content:\"\";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[type=external]) .content:before,:host(limebb-feed-timeline-item[type=external]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[type=system]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[type=system]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}";
|
|
8
|
+
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover{color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}limel-action-bar{--action-bar-item-height:1.75rem;transition:opacity 0.2s ease;justify-content:flex-start;opacity:0.8}.action-bar{display:grid;transition:grid-template-rows var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{min-height:10.25rem}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:\"\";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}.content{position:relative}.content:before,.content:after{content:\"\";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[type=external]) .content:before,:host(limebb-feed-timeline-item[type=external]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[type=system]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[type=system]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}";
|
|
9
9
|
|
|
10
10
|
const FeedTimelineItem = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -24685,6 +24685,66 @@ const icons = [
|
|
|
24685
24685
|
tags: [
|
|
24686
24686
|
]
|
|
24687
24687
|
},
|
|
24688
|
+
{
|
|
24689
|
+
id: "-lime-text-blockquote.svg",
|
|
24690
|
+
tags: [
|
|
24691
|
+
]
|
|
24692
|
+
},
|
|
24693
|
+
{
|
|
24694
|
+
id: "-lime-text-bold.svg",
|
|
24695
|
+
tags: [
|
|
24696
|
+
]
|
|
24697
|
+
},
|
|
24698
|
+
{
|
|
24699
|
+
id: "-lime-text-bulleted-list.svg",
|
|
24700
|
+
tags: [
|
|
24701
|
+
]
|
|
24702
|
+
},
|
|
24703
|
+
{
|
|
24704
|
+
id: "-lime-text-code-block.svg",
|
|
24705
|
+
tags: [
|
|
24706
|
+
]
|
|
24707
|
+
},
|
|
24708
|
+
{
|
|
24709
|
+
id: "-lime-text-code.svg",
|
|
24710
|
+
tags: [
|
|
24711
|
+
]
|
|
24712
|
+
},
|
|
24713
|
+
{
|
|
24714
|
+
id: "-lime-text-h-heading-1.svg",
|
|
24715
|
+
tags: [
|
|
24716
|
+
]
|
|
24717
|
+
},
|
|
24718
|
+
{
|
|
24719
|
+
id: "-lime-text-h-heading-2.svg",
|
|
24720
|
+
tags: [
|
|
24721
|
+
]
|
|
24722
|
+
},
|
|
24723
|
+
{
|
|
24724
|
+
id: "-lime-text-h-heading-3.svg",
|
|
24725
|
+
tags: [
|
|
24726
|
+
]
|
|
24727
|
+
},
|
|
24728
|
+
{
|
|
24729
|
+
id: "-lime-text-italic.svg",
|
|
24730
|
+
tags: [
|
|
24731
|
+
]
|
|
24732
|
+
},
|
|
24733
|
+
{
|
|
24734
|
+
id: "-lime-text-link.svg",
|
|
24735
|
+
tags: [
|
|
24736
|
+
]
|
|
24737
|
+
},
|
|
24738
|
+
{
|
|
24739
|
+
id: "-lime-text-ordered-list.svg",
|
|
24740
|
+
tags: [
|
|
24741
|
+
]
|
|
24742
|
+
},
|
|
24743
|
+
{
|
|
24744
|
+
id: "-lime-text-strikethrough.svg",
|
|
24745
|
+
tags: [
|
|
24746
|
+
]
|
|
24747
|
+
},
|
|
24688
24748
|
{
|
|
24689
24749
|
id: "-lime-todo_list_add_next.svg",
|
|
24690
24750
|
tags: [
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0ceb2726.js');
|
|
6
6
|
const types = require('./types-3a79f256.js');
|
|
7
|
+
const negate = require('./negate-14a67e26.js');
|
|
7
8
|
|
|
8
9
|
function isFunction(value) {
|
|
9
10
|
return typeof value === 'function';
|
|
@@ -923,45 +924,6 @@ function currentLimeobject(limeobjects) {
|
|
|
923
924
|
return limeobjects[limetype].find((object) => object.id === id);
|
|
924
925
|
}
|
|
925
926
|
|
|
926
|
-
/** Error message constants. */
|
|
927
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
928
|
-
|
|
929
|
-
/**
|
|
930
|
-
* Creates a function that negates the result of the predicate `func`. The
|
|
931
|
-
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
932
|
-
* created function.
|
|
933
|
-
*
|
|
934
|
-
* @static
|
|
935
|
-
* @memberOf _
|
|
936
|
-
* @since 3.0.0
|
|
937
|
-
* @category Function
|
|
938
|
-
* @param {Function} predicate The predicate to negate.
|
|
939
|
-
* @returns {Function} Returns the new negated function.
|
|
940
|
-
* @example
|
|
941
|
-
*
|
|
942
|
-
* function isEven(n) {
|
|
943
|
-
* return n % 2 == 0;
|
|
944
|
-
* }
|
|
945
|
-
*
|
|
946
|
-
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
|
947
|
-
* // => [1, 3, 5]
|
|
948
|
-
*/
|
|
949
|
-
function negate(predicate) {
|
|
950
|
-
if (typeof predicate != 'function') {
|
|
951
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
952
|
-
}
|
|
953
|
-
return function() {
|
|
954
|
-
var args = arguments;
|
|
955
|
-
switch (args.length) {
|
|
956
|
-
case 0: return !predicate.call(this);
|
|
957
|
-
case 1: return !predicate.call(this, args[0]);
|
|
958
|
-
case 2: return !predicate.call(this, args[0], args[1]);
|
|
959
|
-
case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
|
960
|
-
}
|
|
961
|
-
return !predicate.apply(this, args);
|
|
962
|
-
};
|
|
963
|
-
}
|
|
964
|
-
|
|
965
927
|
const LIVE_DOCS_TYPES = ['edit', 'view'];
|
|
966
928
|
const LIVE_DOCS_EXTENSIONS = [
|
|
967
929
|
'ai',
|
|
@@ -1055,7 +1017,7 @@ const FileViewer = class {
|
|
|
1055
1017
|
}
|
|
1056
1018
|
getFileUrl(file) {
|
|
1057
1019
|
return this.fileTypes
|
|
1058
|
-
.filter(negate(this.isLiveDocsType))
|
|
1020
|
+
.filter(negate.negate(this.isLiveDocsType))
|
|
1059
1021
|
.map((type) => file.getUrl(type))
|
|
1060
1022
|
.find((href) => href);
|
|
1061
1023
|
}
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[1,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["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-navigation-button.cjs",[[1,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["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-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/** Error message constants. */
|
|
4
|
+
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates a function that negates the result of the predicate `func`. The
|
|
8
|
+
* `func` predicate is invoked with the `this` binding and arguments of the
|
|
9
|
+
* created function.
|
|
10
|
+
*
|
|
11
|
+
* @static
|
|
12
|
+
* @memberOf _
|
|
13
|
+
* @since 3.0.0
|
|
14
|
+
* @category Function
|
|
15
|
+
* @param {Function} predicate The predicate to negate.
|
|
16
|
+
* @returns {Function} Returns the new negated function.
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* function isEven(n) {
|
|
20
|
+
* return n % 2 == 0;
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
|
|
24
|
+
* // => [1, 3, 5]
|
|
25
|
+
*/
|
|
26
|
+
function negate(predicate) {
|
|
27
|
+
if (typeof predicate != 'function') {
|
|
28
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
29
|
+
}
|
|
30
|
+
return function() {
|
|
31
|
+
var args = arguments;
|
|
32
|
+
switch (args.length) {
|
|
33
|
+
case 0: return !predicate.call(this);
|
|
34
|
+
case 1: return !predicate.call(this, args[0]);
|
|
35
|
+
case 2: return !predicate.call(this, args[0], args[1]);
|
|
36
|
+
case 3: return !predicate.call(this, args[0], args[1], args[2]);
|
|
37
|
+
}
|
|
38
|
+
return !predicate.apply(this, args);
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
exports.negate = negate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @prop --list-grid-item-max-width: Maximum width of items in a list that has `has-grid-layout` class. Defaults to `10rem`.
|
|
3
|
+
* @prop --list-grid-item-min-width: Minimum width of items in a list that has `has-grid-layout` class. Defaults to `7.5rem`.
|
|
4
|
+
*/
|
|
5
|
+
:host(limebb-browser) {
|
|
6
|
+
isolation: isolate;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
background-color: rgba(var(--contrast-100));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
limel-input-field {
|
|
13
|
+
position: sticky;
|
|
14
|
+
top: 0;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
padding: 0.5rem 0.75rem;
|
|
17
|
+
background-color: rgba(var(--contrast-100), 0.75);
|
|
18
|
+
backdrop-filter: blur(0.25rem);
|
|
19
|
+
-webkit-backdrop-filter: blur(0.25rem);
|
|
20
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { PlatformServiceName, } from '@limetech/lime-web-components';
|
|
3
|
+
import { negate } from 'lodash-es';
|
|
4
|
+
/**
|
|
5
|
+
* This component creates a UI that allows the user to easily navigate through a list of items,
|
|
6
|
+
* and navigate to their respective paths.
|
|
7
|
+
* The search bar also enables the user to find specific items, by typing
|
|
8
|
+
* a part of their name.
|
|
9
|
+
*
|
|
10
|
+
* It also allows you to group the list items into titled (or untitled) groups.
|
|
11
|
+
*
|
|
12
|
+
* @exampleComponent limebb-example-browser-basic
|
|
13
|
+
* @exampleComponent limebb-example-browser-list-layout
|
|
14
|
+
* @beta
|
|
15
|
+
*/
|
|
16
|
+
export class Browser {
|
|
17
|
+
constructor() {
|
|
18
|
+
/**
|
|
19
|
+
* Defines the how the list of items is rendered.
|
|
20
|
+
* - `grid` - Items are displayed in a responsive grid layout.
|
|
21
|
+
* Width of items is adjusted to fit the available space.
|
|
22
|
+
*/
|
|
23
|
+
this.layout = 'grid';
|
|
24
|
+
this.handleChangeFilter = (event) => {
|
|
25
|
+
event.stopPropagation();
|
|
26
|
+
this.filter = event.detail;
|
|
27
|
+
};
|
|
28
|
+
this.isIncluded = (filter) => (item) => {
|
|
29
|
+
if (!filter) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
if (this.isSeparator(item)) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
return item.text
|
|
36
|
+
.toLocaleLowerCase()
|
|
37
|
+
.includes(filter.toLocaleLowerCase());
|
|
38
|
+
};
|
|
39
|
+
this.isEmptyGroup = (item, index, items) => {
|
|
40
|
+
if (!this.isSeparator(item)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
const nextItem = items[index + 1];
|
|
44
|
+
return !nextItem || this.isSeparator(nextItem);
|
|
45
|
+
};
|
|
46
|
+
this.handleChange = (event) => {
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
this.change.emit(event.detail);
|
|
49
|
+
this.navigator.navigate(event.detail.path);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
const items = this.items
|
|
54
|
+
.filter(this.isIncluded(this.filter))
|
|
55
|
+
.filter(negate(this.isEmptyGroup));
|
|
56
|
+
return [
|
|
57
|
+
h("limel-input-field", { type: "search", "leading-icon": "search", placeholder: this.translator.get('webclient.global-search-route'), onChange: this.handleChangeFilter }),
|
|
58
|
+
h("limel-list", { items: items, type: "selectable", class: {
|
|
59
|
+
'has-grid-layout': this.layout === 'grid',
|
|
60
|
+
}, onChange: this.handleChange }),
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
isSeparator(item) {
|
|
64
|
+
return !!item && typeof item === 'object' && 'separator' in item;
|
|
65
|
+
}
|
|
66
|
+
get navigator() {
|
|
67
|
+
return this.platform.get(PlatformServiceName.Navigator);
|
|
68
|
+
}
|
|
69
|
+
get translator() {
|
|
70
|
+
var _a;
|
|
71
|
+
return (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(PlatformServiceName.Translate);
|
|
72
|
+
}
|
|
73
|
+
static get is() { return "limebb-browser"; }
|
|
74
|
+
static get encapsulation() { return "shadow"; }
|
|
75
|
+
static get originalStyleUrls() {
|
|
76
|
+
return {
|
|
77
|
+
"$": ["browser.scss"]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static get styleUrls() {
|
|
81
|
+
return {
|
|
82
|
+
"$": ["browser.css"]
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get properties() {
|
|
86
|
+
return {
|
|
87
|
+
"platform": {
|
|
88
|
+
"type": "unknown",
|
|
89
|
+
"mutable": false,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "LimeWebComponentPlatform",
|
|
92
|
+
"resolved": "LimeWebComponentPlatform",
|
|
93
|
+
"references": {
|
|
94
|
+
"LimeWebComponentPlatform": {
|
|
95
|
+
"location": "import",
|
|
96
|
+
"path": "@limetech/lime-web-components"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": true,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [{
|
|
104
|
+
"name": "inheritdoc",
|
|
105
|
+
"text": undefined
|
|
106
|
+
}],
|
|
107
|
+
"text": ""
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"context": {
|
|
111
|
+
"type": "unknown",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "LimeWebComponentContext",
|
|
115
|
+
"resolved": "LimeWebComponentContext",
|
|
116
|
+
"references": {
|
|
117
|
+
"LimeWebComponentContext": {
|
|
118
|
+
"location": "import",
|
|
119
|
+
"path": "@limetech/lime-web-components"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"required": false,
|
|
124
|
+
"optional": false,
|
|
125
|
+
"docs": {
|
|
126
|
+
"tags": [{
|
|
127
|
+
"name": "inheritdoc",
|
|
128
|
+
"text": undefined
|
|
129
|
+
}],
|
|
130
|
+
"text": ""
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"items": {
|
|
134
|
+
"type": "unknown",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "Array<BrowserItem | ListSeparator>",
|
|
138
|
+
"resolved": "(ListSeparator | BrowserItem)[]",
|
|
139
|
+
"references": {
|
|
140
|
+
"Array": {
|
|
141
|
+
"location": "global"
|
|
142
|
+
},
|
|
143
|
+
"BrowserItem": {
|
|
144
|
+
"location": "import",
|
|
145
|
+
"path": "./browser-item.types"
|
|
146
|
+
},
|
|
147
|
+
"ListSeparator": {
|
|
148
|
+
"location": "import",
|
|
149
|
+
"path": "@limetech/lime-elements"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": false,
|
|
154
|
+
"optional": false,
|
|
155
|
+
"docs": {
|
|
156
|
+
"tags": [],
|
|
157
|
+
"text": "List of items to display"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"layout": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "'grid' | 'list'",
|
|
165
|
+
"resolved": "\"grid\" | \"list\"",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": "Defines the how the list of items is rendered.\n- `grid` - Items are displayed in a responsive grid layout.\nWidth of items is adjusted to fit the available space."
|
|
173
|
+
},
|
|
174
|
+
"attribute": "layout",
|
|
175
|
+
"reflect": false,
|
|
176
|
+
"defaultValue": "'grid'"
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
static get states() {
|
|
181
|
+
return {
|
|
182
|
+
"filter": {}
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
static get events() {
|
|
186
|
+
return [{
|
|
187
|
+
"method": "change",
|
|
188
|
+
"name": "change",
|
|
189
|
+
"bubbles": true,
|
|
190
|
+
"cancelable": true,
|
|
191
|
+
"composed": true,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": "Event emitted when the user selects an item in the list."
|
|
195
|
+
},
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "BrowserItem",
|
|
198
|
+
"resolved": "Pick<ListItem<any>, \"text\" | \"icon\" | \"selected\" | \"value\"> & { path: string; }",
|
|
199
|
+
"references": {
|
|
200
|
+
"BrowserItem": {
|
|
201
|
+
"location": "import",
|
|
202
|
+
"path": "./browser-item.types"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}];
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -27,7 +27,7 @@ const MINUTES_OF_PROXIMITY = 5;
|
|
|
27
27
|
* @exampleComponent limebb-example-feed-item-types
|
|
28
28
|
* @exampleComponent limebb-example-feed-item-color-coding
|
|
29
29
|
* @exampleComponent limebb-example-feed-new-items
|
|
30
|
-
* @
|
|
30
|
+
* @beta
|
|
31
31
|
*/
|
|
32
32
|
export class Feed {
|
|
33
33
|
constructor() {
|