@thalassic/ui 22.14.0 → 22.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, ViewContainerRef, DestroyRef, viewChild, contentChild, Component, Injectable, makeEnvironmentProviders, forwardRef, PLATFORM_ID, output, effect, ElementRef, afterNextRender, linkedSignal, numberAttribute, Renderer2, viewChildren, contentChildren, isDevMode, untracked, TemplateRef, provideEnvironmentInitializer, DOCUMENT } from '@angular/core';
2
+ import { InjectionToken, inject, model, input, signal, computed, booleanAttribute, Directive, ViewContainerRef, DestroyRef, viewChild, contentChild, Component, Injectable, makeEnvironmentProviders, TemplateRef, forwardRef, PLATFORM_ID, output, effect, ElementRef, afterNextRender, linkedSignal, numberAttribute, Renderer2, viewChildren, contentChildren, isDevMode, untracked, provideEnvironmentInitializer, DOCUMENT } from '@angular/core';
3
3
  import { Overlay } from '@angular/cdk/overlay';
4
4
  import { TemplatePortal, ComponentPortal, CdkPortalOutlet } from '@angular/cdk/portal';
5
5
  import { takeUntilDestroyed, rxResource, toSignal, toObservable } from '@angular/core/rxjs-interop';
@@ -1139,8 +1139,15 @@ class Breadcrumbs {
1139
1139
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
1140
1140
  ariaLabelledby = input(undefined, /* @ts-ignore */
1141
1141
  ...(ngDevMode ? [{ debugName: "ariaLabelledby" }] : /* istanbul ignore next */ []));
1142
+ // Content
1143
+ // Optional projected template for an item's inner content (label/icon),
1144
+ // rendered in place of the built-in label. The list structure, links,
1145
+ // separators, and `aria-current` stay owned by the component. Bind the item
1146
+ // with `<ng-template let-item>`; see BreadcrumbItemContext for the full context.
1147
+ itemTemplate = contentChild(TemplateRef, /* @ts-ignore */
1148
+ ...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
1142
1149
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Breadcrumbs, deps: [], target: i0.ɵɵFactoryTarget.Component });
1143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Breadcrumbs, isStandalone: true, selector: "tls-breadcrumbs", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, separatorIcon: { classPropertyName: "separatorIcon", publicName: "separatorIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "ariaLabelledby() ?? null" }, classAttribute: "tls-breadcrumbs" }, ngImport: i0, template: "<ol class=\"tls-breadcrumbs__list\">\n @for (item of items(); track $index; let isLastItem = $last) {\n <li class=\"tls-breadcrumbs__item\">\n @if (item.link !== undefined) {\n <a\n class=\"tls-breadcrumbs__link\"\n [routerLink]=\"item.link\"\n [attr.aria-current]=\"isLastItem ? 'page' : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </a>\n } @else {\n <span class=\"tls-breadcrumbs__text\" [attr.aria-current]=\"isLastItem ? 'page' : null\">\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n }\n\n @if (!isLastItem) {\n <span class=\"tls-breadcrumbs__separator\" aria-hidden=\"true\">\n <tls-icon [name]=\"separatorIcon()\" />\n </span>\n }\n </li>\n }\n</ol>\n\n<ng-template #itemContent let-item>\n @if (item.icon) {\n <tls-icon class=\"tls-breadcrumbs__item-icon\" [iconSrc]=\"item.icon\" />\n }\n <span class=\"tls-breadcrumbs__label\">{{ item.label }}</span>\n</ng-template>\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
1150
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: Breadcrumbs, isStandalone: true, selector: "tls-breadcrumbs", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, separatorIcon: { classPropertyName: "separatorIcon", publicName: "separatorIcon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "ariaLabelledby() ? null : ariaLabel()", "attr.aria-labelledby": "ariaLabelledby() ?? null" }, classAttribute: "tls-breadcrumbs" }, queries: [{ propertyName: "itemTemplate", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ol class=\"tls-breadcrumbs__list\">\n @for (item of items(); track $index; let index = $index; let isLastItem = $last) {\n <li class=\"tls-breadcrumbs__item\">\n @if (item.link !== undefined) {\n <a\n class=\"tls-breadcrumbs__link\"\n [routerLink]=\"item.link\"\n [attr.aria-current]=\"isLastItem ? 'page' : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index, last: isLastItem }\"\n />\n </a>\n } @else {\n <span class=\"tls-breadcrumbs__text\" [attr.aria-current]=\"isLastItem ? 'page' : null\">\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index, last: isLastItem }\"\n />\n </span>\n }\n\n @if (!isLastItem) {\n <span class=\"tls-breadcrumbs__separator\" aria-hidden=\"true\">\n <tls-icon [name]=\"separatorIcon()\" />\n </span>\n }\n </li>\n }\n</ol>\n\n<ng-template #itemContent let-item let-index=\"index\" let-last=\"last\">\n @if (itemTemplate(); as customTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index, last: last }\"\n />\n } @else {\n @if (item.icon) {\n <tls-icon class=\"tls-breadcrumbs__item-icon\" [iconSrc]=\"item.icon\" />\n }\n <span class=\"tls-breadcrumbs__label\">{{ item.label }}</span>\n }\n</ng-template>\n", dependencies: [{ kind: "component", type: Icon, selector: "tls-icon", inputs: ["name", "iconSrc", "alt", "allowedSources"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }] });
1144
1151
  }
