@limetech/lime-crm-building-blocks 1.32.2 → 1.32.4-dev.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 +16 -0
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +14 -3
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +20 -0
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/{types-5327b47f.js → types-3a79f256.js} +47 -44
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +3 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +12 -1
- package/dist/components/feed-timeline-item.js +13 -2
- package/dist/components/limebb-icon-picker.js +20 -0
- package/dist/components/types.js +47 -44
- package/dist/esm/limebb-currency-picker.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +14 -3
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-icon-picker.entry.js +20 -0
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/{types-737832ab.js → types-f0e027dc.js} +47 -44
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-49c44234.entry.js → p-102dd265.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-39d48976.js → p-11eb7b1e.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-03d8633c.entry.js → p-31668b58.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-00fcd768.entry.js → p-575e0050.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-317858e2.entry.js → p-5e0a5876.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-654da86c.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-0ca85b0a.entry.js → p-7b0263f8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-9f986917.entry.js +1 -0
- package/package.json +11 -11
- package/dist/lime-crm-building-blocks/p-a5310ead.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-e3fc43bf.entry.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-9d94fec9.js';
|
|
2
|
-
import { P as PlatformServiceName } from './types-
|
|
2
|
+
import { P as PlatformServiceName } from './types-f0e027dc.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Create a UTC date with the same values for year, month and day as the given
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-9d94fec9.js';
|
|
2
|
-
import { P as PlatformServiceName } from './types-
|
|
2
|
+
import { P as PlatformServiceName } from './types-f0e027dc.js';
|
|
3
3
|
|
|
4
|
-
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}.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{transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)
|
|
4
|
+
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}.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}";
|
|
5
5
|
|
|
6
6
|
const FeedTimelineItem = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -91,6 +91,14 @@ const FeedTimelineItem = class {
|
|
|
91
91
|
};
|
|
92
92
|
this.toggleShowMore = () => {
|
|
93
93
|
this.showMore = !this.showMore;
|
|
94
|
+
// Scroll to the top of the feed item when collapsed
|
|
95
|
+
if (!this.showMore) {
|
|
96
|
+
const feedItemHeight = this.el.offsetHeight;
|
|
97
|
+
const viewportHeight = window.innerHeight;
|
|
98
|
+
if (feedItemHeight >= viewportHeight) {
|
|
99
|
+
this.el.scrollIntoView({ behavior: 'auto' });
|
|
100
|
+
}
|
|
101
|
+
}
|
|
94
102
|
};
|
|
95
103
|
this.toggleHeadingExpansion = () => {
|
|
96
104
|
this.isHeadingExpanded = !this.isHeadingExpanded;
|
|
@@ -231,7 +239,10 @@ const FeedTimelineItem = class {
|
|
|
231
239
|
return;
|
|
232
240
|
}
|
|
233
241
|
return [
|
|
234
|
-
h("div", { class: "markdown-container" }, h("limel-markdown", { class:
|
|
242
|
+
h("div", { class: "markdown-container" }, h("limel-markdown", { class: {
|
|
243
|
+
'body-text': true,
|
|
244
|
+
opened: this.showMore,
|
|
245
|
+
}, value: this.item.value, ref: this.setBodyTextElement }), this.renderShowMoreButton()),
|
|
235
246
|
];
|
|
236
247
|
}
|
|
237
248
|
isTextTruncated(element) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-9d94fec9.js';
|
|
2
|
-
import { P as PlatformServiceName } from './types-
|
|
2
|
+
import { P as PlatformServiceName } from './types-f0e027dc.js';
|
|
3
3
|
|
|
4
4
|
function getRoundingMethod(method) {
|
|
5
5
|
return (number) => {
|
|
@@ -3986,6 +3986,11 @@ const icons = [
|
|
|
3986
3986
|
tags: [
|
|
3987
3987
|
]
|
|
3988
3988
|
},
|
|
3989
|
+
{
|
|
3990
|
+
id: "check-document.svg",
|
|
3991
|
+
tags: [
|
|
3992
|
+
]
|
|
3993
|
+
},
|
|
3989
3994
|
{
|
|
3990
3995
|
id: "check.svg",
|
|
3991
3996
|
tags: [
|
|
@@ -7486,6 +7491,11 @@ const icons = [
|
|
|
7486
7491
|
tags: [
|
|
7487
7492
|
]
|
|
7488
7493
|
},
|
|
7494
|
+
{
|
|
7495
|
+
id: "eye-preview.svg",
|
|
7496
|
+
tags: [
|
|
7497
|
+
]
|
|
7498
|
+
},
|
|
7489
7499
|
{
|
|
7490
7500
|
id: "f1_race_car_cop_veiw.svg",
|
|
7491
7501
|
tags: [
|
|
@@ -7711,6 +7721,16 @@ const icons = [
|
|
|
7711
7721
|
tags: [
|
|
7712
7722
|
]
|
|
7713
7723
|
},
|
|
7724
|
+
{
|
|
7725
|
+
id: "file-bookmark.svg",
|
|
7726
|
+
tags: [
|
|
7727
|
+
]
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
id: "file-settings.svg",
|
|
7731
|
+
tags: [
|
|
7732
|
+
]
|
|
7733
|
+
},
|
|
7714
7734
|
{
|
|
7715
7735
|
id: "filing_cabinet.svg",
|
|
7716
7736
|
tags: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as getElement, r as registerInstance, h } from './index-9d94fec9.js';
|
|
2
|
-
import { P as PlatformServiceName } from './types-
|
|
2
|
+
import { P as PlatformServiceName } from './types-f0e027dc.js';
|
|
3
3
|
|
|
4
4
|
function isFunction(value) {
|
|
5
5
|
return typeof value === 'function';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-9d94fec9.js';
|
|
2
|
-
import { P as PlatformServiceName } from './types-
|
|
2
|
+
import { P as PlatformServiceName } from './types-f0e027dc.js';
|
|
3
3
|
|
|
4
4
|
/** Detect free variable `global` from Node.js. */
|
|
5
5
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
@@ -7,8 +7,8 @@ const PlatformServiceName = {
|
|
|
7
7
|
Route: 'route',
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
const SERVICE_NAME$
|
|
11
|
-
PlatformServiceName.LimeTypeRepository = SERVICE_NAME$
|
|
10
|
+
const SERVICE_NAME$m = 'state.limetypes';
|
|
11
|
+
PlatformServiceName.LimeTypeRepository = SERVICE_NAME$m;
|
|
12
12
|
|
|
13
13
|
/******************************************************************************
|
|
14
14
|
Copyright (c) Microsoft Corporation.
|
|
@@ -37,8 +37,8 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
37
37
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
const SERVICE_NAME$
|
|
41
|
-
PlatformServiceName.LimeObjectRepository = SERVICE_NAME$
|
|
40
|
+
const SERVICE_NAME$l = 'state.limeobjects';
|
|
41
|
+
PlatformServiceName.LimeObjectRepository = SERVICE_NAME$l;
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Events dispatched by the commandbus event middleware
|
|
@@ -136,8 +136,8 @@ function getCommandIds(value) {
|
|
|
136
136
|
return Array.from(new Set(ids));
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
const SERVICE_NAME$
|
|
140
|
-
PlatformServiceName.CommandBus = SERVICE_NAME$
|
|
139
|
+
const SERVICE_NAME$k = 'commandBus';
|
|
140
|
+
PlatformServiceName.CommandBus = SERVICE_NAME$k;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* Open a dialog for bulk creating limeobjects
|
|
@@ -288,26 +288,26 @@ var Operator;
|
|
|
288
288
|
Operator["ENDS"] = "=$";
|
|
289
289
|
})(Operator || (Operator = {}));
|
|
290
290
|
|
|
291
|
-
const SERVICE_NAME$
|
|
292
|
-
PlatformServiceName.Query = SERVICE_NAME$
|
|
291
|
+
const SERVICE_NAME$j = 'query';
|
|
292
|
+
PlatformServiceName.Query = SERVICE_NAME$j;
|
|
293
293
|
|
|
294
|
-
const SERVICE_NAME$
|
|
295
|
-
PlatformServiceName.Http = SERVICE_NAME$
|
|
294
|
+
const SERVICE_NAME$i = 'http';
|
|
295
|
+
PlatformServiceName.Http = SERVICE_NAME$i;
|
|
296
296
|
|
|
297
|
-
const SERVICE_NAME$
|
|
298
|
-
PlatformServiceName.EventDispatcher = SERVICE_NAME$
|
|
297
|
+
const SERVICE_NAME$h = 'eventDispatcher';
|
|
298
|
+
PlatformServiceName.EventDispatcher = SERVICE_NAME$h;
|
|
299
299
|
|
|
300
|
-
const SERVICE_NAME$
|
|
301
|
-
PlatformServiceName.Translate = SERVICE_NAME$
|
|
300
|
+
const SERVICE_NAME$g = 'translate';
|
|
301
|
+
PlatformServiceName.Translate = SERVICE_NAME$g;
|
|
302
302
|
|
|
303
|
-
const SERVICE_NAME$
|
|
304
|
-
PlatformServiceName.Dialog = SERVICE_NAME$
|
|
303
|
+
const SERVICE_NAME$f = 'dialog';
|
|
304
|
+
PlatformServiceName.Dialog = SERVICE_NAME$f;
|
|
305
305
|
|
|
306
|
-
const SERVICE_NAME$
|
|
307
|
-
PlatformServiceName.KeybindingRegistry = SERVICE_NAME$
|
|
306
|
+
const SERVICE_NAME$e = 'keybindingRegistry';
|
|
307
|
+
PlatformServiceName.KeybindingRegistry = SERVICE_NAME$e;
|
|
308
308
|
|
|
309
|
-
const SERVICE_NAME$
|
|
310
|
-
PlatformServiceName.Navigator = SERVICE_NAME$
|
|
309
|
+
const SERVICE_NAME$d = 'navigator';
|
|
310
|
+
PlatformServiceName.Navigator = SERVICE_NAME$d;
|
|
311
311
|
|
|
312
312
|
/**
|
|
313
313
|
* Navigates to a new location
|
|
@@ -324,11 +324,11 @@ NavigateCommand = __decorate([
|
|
|
324
324
|
})
|
|
325
325
|
], NavigateCommand);
|
|
326
326
|
|
|
327
|
-
const SERVICE_NAME$
|
|
328
|
-
PlatformServiceName.Notification = SERVICE_NAME$
|
|
327
|
+
const SERVICE_NAME$c = 'notifications';
|
|
328
|
+
PlatformServiceName.Notification = SERVICE_NAME$c;
|
|
329
329
|
|
|
330
|
-
const SERVICE_NAME$
|
|
331
|
-
PlatformServiceName.RouteRegistry = SERVICE_NAME$
|
|
330
|
+
const SERVICE_NAME$b = 'routeRegistry';
|
|
331
|
+
PlatformServiceName.RouteRegistry = SERVICE_NAME$b;
|
|
332
332
|
|
|
333
333
|
/**
|
|
334
334
|
* @public
|
|
@@ -384,34 +384,37 @@ var TaskEventType;
|
|
|
384
384
|
TaskEventType["Failed"] = "task.failed";
|
|
385
385
|
})(TaskEventType || (TaskEventType = {}));
|
|
386
386
|
|
|
387
|
-
const SERVICE_NAME$
|
|
388
|
-
PlatformServiceName.TaskRepository = SERVICE_NAME$
|
|
387
|
+
const SERVICE_NAME$a = 'state.tasks';
|
|
388
|
+
PlatformServiceName.TaskRepository = SERVICE_NAME$a;
|
|
389
389
|
|
|
390
|
-
const SERVICE_NAME$
|
|
391
|
-
PlatformServiceName.ConfigRepository = SERVICE_NAME$
|
|
390
|
+
const SERVICE_NAME$9 = 'state.configs';
|
|
391
|
+
PlatformServiceName.ConfigRepository = SERVICE_NAME$9;
|
|
392
392
|
|
|
393
|
-
const SERVICE_NAME$
|
|
394
|
-
PlatformServiceName.Device = SERVICE_NAME$
|
|
393
|
+
const SERVICE_NAME$8 = 'state.device';
|
|
394
|
+
PlatformServiceName.Device = SERVICE_NAME$8;
|
|
395
395
|
|
|
396
|
-
const SERVICE_NAME$
|
|
397
|
-
PlatformServiceName.FilterRepository = SERVICE_NAME$
|
|
396
|
+
const SERVICE_NAME$7 = 'state.filters';
|
|
397
|
+
PlatformServiceName.FilterRepository = SERVICE_NAME$7;
|
|
398
398
|
|
|
399
|
-
const SERVICE_NAME$
|
|
400
|
-
PlatformServiceName.UserDataRepository = SERVICE_NAME$
|
|
399
|
+
const SERVICE_NAME$6 = 'state.user-data';
|
|
400
|
+
PlatformServiceName.UserDataRepository = SERVICE_NAME$6;
|
|
401
401
|
|
|
402
|
-
const SERVICE_NAME$
|
|
403
|
-
PlatformServiceName.Application = SERVICE_NAME$
|
|
402
|
+
const SERVICE_NAME$5 = 'state.application';
|
|
403
|
+
PlatformServiceName.Application = SERVICE_NAME$5;
|
|
404
404
|
|
|
405
|
-
const SERVICE_NAME$
|
|
406
|
-
PlatformServiceName.UserPreferencesRepository = SERVICE_NAME$
|
|
405
|
+
const SERVICE_NAME$4 = 'userPreferences';
|
|
406
|
+
PlatformServiceName.UserPreferencesRepository = SERVICE_NAME$4;
|
|
407
407
|
|
|
408
|
-
const SERVICE_NAME$
|
|
409
|
-
PlatformServiceName.DateTimeFormatter = SERVICE_NAME$
|
|
408
|
+
const SERVICE_NAME$3 = 'datetimeformatter';
|
|
409
|
+
PlatformServiceName.DateTimeFormatter = SERVICE_NAME$3;
|
|
410
410
|
|
|
411
|
-
const SERVICE_NAME$
|
|
412
|
-
PlatformServiceName.ConditionRegistry = SERVICE_NAME$
|
|
411
|
+
const SERVICE_NAME$2 = 'conditionRegistry';
|
|
412
|
+
PlatformServiceName.ConditionRegistry = SERVICE_NAME$2;
|
|
413
413
|
|
|
414
|
-
const SERVICE_NAME = 'viewFactoryRegistry';
|
|
415
|
-
PlatformServiceName.ViewFactoryRegistry = SERVICE_NAME;
|
|
414
|
+
const SERVICE_NAME$1 = 'viewFactoryRegistry';
|
|
415
|
+
PlatformServiceName.ViewFactoryRegistry = SERVICE_NAME$1;
|
|
416
|
+
|
|
417
|
+
const SERVICE_NAME = 'webComponentRegistry';
|
|
418
|
+
PlatformServiceName.WebComponentRegistry = SERVICE_NAME;
|
|
416
419
|
|
|
417
420
|
export { PlatformServiceName as P };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-2912b7e7.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-81bfe796",[[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]}]]],["p-
|
|
1
|
+
import{p as e,b as t}from"./p-2912b7e7.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-81bfe796",[[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]}]]],["p-102dd265",[[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"]}]]],["p-31668b58",[[1,"limebb-currency-picker",{label:[513],platform:[16],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[16]}]]],["p-0f8928a9",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-9f986917",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-575e0050",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-5e0a5876",[[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]}]]],["p-6ad70097",[[1,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-7b0263f8",[[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]}]]],["p-654da86c",[[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]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-2912b7e7.js";import{P as r}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-2912b7e7.js";import{P as r}from"./p-11eb7b1e.js";function n(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}const o=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.isBundled=(e,t)=>{var i,r,o,s,a,l;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;if((null===(a=null===(s=this.items[t-1])||void 0===s?void 0:s.icon)||void 0===a?void 0:a.name)!==(null===(l=null==e?void 0:e.icon)||void 0===l?void 0:l.name))return!1;const d=new Date(e.timestamp),m=new Date(this.items[t-1].timestamp),c=new Date(m);return function(e,t,i){const r=function(e,t){return+n(e)-+n(t)}(e,t)/6e4;return(o=i?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}(new Date(d),c)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}render(){return[this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems()]}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("p",{class:"empty-state"},this.emptyStateMessage):void 0}renderFeedItems(){return this.items.map(((e,t)=>[this.renderDateHeader(e.timestamp,t),i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,isBundled:this.isBundled(e,t)})]))}renderDateHeader(e,t){const r=this.dateTimeFormatter.format(e,"date");return 0===t||this.dateTimeFormatter.format(this.items[t-1].timestamp,"date")!==r?i("a",{class:"date-heading"},r):void 0}renderLoadMore(){if(this.items.length&&!(this.totalCount<=this.items.length))return i("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(r.Translate)}};o.style=":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}";export{o as limebb_feed}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const t={Route:"route"};function e(t,e,c,
|
|
1
|
+
const t={Route:"route"};function e(t,e,c,o){var s,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,c):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,c,o);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(a=(i<3?s(a):i>3?s(e,c,a):s(e,c))||a);return i>3&&a&&Object.defineProperty(e,c,a),a}var c;function o(t){return e=>{!function(t,e){t.commandId=e}(e,t.id),function(t,e){Object.defineProperty(t,Symbol.hasInstance,{value:t=>function(t){let e,c=[],o=t;for(;e=s(o);)c=[...c,e],o=Object.getPrototypeOf(o);return Array.from(new Set(c))}(t).includes(e)})}(e,t.id)}}function s(t){return"string"==typeof t?t:t&&t.constructor&&t.constructor.commandId?t.constructor.commandId:t&&t.commandId?t.commandId:null}t.LimeTypeRepository="state.limetypes","function"==typeof SuppressedError&&SuppressedError,t.LimeObjectRepository="state.limeobjects",function(t){t.Received="command.received",t.Handled="command.handled",t.Failed="command.failed"}(c||(c={})),t.CommandBus="commandBus";let i=class{constructor(){this.relations=[]}};i=e([o({id:"limeobject.bulk-create-dialog"})],i);let a=class{constructor(){this.route=!1}};a=e([o({id:"limeobject.create-dialog"})],a);let n=class{};n=e([o({id:"limeobject.delete-object"})],n);let r=class{};r=e([o({id:"limeobject.object-access"})],r);let l=class{constructor(){this.route=!1}};var u;l=e([o({id:"limeobject.save-object"})],l),function(t){t.AND="AND",t.OR="OR",t.NOT="!",t.EQUALS="=",t.NOT_EQUALS="!=",t.GREATER=">",t.LESS="<",t.IN="IN",t.BEGINS="=?",t.LIKE="?",t.LESS_OR_EQUAL="<=",t.GREATER_OR_EQUAL=">=",t.ENDS="=$"}(u||(u={})),t.Query="query",t.Http="http",t.EventDispatcher="eventDispatcher",t.Translate="translate",t.Dialog="dialog",t.KeybindingRegistry="keybindingRegistry",t.Navigator="navigator";let f=class{};var d,m;f=e([o({id:"navigator.navigate"})],f),t.Notification="notifications",t.RouteRegistry="routeRegistry",function(t){t.Pending="PENDING",t.Started="STARTED",t.Retry="RETRY",t.Success="SUCCESS",t.Failure="FAILURE"}(d||(d={})),function(t){t.Created="task.created",t.Success="task.success",t.Failed="task.failed"}(m||(m={})),t.TaskRepository="state.tasks",t.ConfigRepository="state.configs",t.Device="state.device",t.FilterRepository="state.filters",t.UserDataRepository="state.user-data",t.Application="state.application",t.UserPreferencesRepository="userPreferences",t.DateTimeFormatter="datetimeformatter",t.ConditionRegistry="conditionRegistry",t.ViewFactoryRegistry="viewFactoryRegistry",t.WebComponentRegistry="webComponentRegistry";export{t as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as a}from"./p-2912b7e7.js";import{P as n}from"./p-
|
|
1
|
+
import{r as e,c as t,h as a}from"./p-2912b7e7.js";import{P as n}from"./p-11eb7b1e.js";const r=[{secondaryText:"Euro",text:"EUR",icon:"euro"},{secondaryText:"US Dollar",text:"USD",icon:"us_dollar"},{secondaryText:"Swedish Krona",text:"SEK",icon:"sek"},{secondaryText:"Norwegian Krone",text:"NOK",icon:"sek"},{secondaryText:"Danish Krone",text:"DKK",icon:"sek"},{secondaryText:"Icelandic Króna",text:"ISK",icon:"sek"},{secondaryText:"Albanian Lek",text:"ALL"},{secondaryText:"Armenian Dram",text:"AMD"},{secondaryText:"Azerbaijani Manat",text:"AZN"},{secondaryText:"Belarusian Ruble",text:"BYR"},{secondaryText:"Bosnia-Herzegovina Convertible Mark",text:"BAM"},{secondaryText:"British Pound Sterling",text:"GBP"},{secondaryText:"Bulgarian Lev",text:"BGN"},{secondaryText:"Croatian Kuna",text:"HRK"},{secondaryText:"Czech Republic Koruna",text:"CZK"},{secondaryText:"Georgian Lari",text:"GEL"},{secondaryText:"Hungarian Forint",text:"HUF"},{secondaryText:"Moldovan Leu",text:"MDL"},{secondaryText:"Macedonian Denar",text:"MKD"},{secondaryText:"Polish Zloty",text:"PLN"},{secondaryText:"Romanian Leu",text:"RON"},{secondaryText:"Russian Ruble",text:"RUB"},{secondaryText:"Serbian Dinar",text:"RSD"},{secondaryText:"Swiss Franc",text:"CHF"},{secondaryText:"Turkish Lira",text:"TRY"},{secondaryText:"Ukrainian Hryvnia",text:"UAH"},{secondaryText:"Afghan Afghani",text:"AFA"},{secondaryText:"Algerian Dinar",text:"DZD"},{secondaryText:"Angolan Kwanza",text:"AOA"},{secondaryText:"Argentine Peso",text:"ARS"},{secondaryText:"Aruban Florin",text:"AWG"},{secondaryText:"Australian Dollar",text:"AUD"},{secondaryText:"Bahamian Dollar",text:"BSD"},{secondaryText:"Bahraini Dinar",text:"BHD"},{secondaryText:"Bangladeshi Taka",text:"BDT"},{secondaryText:"Barbadian Dollar",text:"BBD"},{secondaryText:"Belize Dollar",text:"BZD"},{secondaryText:"Bermudan Dollar",text:"BMD"},{secondaryText:"Bhutanese Ngultrum",text:"BTN"},{secondaryText:"Bolivian Boliviano",text:"BOB"},{secondaryText:"Botswanan Pula",text:"BWP"},{secondaryText:"Brazilian Real",text:"BRL"},{secondaryText:"Brunei Dollar",text:"BND"},{secondaryText:"Burundian Franc",text:"BIF"},{secondaryText:"Cambodian Riel",text:"KHR"},{secondaryText:"Canadian Dollar",text:"CAD"},{secondaryText:"Cape Verdean Escudo",text:"CVE"},{secondaryText:"Cayman Islands Dollar",text:"KYD"},{secondaryText:"CFA Franc BCEAO",text:"XOF"},{secondaryText:"CFA Franc BEAC",text:"XAF"},{secondaryText:"CFP Franc",text:"XPF"},{secondaryText:"Chilean Peso",text:"CLP"},{secondaryText:"Chinese Yuan",text:"CNY"},{secondaryText:"Colombian Peso",text:"COP"},{secondaryText:"Comorian Franc",text:"KMF"},{secondaryText:"Congolese Franc",text:"CDF"},{secondaryText:"Costa Rican Colón",text:"CRC"},{secondaryText:"Cuban Convertible Peso",text:"CUC"},{secondaryText:"Djiboutian Franc",text:"DJF"},{secondaryText:"Dominican Peso",text:"DOP"},{secondaryText:"East Caribbean Dollar",text:"XCD"},{secondaryText:"Egyptian Pound",text:"EGP"},{secondaryText:"Eritrean Nakfa",text:"ERN"},{secondaryText:"Ethiopian Birr",text:"ETB"},{secondaryText:"Falkland Islands Pound",text:"FKP"},{secondaryText:"Fijian Dollar",text:"FJD"},{secondaryText:"Gambian Dalasi",text:"GMD"},{secondaryText:"Ghanaian Cedi",text:"GHS"},{secondaryText:"Gibraltar Pound",text:"GIP"},{secondaryText:"Guatemalan Quetzal",text:"GTQ"},{secondaryText:"Guinean Franc",text:"GNF"},{secondaryText:"Guyanaese Dollar",text:"GYD"},{secondaryText:"Haitian Gourde",text:"HTG"},{secondaryText:"Honduran Lempira",text:"HNL"},{secondaryText:"Hong Kong Dollar",text:"HKD"},{secondaryText:"Indian Rupee",text:"INR"},{secondaryText:"Indonesian Rupiah",text:"IDR"},{secondaryText:"Iranian Rial",text:"IRR"},{secondaryText:"Iraqi Dinar",text:"IQD"},{secondaryText:"Israeli New Sheqel",text:"ILS"},{secondaryText:"Jamaican Dollar",text:"JMD"},{secondaryText:"Japanese Yen",text:"JPY"},{secondaryText:"Jordanian Dinar",text:"JOD"},{secondaryText:"Kazakhstani Tenge",text:"KZT"},{secondaryText:"Kenyan Shilling",text:"KES"},{secondaryText:"Kuwaiti Dinar",text:"KWD"},{secondaryText:"Kyrgystani Som",text:"KGS"},{secondaryText:"Laotian Kip",text:"LAK"},{secondaryText:"Lebanese Pound",text:"LBP"},{secondaryText:"Lesotho Loti",text:"LSL"},{secondaryText:"Liberian Dollar",text:"LRD"},{secondaryText:"Libyan Dinar",text:"LYD"},{secondaryText:"Macanese Pataca",text:"MOP"},{secondaryText:"Malagasy Ariary",text:"MGA"},{secondaryText:"Malawian Kwacha",text:"MWK"},{secondaryText:"Malaysian Ringgit",text:"MYR"},{secondaryText:"Maldivian Rufiyaa",text:"MVR"},{secondaryText:"Mauritanian Ouguiya",text:"MRO"},{secondaryText:"Mauritian Rupee",text:"MUR"},{secondaryText:"Mexican Peso",text:"MXN"},{secondaryText:"Mongolian Tugrik",text:"MNT"},{secondaryText:"Moroccan Dirham",text:"MAD"},{secondaryText:"Mozambican Metical",text:"MZM"},{secondaryText:"Myanmar Kyat",text:"MMK"},{secondaryText:"Namibian Dollar",text:"NAD"},{secondaryText:"Nepalese Rupee",text:"NPR"},{secondaryText:"New Taiwan Dollar",text:"TWD"},{secondaryText:"New Zealand Dollar",text:"NZD"},{secondaryText:"Nicaraguan Córdoba",text:"NIO"},{secondaryText:"Nigerian Naira",text:"NGN"},{secondaryText:"North Korean Won",text:"KPW"},{secondaryText:"Omani Rial",text:"OMR"},{secondaryText:"Pakistani Rupee",text:"PKR"},{secondaryText:"Panamanian Balboa",text:"PAB"},{secondaryText:"Papua New Guinean Kina",text:"PGK"},{secondaryText:"Paraguayan Guarani",text:"PYG"},{secondaryText:"Peruvian Nuevo Sol",text:"PEN"},{secondaryText:"Philippine Peso",text:"PHP"},{secondaryText:"Qatari Rial",text:"QAR"},{secondaryText:"Rwandan Franc",text:"RWF"},{secondaryText:"Salvadoran Colón",text:"SVC"},{secondaryText:"Samoan Tala",text:"WST"},{secondaryText:"Saudi Riyal",text:"SAR"},{secondaryText:"Seychellois Rupee",text:"SCR"},{secondaryText:"Sierra Leonean Leone",text:"SLL"},{secondaryText:"Singapore Dollar",text:"SGD"},{secondaryText:"Solomon Islands Dollar",text:"SBD"},{secondaryText:"Somali Shilling",text:"SOS"},{secondaryText:"South African Rand",text:"ZAR"},{secondaryText:"South Korean Won",text:"KRW"},{secondaryText:"Special Drawing Rights",text:"XDR"},{secondaryText:"Sri Lankan Rupee",text:"LKR"},{secondaryText:"St. Helena Pound",text:"SHP"},{secondaryText:"Sudanese Pound",text:"SDG"},{secondaryText:"Suritextse Dollar",text:"SRD"},{secondaryText:"Swazi Lilangeni",text:"SZL"},{secondaryText:"Syrian Pound",text:"SYP"},{secondaryText:"São Tomé and Príncipe Dobra",text:"STD"},{secondaryText:"Tajikistani Somoni",text:"TJS"},{secondaryText:"Tanzanian Shilling",text:"TZS"},{secondaryText:"Thai Baht",text:"THB"},{secondaryText:"Tongan Pa'anga",text:"TOP"},{secondaryText:"Trinidad & Tobago Dollar",text:"TTD"},{secondaryText:"Tunisian Dinar",text:"TND"},{secondaryText:"Turkmenistani Manat",text:"TMT"},{secondaryText:"Ugandan Shilling",text:"UGX"},{secondaryText:"United Arab Emirates Dirham",text:"AED"},{secondaryText:"Uruguayan Peso",text:"UYU"},{secondaryText:"Uzbekistan Som",text:"UZS"},{secondaryText:"Vanuatu Vatu",text:"VUV"},{secondaryText:"Venezuelan BolÃvar",text:"VEF"},{secondaryText:"Viettextse Dong",text:"VND"},{secondaryText:"Yemeni Rial",text:"YER"},{secondaryText:"Zambian Kwacha",text:"ZMK"}],x=class{constructor(a){e(this,a),this.change=t(this,"change",7),this.currencies=r,this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.search=e=>new Promise((t=>t(""===e?this.currencies:this.currencies.filter((t=>{var a;return(null===(a=null==t?void 0:t.secondaryText)||void 0===a?void 0:a.toLowerCase().includes(e.toLowerCase()))||t.text.toLowerCase().includes(e.toLowerCase())}))))),this.handleChange=e=>{e.stopPropagation(),this.change.emit(e.detail)}}render(){return a("limel-picker",{label:this.label||this.defaultLabel,value:this.value,helperText:this.helperText,onChange:this.handleChange,badgeIcons:!1,disabled:this.disabled,required:this.required,readonly:this.readonly,invalid:this.readonly,searcher:this.search})}get translator(){var e;return null===(e=this.platform)||void 0===e?void 0:e.get(n.Translate)}get defaultLabel(){var e;return null===(e=this.translator)||void 0===e?void 0:e.get("webclient.currency-picker.label")}};export{x as limebb_currency_picker}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t,r as e,h as i}from"./p-2912b7e7.js";import{P as n}from"./p-39d48976.js";function r(t){return"function"==typeof t}function s(t){const e=t((t=>{Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const o=s((t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map(((t,e)=>`${e+1}) ${t.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e}));function c(t,e){if(t){const i=t.indexOf(e);0<=i&&t.splice(i,1)}}class u{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const t of e)t.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(r(i))try{i()}catch(e){t=e instanceof o?e.errors:[e]}const{_finalizers:n}=this;if(n){this._finalizers=null;for(const e of n)try{a(e)}catch(e){t=null!=t?t:[],e instanceof o?t=[...t,...e.errors]:t.push(e)}}if(t)throw new o(t)}}add(t){var e;if(t&&t!==this)if(this.closed)a(t);else{if(t instanceof u){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&c(e,t)}remove(t){const{_finalizers:e}=this;e&&c(e,t),t instanceof u&&t._removeParent(this)}}u.EMPTY=(()=>{const t=new u;return t.closed=!0,t})();const h=u.EMPTY;function l(t){return t instanceof u||t&&"closed"in t&&r(t.remove)&&r(t.add)&&r(t.unsubscribe)}function a(t){r(t)?t():t.unsubscribe()}const f={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},d={setTimeout(t,e,...i){const{delegate:n}=d;return(null==n?void 0:n.setTimeout)?n.setTimeout(t,e,...i):setTimeout(t,e,...i)},clearTimeout(t){const{delegate:e}=d;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function p(){}const v=b("C",void 0,void 0);function b(t,e,i){return{kind:t,value:e,error:i}}function m(t){t()}class w extends u{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,l(t)&&t.add(this)):this.destination=O}static create(t,e,i){return new _(t,e,i)}next(t){this.isStopped?E(function(t){return b("N",t,void 0)}(t),this):this._next(t)}error(t){this.isStopped?E(b("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?E(v,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const y=Function.prototype.bind;function x(t,e){return y.call(t,e)}class g{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(t){j(t)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(t){j(t)}else j(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(t){j(t)}}}class _ extends w{constructor(t,e,i){let n;if(super(),r(t)||!t)n={next:null!=t?t:void 0,error:null!=e?e:void 0,complete:null!=i?i:void 0};else{let e;this&&f.useDeprecatedNextContext?(e=Object.create(t),e.unsubscribe=()=>this.unsubscribe(),n={next:t.next&&x(t.next,e),error:t.error&&x(t.error,e),complete:t.complete&&x(t.complete,e)}):n=t}this.destination=new g(n)}}function j(t){var e;e=t,d.setTimeout((()=>{const{onUnhandledError:t}=f;if(!t)throw e;t(e)}))}function E(t,e){const{onStoppedNotification:i}=f;i&&d.setTimeout((()=>i(t,e)))}const O={closed:!0,next:p,error:function(t){throw t},complete:p},S="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(t){return t}class F{constructor(t){t&&(this._subscribe=t)}lift(t){const e=new F;return e.source=this,e.operator=t,e}subscribe(t,e,i){const n=(s=t)&&s instanceof w||function(t){return t&&r(t.next)&&r(t.error)&&r(t.complete)}(s)&&l(s)?t:new _(t,e,i);var s;return m((()=>{const{operator:t,source:e}=this;n.add(t?t.call(n,e):e?this._subscribe(n):this._trySubscribe(n))})),n}_trySubscribe(t){try{return this._subscribe(t)}catch(e){t.error(e)}}forEach(t,e){return new(e=D(e))(((e,i)=>{const n=new _({next:e=>{try{t(e)}catch(t){i(t),n.unsubscribe()}},error:i,complete:e});this.subscribe(n)}))}_subscribe(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)}[S](){return this}pipe(...t){return(0===(e=t).length?P:1===e.length?e[0]:function(t){return e.reduce(((t,e)=>e(t)),t)})(this);var e}toPromise(t){return new(t=D(t))(((t,e)=>{let i;this.subscribe((t=>i=t),(t=>e(t)),(()=>t(i)))}))}}function D(t){var e;return null!==(e=null!=t?t:f.Promise)&&void 0!==e?e:Promise}F.create=t=>new F(t);const T=s((t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}));class U extends F{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const e=new k(this,this);return e.operator=t,e}_throwIfClosed(){if(this.closed)throw new T}next(t){m((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const e of this.currentObservers)e.next(t)}}))}error(t){m((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:e}=this;for(;e.length;)e.shift().error(t)}}))}complete(){m((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:i,observers:n}=this;return e||i?h:(this.currentObservers=null,n.push(t),new u((()=>{this.currentObservers=null,c(n,t)})))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:i,isStopped:n}=this;e?t.error(i):n&&t.complete()}asObservable(){const t=new F;return t.source=this,t}}U.create=(t,e)=>new k(t,e);class k extends U{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:h}}class z extends U{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){const{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function A(t){return t}function N(t,e){return(i,n)=>{const r=function(t,e,i,n){let r=$.get(t);return r||(r=[],$.set(t,r)),r.push({options:i,name:e,optionFactory:n.optionFactory||A,service:{name:n.name,method:n.method||"subscribe"}}),r}(i,n,t,e);1===r.length&&function(t,e){t.connectedCallback=C(t.connectedCallback,e),t.componentWillLoad=function(t,e){return async function(...i){return!0===W.get(this)?(await R(this),t?t.apply(this,i):void 0):C(t,e).apply(this,i)}}(t.componentWillLoad,e),t.componentDidUnload=M(t.componentDidUnload),t.disconnectedCallback=M(t.disconnectedCallback)}(i,r)}}const $=new WeakMap,L=new WeakMap,W=new WeakMap;function C(e,i){return async function(...n){W.set(this,!0),L.set(this,[]),await R(this);const r=new z(this.context);if(function(e,i,n){const r=t(e),{get:s,set:o}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),i);Object.defineProperty(r,i,{configurable:!0,get:s,set:function(t){o.call(this,t),n.next(t)}})}(this,"context",r),i.forEach((t=>{t.options=t.optionFactory(t.options,this),"context"in t.options&&(t.options.context=r),function(t,e){const i=function(t,e){const i=Object.assign({},e.options);var n,r;r=t,(n=i).filter&&(n.filter=n.filter.map((t=>t.bind(r)))),n.map&&(n.map=n.map.map((t=>t.bind(r))));const s=e.service.name,o=t.platform;if(!o.has(s))throw new Error(`Service ${s} does not exist`);return o.get(s)[e.service.method](function(t,e){return i=>{t[e]=i}}(t,e.name),i)}(t,e);L.get(t).push(i)}(this,t)})),e)return e.apply(this,n)}}function M(t){return async function(...e){let i;return t&&(i=t.apply(this,e)),L.get(this).forEach((t=>t())),L.set(this,[]),i}}function R(t){const e=[];return t.platform||e.push(H(t,"platform")),t.context||e.push(H(t,"context")),e.length?Promise.all(e):Promise.resolve()}function H(e,i){const n=t(e);return new Promise((t=>{Object.defineProperty(n,i,{configurable:!0,set:e=>{delete n[i],n[i]=e,t()}})}))}function V(t){const{limetype:e}=this.context;return t[e]}function B(t){const{limetype:e,id:i}=this.context;if(t[e])return t[e].find((t=>t.id===i))}const I=["edit","view"],q=["ai","aspx","doc","docm","docx","dotm","dotx","emf","html","htm","obj","potm","potx","ppsm","ppsx","ppt","pptm","pptx","psd","rtf","tif","tiff","txt","wmf","xls","xlsx","zip"];var G=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const J=class{constructor(t){e(this,t),this.fileTypes=["view","contents","download"]}render(){const t=this.getFile();return t?this.isLiveDocsFile(t)?this.renderLiveDocs(t):this.renderFileViewer(t):this.renderNotFound()}renderLiveDocs(t){const e=this.getLiveDocsUrl(t);return e?i("iframe",{src:e,frameBorder:0,marginHeight:0,marginWidth:0}):this.renderNotFound()}renderFileViewer(t){const e=t.filename,n=this.getFileUrl(t);return n?i("limel-file-viewer",{filename:e,url:n,allowDownload:!0,allowFullscreen:!0}):this.renderNotFound()}renderNotFound(){return[i("section",{class:"not-found"},i("limel-icon",{name:"error",size:"large"}),i("h2",null,this.translator.get("not-found")),i("p",null,this.translator.get("no-files-attached",{object:this.getDescriptive(this.limeobject)})))]}getLiveDocsUrl(t){return this.fileTypes.filter(this.isLiveDocsType).map((e=>t.getUrl(e))).find((t=>t))}getFileUrl(t){return this.fileTypes.filter(function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}(this.isLiveDocsType)).map((e=>t.getUrl(e))).find((t=>t))}getFile(){const t=this.fileProperty;if(t)return this.limeobject.getFile(t.name)}isLiveDocsFile(t){return q.includes(t.extension)&&I.some((e=>t.getUrl(e)))}isLiveDocsType(t){return I.includes(t)}getDescriptive(t){var e;let i="";return(null==t?void 0:t.descriptive)&&(i=t.descriptive),i||(i=null===(e=this.limetype)||void 0===e?void 0:e.localname.singular),i||(i=this.translator.get("object")),i}get fileProperty(){if(this.limeobject){if(this.property){const t=this.limeobject.getLimetype().getProperty(this.property);if("file"===t.type)return t}return Object.values(this.limeobject.getLimetype().properties).find((t=>"file"===t.type))}}get translator(){return this.platform.get(n.Translate)}};G([function(t={}){const e={name:n.LimeObjectRepository};return t.map=[B,...t.map||[]],t.context=null,N(t,e)}()],J.prototype,"limeobject",void 0),G([function(t={}){const e={name:n.LimeTypeRepository};return t.map=[V,...t.map||[]],t.context=null,N(t,e)}()],J.prototype,"limetype",void 0),J.style=".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%}";export{J as limebb_limeobject_file_viewer}
|
|
1
|
+
import{g as t,r as e,h as i}from"./p-2912b7e7.js";import{P as n}from"./p-11eb7b1e.js";function r(t){return"function"==typeof t}function s(t){const e=t((t=>{Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}const o=s((t=>function(e){t(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map(((t,e)=>`${e+1}) ${t.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e}));function c(t,e){if(t){const i=t.indexOf(e);0<=i&&t.splice(i,1)}}class u{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;const{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(const t of e)t.remove(this);else e.remove(this);const{initialTeardown:i}=this;if(r(i))try{i()}catch(e){t=e instanceof o?e.errors:[e]}const{_finalizers:n}=this;if(n){this._finalizers=null;for(const e of n)try{a(e)}catch(e){t=null!=t?t:[],e instanceof o?t=[...t,...e.errors]:t.push(e)}}if(t)throw new o(t)}}add(t){var e;if(t&&t!==this)if(this.closed)a(t);else{if(t instanceof u){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){const{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){const{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){const{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&c(e,t)}remove(t){const{_finalizers:e}=this;e&&c(e,t),t instanceof u&&t._removeParent(this)}}u.EMPTY=(()=>{const t=new u;return t.closed=!0,t})();const h=u.EMPTY;function l(t){return t instanceof u||t&&"closed"in t&&r(t.remove)&&r(t.add)&&r(t.unsubscribe)}function a(t){r(t)?t():t.unsubscribe()}const f={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},d={setTimeout(t,e,...i){const{delegate:n}=d;return(null==n?void 0:n.setTimeout)?n.setTimeout(t,e,...i):setTimeout(t,e,...i)},clearTimeout(t){const{delegate:e}=d;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function p(){}const v=b("C",void 0,void 0);function b(t,e,i){return{kind:t,value:e,error:i}}function m(t){t()}class w extends u{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,l(t)&&t.add(this)):this.destination=O}static create(t,e,i){return new _(t,e,i)}next(t){this.isStopped?E(function(t){return b("N",t,void 0)}(t),this):this._next(t)}error(t){this.isStopped?E(b("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?E(v,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const y=Function.prototype.bind;function x(t,e){return y.call(t,e)}class g{constructor(t){this.partialObserver=t}next(t){const{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(t){j(t)}}error(t){const{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(t){j(t)}else j(t)}complete(){const{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(t){j(t)}}}class _ extends w{constructor(t,e,i){let n;if(super(),r(t)||!t)n={next:null!=t?t:void 0,error:null!=e?e:void 0,complete:null!=i?i:void 0};else{let e;this&&f.useDeprecatedNextContext?(e=Object.create(t),e.unsubscribe=()=>this.unsubscribe(),n={next:t.next&&x(t.next,e),error:t.error&&x(t.error,e),complete:t.complete&&x(t.complete,e)}):n=t}this.destination=new g(n)}}function j(t){var e;e=t,d.setTimeout((()=>{const{onUnhandledError:t}=f;if(!t)throw e;t(e)}))}function E(t,e){const{onStoppedNotification:i}=f;i&&d.setTimeout((()=>i(t,e)))}const O={closed:!0,next:p,error:function(t){throw t},complete:p},S="function"==typeof Symbol&&Symbol.observable||"@@observable";function P(t){return t}class F{constructor(t){t&&(this._subscribe=t)}lift(t){const e=new F;return e.source=this,e.operator=t,e}subscribe(t,e,i){const n=(s=t)&&s instanceof w||function(t){return t&&r(t.next)&&r(t.error)&&r(t.complete)}(s)&&l(s)?t:new _(t,e,i);var s;return m((()=>{const{operator:t,source:e}=this;n.add(t?t.call(n,e):e?this._subscribe(n):this._trySubscribe(n))})),n}_trySubscribe(t){try{return this._subscribe(t)}catch(e){t.error(e)}}forEach(t,e){return new(e=D(e))(((e,i)=>{const n=new _({next:e=>{try{t(e)}catch(t){i(t),n.unsubscribe()}},error:i,complete:e});this.subscribe(n)}))}_subscribe(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)}[S](){return this}pipe(...t){return(0===(e=t).length?P:1===e.length?e[0]:function(t){return e.reduce(((t,e)=>e(t)),t)})(this);var e}toPromise(t){return new(t=D(t))(((t,e)=>{let i;this.subscribe((t=>i=t),(t=>e(t)),(()=>t(i)))}))}}function D(t){var e;return null!==(e=null!=t?t:f.Promise)&&void 0!==e?e:Promise}F.create=t=>new F(t);const T=s((t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}));class U extends F{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const e=new k(this,this);return e.operator=t,e}_throwIfClosed(){if(this.closed)throw new T}next(t){m((()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const e of this.currentObservers)e.next(t)}}))}error(t){m((()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:e}=this;for(;e.length;)e.shift().error(t)}}))}complete(){m((()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}}))}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:e,isStopped:i,observers:n}=this;return e||i?h:(this.currentObservers=null,n.push(t),new u((()=>{this.currentObservers=null,c(n,t)})))}_checkFinalizedStatuses(t){const{hasError:e,thrownError:i,isStopped:n}=this;e?t.error(i):n&&t.complete()}asObservable(){const t=new F;return t.source=this,t}}U.create=(t,e)=>new k(t,e);class k extends U{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:h}}class z extends U{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){const{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}}function A(t){return t}function N(t,e){return(i,n)=>{const r=function(t,e,i,n){let r=$.get(t);return r||(r=[],$.set(t,r)),r.push({options:i,name:e,optionFactory:n.optionFactory||A,service:{name:n.name,method:n.method||"subscribe"}}),r}(i,n,t,e);1===r.length&&function(t,e){t.connectedCallback=C(t.connectedCallback,e),t.componentWillLoad=function(t,e){return async function(...i){return!0===W.get(this)?(await R(this),t?t.apply(this,i):void 0):C(t,e).apply(this,i)}}(t.componentWillLoad,e),t.componentDidUnload=M(t.componentDidUnload),t.disconnectedCallback=M(t.disconnectedCallback)}(i,r)}}const $=new WeakMap,L=new WeakMap,W=new WeakMap;function C(e,i){return async function(...n){W.set(this,!0),L.set(this,[]),await R(this);const r=new z(this.context);if(function(e,i,n){const r=t(e),{get:s,set:o}=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),i);Object.defineProperty(r,i,{configurable:!0,get:s,set:function(t){o.call(this,t),n.next(t)}})}(this,"context",r),i.forEach((t=>{t.options=t.optionFactory(t.options,this),"context"in t.options&&(t.options.context=r),function(t,e){const i=function(t,e){const i=Object.assign({},e.options);var n,r;r=t,(n=i).filter&&(n.filter=n.filter.map((t=>t.bind(r)))),n.map&&(n.map=n.map.map((t=>t.bind(r))));const s=e.service.name,o=t.platform;if(!o.has(s))throw new Error(`Service ${s} does not exist`);return o.get(s)[e.service.method](function(t,e){return i=>{t[e]=i}}(t,e.name),i)}(t,e);L.get(t).push(i)}(this,t)})),e)return e.apply(this,n)}}function M(t){return async function(...e){let i;return t&&(i=t.apply(this,e)),L.get(this).forEach((t=>t())),L.set(this,[]),i}}function R(t){const e=[];return t.platform||e.push(H(t,"platform")),t.context||e.push(H(t,"context")),e.length?Promise.all(e):Promise.resolve()}function H(e,i){const n=t(e);return new Promise((t=>{Object.defineProperty(n,i,{configurable:!0,set:e=>{delete n[i],n[i]=e,t()}})}))}function V(t){const{limetype:e}=this.context;return t[e]}function B(t){const{limetype:e,id:i}=this.context;if(t[e])return t[e].find((t=>t.id===i))}const I=["edit","view"],q=["ai","aspx","doc","docm","docx","dotm","dotx","emf","html","htm","obj","potm","potx","ppsm","ppsx","ppt","pptm","pptx","psd","rtf","tif","tiff","txt","wmf","xls","xlsx","zip"];var G=function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(o=(s<3?r(o):s>3?r(e,i,o):r(e,i))||o);return s>3&&o&&Object.defineProperty(e,i,o),o};const J=class{constructor(t){e(this,t),this.fileTypes=["view","contents","download"]}render(){const t=this.getFile();return t?this.isLiveDocsFile(t)?this.renderLiveDocs(t):this.renderFileViewer(t):this.renderNotFound()}renderLiveDocs(t){const e=this.getLiveDocsUrl(t);return e?i("iframe",{src:e,frameBorder:0,marginHeight:0,marginWidth:0}):this.renderNotFound()}renderFileViewer(t){const e=t.filename,n=this.getFileUrl(t);return n?i("limel-file-viewer",{filename:e,url:n,allowDownload:!0,allowFullscreen:!0}):this.renderNotFound()}renderNotFound(){return[i("section",{class:"not-found"},i("limel-icon",{name:"error",size:"large"}),i("h2",null,this.translator.get("not-found")),i("p",null,this.translator.get("no-files-attached",{object:this.getDescriptive(this.limeobject)})))]}getLiveDocsUrl(t){return this.fileTypes.filter(this.isLiveDocsType).map((e=>t.getUrl(e))).find((t=>t))}getFileUrl(t){return this.fileTypes.filter(function(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}(this.isLiveDocsType)).map((e=>t.getUrl(e))).find((t=>t))}getFile(){const t=this.fileProperty;if(t)return this.limeobject.getFile(t.name)}isLiveDocsFile(t){return q.includes(t.extension)&&I.some((e=>t.getUrl(e)))}isLiveDocsType(t){return I.includes(t)}getDescriptive(t){var e;let i="";return(null==t?void 0:t.descriptive)&&(i=t.descriptive),i||(i=null===(e=this.limetype)||void 0===e?void 0:e.localname.singular),i||(i=this.translator.get("object")),i}get fileProperty(){if(this.limeobject){if(this.property){const t=this.limeobject.getLimetype().getProperty(this.property);if("file"===t.type)return t}return Object.values(this.limeobject.getLimetype().properties).find((t=>"file"===t.type))}}get translator(){return this.platform.get(n.Translate)}};G([function(t={}){const e={name:n.LimeObjectRepository};return t.map=[B,...t.map||[]],t.context=null,N(t,e)}()],J.prototype,"limeobject",void 0),G([function(t={}){const e={name:n.LimeTypeRepository};return t.map=[V,...t.map||[]],t.context=null,N(t,e)}()],J.prototype,"limetype",void 0),J.style=".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%}";export{J as limebb_limeobject_file_viewer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as n,h as t}from"./p-2912b7e7.js";import{P as e}from"./p-39d48976.js";var u="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,o=u||i||Function("return this")(),f=o.Symbol,c=Object.prototype,a=c.hasOwnProperty,s=c.toString,v=f?f.toStringTag:void 0,l=Object.prototype.toString,b=f?f.toStringTag:void 0;function h(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":b&&b in Object(r)?function(r){var n=a.call(r,v),t=r[v];try{r[v]=void 0;var e=!0}catch(r){}var u=s.call(r);return e&&(n?r[v]=t:delete r[v]),u}(r):function(r){return l.call(r)}(r)}function d(r){return null!=r&&"object"==typeof r}function j(r){return"symbol"==typeof r||d(r)&&"[object Symbol]"==h(r)}function p(r,n){for(var t=-1,e=null==r?0:r.length,u=Array(e);++t<e;)u[t]=n(r[t],t,r);return u}var y=Array.isArray,m=f?f.prototype:void 0,w=m?m.toString:void 0;function g(r){if("string"==typeof r)return r;if(y(r))return p(r,g)+"";if(j(r))return w?w.call(r):"";var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function _(r){var n=typeof r;return null!=r&&("object"==n||"function"==n)}function O(r){return r}function x(r){if(!_(r))return!1;var n=h(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}var A,S=o["__core-js_shared__"],k=(A=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",$=Function.prototype.toString;function M(r){if(null!=r){try{return $.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var E=/^\[object .+?Constructor\]$/,P=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function D(r,n){var t=function(r,n){return null==r?void 0:r[n]}(r,n);return function(r){return!(!_(r)||(n=r,k&&k in n))&&(x(r)?P:E).test(M(r));var n}(t)?t:void 0}var F=D(o,"WeakMap");function R(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var U,V,W,B=Date.now,C=function(){try{var r=D(Object,"defineProperty");return r({},"",{}),r}catch(r){}}(),L=(U=C?function(r,n){return C(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:O,V=0,W=0,function(){var r=B(),n=16-(r-W);if(W=r,n>0){if(++V>=800)return arguments[0]}else V=0;return U.apply(void 0,arguments)}),N=/^(?:0|[1-9]\d*)$/;function T(r,n){var t=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==t||"symbol"!=t&&N.test(r))&&r>-1&&r%1==0&&r<n}function q(r,n){return r===n||r!=r&&n!=n}var G=Math.max;function I(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}function z(r){return null!=r&&I(r.length)&&!x(r)}function H(r,n,t){if(!_(t))return!1;var e=typeof n;return!!("number"==e?z(t)&&T(n,t.length):"string"==e&&n in t)&&q(t[n],r)}var J=Object.prototype;function K(r){return d(r)&&"[object Arguments]"==h(r)}var Q=Object.prototype,X=Q.hasOwnProperty,Y=Q.propertyIsEnumerable,Z=K(function(){return arguments}())?K:function(r){return d(r)&&X.call(r,"callee")&&!Y.call(r,"callee")},rr="object"==typeof exports&&exports&&!exports.nodeType&&exports,nr=rr&&"object"==typeof module&&module&&!module.nodeType&&module,tr=nr&&nr.exports===rr?o.Buffer:void 0,er=(tr?tr.isBuffer:void 0)||function(){return!1},ur={};function ir(r){return function(n){return r(n)}}ur["[object Float32Array]"]=ur["[object Float64Array]"]=ur["[object Int8Array]"]=ur["[object Int16Array]"]=ur["[object Int32Array]"]=ur["[object Uint8Array]"]=ur["[object Uint8ClampedArray]"]=ur["[object Uint16Array]"]=ur["[object Uint32Array]"]=!0,ur["[object Arguments]"]=ur["[object Array]"]=ur["[object ArrayBuffer]"]=ur["[object Boolean]"]=ur["[object DataView]"]=ur["[object Date]"]=ur["[object Error]"]=ur["[object Function]"]=ur["[object Map]"]=ur["[object Number]"]=ur["[object Object]"]=ur["[object RegExp]"]=ur["[object Set]"]=ur["[object String]"]=ur["[object WeakMap]"]=!1;var or="object"==typeof exports&&exports&&!exports.nodeType&&exports,fr=or&&"object"==typeof module&&module&&!module.nodeType&&module,cr=fr&&fr.exports===or&&u.process,ar=function(){try{return fr&&fr.require&&fr.require("util").types||cr&&cr.binding&&cr.binding("util")}catch(r){}}(),sr=ar&&ar.isTypedArray,vr=sr?ir(sr):function(r){return d(r)&&I(r.length)&&!!ur[h(r)]},lr=Object.prototype.hasOwnProperty;var br=function(r,n){return function(t){return r(n(t))}}(Object.keys,Object),hr=Object.prototype.hasOwnProperty;function dr(r){return z(r)?function(r,n){var t=y(r),e=!t&&Z(r),u=!t&&!e&&er(r),i=!t&&!e&&!u&&vr(r),o=t||e||u||i,f=o?function(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}(r.length,String):[],c=f.length;for(var a in r)!n&&!lr.call(r,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||T(a,c))||f.push(a);return f}(r):function(r){if((n=r)!==("function"==typeof(t=n&&n.constructor)&&t.prototype||J))return br(r);var n,t,e=[];for(var u in Object(r))hr.call(r,u)&&"constructor"!=u&&e.push(u);return e}(r)}var jr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pr=/^\w*$/;function yr(r,n){if(y(r))return!1;var t=typeof r;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=r&&!j(r))||pr.test(r)||!jr.test(r)||null!=n&&r in Object(n)}var mr=D(Object,"create"),wr=Object.prototype.hasOwnProperty,gr=Object.prototype.hasOwnProperty;function _r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Or(r,n){for(var t=r.length;t--;)if(q(r[t][0],n))return t;return-1}_r.prototype.clear=function(){this.__data__=mr?mr(null):{},this.size=0},_r.prototype.delete=function(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n},_r.prototype.get=function(r){var n=this.__data__;if(mr){var t=n[r];return"__lodash_hash_undefined__"===t?void 0:t}return wr.call(n,r)?n[r]:void 0},_r.prototype.has=function(r){var n=this.__data__;return mr?void 0!==n[r]:gr.call(n,r)},_r.prototype.set=function(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=mr&&void 0===n?"__lodash_hash_undefined__":n,this};var xr=Array.prototype.splice;function Ar(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}Ar.prototype.clear=function(){this.__data__=[],this.size=0},Ar.prototype.delete=function(r){var n=this.__data__,t=Or(n,r);return!(t<0||(t==n.length-1?n.pop():xr.call(n,t,1),--this.size,0))},Ar.prototype.get=function(r){var n=this.__data__,t=Or(n,r);return t<0?void 0:n[t][1]},Ar.prototype.has=function(r){return Or(this.__data__,r)>-1},Ar.prototype.set=function(r,n){var t=this.__data__,e=Or(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this};var Sr=D(o,"Map");function kr(r,n){var t,e,u=r.__data__;return("string"==(e=typeof(t=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?u["string"==typeof n?"string":"hash"]:u.map}function $r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Mr(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var t=function(){var e=arguments,u=n?n.apply(this,e):e[0],i=t.cache;if(i.has(u))return i.get(u);var o=r.apply(this,e);return t.cache=i.set(u,o)||i,o};return t.cache=new(Mr.Cache||$r),t}$r.prototype.clear=function(){this.size=0,this.__data__={hash:new _r,map:new(Sr||Ar),string:new _r}},$r.prototype.delete=function(r){var n=kr(this,r).delete(r);return this.size-=n?1:0,n},$r.prototype.get=function(r){return kr(this,r).get(r)},$r.prototype.has=function(r){return kr(this,r).has(r)},$r.prototype.set=function(r,n){var t=kr(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this},Mr.Cache=$r;var Er,Pr,Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=(Er=Mr((function(r){var n=[];return 46===r.charCodeAt(0)&&n.push(""),r.replace(Dr,(function(r,t,e,u){n.push(e?u.replace(Fr,"$1"):t||r)})),n}),(function(r){return 500===Pr.size&&Pr.clear(),r})),Pr=Er.cache,Er);function Ur(r){return null==r?"":g(r)}function Vr(r,n){return y(r)?r:yr(r,n)?[r]:Rr(Ur(r))}function Wr(r){if("string"==typeof r||j(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function Br(r,n){for(var t=0,e=(n=Vr(n,r)).length;null!=r&&t<e;)r=r[Wr(n[t++])];return t&&t==e?r:void 0}function Cr(r,n){for(var t=-1,e=n.length,u=r.length;++t<e;)r[u+t]=n[t];return r}var Lr=f?f.isConcatSpreadable:void 0;function Nr(r){return y(r)||Z(r)||!!(Lr&&r&&r[Lr])}function Tr(r,n,t,e,u){var i=-1,o=r.length;for(t||(t=Nr),u||(u=[]);++i<o;){var f=r[i];n>0&&t(f)?n>1?Tr(f,n-1,t,e,u):Cr(u,f):e||(u[u.length]=f)}return u}var qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Gr(r){return qr.test(r)}var Ir="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",zr="\\ud83c[\\udffb-\\udfff]",Hr="[^\\ud800-\\udfff]",Jr="(?:\\ud83c[\\udde6-\\uddff]){2}",Kr="[\\ud800-\\udbff][\\udc00-\\udfff]",Qr="(?:"+Ir+"|"+zr+")?",Xr="[\\ufe0e\\ufe0f]?"+Qr+"(?:\\u200d(?:"+[Hr,Jr,Kr].join("|")+")[\\ufe0e\\ufe0f]?"+Qr+")*",Yr="(?:"+[Hr+Ir+"?",Ir,Jr,Kr,"[\\ud800-\\udfff]"].join("|")+")",Zr=RegExp(zr+"(?="+zr+")|"+Yr+Xr,"g");var rn=("toUpperCase",function(r){var n,t,e,u,i=Gr(r=Ur(r))?function(r){return Gr(r)?function(r){return r.match(Zr)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=i?i[0]:r.charAt(0),f=i?(n=i,t=1,u=n.length,e=void 0===e?u:e,!t&&e>=u?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return o.toUpperCase()+f});function nn(r){var n=this.__data__=new Ar(r);this.size=n.size}nn.prototype.clear=function(){this.__data__=new Ar,this.size=0},nn.prototype.delete=function(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t},nn.prototype.get=function(r){return this.__data__.get(r)},nn.prototype.has=function(r){return this.__data__.has(r)},nn.prototype.set=function(r,n){var t=this.__data__;if(t instanceof Ar){var e=t.__data__;if(!Sr||e.length<199)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new $r(e)}return t.set(r,n),this.size=t.size,this};var tn=Object.prototype.propertyIsEnumerable,en=Object.getOwnPropertySymbols,un=en?function(r){return null==r?[]:(r=Object(r),function(n){for(var t=-1,e=null==n?0:n.length,u=0,i=[];++t<e;){var o=n[t];tn.call(r,o)&&(i[u++]=o)}return i}(en(r)))}:function(){return[]};function on(r){return function(r,n,t){var e=dr(r);return y(r)?e:Cr(e,t(r))}(r,0,un)}var fn=D(o,"DataView"),cn=D(o,"Promise"),an=D(o,"Set"),sn=M(fn),vn=M(Sr),ln=M(cn),bn=M(an),hn=M(F),dn=h;(fn&&"[object DataView]"!=dn(new fn(new ArrayBuffer(1)))||Sr&&"[object Map]"!=dn(new Sr)||cn&&"[object Promise]"!=dn(cn.resolve())||an&&"[object Set]"!=dn(new an)||F&&"[object WeakMap]"!=dn(new F))&&(dn=function(r){var n=h(r),t="[object Object]"==n?r.constructor:void 0,e=t?M(t):"";if(e)switch(e){case sn:return"[object DataView]";case vn:return"[object Map]";case ln:return"[object Promise]";case bn:return"[object Set]";case hn:return"[object WeakMap]"}return n});const jn=dn;var pn=o.Uint8Array;function yn(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new $r;++n<t;)this.add(r[n])}function mn(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function wn(r,n,t,e,u,i){var o=1&t,f=r.length,c=n.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(r),s=i.get(n);if(a&&s)return a==n&&s==r;var v=-1,l=!0,b=2&t?new yn:void 0;for(i.set(r,n),i.set(n,r);++v<f;){var h=r[v],d=n[v];if(e)var j=o?e(d,h,v,n,r,i):e(h,d,v,r,n,i);if(void 0!==j){if(j)continue;l=!1;break}if(b){if(!mn(n,(function(r,n){if(!b.has(n)&&(h===r||u(h,r,t,e,i)))return b.push(n)}))){l=!1;break}}else if(h!==d&&!u(h,d,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function gn(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function _n(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}yn.prototype.add=yn.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},yn.prototype.has=function(r){return this.__data__.has(r)};var On=f?f.prototype:void 0,xn=On?On.valueOf:void 0,An=Object.prototype.hasOwnProperty,Sn="[object Object]",kn=Object.prototype.hasOwnProperty;function $n(r,n,t,e,u){return r===n||(null==r||null==n||!d(r)&&!d(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var o=y(r),f=y(n),c=o?"[object Array]":jn(r),a=f?"[object Array]":jn(n),s=(c="[object Arguments]"==c?Sn:c)==Sn,v=(a="[object Arguments]"==a?Sn:a)==Sn,l=c==a;if(l&&er(r)){if(!er(n))return!1;o=!0,s=!1}if(l&&!s)return i||(i=new nn),o||vr(r)?wn(r,n,t,e,u,i):function(r,n,t,e,u,i,o){switch(t){case"[object DataView]":if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(r.byteLength!=n.byteLength||!i(new pn(r),new pn(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return q(+r,+n);case"[object Error]":return r.name==n.name&&r.message==n.message;case"[object RegExp]":case"[object String]":return r==n+"";case"[object Map]":var f=gn;case"[object Set]":if(f||(f=_n),r.size!=n.size&&!(1&e))return!1;var c=o.get(r);if(c)return c==n;e|=2,o.set(r,n);var a=wn(f(r),f(n),e,u,i,o);return o.delete(r),a;case"[object Symbol]":if(xn)return xn.call(r)==xn.call(n)}return!1}(r,n,c,t,e,u,i);if(!(1&t)){var b=s&&kn.call(r,"__wrapped__"),h=v&&kn.call(n,"__wrapped__");if(b||h){var d=b?r.value():r,j=h?n.value():n;return i||(i=new nn),u(d,j,t,e,i)}}return!!l&&(i||(i=new nn),function(r,n,t,e,u,i){var o=1&t,f=on(r),c=f.length;if(c!=on(n).length&&!o)return!1;for(var a=c;a--;){var s=f[a];if(!(o?s in n:An.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var b=!0;i.set(r,n),i.set(n,r);for(var h=o;++a<c;){var d=r[s=f[a]],j=n[s];if(e)var p=o?e(j,d,s,n,r,i):e(d,j,s,r,n,i);if(!(void 0===p?d===j||u(d,j,t,e,i):p)){b=!1;break}h||(h="constructor"==s)}if(b&&!h){var y=r.constructor,m=n.constructor;y==m||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(b=!1)}return i.delete(r),i.delete(n),b}(r,n,t,e,u,i))}(r,n,t,e,$n,u))}function Mn(r){return r==r&&!_(r)}function En(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Pn(r,n){return null!=r&&n in Object(r)}function Dn(r,n){return yr(r)&&Mn(n)?En(Wr(r),n):function(t){var e=function(r,n){var t=null==r?void 0:Br(r,n);return void 0===t?void 0:t}(t,r);return void 0===e&&e===n?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=Vr(n,r)).length,i=!1;++e<u;){var o=Wr(n[e]);if(!(i=null!=r&&t(r,o)))break;r=r[o]}return i||++e!=u?i:!!(u=null==r?0:r.length)&&I(u)&&T(o,u)&&(y(r)||Z(r))}(r,n,Pn)}(t,r):$n(n,e,3)}}function Fn(r){return"function"==typeof r?r:null==r?O:"object"==typeof r?y(r)?Dn(r[0],r[1]):1==(u=function(r){for(var n=dr(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Mn(u)]}return n}(e=r)).length&&u[0][2]?En(u[0][0],u[0][1]):function(r){return r===e||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var o=t[u];if(o[2]?o[1]!==r[o[0]]:!(o[0]in r))return!1}for(;++u<i;){var f=(o=t[u])[0],c=r[f],a=o[1];if(o[2]){if(void 0===c&&!(f in r))return!1}else{var s,v=new nn;if(!(void 0===s?$n(a,c,3,e,v):s))return!1}}return!0}(r,0,u)}:yr(n=r)?(t=Wr(n),function(r){return null==r?void 0:r[t]}):function(r){return function(n){return Br(n,r)}}(n);var n,t,e,u}var Rn=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),o=i.length;o--;){var f=i[++e];if(!1===n(u[f],f,u))break}return r},Un=function(r,n){if(null==r)return r;if(!z(r))return function(r,n){return r&&Rn(r,n,dr)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Vn(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=j(r),o=void 0!==n,f=null===n,c=n==n,a=j(n);if(!f&&!a&&!i&&r>n||i&&o&&c&&!f&&!a||e&&o&&c||!t&&c||!u)return 1;if(!e&&!i&&!a&&r<n||a&&t&&u&&!e&&!i||f&&t&&u||!o&&u||!c)return-1}return 0}function Wn(r,n,t){n=n.length?p(n,(function(r){return y(r)?function(n){return Br(n,1===r.length?r[0]:r)}:r})):[O];var e=-1;return n=p(n,ir(Fn)),function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,o=u.length,f=t.length;++e<o;){var c=Vn(u[e],i[e]);if(c)return e>=f?c:c*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(function(r,n){var t=-1,e=z(r)?Array(r.length):[];return Un(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:p(n,(function(n){return n(r)})),index:++e,value:r}})))}var Bn=function(r){return L(function(r,n,t){return n=G(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=G(e.length-n,0),o=Array(i);++u<i;)o[u]=e[n+u];u=-1;for(var f=Array(n+1);++u<n;)f[u]=e[u];return f[n]=t(o),R(r,this,f)}}(r,void 0,O),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&H(r,n[0],n[1])?n=[]:t>2&&H(n[0],n[1],n[2])&&(n=[n[0]]),Wn(r,Tr(n,1),[])}));function Cn(r,n){if(!r.length||!n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=rn(Ur(t[0]).toLowerCase()),t.join(" ")}const Ln=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Cn(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.some((n=>r.value===n)))),0===n.length&&(n=[r[0]])}else{const t=this.value;n=r.find((r=>r.value===t))||r[0]}return t("limel-select",{value:n,options:Bn(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Ln as limebb_locale_picker}
|
|
1
|
+
import{r,c as n,h as t}from"./p-2912b7e7.js";import{P as e}from"./p-11eb7b1e.js";var u="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,o=u||i||Function("return this")(),f=o.Symbol,c=Object.prototype,a=c.hasOwnProperty,s=c.toString,v=f?f.toStringTag:void 0,l=Object.prototype.toString,b=f?f.toStringTag:void 0;function h(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":b&&b in Object(r)?function(r){var n=a.call(r,v),t=r[v];try{r[v]=void 0;var e=!0}catch(r){}var u=s.call(r);return e&&(n?r[v]=t:delete r[v]),u}(r):function(r){return l.call(r)}(r)}function d(r){return null!=r&&"object"==typeof r}function j(r){return"symbol"==typeof r||d(r)&&"[object Symbol]"==h(r)}function p(r,n){for(var t=-1,e=null==r?0:r.length,u=Array(e);++t<e;)u[t]=n(r[t],t,r);return u}var y=Array.isArray,m=f?f.prototype:void 0,w=m?m.toString:void 0;function g(r){if("string"==typeof r)return r;if(y(r))return p(r,g)+"";if(j(r))return w?w.call(r):"";var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function _(r){var n=typeof r;return null!=r&&("object"==n||"function"==n)}function O(r){return r}function x(r){if(!_(r))return!1;var n=h(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}var A,S=o["__core-js_shared__"],k=(A=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",$=Function.prototype.toString;function M(r){if(null!=r){try{return $.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var E=/^\[object .+?Constructor\]$/,P=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function D(r,n){var t=function(r,n){return null==r?void 0:r[n]}(r,n);return function(r){return!(!_(r)||(n=r,k&&k in n))&&(x(r)?P:E).test(M(r));var n}(t)?t:void 0}var F=D(o,"WeakMap");function R(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var U,V,W,B=Date.now,C=function(){try{var r=D(Object,"defineProperty");return r({},"",{}),r}catch(r){}}(),L=(U=C?function(r,n){return C(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:O,V=0,W=0,function(){var r=B(),n=16-(r-W);if(W=r,n>0){if(++V>=800)return arguments[0]}else V=0;return U.apply(void 0,arguments)}),N=/^(?:0|[1-9]\d*)$/;function T(r,n){var t=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==t||"symbol"!=t&&N.test(r))&&r>-1&&r%1==0&&r<n}function q(r,n){return r===n||r!=r&&n!=n}var G=Math.max;function I(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}function z(r){return null!=r&&I(r.length)&&!x(r)}function H(r,n,t){if(!_(t))return!1;var e=typeof n;return!!("number"==e?z(t)&&T(n,t.length):"string"==e&&n in t)&&q(t[n],r)}var J=Object.prototype;function K(r){return d(r)&&"[object Arguments]"==h(r)}var Q=Object.prototype,X=Q.hasOwnProperty,Y=Q.propertyIsEnumerable,Z=K(function(){return arguments}())?K:function(r){return d(r)&&X.call(r,"callee")&&!Y.call(r,"callee")},rr="object"==typeof exports&&exports&&!exports.nodeType&&exports,nr=rr&&"object"==typeof module&&module&&!module.nodeType&&module,tr=nr&&nr.exports===rr?o.Buffer:void 0,er=(tr?tr.isBuffer:void 0)||function(){return!1},ur={};function ir(r){return function(n){return r(n)}}ur["[object Float32Array]"]=ur["[object Float64Array]"]=ur["[object Int8Array]"]=ur["[object Int16Array]"]=ur["[object Int32Array]"]=ur["[object Uint8Array]"]=ur["[object Uint8ClampedArray]"]=ur["[object Uint16Array]"]=ur["[object Uint32Array]"]=!0,ur["[object Arguments]"]=ur["[object Array]"]=ur["[object ArrayBuffer]"]=ur["[object Boolean]"]=ur["[object DataView]"]=ur["[object Date]"]=ur["[object Error]"]=ur["[object Function]"]=ur["[object Map]"]=ur["[object Number]"]=ur["[object Object]"]=ur["[object RegExp]"]=ur["[object Set]"]=ur["[object String]"]=ur["[object WeakMap]"]=!1;var or="object"==typeof exports&&exports&&!exports.nodeType&&exports,fr=or&&"object"==typeof module&&module&&!module.nodeType&&module,cr=fr&&fr.exports===or&&u.process,ar=function(){try{return fr&&fr.require&&fr.require("util").types||cr&&cr.binding&&cr.binding("util")}catch(r){}}(),sr=ar&&ar.isTypedArray,vr=sr?ir(sr):function(r){return d(r)&&I(r.length)&&!!ur[h(r)]},lr=Object.prototype.hasOwnProperty;var br=function(r,n){return function(t){return r(n(t))}}(Object.keys,Object),hr=Object.prototype.hasOwnProperty;function dr(r){return z(r)?function(r,n){var t=y(r),e=!t&&Z(r),u=!t&&!e&&er(r),i=!t&&!e&&!u&&vr(r),o=t||e||u||i,f=o?function(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}(r.length,String):[],c=f.length;for(var a in r)!n&&!lr.call(r,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||T(a,c))||f.push(a);return f}(r):function(r){if((n=r)!==("function"==typeof(t=n&&n.constructor)&&t.prototype||J))return br(r);var n,t,e=[];for(var u in Object(r))hr.call(r,u)&&"constructor"!=u&&e.push(u);return e}(r)}var jr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pr=/^\w*$/;function yr(r,n){if(y(r))return!1;var t=typeof r;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=r&&!j(r))||pr.test(r)||!jr.test(r)||null!=n&&r in Object(n)}var mr=D(Object,"create"),wr=Object.prototype.hasOwnProperty,gr=Object.prototype.hasOwnProperty;function _r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Or(r,n){for(var t=r.length;t--;)if(q(r[t][0],n))return t;return-1}_r.prototype.clear=function(){this.__data__=mr?mr(null):{},this.size=0},_r.prototype.delete=function(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n},_r.prototype.get=function(r){var n=this.__data__;if(mr){var t=n[r];return"__lodash_hash_undefined__"===t?void 0:t}return wr.call(n,r)?n[r]:void 0},_r.prototype.has=function(r){var n=this.__data__;return mr?void 0!==n[r]:gr.call(n,r)},_r.prototype.set=function(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=mr&&void 0===n?"__lodash_hash_undefined__":n,this};var xr=Array.prototype.splice;function Ar(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}Ar.prototype.clear=function(){this.__data__=[],this.size=0},Ar.prototype.delete=function(r){var n=this.__data__,t=Or(n,r);return!(t<0||(t==n.length-1?n.pop():xr.call(n,t,1),--this.size,0))},Ar.prototype.get=function(r){var n=this.__data__,t=Or(n,r);return t<0?void 0:n[t][1]},Ar.prototype.has=function(r){return Or(this.__data__,r)>-1},Ar.prototype.set=function(r,n){var t=this.__data__,e=Or(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this};var Sr=D(o,"Map");function kr(r,n){var t,e,u=r.__data__;return("string"==(e=typeof(t=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?u["string"==typeof n?"string":"hash"]:u.map}function $r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Mr(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var t=function(){var e=arguments,u=n?n.apply(this,e):e[0],i=t.cache;if(i.has(u))return i.get(u);var o=r.apply(this,e);return t.cache=i.set(u,o)||i,o};return t.cache=new(Mr.Cache||$r),t}$r.prototype.clear=function(){this.size=0,this.__data__={hash:new _r,map:new(Sr||Ar),string:new _r}},$r.prototype.delete=function(r){var n=kr(this,r).delete(r);return this.size-=n?1:0,n},$r.prototype.get=function(r){return kr(this,r).get(r)},$r.prototype.has=function(r){return kr(this,r).has(r)},$r.prototype.set=function(r,n){var t=kr(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this},Mr.Cache=$r;var Er,Pr,Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=(Er=Mr((function(r){var n=[];return 46===r.charCodeAt(0)&&n.push(""),r.replace(Dr,(function(r,t,e,u){n.push(e?u.replace(Fr,"$1"):t||r)})),n}),(function(r){return 500===Pr.size&&Pr.clear(),r})),Pr=Er.cache,Er);function Ur(r){return null==r?"":g(r)}function Vr(r,n){return y(r)?r:yr(r,n)?[r]:Rr(Ur(r))}function Wr(r){if("string"==typeof r||j(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function Br(r,n){for(var t=0,e=(n=Vr(n,r)).length;null!=r&&t<e;)r=r[Wr(n[t++])];return t&&t==e?r:void 0}function Cr(r,n){for(var t=-1,e=n.length,u=r.length;++t<e;)r[u+t]=n[t];return r}var Lr=f?f.isConcatSpreadable:void 0;function Nr(r){return y(r)||Z(r)||!!(Lr&&r&&r[Lr])}function Tr(r,n,t,e,u){var i=-1,o=r.length;for(t||(t=Nr),u||(u=[]);++i<o;){var f=r[i];n>0&&t(f)?n>1?Tr(f,n-1,t,e,u):Cr(u,f):e||(u[u.length]=f)}return u}var qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Gr(r){return qr.test(r)}var Ir="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",zr="\\ud83c[\\udffb-\\udfff]",Hr="[^\\ud800-\\udfff]",Jr="(?:\\ud83c[\\udde6-\\uddff]){2}",Kr="[\\ud800-\\udbff][\\udc00-\\udfff]",Qr="(?:"+Ir+"|"+zr+")?",Xr="[\\ufe0e\\ufe0f]?"+Qr+"(?:\\u200d(?:"+[Hr,Jr,Kr].join("|")+")[\\ufe0e\\ufe0f]?"+Qr+")*",Yr="(?:"+[Hr+Ir+"?",Ir,Jr,Kr,"[\\ud800-\\udfff]"].join("|")+")",Zr=RegExp(zr+"(?="+zr+")|"+Yr+Xr,"g");var rn=("toUpperCase",function(r){var n,t,e,u,i=Gr(r=Ur(r))?function(r){return Gr(r)?function(r){return r.match(Zr)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=i?i[0]:r.charAt(0),f=i?(n=i,t=1,u=n.length,e=void 0===e?u:e,!t&&e>=u?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return o.toUpperCase()+f});function nn(r){var n=this.__data__=new Ar(r);this.size=n.size}nn.prototype.clear=function(){this.__data__=new Ar,this.size=0},nn.prototype.delete=function(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t},nn.prototype.get=function(r){return this.__data__.get(r)},nn.prototype.has=function(r){return this.__data__.has(r)},nn.prototype.set=function(r,n){var t=this.__data__;if(t instanceof Ar){var e=t.__data__;if(!Sr||e.length<199)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new $r(e)}return t.set(r,n),this.size=t.size,this};var tn=Object.prototype.propertyIsEnumerable,en=Object.getOwnPropertySymbols,un=en?function(r){return null==r?[]:(r=Object(r),function(n){for(var t=-1,e=null==n?0:n.length,u=0,i=[];++t<e;){var o=n[t];tn.call(r,o)&&(i[u++]=o)}return i}(en(r)))}:function(){return[]};function on(r){return function(r,n,t){var e=dr(r);return y(r)?e:Cr(e,t(r))}(r,0,un)}var fn=D(o,"DataView"),cn=D(o,"Promise"),an=D(o,"Set"),sn=M(fn),vn=M(Sr),ln=M(cn),bn=M(an),hn=M(F),dn=h;(fn&&"[object DataView]"!=dn(new fn(new ArrayBuffer(1)))||Sr&&"[object Map]"!=dn(new Sr)||cn&&"[object Promise]"!=dn(cn.resolve())||an&&"[object Set]"!=dn(new an)||F&&"[object WeakMap]"!=dn(new F))&&(dn=function(r){var n=h(r),t="[object Object]"==n?r.constructor:void 0,e=t?M(t):"";if(e)switch(e){case sn:return"[object DataView]";case vn:return"[object Map]";case ln:return"[object Promise]";case bn:return"[object Set]";case hn:return"[object WeakMap]"}return n});const jn=dn;var pn=o.Uint8Array;function yn(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new $r;++n<t;)this.add(r[n])}function mn(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function wn(r,n,t,e,u,i){var o=1&t,f=r.length,c=n.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(r),s=i.get(n);if(a&&s)return a==n&&s==r;var v=-1,l=!0,b=2&t?new yn:void 0;for(i.set(r,n),i.set(n,r);++v<f;){var h=r[v],d=n[v];if(e)var j=o?e(d,h,v,n,r,i):e(h,d,v,r,n,i);if(void 0!==j){if(j)continue;l=!1;break}if(b){if(!mn(n,(function(r,n){if(!b.has(n)&&(h===r||u(h,r,t,e,i)))return b.push(n)}))){l=!1;break}}else if(h!==d&&!u(h,d,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function gn(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function _n(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}yn.prototype.add=yn.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},yn.prototype.has=function(r){return this.__data__.has(r)};var On=f?f.prototype:void 0,xn=On?On.valueOf:void 0,An=Object.prototype.hasOwnProperty,Sn="[object Object]",kn=Object.prototype.hasOwnProperty;function $n(r,n,t,e,u){return r===n||(null==r||null==n||!d(r)&&!d(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var o=y(r),f=y(n),c=o?"[object Array]":jn(r),a=f?"[object Array]":jn(n),s=(c="[object Arguments]"==c?Sn:c)==Sn,v=(a="[object Arguments]"==a?Sn:a)==Sn,l=c==a;if(l&&er(r)){if(!er(n))return!1;o=!0,s=!1}if(l&&!s)return i||(i=new nn),o||vr(r)?wn(r,n,t,e,u,i):function(r,n,t,e,u,i,o){switch(t){case"[object DataView]":if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(r.byteLength!=n.byteLength||!i(new pn(r),new pn(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return q(+r,+n);case"[object Error]":return r.name==n.name&&r.message==n.message;case"[object RegExp]":case"[object String]":return r==n+"";case"[object Map]":var f=gn;case"[object Set]":if(f||(f=_n),r.size!=n.size&&!(1&e))return!1;var c=o.get(r);if(c)return c==n;e|=2,o.set(r,n);var a=wn(f(r),f(n),e,u,i,o);return o.delete(r),a;case"[object Symbol]":if(xn)return xn.call(r)==xn.call(n)}return!1}(r,n,c,t,e,u,i);if(!(1&t)){var b=s&&kn.call(r,"__wrapped__"),h=v&&kn.call(n,"__wrapped__");if(b||h){var d=b?r.value():r,j=h?n.value():n;return i||(i=new nn),u(d,j,t,e,i)}}return!!l&&(i||(i=new nn),function(r,n,t,e,u,i){var o=1&t,f=on(r),c=f.length;if(c!=on(n).length&&!o)return!1;for(var a=c;a--;){var s=f[a];if(!(o?s in n:An.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var b=!0;i.set(r,n),i.set(n,r);for(var h=o;++a<c;){var d=r[s=f[a]],j=n[s];if(e)var p=o?e(j,d,s,n,r,i):e(d,j,s,r,n,i);if(!(void 0===p?d===j||u(d,j,t,e,i):p)){b=!1;break}h||(h="constructor"==s)}if(b&&!h){var y=r.constructor,m=n.constructor;y==m||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(b=!1)}return i.delete(r),i.delete(n),b}(r,n,t,e,u,i))}(r,n,t,e,$n,u))}function Mn(r){return r==r&&!_(r)}function En(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Pn(r,n){return null!=r&&n in Object(r)}function Dn(r,n){return yr(r)&&Mn(n)?En(Wr(r),n):function(t){var e=function(r,n){var t=null==r?void 0:Br(r,n);return void 0===t?void 0:t}(t,r);return void 0===e&&e===n?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=Vr(n,r)).length,i=!1;++e<u;){var o=Wr(n[e]);if(!(i=null!=r&&t(r,o)))break;r=r[o]}return i||++e!=u?i:!!(u=null==r?0:r.length)&&I(u)&&T(o,u)&&(y(r)||Z(r))}(r,n,Pn)}(t,r):$n(n,e,3)}}function Fn(r){return"function"==typeof r?r:null==r?O:"object"==typeof r?y(r)?Dn(r[0],r[1]):1==(u=function(r){for(var n=dr(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Mn(u)]}return n}(e=r)).length&&u[0][2]?En(u[0][0],u[0][1]):function(r){return r===e||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var o=t[u];if(o[2]?o[1]!==r[o[0]]:!(o[0]in r))return!1}for(;++u<i;){var f=(o=t[u])[0],c=r[f],a=o[1];if(o[2]){if(void 0===c&&!(f in r))return!1}else{var s,v=new nn;if(!(void 0===s?$n(a,c,3,e,v):s))return!1}}return!0}(r,0,u)}:yr(n=r)?(t=Wr(n),function(r){return null==r?void 0:r[t]}):function(r){return function(n){return Br(n,r)}}(n);var n,t,e,u}var Rn=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),o=i.length;o--;){var f=i[++e];if(!1===n(u[f],f,u))break}return r},Un=function(r,n){if(null==r)return r;if(!z(r))return function(r,n){return r&&Rn(r,n,dr)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Vn(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=j(r),o=void 0!==n,f=null===n,c=n==n,a=j(n);if(!f&&!a&&!i&&r>n||i&&o&&c&&!f&&!a||e&&o&&c||!t&&c||!u)return 1;if(!e&&!i&&!a&&r<n||a&&t&&u&&!e&&!i||f&&t&&u||!o&&u||!c)return-1}return 0}function Wn(r,n,t){n=n.length?p(n,(function(r){return y(r)?function(n){return Br(n,1===r.length?r[0]:r)}:r})):[O];var e=-1;return n=p(n,ir(Fn)),function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,o=u.length,f=t.length;++e<o;){var c=Vn(u[e],i[e]);if(c)return e>=f?c:c*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(function(r,n){var t=-1,e=z(r)?Array(r.length):[];return Un(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:p(n,(function(n){return n(r)})),index:++e,value:r}})))}var Bn=function(r){return L(function(r,n,t){return n=G(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=G(e.length-n,0),o=Array(i);++u<i;)o[u]=e[n+u];u=-1;for(var f=Array(n+1);++u<n;)f[u]=e[u];return f[n]=t(o),R(r,this,f)}}(r,void 0,O),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&H(r,n[0],n[1])?n=[]:t>2&&H(n[0],n[1],n[2])&&(n=[n[0]]),Wn(r,Tr(n,1),[])}));function Cn(r,n){if(!r.length||!n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=rn(Ur(t[0]).toLowerCase()),t.join(" ")}const Ln=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Cn(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.some((n=>r.value===n)))),0===n.length&&(n=[r[0]])}else{const t=this.value;n=r.find((r=>r.value===t))||r[0]}return t("limel-select",{value:n,options:Bn(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Ln as limebb_locale_picker}
|