@daffodil/design 0.94.1 → 0.95.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/accordion/src/accordion-theme.scss +4 -4
- package/article/README.md +4 -27
- package/article/src/article-theme.scss +14 -14
- package/badge/src/badge-theme.scss +0 -6
- package/button/README.md +0 -4
- package/button/src/button/basic/button-theme.scss +17 -42
- package/button/src/button/button-base.scss +12 -3
- package/button/src/button/flat/flat-theme.scss +14 -12
- package/button/src/button/icon/icon-theme.scss +19 -40
- package/button/src/button/stroked/stroked-theme.scss +22 -36
- package/card/src/card/stroked/stroked-theme.scss +1 -1
- package/card/src/card-base.scss +0 -1
- package/fesm2022/daffodil-design-accordion.mjs +285 -188
- package/fesm2022/daffodil-design-accordion.mjs.map +1 -1
- package/fesm2022/daffodil-design-article.mjs +578 -340
- package/fesm2022/daffodil-design-article.mjs.map +1 -1
- package/fesm2022/daffodil-design-badge.mjs +166 -84
- package/fesm2022/daffodil-design-badge.mjs.map +1 -1
- package/fesm2022/daffodil-design-beacon.mjs +109 -47
- package/fesm2022/daffodil-design-beacon.mjs.map +1 -1
- package/fesm2022/daffodil-design-breadcrumb.mjs +384 -277
- package/fesm2022/daffodil-design-breadcrumb.mjs.map +1 -1
- package/fesm2022/daffodil-design-button.mjs +541 -408
- package/fesm2022/daffodil-design-button.mjs.map +1 -1
- package/fesm2022/daffodil-design-callout.mjs +349 -224
- package/fesm2022/daffodil-design-callout.mjs.map +1 -1
- package/fesm2022/daffodil-design-card.mjs +496 -327
- package/fesm2022/daffodil-design-card.mjs.map +1 -1
- package/fesm2022/daffodil-design-checkbox.mjs +373 -313
- package/fesm2022/daffodil-design-checkbox.mjs.map +1 -1
- package/fesm2022/daffodil-design-container.mjs +103 -60
- package/fesm2022/daffodil-design-container.mjs.map +1 -1
- package/fesm2022/daffodil-design-form-field.mjs +441 -352
- package/fesm2022/daffodil-design-form-field.mjs.map +1 -1
- package/fesm2022/daffodil-design-form.mjs +155 -57
- package/fesm2022/daffodil-design-form.mjs.map +1 -1
- package/fesm2022/daffodil-design-hero.mjs +349 -234
- package/fesm2022/daffodil-design-hero.mjs.map +1 -1
- package/fesm2022/daffodil-design-image-lite.mjs +60 -0
- package/fesm2022/daffodil-design-image-lite.mjs.map +1 -0
- package/fesm2022/daffodil-design-image.mjs +245 -107
- package/fesm2022/daffodil-design-image.mjs.map +1 -1
- package/fesm2022/daffodil-design-input.mjs +217 -164
- package/fesm2022/daffodil-design-input.mjs.map +1 -1
- package/fesm2022/daffodil-design-list.mjs +308 -170
- package/fesm2022/daffodil-design-list.mjs.map +1 -1
- package/fesm2022/daffodil-design-media-gallery.mjs +351 -278
- package/fesm2022/daffodil-design-media-gallery.mjs.map +1 -1
- package/fesm2022/daffodil-design-menu.mjs +525 -417
- package/fesm2022/daffodil-design-menu.mjs.map +1 -1
- package/fesm2022/daffodil-design-modal.mjs +680 -450
- package/fesm2022/daffodil-design-modal.mjs.map +1 -1
- package/fesm2022/daffodil-design-native-select.mjs +175 -166
- package/fesm2022/daffodil-design-native-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-navbar.mjs +145 -68
- package/fesm2022/daffodil-design-navbar.mjs.map +1 -1
- package/fesm2022/daffodil-design-notification.mjs +376 -226
- package/fesm2022/daffodil-design-notification.mjs.map +1 -1
- package/fesm2022/daffodil-design-paginator.mjs +296 -192
- package/fesm2022/daffodil-design-paginator.mjs.map +1 -1
- package/fesm2022/daffodil-design-progress-bar.mjs +243 -157
- package/fesm2022/daffodil-design-progress-bar.mjs.map +1 -1
- package/fesm2022/daffodil-design-radio.mjs +382 -300
- package/fesm2022/daffodil-design-radio.mjs.map +1 -1
- package/fesm2022/daffodil-design-select.mjs +424 -364
- package/fesm2022/daffodil-design-select.mjs.map +1 -1
- package/fesm2022/daffodil-design-sidebar.mjs +874 -887
- package/fesm2022/daffodil-design-sidebar.mjs.map +1 -1
- package/fesm2022/daffodil-design-spinner.mjs +156 -99
- package/fesm2022/daffodil-design-spinner.mjs.map +1 -1
- package/fesm2022/daffodil-design-switch.mjs +176 -106
- package/fesm2022/daffodil-design-switch.mjs.map +1 -1
- package/fesm2022/daffodil-design-tabs.mjs +685 -427
- package/fesm2022/daffodil-design-tabs.mjs.map +1 -1
- package/fesm2022/daffodil-design-tag.mjs +251 -133
- package/fesm2022/daffodil-design-tag.mjs.map +1 -1
- package/fesm2022/daffodil-design-testing.mjs +4 -16
- package/fesm2022/daffodil-design-testing.mjs.map +1 -1
- package/fesm2022/daffodil-design-text-snippet.mjs +140 -54
- package/fesm2022/daffodil-design-text-snippet.mjs.map +1 -1
- package/fesm2022/daffodil-design-textarea.mjs +170 -150
- package/fesm2022/daffodil-design-textarea.mjs.map +1 -1
- package/fesm2022/daffodil-design-toast.mjs +658 -481
- package/fesm2022/daffodil-design-toast.mjs.map +1 -1
- package/fesm2022/daffodil-design-tree.mjs +456 -469
- package/fesm2022/daffodil-design-tree.mjs.map +1 -1
- package/fesm2022/daffodil-design-youtube-player.mjs +168 -115
- package/fesm2022/daffodil-design-youtube-player.mjs.map +1 -1
- package/fesm2022/daffodil-design.mjs +1628 -1650
- package/fesm2022/daffodil-design.mjs.map +1 -1
- package/form-field/README.md +0 -4
- package/form-field/src/form-field-theme.scss +12 -4
- package/image/README.md +4 -0
- package/image-lite/README.md +58 -0
- package/image-lite/src/image-theme.scss +18 -0
- package/list/src/list-base.scss +3 -4
- package/list/src/list-theme.scss +6 -5
- package/media-gallery/README.md +1 -1
- package/media-gallery/src/media-gallery-theme.scss +3 -3
- package/menu/src/menu-theme.scss +6 -2
- package/notification/src/notification-theme.scss +10 -10
- package/package.json +1 -1
- package/scss/global.scss +17 -11
- package/scss/theme.scss +2 -18
- package/scss/theming/_get-palette.scss +0 -3
- package/scss/theming/_index.scss +0 -1
- package/scss/theming/_light-dark.scss +2 -2
- package/scss/theming/_theme-css-variables.scss +1 -1
- package/scss/theming/create-theme/_create-theme.scss +2 -2
- package/scss/theming/get-font-colors/_get-font-colors.scss +7 -25
- package/scss/theming/get-font-colors/_get-font-colors.spec.scss +0 -12
- package/scss/typography/_classes.scss +0 -6
- package/scss/typography/_index.scss +0 -1
- package/scss/typography/mixins/_sizes.scss +0 -1
- package/scss/typography/utilities/_variables.scss +3 -0
- package/select/src/select-theme.scss +10 -14
- package/switch/src/switch-theme.scss +2 -2
- package/tabs/src/tabs-theme.scss +4 -4
- package/types/daffodil-design-accordion.d.ts +92 -67
- package/types/daffodil-design-article.d.ts +49 -56
- package/types/daffodil-design-badge.d.ts +56 -33
- package/types/daffodil-design-beacon.d.ts +35 -14
- package/types/daffodil-design-breadcrumb.d.ts +89 -85
- package/types/daffodil-design-button.d.ts +128 -146
- package/types/daffodil-design-callout.d.ts +55 -39
- package/types/daffodil-design-card.d.ts +66 -56
- package/types/daffodil-design-checkbox.d.ts +211 -167
- package/types/daffodil-design-container.d.ts +17 -16
- package/types/daffodil-design-form-field.d.ts +273 -240
- package/types/daffodil-design-form.d.ts +21 -21
- package/types/daffodil-design-hero.d.ts +55 -39
- package/types/daffodil-design-image-lite.d.ts +17 -0
- package/types/daffodil-design-image.d.ts +89 -55
- package/types/daffodil-design-input.d.ts +86 -72
- package/types/daffodil-design-list.d.ts +49 -43
- package/types/daffodil-design-media-gallery.d.ts +176 -148
- package/types/daffodil-design-menu.d.ts +177 -169
- package/types/daffodil-design-modal.d.ts +205 -205
- package/types/daffodil-design-native-select.d.ts +94 -84
- package/types/daffodil-design-navbar.d.ts +34 -24
- package/types/daffodil-design-notification.d.ts +82 -67
- package/types/daffodil-design-paginator.d.ts +140 -118
- package/types/daffodil-design-progress-bar.d.ts +92 -74
- package/types/daffodil-design-radio.d.ts +183 -144
- package/types/daffodil-design-select.d.ts +207 -178
- package/types/daffodil-design-sidebar.d.ts +270 -253
- package/types/daffodil-design-spinner.d.ts +49 -36
- package/types/daffodil-design-switch.d.ts +77 -46
- package/types/daffodil-design-tabs.d.ts +248 -198
- package/types/daffodil-design-tag.d.ts +91 -56
- package/types/daffodil-design-testing.d.ts +1 -3
- package/types/daffodil-design-text-snippet.d.ts +48 -37
- package/types/daffodil-design-textarea.d.ts +88 -79
- package/types/daffodil-design-toast.d.ts +175 -183
- package/types/daffodil-design-tree.d.ts +186 -169
- package/types/daffodil-design-youtube-player.d.ts +56 -52
- package/types/daffodil-design.d.ts +614 -695
- package/button/src/button/raised/raised-theme.scss +0 -92
- package/button/src/button/underline/underline-theme.scss +0 -141
- package/fesm2022/daffodil-design-link-set.mjs +0 -160
- package/fesm2022/daffodil-design-link-set.mjs.map +0 -1
- package/fesm2022/daffodil-design-quantity-field.mjs +0 -364
- package/fesm2022/daffodil-design-quantity-field.mjs.map +0 -1
- package/link-set/README.md +0 -86
- package/quantity-field/README.md +0 -63
- package/scss/theming/_configure-theme.scss +0 -120
- package/scss/typography/mixins/_font-weight.scss +0 -14
- package/types/daffodil-design-link-set.d.ts +0 -72
- package/types/daffodil-design-quantity-field.d.ts +0 -171
|
@@ -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","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,CAAC,SAAS,GAAG,UAAU,CAAC,MAAK;AAC/B,oBAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,M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A,OAAO,EAAE,oBAAoB;AAC9B,qBAAA;AACF,iBAAA;;;ACFD;;AAEG;MAYU,iBAAiB,CAAA;iIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,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,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAT1B,YAAY,CAAA,EAAA,CAAA,CAAA;;2FASH,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","names":["i1","i1.DaffArticleCopyButtonService","i2.DaffArticleHeadingLinkService"],"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"],"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"],"mappings":";;;;;;;;;;AAoCA,IAAa,iCAAb,MAAa,+BAA8B;CAV3C,cAAA;EAcE,KAAA,UAAU,MAAM,SAAkB,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAExB,KAAA,SAAS,OAAO,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAEb,KAAA,SAAS;EACT,KAAA,UAAU;EACrB,KAAA,UAAU,OAAO,MAAM;CA2BhC;CAzBC,cAAW;EACT,IAAI,KAAK,WACP,aAAa,KAAK,SAAS;CAE/B;CAEA,MAAM,kBAAe;EACnB,IAAI;GAEF,MAAM,UAAU,UAAU,UAAU,KAAK,QAAO,CAAE;GAClD,KAAK,OAAO,IAAI,IAAI;GACpB,aAAa,KAAK,SAAS;GAC3B,KAAK,QAAQ,wBAAuB;IAClC,KAAK,YAAY,iBAAgB;KAC/B,KAAK,Q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1,169 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i2 from
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Directive, ViewEncapsulation, contentChild, input } from "@angular/core";
|
|
3
|
+
import * as i2 from "@daffodil/design";
|
|
4
|
+
import { DaffArticleEncapsulatedDirective, DaffColorableDirective, DaffPrefixDirective, DaffSizableDirective, DaffStatusableDirective } from "@daffodil/design";
|
|
6
5
|
var DaffBadgeAppearanceEnum;
|
|
7
|
-
(function
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
(function(DaffBadgeAppearanceEnum) {
|
|
7
|
+
DaffBadgeAppearanceEnum["Filled"] = "filled";
|
|
8
|
+
DaffBadgeAppearanceEnum["Outlined"] = "outlined";
|
|
10
9
|
})(DaffBadgeAppearanceEnum || (DaffBadgeAppearanceEnum = {}));
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
10
|
+
var DaffBadgeSizableDirective = class DaffBadgeSizableDirective extends DaffSizableDirective {
|
|
11
|
+
static {
|
|
12
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
13
|
+
minVersion: "12.0.0",
|
|
14
|
+
version: "22.2.4",
|
|
15
|
+
ngImport: i0,
|
|
16
|
+
type: DaffBadgeSizableDirective,
|
|
17
|
+
deps: null,
|
|
18
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
static {
|
|
22
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
23
|
+
minVersion: "14.0.0",
|
|
24
|
+
version: "22.2.4",
|
|
25
|
+
type: DaffBadgeSizableDirective,
|
|
26
|
+
isStandalone: true,
|
|
27
|
+
usesInheritance: true,
|
|
28
|
+
ngImport: i0
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
33
|
+
minVersion: "12.0.0",
|
|
34
|
+
version: "22.2.4",
|
|
35
|
+
ngImport: i0,
|
|
36
|
+
type: DaffBadgeSizableDirective,
|
|
37
|
+
decorators: [{
|
|
38
|
+
type: Directive,
|
|
39
|
+
args: [{}]
|
|
40
|
+
}]
|
|
41
|
+
});
|
|
42
|
+
var DaffBadgeComponent = class DaffBadgeComponent {
|
|
43
|
+
constructor(sizableDirective, colorableDirective) {
|
|
44
|
+
this.sizableDirective = sizableDirective;
|
|
45
|
+
this.colorableDirective = colorableDirective;
|
|
46
|
+
this._prefix = contentChild(DaffPrefixDirective, ...ngDevMode ? [{ debugName: "_prefix" }] : /* istanbul ignore next */ []);
|
|
47
|
+
this.appearance = input(DaffBadgeAppearanceEnum.Filled, {
|
|
48
|
+
...ngDevMode ? { debugName: "appearance" } : /* istanbul ignore next */ {},
|
|
49
|
+
transform: (value) => value || DaffBadgeAppearanceEnum.Filled
|
|
50
|
+
});
|
|
51
|
+
this.sizableDirective.defaultSize = "md";
|
|
52
|
+
this.colorableDirective.defaultColor = "light";
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
56
|
+
minVersion: "12.0.0",
|
|
57
|
+
version: "22.2.4",
|
|
58
|
+
ngImport: i0,
|
|
59
|
+
type: DaffBadgeComponent,
|
|
60
|
+
deps: [{ token: DaffBadgeSizableDirective }, { token: i2.DaffColorableDirective }],
|
|
61
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
static {
|
|
65
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
66
|
+
minVersion: "17.0.0",
|
|
67
|
+
version: "22.2.4",
|
|
68
|
+
type: DaffBadgeComponent,
|
|
69
|
+
isStandalone: true,
|
|
70
|
+
selector: "daff-badge",
|
|
71
|
+
inputs: { appearance: {
|
|
72
|
+
classPropertyName: "appearance",
|
|
73
|
+
publicName: "appearance",
|
|
74
|
+
isSignal: true,
|
|
75
|
+
isRequired: false,
|
|
76
|
+
transformFunction: null
|
|
77
|
+
} },
|
|
78
|
+
host: {
|
|
79
|
+
properties: {
|
|
80
|
+
"class.outlined": "appearance() === \"outlined\"",
|
|
81
|
+
"class.filled": "appearance() === \"filled\""
|
|
82
|
+
},
|
|
83
|
+
classAttribute: "daff-badge"
|
|
84
|
+
},
|
|
85
|
+
queries: [{
|
|
86
|
+
propertyName: "_prefix",
|
|
87
|
+
first: true,
|
|
88
|
+
predicate: DaffPrefixDirective,
|
|
89
|
+
descendants: true,
|
|
90
|
+
isSignal: true
|
|
91
|
+
}],
|
|
92
|
+
hostDirectives: [
|
|
93
|
+
{ directive: i2.DaffArticleEncapsulatedDirective },
|
|
94
|
+
{
|
|
95
|
+
directive: i2.DaffColorableDirective,
|
|
96
|
+
inputs: ["color", "color"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
directive: i2.DaffStatusableDirective,
|
|
100
|
+
inputs: ["status", "status"]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
directive: DaffBadgeSizableDirective,
|
|
104
|
+
inputs: ["size", "size"]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
ngImport: i0,
|
|
108
|
+
template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-badge__label\">\n <ng-content></ng-content>\n</div>",
|
|
109
|
+
styles: [".daff-badge{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:.25rem;border:thin solid transparent;border-radius:1rem;font-weight:500;padding:0 .5rem;position:relative;width:fit-content}.daff-badge.daff-sm{font-size:.75rem;line-height:.75rem;height:1.25rem}.daff-badge.daff-md{font-size:.875rem;line-height:.875rem;height:1.5rem}.daff-badge.daff-lg{font-size:1rem;line-height:1rem;height:1.875rem}\n"],
|
|
110
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
111
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
116
|
+
minVersion: "12.0.0",
|
|
117
|
+
version: "22.2.4",
|
|
118
|
+
ngImport: i0,
|
|
119
|
+
type: DaffBadgeComponent,
|
|
120
|
+
decorators: [{
|
|
121
|
+
type: Component,
|
|
122
|
+
args: [{
|
|
123
|
+
selector: "daff-badge",
|
|
124
|
+
hostDirectives: [
|
|
125
|
+
{ directive: DaffArticleEncapsulatedDirective },
|
|
126
|
+
{
|
|
127
|
+
directive: DaffColorableDirective,
|
|
128
|
+
inputs: ["color"]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
directive: DaffStatusableDirective,
|
|
132
|
+
inputs: ["status"]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
directive: DaffBadgeSizableDirective,
|
|
136
|
+
inputs: ["size"]
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
encapsulation: ViewEncapsulation.None,
|
|
140
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
141
|
+
host: {
|
|
142
|
+
class: "daff-badge",
|
|
143
|
+
"[class.outlined]": "appearance() === \"outlined\"",
|
|
144
|
+
"[class.filled]": "appearance() === \"filled\""
|
|
145
|
+
},
|
|
146
|
+
template: "@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-badge__label\">\n <ng-content></ng-content>\n</div>",
|
|
147
|
+
styles: [".daff-badge{display:flex;align-items:center;justify-content:center;flex-wrap:nowrap;gap:.25rem;border:thin solid transparent;border-radius:1rem;font-weight:500;padding:0 .5rem;position:relative;width:fit-content}.daff-badge.daff-sm{font-size:.75rem;line-height:.75rem;height:1.25rem}.daff-badge.daff-md{font-size:.875rem;line-height:.875rem;height:1.5rem}.daff-badge.daff-lg{font-size:1rem;line-height:1rem;height:1.875rem}\n"]
|
|
148
|
+
}]
|
|
149
|
+
}],
|
|
150
|
+
ctorParameters: () => [{ type: DaffBadgeSizableDirective }, { type: i2.DaffColorableDirective }],
|
|
151
|
+
propDecorators: {
|
|
152
|
+
_prefix: [{
|
|
153
|
+
type: i0.ContentChild,
|
|
154
|
+
args: [i0.forwardRef(() => DaffPrefixDirective), { isSignal: true }]
|
|
155
|
+
}],
|
|
156
|
+
appearance: [{
|
|
157
|
+
type: i0.Input,
|
|
158
|
+
args: [{
|
|
159
|
+
isSignal: true,
|
|
160
|
+
alias: "appearance",
|
|
161
|
+
required: false
|
|
162
|
+
}]
|
|
163
|
+
}]
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
const DAFF_BADGE_COMPONENTS = [DaffBadgeComponent, DaffPrefixDirective];
|
|
86
167
|
export { DAFF_BADGE_COMPONENTS, DaffBadgeComponent, DaffBadgeSizableDirective };
|
|
87
|
-
|
|
168
|
+
|
|
169
|
+
//# sourceMappingURL=daffodil-design-badge.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-badge.mjs","sources":["../../../libs/design/badge/src/badge/badge-appearance.ts","../../../libs/design/badge/src/badge/badge-sizable.directive.ts","../../../libs/design/badge/src/badge/badge.component.ts","../../../libs/design/badge/src/badge/badge.component.html","../../../libs/design/badge/src/badge.ts"
|
|
1
|
+
{"version":3,"file":"daffodil-design-badge.mjs","names":["i1.DaffBadgeSizableDirective"],"sources":["../../../libs/design/badge/src/badge/badge-appearance.ts","../../../libs/design/badge/src/badge/badge-sizable.directive.ts","../../../libs/design/badge/src/badge/badge.component.ts","../../../libs/design/badge/src/badge/badge.component.html","../../../libs/design/badge/src/badge.ts"],"sourcesContent":["/**\n * The visual style of a badge.\n *\n * - `filled` renders a solid background (the default).\n * - `outlined` renders a semi-transparent background with a colored border.\n */\nexport type DaffBadgeAppearance = 'filled' | 'outlined';\n\nexport enum DaffBadgeAppearanceEnum {\n Filled = 'filled',\n Outlined = 'outlined',\n}\n","import { Directive } from '@angular/core';\n\nimport {\n DaffSizableDirective,\n DaffSizeLargeType,\n DaffSizeMediumType,\n DaffSizeSmallType,\n} from '@daffodil/design';\n\n/**\n * The size types that the DaffBadgeComponent can implement.\n */\nexport type DaffBadgeSize = DaffSizeSmallType | DaffSizeMediumType | DaffSizeLargeType;\n\n@Directive({})\n\nexport class DaffBadgeSizableDirective extends DaffSizableDirective<DaffBadgeSize> {\n /**\n * @docs-private\n */\n defaultSize: DaffBadgeSize;\n}\n\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n input,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport {\n DaffArticleEncapsulatedDirective,\n DaffColorableDirective,\n DaffPrefixDirective,\n DaffStatusableDirective,\n} from '@daffodil/design';\n\nimport {\n DaffBadgeAppearance,\n DaffBadgeAppearanceEnum,\n} from './badge-appearance';\nimport { DaffBadgeSizableDirective } from './badge-sizable.directive';\n\n/**\n * DaffBadgeComponent is a compact visual label or indicator used to\n * convey status or display short pieces of information.\n *\n * @example\n * ```html\n * <daff-badge color=\"primary\" appearance=\"outlined\">\n * <fa-icon [icon]=\"faCircleCheck\" daffPrefix></fa-icon>\n * Verified\n * </daff-badge>\n * ```\n */\n\n@Component({\n selector: 'daff-badge',\n templateUrl: './badge.component.html',\n styleUrl: './badge.component.scss',\n hostDirectives: [\n { directive: DaffArticleEncapsulatedDirective },\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n {\n directive: DaffStatusableDirective,\n inputs: ['status'],\n },\n {\n directive: DaffBadgeSizableDirective,\n inputs: ['size'],\n },\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'daff-badge',\n '[class.outlined]': 'appearance() === \"outlined\"',\n '[class.filled]': 'appearance() === \"filled\"',\n },\n})\nexport class DaffBadgeComponent {\n /**\n * @docs-private\n */\n _prefix = contentChild(DaffPrefixDirective);\n\n /**\n * The visual style of the badge. Defaults to `filled`.\n */\n appearance = input(DaffBadgeAppearanceEnum.Filled, {\n transform: (value: DaffBadgeAppearance | '' | null | undefined) =>\n value || DaffBadgeAppearanceEnum.Filled,\n });\n\n constructor(\n private sizableDirective: DaffBadgeSizableDirective,\n private colorableDirective: DaffColorableDirective,\n ) {\n this.sizableDirective.defaultSize = 'md';\n this.colorableDirective.defaultColor = 'light';\n }\n}\n","@if (_prefix) {\n <ng-content select=\"[daffPrefix]\"></ng-content>\n}\n<div class=\"daff-badge__label\">\n <ng-content></ng-content>\n</div>","import { DaffPrefixDirective } from '@daffodil/design';\n\nimport { DaffBadgeComponent } from './badge/badge.component';\n\n/**\n * @docs-private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MAAAA,0BAAA,GAAA,EAAA,MAAA,GAAA,uBAAA,CAAA;CAAA,gBAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,mBAAmB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,YAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA;AE1D5C,MAAa,wBAAgC,CAC3C,oBACA,mBACD"}
|
|
@@ -1,48 +1,110 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, inject, input } from "@angular/core";
|
|
3
|
+
import * as i1 from "@daffodil/design";
|
|
4
|
+
import { DaffColorableDirective, DaffSizableDirective, DaffStatusableDirective } from "@daffodil/design";
|
|
5
|
+
var DaffBeaconComponent = class DaffBeaconComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.speed = input("normal", ...ngDevMode ? [{ debugName: "speed" }] : /* istanbul ignore next */ []);
|
|
8
|
+
inject(DaffSizableDirective).defaultSize = "sm";
|
|
9
|
+
}
|
|
10
|
+
static {
|
|
11
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "22.2.4",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: DaffBeaconComponent,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
22
|
+
minVersion: "17.1.0",
|
|
23
|
+
version: "22.2.4",
|
|
24
|
+
type: DaffBeaconComponent,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "daff-beacon",
|
|
27
|
+
inputs: { speed: {
|
|
28
|
+
classPropertyName: "speed",
|
|
29
|
+
publicName: "speed",
|
|
30
|
+
isSignal: true,
|
|
31
|
+
isRequired: false,
|
|
32
|
+
transformFunction: null
|
|
33
|
+
} },
|
|
34
|
+
host: {
|
|
35
|
+
properties: {
|
|
36
|
+
"class.slow": "speed() === \"slow\"",
|
|
37
|
+
"class.normal": "speed() === \"normal\"",
|
|
38
|
+
"class.fast": "speed() === \"fast\""
|
|
39
|
+
},
|
|
40
|
+
classAttribute: "daff-beacon"
|
|
41
|
+
},
|
|
42
|
+
hostDirectives: [
|
|
43
|
+
{
|
|
44
|
+
directive: i1.DaffColorableDirective,
|
|
45
|
+
inputs: ["color", "color"]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
directive: i1.DaffStatusableDirective,
|
|
49
|
+
inputs: ["status", "status"]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
directive: i1.DaffSizableDirective,
|
|
53
|
+
inputs: ["size", "size"]
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
ngImport: i0,
|
|
57
|
+
template: "<ng-content></ng-content>",
|
|
58
|
+
isInline: true,
|
|
59
|
+
styles: [":host{display:inline-block;background:currentColor;border-radius:50%;flex:none;height:.5rem;width:.5rem;position:relative}:host:after{content:\"\";position:absolute;inset:0;border-radius:50%;background:currentColor;pointer-events:none}:host.daff-xs{height:.375rem;width:.375rem}:host.daff-sm{height:.5rem;width:.5rem}:host.daff-md{height:.75rem;width:.75rem}:host.daff-lg{height:1rem;width:1rem}:host.daff-xl{height:1.5rem;width:1.5rem}:host.slow{--daff-beacon-duration: 3.6s}:host.normal{--daff-beacon-duration: 2.4s}:host.fast{--daff-beacon-duration: 1.2s}:host:after{animation:beacon-animation var(--daff-beacon-duration) ease-out infinite}@media(prefers-reduced-motion:reduce){:host:after{animation:none;opacity:.3;transform:scale(2)}}@keyframes beacon-animation{0%{transform:scale(1);opacity:.4}70%,to{transform:scale(3);opacity:0}}\n"],
|
|
60
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
65
|
+
minVersion: "12.0.0",
|
|
66
|
+
version: "22.2.4",
|
|
67
|
+
ngImport: i0,
|
|
68
|
+
type: DaffBeaconComponent,
|
|
69
|
+
decorators: [{
|
|
70
|
+
type: Component,
|
|
71
|
+
args: [{
|
|
72
|
+
selector: "daff-beacon",
|
|
73
|
+
template: "<ng-content></ng-content>",
|
|
74
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
75
|
+
hostDirectives: [
|
|
76
|
+
{
|
|
77
|
+
directive: DaffColorableDirective,
|
|
78
|
+
inputs: ["color"]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
directive: DaffStatusableDirective,
|
|
82
|
+
inputs: ["status"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
directive: DaffSizableDirective,
|
|
86
|
+
inputs: ["size"]
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
host: {
|
|
90
|
+
class: "daff-beacon",
|
|
91
|
+
"[class.slow]": "speed() === \"slow\"",
|
|
92
|
+
"[class.normal]": "speed() === \"normal\"",
|
|
93
|
+
"[class.fast]": "speed() === \"fast\""
|
|
94
|
+
},
|
|
95
|
+
styles: [":host{display:inline-block;background:currentColor;border-radius:50%;flex:none;height:.5rem;width:.5rem;position:relative}:host:after{content:\"\";position:absolute;inset:0;border-radius:50%;background:currentColor;pointer-events:none}:host.daff-xs{height:.375rem;width:.375rem}:host.daff-sm{height:.5rem;width:.5rem}:host.daff-md{height:.75rem;width:.75rem}:host.daff-lg{height:1rem;width:1rem}:host.daff-xl{height:1.5rem;width:1.5rem}:host.slow{--daff-beacon-duration: 3.6s}:host.normal{--daff-beacon-duration: 2.4s}:host.fast{--daff-beacon-duration: 1.2s}:host:after{animation:beacon-animation var(--daff-beacon-duration) ease-out infinite}@media(prefers-reduced-motion:reduce){:host:after{animation:none;opacity:.3;transform:scale(2)}}@keyframes beacon-animation{0%{transform:scale(1);opacity:.4}70%,to{transform:scale(3);opacity:0}}\n"]
|
|
96
|
+
}]
|
|
97
|
+
}],
|
|
98
|
+
ctorParameters: () => [],
|
|
99
|
+
propDecorators: { speed: [{
|
|
100
|
+
type: i0.Input,
|
|
101
|
+
args: [{
|
|
102
|
+
isSignal: true,
|
|
103
|
+
alias: "speed",
|
|
104
|
+
required: false
|
|
105
|
+
}]
|
|
106
|
+
}] }
|
|
107
|
+
});
|
|
47
108
|
export { DaffBeaconComponent };
|
|
48
|
-
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=daffodil-design-beacon.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daffodil-design-beacon.mjs","sources":["../../../libs/design/beacon/src/beacon.component.ts"
|
|
1
|
+
{"version":3,"file":"daffodil-design-beacon.mjs","names":[],"sources":["../../../libs/design/beacon/src/beacon.component.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n} from '@angular/core';\n\nimport {\n DaffColorableDirective,\n DaffSizableDirective,\n DaffSizeAllType,\n DaffStatusableDirective,\n} from '@daffodil/design';\n\nimport { DaffBeaconSpeed } from './helpers/beacon-speed';\n\n/**\n * DaffBeaconComponent is a small indicator that draws visual attention to a specific location or element.\n */\n@Component({\n selector: 'daff-beacon',\n template: '<ng-content></ng-content>',\n styleUrl: './beacon.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: DaffColorableDirective,\n inputs: ['color'],\n },\n {\n directive: DaffStatusableDirective,\n inputs: ['status'],\n },\n {\n directive: DaffSizableDirective,\n inputs: ['size'],\n },\n ],\n host: {\n class: 'daff-beacon',\n '[class.slow]': 'speed() === \"slow\"',\n '[class.normal]': 'speed() === \"normal\"',\n '[class.fast]': 'speed() === \"fast\"',\n },\n})\nexport class DaffBeaconComponent {\n /**\n * How fast the beacon pulses.\n */\n speed = input<DaffBeaconSpeed>('normal');\n\n constructor() {\n inject<DaffSizableDirective<DaffSizeAllType>>(DaffSizableDirective).defaultSize = 'sm';\n }\n}\n"],"mappings":";;;;AA6CA,IAAa,sBAAb,MAAa,oBAAmB;CAM9B,cAAA;EAFA,KAAA,QAAQ,MAAuB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAGtC,OAA8C,oBAAoB,CAAC,CAAC,cAAc;CACpF;CARW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAnB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAmB,cAAA;GAAA,UAAA;GAAA,QAAA,EAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA,EAAA;GAAA,M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