1145
1152
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: Breadcrumbs, decorators: [{
1146
1153
  type: Component,
@@ -1149,8 +1156,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
1149
1156
  class: 'tls-breadcrumbs',
1150
1157
  '[attr.aria-label]': 'ariaLabelledby() ? null : ariaLabel()',
1151
1158
  '[attr.aria-labelledby]': 'ariaLabelledby() ?? null',
1152
- }, template: "<ol class=\"tls-breadcrumbs__list\">\n @for (item of items(); track $index; let isLastItem = $last) {\n <li class=\"tls-breadcrumbs__item\">\n @if (item.link !== undefined) {\n <a\n class=\"tls-breadcrumbs__link\"\n [routerLink]=\"item.link\"\n [attr.aria-current]=\"isLastItem ? 'page' : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </a>\n } @else {\n <span class=\"tls-breadcrumbs__text\" [attr.aria-current]=\"isLastItem ? 'page' : null\">\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n />\n </span>\n }\n\n @if (!isLastItem) {\n <span class=\"tls-breadcrumbs__separator\" aria-hidden=\"true\">\n <tls-icon [name]=\"separatorIcon()\" />\n </span>\n }\n </li>\n }\n</ol>\n\n<ng-template #itemContent let-item>\n @if (item.icon) {\n <tls-icon class=\"tls-breadcrumbs__item-icon\" [iconSrc]=\"item.icon\" />\n }\n <span class=\"tls-breadcrumbs__label\">{{ item.label }}</span>\n</ng-template>\n" }]
1153
- }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], separatorIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorIcon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }] } });
1159
+ }, template: "<ol class=\"tls-breadcrumbs__list\">\n @for (item of items(); track $index; let index = $index; let isLastItem = $last) {\n <li class=\"tls-breadcrumbs__item\">\n @if (item.link !== undefined) {\n <a\n class=\"tls-breadcrumbs__link\"\n [routerLink]=\"item.link\"\n [attr.aria-current]=\"isLastItem ? 'page' : null\"\n >\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index, last: isLastItem }\"\n />\n </a>\n } @else {\n <span class=\"tls-breadcrumbs__text\" [attr.aria-current]=\"isLastItem ? 'page' : null\">\n <ng-container\n [ngTemplateOutlet]=\"itemContent\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index, last: isLastItem }\"\n />\n </span>\n }\n\n @if (!isLastItem) {\n <span class=\"tls-breadcrumbs__separator\" aria-hidden=\"true\">\n <tls-icon [name]=\"separatorIcon()\" />\n </span>\n }\n </li>\n }\n</ol>\n\n<ng-template #itemContent let-item let-index=\"index\" let-last=\"last\">\n @if (itemTemplate(); as customTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"customTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item, index: index, last: last }\"\n />\n } @else {\n @if (item.icon) {\n <tls-icon class=\"tls-breadcrumbs__item-icon\" [iconSrc]=\"item.icon\" />\n }\n <span class=\"tls-breadcrumbs__label\">{{ item.label }}</span>\n }\n</ng-template>\n" }]
1160
+ }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], separatorIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorIcon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledby", required: false }] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
1154
1161
 
1155
1162
  const DEFAULT_BUTTON_CONFIG = {
1156
1163
  color: 'primary',