@daffodil/design 0.92.3 → 0.93.0
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.
- package/accordion/README.md +4 -4
- package/breadcrumb/README.md +13 -35
- package/button/README.md +28 -50
- package/card/README.md +8 -22
- package/card/src/card/stroked/stroked-theme.scss +8 -1
- package/card/src/card-base-theme.scss +12 -1
- package/container/README.md +4 -26
- package/fesm2022/daffodil-design-accordion.mjs +15 -15
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +30 -30
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +20 -20
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +37 -49
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +22 -22
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +31 -31
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +13 -13
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +7 -7
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +13 -12
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +9 -9
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +22 -22
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image.mjs +8 -8
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +12 -11
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-link-set.mjs +16 -16
- package/fesm2022/daffodil-design-link-set.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +20 -17
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-loading-icon.mjs +7 -7
- package/fesm2022/daffodil-design-loading-icon.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +13 -13
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +20 -20
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +32 -26
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +5 -3
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +9 -9
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +16 -16
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +8 -8
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +10 -10
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +13 -13
- package/fesm2022/daffodil-design-quantity-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +16 -16
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +11 -11
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +35 -29
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +7 -7
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +3 -3
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +17 -25
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +20 -20
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-testing.mjs +19 -0
- package/fesm2022/daffodil-design-testing.mjs.map +1 -0
- package/fesm2022/daffodil-design-text-snippet.mjs +3 -3
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +3 -3
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +21 -21
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +27 -25
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +22 -11
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +110 -149
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form/README.md +15 -6
- package/hero/README.md +14 -49
- package/image/README.md +6 -29
- package/input/README.md +8 -34
- package/list/README.md +29 -55
- package/list/src/list-theme.scss +16 -2
- package/media-gallery/README.md +36 -43
- package/menu/README.md +24 -55
- package/menu/src/menu-theme.scss +12 -2
- package/modal/README.md +15 -45
- package/native-select/README.md +8 -6
- package/navbar/README.md +18 -27
- package/notification/README.md +14 -49
- package/package.json +1 -1
- package/paginator/README.md +11 -31
- package/paginator/src/paginator-theme.scss +16 -2
- package/progress-bar/README.md +14 -41
- package/scss/global.scss +21 -2
- package/select/README.md +5 -6
- package/select/src/select-theme.scss +10 -2
- package/sidebar/README.md +1 -1
- package/spinner/README.md +15 -9
- package/switch/README.md +17 -6
- package/tabs/README.md +39 -39
- package/tag/README.md +24 -28
- package/textarea/README.md +9 -7
- package/toast/README.md +55 -52
- package/tree/README.md +12 -43
- package/tree/src/tree-theme.scss +8 -4
- package/{accordion/index.d.ts → types/daffodil-design-accordion.d.ts} +1 -1
- package/{button/index.d.ts → types/daffodil-design-button.d.ts} +7 -8
- package/{input/index.d.ts → types/daffodil-design-input.d.ts} +4 -1
- package/{list/index.d.ts → types/daffodil-design-list.d.ts} +4 -1
- package/{menu/index.d.ts → types/daffodil-design-menu.d.ts} +3 -3
- package/{modal/index.d.ts → types/daffodil-design-modal.d.ts} +11 -5
- package/{native-select/index.d.ts → types/daffodil-design-native-select.d.ts} +3 -1
- package/{sidebar/index.d.ts → types/daffodil-design-sidebar.d.ts} +9 -3
- package/{tabs/index.d.ts → types/daffodil-design-tabs.d.ts} +0 -6
- package/{tag/index.d.ts → types/daffodil-design-tag.d.ts} +9 -8
- package/types/daffodil-design-testing.d.ts +11 -0
- package/{tree/index.d.ts → types/daffodil-design-tree.d.ts} +2 -0
- package/{youtube-player/index.d.ts → types/daffodil-design-youtube-player.d.ts} +15 -0
- package/{index.d.ts → types/daffodil-design.d.ts} +17 -64
- /package/{article/index.d.ts → types/daffodil-design-article.d.ts} +0 -0
- /package/{breadcrumb/index.d.ts → types/daffodil-design-breadcrumb.d.ts} +0 -0
- /package/{callout/index.d.ts → types/daffodil-design-callout.d.ts} +0 -0
- /package/{card/index.d.ts → types/daffodil-design-card.d.ts} +0 -0
- /package/{checkbox/index.d.ts → types/daffodil-design-checkbox.d.ts} +0 -0
- /package/{container/index.d.ts → types/daffodil-design-container.d.ts} +0 -0
- /package/{form-field/index.d.ts → types/daffodil-design-form-field.d.ts} +0 -0
- /package/{form/index.d.ts → types/daffodil-design-form.d.ts} +0 -0
- /package/{hero/index.d.ts → types/daffodil-design-hero.d.ts} +0 -0
- /package/{image/index.d.ts → types/daffodil-design-image.d.ts} +0 -0
- /package/{link-set/index.d.ts → types/daffodil-design-link-set.d.ts} +0 -0
- /package/{loading-icon/index.d.ts → types/daffodil-design-loading-icon.d.ts} +0 -0
- /package/{media-gallery/index.d.ts → types/daffodil-design-media-gallery.d.ts} +0 -0
- /package/{navbar/index.d.ts → types/daffodil-design-navbar.d.ts} +0 -0
- /package/{notification/index.d.ts → types/daffodil-design-notification.d.ts} +0 -0
- /package/{paginator/index.d.ts → types/daffodil-design-paginator.d.ts} +0 -0
- /package/{progress-bar/index.d.ts → types/daffodil-design-progress-bar.d.ts} +0 -0
- /package/{quantity-field/index.d.ts → types/daffodil-design-quantity-field.d.ts} +0 -0
- /package/{radio/index.d.ts → types/daffodil-design-radio.d.ts} +0 -0
- /package/{select/index.d.ts → types/daffodil-design-select.d.ts} +0 -0
- /package/{spinner/index.d.ts → types/daffodil-design-spinner.d.ts} +0 -0
- /package/{switch/index.d.ts → types/daffodil-design-switch.d.ts} +0 -0
- /package/{text-snippet/index.d.ts → types/daffodil-design-text-snippet.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/daffodil-design-textarea.d.ts} +0 -0
- /package/{toast/index.d.ts → types/daffodil-design-toast.d.ts} +0 -0
|
@@ -21,8 +21,8 @@ import { DaffArticleEncapsulatedDirective } from '@daffodil/design';
|
|
|
21
21
|
class DaffArticleCopyButtonComponent {
|
|
22
22
|
constructor() {
|
|
23
23
|
// Content to be copied to clipboard
|
|
24
|
-
this.content = input.required(...(ngDevMode ? [{ debugName: "content" }] : []));
|
|
25
|
-
this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : []));
|
|
24
|
+
this.content = input.required(...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
25
|
+
this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []));
|
|
26
26
|
this.faCopy = faCopy; // default copy icon
|
|
27
27
|
this.faCheck = faCheck; // check icon for copied state
|
|
28
28
|
this._ngZone = inject(NgZone);
|
|
@@ -51,10 +51,10 @@ class DaffArticleCopyButtonComponent {
|
|
|
51
51
|
get ariaLabel() {
|
|
52
52
|
return this.copied() ? 'Copied to clipboard' : 'Copy to clipboard';
|
|
53
53
|
}
|
|
54
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
54
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleCopyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
55
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffArticleCopyButtonComponent, isStandalone: true, selector: "daff-article-copy-button", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n", styles: [":host{display:block;position:absolute;top:.25rem;right:.25rem;z-index:1}\n"], dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }, { kind: "component", type: i1.DaffIconButtonComponent, selector: "button[daff-icon-button],a[daff-icon-button]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
56
56
|
}
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleCopyButtonComponent, decorators: [{
|
|
58
58
|
type: Component,
|
|
59
59
|
args: [{ selector: 'daff-article-copy-button', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
60
60
|
FaIconComponent,
|
|
@@ -113,18 +113,18 @@ class DaffArticleCopyButtonService {
|
|
|
113
113
|
});
|
|
114
114
|
this.buttons = [];
|
|
115
115
|
}
|
|
116
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
117
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
116
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleCopyButtonService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
117
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleCopyButtonService }); }
|
|
118
118
|
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleCopyButtonService, decorators: [{
|
|
120
120
|
type: Injectable
|
|
121
121
|
}] });
|
|
122
122
|
|
|
123
123
|
class DaffArticleHeadingLinkComponent {
|
|
124
124
|
constructor() {
|
|
125
|
-
this.fragment = input.required(...(ngDevMode ? [{ debugName: "fragment" }] : []));
|
|
126
|
-
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
127
|
-
this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : []));
|
|
125
|
+
this.fragment = input.required(...(ngDevMode ? [{ debugName: "fragment" }] : /* istanbul ignore next */ []));
|
|
126
|
+
this.label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
127
|
+
this.copied = signal(false, ...(ngDevMode ? [{ debugName: "copied" }] : /* istanbul ignore next */ []));
|
|
128
128
|
this.faLink = faLink; // default link icon
|
|
129
129
|
this.faCheck = faCheck; // check icon for copied state
|
|
130
130
|
this._ngZone = inject(NgZone);
|
|
@@ -162,10 +162,10 @@ class DaffArticleHeadingLinkComponent {
|
|
|
162
162
|
get ariaLabel() {
|
|
163
163
|
return this.copied() ? 'Copied link to clipboard' : 'Copy link to clipboard';
|
|
164
164
|
}
|
|
165
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
166
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
165
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleHeadingLinkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
166
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffArticleHeadingLinkComponent, isStandalone: true, selector: "daff-article-heading-link", inputs: { fragment: { classPropertyName: "fragment", publicName: "fragment", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: i1$1.DaffArticleEncapsulatedDirective }], ngImport: i0, template: "<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}@media(hover:hover){:host:hover .daff-article-heading-link__button{opacity:1}}.daff-article-heading-link__anchor{text-decoration:none}.daff-article-heading-link__button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;font-size:1rem;opacity:0;margin:0;padding:0;height:1.5rem;width:1.5rem;transition:opacity .2s ease}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
167
167
|
}
|
|
168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleHeadingLinkComponent, decorators: [{
|
|
169
169
|
type: Component,
|
|
170
170
|
args: [{ selector: 'daff-article-heading-link', changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
|
|
171
171
|
{ directive: DaffArticleEncapsulatedDirective },
|
|
@@ -173,7 +173,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
173
173
|
RouterLink,
|
|
174
174
|
FaIconComponent,
|
|
175
175
|
DAFF_ICON_BUTTON_COMPONENTS,
|
|
176
|
-
], template: "<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}:host:hover .daff-article-heading-link__button{opacity:1}.daff-article-heading-link__anchor{text-decoration:none}.daff-article-heading-link__button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;font-size:1rem;opacity:0;margin:0;padding:0;height:1.5rem;width:1.5rem;transition:opacity .2s ease}\n"] }]
|
|
176
|
+
], template: "<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n", styles: [":host{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}@media(hover:hover){:host:hover .daff-article-heading-link__button{opacity:1}}.daff-article-heading-link__anchor{text-decoration:none}.daff-article-heading-link__button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;font-size:1rem;opacity:0;margin:0;padding:0;height:1.5rem;width:1.5rem;transition:opacity .2s ease}\n"] }]
|
|
177
177
|
}], propDecorators: { fragment: [{ type: i0.Input, args: [{ isSignal: true, alias: "fragment", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
|
|
178
178
|
|
|
179
179
|
class DaffArticleHeadingLinkService {
|
|
@@ -239,10 +239,10 @@ class DaffArticleHeadingLinkService {
|
|
|
239
239
|
.replace(/-+/g, '-')
|
|
240
240
|
.trim();
|
|
241
241
|
}
|
|
242
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
243
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
242
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleHeadingLinkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
243
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleHeadingLinkService }); }
|
|
244
244
|
}
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleHeadingLinkService, decorators: [{
|
|
246
246
|
type: Injectable
|
|
247
247
|
}] });
|
|
248
248
|
|
|
@@ -267,13 +267,13 @@ class DaffArticleComponent {
|
|
|
267
267
|
this.headingLinkService.cleanup();
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
271
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
270
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleComponent, deps: [{ token: DaffArticleCopyButtonService }, { token: DaffArticleHeadingLinkService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
271
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffArticleComponent, isStandalone: true, selector: "daff-article", host: { attributes: { "role": "article" }, classAttribute: "daff-article" }, providers: [
|
|
272
272
|
DaffArticleCopyButtonService,
|
|
273
273
|
DaffArticleHeadingLinkService,
|
|
274
|
-
], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
274
|
+
], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}@media(hover:hover){.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
275
275
|
}
|
|
276
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleComponent, decorators: [{
|
|
277
277
|
type: Component,
|
|
278
278
|
args: [{ selector: 'daff-article', template: '<ng-content></ng-content>', host: {
|
|
279
279
|
class: 'daff-article',
|
|
@@ -281,15 +281,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
281
281
|
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
282
282
|
DaffArticleCopyButtonService,
|
|
283
283
|
DaffArticleHeadingLinkService,
|
|
284
|
-
], styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"] }]
|
|
284
|
+
], styles: [".daff-article{display:block;overflow:hidden}.daff-article a:not(.daff-ae *,.daff-ae){font-weight:500;text-decoration:none}@media(hover:hover){.daff-article a:not(.daff-ae *,.daff-ae):hover{text-decoration:underline}}.daff-article a:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae),.daff-article h2:not(.daff-ae *,.daff-ae),.daff-article h3:not(.daff-ae *,.daff-ae),.daff-article h4:not(.daff-ae *,.daff-ae),.daff-article h5:not(.daff-ae *,.daff-ae),.daff-article h6:not(.daff-ae *,.daff-ae){font-weight:600;margin-bottom:1rem;overflow-wrap:break-word}.daff-article h1:not(.daff-ae *,.daff-ae) code,.daff-article h2:not(.daff-ae *,.daff-ae) code,.daff-article h3:not(.daff-ae *,.daff-ae) code,.daff-article h4:not(.daff-ae *,.daff-ae) code,.daff-article h5:not(.daff-ae *,.daff-ae) code,.daff-article h6:not(.daff-ae *,.daff-ae) code{font-size:.875rem;font-weight:600;line-height:.875rem}.daff-article h1:not(.daff-ae *,.daff-ae){word-break:break-all;font-size:2rem;font-weight:600;line-height:2.25rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae){font-size:3rem;line-height:3.5rem}}.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.125rem;line-height:1.5rem;font-weight:400}.daff-article h1:not(.daff-ae *,.daff-ae)+p code{font-size:1rem;line-height:1rem}@media(min-width:768px){.daff-article h1:not(.daff-ae *,.daff-ae)+p{font-size:1.25rem;font-weight:400;line-height:1.75rem}}.daff-article h2:not(.daff-ae *,.daff-ae){font-size:1.75rem;line-height:2rem;margin-top:2.5rem}@media(min-width:768px){.daff-article h2:not(.daff-ae *,.daff-ae){font-size:2rem;line-height:2.5rem}}.daff-article h2:not(.daff-ae *,.daff-ae):first-child{margin-top:0}.daff-article h3:not(.daff-ae *,.daff-ae){font-size:1.5rem;line-height:2rem;margin-top:2.5rem}.daff-article h4:not(.daff-ae *,.daff-ae){font-size:1.25rem;line-height:1.5rem;margin-top:2rem}.daff-article h5:not(.daff-ae *,.daff-ae){font-size:1.125rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article h6:not(.daff-ae *,.daff-ae){font-size:1rem;font-weight:600;line-height:1.5rem;margin-top:1.5rem}.daff-article p:not(.daff-ae *,.daff-ae){margin:0 0 1rem}.daff-article strong{font-weight:600}.daff-article pre{border-radius:.5rem;position:relative}.daff-article pre:last-child{margin-bottom:0}.daff-article pre code{display:block;line-height:1.5rem;font-size:.875rem;overflow-x:auto;padding:1.5rem}.daff-article code{border-radius:.25rem;font-size:.875rem;line-height:1rem;padding:.125rem .25rem}.daff-article__meta{font-size:.875rem}.daff-article hr{border:0;height:1px;margin:2rem 0}.daff-article blockquote{border-radius:.25rem;margin:1.5rem 0;padding:1rem}@media(min-width:768px){.daff-article blockquote{padding:1rem 1.5rem}}.daff-article blockquote:last-child{margin-bottom:0}.daff-article blockquote cite{font-size:.875rem;font-weight:400;line-height:1.25rem;display:block;margin-top:1rem}.daff-article blockquote p:last-of-type{margin:0}.daff-article table{display:table;border-collapse:separate;border-spacing:0;border-radius:.25rem;font-size:1rem;line-height:1.25rem;margin:1.5rem 0;overflow:hidden}.daff-article table:last-child{margin-bottom:0}.daff-article table th{font-weight:600;outline:0;padding:1rem;text-align:left;vertical-align:top;box-sizing:border-box}.daff-article table td{padding:1rem;vertical-align:top;box-sizing:border-box}.daff-article table td p:only-child,.daff-article table td p:last-child{margin:0}\n"] }]
|
|
285
285
|
}], ctorParameters: () => [{ type: DaffArticleCopyButtonService }, { type: DaffArticleHeadingLinkService }] });
|
|
286
286
|
|
|
287
287
|
/* eslint-disable quote-props */
|
|
288
288
|
class DaffArticleMetaDirective {
|
|
289
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
290
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
289
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleMetaDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
290
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffArticleMetaDirective, isStandalone: true, selector: "[daffArticleMeta]", host: { classAttribute: "daff-article__meta" }, ngImport: i0 }); }
|
|
291
291
|
}
|
|
292
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleMetaDirective, decorators: [{
|
|
293
293
|
type: Directive,
|
|
294
294
|
args: [{
|
|
295
295
|
selector: '[daffArticleMeta]',
|
|
@@ -303,14 +303,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
303
303
|
* @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
304
304
|
*/
|
|
305
305
|
class DaffArticleModule {
|
|
306
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
307
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
306
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
307
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleModule, imports: [CommonModule,
|
|
308
308
|
DaffArticleComponent,
|
|
309
309
|
DaffArticleMetaDirective], exports: [DaffArticleComponent,
|
|
310
310
|
DaffArticleMetaDirective] }); }
|
|
311
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
311
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleModule, imports: [CommonModule] }); }
|
|
312
312
|
}
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffArticleModule, decorators: [{
|
|
314
314
|
type: NgModule,
|
|
315
315
|
args: [{
|
|
316
316
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-article.mjs","sources":["../../../libs/design/article/src/article-copy-button/copy-button/copy-button.component.ts","../../../libs/design/article/src/article-copy-button/copy-button/copy-button.component.html","../../../libs/design/article/src/article-copy-button/service/copy-button.service.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.html","../../../libs/design/article/src/article-heading-link/service/heading-link.service.ts","../../../libs/design/article/src/article/article.component.ts","../../../libs/design/article/src/article-meta/article-meta.directive.ts","../../../libs/design/article/src/article.module.ts","../../../libs/design/article/src/article.ts","../../../libs/design/article/src/daffodil-design-article.ts"],"sourcesContent":["import {\n Component,\n NgZone,\n ChangeDetectionStrategy,\n input,\n signal,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faCheck,\n faCopy,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n/**\n * DaffArticleCopyButtonComponent is a button that copies text content to the clipboard.\n * It provides visual feedback by changing the icon when content is successfully copied.\n *\n * @example\n * ```html\n * <daff-article-copy-button [content]=\"codeSnippet\" />\n * ```\n */\n@Component({\n selector: 'daff-article-copy-button',\n templateUrl: './copy-button.component.html',\n styleUrl: './copy-button.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleCopyButtonComponent implements OnDestroy {\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n // Content to be copied to clipboard\n content = input.required<string>();\n\n protected copied = signal(false);\n\n protected readonly faCopy = faCopy; // default copy icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyToClipboard(): Promise<void> {\n try {\n // Write content to clipboard\n await navigator.clipboard.writeText(this.content());\n this.copied.set(true);\n clearTimeout(this.timeoutId);\n this._ngZone.runOutsideAngular(() => {\n this.timeoutId = setTimeout(() => {\n this._ngZone.run(() => this.copied.set(false));\n }, 1500);\n });\n } catch (err) {\n console.error('Failed to copy text: ', err);\n }\n }\n\n get ariaLabel() {\n return this.copied() ? 'Copied to clipboard' : 'Copy to clipboard';\n }\n}\n","<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonComponent } from '../copy-button/copy-button.component';\n\ninterface ButtonEntry {\n buttonRef: ComponentRef<DaffArticleCopyButtonComponent>;\n preElement: HTMLPreElement;\n}\n\n@Injectable()\nexport class DaffArticleCopyButtonService {\n private buttons: Array<ButtonEntry> = [];\n\n /**\n * Finds all code blocks and adds copy buttons to them.\n * Skips code blocks with the `nocopy` attribute.\n * @param hostElement - The host element to search for code blocks.\n * @param viewContainerRef - The view container to create the copy button components.\n */\n addCopyButtonsToCodeBlocks(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const codeBlocks = hostElement.querySelectorAll('pre');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n codeBlocks.forEach((pre: HTMLPreElement) => {\n const code = pre.querySelector('code');\n if (!code) {\n return;\n }\n\n // Skip if nocopy attribute is present\n if (pre.hasAttribute('nocopy')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(pre))) {\n return;\n }\n\n // Skip if already has a copy button\n if (pre.querySelector('daff-article-copy-button')) {\n return;\n }\n\n const textContent = code.textContent || '';\n\n // Create the copy button component\n const buttonRef = viewContainerRef.createComponent(DaffArticleCopyButtonComponent);\n buttonRef.setInput('content', textContent);\n\n // Insert button into pre before the code element\n pre.insertBefore(buttonRef.location.nativeElement, code);\n\n this.buttons.push({\n buttonRef,\n preElement: pre,\n });\n });\n }\n\n /**\n * Cleanup copy button references\n */\n cleanup(): void {\n this.buttons.forEach(({ buttonRef }) => {\n buttonRef.destroy();\n });\n this.buttons = [];\n }\n}\n","import {\n DOCUMENT,\n isPlatformBrowser,\n} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n NgZone,\n OnDestroy,\n signal,\n PLATFORM_ID,\n} from '@angular/core';\nimport {\n Router,\n RouterLink,\n} from '@angular/router';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faLink,\n faCheck,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n@Component({\n selector: 'daff-article-heading-link',\n templateUrl: './heading-link.component.html',\n styleUrl: './heading-link.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n ],\n imports: [\n RouterLink,\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleHeadingLinkComponent implements OnDestroy {\n fragment = input.required<string>();\n label = input.required<string>();\n\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n protected copied = signal(false);\n\n protected readonly faLink = faLink; // default link icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n private _router = inject(Router);\n private _platformId = inject(PLATFORM_ID);\n private _document = inject(DOCUMENT);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyLink(): Promise<void> {\n if (!isPlatformBrowser(this._platformId)) {\n return;\n }\n\n try {\n // Get the URL to fragment\n const currentUrl = this._router.url.split('#')[0]; // Remove existing fragment if any\n const fullUrl = `${this._document.defaultView?.location.origin || ''}${currentUrl}#${this.fragment()}`;\n\n // Write full URL to clipboard\n await navigator.clipboard.writeText(fullUrl);\n this.copied.set(true);\n clearTimeout(this.timeoutId);\n this._ngZone.runOutsideAngular(() => {\n this.timeoutId = setTimeout(() => {\n this._ngZone.run(() => this.copied.set(false));\n }, 1500);\n });\n } catch (err) {\n console.error('Failed to copy text: ', err);\n }\n }\n\n get ariaLabel() {\n return this.copied() ? 'Copied link to clipboard' : 'Copy link to clipboard';\n }\n}\n","<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleHeadingLinkComponent } from '../heading-link/heading-link.component';\n\ninterface LinkEntry {\n linkRef: ComponentRef<DaffArticleHeadingLinkComponent>;\n headingElement: HTMLHeadingElement;\n}\n\n@Injectable()\nexport class DaffArticleHeadingLinkService {\n private links: Array<LinkEntry> = [];\n\n /**\n * Finds all h2, h3, and h4 elements and wraps their text content with heading link components.\n * @param hostElement - The host element to search for heading elements.\n * @param viewContainerRef - The view container to create the heading link components.\n */\n addLinksToHeadings(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const headings = hostElement.querySelectorAll('h2, h3, h4');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n headings.forEach((heading: HTMLHeadingElement) => {\n if (heading.querySelector('daff-article-heading-link')) {\n return;\n }\n\n // Skip if nolink attribute is present\n if (heading.hasAttribute('nolink')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(heading))) {\n return;\n }\n\n const textContent = heading.textContent?.trim() || '';\n const fragment = heading.id || this.generateFragment(textContent);\n\n // Set the id on the heading if it doesn't have one\n if (!heading.id) {\n heading.id = fragment;\n }\n\n // Create the heading link component and set its inputs\n const linkRef = viewContainerRef.createComponent(DaffArticleHeadingLinkComponent);\n linkRef.setInput('fragment', fragment);\n linkRef.setInput('label', textContent);\n\n // Clear the heading's content and append the link component\n heading.innerHTML = '';\n heading.appendChild(linkRef.location.nativeElement);\n\n this.links.push({\n linkRef,\n headingElement: heading,\n });\n });\n }\n\n /**\n * Cleanup heading link references\n */\n cleanup(): void {\n this.links.forEach(({ linkRef }) => {\n linkRef.destroy();\n });\n this.links = [];\n }\n\n /**\n * Generates a URL-friendly fragment from heading text\n */\n private generateFragment(text: string): string {\n return text\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/\\s+/g, '-')\n .replace(/-+/g, '-')\n .trim();\n }\n}\n","import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ViewContainerRef,\n inject,\n DestroyRef,\n afterEveryRender,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonService } from '../article-copy-button/service/copy-button.service';\nimport { DaffArticleHeadingLinkService } from '../article-heading-link/service/heading-link.service';\n\n/**\n * A component for creating articles within your page.\n */\n@Component({\n selector: 'daff-article',\n template: '<ng-content></ng-content>',\n styleUrl: './article.component.scss',\n host: {\n class: 'daff-article',\n role: 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffArticleCopyButtonService,\n DaffArticleHeadingLinkService,\n ],\n})\nexport class DaffArticleComponent {\n constructor(\n private copyButtonService: DaffArticleCopyButtonService,\n private headingLinkService: DaffArticleHeadingLinkService,\n ) {\n const elementRef = inject(ElementRef<HTMLElement>);\n const viewContainerRef = inject(ViewContainerRef);\n\n afterEveryRender({\n write: () => {\n this.copyButtonService.addCopyButtonsToCodeBlocks(elementRef.nativeElement, viewContainerRef);\n this.headingLinkService.addLinksToHeadings(elementRef.nativeElement, viewContainerRef);\n },\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n this.copyButtonService.cleanup();\n this.headingLinkService.cleanup();\n });\n }\n}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n@Directive({\n selector: '[daffArticleMeta]',\n host: {\n 'class': 'daff-article__meta',\n },\n})\nexport class DaffArticleMetaDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n exports: [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n})\nexport class DaffArticleModule { }\n","import { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_ARTICLE_COMPONENTS = <const> [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.DaffArticleCopyButtonService","i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AAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAT1B,YAAY;YACZ,oBAAoB;AACpB,YAAA,wBAAwB,aAGxB,oBAAoB;YACpB,wBAAwB,CAAA,EAAA,CAAA,CAAA;AAGf,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAT1B,YAAY,CAAA,EAAA,CAAA,CAAA;;4FASH,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAX7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,oBAAoB;wBACpB,wBAAwB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,wBAAwB;AACzB,qBAAA;AACF,iBAAA;;;AChBD;;AAEG;AACI,MAAM,uBAAuB,GAAW;IAC7C,oBAAoB;IACpB,wBAAwB;;;ACR1B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-design-article.mjs","sources":["../../../libs/design/article/src/article-copy-button/copy-button/copy-button.component.ts","../../../libs/design/article/src/article-copy-button/copy-button/copy-button.component.html","../../../libs/design/article/src/article-copy-button/service/copy-button.service.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.ts","../../../libs/design/article/src/article-heading-link/heading-link/heading-link.component.html","../../../libs/design/article/src/article-heading-link/service/heading-link.service.ts","../../../libs/design/article/src/article/article.component.ts","../../../libs/design/article/src/article-meta/article-meta.directive.ts","../../../libs/design/article/src/article.module.ts","../../../libs/design/article/src/article.ts","../../../libs/design/article/src/daffodil-design-article.ts"],"sourcesContent":["import {\n Component,\n NgZone,\n ChangeDetectionStrategy,\n input,\n signal,\n OnDestroy,\n inject,\n} from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faCheck,\n faCopy,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n/**\n * DaffArticleCopyButtonComponent is a button that copies text content to the clipboard.\n * It provides visual feedback by changing the icon when content is successfully copied.\n *\n * @example\n * ```html\n * <daff-article-copy-button [content]=\"codeSnippet\" />\n * ```\n */\n@Component({\n selector: 'daff-article-copy-button',\n templateUrl: './copy-button.component.html',\n styleUrl: './copy-button.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleCopyButtonComponent implements OnDestroy {\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n // Content to be copied to clipboard\n content = input.required<string>();\n\n protected copied = signal(false);\n\n protected readonly faCopy = faCopy; // default copy icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyToClipboard(): Promise<void> {\n try {\n // Write content to clipboard\n await navigator.clipboard.writeText(this.content());\n this.copied.set(true);\n clearTimeout(this.timeoutId);\n this._ngZone.runOutsideAngular(() => {\n this.timeoutId = setTimeout(() => {\n this._ngZone.run(() => this.copied.set(false));\n }, 1500);\n });\n } catch (err) {\n console.error('Failed to copy text: ', err);\n }\n }\n\n get ariaLabel() {\n return this.copied() ? 'Copied to clipboard' : 'Copy to clipboard';\n }\n}\n","<button\n daff-icon-button\n class=\"daff-article__copy-button\"\n size=\"sm\"\n type=\"button\"\n [attr.aria-label]=\"ariaLabel\"\n (click)=\"copyToClipboard()\">\n @if (copied()) {\n <fa-icon [icon]=\"faCheck\" />\n } @else {\n <fa-icon [icon]=\"faCopy\" />\n }\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonComponent } from '../copy-button/copy-button.component';\n\ninterface ButtonEntry {\n buttonRef: ComponentRef<DaffArticleCopyButtonComponent>;\n preElement: HTMLPreElement;\n}\n\n@Injectable()\nexport class DaffArticleCopyButtonService {\n private buttons: Array<ButtonEntry> = [];\n\n /**\n * Finds all code blocks and adds copy buttons to them.\n * Skips code blocks with the `nocopy` attribute.\n * @param hostElement - The host element to search for code blocks.\n * @param viewContainerRef - The view container to create the copy button components.\n */\n addCopyButtonsToCodeBlocks(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const codeBlocks = hostElement.querySelectorAll('pre');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n codeBlocks.forEach((pre: HTMLPreElement) => {\n const code = pre.querySelector('code');\n if (!code) {\n return;\n }\n\n // Skip if nocopy attribute is present\n if (pre.hasAttribute('nocopy')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(pre))) {\n return;\n }\n\n // Skip if already has a copy button\n if (pre.querySelector('daff-article-copy-button')) {\n return;\n }\n\n const textContent = code.textContent || '';\n\n // Create the copy button component\n const buttonRef = viewContainerRef.createComponent(DaffArticleCopyButtonComponent);\n buttonRef.setInput('content', textContent);\n\n // Insert button into pre before the code element\n pre.insertBefore(buttonRef.location.nativeElement, code);\n\n this.buttons.push({\n buttonRef,\n preElement: pre,\n });\n });\n }\n\n /**\n * Cleanup copy button references\n */\n cleanup(): void {\n this.buttons.forEach(({ buttonRef }) => {\n buttonRef.destroy();\n });\n this.buttons = [];\n }\n}\n","import {\n DOCUMENT,\n isPlatformBrowser,\n} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n NgZone,\n OnDestroy,\n signal,\n PLATFORM_ID,\n} from '@angular/core';\nimport {\n Router,\n RouterLink,\n} from '@angular/router';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport {\n faLink,\n faCheck,\n} from '@fortawesome/free-solid-svg-icons';\n\nimport { DaffArticleEncapsulatedDirective } from '@daffodil/design';\nimport { DAFF_ICON_BUTTON_COMPONENTS } from '@daffodil/design/button';\n\n@Component({\n selector: 'daff-article-heading-link',\n templateUrl: './heading-link.component.html',\n styleUrl: './heading-link.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n ],\n imports: [\n RouterLink,\n FaIconComponent,\n DAFF_ICON_BUTTON_COMPONENTS,\n ],\n})\nexport class DaffArticleHeadingLinkComponent implements OnDestroy {\n fragment = input.required<string>();\n label = input.required<string>();\n\n private timeoutId?: ReturnType<typeof setTimeout>;\n\n protected copied = signal(false);\n\n protected readonly faLink = faLink; // default link icon\n protected readonly faCheck = faCheck; // check icon for copied state\n private _ngZone = inject(NgZone);\n private _router = inject(Router);\n private _platformId = inject(PLATFORM_ID);\n private _document = inject(DOCUMENT);\n\n ngOnDestroy() {\n if (this.timeoutId) {\n clearTimeout(this.timeoutId);\n }\n }\n\n async copyLink(): Promise<void> {\n if (!isPlatformBrowser(this._platformId)) {\n return;\n }\n\n try {\n // Get the URL to fragment\n const currentUrl = this._router.url.split('#')[0]; // Remove existing fragment if any\n const fullUrl = `${this._document.defaultView?.location.origin || ''}${currentUrl}#${this.fragment()}`;\n\n // Write full URL to clipboard\n await navigator.clipboard.writeText(fullUrl);\n this.copied.set(true);\n clearTimeout(this.timeoutId);\n this._ngZone.runOutsideAngular(() => {\n this.timeoutId = setTimeout(() => {\n this._ngZone.run(() => this.copied.set(false));\n }, 1500);\n });\n } catch (err) {\n console.error('Failed to copy text: ', err);\n }\n }\n\n get ariaLabel() {\n return this.copied() ? 'Copied link to clipboard' : 'Copy link to clipboard';\n }\n}\n","<a class=\"daff-article-heading-link__anchor\" routerLink=\".\" [fragment]=\"fragment()\" queryParamsHandling=\"preserve\">\n\t{{ label() }}\n</a>\n<button class=\"daff-article-heading-link__button\" [attr.aria-label]=\"ariaLabel\" (click)=\"copyLink()\">\n\t@if (copied()) {\n\t\t<fa-icon [icon]=\"faCheck\"></fa-icon>\n\t} @else {\n\t\t<fa-icon [icon]=\"faLink\"></fa-icon>\n\t}\n</button>\n","import {\n Injectable,\n ComponentRef,\n ViewContainerRef,\n} from '@angular/core';\n\nimport { DaffArticleHeadingLinkComponent } from '../heading-link/heading-link.component';\n\ninterface LinkEntry {\n linkRef: ComponentRef<DaffArticleHeadingLinkComponent>;\n headingElement: HTMLHeadingElement;\n}\n\n@Injectable()\nexport class DaffArticleHeadingLinkService {\n private links: Array<LinkEntry> = [];\n\n /**\n * Finds all h2, h3, and h4 elements and wraps their text content with heading link components.\n * @param hostElement - The host element to search for heading elements.\n * @param viewContainerRef - The view container to create the heading link components.\n */\n addLinksToHeadings(\n hostElement: HTMLElement,\n viewContainerRef: ViewContainerRef,\n ): void {\n const headings = hostElement.querySelectorAll('h2, h3, h4');\n const encapsulatedElements = Array.from(hostElement.querySelectorAll('.daff-ae'));\n\n headings.forEach((heading: HTMLHeadingElement) => {\n if (heading.querySelector('daff-article-heading-link')) {\n return;\n }\n\n // Skip if nolink attribute is present\n if (heading.hasAttribute('nolink')) {\n return;\n }\n\n // Skip if inside an article-encapsulated component\n if (encapsulatedElements.some(ee => ee.contains(heading))) {\n return;\n }\n\n const textContent = heading.textContent?.trim() || '';\n const fragment = heading.id || this.generateFragment(textContent);\n\n // Set the id on the heading if it doesn't have one\n if (!heading.id) {\n heading.id = fragment;\n }\n\n // Create the heading link component and set its inputs\n const linkRef = viewContainerRef.createComponent(DaffArticleHeadingLinkComponent);\n linkRef.setInput('fragment', fragment);\n linkRef.setInput('label', textContent);\n\n // Clear the heading's content and append the link component\n heading.innerHTML = '';\n heading.appendChild(linkRef.location.nativeElement);\n\n this.links.push({\n linkRef,\n headingElement: heading,\n });\n });\n }\n\n /**\n * Cleanup heading link references\n */\n cleanup(): void {\n this.links.forEach(({ linkRef }) => {\n linkRef.destroy();\n });\n this.links = [];\n }\n\n /**\n * Generates a URL-friendly fragment from heading text\n */\n private generateFragment(text: string): string {\n return text\n .toLowerCase()\n .replace(/[^\\w\\s-]/g, '')\n .replace(/\\s+/g, '-')\n .replace(/-+/g, '-')\n .trim();\n }\n}\n","import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ElementRef,\n ViewContainerRef,\n inject,\n DestroyRef,\n afterEveryRender,\n} from '@angular/core';\n\nimport { DaffArticleCopyButtonService } from '../article-copy-button/service/copy-button.service';\nimport { DaffArticleHeadingLinkService } from '../article-heading-link/service/heading-link.service';\n\n/**\n * A component for creating articles within your page.\n */\n@Component({\n selector: 'daff-article',\n template: '<ng-content></ng-content>',\n styleUrl: './article.component.scss',\n host: {\n class: 'daff-article',\n role: 'article',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n DaffArticleCopyButtonService,\n DaffArticleHeadingLinkService,\n ],\n})\nexport class DaffArticleComponent {\n constructor(\n private copyButtonService: DaffArticleCopyButtonService,\n private headingLinkService: DaffArticleHeadingLinkService,\n ) {\n const elementRef = inject(ElementRef<HTMLElement>);\n const viewContainerRef = inject(ViewContainerRef);\n\n afterEveryRender({\n write: () => {\n this.copyButtonService.addCopyButtonsToCodeBlocks(elementRef.nativeElement, viewContainerRef);\n this.headingLinkService.addLinksToHeadings(elementRef.nativeElement, viewContainerRef);\n },\n });\n\n const destroyRef = inject(DestroyRef);\n destroyRef.onDestroy(() => {\n this.copyButtonService.cleanup();\n this.headingLinkService.cleanup();\n });\n }\n}\n","/* eslint-disable quote-props */\nimport { Directive } from '@angular/core';\n\n@Directive({\n selector: '[daffArticleMeta]',\n host: {\n 'class': 'daff-article__meta',\n },\n})\nexport class DaffArticleMetaDirective {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @deprecated in favor of {@link DAFF_ARTICLE_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n CommonModule,\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n exports: [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n ],\n})\nexport class DaffArticleModule { }\n","import { DaffArticleComponent } from './article/article.component';\nimport { DaffArticleMetaDirective } from './article-meta/article-meta.directive';\n\n/**\n * @docs-private\n */\nexport const DAFF_ARTICLE_COMPONENTS = <const> [\n DaffArticleComponent,\n DaffArticleMetaDirective,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i1.DaffArticleCopyButtonService","i2.DaffArticleHeadingLinkService"],"mappings":";;;;;;;;;;;AAiBA;;;;;;;;AAQG;MAWU,8BAA8B,CAAA;AAV3C,IAAA,WAAA,GAAA;;AAcE,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAU;AAExB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,KAAK,6EAAC;AAEb,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC;AAChB,QAAA,IAAA,CAAA,OAAO,GAAG,OAAO,CAAC;AAC7B,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AA2BjC,IAAA;IAzBC,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,YAAA,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;QAC9B;IACF;AAEA,IAAA,MAAM,eAAe,GAAA;AACnB,QAAA,IAAI;;YAEF,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;AACnD,YAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;AACrB,YAAA,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;AAC5B,YAAA,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAK;AAClC,gBAAA,IAAI,CAA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.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
36
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
35
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbItemComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.9", type: DaffBreadcrumbItemComponent, isStandalone: true, selector: "li[daffBreadcrumbItem]", host: { properties: { "attr.aria-current": "_active ? \"page\" : null" }, classAttribute: "daff-breadcrumb__item" }, viewQueries: [{ propertyName: "itemRef", first: true, predicate: ["item"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: `
|
|
37
37
|
<ng-template #item>
|
|
38
38
|
<ng-content></ng-content>
|
|
39
39
|
</ng-template>
|
|
40
40
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
41
41
|
}
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbItemComponent, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
44
|
args: [{
|
|
45
45
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
@@ -92,10 +92,10 @@ class DaffBreadcrumbMenuItemDirective {
|
|
|
92
92
|
this._focusableElement?.removeEventListener('click', this._clickHandler);
|
|
93
93
|
this._focusableElement?.classList.remove('daff-menu-item');
|
|
94
94
|
}
|
|
95
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
96
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
95
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbMenuItemDirective, deps: [{ token: i0.ViewContainerRef }, { token: i1.DaffMenuService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
96
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: DaffBreadcrumbMenuItemDirective, isStandalone: true, selector: "[daffBreadcrumbMenuItem]", providers: [provideDaffMenuItemToken(DaffBreadcrumbMenuItemDirective)], ngImport: i0 }); }
|
|
97
97
|
}
|
|
98
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbMenuItemDirective, decorators: [{
|
|
99
99
|
type: Directive,
|
|
100
100
|
args: [{
|
|
101
101
|
selector: '[daffBreadcrumbMenuItem]',
|
|
@@ -149,11 +149,11 @@ class DaffBreadcrumbComponent {
|
|
|
149
149
|
/**
|
|
150
150
|
* @docs-private
|
|
151
151
|
*/
|
|
152
|
-
this._isMobile = signal(false, ...(ngDevMode ? [{ debugName: "_isMobile" }] : []));
|
|
152
|
+
this._isMobile = signal(false, ...(ngDevMode ? [{ debugName: "_isMobile" }] : /* istanbul ignore next */ []));
|
|
153
153
|
/**
|
|
154
154
|
* @docs-private
|
|
155
155
|
*/
|
|
156
|
-
this._breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent, ...(ngDevMode ? [{ debugName: "_breadcrumbItems" }] : []));
|
|
156
|
+
this._breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent, ...(ngDevMode ? [{ debugName: "_breadcrumbItems" }] : /* istanbul ignore next */ []));
|
|
157
157
|
/**
|
|
158
158
|
* @docs-private
|
|
159
159
|
*/
|
|
@@ -179,22 +179,22 @@ class DaffBreadcrumbComponent {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
return { visible, menu };
|
|
182
|
-
}, ...(ngDevMode ? [{ debugName: "_partition" }] : []));
|
|
182
|
+
}, ...(ngDevMode ? [{ debugName: "_partition" }] : /* istanbul ignore next */ []));
|
|
183
183
|
/**
|
|
184
184
|
* @docs-private
|
|
185
185
|
*/
|
|
186
|
-
this._computedBreadcrumbItems = computed(() => this._partition().visible, ...(ngDevMode ? [{ debugName: "_computedBreadcrumbItems" }] : []));
|
|
186
|
+
this._computedBreadcrumbItems = computed(() => this._partition().visible, ...(ngDevMode ? [{ debugName: "_computedBreadcrumbItems" }] : /* istanbul ignore next */ []));
|
|
187
187
|
/**
|
|
188
188
|
* @docs-private
|
|
189
189
|
*/
|
|
190
|
-
this._desktopMenuItems = computed(() => this._partition().menu, ...(ngDevMode ? [{ debugName: "_desktopMenuItems" }] : []));
|
|
190
|
+
this._desktopMenuItems = computed(() => this._partition().menu, ...(ngDevMode ? [{ debugName: "_desktopMenuItems" }] : /* istanbul ignore next */ []));
|
|
191
191
|
/**
|
|
192
192
|
* @docs-private
|
|
193
193
|
*/
|
|
194
194
|
this._mobileMenuItems = computed(() => {
|
|
195
195
|
const items = this._breadcrumbItems();
|
|
196
196
|
return items.slice(0, items.length - 1);
|
|
197
|
-
}, ...(ngDevMode ? [{ debugName: "_mobileMenuItems" }] : []));
|
|
197
|
+
}, ...(ngDevMode ? [{ debugName: "_mobileMenuItems" }] : /* istanbul ignore next */ []));
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* @docs-private
|
|
@@ -218,10 +218,10 @@ class DaffBreadcrumbComponent {
|
|
|
218
218
|
this.breadcrumbItems.forEach(item => item.setActive(false));
|
|
219
219
|
this.breadcrumbItems.last.setActive(true);
|
|
220
220
|
}
|
|
221
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
222
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
221
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbComponent, deps: [{ token: i0.DestroyRef }, { token: i1$1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
222
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: DaffBreadcrumbComponent, isStandalone: true, selector: "ol[daff-breadcrumb]", host: { classAttribute: "daff-breadcrumb" }, providers: [DaffMenuService], queries: [{ propertyName: "_breadcrumbItems", predicate: DaffBreadcrumbItemComponent, isSignal: true }, { propertyName: "breadcrumbItems", predicate: DaffBreadcrumbItemComponent }], viewQueries: [{ propertyName: "fullMenu", first: true, predicate: ["mobileMenu"], descendants: true, static: true }, { propertyName: "partialMenu", first: true, predicate: ["desktopMenu"], descendants: true, static: true }], hostDirectives: [{ directive: i2.DaffArticleEncapsulatedDirective }, { directive: i2.DaffSkeletonableDirective, inputs: ["skeleton", "skeleton"] }], ngImport: i0, template: "@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>", styles: [".daff-breadcrumb{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.daff-breadcrumb__item{font-size:1rem}.daff-breadcrumb__item a{text-decoration:none}@media(hover:hover){.daff-breadcrumb__item a:hover{text-decoration:underline}}.daff-breadcrumb__item.active{font-weight:500}.daff-breadcrumb__item:not(:last-child):after{content:\"/\";color:currentColor;font-weight:400;margin:0 .5rem}.daff-breadcrumb__item.on-mobile{display:inline-block}@media(min-width:480px){.daff-breadcrumb__item.on-mobile{display:none}}.daff-breadcrumb__item.on-desktop{display:none}@media(min-width:480px){.daff-breadcrumb__item.on-desktop{display:inline-block}}.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:none}@media(min-width:480px){.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:inline-block}}.daff-breadcrumb__menu-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;margin:0;padding:0}.daff-breadcrumb.daff-skeleton{max-width:290px;display:flex;position:relative;height:1.5rem;width:100%;border-radius:0}.daff-breadcrumb.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:1.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item{visibility:hidden}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item:after{content:unset}\n"], dependencies: [{ kind: "component", type: i1.DaffMenuComponent, selector: "daff-menu" }, { kind: "directive", type: i1.DaffMenuActivatorDirective, selector: "[daffMenuActivator]", inputs: ["daffMenuActivator", "id"], exportAs: ["daffMenuActivator"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DaffBreadcrumbMenuItemDirective, selector: "[daffBreadcrumbMenuItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
223
223
|
}
|
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbComponent, decorators: [{
|
|
225
225
|
type: Component,
|
|
226
226
|
args: [{ selector: 'ol[daff-breadcrumb]', hostDirectives: [
|
|
227
227
|
{ directive: DaffArticleEncapsulatedDirective },
|
|
@@ -235,7 +235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
|
|
|
235
235
|
DAFF_MENU_COMPONENTS,
|
|
236
236
|
NgTemplateOutlet,
|
|
237
237
|
DaffBreadcrumbMenuItemDirective,
|
|
238
|
-
], providers: [DaffMenuService], template: "@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>", styles: [".daff-breadcrumb{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.daff-breadcrumb__item{font-size:1rem}.daff-breadcrumb__item a{text-decoration:none}.daff-breadcrumb__item a:hover{text-decoration:underline}.daff-breadcrumb__item.active{font-weight:500}.daff-breadcrumb__item:not(:last-child):after{content:\"/\";color:currentColor;font-weight:400;margin:0 .5rem}.daff-breadcrumb__item.on-mobile{display:inline-block}@media(min-width:480px){.daff-breadcrumb__item.on-mobile{display:none}}.daff-breadcrumb__item.on-desktop{display:none}@media(min-width:480px){.daff-breadcrumb__item.on-desktop{display:inline-block}}.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:none}@media(min-width:480px){.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:inline-block}}.daff-breadcrumb__menu-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;margin:0;padding:0}.daff-breadcrumb.daff-skeleton{max-width:290px;display:flex;position:relative;height:1.5rem;width:100%;border-radius:0}.daff-breadcrumb.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:1.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item{visibility:hidden}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item:after{content:unset}\n"] }]
|
|
238
|
+
], providers: [DaffMenuService], template: "@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>", styles: [".daff-breadcrumb{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}.daff-breadcrumb__item{font-size:1rem}.daff-breadcrumb__item a{text-decoration:none}@media(hover:hover){.daff-breadcrumb__item a:hover{text-decoration:underline}}.daff-breadcrumb__item.active{font-weight:500}.daff-breadcrumb__item:not(:last-child):after{content:\"/\";color:currentColor;font-weight:400;margin:0 .5rem}.daff-breadcrumb__item.on-mobile{display:inline-block}@media(min-width:480px){.daff-breadcrumb__item.on-mobile{display:none}}.daff-breadcrumb__item.on-desktop{display:none}@media(min-width:480px){.daff-breadcrumb__item.on-desktop{display:inline-block}}.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:none}@media(min-width:480px){.daff-breadcrumb__item:nth-child(2),.daff-breadcrumb__item:nth-child(3),.daff-breadcrumb__item:nth-last-child(2){display:inline-block}}.daff-breadcrumb__menu-activator{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;appearance:none;background:none;border:none;margin:0;padding:0}.daff-breadcrumb.daff-skeleton{max-width:290px;display:flex;position:relative;height:1.5rem;width:100%;border-radius:0}.daff-breadcrumb.daff-skeleton:before{animation-name:loading;animation-duration:1s;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;content:\"\";height:1.5rem;width:100%;position:absolute;top:0;left:0}@keyframes loading{0%{opacity:.5}to{opacity:1}}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item{visibility:hidden}.daff-breadcrumb.daff-skeleton .daff-breadcrumb__item:after{content:unset}\n"] }]
|
|
239
239
|
}], ctorParameters: () => [{ type: i0.DestroyRef }, { type: i1$1.BreakpointObserver }], propDecorators: { breadcrumbItems: [{
|
|
240
240
|
type: ContentChildren,
|
|
241
241
|
args: [DaffBreadcrumbItemComponent]
|
|
@@ -259,13 +259,13 @@ const DAFF_BREADCRUMB_COMPONENTS = [
|
|
|
259
259
|
* @deprecated in favor of {@link DAFF_BREADCRUMB_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.
|
|
260
260
|
*/
|
|
261
261
|
class DaffBreadcrumbModule {
|
|
262
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
263
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
262
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
263
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, imports: [DaffBreadcrumbComponent,
|
|
264
264
|
DaffBreadcrumbItemComponent], exports: [DaffBreadcrumbComponent,
|
|
265
265
|
DaffBreadcrumbItemComponent] }); }
|
|
266
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
266
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, imports: [DaffBreadcrumbComponent] }); }
|
|
267
267
|
}
|
|
268
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
268
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: DaffBreadcrumbModule, decorators: [{
|
|
269
269
|
type: NgModule,
|
|
270
270
|
args: [{
|
|
271
271
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-breadcrumb.mjs","sources":["../../../libs/design/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.ts","../../../libs/design/breadcrumb/src/breadcrumb-menu-item/breadcrumb-menu-item.directive.ts","../../../libs/design/breadcrumb/src/breadcrumb-render/to-render-type.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.html","../../../libs/design/breadcrumb/src/breadcrumb.ts","../../../libs/design/breadcrumb/src/breadcrumb.module.ts","../../../libs/design/breadcrumb/src/daffodil-design-breadcrumb.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\n\n\n/**\n * Represents each individual breadcrumb item. Must be used on a `<li>` element.\n *\n * @example\n * ```html\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Link</a>\n * </li>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[daffBreadcrumbItem]',\n template: `\n <ng-template #item>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-breadcrumb__item',\n '[attr.aria-current]': '_active ? \"page\" : null',\n },\n})\nexport class DaffBreadcrumbItemComponent {\n /**\n * @docs-private\n */\n @ViewChild('item', { read: TemplateRef, static: true }) itemRef: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n _active = false;\n\n constructor( private cdRef: ChangeDetectorRef ) {}\n\n /** Called by the DaffBreadcrumbComponent to set the active state */\n setActive(value: boolean) {\n this._active = value;\n\n this.cdRef.detectChanges();\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n Directive,\n EmbeddedViewRef,\n OnDestroy,\n ViewContainerRef,\n} from '@angular/core';\n\nimport {\n provideDaffMenuItemToken,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\n/**\n * @docs-private\n *\n * Applied to an `ng-container` that projects breadcrumb item templates into `daff-menu`,\n * allowing breadcrumb items to take on `daff-menu-item` styling and behavior.\n */\n@Directive({\n selector: '[daffBreadcrumbMenuItem]',\n providers: [provideDaffMenuItemToken(DaffBreadcrumbMenuItemDirective)],\n})\nexport class DaffBreadcrumbMenuItemDirective implements FocusableOption, AfterViewInit, OnDestroy {\n private _focusableElement: HTMLElement | null = null;\n private _clickHandler = () => this._menuService.close();\n\n constructor(\n private _viewContainerRef: ViewContainerRef,\n private _menuService: DaffMenuService,\n ) {}\n\n /**\n * @docs-private\n */\n ngAfterViewInit() {\n this._focusableElement = this._findFocusableElement();\n this._focusableElement?.classList.add('daff-menu-item'); // For styling\n this._focusableElement?.addEventListener('click', this._clickHandler);\n }\n\n focus() {\n this._focusableElement?.focus(); // Allows `FocusKeyManager` to focus on the element\n }\n\n private _findFocusableElement(): HTMLElement | null {\n const view = <EmbeddedViewRef<unknown>>this._viewContainerRef.get(0);\n return view?.rootNodes.find((n): n is HTMLElement => n.nodeType === Node.ELEMENT_NODE) ?? null;\n }\n\n ngOnDestroy() {\n this._focusableElement?.removeEventListener('click', this._clickHandler);\n this._focusableElement?.classList.remove('daff-menu-item');\n }\n}\n","import { DaffBreadcrumbItemComponent } from '../public_api';\nimport { DaffBreadcrumbRender } from './breadcrumb-render.type';\n\n/**\n * Determines whether a breadcrumb item should be rendered in the breadcrumb trail.\n * Returns a {@link DaffBreadcrumbRender} when the item should be visible,\n * or `null` when the item should be collapsed into a menu.\n *\n * When there are fewer than 5 items, all items are rendered.\n * Otherwise, only the first 2 and last 2 items are rendered.\n */\nexport const toRenderType = (item: DaffBreadcrumbItemComponent, length: number, index: number): DaffBreadcrumbRender | null => {\n if(length < 5) {\n return { item, type: 'breadcrumb' };\n }\n\n switch(index) {\n case 0:\n case 1:\n case length - 1:\n case length - 2:\n return { item, type: 'breadcrumb' };\n default:\n return null;\n }\n};\n","/* eslint-disable quote-props */\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ContentChildren,\n QueryList,\n AfterContentInit,\n DestroyRef,\n ViewChild,\n contentChildren,\n computed,\n TemplateRef,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport {\n DaffArticleEncapsulatedDirective,\n DaffSkeletonableDirective,\n DaffBreakpoints,\n} from '@daffodil/design';\nimport {\n DAFF_MENU_COMPONENTS,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\nimport { DaffBreadcrumbItemComponent } from '../breadcrumb-item/breadcrumb-item.component';\nimport { DaffBreadcrumbMenuItemDirective } from '../breadcrumb-menu-item/breadcrumb-menu-item.directive';\nimport { DaffBreadcrumbRender } from '../breadcrumb-render/breadcrumb-render.type';\nimport { toRenderType } from '../breadcrumb-render/to-render-type';\n\n/**\n * Groups breadcrumb items. Must be applied to a native `<ol>` element.\n *\n * @example\n * ```html\n * <ol daff-breadcrumb>\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Home</a>\n * </li>\n * <li daffBreacrumbItem>\n * <span>Current page</span>\n * </li>\n * </ol>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ol[daff-breadcrumb]',\n templateUrl: './breadcrumb.component.html',\n styleUrl: './breadcrumb.component.scss',\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n host: {\n 'class': 'daff-breadcrumb',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n DAFF_MENU_COMPONENTS,\n NgTemplateOutlet,\n DaffBreadcrumbMenuItemDirective,\n ],\n providers: [DaffMenuService],\n})\n\nexport class DaffBreadcrumbComponent implements AfterContentInit {\n\n constructor(\n private destroyRef: DestroyRef,\n private breakpointObserver: BreakpointObserver,\n ) {}\n\n /**\n * @docs-private\n */\n _isMobile = signal(false);\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffBreadcrumbItemComponent) breadcrumbItems!: QueryList<DaffBreadcrumbItemComponent>;\n\n /**\n * @docs-private\n */\n @ViewChild('mobileMenu', { static: true }) fullMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n @ViewChild('desktopMenu', { static: true }) partialMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n _breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent);\n\n /**\n * @docs-private\n */\n _partition = computed(() => {\n this._isMobile(); // signal rerenders breadcrumb on viewport change\n\n const items = this._breadcrumbItems();\n const visible: DaffBreadcrumbRender[] = [];\n const menu: DaffBreadcrumbItemComponent[] = [];\n\n for(let index = 0; index < items.length; index++) {\n const item = items[index];\n const res = toRenderType(item, items.length, index);\n if(res) {\n if(index === 0) {\n visible.push({ type: 'menu', target: 'mobileMenu' });\n }\n visible.push(res);\n } else {\n if(menu.length === 0) {\n visible.push({ type: 'menu', target: 'desktopMenu' });\n }\n menu.push(item);\n }\n }\n\n return { visible, menu };\n });\n\n /**\n * @docs-private\n */\n _computedBreadcrumbItems = computed(() => this._partition().visible);\n\n /**\n * @docs-private\n */\n _desktopMenuItems = computed(() => this._partition().menu);\n\n /**\n * @docs-private\n */\n _mobileMenuItems = computed(() => {\n const items = this._breadcrumbItems();\n return items.slice(0, items.length - 1);\n });\n\n /**\n * @docs-private\n */\n ngAfterContentInit() {\n this.updateActiveState();\n\n this.breadcrumbItems.changes\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.updateActiveState());\n\n this.breakpointObserver\n .observe([DaffBreakpoints.MOBILE])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(result => {\n this._isMobile.set(!result.matches);\n });\n }\n\n private updateActiveState() {\n if (!this.breadcrumbItems.length) {\n return;\n }\n\n this.breadcrumbItems.forEach(item => item.setActive(false));\n\n this.breadcrumbItems.last.setActive(true);\n }\n}\n","@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>","import { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_BREADCRUMB_COMPONENTS = <const> [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n];\n","import { NgModule } from '@angular/core';\n\nimport { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @deprecated in favor of {@link DAFF_BREADCRUMB_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n exports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n})\nexport class DaffBreadcrumbModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;AAAA;AAUA;;;;;;;;;AASG;MAeU,2BAA2B,CAAA;AAWtC,IAAA,WAAA,CAAqB,KAAwB,EAAA;QAAxB,IAAA,CAAA,KAAK,GAAL,KAAK;AAL1B;;AAEG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK;IAEkC;;AAGjD,IAAA,SAAS,CAAC,KAAc,EAAA;AACtB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AAEpB,QAAA,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;IAC5B;kIAlBW,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;sHAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,2BAAA,EAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,MAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAIX,WAAW,EAAA,MAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,E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AVhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,uBAAuB;wBACvB,2BAA2B;AAC5B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,uBAAuB;wBACvB,2BAA2B;AAC5B,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"daffodil-design-breadcrumb.mjs","sources":["../../../libs/design/breadcrumb/src/breadcrumb-item/breadcrumb-item.component.ts","../../../libs/design/breadcrumb/src/breadcrumb-menu-item/breadcrumb-menu-item.directive.ts","../../../libs/design/breadcrumb/src/breadcrumb-render/to-render-type.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.ts","../../../libs/design/breadcrumb/src/breadcrumb/breadcrumb.component.html","../../../libs/design/breadcrumb/src/breadcrumb.ts","../../../libs/design/breadcrumb/src/breadcrumb.module.ts","../../../libs/design/breadcrumb/src/daffodil-design-breadcrumb.ts"],"sourcesContent":["/* eslint-disable quote-props */\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\n\n\n/**\n * Represents each individual breadcrumb item. Must be used on a `<li>` element.\n *\n * @example\n * ```html\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Link</a>\n * </li>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'li[daffBreadcrumbItem]',\n template: `\n <ng-template #item>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n 'class': 'daff-breadcrumb__item',\n '[attr.aria-current]': '_active ? \"page\" : null',\n },\n})\nexport class DaffBreadcrumbItemComponent {\n /**\n * @docs-private\n */\n @ViewChild('item', { read: TemplateRef, static: true }) itemRef: TemplateRef<any>;\n\n /**\n * @docs-private\n */\n _active = false;\n\n constructor( private cdRef: ChangeDetectorRef ) {}\n\n /** Called by the DaffBreadcrumbComponent to set the active state */\n setActive(value: boolean) {\n this._active = value;\n\n this.cdRef.detectChanges();\n }\n}\n","import { FocusableOption } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n Directive,\n EmbeddedViewRef,\n OnDestroy,\n ViewContainerRef,\n} from '@angular/core';\n\nimport {\n provideDaffMenuItemToken,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\n/**\n * @docs-private\n *\n * Applied to an `ng-container` that projects breadcrumb item templates into `daff-menu`,\n * allowing breadcrumb items to take on `daff-menu-item` styling and behavior.\n */\n@Directive({\n selector: '[daffBreadcrumbMenuItem]',\n providers: [provideDaffMenuItemToken(DaffBreadcrumbMenuItemDirective)],\n})\nexport class DaffBreadcrumbMenuItemDirective implements FocusableOption, AfterViewInit, OnDestroy {\n private _focusableElement: HTMLElement | null = null;\n private _clickHandler = () => this._menuService.close();\n\n constructor(\n private _viewContainerRef: ViewContainerRef,\n private _menuService: DaffMenuService,\n ) {}\n\n /**\n * @docs-private\n */\n ngAfterViewInit() {\n this._focusableElement = this._findFocusableElement();\n this._focusableElement?.classList.add('daff-menu-item'); // For styling\n this._focusableElement?.addEventListener('click', this._clickHandler);\n }\n\n focus() {\n this._focusableElement?.focus(); // Allows `FocusKeyManager` to focus on the element\n }\n\n private _findFocusableElement(): HTMLElement | null {\n const view = <EmbeddedViewRef<unknown>>this._viewContainerRef.get(0);\n return view?.rootNodes.find((n): n is HTMLElement => n.nodeType === Node.ELEMENT_NODE) ?? null;\n }\n\n ngOnDestroy() {\n this._focusableElement?.removeEventListener('click', this._clickHandler);\n this._focusableElement?.classList.remove('daff-menu-item');\n }\n}\n","import { DaffBreadcrumbItemComponent } from '../public_api';\nimport { DaffBreadcrumbRender } from './breadcrumb-render.type';\n\n/**\n * Determines whether a breadcrumb item should be rendered in the breadcrumb trail.\n * Returns a {@link DaffBreadcrumbRender} when the item should be visible,\n * or `null` when the item should be collapsed into a menu.\n *\n * When there are fewer than 5 items, all items are rendered.\n * Otherwise, only the first 2 and last 2 items are rendered.\n */\nexport const toRenderType = (item: DaffBreadcrumbItemComponent, length: number, index: number): DaffBreadcrumbRender | null => {\n if(length < 5) {\n return { item, type: 'breadcrumb' };\n }\n\n switch(index) {\n case 0:\n case 1:\n case length - 1:\n case length - 2:\n return { item, type: 'breadcrumb' };\n default:\n return null;\n }\n};\n","/* eslint-disable quote-props */\nimport { BreakpointObserver } from '@angular/cdk/layout';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n ContentChildren,\n QueryList,\n AfterContentInit,\n DestroyRef,\n ViewChild,\n contentChildren,\n computed,\n TemplateRef,\n signal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\n\nimport {\n DaffArticleEncapsulatedDirective,\n DaffSkeletonableDirective,\n DaffBreakpoints,\n} from '@daffodil/design';\nimport {\n DAFF_MENU_COMPONENTS,\n DaffMenuService,\n} from '@daffodil/design/menu';\n\nimport { DaffBreadcrumbItemComponent } from '../breadcrumb-item/breadcrumb-item.component';\nimport { DaffBreadcrumbMenuItemDirective } from '../breadcrumb-menu-item/breadcrumb-menu-item.directive';\nimport { DaffBreadcrumbRender } from '../breadcrumb-render/breadcrumb-render.type';\nimport { toRenderType } from '../breadcrumb-render/to-render-type';\n\n/**\n * Groups breadcrumb items. Must be applied to a native `<ol>` element.\n *\n * @example\n * ```html\n * <ol daff-breadcrumb>\n * <li daffBreadcrumbItem>\n * <a routerLink=\"/\">Home</a>\n * </li>\n * <li daffBreacrumbItem>\n * <span>Current page</span>\n * </li>\n * </ol>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'ol[daff-breadcrumb]',\n templateUrl: './breadcrumb.component.html',\n styleUrl: './breadcrumb.component.scss',\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n {\n directive: DaffSkeletonableDirective,\n inputs: ['skeleton'],\n },\n ],\n host: {\n 'class': 'daff-breadcrumb',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n DAFF_MENU_COMPONENTS,\n NgTemplateOutlet,\n DaffBreadcrumbMenuItemDirective,\n ],\n providers: [DaffMenuService],\n})\n\nexport class DaffBreadcrumbComponent implements AfterContentInit {\n\n constructor(\n private destroyRef: DestroyRef,\n private breakpointObserver: BreakpointObserver,\n ) {}\n\n /**\n * @docs-private\n */\n _isMobile = signal(false);\n\n /**\n * @docs-private\n */\n @ContentChildren(DaffBreadcrumbItemComponent) breadcrumbItems!: QueryList<DaffBreadcrumbItemComponent>;\n\n /**\n * @docs-private\n */\n @ViewChild('mobileMenu', { static: true }) fullMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n @ViewChild('desktopMenu', { static: true }) partialMenu: TemplateRef<unknown>;\n\n /**\n * @docs-private\n */\n _breadcrumbItems = contentChildren(DaffBreadcrumbItemComponent);\n\n /**\n * @docs-private\n */\n _partition = computed(() => {\n this._isMobile(); // signal rerenders breadcrumb on viewport change\n\n const items = this._breadcrumbItems();\n const visible: DaffBreadcrumbRender[] = [];\n const menu: DaffBreadcrumbItemComponent[] = [];\n\n for(let index = 0; index < items.length; index++) {\n const item = items[index];\n const res = toRenderType(item, items.length, index);\n if(res) {\n if(index === 0) {\n visible.push({ type: 'menu', target: 'mobileMenu' });\n }\n visible.push(res);\n } else {\n if(menu.length === 0) {\n visible.push({ type: 'menu', target: 'desktopMenu' });\n }\n menu.push(item);\n }\n }\n\n return { visible, menu };\n });\n\n /**\n * @docs-private\n */\n _computedBreadcrumbItems = computed(() => this._partition().visible);\n\n /**\n * @docs-private\n */\n _desktopMenuItems = computed(() => this._partition().menu);\n\n /**\n * @docs-private\n */\n _mobileMenuItems = computed(() => {\n const items = this._breadcrumbItems();\n return items.slice(0, items.length - 1);\n });\n\n /**\n * @docs-private\n */\n ngAfterContentInit() {\n this.updateActiveState();\n\n this.breadcrumbItems.changes\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.updateActiveState());\n\n this.breakpointObserver\n .observe([DaffBreakpoints.MOBILE])\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(result => {\n this._isMobile.set(!result.matches);\n });\n }\n\n private updateActiveState() {\n if (!this.breadcrumbItems.length) {\n return;\n }\n\n this.breadcrumbItems.forEach(item => item.setActive(false));\n\n this.breadcrumbItems.last.setActive(true);\n }\n}\n","@for (breadcrumbItem of _computedBreadcrumbItems(); track breadcrumbItem) {\n\t@if (breadcrumbItem.type === 'breadcrumb') {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.active]=\"breadcrumbItem.item._active\">\n\t\t\t<ng-container *ngTemplateOutlet=\"breadcrumbItem.item.itemRef\"></ng-container>\n\t\t</li>\n\t} @else {\n\t\t<li class=\"daff-breadcrumb__item\"\n\t\t\t[class.on-mobile]=\"breadcrumbItem.target === 'mobileMenu'\"\n\t\t\t[class.on-desktop]=\"breadcrumbItem.target === 'desktopMenu'\">\n\t\t\t<button class=\"daff-breadcrumb__menu-activator\"\n\t\t\t\t[daffMenuActivator]=\"breadcrumbItem.target === 'mobileMenu' ? mobileMenu : desktopMenu\"\n\t\t\t\taria-label=\"Show more breadcrumb items\">...</button>\n\t\t</li>\n\t}\n}\n\n<ng-template #mobileMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _mobileMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>\n\n<ng-template #desktopMenu>\n\t<daff-menu>\n\t\t@for (breadcrumbItem of _desktopMenuItems(); track breadcrumbItem) {\n\t\t\t<ng-container daffBreadcrumbMenuItem [ngTemplateOutlet]=\"breadcrumbItem.itemRef\"></ng-container>\n\t\t}\n\t</daff-menu>\t\n</ng-template>","import { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @docs-private\n */\nexport const DAFF_BREADCRUMB_COMPONENTS = <const> [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n];\n","import { NgModule } from '@angular/core';\n\nimport { DaffBreadcrumbComponent } from './breadcrumb/breadcrumb.component';\nimport { DaffBreadcrumbItemComponent } from './breadcrumb-item/breadcrumb-item.component';\n\n/**\n * @deprecated in favor of {@link DAFF_BREADCRUMB_COMPONENTS}. Deprecated in version 0.78.0. Will be removed in version 1.0.0.\n */\n@NgModule({\n imports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n exports: [\n DaffBreadcrumbComponent,\n DaffBreadcrumbItemComponent,\n ],\n})\nexport class DaffBreadcrumbModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i3"],"mappings":";;;;;;;;;;AAAA;AAUA;;;;;;;;;AASG;MAeU,2BAA2B,CAAA;AAWtC,IAAA,WAAA,CAAqB,KAAwB,EAAA;QAAxB,IAAA,CAAA,KAAK,GAAL,KAAK;AAL1B;;AAEG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK;IAEkC;;AAGjD,IAAA,SAAS,CAAC,KAAc,EAAA;AACtB,QAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AAEpB,QAAA,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;IAC5B;iIAlBW,2BAA2B,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;qHAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,mBAAA,EAAA,2BAAA,EAAA,EAAA,cAAA,EAAA,uBAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAA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