@forgeroute/ui 0.4.57 → 0.4.58
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.
|
@@ -29749,7 +29749,7 @@ var ListComponent = class ListComponent {
|
|
|
29749
29749
|
}
|
|
29750
29750
|
`,
|
|
29751
29751
|
isInline: true,
|
|
29752
|
-
styles: ["ui-list{display:block;min-width:0}.ul-list{margin:0;padding:0;min-width:0}.ul-list--unordered{list-style:none}.ul-list--ordered{list-style:decimal;-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}.ul-list--ordered>.ul-item::marker{color:var(--text-secondary, #64748b);font-size:.875rem}.ul-item{min-width:0;transition:background-color .4s ease}.ul-item.ul-item--moved{background-color:var(--surface-hover, #f1f5f9)}.ul-list:not(.ul-list--grid)>.ul-item+.ul-item{margin-top:var(--ul-gap, 0px)}.ul-list:not(.ul-list--grid)>.ul-item:not(:last-child)>.ul-row>.ul-content>ui-list-item:not(.li-bordered) .li-row{border-bottom:1px solid var(--border, #e2e8f0)}.ul-row{display:flex;align-items:center;gap:8px;min-width:0}.ul-content{flex:1 1 auto;min-width:0;word-break:break-word;overflow-wrap:anywhere}.ul-controls{display:flex;flex:0 0 auto;align-items:center;gap:2px}.ul-item--nav{cursor:pointer;border-radius:10px;transition:background-color .12s ease}.ul-item--nav:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.ul-item--nav:hover{background:var(--surface-hover, #f8fafc)}.ul-item--nav:hover:has(>.ul-row>.ul-content>ui-list-item.li-bordered){background:transparent}.ul-item--nav>.ul-row{padding-inline-end:8px}.ul-item--nav:hover .ul-chevron{color:#0f172a;transform:translate(2px)}.ul-chevron{flex:0 0 auto;color:#94a3b8;transition:color .15s ease,transform .15s ease}@media(prefers-reduced-motion:reduce){.ul-chevron{transition:none;transform:none!important}}.ul-list.ul-list--grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(var(--ul-min, 130px),100%),1fr));gap:var(--ul-gap, 12px);list-style:none;-webkit-padding-start:0;padding-inline-start:0}.ul-list--grid>.ul-item>.ul-row{flex-direction:column;align-items:stretch;gap:6px}.ul-list--grid>.ul-item>.ul-row>.ul-controls{align-self:center}@media(pointer:coarse),(max-width:480px){.ul-controls{gap:16px}}.ul-item--draggable{-webkit-user-select:none;user-select:none;-webkit-user-drag:element}@media(hover:hover)and (pointer:fine){.ul-item--draggable{cursor:grab}.ul-item--draggable:active{cursor:grabbing}}.ul-item--draggable:focus{outline:2px solid #3b82f6;outline-offset:2px;border-radius:6px}.ul-item--draggable:focus:not(:focus-visible){outline:none}ui-list .ul-item--draggable img,ui-list .ul-item--draggable ui-image-preview{pointer-events:none;-webkit-user-drag:none}.ul-item--dragging{opacity:.5}.ul-item--over{outline:2px dashed #3b82f6;outline-offset:2px;border-radius:6px}@media(prefers-reduced-motion:reduce){.ul-item{transition:none}}@media(forced-colors:active){.ul-item.ul-item--moved{outline:2px solid Highlight;outline-offset:-2px}}@media(forced-colors:active){.ul-item.ul-item--dragging{outline:2px dotted Highlight;outline-offset:2px}.ul-item.ul-item--over{outline:2px dashed Highlight;outline-offset:2px}.ul-item--draggable:focus{outline:2px solid Highlight;outline-offset:2px}}.ul-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"],
|
|
29752
|
+
styles: ["ui-list{display:block;min-width:0}.ul-list{margin:0;padding:0;min-width:0}.ul-list--unordered{list-style:none}.ul-list--ordered{list-style:decimal;-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}.ul-list--ordered>.ul-item::marker{color:var(--text-secondary, #64748b);font-size:.875rem}.ul-item{min-width:0;transition:background-color .4s ease}.ul-item.ul-item--moved{background-color:var(--surface-hover, #f1f5f9)}.ul-list:not(.ul-list--grid)>.ul-item+.ul-item{margin-top:var(--ul-gap, 0px)}.ul-list:not(.ul-list--grid)>.ul-item:not(:last-child)>.ul-row>.ul-content>ui-list-item:not(.li-bordered) .li-row{border-bottom:1px solid var(--border, #e2e8f0)}.ul-row{display:flex;align-items:center;gap:8px;min-width:0}.ul-content{flex:1 1 auto;min-width:0;word-break:break-word;overflow-wrap:anywhere}.ul-controls{display:flex;flex:0 0 auto;align-items:center;gap:2px}.ul-item--nav{cursor:pointer;border-radius:10px;transition:background-color .12s ease}.ul-item--nav:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.ul-item--nav:hover{background:var(--surface-hover, #f8fafc)}.ul-item--nav:hover:has(>.ul-row>.ul-content>ui-list-item.li-bordered){background:transparent}.ul-item--nav>.ul-row{padding-inline-end:8px}.ul-item--nav:hover .ul-chevron{color:#0f172a;transform:translate(2px)}.ul-chevron{flex:0 0 auto;color:#94a3b8;transition:color .15s ease,transform .15s ease}@media(prefers-reduced-motion:reduce){.ul-chevron{transition:none;transform:none!important}}.ul-item--nav:has(>.ul-row>.ul-content>ui-list-item.li-bordered)>.ul-row{position:relative;padding-inline-end:0}.ul-item--nav:has(>.ul-row>.ul-content>ui-list-item.li-bordered)>.ul-row>.ul-chevron{position:absolute;inset-inline-end:12px;top:50%;margin-top:-10px;pointer-events:none}.ul-item--nav>.ul-row>.ul-content>ui-list-item.li-bordered .li-row{padding-inline-end:40px}.ul-list.ul-list--grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(var(--ul-min, 130px),100%),1fr));gap:var(--ul-gap, 12px);list-style:none;-webkit-padding-start:0;padding-inline-start:0}.ul-list--grid>.ul-item>.ul-row{flex-direction:column;align-items:stretch;gap:6px}.ul-list--grid>.ul-item>.ul-row>.ul-controls{align-self:center}@media(pointer:coarse),(max-width:480px){.ul-controls{gap:16px}}.ul-item--draggable{-webkit-user-select:none;user-select:none;-webkit-user-drag:element}@media(hover:hover)and (pointer:fine){.ul-item--draggable{cursor:grab}.ul-item--draggable:active{cursor:grabbing}}.ul-item--draggable:focus{outline:2px solid #3b82f6;outline-offset:2px;border-radius:6px}.ul-item--draggable:focus:not(:focus-visible){outline:none}ui-list .ul-item--draggable img,ui-list .ul-item--draggable ui-image-preview{pointer-events:none;-webkit-user-drag:none}.ul-item--dragging{opacity:.5}.ul-item--over{outline:2px dashed #3b82f6;outline-offset:2px;border-radius:6px}@media(prefers-reduced-motion:reduce){.ul-item{transition:none}}@media(forced-colors:active){.ul-item.ul-item--moved{outline:2px solid Highlight;outline-offset:-2px}}@media(forced-colors:active){.ul-item.ul-item--dragging{outline:2px dotted Highlight;outline-offset:2px}.ul-item.ul-item--over{outline:2px dashed Highlight;outline-offset:2px}.ul-item--draggable:focus{outline:2px solid Highlight;outline-offset:2px}}.ul-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"],
|
|
29753
29753
|
dependencies: [{
|
|
29754
29754
|
kind: "directive",
|
|
29755
29755
|
type: NgTemplateOutlet,
|
|
@@ -29877,7 +29877,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
29877
29877
|
<div class="ul-sr" role="status" aria-live="polite" aria-atomic="true">{{ announcement() }}</div>
|
|
29878
29878
|
}
|
|
29879
29879
|
`,
|
|
29880
|
-
styles: ["ui-list{display:block;min-width:0}.ul-list{margin:0;padding:0;min-width:0}.ul-list--unordered{list-style:none}.ul-list--ordered{list-style:decimal;-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}.ul-list--ordered>.ul-item::marker{color:var(--text-secondary, #64748b);font-size:.875rem}.ul-item{min-width:0;transition:background-color .4s ease}.ul-item.ul-item--moved{background-color:var(--surface-hover, #f1f5f9)}.ul-list:not(.ul-list--grid)>.ul-item+.ul-item{margin-top:var(--ul-gap, 0px)}.ul-list:not(.ul-list--grid)>.ul-item:not(:last-child)>.ul-row>.ul-content>ui-list-item:not(.li-bordered) .li-row{border-bottom:1px solid var(--border, #e2e8f0)}.ul-row{display:flex;align-items:center;gap:8px;min-width:0}.ul-content{flex:1 1 auto;min-width:0;word-break:break-word;overflow-wrap:anywhere}.ul-controls{display:flex;flex:0 0 auto;align-items:center;gap:2px}.ul-item--nav{cursor:pointer;border-radius:10px;transition:background-color .12s ease}.ul-item--nav:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.ul-item--nav:hover{background:var(--surface-hover, #f8fafc)}.ul-item--nav:hover:has(>.ul-row>.ul-content>ui-list-item.li-bordered){background:transparent}.ul-item--nav>.ul-row{padding-inline-end:8px}.ul-item--nav:hover .ul-chevron{color:#0f172a;transform:translate(2px)}.ul-chevron{flex:0 0 auto;color:#94a3b8;transition:color .15s ease,transform .15s ease}@media(prefers-reduced-motion:reduce){.ul-chevron{transition:none;transform:none!important}}.ul-list.ul-list--grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(var(--ul-min, 130px),100%),1fr));gap:var(--ul-gap, 12px);list-style:none;-webkit-padding-start:0;padding-inline-start:0}.ul-list--grid>.ul-item>.ul-row{flex-direction:column;align-items:stretch;gap:6px}.ul-list--grid>.ul-item>.ul-row>.ul-controls{align-self:center}@media(pointer:coarse),(max-width:480px){.ul-controls{gap:16px}}.ul-item--draggable{-webkit-user-select:none;user-select:none;-webkit-user-drag:element}@media(hover:hover)and (pointer:fine){.ul-item--draggable{cursor:grab}.ul-item--draggable:active{cursor:grabbing}}.ul-item--draggable:focus{outline:2px solid #3b82f6;outline-offset:2px;border-radius:6px}.ul-item--draggable:focus:not(:focus-visible){outline:none}ui-list .ul-item--draggable img,ui-list .ul-item--draggable ui-image-preview{pointer-events:none;-webkit-user-drag:none}.ul-item--dragging{opacity:.5}.ul-item--over{outline:2px dashed #3b82f6;outline-offset:2px;border-radius:6px}@media(prefers-reduced-motion:reduce){.ul-item{transition:none}}@media(forced-colors:active){.ul-item.ul-item--moved{outline:2px solid Highlight;outline-offset:-2px}}@media(forced-colors:active){.ul-item.ul-item--dragging{outline:2px dotted Highlight;outline-offset:2px}.ul-item.ul-item--over{outline:2px dashed Highlight;outline-offset:2px}.ul-item--draggable:focus{outline:2px solid Highlight;outline-offset:2px}}.ul-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"]
|
|
29880
|
+
styles: ["ui-list{display:block;min-width:0}.ul-list{margin:0;padding:0;min-width:0}.ul-list--unordered{list-style:none}.ul-list--ordered{list-style:decimal;-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}.ul-list--ordered>.ul-item::marker{color:var(--text-secondary, #64748b);font-size:.875rem}.ul-item{min-width:0;transition:background-color .4s ease}.ul-item.ul-item--moved{background-color:var(--surface-hover, #f1f5f9)}.ul-list:not(.ul-list--grid)>.ul-item+.ul-item{margin-top:var(--ul-gap, 0px)}.ul-list:not(.ul-list--grid)>.ul-item:not(:last-child)>.ul-row>.ul-content>ui-list-item:not(.li-bordered) .li-row{border-bottom:1px solid var(--border, #e2e8f0)}.ul-row{display:flex;align-items:center;gap:8px;min-width:0}.ul-content{flex:1 1 auto;min-width:0;word-break:break-word;overflow-wrap:anywhere}.ul-controls{display:flex;flex:0 0 auto;align-items:center;gap:2px}.ul-item--nav{cursor:pointer;border-radius:10px;transition:background-color .12s ease}.ul-item--nav:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.ul-item--nav:hover{background:var(--surface-hover, #f8fafc)}.ul-item--nav:hover:has(>.ul-row>.ul-content>ui-list-item.li-bordered){background:transparent}.ul-item--nav>.ul-row{padding-inline-end:8px}.ul-item--nav:hover .ul-chevron{color:#0f172a;transform:translate(2px)}.ul-chevron{flex:0 0 auto;color:#94a3b8;transition:color .15s ease,transform .15s ease}@media(prefers-reduced-motion:reduce){.ul-chevron{transition:none;transform:none!important}}.ul-item--nav:has(>.ul-row>.ul-content>ui-list-item.li-bordered)>.ul-row{position:relative;padding-inline-end:0}.ul-item--nav:has(>.ul-row>.ul-content>ui-list-item.li-bordered)>.ul-row>.ul-chevron{position:absolute;inset-inline-end:12px;top:50%;margin-top:-10px;pointer-events:none}.ul-item--nav>.ul-row>.ul-content>ui-list-item.li-bordered .li-row{padding-inline-end:40px}.ul-list.ul-list--grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(var(--ul-min, 130px),100%),1fr));gap:var(--ul-gap, 12px);list-style:none;-webkit-padding-start:0;padding-inline-start:0}.ul-list--grid>.ul-item>.ul-row{flex-direction:column;align-items:stretch;gap:6px}.ul-list--grid>.ul-item>.ul-row>.ul-controls{align-self:center}@media(pointer:coarse),(max-width:480px){.ul-controls{gap:16px}}.ul-item--draggable{-webkit-user-select:none;user-select:none;-webkit-user-drag:element}@media(hover:hover)and (pointer:fine){.ul-item--draggable{cursor:grab}.ul-item--draggable:active{cursor:grabbing}}.ul-item--draggable:focus{outline:2px solid #3b82f6;outline-offset:2px;border-radius:6px}.ul-item--draggable:focus:not(:focus-visible){outline:none}ui-list .ul-item--draggable img,ui-list .ul-item--draggable ui-image-preview{pointer-events:none;-webkit-user-drag:none}.ul-item--dragging{opacity:.5}.ul-item--over{outline:2px dashed #3b82f6;outline-offset:2px;border-radius:6px}@media(prefers-reduced-motion:reduce){.ul-item{transition:none}}@media(forced-colors:active){.ul-item.ul-item--moved{outline:2px solid Highlight;outline-offset:-2px}}@media(forced-colors:active){.ul-item.ul-item--dragging{outline:2px dotted Highlight;outline-offset:2px}.ul-item.ul-item--over{outline:2px dashed Highlight;outline-offset:2px}.ul-item--draggable:focus{outline:2px solid Highlight;outline-offset:2px}}.ul-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"]
|
|
29881
29881
|
}]
|
|
29882
29882
|
}],
|
|
29883
29883
|
propDecorators: {
|
|
@@ -49166,6 +49166,1019 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
49166
49166
|
}]
|
|
49167
49167
|
}
|
|
49168
49168
|
});
|
|
49169
|
-
|
|
49169
|
+
const facebookShareUrl = (url) => `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(url)}`;
|
|
49170
|
+
const xShareUrl = (url, text) => `https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`;
|
|
49171
|
+
const linkedInShareUrl = (url) => `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`;
|
|
49172
|
+
const gmailShareUrl = (url, title) => `https://mail.google.com/mail/?view=cm&fs=1&su=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\n\n${url}`)}`;
|
|
49173
|
+
const outlookShareUrl = (url, title) => `https://outlook.live.com/mail/0/deeplink/compose?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\n\n${url}`)}`;
|
|
49174
|
+
const emailShareUrl = (url, title) => `mailto:?subject=${encodeURIComponent(title)}&body=${encodeURIComponent(`${title}\n\n${url}`)}`;
|
|
49175
|
+
let nextShareMenuId = 0;
|
|
49176
|
+
var ShareMenuComponent = class ShareMenuComponent {
|
|
49177
|
+
constructor() {
|
|
49178
|
+
this.url = input.required(...ngDevMode ? [{ debugName: "url" }] : /* istanbul ignore next */ []);
|
|
49179
|
+
this.title = input.required(...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
49180
|
+
this.label = input("this page", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
|
|
49181
|
+
this.panelId = `ui-share-panel-${nextShareMenuId++}`;
|
|
49182
|
+
this.doc = inject(DOCUMENT);
|
|
49183
|
+
this.toast = inject(ToastService);
|
|
49184
|
+
this.injector = inject(Injector);
|
|
49185
|
+
this.host = inject(ElementRef);
|
|
49186
|
+
this.trigger = viewChild("trigger", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
|
|
49187
|
+
this.panel = viewChild("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
|
|
49188
|
+
this.open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
49189
|
+
this.shiftX = signal(0, ...ngDevMode ? [{ debugName: "shiftX" }] : /* istanbul ignore next */ []);
|
|
49190
|
+
this.isTouchDevice = computed(() => this.doc.defaultView?.matchMedia?.("(pointer: coarse)").matches === true, ...ngDevMode ? [{ debugName: "isTouchDevice" }] : /* istanbul ignore next */ []);
|
|
49191
|
+
this.canNativeShare = computed(() => typeof this.doc.defaultView?.navigator?.share === "function" && this.isTouchDevice(), ...ngDevMode ? [{ debugName: "canNativeShare" }] : /* istanbul ignore next */ []);
|
|
49192
|
+
this.tiles = computed(() => [
|
|
49193
|
+
{
|
|
49194
|
+
value: "facebook",
|
|
49195
|
+
label: "Facebook",
|
|
49196
|
+
background: "#1877f2"
|
|
49197
|
+
},
|
|
49198
|
+
{
|
|
49199
|
+
value: "x",
|
|
49200
|
+
label: "X",
|
|
49201
|
+
background: "#000000"
|
|
49202
|
+
},
|
|
49203
|
+
{
|
|
49204
|
+
value: "linkedin",
|
|
49205
|
+
label: "LinkedIn",
|
|
49206
|
+
background: "#0a66c2"
|
|
49207
|
+
},
|
|
49208
|
+
...this.isTouchDevice() ? [{
|
|
49209
|
+
value: "email",
|
|
49210
|
+
label: "Email",
|
|
49211
|
+
background: "#78716c"
|
|
49212
|
+
}] : [{
|
|
49213
|
+
value: "gmail",
|
|
49214
|
+
label: "Gmail",
|
|
49215
|
+
background: "#ea4335"
|
|
49216
|
+
}, {
|
|
49217
|
+
value: "outlook",
|
|
49218
|
+
label: "Outlook",
|
|
49219
|
+
background: "#0078d4"
|
|
49220
|
+
}],
|
|
49221
|
+
{
|
|
49222
|
+
value: "copy",
|
|
49223
|
+
label: "Copy link",
|
|
49224
|
+
background: "var(--ui-share-accent, var(--primary, #2563eb))"
|
|
49225
|
+
},
|
|
49226
|
+
...this.canNativeShare() ? [{
|
|
49227
|
+
value: "native",
|
|
49228
|
+
label: "More",
|
|
49229
|
+
background: "#57534e"
|
|
49230
|
+
}] : []
|
|
49231
|
+
], ...ngDevMode ? [{ debugName: "tiles" }] : /* istanbul ignore next */ []);
|
|
49232
|
+
this.links = computed(() => ({
|
|
49233
|
+
facebook: facebookShareUrl(this.url()),
|
|
49234
|
+
x: xShareUrl(this.url(), this.title()),
|
|
49235
|
+
linkedin: linkedInShareUrl(this.url()),
|
|
49236
|
+
email: emailShareUrl(this.url(), this.title()),
|
|
49237
|
+
gmail: gmailShareUrl(this.url(), this.title()),
|
|
49238
|
+
outlook: outlookShareUrl(this.url(), this.title())
|
|
49239
|
+
}), ...ngDevMode ? [{ debugName: "links" }] : /* istanbul ignore next */ []);
|
|
49240
|
+
}
|
|
49241
|
+
toggle(event) {
|
|
49242
|
+
event.stopPropagation();
|
|
49243
|
+
if (this.open()) this.close();
|
|
49244
|
+
else this.show();
|
|
49245
|
+
}
|
|
49246
|
+
show() {
|
|
49247
|
+
this.shiftX.set(0);
|
|
49248
|
+
this.open.set(true);
|
|
49249
|
+
afterNextRender(() => {
|
|
49250
|
+
const panel = this.panel()?.nativeElement;
|
|
49251
|
+
if (!panel) return;
|
|
49252
|
+
const view = this.doc.documentElement.clientWidth;
|
|
49253
|
+
const rect = panel.getBoundingClientRect();
|
|
49254
|
+
const margin = 8;
|
|
49255
|
+
if (rect.right > view - margin) this.shiftX.set(Math.round(view - margin - rect.right));
|
|
49256
|
+
else if (rect.left < margin) this.shiftX.set(Math.round(margin - rect.left));
|
|
49257
|
+
if (this.doc.activeElement === this.trigger()?.nativeElement) panel.querySelector("button")?.focus();
|
|
49258
|
+
}, { injector: this.injector });
|
|
49259
|
+
}
|
|
49260
|
+
close(returnFocus = false) {
|
|
49261
|
+
if (!this.open()) return;
|
|
49262
|
+
this.open.set(false);
|
|
49263
|
+
if (returnFocus) this.trigger()?.nativeElement.focus();
|
|
49264
|
+
}
|
|
49265
|
+
onEscape() {
|
|
49266
|
+
if (!this.open()) return;
|
|
49267
|
+
const focusInside = this.host.nativeElement.contains(this.doc.activeElement);
|
|
49268
|
+
this.close(focusInside);
|
|
49269
|
+
}
|
|
49270
|
+
onDocumentClick(event) {
|
|
49271
|
+
if (this.open() && !this.host.nativeElement.contains(event.target)) this.close();
|
|
49272
|
+
}
|
|
49273
|
+
onFocusOut(event) {
|
|
49274
|
+
const next = event.relatedTarget;
|
|
49275
|
+
if (this.open() && next && !this.host.nativeElement.contains(next)) this.close();
|
|
49276
|
+
}
|
|
49277
|
+
onPanelKeydown(event) {
|
|
49278
|
+
const options = Array.from(this.panel().nativeElement.querySelectorAll("button"));
|
|
49279
|
+
const i = options.indexOf(this.doc.activeElement);
|
|
49280
|
+
const to = event.key === "ArrowRight" ? (i + 1) % options.length : event.key === "ArrowLeft" ? (i - 1 + options.length) % options.length : event.key === "Home" ? 0 : event.key === "End" ? options.length - 1 : -1;
|
|
49281
|
+
if (to < 0) return;
|
|
49282
|
+
event.preventDefault();
|
|
49283
|
+
options[to].focus();
|
|
49284
|
+
}
|
|
49285
|
+
choose(option) {
|
|
49286
|
+
switch (option) {
|
|
49287
|
+
case "native":
|
|
49288
|
+
this.nativeShare();
|
|
49289
|
+
break;
|
|
49290
|
+
case "facebook":
|
|
49291
|
+
case "x":
|
|
49292
|
+
case "linkedin":
|
|
49293
|
+
case "gmail":
|
|
49294
|
+
case "outlook":
|
|
49295
|
+
this.doc.defaultView?.open(this.links()[option], "_blank", "noopener,noreferrer");
|
|
49296
|
+
break;
|
|
49297
|
+
case "email":
|
|
49298
|
+
this.email();
|
|
49299
|
+
break;
|
|
49300
|
+
case "copy": this.copy();
|
|
49301
|
+
}
|
|
49302
|
+
this.close(true);
|
|
49303
|
+
}
|
|
49304
|
+
async nativeShare() {
|
|
49305
|
+
try {
|
|
49306
|
+
await this.doc.defaultView.navigator.share({
|
|
49307
|
+
title: this.title(),
|
|
49308
|
+
url: this.url()
|
|
49309
|
+
});
|
|
49310
|
+
} catch (err) {
|
|
49311
|
+
if (err?.name !== "AbortError") this.toast.error("Sharing from this page isn't available here. Use one of the other options.");
|
|
49312
|
+
}
|
|
49313
|
+
}
|
|
49314
|
+
email() {
|
|
49315
|
+
const link = this.doc.createElement("a");
|
|
49316
|
+
link.href = this.links().email;
|
|
49317
|
+
link.rel = "noopener noreferrer";
|
|
49318
|
+
link.click();
|
|
49319
|
+
}
|
|
49320
|
+
async copy() {
|
|
49321
|
+
const url = this.url();
|
|
49322
|
+
try {
|
|
49323
|
+
await this.doc.defaultView.navigator.clipboard.writeText(url);
|
|
49324
|
+
this.toast.show("Link copied");
|
|
49325
|
+
return;
|
|
49326
|
+
} catch {}
|
|
49327
|
+
if (this.legacyCopy(url)) {
|
|
49328
|
+
this.toast.show("Link copied");
|
|
49329
|
+
return;
|
|
49330
|
+
}
|
|
49331
|
+
this.doc.defaultView?.prompt("Copy this link:", url);
|
|
49332
|
+
}
|
|
49333
|
+
legacyCopy(text) {
|
|
49334
|
+
const textarea = this.doc.createElement("textarea");
|
|
49335
|
+
textarea.value = text;
|
|
49336
|
+
textarea.setAttribute("readonly", "");
|
|
49337
|
+
textarea.style.position = "fixed";
|
|
49338
|
+
textarea.style.opacity = "0";
|
|
49339
|
+
this.doc.body.appendChild(textarea);
|
|
49340
|
+
try {
|
|
49341
|
+
textarea.select();
|
|
49342
|
+
textarea.setSelectionRange(0, text.length);
|
|
49343
|
+
return this.doc.execCommand("copy");
|
|
49344
|
+
} catch {
|
|
49345
|
+
return false;
|
|
49346
|
+
} finally {
|
|
49347
|
+
textarea.remove();
|
|
49348
|
+
}
|
|
49349
|
+
}
|
|
49350
|
+
static {
|
|
49351
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
49352
|
+
minVersion: "12.0.0",
|
|
49353
|
+
version: "22.2.2",
|
|
49354
|
+
ngImport: i0,
|
|
49355
|
+
type: ShareMenuComponent,
|
|
49356
|
+
deps: [],
|
|
49357
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
49358
|
+
});
|
|
49359
|
+
}
|
|
49360
|
+
static {
|
|
49361
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
49362
|
+
minVersion: "17.0.0",
|
|
49363
|
+
version: "22.2.2",
|
|
49364
|
+
type: ShareMenuComponent,
|
|
49365
|
+
isStandalone: true,
|
|
49366
|
+
selector: "ui-share-menu",
|
|
49367
|
+
inputs: {
|
|
49368
|
+
url: {
|
|
49369
|
+
classPropertyName: "url",
|
|
49370
|
+
publicName: "url",
|
|
49371
|
+
isSignal: true,
|
|
49372
|
+
isRequired: true,
|
|
49373
|
+
transformFunction: null
|
|
49374
|
+
},
|
|
49375
|
+
title: {
|
|
49376
|
+
classPropertyName: "title",
|
|
49377
|
+
publicName: "title",
|
|
49378
|
+
isSignal: true,
|
|
49379
|
+
isRequired: true,
|
|
49380
|
+
transformFunction: null
|
|
49381
|
+
},
|
|
49382
|
+
label: {
|
|
49383
|
+
classPropertyName: "label",
|
|
49384
|
+
publicName: "label",
|
|
49385
|
+
isSignal: true,
|
|
49386
|
+
isRequired: false,
|
|
49387
|
+
transformFunction: null
|
|
49388
|
+
}
|
|
49389
|
+
},
|
|
49390
|
+
host: { listeners: {
|
|
49391
|
+
"document:keydown.escape": "onEscape()",
|
|
49392
|
+
"document:click": "onDocumentClick($event)",
|
|
49393
|
+
"focusout": "onFocusOut($event)"
|
|
49394
|
+
} },
|
|
49395
|
+
viewQueries: [{
|
|
49396
|
+
propertyName: "trigger",
|
|
49397
|
+
first: true,
|
|
49398
|
+
predicate: ["trigger"],
|
|
49399
|
+
descendants: true,
|
|
49400
|
+
isSignal: true
|
|
49401
|
+
}, {
|
|
49402
|
+
propertyName: "panel",
|
|
49403
|
+
first: true,
|
|
49404
|
+
predicate: ["panel"],
|
|
49405
|
+
descendants: true,
|
|
49406
|
+
isSignal: true
|
|
49407
|
+
}],
|
|
49408
|
+
ngImport: i0,
|
|
49409
|
+
template: `
|
|
49410
|
+
<div class="share-wrap">
|
|
49411
|
+
<button
|
|
49412
|
+
#trigger
|
|
49413
|
+
type="button"
|
|
49414
|
+
class="share-trigger"
|
|
49415
|
+
data-testid="share-trigger"
|
|
49416
|
+
[attr.aria-label]="'Share ' + label()"
|
|
49417
|
+
[attr.aria-expanded]="open()"
|
|
49418
|
+
[attr.aria-controls]="open() ? panelId : null"
|
|
49419
|
+
(click)="toggle($event)"
|
|
49420
|
+
>
|
|
49421
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
49422
|
+
<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/>
|
|
49423
|
+
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
|
|
49424
|
+
</svg>
|
|
49425
|
+
Share
|
|
49426
|
+
</button>
|
|
49427
|
+
|
|
49428
|
+
@if (open()) {
|
|
49429
|
+
<div
|
|
49430
|
+
#panel
|
|
49431
|
+
[id]="panelId"
|
|
49432
|
+
class="share-panel"
|
|
49433
|
+
role="group"
|
|
49434
|
+
aria-label="Share options"
|
|
49435
|
+
data-testid="share-panel"
|
|
49436
|
+
[style.transform]="'translateX(' + shiftX() + 'px)'"
|
|
49437
|
+
(keydown)="onPanelKeydown($event)"
|
|
49438
|
+
>
|
|
49439
|
+
@for (tile of tiles(); track tile.value) {
|
|
49440
|
+
<button type="button" class="share-tile" [attr.data-testid]="'share-' + tile.value" (click)="choose(tile.value)">
|
|
49441
|
+
<span class="share-icon" [style.background]="tile.background" aria-hidden="true">
|
|
49442
|
+
@switch (tile.value) {
|
|
49443
|
+
@case ('facebook') {
|
|
49444
|
+
<svg width="26" height="26" viewBox="0 0 24 24" fill="currentColor"><path d="M13.5 21v-7.5h2.6l.4-3h-3V8.6c0-.9.3-1.5 1.6-1.5h1.5V4.4c-.3 0-1.2-.1-2.3-.1-2.3 0-3.8 1.4-3.8 3.9v2.3H8v3h2.5V21h3z"/></svg>
|
|
49445
|
+
}
|
|
49446
|
+
@case ('x') {
|
|
49447
|
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor"><path d="M17.8 3h3.1l-6.8 7.7L22 21h-6.2l-4.9-6.4L5.3 21H2.2l7.3-8.3L2 3h6.4l4.4 5.8L17.8 3zm-1.1 16.2h1.7L7.3 4.7H5.5l11.2 14.5z"/></svg>
|
|
49448
|
+
}
|
|
49449
|
+
@case ('linkedin') {
|
|
49450
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M6.9 8.9H3.6V20h3.3V8.9zM5.2 3.5a1.9 1.9 0 100 3.8 1.9 1.9 0 000-3.8zM20.4 13.4c0-3-1.6-4.7-4.1-4.7-1.2 0-2.2.6-2.7 1.4V8.9h-3.2V20h3.3v-6c0-1.4.7-2.4 1.9-2.4s1.5 1 1.5 2.4V20h3.3v-6.6z"/></svg>
|
|
49451
|
+
}
|
|
49452
|
+
@case ('email') {
|
|
49453
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
|
|
49454
|
+
}
|
|
49455
|
+
@case ('gmail') {
|
|
49456
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
|
|
49457
|
+
}
|
|
49458
|
+
@case ('outlook') {
|
|
49459
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
|
|
49460
|
+
}
|
|
49461
|
+
@case ('copy') {
|
|
49462
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 007.1 0l3-3a5 5 0 00-7.1-7.1l-1.7 1.7"/><path d="M14 11a5 5 0 00-7.1 0l-3 3A5 5 0 0011 21l1.7-1.7"/></svg>
|
|
49463
|
+
}
|
|
49464
|
+
@case ('native') {
|
|
49465
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="19" cy="12" r="2"/></svg>
|
|
49466
|
+
}
|
|
49467
|
+
}
|
|
49468
|
+
</span>
|
|
49469
|
+
<span class="share-name">{{ tile.label }}</span>
|
|
49470
|
+
</button>
|
|
49471
|
+
}
|
|
49472
|
+
</div>
|
|
49473
|
+
}
|
|
49474
|
+
</div>
|
|
49475
|
+
<ui-toast />
|
|
49476
|
+
`,
|
|
49477
|
+
isInline: true,
|
|
49478
|
+
styles: [":host{display:inline-block}.share-wrap{position:relative}.share-trigger{display:inline-flex;align-items:center;gap:.4rem;min-height:2.25rem;padding:.35rem .95rem;border:1px solid #d6d3d1;border-radius:9999px;background:#fff;color:#44403c;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-trigger:hover{border-color:#a8a29e;background:#fafaf9}.share-trigger[aria-expanded=true]{border-color:#78716c;background:#f5f5f4}.share-trigger:focus-visible,.share-tile:focus-visible{outline:2px solid var(--ui-share-accent, var(--primary, #2563eb));outline-offset:2px}@media(pointer:coarse){.share-trigger{min-height:2.75rem}}.share-panel{position:absolute;top:calc(100% + 8px);left:0;z-index:50;display:flex;align-items:flex-start;gap:4px;padding:14px 12px 10px;width:max-content;max-width:calc(100vw - 16px);overflow-x:auto;-webkit-overflow-scrolling:touch;background:#fff;border:1px solid #e7e5e4;border-radius:16px;box-shadow:0 10px 30px #1c19172e}.share-tile{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none;width:64px;padding:2px 0;border:0;background:none;border-radius:10px;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:9999px;color:#fff;transition:transform .12s ease,box-shadow .12s ease}.share-tile:hover .share-icon{transform:translateY(-2px);box-shadow:0 4px 10px #1c191740}.share-name{font-size:.75rem;line-height:1.1;font-weight:500;color:#57534e;text-align:center}@media(max-width:480px){.share-panel{padding:12px 8px 8px;gap:2px}.share-tile{width:auto;min-width:48px;padding:2px 1px}.share-icon{width:44px;height:44px}.share-name{white-space:nowrap;font-size:.8125rem}}@media(prefers-reduced-motion:reduce){.share-icon{transition:none}.share-tile:hover .share-icon{transform:none}}\n"],
|
|
49479
|
+
dependencies: [{
|
|
49480
|
+
kind: "component",
|
|
49481
|
+
type: ToastComponent,
|
|
49482
|
+
selector: "ui-toast",
|
|
49483
|
+
inputs: ["dismissible", "persistentLiveRegion"]
|
|
49484
|
+
}],
|
|
49485
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
49486
|
+
});
|
|
49487
|
+
}
|
|
49488
|
+
};
|
|
49489
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
49490
|
+
minVersion: "12.0.0",
|
|
49491
|
+
version: "22.2.2",
|
|
49492
|
+
ngImport: i0,
|
|
49493
|
+
type: ShareMenuComponent,
|
|
49494
|
+
decorators: [{
|
|
49495
|
+
type: Component,
|
|
49496
|
+
args: [{
|
|
49497
|
+
selector: "ui-share-menu",
|
|
49498
|
+
standalone: true,
|
|
49499
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
49500
|
+
imports: [ToastComponent],
|
|
49501
|
+
host: {
|
|
49502
|
+
"(document:keydown.escape)": "onEscape()",
|
|
49503
|
+
"(document:click)": "onDocumentClick($event)",
|
|
49504
|
+
"(focusout)": "onFocusOut($event)"
|
|
49505
|
+
},
|
|
49506
|
+
template: `
|
|
49507
|
+
<div class="share-wrap">
|
|
49508
|
+
<button
|
|
49509
|
+
#trigger
|
|
49510
|
+
type="button"
|
|
49511
|
+
class="share-trigger"
|
|
49512
|
+
data-testid="share-trigger"
|
|
49513
|
+
[attr.aria-label]="'Share ' + label()"
|
|
49514
|
+
[attr.aria-expanded]="open()"
|
|
49515
|
+
[attr.aria-controls]="open() ? panelId : null"
|
|
49516
|
+
(click)="toggle($event)"
|
|
49517
|
+
>
|
|
49518
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
49519
|
+
<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/>
|
|
49520
|
+
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"/><line x1="15.41" y1="6.51" x2="8.59" y2="10.49"/>
|
|
49521
|
+
</svg>
|
|
49522
|
+
Share
|
|
49523
|
+
</button>
|
|
49524
|
+
|
|
49525
|
+
@if (open()) {
|
|
49526
|
+
<div
|
|
49527
|
+
#panel
|
|
49528
|
+
[id]="panelId"
|
|
49529
|
+
class="share-panel"
|
|
49530
|
+
role="group"
|
|
49531
|
+
aria-label="Share options"
|
|
49532
|
+
data-testid="share-panel"
|
|
49533
|
+
[style.transform]="'translateX(' + shiftX() + 'px)'"
|
|
49534
|
+
(keydown)="onPanelKeydown($event)"
|
|
49535
|
+
>
|
|
49536
|
+
@for (tile of tiles(); track tile.value) {
|
|
49537
|
+
<button type="button" class="share-tile" [attr.data-testid]="'share-' + tile.value" (click)="choose(tile.value)">
|
|
49538
|
+
<span class="share-icon" [style.background]="tile.background" aria-hidden="true">
|
|
49539
|
+
@switch (tile.value) {
|
|
49540
|
+
@case ('facebook') {
|
|
49541
|
+
<svg width="26" height="26" viewBox="0 0 24 24" fill="currentColor"><path d="M13.5 21v-7.5h2.6l.4-3h-3V8.6c0-.9.3-1.5 1.6-1.5h1.5V4.4c-.3 0-1.2-.1-2.3-.1-2.3 0-3.8 1.4-3.8 3.9v2.3H8v3h2.5V21h3z"/></svg>
|
|
49542
|
+
}
|
|
49543
|
+
@case ('x') {
|
|
49544
|
+
<svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor"><path d="M17.8 3h3.1l-6.8 7.7L22 21h-6.2l-4.9-6.4L5.3 21H2.2l7.3-8.3L2 3h6.4l4.4 5.8L17.8 3zm-1.1 16.2h1.7L7.3 4.7H5.5l11.2 14.5z"/></svg>
|
|
49545
|
+
}
|
|
49546
|
+
@case ('linkedin') {
|
|
49547
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><path d="M6.9 8.9H3.6V20h3.3V8.9zM5.2 3.5a1.9 1.9 0 100 3.8 1.9 1.9 0 000-3.8zM20.4 13.4c0-3-1.6-4.7-4.1-4.7-1.2 0-2.2.6-2.7 1.4V8.9h-3.2V20h3.3v-6c0-1.4.7-2.4 1.9-2.4s1.5 1 1.5 2.4V20h3.3v-6.6z"/></svg>
|
|
49548
|
+
}
|
|
49549
|
+
@case ('email') {
|
|
49550
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
|
|
49551
|
+
}
|
|
49552
|
+
@case ('gmail') {
|
|
49553
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
|
|
49554
|
+
}
|
|
49555
|
+
@case ('outlook') {
|
|
49556
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
|
|
49557
|
+
}
|
|
49558
|
+
@case ('copy') {
|
|
49559
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 007.1 0l3-3a5 5 0 00-7.1-7.1l-1.7 1.7"/><path d="M14 11a5 5 0 00-7.1 0l-3 3A5 5 0 0011 21l1.7-1.7"/></svg>
|
|
49560
|
+
}
|
|
49561
|
+
@case ('native') {
|
|
49562
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor"><circle cx="5" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="19" cy="12" r="2"/></svg>
|
|
49563
|
+
}
|
|
49564
|
+
}
|
|
49565
|
+
</span>
|
|
49566
|
+
<span class="share-name">{{ tile.label }}</span>
|
|
49567
|
+
</button>
|
|
49568
|
+
}
|
|
49569
|
+
</div>
|
|
49570
|
+
}
|
|
49571
|
+
</div>
|
|
49572
|
+
<ui-toast />
|
|
49573
|
+
`,
|
|
49574
|
+
styles: [":host{display:inline-block}.share-wrap{position:relative}.share-trigger{display:inline-flex;align-items:center;gap:.4rem;min-height:2.25rem;padding:.35rem .95rem;border:1px solid #d6d3d1;border-radius:9999px;background:#fff;color:#44403c;font-size:.875rem;font-weight:600;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-trigger:hover{border-color:#a8a29e;background:#fafaf9}.share-trigger[aria-expanded=true]{border-color:#78716c;background:#f5f5f4}.share-trigger:focus-visible,.share-tile:focus-visible{outline:2px solid var(--ui-share-accent, var(--primary, #2563eb));outline-offset:2px}@media(pointer:coarse){.share-trigger{min-height:2.75rem}}.share-panel{position:absolute;top:calc(100% + 8px);left:0;z-index:50;display:flex;align-items:flex-start;gap:4px;padding:14px 12px 10px;width:max-content;max-width:calc(100vw - 16px);overflow-x:auto;-webkit-overflow-scrolling:touch;background:#fff;border:1px solid #e7e5e4;border-radius:16px;box-shadow:0 10px 30px #1c19172e}.share-tile{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none;width:64px;padding:2px 0;border:0;background:none;border-radius:10px;font-family:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.share-icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:9999px;color:#fff;transition:transform .12s ease,box-shadow .12s ease}.share-tile:hover .share-icon{transform:translateY(-2px);box-shadow:0 4px 10px #1c191740}.share-name{font-size:.75rem;line-height:1.1;font-weight:500;color:#57534e;text-align:center}@media(max-width:480px){.share-panel{padding:12px 8px 8px;gap:2px}.share-tile{width:auto;min-width:48px;padding:2px 1px}.share-icon{width:44px;height:44px}.share-name{white-space:nowrap;font-size:.8125rem}}@media(prefers-reduced-motion:reduce){.share-icon{transition:none}.share-tile:hover .share-icon{transform:none}}\n"]
|
|
49575
|
+
}]
|
|
49576
|
+
}],
|
|
49577
|
+
propDecorators: {
|
|
49578
|
+
url: [{
|
|
49579
|
+
type: i0.Input,
|
|
49580
|
+
args: [{
|
|
49581
|
+
isSignal: true,
|
|
49582
|
+
alias: "url",
|
|
49583
|
+
required: true
|
|
49584
|
+
}]
|
|
49585
|
+
}],
|
|
49586
|
+
title: [{
|
|
49587
|
+
type: i0.Input,
|
|
49588
|
+
args: [{
|
|
49589
|
+
isSignal: true,
|
|
49590
|
+
alias: "title",
|
|
49591
|
+
required: true
|
|
49592
|
+
}]
|
|
49593
|
+
}],
|
|
49594
|
+
label: [{
|
|
49595
|
+
type: i0.Input,
|
|
49596
|
+
args: [{
|
|
49597
|
+
isSignal: true,
|
|
49598
|
+
alias: "label",
|
|
49599
|
+
required: false
|
|
49600
|
+
}]
|
|
49601
|
+
}],
|
|
49602
|
+
trigger: [{
|
|
49603
|
+
type: i0.ViewChild,
|
|
49604
|
+
args: ["trigger", { isSignal: true }]
|
|
49605
|
+
}],
|
|
49606
|
+
panel: [{
|
|
49607
|
+
type: i0.ViewChild,
|
|
49608
|
+
args: ["panel", { isSignal: true }]
|
|
49609
|
+
}]
|
|
49610
|
+
}
|
|
49611
|
+
});
|
|
49612
|
+
var SnackbarService = class SnackbarService {
|
|
49613
|
+
constructor() {
|
|
49614
|
+
this._messages = signal([], ...ngDevMode ? [{ debugName: "_messages" }] : /* istanbul ignore next */ []);
|
|
49615
|
+
this.nextId = 0;
|
|
49616
|
+
this.timers = /* @__PURE__ */ new Map();
|
|
49617
|
+
}
|
|
49618
|
+
messages$() {
|
|
49619
|
+
return [...this._messages()];
|
|
49620
|
+
}
|
|
49621
|
+
showSuccess(message, duration = 5e3) {
|
|
49622
|
+
this.show(message, "success", duration);
|
|
49623
|
+
}
|
|
49624
|
+
showError(message, duration = 5e3) {
|
|
49625
|
+
this.show(message, "error", duration);
|
|
49626
|
+
}
|
|
49627
|
+
showInfo(message, duration = 5e3, action) {
|
|
49628
|
+
this.show(message, "info", duration, action);
|
|
49629
|
+
}
|
|
49630
|
+
show(message, type, duration, action) {
|
|
49631
|
+
const id = this.nextId++;
|
|
49632
|
+
this._messages.update((messages) => [...messages, {
|
|
49633
|
+
id,
|
|
49634
|
+
message,
|
|
49635
|
+
type,
|
|
49636
|
+
action
|
|
49637
|
+
}]);
|
|
49638
|
+
if (duration > 0) this.timers.set(id, setTimeout(() => this.dismiss(id), duration));
|
|
49639
|
+
}
|
|
49640
|
+
dismiss(id) {
|
|
49641
|
+
const timer = this.timers.get(id);
|
|
49642
|
+
if (timer) {
|
|
49643
|
+
clearTimeout(timer);
|
|
49644
|
+
this.timers.delete(id);
|
|
49645
|
+
}
|
|
49646
|
+
this._messages.update((messages) => messages.filter((m) => m.id !== id));
|
|
49647
|
+
}
|
|
49648
|
+
static {
|
|
49649
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
49650
|
+
minVersion: "12.0.0",
|
|
49651
|
+
version: "22.2.2",
|
|
49652
|
+
ngImport: i0,
|
|
49653
|
+
type: SnackbarService,
|
|
49654
|
+
deps: [],
|
|
49655
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
49656
|
+
});
|
|
49657
|
+
}
|
|
49658
|
+
static {
|
|
49659
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
49660
|
+
minVersion: "12.0.0",
|
|
49661
|
+
version: "22.2.2",
|
|
49662
|
+
ngImport: i0,
|
|
49663
|
+
type: SnackbarService,
|
|
49664
|
+
providedIn: "root"
|
|
49665
|
+
});
|
|
49666
|
+
}
|
|
49667
|
+
};
|
|
49668
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
49669
|
+
minVersion: "12.0.0",
|
|
49670
|
+
version: "22.2.2",
|
|
49671
|
+
ngImport: i0,
|
|
49672
|
+
type: SnackbarService,
|
|
49673
|
+
decorators: [{
|
|
49674
|
+
type: Injectable,
|
|
49675
|
+
args: [{ providedIn: "root" }]
|
|
49676
|
+
}]
|
|
49677
|
+
});
|
|
49678
|
+
var SnackbarComponent = class SnackbarComponent {
|
|
49679
|
+
constructor() {
|
|
49680
|
+
this.service = inject(SnackbarService);
|
|
49681
|
+
this.messages = computed(() => this.service.messages$(), ...ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []);
|
|
49682
|
+
}
|
|
49683
|
+
variant(m) {
|
|
49684
|
+
return m.type === "error" ? "danger" : m.type;
|
|
49685
|
+
}
|
|
49686
|
+
dismiss(id) {
|
|
49687
|
+
this.service.dismiss(id);
|
|
49688
|
+
}
|
|
49689
|
+
runAction(m, callback) {
|
|
49690
|
+
callback();
|
|
49691
|
+
this.service.dismiss(m.id);
|
|
49692
|
+
}
|
|
49693
|
+
static {
|
|
49694
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
49695
|
+
minVersion: "12.0.0",
|
|
49696
|
+
version: "22.2.2",
|
|
49697
|
+
ngImport: i0,
|
|
49698
|
+
type: SnackbarComponent,
|
|
49699
|
+
deps: [],
|
|
49700
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
49701
|
+
});
|
|
49702
|
+
}
|
|
49703
|
+
static {
|
|
49704
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
49705
|
+
minVersion: "17.0.0",
|
|
49706
|
+
version: "22.2.2",
|
|
49707
|
+
type: SnackbarComponent,
|
|
49708
|
+
isStandalone: true,
|
|
49709
|
+
selector: "ui-snackbar",
|
|
49710
|
+
ngImport: i0,
|
|
49711
|
+
template: `
|
|
49712
|
+
<div class="sb-stack" role="region" aria-label="Notifications" aria-live="polite">
|
|
49713
|
+
@for (m of messages(); track m.id) {
|
|
49714
|
+
<ui-alert class="sb-item" [variant]="variant(m)" [dismissible]="true" dismissAriaLabel="Dismiss notification"
|
|
49715
|
+
[attr.data-testid]="m.type + '-message'" (dismissed)="dismiss(m.id)">
|
|
49716
|
+
<span class="sb-text">{{ m.message }}</span>
|
|
49717
|
+
@if (m.action; as act) {
|
|
49718
|
+
<ui-button variant="link" size="sm" data-testid="snackbar-action" (click)="runAction(m, act.callback)">{{ act.label }}</ui-button>
|
|
49719
|
+
}
|
|
49720
|
+
</ui-alert>
|
|
49721
|
+
}
|
|
49722
|
+
</div>
|
|
49723
|
+
`,
|
|
49724
|
+
isInline: true,
|
|
49725
|
+
styles: [":host{display:contents}.sb-stack{position:fixed;top:16px;right:16px;z-index:9999;display:flex;flex-direction:column;gap:8px;width:20rem;max-width:calc(100vw - 32px);pointer-events:none}.sb-item{pointer-events:auto;box-shadow:0 8px 20px #0f172a2e;border-radius:8px;animation:sb-in .28s cubic-bezier(.16,1,.3,1)}.sb-text{min-width:0;overflow-wrap:anywhere}@keyframes sb-in{0%{opacity:0;transform:translate(24px)}to{opacity:1;transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sb-item{animation:none}}\n"],
|
|
49726
|
+
dependencies: [{
|
|
49727
|
+
kind: "component",
|
|
49728
|
+
type: AlertComponent,
|
|
49729
|
+
selector: "ui-alert",
|
|
49730
|
+
inputs: [
|
|
49731
|
+
"variant",
|
|
49732
|
+
"title",
|
|
49733
|
+
"dismissible",
|
|
49734
|
+
"dismissAriaLabel",
|
|
49735
|
+
"quiet",
|
|
49736
|
+
"compact",
|
|
49737
|
+
"inline",
|
|
49738
|
+
"fill"
|
|
49739
|
+
],
|
|
49740
|
+
outputs: ["dismissed"]
|
|
49741
|
+
}, {
|
|
49742
|
+
kind: "component",
|
|
49743
|
+
type: ButtonComponent,
|
|
49744
|
+
selector: "ui-button",
|
|
49745
|
+
inputs: [
|
|
49746
|
+
"variant",
|
|
49747
|
+
"routerLink",
|
|
49748
|
+
"queryParams",
|
|
49749
|
+
"fragment",
|
|
49750
|
+
"state",
|
|
49751
|
+
"href",
|
|
49752
|
+
"target",
|
|
49753
|
+
"rel",
|
|
49754
|
+
"shortLabel",
|
|
49755
|
+
"shortBelow",
|
|
49756
|
+
"color",
|
|
49757
|
+
"active",
|
|
49758
|
+
"size",
|
|
49759
|
+
"type",
|
|
49760
|
+
"disabled",
|
|
49761
|
+
"loading",
|
|
49762
|
+
"fullWidth",
|
|
49763
|
+
"ariaLabel",
|
|
49764
|
+
"ariaExpanded",
|
|
49765
|
+
"ariaPressed",
|
|
49766
|
+
"ariaDescribedBy",
|
|
49767
|
+
"modal-footer-left",
|
|
49768
|
+
"modal-footer-right"
|
|
49769
|
+
]
|
|
49770
|
+
}],
|
|
49771
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
49772
|
+
});
|
|
49773
|
+
}
|
|
49774
|
+
};
|
|
49775
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
49776
|
+
minVersion: "12.0.0",
|
|
49777
|
+
version: "22.2.2",
|
|
49778
|
+
ngImport: i0,
|
|
49779
|
+
type: SnackbarComponent,
|
|
49780
|
+
decorators: [{
|
|
49781
|
+
type: Component,
|
|
49782
|
+
args: [{
|
|
49783
|
+
selector: "ui-snackbar",
|
|
49784
|
+
standalone: true,
|
|
49785
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
49786
|
+
imports: [AlertComponent, ButtonComponent],
|
|
49787
|
+
template: `
|
|
49788
|
+
<div class="sb-stack" role="region" aria-label="Notifications" aria-live="polite">
|
|
49789
|
+
@for (m of messages(); track m.id) {
|
|
49790
|
+
<ui-alert class="sb-item" [variant]="variant(m)" [dismissible]="true" dismissAriaLabel="Dismiss notification"
|
|
49791
|
+
[attr.data-testid]="m.type + '-message'" (dismissed)="dismiss(m.id)">
|
|
49792
|
+
<span class="sb-text">{{ m.message }}</span>
|
|
49793
|
+
@if (m.action; as act) {
|
|
49794
|
+
<ui-button variant="link" size="sm" data-testid="snackbar-action" (click)="runAction(m, act.callback)">{{ act.label }}</ui-button>
|
|
49795
|
+
}
|
|
49796
|
+
</ui-alert>
|
|
49797
|
+
}
|
|
49798
|
+
</div>
|
|
49799
|
+
`,
|
|
49800
|
+
styles: [":host{display:contents}.sb-stack{position:fixed;top:16px;right:16px;z-index:9999;display:flex;flex-direction:column;gap:8px;width:20rem;max-width:calc(100vw - 32px);pointer-events:none}.sb-item{pointer-events:auto;box-shadow:0 8px 20px #0f172a2e;border-radius:8px;animation:sb-in .28s cubic-bezier(.16,1,.3,1)}.sb-text{min-width:0;overflow-wrap:anywhere}@keyframes sb-in{0%{opacity:0;transform:translate(24px)}to{opacity:1;transform:translate(0)}}@media(prefers-reduced-motion:reduce){.sb-item{animation:none}}\n"]
|
|
49801
|
+
}]
|
|
49802
|
+
}]
|
|
49803
|
+
});
|
|
49804
|
+
var OfflineBannerComponent = class OfflineBannerComponent {
|
|
49805
|
+
constructor() {
|
|
49806
|
+
this.title = input("You are currently offline", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
|
|
49807
|
+
this.message = input("Some features may not work properly. Please check your internet connection.", ...ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []);
|
|
49808
|
+
this.offline = input(null, ...ngDevMode ? [{ debugName: "offline" }] : /* istanbul ignore next */ []);
|
|
49809
|
+
this.browserOffline = signal(false, ...ngDevMode ? [{ debugName: "browserOffline" }] : /* istanbul ignore next */ []);
|
|
49810
|
+
this.dismissed = signal(false, ...ngDevMode ? [{ debugName: "dismissed" }] : /* istanbul ignore next */ []);
|
|
49811
|
+
this.isOffline = computed(() => this.offline() ?? this.browserOffline(), ...ngDevMode ? [{ debugName: "isOffline" }] : /* istanbul ignore next */ []);
|
|
49812
|
+
this.visible = computed(() => this.isOffline() && !this.dismissed(), ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
|
|
49813
|
+
const win = inject(DOCUMENT).defaultView;
|
|
49814
|
+
if (!win) return;
|
|
49815
|
+
this.browserOffline.set(win.navigator.onLine === false);
|
|
49816
|
+
const goOffline = () => this.browserOffline.set(true);
|
|
49817
|
+
const goOnline = () => {
|
|
49818
|
+
this.browserOffline.set(false);
|
|
49819
|
+
this.dismissed.set(false);
|
|
49820
|
+
};
|
|
49821
|
+
win.addEventListener("offline", goOffline);
|
|
49822
|
+
win.addEventListener("online", goOnline);
|
|
49823
|
+
inject(DestroyRef).onDestroy(() => {
|
|
49824
|
+
win.removeEventListener("offline", goOffline);
|
|
49825
|
+
win.removeEventListener("online", goOnline);
|
|
49826
|
+
});
|
|
49827
|
+
}
|
|
49828
|
+
dismiss() {
|
|
49829
|
+
this.dismissed.set(true);
|
|
49830
|
+
}
|
|
49831
|
+
static {
|
|
49832
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
49833
|
+
minVersion: "12.0.0",
|
|
49834
|
+
version: "22.2.2",
|
|
49835
|
+
ngImport: i0,
|
|
49836
|
+
type: OfflineBannerComponent,
|
|
49837
|
+
deps: [],
|
|
49838
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
49839
|
+
});
|
|
49840
|
+
}
|
|
49841
|
+
static {
|
|
49842
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
49843
|
+
minVersion: "17.0.0",
|
|
49844
|
+
version: "22.2.2",
|
|
49845
|
+
type: OfflineBannerComponent,
|
|
49846
|
+
isStandalone: true,
|
|
49847
|
+
selector: "ui-offline-banner",
|
|
49848
|
+
inputs: {
|
|
49849
|
+
title: {
|
|
49850
|
+
classPropertyName: "title",
|
|
49851
|
+
publicName: "title",
|
|
49852
|
+
isSignal: true,
|
|
49853
|
+
isRequired: false,
|
|
49854
|
+
transformFunction: null
|
|
49855
|
+
},
|
|
49856
|
+
message: {
|
|
49857
|
+
classPropertyName: "message",
|
|
49858
|
+
publicName: "message",
|
|
49859
|
+
isSignal: true,
|
|
49860
|
+
isRequired: false,
|
|
49861
|
+
transformFunction: null
|
|
49862
|
+
},
|
|
49863
|
+
offline: {
|
|
49864
|
+
classPropertyName: "offline",
|
|
49865
|
+
publicName: "offline",
|
|
49866
|
+
isSignal: true,
|
|
49867
|
+
isRequired: false,
|
|
49868
|
+
transformFunction: null
|
|
49869
|
+
}
|
|
49870
|
+
},
|
|
49871
|
+
ngImport: i0,
|
|
49872
|
+
template: `
|
|
49873
|
+
@if (visible()) {
|
|
49874
|
+
<div class="ob-bar" data-testid="offline-banner">
|
|
49875
|
+
<ui-alert variant="warning" [title]="title()" [dismissible]="true" dismissAriaLabel="Dismiss offline notification" (dismissed)="dismiss()">{{ message() }}</ui-alert>
|
|
49876
|
+
</div>
|
|
49877
|
+
}
|
|
49878
|
+
`,
|
|
49879
|
+
isInline: true,
|
|
49880
|
+
styles: [":host{display:contents}.ob-bar{position:fixed;top:0;left:0;right:0;z-index:9999;padding:8px 16px;pointer-events:none}.ob-bar ui-alert{pointer-events:auto;max-width:1200px;margin:0 auto;box-shadow:0 4px 12px #0f172a26;border-radius:8px}\n"],
|
|
49881
|
+
dependencies: [{
|
|
49882
|
+
kind: "component",
|
|
49883
|
+
type: AlertComponent,
|
|
49884
|
+
selector: "ui-alert",
|
|
49885
|
+
inputs: [
|
|
49886
|
+
"variant",
|
|
49887
|
+
"title",
|
|
49888
|
+
"dismissible",
|
|
49889
|
+
"dismissAriaLabel",
|
|
49890
|
+
"quiet",
|
|
49891
|
+
"compact",
|
|
49892
|
+
"inline",
|
|
49893
|
+
"fill"
|
|
49894
|
+
],
|
|
49895
|
+
outputs: ["dismissed"]
|
|
49896
|
+
}],
|
|
49897
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
49898
|
+
});
|
|
49899
|
+
}
|
|
49900
|
+
};
|
|
49901
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
49902
|
+
minVersion: "12.0.0",
|
|
49903
|
+
version: "22.2.2",
|
|
49904
|
+
ngImport: i0,
|
|
49905
|
+
type: OfflineBannerComponent,
|
|
49906
|
+
decorators: [{
|
|
49907
|
+
type: Component,
|
|
49908
|
+
args: [{
|
|
49909
|
+
selector: "ui-offline-banner",
|
|
49910
|
+
standalone: true,
|
|
49911
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
49912
|
+
imports: [AlertComponent],
|
|
49913
|
+
template: `
|
|
49914
|
+
@if (visible()) {
|
|
49915
|
+
<div class="ob-bar" data-testid="offline-banner">
|
|
49916
|
+
<ui-alert variant="warning" [title]="title()" [dismissible]="true" dismissAriaLabel="Dismiss offline notification" (dismissed)="dismiss()">{{ message() }}</ui-alert>
|
|
49917
|
+
</div>
|
|
49918
|
+
}
|
|
49919
|
+
`,
|
|
49920
|
+
styles: [":host{display:contents}.ob-bar{position:fixed;top:0;left:0;right:0;z-index:9999;padding:8px 16px;pointer-events:none}.ob-bar ui-alert{pointer-events:auto;max-width:1200px;margin:0 auto;box-shadow:0 4px 12px #0f172a26;border-radius:8px}\n"]
|
|
49921
|
+
}]
|
|
49922
|
+
}],
|
|
49923
|
+
ctorParameters: () => [],
|
|
49924
|
+
propDecorators: {
|
|
49925
|
+
title: [{
|
|
49926
|
+
type: i0.Input,
|
|
49927
|
+
args: [{
|
|
49928
|
+
isSignal: true,
|
|
49929
|
+
alias: "title",
|
|
49930
|
+
required: false
|
|
49931
|
+
}]
|
|
49932
|
+
}],
|
|
49933
|
+
message: [{
|
|
49934
|
+
type: i0.Input,
|
|
49935
|
+
args: [{
|
|
49936
|
+
isSignal: true,
|
|
49937
|
+
alias: "message",
|
|
49938
|
+
required: false
|
|
49939
|
+
}]
|
|
49940
|
+
}],
|
|
49941
|
+
offline: [{
|
|
49942
|
+
type: i0.Input,
|
|
49943
|
+
args: [{
|
|
49944
|
+
isSignal: true,
|
|
49945
|
+
alias: "offline",
|
|
49946
|
+
required: false
|
|
49947
|
+
}]
|
|
49948
|
+
}]
|
|
49949
|
+
}
|
|
49950
|
+
});
|
|
49951
|
+
var ReminderAlertsComponent = class ReminderAlertsComponent {
|
|
49952
|
+
constructor() {
|
|
49953
|
+
this.items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
|
|
49954
|
+
this.ariaLabel = input("Alerts", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
49955
|
+
this.action = output();
|
|
49956
|
+
this.hidden = output();
|
|
49957
|
+
}
|
|
49958
|
+
variant(item) {
|
|
49959
|
+
return item.tone;
|
|
49960
|
+
}
|
|
49961
|
+
static {
|
|
49962
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
49963
|
+
minVersion: "12.0.0",
|
|
49964
|
+
version: "22.2.2",
|
|
49965
|
+
ngImport: i0,
|
|
49966
|
+
type: ReminderAlertsComponent,
|
|
49967
|
+
deps: [],
|
|
49968
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
49969
|
+
});
|
|
49970
|
+
}
|
|
49971
|
+
static {
|
|
49972
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
49973
|
+
minVersion: "17.0.0",
|
|
49974
|
+
version: "22.2.2",
|
|
49975
|
+
type: ReminderAlertsComponent,
|
|
49976
|
+
isStandalone: true,
|
|
49977
|
+
selector: "ui-reminder-alerts",
|
|
49978
|
+
inputs: {
|
|
49979
|
+
items: {
|
|
49980
|
+
classPropertyName: "items",
|
|
49981
|
+
publicName: "items",
|
|
49982
|
+
isSignal: true,
|
|
49983
|
+
isRequired: false,
|
|
49984
|
+
transformFunction: null
|
|
49985
|
+
},
|
|
49986
|
+
ariaLabel: {
|
|
49987
|
+
classPropertyName: "ariaLabel",
|
|
49988
|
+
publicName: "ariaLabel",
|
|
49989
|
+
isSignal: true,
|
|
49990
|
+
isRequired: false,
|
|
49991
|
+
transformFunction: null
|
|
49992
|
+
}
|
|
49993
|
+
},
|
|
49994
|
+
outputs: {
|
|
49995
|
+
action: "action",
|
|
49996
|
+
hidden: "hidden"
|
|
49997
|
+
},
|
|
49998
|
+
ngImport: i0,
|
|
49999
|
+
template: `
|
|
50000
|
+
@if (items().length) {
|
|
50001
|
+
<div class="ra-stack" role="region" [attr.aria-label]="ariaLabel()" aria-live="polite">
|
|
50002
|
+
@for (item of items(); track item.id) {
|
|
50003
|
+
<ui-alert class="ra-item" [variant]="variant(item)" [attr.data-testid]="'reminder-alert-' + item.id">
|
|
50004
|
+
<div class="ra-body">
|
|
50005
|
+
<ui-button class="ra-hide" variant="icon" size="xs" [ariaLabel]="item.hideLabel || 'Hide alert'" [attr.data-testid]="item.hideTestId || 'alert-hide'" (click)="hidden.emit(item)">
|
|
50006
|
+
<ui-icon name="close" [size]="14" [interactive]="false" />
|
|
50007
|
+
</ui-button>
|
|
50008
|
+
<span class="ra-label">{{ item.label }}</span>
|
|
50009
|
+
<p class="ra-title">{{ item.title }}</p>
|
|
50010
|
+
@if (item.badge; as b) {
|
|
50011
|
+
<ui-badge class="ra-badge" role="img" variant="purple" [label]="b.label" [attr.aria-label]="b.ariaLabel || b.label" [attr.title]="b.ariaLabel || b.label" [attr.data-testid]="b.testId || 'alert-badge'" />
|
|
50012
|
+
}
|
|
50013
|
+
@for (line of item.lines ?? []; track $index) {
|
|
50014
|
+
<p class="ra-line">{{ line }}</p>
|
|
50015
|
+
}
|
|
50016
|
+
@if (item.actions?.length) {
|
|
50017
|
+
<div class="ra-actions">
|
|
50018
|
+
@for (a of item.actions; track a.id) {
|
|
50019
|
+
<ui-button [variant]="a.variant || 'secondary'" size="xs" [attr.data-testid]="'alert-' + a.id" (click)="action.emit({ item, actionId: a.id })">{{ a.label }}</ui-button>
|
|
50020
|
+
}
|
|
50021
|
+
</div>
|
|
50022
|
+
}
|
|
50023
|
+
</div>
|
|
50024
|
+
</ui-alert>
|
|
50025
|
+
}
|
|
50026
|
+
</div>
|
|
50027
|
+
}
|
|
50028
|
+
`,
|
|
50029
|
+
isInline: true,
|
|
50030
|
+
styles: [":host{display:contents}.ra-stack{position:fixed;top:16px;right:16px;z-index:9990;display:flex;flex-direction:column;gap:8px;width:24rem;max-width:calc(100vw - 32px);pointer-events:none}.ra-item{pointer-events:auto;box-shadow:0 8px 20px #0f172a2e;border-radius:8px;animation:ra-in .3s ease-out}.ra-body{position:relative;display:flex;flex-direction:column;gap:2px;min-width:0;width:100%;padding-right:28px}.ra-hide{position:absolute;top:-4px;right:-4px}.ra-label{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.02em}.ra-title{margin:0;font-size:.875rem;font-weight:600;overflow-wrap:anywhere}.ra-line{margin:0;font-size:.75rem;overflow-wrap:anywhere}.ra-badge{align-self:flex-start;max-width:100%;overflow:hidden}.ra-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}@keyframes ra-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@media(prefers-reduced-motion:reduce){.ra-item{animation:none}}\n"],
|
|
50031
|
+
dependencies: [
|
|
50032
|
+
{
|
|
50033
|
+
kind: "component",
|
|
50034
|
+
type: AlertComponent,
|
|
50035
|
+
selector: "ui-alert",
|
|
50036
|
+
inputs: [
|
|
50037
|
+
"variant",
|
|
50038
|
+
"title",
|
|
50039
|
+
"dismissible",
|
|
50040
|
+
"dismissAriaLabel",
|
|
50041
|
+
"quiet",
|
|
50042
|
+
"compact",
|
|
50043
|
+
"inline",
|
|
50044
|
+
"fill"
|
|
50045
|
+
],
|
|
50046
|
+
outputs: ["dismissed"]
|
|
50047
|
+
},
|
|
50048
|
+
{
|
|
50049
|
+
kind: "component",
|
|
50050
|
+
type: BadgeComponent,
|
|
50051
|
+
selector: "ui-badge",
|
|
50052
|
+
inputs: ["label", "variant"]
|
|
50053
|
+
},
|
|
50054
|
+
{
|
|
50055
|
+
kind: "component",
|
|
50056
|
+
type: ButtonComponent,
|
|
50057
|
+
selector: "ui-button",
|
|
50058
|
+
inputs: [
|
|
50059
|
+
"variant",
|
|
50060
|
+
"routerLink",
|
|
50061
|
+
"queryParams",
|
|
50062
|
+
"fragment",
|
|
50063
|
+
"state",
|
|
50064
|
+
"href",
|
|
50065
|
+
"target",
|
|
50066
|
+
"rel",
|
|
50067
|
+
"shortLabel",
|
|
50068
|
+
"shortBelow",
|
|
50069
|
+
"color",
|
|
50070
|
+
"active",
|
|
50071
|
+
"size",
|
|
50072
|
+
"type",
|
|
50073
|
+
"disabled",
|
|
50074
|
+
"loading",
|
|
50075
|
+
"fullWidth",
|
|
50076
|
+
"ariaLabel",
|
|
50077
|
+
"ariaExpanded",
|
|
50078
|
+
"ariaPressed",
|
|
50079
|
+
"ariaDescribedBy",
|
|
50080
|
+
"modal-footer-left",
|
|
50081
|
+
"modal-footer-right"
|
|
50082
|
+
]
|
|
50083
|
+
},
|
|
50084
|
+
{
|
|
50085
|
+
kind: "component",
|
|
50086
|
+
type: IconComponent,
|
|
50087
|
+
selector: "ui-icon",
|
|
50088
|
+
inputs: [
|
|
50089
|
+
"name",
|
|
50090
|
+
"tooltip",
|
|
50091
|
+
"ariaLabel",
|
|
50092
|
+
"size",
|
|
50093
|
+
"variant",
|
|
50094
|
+
"disabled",
|
|
50095
|
+
"loading",
|
|
50096
|
+
"interactive"
|
|
50097
|
+
],
|
|
50098
|
+
outputs: ["iconClick"]
|
|
50099
|
+
}
|
|
50100
|
+
],
|
|
50101
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
50102
|
+
});
|
|
50103
|
+
}
|
|
50104
|
+
};
|
|
50105
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
50106
|
+
minVersion: "12.0.0",
|
|
50107
|
+
version: "22.2.2",
|
|
50108
|
+
ngImport: i0,
|
|
50109
|
+
type: ReminderAlertsComponent,
|
|
50110
|
+
decorators: [{
|
|
50111
|
+
type: Component,
|
|
50112
|
+
args: [{
|
|
50113
|
+
selector: "ui-reminder-alerts",
|
|
50114
|
+
standalone: true,
|
|
50115
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50116
|
+
imports: [
|
|
50117
|
+
AlertComponent,
|
|
50118
|
+
BadgeComponent,
|
|
50119
|
+
ButtonComponent,
|
|
50120
|
+
IconComponent
|
|
50121
|
+
],
|
|
50122
|
+
template: `
|
|
50123
|
+
@if (items().length) {
|
|
50124
|
+
<div class="ra-stack" role="region" [attr.aria-label]="ariaLabel()" aria-live="polite">
|
|
50125
|
+
@for (item of items(); track item.id) {
|
|
50126
|
+
<ui-alert class="ra-item" [variant]="variant(item)" [attr.data-testid]="'reminder-alert-' + item.id">
|
|
50127
|
+
<div class="ra-body">
|
|
50128
|
+
<ui-button class="ra-hide" variant="icon" size="xs" [ariaLabel]="item.hideLabel || 'Hide alert'" [attr.data-testid]="item.hideTestId || 'alert-hide'" (click)="hidden.emit(item)">
|
|
50129
|
+
<ui-icon name="close" [size]="14" [interactive]="false" />
|
|
50130
|
+
</ui-button>
|
|
50131
|
+
<span class="ra-label">{{ item.label }}</span>
|
|
50132
|
+
<p class="ra-title">{{ item.title }}</p>
|
|
50133
|
+
@if (item.badge; as b) {
|
|
50134
|
+
<ui-badge class="ra-badge" role="img" variant="purple" [label]="b.label" [attr.aria-label]="b.ariaLabel || b.label" [attr.title]="b.ariaLabel || b.label" [attr.data-testid]="b.testId || 'alert-badge'" />
|
|
50135
|
+
}
|
|
50136
|
+
@for (line of item.lines ?? []; track $index) {
|
|
50137
|
+
<p class="ra-line">{{ line }}</p>
|
|
50138
|
+
}
|
|
50139
|
+
@if (item.actions?.length) {
|
|
50140
|
+
<div class="ra-actions">
|
|
50141
|
+
@for (a of item.actions; track a.id) {
|
|
50142
|
+
<ui-button [variant]="a.variant || 'secondary'" size="xs" [attr.data-testid]="'alert-' + a.id" (click)="action.emit({ item, actionId: a.id })">{{ a.label }}</ui-button>
|
|
50143
|
+
}
|
|
50144
|
+
</div>
|
|
50145
|
+
}
|
|
50146
|
+
</div>
|
|
50147
|
+
</ui-alert>
|
|
50148
|
+
}
|
|
50149
|
+
</div>
|
|
50150
|
+
}
|
|
50151
|
+
`,
|
|
50152
|
+
styles: [":host{display:contents}.ra-stack{position:fixed;top:16px;right:16px;z-index:9990;display:flex;flex-direction:column;gap:8px;width:24rem;max-width:calc(100vw - 32px);pointer-events:none}.ra-item{pointer-events:auto;box-shadow:0 8px 20px #0f172a2e;border-radius:8px;animation:ra-in .3s ease-out}.ra-body{position:relative;display:flex;flex-direction:column;gap:2px;min-width:0;width:100%;padding-right:28px}.ra-hide{position:absolute;top:-4px;right:-4px}.ra-label{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.02em}.ra-title{margin:0;font-size:.875rem;font-weight:600;overflow-wrap:anywhere}.ra-line{margin:0;font-size:.75rem;overflow-wrap:anywhere}.ra-badge{align-self:flex-start;max-width:100%;overflow:hidden}.ra-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}@keyframes ra-in{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@media(prefers-reduced-motion:reduce){.ra-item{animation:none}}\n"]
|
|
50153
|
+
}]
|
|
50154
|
+
}],
|
|
50155
|
+
propDecorators: {
|
|
50156
|
+
items: [{
|
|
50157
|
+
type: i0.Input,
|
|
50158
|
+
args: [{
|
|
50159
|
+
isSignal: true,
|
|
50160
|
+
alias: "items",
|
|
50161
|
+
required: false
|
|
50162
|
+
}]
|
|
50163
|
+
}],
|
|
50164
|
+
ariaLabel: [{
|
|
50165
|
+
type: i0.Input,
|
|
50166
|
+
args: [{
|
|
50167
|
+
isSignal: true,
|
|
50168
|
+
alias: "ariaLabel",
|
|
50169
|
+
required: false
|
|
50170
|
+
}]
|
|
50171
|
+
}],
|
|
50172
|
+
action: [{
|
|
50173
|
+
type: i0.Output,
|
|
50174
|
+
args: ["action"]
|
|
50175
|
+
}],
|
|
50176
|
+
hidden: [{
|
|
50177
|
+
type: i0.Output,
|
|
50178
|
+
args: ["hidden"]
|
|
50179
|
+
}]
|
|
50180
|
+
}
|
|
50181
|
+
});
|
|
50182
|
+
export { ActionBarComponent, AlertComponent, AppShellComponent, AudioPlayerComponent, AvatarComponent, BADGE_VARIANT_STYLES, BadgeComponent, BankAccountFormComponent, BarRowComponent, BoardCardDirective, BoardComponent, BulkMessagePanelComponent, BusinessHoursComponent, ButtonComponent, CalendarComponent, CardListItemComponent, CheckboxComponent, CheckboxTrailingDirective, ChipComponent, ChipGroupComponent, ColorInputComponent, ColumnFilterComponent, ColumnsComponent, ComboboxComponent, ConfirmOutletComponent, ConfirmService, ContactPickerComponent, DEFAULT_BANK_ACCOUNT_TYPE_OPTIONS, DEFAULT_BANK_HOLDER_TYPE_OPTIONS, DEFAULT_BANK_MANDATE_TEXT, DEFAULT_EMAIL_TEMPLATE_BLOCK_GROUPS, DEFAULT_EMAIL_TEMPLATE_VARIABLE_GROUPS, DEFAULT_PASSWORD_RULES, DROPDOWN_GROUP, DataTableComponent, DateInputComponent, DateRangePickerComponent, DatetimeInputComponent, DetailCardComponent, DiscountSelectorComponent, DividerComponent, DropdownComponent, EMAIL_BLOCK_DRAG_TYPE, EMAIL_TEMPLATE_MAX_BODY, EMAIL_TEMPLATE_MAX_TEXT, EMAIL_TEMPLATE_START_TEXT, EmailTemplateEditorComponent, EmptyStateComponent, ErrorComponent, ErrorStateComponent, FORGEROUTE_CONFIG, FadeComponent, FileInputComponent, FixedFooterComponent, FormColSpanDirective, FormComponent, FormRowComponent, FormSectionComponent, HintComponent, IDX_BEHAVIOR_SIGNALS, INTEGRATION_CATALOG, INTEGRATION_FIELD_DEFS, INTEGRATION_GROUP_ORDER, INTEGRATION_OPTION_DEFS, IconComponent, ImageComponent, ImageGalleryComponent, ImageGalleryDialogComponent, ImagePreviewComponent, ImageRepositionComponent, ImportExportComponent, ImportSourceGridComponent, KpiCardComponent, LAYOUT_GAP_PX, ListComponent, ListItemComponent, LiveRegionComponent, MAX_EMAIL_ADDRESS_LENGTH, ModalComponent, MoreMenuComponent, MultiSelectComponent, NOTES_MAX_LENGTH, NotesComponent, OfflineBannerComponent, OptionCardComponent, PHONE_NUMBER_AREA_CODE_LENGTH, PHONE_NUMBER_ZIP_LENGTH, PageComponent, PaginationComponent, PanelInfoListComponent, PasswordRequirementsComponent, PdfHotspotComponent, PhoneNumberPickerComponent, PillTabsComponent, ProgressBarComponent, ProgressRingComponent, QrCodeComponent, QuickFilterTabsComponent, RICH_TEXT_OPTIONS, RadioComponent, RadioGroupComponent, RadioMatrixComponent, RadioOptionContentDirective, ReadonlyFieldsetComponent, ReminderAlertsComponent, RichTextEditorComponent, SEMANTIC_BADGE_MAP, SETUP_DONE_KEY, SETUP_INTEGRATIONS, SearchInputComponent, SectionHeaderComponent, SelectComponent, SetupWizardComponent, SetupWizardStepDirective, SetupWizardStepHeaderDirective, ShareMenuComponent, ShowComponent, SidePanelComponent, SidebarLayoutComponent, SignaturePadComponent, SkeletonComponent, SnackbarComponent, SnackbarService, StackComponent, StarComponent, StepperComponent, TableToolbarComponent, TextComponent, TextInputComponent, TextTemplatePickerComponent, TextareaInputComponent, TimeInputComponent, TimelineComponent, ToastComponent, ToastService, ToggleBadgeComponent, ToggleComponent, TooltipDirective, US_STATES, UiFieldValidity, acceptLabel, appShellGroupsStorageKey, autoVariant, blockHasContent, buildDefaultSchedule, buildPreviewDocument, buildVideoBlockHtml, builtInActionIcon, businessTimeOptions, createFieldReveal, decodeFilterValues, digitsOnly, downloadBlob, emailShareUrl, encodeFilterValue, encodeFilterValues, errorContextInterceptor, escapeHtml, facebookShareUrl, fileMatchesAccept, formatAddress, formatCategoryLabel, formatCurrency, formatFileSize, formatIsoDate, formatIsoDateTime, formatTime, formatVideoDuration, getEligibleIds, getEligibleOptions, getErrorMessage, gmailShareUrl, humanReadableMessage, iconPath, insideEditorBlock, integrationPlainText, integrationsForApp, integrationsOnlyFor, isBlockDrag, isValidEmailAddress, isWebUrl, isoKey, issueToErrors, linkedInShareUrl, maxLengthIssue, mergeDescribedBy, normalizeHexColor, outlookShareUrl, parseBizHours, parseIso, parseTime, passwordMeetsRules, pluralize, provideForgerouteToast, reorderItems, requiredIssue, resolveLayoutGap, resolvePreset, serializeBizHours, serializedTextLength, setupIntegrations, splitIntro, xShareUrl };
|
|
49170
50183
|
|
|
49171
50184
|
//# sourceMappingURL=forgeroute-ui.mjs.map
|