@posiwise/shared-components 0.0.219 → 0.0.220
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.
|
@@ -8386,6 +8386,22 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8386
8386
|
value: [{ type: Input }]
|
|
8387
8387
|
}
|
|
8388
8388
|
});
|
|
8389
|
+
function storageKey(subscriptionId) {
|
|
8390
|
+
return `pw-onboarding-collapsed-${subscriptionId ?? "none"}`;
|
|
8391
|
+
}
|
|
8392
|
+
function readCollapsed(subscriptionId) {
|
|
8393
|
+
try {
|
|
8394
|
+
const value = localStorage.getItem(storageKey(subscriptionId));
|
|
8395
|
+
return value === null ? null : value === "true";
|
|
8396
|
+
} catch {
|
|
8397
|
+
return null;
|
|
8398
|
+
}
|
|
8399
|
+
}
|
|
8400
|
+
function writeCollapsed(subscriptionId, collapsed) {
|
|
8401
|
+
try {
|
|
8402
|
+
localStorage.setItem(storageKey(subscriptionId), String(collapsed));
|
|
8403
|
+
} catch {}
|
|
8404
|
+
}
|
|
8389
8405
|
const STATE_ICONS = {
|
|
8390
8406
|
done: faCircleCheck,
|
|
8391
8407
|
next: faCircleHalfStroke,
|
|
@@ -8403,7 +8419,9 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8403
8419
|
this.loadFailed = false;
|
|
8404
8420
|
this.slug = "";
|
|
8405
8421
|
this.subscriptionId = null;
|
|
8422
|
+
this.busy = false;
|
|
8406
8423
|
this.retry = new EventEmitter();
|
|
8424
|
+
this.markDone = new EventEmitter();
|
|
8407
8425
|
this.doneIcon = faCircleCheck;
|
|
8408
8426
|
this.helpIcon = faCircleQuestion;
|
|
8409
8427
|
this.expandIcon = faChevronDown;
|
|
@@ -8411,27 +8429,11 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8411
8429
|
this.expanded = false;
|
|
8412
8430
|
}
|
|
8413
8431
|
ngOnChanges(changes) {
|
|
8414
|
-
if (changes["subscriptionId"]) this.expanded =
|
|
8432
|
+
if (changes["subscriptionId"]) this.expanded = readCollapsed(this.subscriptionId) === false;
|
|
8415
8433
|
}
|
|
8416
8434
|
toggle() {
|
|
8417
8435
|
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 {}
|
|
8436
|
+
writeCollapsed(this.subscriptionId, !this.expanded);
|
|
8435
8437
|
}
|
|
8436
8438
|
get visible() {
|
|
8437
8439
|
return this.loading || this.loadFailed || this.status?.status === "ok";
|
|
@@ -8446,10 +8448,6 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8446
8448
|
get progressSegments() {
|
|
8447
8449
|
return Array.from({ length: this.status?.progress?.total ?? 0 }, (_, index) => index);
|
|
8448
8450
|
}
|
|
8449
|
-
get progressPercent() {
|
|
8450
|
-
const progress = this.status?.progress;
|
|
8451
|
-
return progress?.total ? Math.round(100 * progress.done / progress.total) : 0;
|
|
8452
|
-
}
|
|
8453
8451
|
get allDone() {
|
|
8454
8452
|
const progress = this.status?.progress;
|
|
8455
8453
|
return !!progress?.total && progress.done >= progress.total;
|
|
@@ -8491,8 +8489,14 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8491
8489
|
if (step.state === "blocked") return "OnboardingChecklist.Action.Fix";
|
|
8492
8490
|
return step.state === "ready" ? "OnboardingChecklist.Action.Finish" : "OnboardingChecklist.Action.Start";
|
|
8493
8491
|
}
|
|
8494
|
-
|
|
8495
|
-
return step.
|
|
8492
|
+
canTick(step) {
|
|
8493
|
+
return step.check_key === null && step.state !== "unknown" && step.can_act !== false;
|
|
8494
|
+
}
|
|
8495
|
+
tick(step) {
|
|
8496
|
+
this.markDone.emit({
|
|
8497
|
+
key: step.key,
|
|
8498
|
+
completed: step.state !== "done"
|
|
8499
|
+
});
|
|
8496
8500
|
}
|
|
8497
8501
|
static {
|
|
8498
8502
|
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
@@ -8516,13 +8520,17 @@ var OnboardingChecklistComponent = class OnboardingChecklistComponent {
|
|
|
8516
8520
|
loading: "loading",
|
|
8517
8521
|
loadFailed: "loadFailed",
|
|
8518
8522
|
slug: "slug",
|
|
8519
|
-
subscriptionId: "subscriptionId"
|
|
8523
|
+
subscriptionId: "subscriptionId",
|
|
8524
|
+
busy: "busy"
|
|
8525
|
+
},
|
|
8526
|
+
outputs: {
|
|
8527
|
+
retry: "retry",
|
|
8528
|
+
markDone: "markDone"
|
|
8520
8529
|
},
|
|
8521
|
-
outputs: { retry: "retry" },
|
|
8522
8530
|
usesOnChanges: true,
|
|
8523
8531
|
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\" role=\"progressbar\" aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"status.progress.total\" [attr.aria-valuenow]=\"status.progress.done\"\n [attr.aria-label]=\"'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total }\">\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_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_key) {\n <span class=\"pw-onboarding__muted\">{{ 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 @if (actionKey(step); as action) {\n
|
|
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"],
|
|
8532
|
+
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\" role=\"progressbar\" aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"status.progress.total\" [attr.aria-valuenow]=\"status.progress.done\"\n [attr.aria-label]=\"'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total }\">\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",
|
|
8533
|
+
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}.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
8534
|
dependencies: [
|
|
8527
8535
|
{
|
|
8528
8536
|
kind: "directive",
|
|
@@ -8665,8 +8673,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8665
8673
|
selector: "pw-onboarding-checklist",
|
|
8666
8674
|
standalone: false,
|
|
8667
8675
|
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\" role=\"progressbar\" aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"status.progress.total\" [attr.aria-valuenow]=\"status.progress.done\"\n [attr.aria-label]=\"'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total }\">\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_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_key) {\n <span class=\"pw-onboarding__muted\">{{ 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 @if (actionKey(step); as action) {\n
|
|
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"]
|
|
8676
|
+
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\" role=\"progressbar\" aria-valuemin=\"0\"\n [attr.aria-valuemax]=\"status.progress.total\" [attr.aria-valuenow]=\"status.progress.done\"\n [attr.aria-label]=\"'OnboardingChecklist.Progress' | transloco: { done: status.progress.done, total: status.progress.total }\">\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",
|
|
8677
|
+
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}.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
8678
|
}]
|
|
8671
8679
|
}],
|
|
8672
8680
|
propDecorators: {
|
|
@@ -8675,7 +8683,9 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8675
8683
|
loadFailed: [{ type: Input }],
|
|
8676
8684
|
slug: [{ type: Input }],
|
|
8677
8685
|
subscriptionId: [{ type: Input }],
|
|
8678
|
-
|
|
8686
|
+
busy: [{ type: Input }],
|
|
8687
|
+
retry: [{ type: Output }],
|
|
8688
|
+
markDone: [{ type: Output }]
|
|
8679
8689
|
}
|
|
8680
8690
|
});
|
|
8681
8691
|
var ResourceSharedComponentsModule = class ResourceSharedComponentsModule {
|