@posiwise/shared-components 0.0.228 → 0.0.229

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.
@@ -3988,14 +3988,30 @@ const scoreEntry = (title, section, query) => {
3988
3988
  if (normalise(section).includes(needle)) return 1;
3989
3989
  return -1;
3990
3990
  };
3991
- const pageItems = (entries, query) => entries.map((entry) => ({
3991
+ const translatedText = (entry) => ({
3992
+ ...entry.titleKey ? { labelKey: entry.titleKey } : {},
3993
+ ...entry.sectionKey ? { detailKey: entry.sectionKey } : {}
3994
+ });
3995
+ const entryScore = (entry, query, translate) => {
3996
+ const english = scoreEntry(entry.title, entry.section, query);
3997
+ if (!translate || !entry.titleKey && !entry.sectionKey) return english;
3998
+ const shown = (key, fallback) => {
3999
+ const text = key ? translate(key) : fallback;
4000
+ return text === key ? fallback : text;
4001
+ };
4002
+ const title = shown(entry.titleKey, entry.title);
4003
+ const section = shown(entry.sectionKey, entry.section);
4004
+ return Math.max(english, scoreEntry(title, section, query));
4005
+ };
4006
+ const pageItems = (entries, query, translate) => entries.map((entry) => ({
3992
4007
  entry,
3993
- score: scoreEntry(entry.title, entry.section, query)
4008
+ score: entryScore(entry, query, translate)
3994
4009
  })).filter((scored) => scored.score >= 0).sort((a, b) => b.score - a.score || a.entry.title.localeCompare(b.entry.title)).slice(0, MAX_PER_GROUP).map(({ entry }) => ({
3995
4010
  id: `page:${entry.path}`,
3996
4011
  kind: "page",
3997
4012
  label: entry.title,
3998
4013
  detail: entry.section,
4014
+ ...translatedText(entry),
3999
4015
  icon: entry.icon || "ft-file",
4000
4016
  path: entry.path,
4001
4017
  entry
@@ -4014,6 +4030,7 @@ const recentItems = (entries) => (entries ?? []).slice(0, MAX_PER_GROUP).map((en
4014
4030
  kind: "page",
4015
4031
  label: entry.title,
4016
4032
  detail: entry.section,
4033
+ ...translatedText(entry),
4017
4034
  icon: entry.icon || "fas fa-clock-rotate-left",
4018
4035
  path: entry.path,
4019
4036
  entry
@@ -4119,7 +4136,7 @@ const composeGroups = (sources) => {
4119
4136
  const typed = sources.query.trim();
4120
4137
  const entries = sources.navIndex.entries();
4121
4138
  const recents = typed ? [] : recentItems(sources.recents.resolve(entries, sources.currentUrl));
4122
- const pages = typed || !recents.length ? pageItems(entries, sources.query) : [];
4139
+ const pages = typed || !recents.length ? pageItems(entries, sources.query, sources.translate) : [];
4123
4140
  return buildGroups({
4124
4141
  recents,
4125
4142
  pages,
@@ -4353,7 +4370,7 @@ var CommandPaletteComponent = class CommandPaletteComponent {
4353
4370
  descendants: true
4354
4371
  }],
4355
4372
  ngImport: i0,
4356
- template: "<!-- Navbar trigger — keeps the familiar search affordance, states the shortcut. -->\n<button type=\"button\"\n class=\"pw-palette-trigger\"\n (click)=\"palette.open()\"\n [attr.aria-label]=\"'CommandPalette.Trigger.Label' | transloco\">\n <i class=\"fas fa-magnifying-glass pw-palette-trigger-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-trigger-text\">{{ 'CommandPalette.Trigger.Text' | transloco }}</span>\n <kbd class=\"pw-palette-kbd pw-palette-trigger-kbd\">{{ shortcutHint }}</kbd>\n</button>\n\n<!--\n Native <dialog> opened with showModal(): the platform supplies the modal\n semantics this used to hand-roll — the implicit dialog role and modal flag, a real\n focus trap, inert background content, Escape-to-close, and a ::backdrop we\n style instead of painting our own overlay <div>.\n\n The element is always in the DOM (a closed <dialog> is display:none) so the\n component holds one stable handle to call showModal()/close() on; only the\n contents are gated on isOpen so the results list costs nothing while closed.\n-->\n<dialog #paletteDialog\n class=\"pw-palette\"\n [attr.aria-label]=\"'CommandPalette.Aria.Dialog' | transloco\"\n (close)=\"onDialogClose()\">\n @if (isOpen) {\n <div class=\"pw-palette-search\">\n <i class=\"fas fa-magnifying-glass pw-palette-search-icon\" aria-hidden=\"true\"></i>\n <input #queryInput\n type=\"text\"\n class=\"pw-palette-field\"\n autocomplete=\"off\"\n [value]=\"query\"\n (input)=\"onQueryInput($any($event.target).value)\"\n (keydown)=\"onKeydown($event)\"\n [attr.placeholder]=\"'CommandPalette.Placeholder' | transloco\"\n [attr.aria-label]=\"'CommandPalette.Placeholder' | transloco\" />\n <kbd class=\"pw-palette-kbd\">esc</kbd>\n </div>\n\n <div class=\"pw-palette-results\">\n @for (group of groups; track group.labelKey) {\n <div class=\"pw-palette-group\">\n <p class=\"pw-palette-group-label\">{{ group.labelKey | transloco }}</p>\n @for (item of group.items; track item.id) {\n <button type=\"button\"\n class=\"pw-palette-row\"\n [class.is-active]=\"isActive(item)\"\n (click)=\"activate(item)\">\n <i class=\"pw-palette-row-icon\" [ngClass]=\"item.icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-row-label\">\n @if (item.kind === 'ask-ai') {\n {{ 'CommandPalette.Ask.Label' | transloco: { company: brandName } }}\n @if (item.label) {\n <span class=\"pw-palette-row-prefix\">— {{ item.label }}</span>\n }\n } @else if (item.labelKey) {\n <!-- Action rows are chrome, so they translate (C17); page and\n person rows render the data's own text. -->\n {{ item.labelKey | transloco }}\n } @else {\n {{ item.label }}\n }\n </span>\n @if (item.detail) {\n <span class=\"pw-palette-row-detail\">{{ item.detail }}</span>\n }\n </button>\n }\n </div>\n } @empty {\n <div class=\"pw-palette-empty\">\n <p class=\"pw-palette-empty-title\">{{ 'CommandPalette.Empty.Title' | transloco }}</p>\n <p class=\"pw-palette-empty-hint\">{{ 'CommandPalette.Empty.Hint' | transloco }}</p>\n </div>\n }\n </div>\n\n <div class=\"pw-palette-footer\">\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↑↓</kbd>{{ 'CommandPalette.Hint.Navigate' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↵</kbd>{{ 'CommandPalette.Hint.Open' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">esc</kbd>{{ 'CommandPalette.Hint.Close' | transloco }}</span>\n </div>\n }\n</dialog>\n",
4373
+ template: "<!-- Navbar trigger — keeps the familiar search affordance, states the shortcut. -->\n<button type=\"button\"\n class=\"pw-palette-trigger\"\n (click)=\"palette.open()\"\n [attr.aria-label]=\"'CommandPalette.Trigger.Label' | transloco\">\n <i class=\"fas fa-magnifying-glass pw-palette-trigger-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-trigger-text\">{{ 'CommandPalette.Trigger.Text' | transloco }}</span>\n <kbd class=\"pw-palette-kbd pw-palette-trigger-kbd\">{{ shortcutHint }}</kbd>\n</button>\n\n<!--\n Native <dialog> opened with showModal(): the platform supplies the modal\n semantics this used to hand-roll — the implicit dialog role and modal flag, a real\n focus trap, inert background content, Escape-to-close, and a ::backdrop we\n style instead of painting our own overlay <div>.\n\n The element is always in the DOM (a closed <dialog> is display:none) so the\n component holds one stable handle to call showModal()/close() on; only the\n contents are gated on isOpen so the results list costs nothing while closed.\n-->\n<dialog #paletteDialog\n class=\"pw-palette\"\n [attr.aria-label]=\"'CommandPalette.Aria.Dialog' | transloco\"\n (close)=\"onDialogClose()\">\n @if (isOpen) {\n <div class=\"pw-palette-search\">\n <i class=\"fas fa-magnifying-glass pw-palette-search-icon\" aria-hidden=\"true\"></i>\n <input #queryInput\n type=\"text\"\n class=\"pw-palette-field\"\n autocomplete=\"off\"\n [value]=\"query\"\n (input)=\"onQueryInput($any($event.target).value)\"\n (keydown)=\"onKeydown($event)\"\n [attr.placeholder]=\"'CommandPalette.Placeholder' | transloco\"\n [attr.aria-label]=\"'CommandPalette.Placeholder' | transloco\" />\n <kbd class=\"pw-palette-kbd\">esc</kbd>\n </div>\n\n <div class=\"pw-palette-results\">\n @for (group of groups; track group.labelKey) {\n <div class=\"pw-palette-group\">\n <p class=\"pw-palette-group-label\">{{ group.labelKey | transloco }}</p>\n @for (item of group.items; track item.id) {\n <button type=\"button\"\n class=\"pw-palette-row\"\n [class.is-active]=\"isActive(item)\"\n (click)=\"activate(item)\">\n <i class=\"pw-palette-row-icon\" [ngClass]=\"item.icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-row-label\">\n @if (item.kind === 'ask-ai') {\n {{ 'CommandPalette.Ask.Label' | transloco: { company: brandName } }}\n @if (item.label) {\n <span class=\"pw-palette-row-prefix\">— {{ item.label }}</span>\n }\n } @else if (item.labelKey) {\n <!-- Action rows are chrome, so they translate (C17), as do page\n rows that carry a key; person rows render the data's own text. -->\n {{ item.labelKey | transloco }}\n } @else {\n {{ item.label }}\n }\n </span>\n @if (item.detail) {\n <span class=\"pw-palette-row-detail\">{{ item.detailKey ? (item.detailKey | transloco) : item.detail }}</span>\n }\n </button>\n }\n </div>\n } @empty {\n <div class=\"pw-palette-empty\">\n <p class=\"pw-palette-empty-title\">{{ 'CommandPalette.Empty.Title' | transloco }}</p>\n <p class=\"pw-palette-empty-hint\">{{ 'CommandPalette.Empty.Hint' | transloco }}</p>\n </div>\n }\n </div>\n\n <div class=\"pw-palette-footer\">\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↑↓</kbd>{{ 'CommandPalette.Hint.Navigate' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↵</kbd>{{ 'CommandPalette.Hint.Open' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">esc</kbd>{{ 'CommandPalette.Hint.Close' | transloco }}</span>\n </div>\n }\n</dialog>\n",
4357
4374
  styles: [":host{display:inline-flex;align-items:center}.pw-palette-trigger{display:flex;align-items:center;gap:8px;width:220px;max-width:100%;height:34px;padding:0 8px 0 12px;border:1px solid #e2e5ea;border-radius:8px;background:#fff;color:#a8afbc;font-size:13px;text-align:left;transition:border-color .15s ease}.pw-palette-trigger:hover,.pw-palette-trigger:focus-visible{border-color:var(--first, #0d6efd);color:#334155}.pw-palette-trigger-icon{font-size:12px}.pw-palette-trigger-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-palette-kbd{padding:1px 6px;border:1px solid #e2e5ea;border-radius:4px;background:#f5f7fa;color:#a8afbc;font-size:11px;line-height:1.5;white-space:nowrap}.pw-palette{position:fixed;top:12vh;right:auto;bottom:auto;left:50%;z-index:1051;width:min(640px,100vw - 32px);max-width:calc(100vw - 32px);max-height:70vh;margin:0;padding:0;transform:translate(-50%);border:1px solid #e2e5ea;border-radius:12px;background:#fff;box-shadow:0 16px 48px #1018282e;overflow:hidden}.pw-palette[open]{display:flex;flex-direction:column}.pw-palette::backdrop{background:#10182852}.pw-palette-search{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid #e2e5ea}.pw-palette-search-icon{color:#a8afbc;font-size:14px}.pw-palette-field{flex:1;border:0;background:transparent;color:#334155;font-size:15px}.pw-palette-field::placeholder{color:#a8afbc}.pw-palette-field:focus{outline:none}.pw-palette-results{flex:1;padding:8px 0;overflow-y:auto}.pw-palette-group+.pw-palette-group{margin-top:4px;padding-top:4px;border-top:1px solid #e2e5ea}.pw-palette-group-label{margin:0;padding:6px 16px 4px;color:#a8afbc;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.pw-palette-row{display:flex;align-items:center;gap:12px;width:100%;min-height:40px;padding:0 16px;border:0;background:transparent;color:#334155;font-size:14px;text-align:left}.pw-palette-row:hover,.pw-palette-row.is-active{background:color-mix(in srgb,var(--first, #0d6efd) 8%,transparent)}.pw-palette-row.is-active{box-shadow:inset 2px 0 0 var(--first, #0d6efd)}.pw-palette-row-icon{flex:0 0 16px;color:#a8afbc;font-size:14px;text-align:center}.pw-palette-row-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-palette-row-prefix{color:#a8afbc}.pw-palette-row-detail{flex:0 1 auto;max-width:45%;overflow:hidden;color:#a8afbc;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.pw-palette-empty{padding:28px 16px;text-align:center}.pw-palette-empty-title{margin:0 0 4px;color:#334155;font-size:14px}.pw-palette-empty-hint{margin:0;color:#a8afbc;font-size:12px}.pw-palette-footer{display:flex;gap:16px;padding:8px 16px;border-top:1px solid #e2e5ea;background:#fbfcfd}.pw-palette-hint{display:flex;align-items:center;gap:6px;color:#a8afbc;font-size:11px}@media(max-width:991px){.pw-palette-trigger{width:34px;padding:0;justify-content:center}.pw-palette-trigger-text,.pw-palette-trigger-kbd{display:none}.pw-palette{top:8vh;max-height:78vh}}\n"],
4358
4375
  dependencies: [{
4359
4376
  kind: "directive",
@@ -4380,7 +4397,7 @@ i0.ɵɵngDeclareClassMetadata({
4380
4397
  selector: "pw-command-palette",
4381
4398
  changeDetection: ChangeDetectionStrategy.OnPush,
4382
4399
  standalone: false,
4383
- template: "<!-- Navbar trigger — keeps the familiar search affordance, states the shortcut. -->\n<button type=\"button\"\n class=\"pw-palette-trigger\"\n (click)=\"palette.open()\"\n [attr.aria-label]=\"'CommandPalette.Trigger.Label' | transloco\">\n <i class=\"fas fa-magnifying-glass pw-palette-trigger-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-trigger-text\">{{ 'CommandPalette.Trigger.Text' | transloco }}</span>\n <kbd class=\"pw-palette-kbd pw-palette-trigger-kbd\">{{ shortcutHint }}</kbd>\n</button>\n\n<!--\n Native <dialog> opened with showModal(): the platform supplies the modal\n semantics this used to hand-roll — the implicit dialog role and modal flag, a real\n focus trap, inert background content, Escape-to-close, and a ::backdrop we\n style instead of painting our own overlay <div>.\n\n The element is always in the DOM (a closed <dialog> is display:none) so the\n component holds one stable handle to call showModal()/close() on; only the\n contents are gated on isOpen so the results list costs nothing while closed.\n-->\n<dialog #paletteDialog\n class=\"pw-palette\"\n [attr.aria-label]=\"'CommandPalette.Aria.Dialog' | transloco\"\n (close)=\"onDialogClose()\">\n @if (isOpen) {\n <div class=\"pw-palette-search\">\n <i class=\"fas fa-magnifying-glass pw-palette-search-icon\" aria-hidden=\"true\"></i>\n <input #queryInput\n type=\"text\"\n class=\"pw-palette-field\"\n autocomplete=\"off\"\n [value]=\"query\"\n (input)=\"onQueryInput($any($event.target).value)\"\n (keydown)=\"onKeydown($event)\"\n [attr.placeholder]=\"'CommandPalette.Placeholder' | transloco\"\n [attr.aria-label]=\"'CommandPalette.Placeholder' | transloco\" />\n <kbd class=\"pw-palette-kbd\">esc</kbd>\n </div>\n\n <div class=\"pw-palette-results\">\n @for (group of groups; track group.labelKey) {\n <div class=\"pw-palette-group\">\n <p class=\"pw-palette-group-label\">{{ group.labelKey | transloco }}</p>\n @for (item of group.items; track item.id) {\n <button type=\"button\"\n class=\"pw-palette-row\"\n [class.is-active]=\"isActive(item)\"\n (click)=\"activate(item)\">\n <i class=\"pw-palette-row-icon\" [ngClass]=\"item.icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-row-label\">\n @if (item.kind === 'ask-ai') {\n {{ 'CommandPalette.Ask.Label' | transloco: { company: brandName } }}\n @if (item.label) {\n <span class=\"pw-palette-row-prefix\">— {{ item.label }}</span>\n }\n } @else if (item.labelKey) {\n <!-- Action rows are chrome, so they translate (C17); page and\n person rows render the data's own text. -->\n {{ item.labelKey | transloco }}\n } @else {\n {{ item.label }}\n }\n </span>\n @if (item.detail) {\n <span class=\"pw-palette-row-detail\">{{ item.detail }}</span>\n }\n </button>\n }\n </div>\n } @empty {\n <div class=\"pw-palette-empty\">\n <p class=\"pw-palette-empty-title\">{{ 'CommandPalette.Empty.Title' | transloco }}</p>\n <p class=\"pw-palette-empty-hint\">{{ 'CommandPalette.Empty.Hint' | transloco }}</p>\n </div>\n }\n </div>\n\n <div class=\"pw-palette-footer\">\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↑↓</kbd>{{ 'CommandPalette.Hint.Navigate' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↵</kbd>{{ 'CommandPalette.Hint.Open' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">esc</kbd>{{ 'CommandPalette.Hint.Close' | transloco }}</span>\n </div>\n }\n</dialog>\n",
4400
+ template: "<!-- Navbar trigger — keeps the familiar search affordance, states the shortcut. -->\n<button type=\"button\"\n class=\"pw-palette-trigger\"\n (click)=\"palette.open()\"\n [attr.aria-label]=\"'CommandPalette.Trigger.Label' | transloco\">\n <i class=\"fas fa-magnifying-glass pw-palette-trigger-icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-trigger-text\">{{ 'CommandPalette.Trigger.Text' | transloco }}</span>\n <kbd class=\"pw-palette-kbd pw-palette-trigger-kbd\">{{ shortcutHint }}</kbd>\n</button>\n\n<!--\n Native <dialog> opened with showModal(): the platform supplies the modal\n semantics this used to hand-roll — the implicit dialog role and modal flag, a real\n focus trap, inert background content, Escape-to-close, and a ::backdrop we\n style instead of painting our own overlay <div>.\n\n The element is always in the DOM (a closed <dialog> is display:none) so the\n component holds one stable handle to call showModal()/close() on; only the\n contents are gated on isOpen so the results list costs nothing while closed.\n-->\n<dialog #paletteDialog\n class=\"pw-palette\"\n [attr.aria-label]=\"'CommandPalette.Aria.Dialog' | transloco\"\n (close)=\"onDialogClose()\">\n @if (isOpen) {\n <div class=\"pw-palette-search\">\n <i class=\"fas fa-magnifying-glass pw-palette-search-icon\" aria-hidden=\"true\"></i>\n <input #queryInput\n type=\"text\"\n class=\"pw-palette-field\"\n autocomplete=\"off\"\n [value]=\"query\"\n (input)=\"onQueryInput($any($event.target).value)\"\n (keydown)=\"onKeydown($event)\"\n [attr.placeholder]=\"'CommandPalette.Placeholder' | transloco\"\n [attr.aria-label]=\"'CommandPalette.Placeholder' | transloco\" />\n <kbd class=\"pw-palette-kbd\">esc</kbd>\n </div>\n\n <div class=\"pw-palette-results\">\n @for (group of groups; track group.labelKey) {\n <div class=\"pw-palette-group\">\n <p class=\"pw-palette-group-label\">{{ group.labelKey | transloco }}</p>\n @for (item of group.items; track item.id) {\n <button type=\"button\"\n class=\"pw-palette-row\"\n [class.is-active]=\"isActive(item)\"\n (click)=\"activate(item)\">\n <i class=\"pw-palette-row-icon\" [ngClass]=\"item.icon\" aria-hidden=\"true\"></i>\n <span class=\"pw-palette-row-label\">\n @if (item.kind === 'ask-ai') {\n {{ 'CommandPalette.Ask.Label' | transloco: { company: brandName } }}\n @if (item.label) {\n <span class=\"pw-palette-row-prefix\">— {{ item.label }}</span>\n }\n } @else if (item.labelKey) {\n <!-- Action rows are chrome, so they translate (C17), as do page\n rows that carry a key; person rows render the data's own text. -->\n {{ item.labelKey | transloco }}\n } @else {\n {{ item.label }}\n }\n </span>\n @if (item.detail) {\n <span class=\"pw-palette-row-detail\">{{ item.detailKey ? (item.detailKey | transloco) : item.detail }}</span>\n }\n </button>\n }\n </div>\n } @empty {\n <div class=\"pw-palette-empty\">\n <p class=\"pw-palette-empty-title\">{{ 'CommandPalette.Empty.Title' | transloco }}</p>\n <p class=\"pw-palette-empty-hint\">{{ 'CommandPalette.Empty.Hint' | transloco }}</p>\n </div>\n }\n </div>\n\n <div class=\"pw-palette-footer\">\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↑↓</kbd>{{ 'CommandPalette.Hint.Navigate' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">↵</kbd>{{ 'CommandPalette.Hint.Open' | transloco }}</span>\n <span class=\"pw-palette-hint\"><kbd class=\"pw-palette-kbd\">esc</kbd>{{ 'CommandPalette.Hint.Close' | transloco }}</span>\n </div>\n }\n</dialog>\n",
4384
4401
  styles: [":host{display:inline-flex;align-items:center}.pw-palette-trigger{display:flex;align-items:center;gap:8px;width:220px;max-width:100%;height:34px;padding:0 8px 0 12px;border:1px solid #e2e5ea;border-radius:8px;background:#fff;color:#a8afbc;font-size:13px;text-align:left;transition:border-color .15s ease}.pw-palette-trigger:hover,.pw-palette-trigger:focus-visible{border-color:var(--first, #0d6efd);color:#334155}.pw-palette-trigger-icon{font-size:12px}.pw-palette-trigger-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-palette-kbd{padding:1px 6px;border:1px solid #e2e5ea;border-radius:4px;background:#f5f7fa;color:#a8afbc;font-size:11px;line-height:1.5;white-space:nowrap}.pw-palette{position:fixed;top:12vh;right:auto;bottom:auto;left:50%;z-index:1051;width:min(640px,100vw - 32px);max-width:calc(100vw - 32px);max-height:70vh;margin:0;padding:0;transform:translate(-50%);border:1px solid #e2e5ea;border-radius:12px;background:#fff;box-shadow:0 16px 48px #1018282e;overflow:hidden}.pw-palette[open]{display:flex;flex-direction:column}.pw-palette::backdrop{background:#10182852}.pw-palette-search{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid #e2e5ea}.pw-palette-search-icon{color:#a8afbc;font-size:14px}.pw-palette-field{flex:1;border:0;background:transparent;color:#334155;font-size:15px}.pw-palette-field::placeholder{color:#a8afbc}.pw-palette-field:focus{outline:none}.pw-palette-results{flex:1;padding:8px 0;overflow-y:auto}.pw-palette-group+.pw-palette-group{margin-top:4px;padding-top:4px;border-top:1px solid #e2e5ea}.pw-palette-group-label{margin:0;padding:6px 16px 4px;color:#a8afbc;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase}.pw-palette-row{display:flex;align-items:center;gap:12px;width:100%;min-height:40px;padding:0 16px;border:0;background:transparent;color:#334155;font-size:14px;text-align:left}.pw-palette-row:hover,.pw-palette-row.is-active{background:color-mix(in srgb,var(--first, #0d6efd) 8%,transparent)}.pw-palette-row.is-active{box-shadow:inset 2px 0 0 var(--first, #0d6efd)}.pw-palette-row-icon{flex:0 0 16px;color:#a8afbc;font-size:14px;text-align:center}.pw-palette-row-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pw-palette-row-prefix{color:#a8afbc}.pw-palette-row-detail{flex:0 1 auto;max-width:45%;overflow:hidden;color:#a8afbc;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.pw-palette-empty{padding:28px 16px;text-align:center}.pw-palette-empty-title{margin:0 0 4px;color:#334155;font-size:14px}.pw-palette-empty-hint{margin:0;color:#a8afbc;font-size:12px}.pw-palette-footer{display:flex;gap:16px;padding:8px 16px;border-top:1px solid #e2e5ea;background:#fbfcfd}.pw-palette-hint{display:flex;align-items:center;gap:6px;color:#a8afbc;font-size:11px}@media(max-width:991px){.pw-palette-trigger{width:34px;padding:0;justify-content:center}.pw-palette-trigger-text,.pw-palette-trigger-kbd{display:none}.pw-palette{top:8vh;max-height:78vh}}\n"]
4385
4402
  }]
4386
4403
  }],
@@ -4421,12 +4438,16 @@ const DEFAULT_COOKIE_KEY = "cookieconsent_status";
4421
4438
  const DEFAULT_COOKIE_VALUE = "dismiss";
4422
4439
  const DEFAULT_COOKIE_TTL_DAYS = 365;
4423
4440
  var PwCookieBannerComponent = class PwCookieBannerComponent {
4424
- constructor(document) {
4441
+ get ariaLabel() {
4442
+ return this.translation.translate("CookieBanner.AriaLabel");
4443
+ }
4444
+ constructor(document, translation) {
4425
4445
  this.document = document;
4426
- this.title = "We value your privacy";
4427
- this.message = "We use cookies to keep this site reliable, remember your preferences, and improve your experience.";
4428
- this.acceptLabel = "Got it";
4429
- this.privacyLinkLabel = "Privacy policy";
4446
+ this.translation = translation;
4447
+ this.title = null;
4448
+ this.message = null;
4449
+ this.acceptLabel = null;
4450
+ this.privacyLinkLabel = null;
4430
4451
  this.privacyLinkUrl = null;
4431
4452
  this.tosId = null;
4432
4453
  this.privacyFallbackUrl = "/privacy-policy";
@@ -4435,7 +4456,6 @@ var PwCookieBannerComponent = class PwCookieBannerComponent {
4435
4456
  this.visible = false;
4436
4457
  this.leaving = false;
4437
4458
  this.role = "region";
4438
- this.ariaLabel = "Cookie preferences";
4439
4459
  }
4440
4460
  ngOnInit() {
4441
4461
  this.visible = !this.hasConsentCookie();
@@ -4477,7 +4497,7 @@ var PwCookieBannerComponent = class PwCookieBannerComponent {
4477
4497
  version: "22.2.3",
4478
4498
  ngImport: i0,
4479
4499
  type: PwCookieBannerComponent,
4480
- deps: [{ token: DOCUMENT }],
4500
+ deps: [{ token: DOCUMENT }, { token: i2$4.TranslocoService }],
4481
4501
  target: i0.ɵɵFactoryTarget.Component
4482
4502
  });
4483
4503
  }
@@ -4504,12 +4524,23 @@ var PwCookieBannerComponent = class PwCookieBannerComponent {
4504
4524
  "attr.aria-label": "this.ariaLabel"
4505
4525
  } },
4506
4526
  ngImport: i0,
4507
- template: "@if (visible) {\n <div\n class=\"pw-cookie-banner\"\n [class.pw-cookie-banner--leaving]=\"leaving\">\n <div class=\"pw-cookie-banner__icon\" aria-hidden=\"true\">\n <i class=\"fas fa-cookie-bite\"></i>\n </div>\n <div class=\"pw-cookie-banner__body\">\n <h3 class=\"pw-cookie-banner__title\">{{ title }}</h3>\n <p class=\"pw-cookie-banner__message\">\n {{ message }}\n <a\n class=\"pw-cookie-banner__link\"\n [href]=\"resolvedPrivacyUrl\"\n target=\"_blank\"\n rel=\"noopener\">\n {{ privacyLinkLabel }}\n </a>\n </p>\n </div>\n <div class=\"pw-cookie-banner__actions\">\n <button\n type=\"button\"\n class=\"pw-cookie-banner__accept\"\n (click)=\"accept()\">\n {{ acceptLabel }}\n </button>\n </div>\n </div>\n}\n",
4527
+ template: "@if (visible) {\n <div\n class=\"pw-cookie-banner\"\n [class.pw-cookie-banner--leaving]=\"leaving\">\n <div class=\"pw-cookie-banner__icon\" aria-hidden=\"true\">\n <i class=\"fas fa-cookie-bite\"></i>\n </div>\n <div class=\"pw-cookie-banner__body\">\n <h3 class=\"pw-cookie-banner__title\">{{ title ?? ('CookieBanner.Title' | transloco) }}</h3>\n <p class=\"pw-cookie-banner__message\">\n {{ message ?? ('CookieBanner.Message' | transloco) }}\n <a\n class=\"pw-cookie-banner__link\"\n [href]=\"resolvedPrivacyUrl\"\n target=\"_blank\"\n rel=\"noopener\">\n {{ privacyLinkLabel ?? ('CookieBanner.PrivacyLink' | transloco) }}\n </a>\n </p>\n </div>\n <div class=\"pw-cookie-banner__actions\">\n <button\n type=\"button\"\n class=\"pw-cookie-banner__accept\"\n (click)=\"accept()\">\n {{ acceptLabel ?? ('CookieBanner.Accept' | transloco) }}\n </button>\n </div>\n </div>\n}\n",
4508
4528
  styles: [":host{position:fixed;bottom:24px;left:24px;z-index:10010;pointer-events:none}@media(max-width:575px){:host{bottom:12px;left:12px;right:12px}}.pw-cookie-banner{pointer-events:auto;display:grid;grid-template-columns:auto 1fr;grid-template-areas:\"icon body\" \"actions actions\";gap:12px 14px;width:380px;max-width:calc(100vw - 48px);padding:18px 18px 16px;background:#fff;border:1px solid #e2e5ea;border-radius:12px;box-shadow:0 12px 40px #0f172a1a,0 2px 8px #0f172a0d;color:#3d4654;animation:pw-cookie-enter .22s cubic-bezier(.16,1,.3,1) both}@media(max-width:575px){.pw-cookie-banner{width:auto;max-width:none;padding:16px;grid-template-columns:auto 1fr;grid-template-areas:\"icon body\" \"actions actions\"}}.pw-cookie-banner--leaving{animation:pw-cookie-leave .2s ease-in both}.pw-cookie-banner__icon{grid-area:icon;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:#f7f8fa;color:var(--first, #1769e1);font-size:18px;flex-shrink:0}.pw-cookie-banner__body{grid-area:body;min-width:0}.pw-cookie-banner__title{margin:0 0 4px;font-size:15px;line-height:1.3;font-weight:600;color:#1a1d21;letter-spacing:-.005em}.pw-cookie-banner__message{margin:0;font-size:13px;line-height:1.55;color:#5a6473}.pw-cookie-banner__link{color:var(--first, #1769e1);text-decoration:none;font-weight:500;white-space:nowrap;margin-left:4px}.pw-cookie-banner__link:hover,.pw-cookie-banner__link:focus-visible{text-decoration:underline;text-underline-offset:2px}.pw-cookie-banner__actions{grid-area:actions;display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:4px}.pw-cookie-banner__dismiss{appearance:none;border:0;cursor:pointer;font-family:inherit;font-size:13px;font-weight:500;line-height:1;color:#5a6473;background:transparent;padding:9px 12px;border-radius:8px;transition:color .16s ease-out,background .16s ease-out}.pw-cookie-banner__dismiss:hover{color:#1a1d21;background:#f7f8fa}.pw-cookie-banner__dismiss:focus-visible{outline:2px solid var(--first, #1769e1);outline-offset:2px}.pw-cookie-banner__dismiss:active{transform:translateY(1px)}.pw-cookie-banner__accept{appearance:none;border:0;cursor:pointer;font-family:inherit;font-size:13px;font-weight:500;line-height:1;color:#fff;background:var(--first, #1769e1);padding:9px 18px;border-radius:var(--public-btn-radius);transition:background .16s ease-out,transform .12s ease-out,box-shadow .16s ease-out}.pw-cookie-banner__accept:hover{background:color-mix(in srgb,var(--first, #1769e1) 88%,#000);box-shadow:0 4px 12px #0f172a1f}.pw-cookie-banner__accept:focus-visible{outline:2px solid var(--first, #1769e1);outline-offset:2px}.pw-cookie-banner__accept:active{transform:translateY(1px)}@keyframes pw-cookie-enter{0%{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes pw-cookie-leave{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@media(prefers-reduced-motion:reduce){.pw-cookie-banner,.pw-cookie-banner--leaving{animation:none}}\n"],
4509
- dependencies: [{
4510
- kind: "ngmodule",
4511
- type: CommonModule
4512
- }]
4529
+ dependencies: [
4530
+ {
4531
+ kind: "ngmodule",
4532
+ type: CommonModule
4533
+ },
4534
+ {
4535
+ kind: "ngmodule",
4536
+ type: CoreTranslocoModule
4537
+ },
4538
+ {
4539
+ kind: "pipe",
4540
+ type: i2$4.TranslocoPipe,
4541
+ name: "transloco"
4542
+ }
4543
+ ]
4513
4544
  });
4514
4545
  }
4515
4546
  };
@@ -4523,8 +4554,8 @@ i0.ɵɵngDeclareClassMetadata({
4523
4554
  args: [{
4524
4555
  selector: "pw-cookie-banner",
4525
4556
  standalone: true,
4526
- imports: [CommonModule],
4527
- template: "@if (visible) {\n <div\n class=\"pw-cookie-banner\"\n [class.pw-cookie-banner--leaving]=\"leaving\">\n <div class=\"pw-cookie-banner__icon\" aria-hidden=\"true\">\n <i class=\"fas fa-cookie-bite\"></i>\n </div>\n <div class=\"pw-cookie-banner__body\">\n <h3 class=\"pw-cookie-banner__title\">{{ title }}</h3>\n <p class=\"pw-cookie-banner__message\">\n {{ message }}\n <a\n class=\"pw-cookie-banner__link\"\n [href]=\"resolvedPrivacyUrl\"\n target=\"_blank\"\n rel=\"noopener\">\n {{ privacyLinkLabel }}\n </a>\n </p>\n </div>\n <div class=\"pw-cookie-banner__actions\">\n <button\n type=\"button\"\n class=\"pw-cookie-banner__accept\"\n (click)=\"accept()\">\n {{ acceptLabel }}\n </button>\n </div>\n </div>\n}\n",
4557
+ imports: [CommonModule, CoreTranslocoModule],
4558
+ template: "@if (visible) {\n <div\n class=\"pw-cookie-banner\"\n [class.pw-cookie-banner--leaving]=\"leaving\">\n <div class=\"pw-cookie-banner__icon\" aria-hidden=\"true\">\n <i class=\"fas fa-cookie-bite\"></i>\n </div>\n <div class=\"pw-cookie-banner__body\">\n <h3 class=\"pw-cookie-banner__title\">{{ title ?? ('CookieBanner.Title' | transloco) }}</h3>\n <p class=\"pw-cookie-banner__message\">\n {{ message ?? ('CookieBanner.Message' | transloco) }}\n <a\n class=\"pw-cookie-banner__link\"\n [href]=\"resolvedPrivacyUrl\"\n target=\"_blank\"\n rel=\"noopener\">\n {{ privacyLinkLabel ?? ('CookieBanner.PrivacyLink' | transloco) }}\n </a>\n </p>\n </div>\n <div class=\"pw-cookie-banner__actions\">\n <button\n type=\"button\"\n class=\"pw-cookie-banner__accept\"\n (click)=\"accept()\">\n {{ acceptLabel ?? ('CookieBanner.Accept' | transloco) }}\n </button>\n </div>\n </div>\n}\n",
4528
4559
  styles: [":host{position:fixed;bottom:24px;left:24px;z-index:10010;pointer-events:none}@media(max-width:575px){:host{bottom:12px;left:12px;right:12px}}.pw-cookie-banner{pointer-events:auto;display:grid;grid-template-columns:auto 1fr;grid-template-areas:\"icon body\" \"actions actions\";gap:12px 14px;width:380px;max-width:calc(100vw - 48px);padding:18px 18px 16px;background:#fff;border:1px solid #e2e5ea;border-radius:12px;box-shadow:0 12px 40px #0f172a1a,0 2px 8px #0f172a0d;color:#3d4654;animation:pw-cookie-enter .22s cubic-bezier(.16,1,.3,1) both}@media(max-width:575px){.pw-cookie-banner{width:auto;max-width:none;padding:16px;grid-template-columns:auto 1fr;grid-template-areas:\"icon body\" \"actions actions\"}}.pw-cookie-banner--leaving{animation:pw-cookie-leave .2s ease-in both}.pw-cookie-banner__icon{grid-area:icon;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;background:#f7f8fa;color:var(--first, #1769e1);font-size:18px;flex-shrink:0}.pw-cookie-banner__body{grid-area:body;min-width:0}.pw-cookie-banner__title{margin:0 0 4px;font-size:15px;line-height:1.3;font-weight:600;color:#1a1d21;letter-spacing:-.005em}.pw-cookie-banner__message{margin:0;font-size:13px;line-height:1.55;color:#5a6473}.pw-cookie-banner__link{color:var(--first, #1769e1);text-decoration:none;font-weight:500;white-space:nowrap;margin-left:4px}.pw-cookie-banner__link:hover,.pw-cookie-banner__link:focus-visible{text-decoration:underline;text-underline-offset:2px}.pw-cookie-banner__actions{grid-area:actions;display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:4px}.pw-cookie-banner__dismiss{appearance:none;border:0;cursor:pointer;font-family:inherit;font-size:13px;font-weight:500;line-height:1;color:#5a6473;background:transparent;padding:9px 12px;border-radius:8px;transition:color .16s ease-out,background .16s ease-out}.pw-cookie-banner__dismiss:hover{color:#1a1d21;background:#f7f8fa}.pw-cookie-banner__dismiss:focus-visible{outline:2px solid var(--first, #1769e1);outline-offset:2px}.pw-cookie-banner__dismiss:active{transform:translateY(1px)}.pw-cookie-banner__accept{appearance:none;border:0;cursor:pointer;font-family:inherit;font-size:13px;font-weight:500;line-height:1;color:#fff;background:var(--first, #1769e1);padding:9px 18px;border-radius:var(--public-btn-radius);transition:background .16s ease-out,transform .12s ease-out,box-shadow .16s ease-out}.pw-cookie-banner__accept:hover{background:color-mix(in srgb,var(--first, #1769e1) 88%,#000);box-shadow:0 4px 12px #0f172a1f}.pw-cookie-banner__accept:focus-visible{outline:2px solid var(--first, #1769e1);outline-offset:2px}.pw-cookie-banner__accept:active{transform:translateY(1px)}@keyframes pw-cookie-enter{0%{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes pw-cookie-leave{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(8px)}}@media(prefers-reduced-motion:reduce){.pw-cookie-banner,.pw-cookie-banner--leaving{animation:none}}\n"]
4529
4560
  }]
4530
4561
  }],
@@ -4534,7 +4565,7 @@ i0.ɵɵngDeclareClassMetadata({
4534
4565
  type: Inject,
4535
4566
  args: [DOCUMENT]
4536
4567
  }]
4537
- }],
4568
+ }, { type: i2$4.TranslocoService }],
4538
4569
  propDecorators: {
4539
4570
  title: [{ type: Input }],
4540
4571
  message: [{ type: Input }],