@posiwise/shared-components 0.0.219 → 0.0.221
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.
|
@@ -5314,6 +5314,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5314
5314
|
propDecorators: { landing: [{ type: Input }] }
|
|
5315
5315
|
});
|
|
5316
5316
|
var EntityGroupComponent = class EntityGroupComponent extends AppBaseComponent {
|
|
5317
|
+
get chatPermission() {
|
|
5318
|
+
return PermissionService.productPermission("Chat");
|
|
5319
|
+
}
|
|
5317
5320
|
constructor(groupService, subscriptionService, modalService, injector, cdr) {
|
|
5318
5321
|
super(injector);
|
|
5319
5322
|
this.groupService = groupService;
|
|
@@ -5344,7 +5347,6 @@ var EntityGroupComponent = class EntityGroupComponent extends AppBaseComponent {
|
|
|
5344
5347
|
if (this.user) this.userId = this.user.id;
|
|
5345
5348
|
this.cdr.markForCheck();
|
|
5346
5349
|
});
|
|
5347
|
-
this.chatPermission = `${PermissionService.selectedProduct?.permission}.${PermissionService.selectedProduct?.feature_key}`;
|
|
5348
5350
|
}
|
|
5349
5351
|
search(event) {
|
|
5350
5352
|
let data = [];
|
|
@@ -8386,6 +8388,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8386
8388
|
value: [{ type: Input }]
|
|
8387
8389
|
}
|
|
8388
8390
|
});
|
|
8391
|
+
function storageKey(subscriptionId) {
|
|
8392
|
+
return `pw-onboarding-collapsed-${subscriptionId ?? "none"}`;
|
|
8393
|
+
}
|
|
8394
|
+
function readCollapsed(subscriptionId) {
|
|
8395
|
+
try {
|
|
8396
|
+
const value = localStorage.getItem(storageKey(subscriptionId));
|
|
8397
|
+
return value === null ? null : value === "true";
|
|
8398
|
+
} catch {
|
|
8399
|
+
return null;
|
|
8400
|
+
}
|
|
8401
|
+
}
|
|
8402
|
+
function writeCollapsed(subscriptionId, collapsed) {
|
|
8403
|
+
try {
|
|
8404
|
+
localStorage.setItem(storageKey(subscriptionId), String(collapsed));
|
|
8405
|
+
} catch {}
|
|
8406
|
+
}
|
|
8389
8407
|
const STATE_ICONS = {
|
|
8390
8408
|
done: faCircleCheck,
|
|
8391
8409
|
next: faCircleHalfStroke,
|
|
@@ -8403,7 +8421,9 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8403
8421
|
this.loadFailed = false;
|
|
8404
8422
|
this.slug = "";
|
|
8405
8423
|
this.subscriptionId = null;
|
|
8424
|
+
this.busy = false;
|
|
8406
8425
|
this.retry = new EventEmitter();
|
|
8426
|
+
this.markDone = new EventEmitter();
|
|
8407
8427
|
this.doneIcon = faCircleCheck;
|
|
8408
8428
|
this.helpIcon = faCircleQuestion;
|
|
8409
8429
|
this.expandIcon = faChevronDown;
|
|
@@ -8411,27 +8431,11 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8411
8431
|
this.expanded = false;
|
|
8412
8432
|
}
|
|
8413
8433
|
ngOnChanges(changes) {
|
|
8414
|
-
if (changes["subscriptionId"]) this.expanded =
|
|
8434
|
+
if (changes["subscriptionId"]) this.expanded = readCollapsed(this.subscriptionId) === false;
|
|
8415
8435
|
}
|
|
8416
8436
|
toggle() {
|
|
8417
8437
|
this.expanded = !this.expanded;
|
|
8418
|
-
|
|
8419
|
-
}
|
|
8420
|
-
static storageKey(subscriptionId) {
|
|
8421
|
-
return `pw-onboarding-collapsed-${subscriptionId ?? "none"}`;
|
|
8422
|
-
}
|
|
8423
|
-
static readCollapsed(subscriptionId) {
|
|
8424
|
-
try {
|
|
8425
|
-
const value = localStorage.getItem(OnboardingChecklistComponent.storageKey(subscriptionId));
|
|
8426
|
-
return value === null ? null : value === "true";
|
|
8427
|
-
} catch {
|
|
8428
|
-
return null;
|
|
8429
|
-
}
|
|
8430
|
-
}
|
|
8431
|
-
static writeCollapsed(subscriptionId, collapsed) {
|
|
8432
|
-
try {
|
|
8433
|
-
localStorage.setItem(OnboardingChecklistComponent.storageKey(subscriptionId), String(collapsed));
|
|
8434
|
-
} catch {}
|
|
8438
|
+
writeCollapsed(this.subscriptionId, !this.expanded);
|
|
8435
8439
|
}
|
|
8436
8440
|
get visible() {
|
|
8437
8441
|
return this.loading || this.loadFailed || this.status?.status === "ok";
|
|
@@ -8446,10 +8450,6 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8446
8450
|
get progressSegments() {
|
|
8447
8451
|
return Array.from({ length: this.status?.progress?.total ?? 0 }, (_, index) => index);
|
|
8448
8452
|
}
|
|
8449
|
-
get progressPercent() {
|
|
8450
|
-
const progress = this.status?.progress;
|
|
8451
|
-
return progress?.total ? Math.round(100 * progress.done / progress.total) : 0;
|
|
8452
|
-
}
|
|
8453
8453
|
get allDone() {
|
|
8454
8454
|
const progress = this.status?.progress;
|
|
8455
8455
|
return !!progress?.total && progress.done >= progress.total;
|
|
@@ -8491,8 +8491,14 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8491
8491
|
if (step.state === "blocked") return "OnboardingChecklist.Action.Fix";
|
|
8492
8492
|
return step.state === "ready" ? "OnboardingChecklist.Action.Finish" : "OnboardingChecklist.Action.Start";
|
|
8493
8493
|
}
|
|
8494
|
-
|
|
8495
|
-
return step.
|
|
8494
|
+
canTick(step) {
|
|
8495
|
+
return step.check_key === null && step.state !== "unknown" && step.can_act !== false;
|
|
8496
|
+
}
|
|
8497
|
+
tick(step) {
|
|
8498
|
+
this.markDone.emit({
|
|
8499
|
+
key: step.key,
|
|
8500
|
+
completed: step.state !== "done"
|
|
8501
|
+
});
|
|
8496
8502
|
}
|
|
8497
8503
|
static {
|
|
8498
8504
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -8516,13 +8522,17 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8516
8522
|
loading: "loading",
|
|
8517
8523
|
loadFailed: "loadFailed",
|
|
8518
8524
|
slug: "slug",
|
|
8519
|
-
subscriptionId: "subscriptionId"
|
|
8525
|
+
subscriptionId: "subscriptionId",
|
|
8526
|
+
busy: "busy"
|
|
8527
|
+
},
|
|
8528
|
+
outputs: {
|
|
8529
|
+
retry: "retry",
|
|
8530
|
+
markDone: "markDone"
|
|
8520
8531
|
},
|
|
8521
|
-
outputs: { retry: "retry" },
|
|
8522
8532
|
usesOnChanges: true,
|
|
8523
8533
|
ngImport: i0,
|
|
8524
|
-
template: "@if (visible) {\n <div class=\"card pw-onboarding\">\n <div class=\"card-content p-0\">\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-no-data [withImage]=\"true\" [message]=\"'OnboardingChecklist.LoadFailed' | transloco\">\n <div #content>\n <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" (click)=\"retry.emit()\">\n {{ 'OnboardingChecklist.Action.Retry' | transloco }}\n </button>\n </div>\n </pw-no-data>\n } @else if (status) {\n <div class=\"card-header mt-0\">\n <h3 class=\"mb-2\">{{ 'OnboardingChecklist.Title' | transloco }}</h3>\n @if (allDone) {\n <p class=\"pw-onboarding__all-set\">\n <fa-icon [icon]=\"doneIcon\" aria-hidden=\"true\"></fa-icon>\n {{ 'OnboardingChecklist.AllSet' | transloco }}\n </p>\n } @else {\n <p>{{ 'OnboardingChecklist.Intro' | transloco }}</p>\n }\n @if (status.progress.total) {\n <div class=\"pw-onboarding__progress\"
|
|
8525
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.pw-onboarding{margin-top:24px;margin-bottom:16px;padding-bottom:0}.pw-onboarding__all-set{display:flex;align-items:center;gap:8px;color:#45d292}.pw-onboarding__current{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 16px 8px;padding:12px 16px;border:1px solid rgb(226,229,234);border-left:3px solid var(--first, #0d6efd);border-radius:8px;background-color:#f7f8fa}.pw-onboarding__current.is-blocked{border-left-color:#ff586b}.pw-onboarding__main-action{flex:0 0 auto;padding:8px 24px;font-weight:600}.pw-onboarding__current-name{font-size:17px;font-weight:600}.pw-onboarding__current .pw-onboarding__muted{font-size:15px}.pw-onboarding__current-text{display:flex;flex-direction:column;gap:4px;min-width:0}.pw-onboarding__reason{display:flex;align-items:center;gap:6px;color:#ff586b}.pw-onboarding__detail,.pw-onboarding__muted{color:#5a6473;overflow-wrap:anywhere}.pw-onboarding__steps{list-style:none;margin:0;padding:0 16px 16px}.pw-onboarding__step{display:flex;align-items:center;gap:10px;min-height:44px;border-top:1px solid rgb(226,229,234)}.pw-onboarding__step:first-child{border-top:0}.pw-onboarding__step.is-done .pw-onboarding__marker{color:#45d292}.pw-onboarding__step.is-current .pw-onboarding__marker,.pw-onboarding__step.is-ready .pw-onboarding__marker{color:var(--first, #0d6efd)}.pw-onboarding__step.is-blocked .pw-onboarding__marker{color:#ff586b}.pw-onboarding__step.is-current .pw-onboarding__step-title{font-weight:600}.pw-onboarding__marker{flex:0 0 auto;color:#7c8696}.pw-onboarding__step-title{flex:1 1 auto;min-width:0;font-size:15px}.pw-onboarding__progress{display:flex;flex-direction:column;gap:8px;margin-top:4px}.pw-onboarding__progress-label{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.pw-onboarding__progress-extra{color:#5a6473;font-weight:400}.pw-onboarding__progress-track{display:flex;gap:4px}.pw-onboarding__progress-seg{flex:1 1 0;height:8px;border-radius:4px;background-color:#e2e5ea}.pw-onboarding__progress-seg.is-filled{background-color:#fbab00}.pw-onboarding__progress-track.is-complete .pw-onboarding__progress-seg.is-filled{background-color:#45d292}.pw-onboarding__toggle{display:inline-flex;align-items:center;gap:6px;margin-top:12px}.pw-onboarding__group{margin:24px 16px 4px;color:#7c8696;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.pw-onboarding__help{margin-left:6px;font-size:12px}.pw-onboarding__row-action{flex:0 0 auto;padding:2px 10px;font-size:12px}.pw-onboarding__state{flex:0 0 auto;color:#7c8696;font-size:13px;white-space:nowrap}@media(max-width:575px){.pw-onboarding__current{flex-direction:column;align-items:stretch}.pw-onboarding__current .btn{align-self:flex-start}}\n"],
|
|
8534
|
+
template: "@if (visible) {\n <div class=\"card pw-onboarding\">\n <div class=\"card-content p-0\">\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-no-data [withImage]=\"true\" [message]=\"'OnboardingChecklist.LoadFailed' | transloco\">\n <div #content>\n <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" (click)=\"retry.emit()\">\n {{ 'OnboardingChecklist.Action.Retry' | transloco }}\n </button>\n </div>\n </pw-no-data>\n } @else if (status) {\n <div class=\"card-header mt-0\">\n <h3 class=\"mb-2\">{{ 'OnboardingChecklist.Title' | transloco }}</h3>\n @if (allDone) {\n <p class=\"pw-onboarding__all-set\">\n <fa-icon [icon]=\"doneIcon\" aria-hidden=\"true\"></fa-icon>\n {{ 'OnboardingChecklist.AllSet' | transloco }}\n </p>\n } @else {\n <p>{{ 'OnboardingChecklist.Intro' | transloco }}</p>\n }\n @if (status.progress.total) {\n <div class=\"pw-onboarding__progress\">\n <progress class=\"pw-onboarding__progress-value\" [max]=\"status.progress.total\" [value]=\"status.progress.done\"\n [attr.aria-label]=\"'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total }\"></progress>\n <span class=\"pw-onboarding__progress-label\">\n {{ 'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total } }}\n @if (recommended.total) {\n <span class=\"pw-onboarding__progress-extra\">\n {{ 'OnboardingChecklist.ProgressRecommended' | transloco: { done: recommended.done, total: recommended.total } }}\n </span>\n }\n </span>\n <span class=\"pw-onboarding__progress-track\" [class.is-complete]=\"allDone\" aria-hidden=\"true\">\n @for (segment of progressSegments; track segment) {\n <span class=\"pw-onboarding__progress-seg\" [class.is-filled]=\"segment < status.progress.done\"></span>\n }\n </span>\n </div>\n }\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm pw-onboarding__toggle\" (click)=\"toggle()\"\n [attr.aria-expanded]=\"expanded\" aria-controls=\"pw-onboarding-steps\">\n <fa-icon [icon]=\"expanded ? collapseIcon : expandIcon\" aria-hidden=\"true\"></fa-icon>\n {{ (expanded ? 'OnboardingChecklist.Toggle.Hide' : 'OnboardingChecklist.Toggle.Show') | transloco }}\n </button>\n </div>\n\n @if (expanded) {\n <div id=\"pw-onboarding-steps\">\n @if (currentStep; as step) {\n <div class=\"pw-onboarding__current\" [class.is-blocked]=\"step.state === 'blocked'\">\n <div class=\"pw-onboarding__current-text\">\n <span class=\"pw-onboarding__current-title\">\n <strong class=\"pw-onboarding__current-name\">{{ step.title ?? (step.title_key | transloco) }}</strong>\n <ng-container *ngTemplateOutlet=\"faqLink; context: { $implicit: step }\"></ng-container>\n </span>\n @if (step.state === 'blocked' && step.reason_key) {\n <span class=\"pw-onboarding__reason\">\n <fa-icon [icon]=\"icon(step)\" aria-hidden=\"true\"></fa-icon>\n {{ step.reason_key | transloco }}\n </span>\n @if (step.detail) {\n <span class=\"pw-onboarding__detail\">{{ step.detail }}</span>\n }\n } @else if (step.state === 'waiting') {\n <span class=\"pw-onboarding__muted\">{{ 'OnboardingChecklist.Waiting' | transloco }}</span>\n } @else if (step.description || step.description_key) {\n <span class=\"pw-onboarding__muted\">{{ step.description ?? (step.description_key | transloco) }}</span>\n }\n @if (step.can_act === false) {\n <span class=\"pw-onboarding__muted\">{{ 'OnboardingChecklist.AskAdmin' | transloco }}</span>\n }\n </div>\n <div class=\"pw-onboarding__current-actions\">\n @if (actionKey(step); as action) {\n <a class=\"btn btn-primary pw-onboarding__main-action\" [routerLink]=\"routeFor(step)\">{{ action | transloco }}</a>\n }\n @if (canTick(step)) {\n <button type=\"button\" class=\"btn pw-onboarding__main-action\" [class.btn-primary]=\"!actionKey(step)\"\n [class.btn-outline-primary]=\"actionKey(step)\" [disabled]=\"busy\" (click)=\"tick(step)\">\n {{ 'OnboardingChecklist.Action.MarkDone' | transloco }}\n </button>\n }\n </div>\n </div>\n }\n\n @for (group of groups; track group.key) {\n @if (group.steps.length) {\n <p class=\"pw-onboarding__group\">{{ group.labelKey | transloco }}</p>\n <ol class=\"pw-onboarding__steps\">\n @for (item of group.steps; track item.key) {\n <li class=\"pw-onboarding__step\" [ngClass]=\"'is-' + item.state\" [class.is-current]=\"item.current\">\n <fa-icon class=\"pw-onboarding__marker\" [icon]=\"icon(item)\" aria-hidden=\"true\"></fa-icon>\n <span class=\"pw-onboarding__step-title\">\n {{ item.title ?? (item.title_key | transloco) }}\n <ng-container *ngTemplateOutlet=\"faqLink; context: { $implicit: item }\"></ng-container>\n </span>\n @if (actionKey(item); as action) {\n <a class=\"btn btn-outline-primary btn-sm pw-onboarding__row-action\" [routerLink]=\"routeFor(item)\"\n [attr.aria-label]=\"(action | transloco) + ' ' + (item.title ?? (item.title_key | transloco))\">{{ action | transloco }}</a>\n }\n @if (canTick(item)) {\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm pw-onboarding__row-action\" [disabled]=\"busy\"\n (click)=\"tick(item)\"\n [attr.aria-label]=\"((item.state === 'done' ? 'OnboardingChecklist.Action.Undo' : 'OnboardingChecklist.Action.MarkDone') | transloco) + ' ' + item.title\">\n {{ (item.state === 'done' ? 'OnboardingChecklist.Action.Undo' : 'OnboardingChecklist.Action.MarkDone') | transloco }}\n </button>\n }\n <span class=\"pw-onboarding__state\">{{ stateLabelKey(item) | transloco }}</span>\n </li>\n }\n </ol>\n }\n }\n </div>\n }\n }\n }\n </div>\n </div>\n}\n\n<ng-template #faqLink let-step>\n @if (faqHref(step); as href) {\n <a class=\"pw-onboarding__help\" [href]=\"href\" target=\"_blank\" rel=\"noopener\"\n [attr.aria-label]=\"('OnboardingChecklist.Help' | transloco) + ' ' + (step.title ?? (step.title_key | transloco))\"\n [pTooltip]=\"'OnboardingChecklist.Help' | transloco\" tooltipPosition=\"top\" appendTo=\"body\">\n <fa-icon [icon]=\"helpIcon\" aria-hidden=\"true\"></fa-icon>\n </a>\n }\n</ng-template>\n",
|
|
8535
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.pw-onboarding{margin-top:24px;margin-bottom:16px;padding-bottom:0}.pw-onboarding__all-set{display:flex;align-items:center;gap:8px;color:#45d292}.pw-onboarding__current{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 16px 8px;padding:12px 16px;border:1px solid rgb(226,229,234);border-left:3px solid var(--first, #0d6efd);border-radius:8px;background-color:#f7f8fa}.pw-onboarding__current.is-blocked{border-left-color:#ff586b}.pw-onboarding__main-action{flex:0 0 auto;padding:8px 24px;font-weight:600}.pw-onboarding__current-name{font-size:17px;font-weight:600}.pw-onboarding__current .pw-onboarding__muted{font-size:15px}.pw-onboarding__current-text{display:flex;flex-direction:column;gap:4px;min-width:0}.pw-onboarding__reason{display:flex;align-items:center;gap:6px;color:#ff586b}.pw-onboarding__detail,.pw-onboarding__muted{color:#5a6473;overflow-wrap:anywhere}.pw-onboarding__steps{list-style:none;margin:0;padding:0 16px 16px}.pw-onboarding__step{display:flex;align-items:center;gap:10px;min-height:44px;border-top:1px solid rgb(226,229,234)}.pw-onboarding__step:first-child{border-top:0}.pw-onboarding__step.is-done .pw-onboarding__marker{color:#45d292}.pw-onboarding__step.is-current .pw-onboarding__marker,.pw-onboarding__step.is-ready .pw-onboarding__marker{color:var(--first, #0d6efd)}.pw-onboarding__step.is-blocked .pw-onboarding__marker{color:#ff586b}.pw-onboarding__step.is-current .pw-onboarding__step-title{font-weight:600}.pw-onboarding__marker{flex:0 0 auto;color:#7c8696}.pw-onboarding__step-title{flex:1 1 auto;min-width:0;font-size:15px}.pw-onboarding__progress{display:flex;flex-direction:column;gap:8px;margin-top:4px}.pw-onboarding__progress-value{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.pw-onboarding__progress-label{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.pw-onboarding__progress-extra{color:#5a6473;font-weight:400}.pw-onboarding__progress-track{display:flex;gap:4px}.pw-onboarding__progress-seg{flex:1 1 0;height:8px;border-radius:4px;background-color:#e2e5ea}.pw-onboarding__progress-seg.is-filled{background-color:#fbab00}.pw-onboarding__progress-track.is-complete .pw-onboarding__progress-seg.is-filled{background-color:#45d292}.pw-onboarding__toggle{display:inline-flex;align-items:center;gap:6px;margin-top:12px}.pw-onboarding__group{margin:24px 16px 4px;color:#7c8696;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.pw-onboarding__help{margin-left:6px;font-size:12px}.pw-onboarding__row-action{flex:0 0 auto;padding:2px 10px;font-size:12px}.pw-onboarding__state{flex:0 0 auto;color:#7c8696;font-size:13px;white-space:nowrap}.pw-onboarding__current-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;flex-shrink:0}@media(max-width:575px){.pw-onboarding__current{flex-direction:column;align-items:stretch}.pw-onboarding__current .btn{align-self:flex-start}.pw-onboarding__current-actions{justify-content:flex-start}}\n"],
|
|
8526
8536
|
dependencies: [
|
|
8527
8537
|
{
|
|
8528
8538
|
kind: "directive",
|
|
@@ -8665,8 +8675,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8665
8675
|
selector: "pw-onboarding-checklist",
|
|
8666
8676
|
standalone: false,
|
|
8667
8677
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
8668
|
-
template: "@if (visible) {\n <div class=\"card pw-onboarding\">\n <div class=\"card-content p-0\">\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-no-data [withImage]=\"true\" [message]=\"'OnboardingChecklist.LoadFailed' | transloco\">\n <div #content>\n <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" (click)=\"retry.emit()\">\n {{ 'OnboardingChecklist.Action.Retry' | transloco }}\n </button>\n </div>\n </pw-no-data>\n } @else if (status) {\n <div class=\"card-header mt-0\">\n <h3 class=\"mb-2\">{{ 'OnboardingChecklist.Title' | transloco }}</h3>\n @if (allDone) {\n <p class=\"pw-onboarding__all-set\">\n <fa-icon [icon]=\"doneIcon\" aria-hidden=\"true\"></fa-icon>\n {{ 'OnboardingChecklist.AllSet' | transloco }}\n </p>\n } @else {\n <p>{{ 'OnboardingChecklist.Intro' | transloco }}</p>\n }\n @if (status.progress.total) {\n <div class=\"pw-onboarding__progress\"
|
|
8669
|
-
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.pw-onboarding{margin-top:24px;margin-bottom:16px;padding-bottom:0}.pw-onboarding__all-set{display:flex;align-items:center;gap:8px;color:#45d292}.pw-onboarding__current{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 16px 8px;padding:12px 16px;border:1px solid rgb(226,229,234);border-left:3px solid var(--first, #0d6efd);border-radius:8px;background-color:#f7f8fa}.pw-onboarding__current.is-blocked{border-left-color:#ff586b}.pw-onboarding__main-action{flex:0 0 auto;padding:8px 24px;font-weight:600}.pw-onboarding__current-name{font-size:17px;font-weight:600}.pw-onboarding__current .pw-onboarding__muted{font-size:15px}.pw-onboarding__current-text{display:flex;flex-direction:column;gap:4px;min-width:0}.pw-onboarding__reason{display:flex;align-items:center;gap:6px;color:#ff586b}.pw-onboarding__detail,.pw-onboarding__muted{color:#5a6473;overflow-wrap:anywhere}.pw-onboarding__steps{list-style:none;margin:0;padding:0 16px 16px}.pw-onboarding__step{display:flex;align-items:center;gap:10px;min-height:44px;border-top:1px solid rgb(226,229,234)}.pw-onboarding__step:first-child{border-top:0}.pw-onboarding__step.is-done .pw-onboarding__marker{color:#45d292}.pw-onboarding__step.is-current .pw-onboarding__marker,.pw-onboarding__step.is-ready .pw-onboarding__marker{color:var(--first, #0d6efd)}.pw-onboarding__step.is-blocked .pw-onboarding__marker{color:#ff586b}.pw-onboarding__step.is-current .pw-onboarding__step-title{font-weight:600}.pw-onboarding__marker{flex:0 0 auto;color:#7c8696}.pw-onboarding__step-title{flex:1 1 auto;min-width:0;font-size:15px}.pw-onboarding__progress{display:flex;flex-direction:column;gap:8px;margin-top:4px}.pw-onboarding__progress-label{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.pw-onboarding__progress-extra{color:#5a6473;font-weight:400}.pw-onboarding__progress-track{display:flex;gap:4px}.pw-onboarding__progress-seg{flex:1 1 0;height:8px;border-radius:4px;background-color:#e2e5ea}.pw-onboarding__progress-seg.is-filled{background-color:#fbab00}.pw-onboarding__progress-track.is-complete .pw-onboarding__progress-seg.is-filled{background-color:#45d292}.pw-onboarding__toggle{display:inline-flex;align-items:center;gap:6px;margin-top:12px}.pw-onboarding__group{margin:24px 16px 4px;color:#7c8696;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.pw-onboarding__help{margin-left:6px;font-size:12px}.pw-onboarding__row-action{flex:0 0 auto;padding:2px 10px;font-size:12px}.pw-onboarding__state{flex:0 0 auto;color:#7c8696;font-size:13px;white-space:nowrap}@media(max-width:575px){.pw-onboarding__current{flex-direction:column;align-items:stretch}.pw-onboarding__current .btn{align-self:flex-start}}\n"]
|
|
8678
|
+
template: "@if (visible) {\n <div class=\"card pw-onboarding\">\n <div class=\"card-content p-0\">\n <pw-loader [isVisible]=\"loading\"></pw-loader>\n\n @if (!loading) {\n @if (loadFailed) {\n <pw-no-data [withImage]=\"true\" [message]=\"'OnboardingChecklist.LoadFailed' | transloco\">\n <div #content>\n <button type=\"button\" class=\"btn btn-outline-secondary btn-sm\" (click)=\"retry.emit()\">\n {{ 'OnboardingChecklist.Action.Retry' | transloco }}\n </button>\n </div>\n </pw-no-data>\n } @else if (status) {\n <div class=\"card-header mt-0\">\n <h3 class=\"mb-2\">{{ 'OnboardingChecklist.Title' | transloco }}</h3>\n @if (allDone) {\n <p class=\"pw-onboarding__all-set\">\n <fa-icon [icon]=\"doneIcon\" aria-hidden=\"true\"></fa-icon>\n {{ 'OnboardingChecklist.AllSet' | transloco }}\n </p>\n } @else {\n <p>{{ 'OnboardingChecklist.Intro' | transloco }}</p>\n }\n @if (status.progress.total) {\n <div class=\"pw-onboarding__progress\">\n <progress class=\"pw-onboarding__progress-value\" [max]=\"status.progress.total\" [value]=\"status.progress.done\"\n [attr.aria-label]=\"'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total }\"></progress>\n <span class=\"pw-onboarding__progress-label\">\n {{ 'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total } }}\n @if (recommended.total) {\n <span class=\"pw-onboarding__progress-extra\">\n {{ 'OnboardingChecklist.ProgressRecommended' | transloco: { done: recommended.done, total: recommended.total } }}\n </span>\n }\n </span>\n <span class=\"pw-onboarding__progress-track\" [class.is-complete]=\"allDone\" aria-hidden=\"true\">\n @for (segment of progressSegments; track segment) {\n <span class=\"pw-onboarding__progress-seg\" [class.is-filled]=\"segment < status.progress.done\"></span>\n }\n </span>\n </div>\n }\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm pw-onboarding__toggle\" (click)=\"toggle()\"\n [attr.aria-expanded]=\"expanded\" aria-controls=\"pw-onboarding-steps\">\n <fa-icon [icon]=\"expanded ? collapseIcon : expandIcon\" aria-hidden=\"true\"></fa-icon>\n {{ (expanded ? 'OnboardingChecklist.Toggle.Hide' : 'OnboardingChecklist.Toggle.Show') | transloco }}\n </button>\n </div>\n\n @if (expanded) {\n <div id=\"pw-onboarding-steps\">\n @if (currentStep; as step) {\n <div class=\"pw-onboarding__current\" [class.is-blocked]=\"step.state === 'blocked'\">\n <div class=\"pw-onboarding__current-text\">\n <span class=\"pw-onboarding__current-title\">\n <strong class=\"pw-onboarding__current-name\">{{ step.title ?? (step.title_key | transloco) }}</strong>\n <ng-container *ngTemplateOutlet=\"faqLink; context: { $implicit: step }\"></ng-container>\n </span>\n @if (step.state === 'blocked' && step.reason_key) {\n <span class=\"pw-onboarding__reason\">\n <fa-icon [icon]=\"icon(step)\" aria-hidden=\"true\"></fa-icon>\n {{ step.reason_key | transloco }}\n </span>\n @if (step.detail) {\n <span class=\"pw-onboarding__detail\">{{ step.detail }}</span>\n }\n } @else if (step.state === 'waiting') {\n <span class=\"pw-onboarding__muted\">{{ 'OnboardingChecklist.Waiting' | transloco }}</span>\n } @else if (step.description || step.description_key) {\n <span class=\"pw-onboarding__muted\">{{ step.description ?? (step.description_key | transloco) }}</span>\n }\n @if (step.can_act === false) {\n <span class=\"pw-onboarding__muted\">{{ 'OnboardingChecklist.AskAdmin' | transloco }}</span>\n }\n </div>\n <div class=\"pw-onboarding__current-actions\">\n @if (actionKey(step); as action) {\n <a class=\"btn btn-primary pw-onboarding__main-action\" [routerLink]=\"routeFor(step)\">{{ action | transloco }}</a>\n }\n @if (canTick(step)) {\n <button type=\"button\" class=\"btn pw-onboarding__main-action\" [class.btn-primary]=\"!actionKey(step)\"\n [class.btn-outline-primary]=\"actionKey(step)\" [disabled]=\"busy\" (click)=\"tick(step)\">\n {{ 'OnboardingChecklist.Action.MarkDone' | transloco }}\n </button>\n }\n </div>\n </div>\n }\n\n @for (group of groups; track group.key) {\n @if (group.steps.length) {\n <p class=\"pw-onboarding__group\">{{ group.labelKey | transloco }}</p>\n <ol class=\"pw-onboarding__steps\">\n @for (item of group.steps; track item.key) {\n <li class=\"pw-onboarding__step\" [ngClass]=\"'is-' + item.state\" [class.is-current]=\"item.current\">\n <fa-icon class=\"pw-onboarding__marker\" [icon]=\"icon(item)\" aria-hidden=\"true\"></fa-icon>\n <span class=\"pw-onboarding__step-title\">\n {{ item.title ?? (item.title_key | transloco) }}\n <ng-container *ngTemplateOutlet=\"faqLink; context: { $implicit: item }\"></ng-container>\n </span>\n @if (actionKey(item); as action) {\n <a class=\"btn btn-outline-primary btn-sm pw-onboarding__row-action\" [routerLink]=\"routeFor(item)\"\n [attr.aria-label]=\"(action | transloco) + ' ' + (item.title ?? (item.title_key | transloco))\">{{ action | transloco }}</a>\n }\n @if (canTick(item)) {\n <button type=\"button\" class=\"btn btn-outline-primary btn-sm pw-onboarding__row-action\" [disabled]=\"busy\"\n (click)=\"tick(item)\"\n [attr.aria-label]=\"((item.state === 'done' ? 'OnboardingChecklist.Action.Undo' : 'OnboardingChecklist.Action.MarkDone') | transloco) + ' ' + item.title\">\n {{ (item.state === 'done' ? 'OnboardingChecklist.Action.Undo' : 'OnboardingChecklist.Action.MarkDone') | transloco }}\n </button>\n }\n <span class=\"pw-onboarding__state\">{{ stateLabelKey(item) | transloco }}</span>\n </li>\n }\n </ol>\n }\n }\n </div>\n }\n }\n }\n </div>\n </div>\n}\n\n<ng-template #faqLink let-step>\n @if (faqHref(step); as href) {\n <a class=\"pw-onboarding__help\" [href]=\"href\" target=\"_blank\" rel=\"noopener\"\n [attr.aria-label]=\"('OnboardingChecklist.Help' | transloco) + ' ' + (step.title ?? (step.title_key | transloco))\"\n [pTooltip]=\"'OnboardingChecklist.Help' | transloco\" tooltipPosition=\"top\" appendTo=\"body\">\n <fa-icon [icon]=\"helpIcon\" aria-hidden=\"true\"></fa-icon>\n </a>\n }\n</ng-template>\n",
|
|
8679
|
+
styles: ["@charset \"UTF-8\";:root{--first: rgb(23 105 225);--second: rgb(54 194 131);--third: rgb(255 171 0);--text: rgb(34 34 34);--tabs_bg: rgb(23 105 225);--tabs_sub_bg: color-mix(in srgb, var(--first, rgb(23 105 225)) 85%, #000000);--tabs_text: rgb(255 255 255);--titles: rgb(34 34 34);--sidebar_bg: rgb(0, 48, 63);--sidebar_text: rgb(255 255 255);--dashboard_bg: rgb(255 255 255);--public-btn-radius: 24px}.pw-onboarding{margin-top:24px;margin-bottom:16px;padding-bottom:0}.pw-onboarding__all-set{display:flex;align-items:center;gap:8px;color:#45d292}.pw-onboarding__current{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 16px 8px;padding:12px 16px;border:1px solid rgb(226,229,234);border-left:3px solid var(--first, #0d6efd);border-radius:8px;background-color:#f7f8fa}.pw-onboarding__current.is-blocked{border-left-color:#ff586b}.pw-onboarding__main-action{flex:0 0 auto;padding:8px 24px;font-weight:600}.pw-onboarding__current-name{font-size:17px;font-weight:600}.pw-onboarding__current .pw-onboarding__muted{font-size:15px}.pw-onboarding__current-text{display:flex;flex-direction:column;gap:4px;min-width:0}.pw-onboarding__reason{display:flex;align-items:center;gap:6px;color:#ff586b}.pw-onboarding__detail,.pw-onboarding__muted{color:#5a6473;overflow-wrap:anywhere}.pw-onboarding__steps{list-style:none;margin:0;padding:0 16px 16px}.pw-onboarding__step{display:flex;align-items:center;gap:10px;min-height:44px;border-top:1px solid rgb(226,229,234)}.pw-onboarding__step:first-child{border-top:0}.pw-onboarding__step.is-done .pw-onboarding__marker{color:#45d292}.pw-onboarding__step.is-current .pw-onboarding__marker,.pw-onboarding__step.is-ready .pw-onboarding__marker{color:var(--first, #0d6efd)}.pw-onboarding__step.is-blocked .pw-onboarding__marker{color:#ff586b}.pw-onboarding__step.is-current .pw-onboarding__step-title{font-weight:600}.pw-onboarding__marker{flex:0 0 auto;color:#7c8696}.pw-onboarding__step-title{flex:1 1 auto;min-width:0;font-size:15px}.pw-onboarding__progress{display:flex;flex-direction:column;gap:8px;margin-top:4px}.pw-onboarding__progress-value{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.pw-onboarding__progress-label{font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.pw-onboarding__progress-extra{color:#5a6473;font-weight:400}.pw-onboarding__progress-track{display:flex;gap:4px}.pw-onboarding__progress-seg{flex:1 1 0;height:8px;border-radius:4px;background-color:#e2e5ea}.pw-onboarding__progress-seg.is-filled{background-color:#fbab00}.pw-onboarding__progress-track.is-complete .pw-onboarding__progress-seg.is-filled{background-color:#45d292}.pw-onboarding__toggle{display:inline-flex;align-items:center;gap:6px;margin-top:12px}.pw-onboarding__group{margin:24px 16px 4px;color:#7c8696;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.pw-onboarding__help{margin-left:6px;font-size:12px}.pw-onboarding__row-action{flex:0 0 auto;padding:2px 10px;font-size:12px}.pw-onboarding__state{flex:0 0 auto;color:#7c8696;font-size:13px;white-space:nowrap}.pw-onboarding__current-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;flex-shrink:0}@media(max-width:575px){.pw-onboarding__current{flex-direction:column;align-items:stretch}.pw-onboarding__current .btn{align-self:flex-start}.pw-onboarding__current-actions{justify-content:flex-start}}\n"]
|
|
8670
8680
|
}]
|
|
8671
8681
|
}],
|
|
8672
8682
|
propDecorators: {
|
|
@@ -8675,7 +8685,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8675
8685
|
loadFailed: [{ type: Input }],
|
|
8676
8686
|
slug: [{ type: Input }],
|
|
8677
8687
|
subscriptionId: [{ type: Input }],
|
|
8678
|
-
|
|
8688
|
+
busy: [{ type: Input }],
|
|
8689
|
+
retry: [{ type: Output }],
|
|
8690
|
+
markDone: [{ type: Output }]
|
|
8679
8691
|
}
|
|
8680
8692
|
});
|
|
8681
8693
|
var ResourceSharedComponentsModule = class ResourceSharedComponentsModule {
|