@kirbydesign/designsystem 11.11.2-dev-5e0acd6 → 11.11.2-dev-f528d7a
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/data-grid/package.json +4 -0
- package/data-grid-composable/package.json +4 -0
- package/fesm2022/kirbydesign-designsystem-accordion.mjs +11 -11
- package/fesm2022/kirbydesign-designsystem-accordion.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-action-group.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-avatar.mjs +4 -12
- package/fesm2022/kirbydesign-designsystem-avatar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-badge.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-badge.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-button.mjs +6 -5
- package/fesm2022/kirbydesign-designsystem-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-calendar.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-calendar.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-card.mjs +21 -53
- package/fesm2022/kirbydesign-designsystem-card.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-chart.mjs +22 -22
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs +7 -19
- package/fesm2022/kirbydesign-designsystem-checkbox.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-config.mjs +1 -1
- package/fesm2022/kirbydesign-designsystem-config.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-data-grid-composable.mjs +162 -0
- package/fesm2022/kirbydesign-designsystem-data-grid-composable.mjs.map +1 -0
- package/fesm2022/kirbydesign-designsystem-data-grid.mjs +42 -0
- package/fesm2022/kirbydesign-designsystem-data-grid.mjs.map +1 -0
- package/fesm2022/kirbydesign-designsystem-data-table.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-divider.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-divider.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs +12 -12
- package/fesm2022/kirbydesign-designsystem-dropdown.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs +8 -21
- package/fesm2022/kirbydesign-designsystem-empty-state.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-fab-sheet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-flag.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-flag.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-form-field.mjs +44 -34
- package/fesm2022/kirbydesign-designsystem-form-field.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-gesture.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-gesture.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-header.mjs +20 -20
- package/fesm2022/kirbydesign-designsystem-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-helpers.mjs +9 -9
- package/fesm2022/kirbydesign-designsystem-icon.mjs +19 -12
- package/fesm2022/kirbydesign-designsystem-icon.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item-group.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-item-sliding.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-item.mjs +13 -13
- package/fesm2022/kirbydesign-designsystem-item.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-kirby-app.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-list.mjs +43 -53
- package/fesm2022/kirbydesign-designsystem-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-loading-overlay.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-menu.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-modal.mjs +51 -56
- package/fesm2022/kirbydesign-designsystem-modal.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-page.mjs +46 -46
- package/fesm2022/kirbydesign-designsystem-page.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-popover.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs +27 -64
- package/fesm2022/kirbydesign-designsystem-progress-circle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-radio.mjs +12 -12
- package/fesm2022/kirbydesign-designsystem-radio.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-range.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-range.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-reorder-list.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs +10 -10
- package/fesm2022/kirbydesign-designsystem-router-outlet.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-section-header.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-section-header.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-segmented-control.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-segmented-control.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-shared-floating.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-shared-portal.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem-shared.mjs +27 -29
- package/fesm2022/kirbydesign-designsystem-shared.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-slide-button.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-slide.mjs +15 -14
- package/fesm2022/kirbydesign-designsystem-slide.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-spinner.mjs +8 -8
- package/fesm2022/kirbydesign-designsystem-spinner.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs +12 -12
- package/fesm2022/kirbydesign-designsystem-tab-navigation.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-tabs.mjs +17 -17
- package/fesm2022/kirbydesign-designsystem-tabs.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs +287 -289
- package/fesm2022/kirbydesign-designsystem-testing-base.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-testing-jasmine.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing-jest.mjs +4 -4
- package/fesm2022/kirbydesign-designsystem-testing.mjs +5 -5
- package/fesm2022/kirbydesign-designsystem-testing.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toast.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-toast.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-toggle-button.mjs +7 -7
- package/fesm2022/kirbydesign-designsystem-toggle.mjs +6 -6
- package/fesm2022/kirbydesign-designsystem-toggle.mjs.map +1 -1
- package/fesm2022/kirbydesign-designsystem-types.mjs +3 -3
- package/fesm2022/kirbydesign-designsystem.mjs +11 -10
- package/fesm2022/kirbydesign-designsystem.mjs.map +1 -1
- package/icons/svg/person-blocked.svg +3 -0
- package/icons/svg/person-check.svg +3 -0
- package/icons/svg/person-close.svg +3 -0
- package/icons/svg/person-cloud.svg +3 -0
- package/icons/svg/person-power.svg +3 -0
- package/icons/svg/person-warning.svg +3 -0
- package/icons/svg/phone-device-pin.svg +3 -0
- package/icons/svg/phone-device.svg +3 -2
- package/package.json +14 -4
- package/types/kirbydesign-designsystem-avatar.d.ts +1 -5
- package/types/kirbydesign-designsystem-avatar.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-button.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-card.d.ts +2 -12
- package/types/kirbydesign-designsystem-card.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-checkbox.d.ts +1 -7
- package/types/kirbydesign-designsystem-checkbox.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-data-grid-composable.d.ts +48 -0
- package/types/kirbydesign-designsystem-data-grid-composable.d.ts.map +1 -0
- package/types/kirbydesign-designsystem-data-grid.d.ts +16 -0
- package/types/kirbydesign-designsystem-data-grid.d.ts.map +1 -0
- package/types/kirbydesign-designsystem-empty-state.d.ts +1 -8
- package/types/kirbydesign-designsystem-empty-state.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-fab-sheet.d.ts +1 -1
- package/types/kirbydesign-designsystem-form-field.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-icon.d.ts +1 -1
- package/types/kirbydesign-designsystem-icon.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-item-sliding.d.ts +1 -1
- package/types/kirbydesign-designsystem-item.d.ts +1 -1
- package/types/kirbydesign-designsystem-kirby-app.d.ts +1 -1
- package/types/kirbydesign-designsystem-list.d.ts +2 -12
- package/types/kirbydesign-designsystem-list.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-loading-overlay.d.ts +1 -1
- package/types/kirbydesign-designsystem-modal.d.ts +2 -3
- package/types/kirbydesign-designsystem-modal.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-page.d.ts +2 -2
- package/types/kirbydesign-designsystem-page.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-progress-circle.d.ts +5 -29
- package/types/kirbydesign-designsystem-progress-circle.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-radio.d.ts +1 -1
- package/types/kirbydesign-designsystem-router-outlet.d.ts +2 -2
- package/types/kirbydesign-designsystem-shared.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-slide.d.ts +1 -1
- package/types/kirbydesign-designsystem-slide.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-tabs.d.ts +3 -3
- package/types/kirbydesign-designsystem-testing-base.d.ts +9 -10
- package/types/kirbydesign-designsystem-testing-base.d.ts.map +1 -1
- package/types/kirbydesign-designsystem-toast.d.ts +1 -1
- package/types/kirbydesign-designsystem.d.ts +1 -0
- package/types/kirbydesign-designsystem.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-button.mjs","sources":["../../button/src/button.component.ts","../../button/src/button.component.html","../../button/src/kirbydesign-designsystem-button.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { NotificationColor } from '@kirbydesign/core';\nimport { EventListenerDisposeFn } from '@kirbydesign/designsystem/types';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nexport enum ButtonSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport type AttentionLevel = '1' | '2' | '3';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent implements AfterContentInit, OnDestroy, OnInit {\n @Input() attentionLevel: AttentionLevel;\n\n @HostBinding('class.no-decoration')\n @Input()\n noDecoration = false;\n\n @HostBinding('class.floating')\n public get isButtonFloating(): boolean {\n return this.isFloating;\n }\n\n @HostBinding('class.icon-only')\n public get isIconOnly(): boolean {\n return !!this.iconElementRef && this.showIconOnly;\n }\n private _isIconLeft = false;\n @HostBinding('class.icon-left')\n public get isIconLeft() {\n return this._isIconLeft && !this.showIconOnly;\n }\n private _isIconRight = false;\n @HostBinding('class.icon-right')\n public get isIconRight() {\n return this._isIconRight && !this.showIconOnly;\n }\n\n @HostBinding('class')\n get _cssClass() {\n const attentionLevel = this.getAttentionLevelCssClass();\n return [this.themeColor, this.size, attentionLevel].filter((cssClass) => !!cssClass);\n }\n\n private getAttentionLevelCssClass() {\n if (this.noDecoration) return;\n const attentionLevelDefault: AttentionLevel = '1';\n return `attention-level${this.attentionLevel || attentionLevelDefault}`;\n }\n\n @Input()\n themeColor: NotificationColor;\n @Input() expand: 'full' | 'block';\n @Input() isFloating: boolean = false;\n @Input()\n size: ButtonSize | `${ButtonSize}` = ButtonSize.MD;\n\n private _showIconOnly: boolean = false;\n get showIconOnly() {\n return this._showIconOnly;\n }\n @Input() set showIconOnly(value: boolean) {\n if (value) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(this.iconElementRef?.nativeElement);\n }\n this._showIconOnly = value;\n }\n\n @ContentChild(IconComponent, { read: ElementRef })\n iconElementRef?: ElementRef<HTMLElement>;\n\n private disposeEventListeners: EventListenerDisposeFn[] = [];\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setupEventListenerForAriaDisabledHandling();\n }\n\n setupEventListenerForAriaDisabledHandling() {\n // Prevent event bubbling for aria-disabled buttons using a native event listener.\n // HostListener cannot block event bubbling, see: https://github.com/angular/angular/issues/9587\n ['click', 'keydown.enter', 'keydown.space'].forEach((evt) => {\n const disposeEventListener = this.renderer.listen(\n this.elementRef.nativeElement,\n evt,\n this.blockEventIfAriaDisabled.bind(this),\n { capture: true }\n );\n this.disposeEventListeners.push(disposeEventListener);\n });\n }\n\n private wrapTextNode(iconElement?: HTMLElement) {\n if (!iconElement) {\n return;\n }\n\n const ifTextNode = (node?: ChildNode): ChildNode | undefined => {\n return node?.nodeType === Node.TEXT_NODE ? node : undefined;\n };\n\n const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);\n if (textNode) {\n const placement = textNode === iconElement.previousSibling ? 'before' : 'after';\n const textWrapper = this.renderer.createElement('span');\n const parent = textNode.parentNode;\n this.renderer.removeChild(textNode.parentNode, textNode);\n this.renderer.appendChild(textWrapper, textNode);\n if (placement === 'before') {\n this.renderer.insertBefore(parent, textWrapper, iconElement);\n } else if (placement === 'after') {\n this.renderer.appendChild(parent, textWrapper);\n }\n }\n }\n\n ngAfterContentInit(): void {\n const iconElement = this.iconElementRef?.nativeElement;\n\n if (iconElement === undefined) {\n // Nothing to do here when there's no icon:\n return;\n }\n\n // Ensure buttons with icon is always shown as icon only inside the toolbar:\n if (this.elementRef.nativeElement.closest('ion-toolbar')) {\n this._showIconOnly = true;\n }\n\n if (this.showIconOnly) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(iconElement);\n }\n\n const hasText = !!this.elementRef.nativeElement.textContent;\n if (!hasText) {\n // Button doesn't contain any text, make it round:\n this._showIconOnly = true;\n }\n\n if (hasText && !this.showIconOnly) {\n this._isIconLeft = this.elementRef.nativeElement.firstChild === iconElement;\n this._isIconRight = !this._isIconLeft;\n }\n }\n\n private blockEventIfAriaDisabled(event: Event) {\n if (this.elementRef.nativeElement.ariaDisabled === 'true') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n ngOnDestroy() {\n this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());\n }\n}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;IAkBY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACX,CAAC,EALW,UAAU,KAAV,UAAU,GAAA,EAAA,CAAA,CAAA;MAgBT,eAAe,CAAA;AAO1B,IAAA,IACW,gBAAgB,GAAA;QACzB,OAAO,IAAI,CAAC,UAAU;IACxB;AAEA,IAAA,IACW,UAAU,GAAA;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC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uB,CAAC,MAAM,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,q3aAAA,CAAA,EAAA;;sBAG9C;;sBAEA,WAAW;uBAAC,qBAAqB;;sBACjC;;sBAGA,WAAW;uBAAC,gBAAgB;;sBAK5B,WAAW;uBAAC,iBAAiB;;sBAK7B,WAAW;uBAAC,iBAAiB;;sBAK7B,WAAW;uBAAC,kBAAkB;;sBAK9B,WAAW;uBAAC,OAAO;;sBAYnB;;sBAEA;;sBACA;;sBACA;;sBAOA;;sBASA,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;;AE7FnD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-button.mjs","sources":["../../button/src/button.component.ts","../../button/src/button.component.html","../../button/src/kirbydesign-designsystem-button.ts"],"sourcesContent":["import {\n AfterContentInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n HostBinding,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n} from '@angular/core';\n\nimport { NotificationColor } from '@kirbydesign/core';\nimport { EventListenerDisposeFn } from '@kirbydesign/designsystem/types';\n\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nexport enum ButtonSize {\n XS = 'xs',\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n}\n\nexport type AttentionLevel = '1' | '2' | '3';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[kirby-button],Button[kirby-button],a[kirby-button]',\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent implements AfterContentInit, OnDestroy, OnInit {\n @Input() attentionLevel: AttentionLevel;\n\n @HostBinding('class.no-decoration')\n @Input()\n noDecoration = false;\n\n @HostBinding('class.floating')\n public get isButtonFloating(): boolean {\n return this.isFloating;\n }\n\n @HostBinding('class.icon-only')\n public get isIconOnly(): boolean {\n return !!this.iconElementRef && this.showIconOnly;\n }\n private _isIconLeft = false;\n @HostBinding('class.icon-left')\n public get isIconLeft() {\n return this._isIconLeft && !this.showIconOnly;\n }\n private _isIconRight = false;\n @HostBinding('class.icon-right')\n public get isIconRight() {\n return this._isIconRight && !this.showIconOnly;\n }\n\n @HostBinding('class')\n get _cssClass() {\n const attentionLevel = this.getAttentionLevelCssClass();\n return [this.themeColor, this.size, attentionLevel].filter((cssClass) => !!cssClass);\n }\n\n private getAttentionLevelCssClass() {\n if (this.noDecoration) return;\n const attentionLevelDefault: AttentionLevel = '1';\n return `attention-level${this.attentionLevel || attentionLevelDefault}`;\n }\n\n @Input()\n themeColor: NotificationColor;\n @Input() expand: 'full' | 'block';\n @Input() isFloating: boolean = false;\n @Input()\n size: ButtonSize | `${ButtonSize}` = ButtonSize.MD;\n\n private _showIconOnly: boolean = false;\n get showIconOnly() {\n return this._showIconOnly;\n }\n @Input() set showIconOnly(value: boolean) {\n if (value) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(this.iconElementRef?.nativeElement);\n }\n this._showIconOnly = value;\n }\n\n @ContentChild(IconComponent, { read: ElementRef })\n iconElementRef?: ElementRef<HTMLElement>;\n\n private disposeEventListeners: EventListenerDisposeFn[] = [];\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n\n ngOnInit(): void {\n this.setupEventListenerForAriaDisabledHandling();\n }\n\n setupEventListenerForAriaDisabledHandling() {\n // Prevent event bubbling for aria-disabled buttons using a native event listener.\n // HostListener cannot block event bubbling, see: https://github.com/angular/angular/issues/9587\n ['click', 'keydown.enter', 'keydown.space'].forEach((evt) => {\n const disposeEventListener = this.renderer.listen(\n this.elementRef.nativeElement,\n evt,\n this.blockEventIfAriaDisabled.bind(this),\n { capture: true }\n );\n this.disposeEventListeners.push(disposeEventListener);\n });\n }\n\n private wrapTextNode(iconElement?: HTMLElement) {\n if (!iconElement) {\n return;\n }\n\n const ifTextNode = (node?: ChildNode): ChildNode | undefined => {\n return node?.nodeType === Node.TEXT_NODE ? node : undefined;\n };\n\n const textNode = ifTextNode(iconElement.previousSibling) || ifTextNode(iconElement.nextSibling);\n if (textNode) {\n const placement = textNode === iconElement.previousSibling ? 'before' : 'after';\n const textWrapper = this.renderer.createElement('span');\n const parent = textNode.parentNode;\n this.renderer.removeChild(textNode.parentNode, textNode);\n this.renderer.appendChild(textWrapper, textNode);\n if (placement === 'before') {\n this.renderer.insertBefore(parent, textWrapper, iconElement);\n } else if (placement === 'after') {\n this.renderer.appendChild(parent, textWrapper);\n }\n }\n }\n\n ngAfterContentInit(): void {\n const iconElement = this.iconElementRef?.nativeElement;\n\n if (iconElement === undefined) {\n // Nothing to do here when there's no icon:\n return;\n }\n\n // Ensure buttons with icon is always shown as icon only inside the toolbar:\n if (this.elementRef.nativeElement.closest('ion-toolbar')) {\n this._showIconOnly = true;\n }\n\n if (this.showIconOnly) {\n // If the button text is supplied as plain text (i.e. as a text node not within an element tag),\n // we need to wrap it in an element to be able to target and hide it with css:\n this.wrapTextNode(iconElement);\n }\n\n const hasText = !!this.elementRef.nativeElement.textContent;\n if (!hasText) {\n // Button doesn't contain any text, make it round:\n this._showIconOnly = true;\n }\n\n if (hasText && !this.showIconOnly) {\n this._isIconLeft =\n this.elementRef.nativeElement.querySelector('.content-layer').firstChild === iconElement;\n this._isIconRight = !this._isIconLeft;\n }\n }\n\n private blockEventIfAriaDisabled(event: Event) {\n if (this.elementRef.nativeElement.ariaDisabled === 'true') {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n ngOnDestroy() {\n this.disposeEventListeners.forEach((unlistenEvent) => unlistenEvent());\n }\n}\n","<ng-container>\n <span class=\"state-layer\" aria-hidden=\"true\"></span>\n <span class=\"content-layer\"><ng-content></ng-content></span>\n</ng-container>\n<!--\n TODO: Fix globally exposed .state-layer and .content-layer\n \n See: https://github.com/kirbydesign/designsystem/issues/2101\n-->\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;IAkBY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACT,IAAA,UAAA,CAAA,IAAA,CAAA,GAAA,IAAS;AACX,CAAC,EALW,UAAU,KAAV,UAAU,GAAA,EAAA,CAAA,CAAA;MAgBT,eAAe,CAAA;AAO1B,IAAA,IACW,gBAAgB,GAAA;QACzB,OAAO,IAAI,CAAC,UAAU;IACxB;AAEA,IAAA,IACW,UAAU,GAAA;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,YAAY;IACnD;AAEA,IAAA,IACW,UAAU,GAAA;QACnB,OAAO,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY;IAC/C;AAEA,IAAA,IACW,WAAW,GAAA;QACpB,OAAO,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,YAAY;IAChD;AAEA,IAAA,IACI,SAAS,GAAA;AACX,QAAA,MAAM,cAAc,GAAG,IAAI,CAAC,yBAAyB,EAAE;QACvD,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;IACtF;IAEQ,yBAAyB,GAAA;QAC/B,IAAI,IAAI,CAAC,YAAY;YAAE;QACvB,MAAM,qBAAqB,GAAmB,GAAG;AACjD,QAAA,OAAO,kBAAkB,IAAI,CAAC,cAAc,IAAI,qBAAqB,EAAE;IACzE;AAUA,IAAA,IAAI,YAAY,GAAA;QACd,OAAO,IAAI,CAAC,aAAa;IAC3B;IACA,IAAa,YAAY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A,EAAA,cAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,qBAAA,EAAA,mBAAA,EAAA,gBAAA,EAAA,uBAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EA2DZ,aAAa,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAAU,UAAU,6BC7FjD,8SASA,EAAA,MAAA,EAAA,CAAA,8tZAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDyBa,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;+BAEE,2DAA2D,EAAA,eAAA,EAGpD,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,8SAAA,EAAA,MAAA,EAAA,CAAA,8tZAAA,CAAA,EAAA;;sBAG9C;;sBAEA,WAAW;uBAAC,qBAAqB;;sBACjC;;sBAGA,WAAW;uBAAC,gBAAgB;;sBAK5B,WAAW;uBAAC,iBAAiB;;sBAK7B,WAAW;uBAAC,iBAAiB;;sBAK7B,WAAW;uBAAC,kBAAkB;;sBAK9B,WAAW;uBAAC,OAAO;;sBAYnB;;sBAEA;;sBACA;;sBACA;;sBAOA;;sBASA,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;;;AE7FnD;;AAEG;;;;"}
|
|
@@ -459,12 +459,12 @@ class CalendarComponent {
|
|
|
459
459
|
event.preventDefault();
|
|
460
460
|
this.focusDate(newDate);
|
|
461
461
|
}
|
|
462
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
463
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.
|
|
462
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: CalendarComponent, deps: [{ token: LOCALE_ID }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.TranslationService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
463
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.23", type: CalendarComponent, isStandalone: true, selector: "kirby-calendar", inputs: { timezone: "timezone", disableWeekends: "disableWeekends", disablePastDates: "disablePastDates", disableFutureDates: "disableFutureDates", alwaysEnableToday: "alwaysEnableToday", locales: "locales", customLocales: "customLocales", usePopover: "usePopover", yearNavigatorOptions: "yearNavigatorOptions", selectedDate: "selectedDate", disabledDates: "disabledDates", enabledDates: "enabledDates", todayDate: "todayDate", minDate: "minDate", maxDate: "maxDate" }, outputs: { dateChange: "dateChange", dateSelect: "dateSelect", yearSelect: "yearSelect", previousMonthClicked: "previousMonthClicked", nextMonthClicked: "nextMonthClicked" }, host: { properties: { "class.has-year-navigator": "this._hasYearNavigator" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"header\">\n <div class=\"month-navigator\">\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('previousMonth')\"\n [attr.aria-disabled]=\"_canNavigateBack ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(-1)\"\n >\n <kirby-icon name=\"arrow-back\" aria-hidden=\"true\"></kirby-icon>\n </button>\n\n <div class=\"month-and-year\" [id]=\"_tableMonthId\" aria-live=\"polite\" aria-atomic=\"true\">\n <span class=\"month\">{{ activeMonthName }}</span>\n @if (!_hasYearNavigator) {\n <span class=\"year\">{{ activeYear }}</span>\n }\n </div>\n\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('nextMonth')\"\n [attr.aria-disabled]=\"_canNavigateForward ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(1)\"\n >\n <kirby-icon name=\"arrow-more\" aria-hidden=\"true\"></kirby-icon>\n </button>\n </div>\n @if (_hasYearNavigator) {\n <kirby-dropdown\n [selectedIndex]=\"navigatedYear\"\n [items]=\"navigableYears\"\n [attr.aria-label]=\"translations.get('selectYear')\"\n popout=\"left\"\n (change)=\"_changeYear($event)\"\n ></kirby-dropdown>\n }\n</div>\n\n<table [attr.aria-labelledby]=\"_tableMonthId\" role=\"grid\">\n <thead>\n <tr>\n @for (weekDay of _weekDays; track weekDay.fullName) {\n <th scope=\"col\">\n <span aria-hidden=\"true\">{{ weekDay.firstLetterCapitalized }}</span>\n <span class=\"kirby-visually-hidden\">{{ weekDay.fullName }}</span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (week of _month; track $index) {\n <tr>\n @for (day of week; track day.date + '-' + day.monthIndex + '-' + day.year) {\n <td [attr.aria-selected]=\"day.isSelected ? true : false\">\n <button\n kirby-button\n type=\"button\"\n (click)=\"_onDateSelected(day)\"\n (keydown)=\"_onDateKeydown($event)\"\n class=\"day\"\n [class.current-month]=\"day.isCurrentMonth\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.selectable]=\"day.isSelectable\"\n [class.selected]=\"day.isSelected\"\n [class.focussed]=\"day.isFocussed\"\n [class.past]=\"day.isPast\"\n [attr.aria-label]=\"day.ariaLabel\"\n [attr.aria-disabled]=\"day.isSelectable ? null : true\"\n [noDecoration]=\"true\"\n [disabled]=\"day.isFocusable ? null : true\"\n [tabIndex]=\"day.isFocussed ? 0 : -1\"\n >\n {{ day.date }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", styles: [":host{font-size:var(--kirby-font-size-n)}table{width:100%;border-collapse:collapse;-webkit-user-select:none;user-select:none;margin-bottom:var(--kirby-spacing-xxs)}th,td{text-align:center;padding:0}th:first-child,td:first-child{padding-left:var(--kirby-spacing-xxs)}th:last-child,td:last-child{padding-right:var(--kirby-spacing-xxs)}th{height:50px;border-bottom:1px solid var(--kirby-background-color)}.header,th,td{background-color:transparent}.header{display:flex;justify-content:space-between;margin:var(--kirby-spacing-xxs);margin-bottom:0}.month-navigator{display:flex;flex-grow:1;align-items:center;justify-content:space-between}.month-and-year{-webkit-user-select:none;user-select:none;font-weight:var(--kirby-font-weight-bold)}.month-and-year .month{margin-right:var(--kirby-spacing-xxs)}:host(.has-year-navigator) .month-navigator{flex-grow:0}:host(.has-year-navigator) .month-and-year{width:80px;margin:0 var(--kirby-spacing-xxs);text-align:center}:host(.has-year-navigator) .month{margin-right:0}.day{display:inline-flex;align-items:center;justify-content:center;border-radius:calc(var(--kirby-spacing-xl) * .5);min-width:var(--kirby-spacing-xl);min-height:var(--kirby-spacing-xl);width:var(--kirby-spacing-xl);height:var(--kirby-spacing-xl);margin:var(--kirby-spacing-xxxs) 0;font-size:var(--kirby-font-size-n)}.day:focus{z-index:var(--kirby-z-index-default)}button[aria-disabled=true]{color:#b4b4b4}.day.selectable:not(.current-month,.selected){color:var(--kirby-text-color-semi-dark)}.day.today{border:1px solid var(--kirby-semi-dark)}.day.selected{color:var(--kirby-black-contrast);background-color:var(--kirby-black)}\n"], dependencies: [{ kind: "component", type: DropdownComponent, selector: "kirby-dropdown", inputs: ["items", "selectedIndex", "focusedIndex", "itemTextProperty", "placeholder", "popout", "attentionLevel", "expand", "disabled", "hasError", "size", "tabindex", "usePopover"], outputs: ["hasErrorChange", "change"] }, { kind: "component", type: ButtonComponent, selector: "button[kirby-button],Button[kirby-button],a[kirby-button]", inputs: ["attentionLevel", "noDecoration", "themeColor", "expand", "isFloating", "size", "showIconOnly"] }, { kind: "component", type: IconComponent, selector: "kirby-icon", inputs: ["size", "name"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
464
464
|
}
|
|
465
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.23", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
466
466
|
type: Component,
|
|
467
|
-
args: [{ imports: [DropdownComponent, ButtonComponent, IconComponent], selector: 'kirby-calendar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"header\">\n <div class=\"month-navigator\">\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('previousMonth')\"\n [attr.aria-disabled]=\"_canNavigateBack ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(-1)\"\n >\n <kirby-icon name=\"arrow-back\" aria-hidden=\"true\"></kirby-icon>\n </button>\n\n <div class=\"month-and-year\" [id]=\"_tableMonthId\" aria-live=\"polite\" aria-atomic=\"true\">\n <span class=\"month\">{{ activeMonthName }}</span>\n @if (!_hasYearNavigator) {\n <span class=\"year\">{{ activeYear }}</span>\n }\n </div>\n\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('nextMonth')\"\n [attr.aria-disabled]=\"_canNavigateForward ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(1)\"\n >\n <kirby-icon name=\"arrow-more\" aria-hidden=\"true\"></kirby-icon>\n </button>\n </div>\n @if (_hasYearNavigator) {\n <kirby-dropdown\n [selectedIndex]=\"navigatedYear\"\n [items]=\"navigableYears\"\n [attr.aria-label]=\"translations.get('selectYear')\"\n popout=\"left\"\n (change)=\"_changeYear($event)\"\n ></kirby-dropdown>\n }\n</div>\n\n<table [attr.aria-labelledby]=\"_tableMonthId\" role=\"grid\">\n <thead>\n <tr>\n @for (weekDay of _weekDays; track weekDay.fullName) {\n <th scope=\"col\">\n <span aria-hidden=\"true\">{{ weekDay.firstLetterCapitalized }}</span>\n <span class=\"kirby-visually-hidden\">{{ weekDay.fullName }}</span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (week of _month; track $index) {\n <tr>\n @for (day of week; track day.date + '-' + day.monthIndex + '-' + day.year) {\n <td [attr.aria-selected]=\"day.isSelected ? true : false\">\n <button\n kirby-button\n type=\"button\"\n (click)=\"_onDateSelected(day)\"\n (keydown)=\"_onDateKeydown($event)\"\n class=\"day\"\n [class.current-month]=\"day.isCurrentMonth\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.selectable]=\"day.isSelectable\"\n [class.selected]=\"day.isSelected\"\n [class.focussed]=\"day.isFocussed\"\n [class.past]=\"day.isPast\"\n [attr.aria-label]=\"day.ariaLabel\"\n [attr.aria-disabled]=\"day.isSelectable ? null : true\"\n [noDecoration]=\"
|
|
467
|
+
args: [{ imports: [DropdownComponent, ButtonComponent, IconComponent], selector: 'kirby-calendar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"header\">\n <div class=\"month-navigator\">\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('previousMonth')\"\n [attr.aria-disabled]=\"_canNavigateBack ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(-1)\"\n >\n <kirby-icon name=\"arrow-back\" aria-hidden=\"true\"></kirby-icon>\n </button>\n\n <div class=\"month-and-year\" [id]=\"_tableMonthId\" aria-live=\"polite\" aria-atomic=\"true\">\n <span class=\"month\">{{ activeMonthName }}</span>\n @if (!_hasYearNavigator) {\n <span class=\"year\">{{ activeYear }}</span>\n }\n </div>\n\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('nextMonth')\"\n [attr.aria-disabled]=\"_canNavigateForward ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(1)\"\n >\n <kirby-icon name=\"arrow-more\" aria-hidden=\"true\"></kirby-icon>\n </button>\n </div>\n @if (_hasYearNavigator) {\n <kirby-dropdown\n [selectedIndex]=\"navigatedYear\"\n [items]=\"navigableYears\"\n [attr.aria-label]=\"translations.get('selectYear')\"\n popout=\"left\"\n (change)=\"_changeYear($event)\"\n ></kirby-dropdown>\n }\n</div>\n\n<table [attr.aria-labelledby]=\"_tableMonthId\" role=\"grid\">\n <thead>\n <tr>\n @for (weekDay of _weekDays; track weekDay.fullName) {\n <th scope=\"col\">\n <span aria-hidden=\"true\">{{ weekDay.firstLetterCapitalized }}</span>\n <span class=\"kirby-visually-hidden\">{{ weekDay.fullName }}</span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (week of _month; track $index) {\n <tr>\n @for (day of week; track day.date + '-' + day.monthIndex + '-' + day.year) {\n <td [attr.aria-selected]=\"day.isSelected ? true : false\">\n <button\n kirby-button\n type=\"button\"\n (click)=\"_onDateSelected(day)\"\n (keydown)=\"_onDateKeydown($event)\"\n class=\"day\"\n [class.current-month]=\"day.isCurrentMonth\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.selectable]=\"day.isSelectable\"\n [class.selected]=\"day.isSelected\"\n [class.focussed]=\"day.isFocussed\"\n [class.past]=\"day.isPast\"\n [attr.aria-label]=\"day.ariaLabel\"\n [attr.aria-disabled]=\"day.isSelectable ? null : true\"\n [noDecoration]=\"true\"\n [disabled]=\"day.isFocusable ? null : true\"\n [tabIndex]=\"day.isFocussed ? 0 : -1\"\n >\n {{ day.date }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n", styles: [":host{font-size:var(--kirby-font-size-n)}table{width:100%;border-collapse:collapse;-webkit-user-select:none;user-select:none;margin-bottom:var(--kirby-spacing-xxs)}th,td{text-align:center;padding:0}th:first-child,td:first-child{padding-left:var(--kirby-spacing-xxs)}th:last-child,td:last-child{padding-right:var(--kirby-spacing-xxs)}th{height:50px;border-bottom:1px solid var(--kirby-background-color)}.header,th,td{background-color:transparent}.header{display:flex;justify-content:space-between;margin:var(--kirby-spacing-xxs);margin-bottom:0}.month-navigator{display:flex;flex-grow:1;align-items:center;justify-content:space-between}.month-and-year{-webkit-user-select:none;user-select:none;font-weight:var(--kirby-font-weight-bold)}.month-and-year .month{margin-right:var(--kirby-spacing-xxs)}:host(.has-year-navigator) .month-navigator{flex-grow:0}:host(.has-year-navigator) .month-and-year{width:80px;margin:0 var(--kirby-spacing-xxs);text-align:center}:host(.has-year-navigator) .month{margin-right:0}.day{display:inline-flex;align-items:center;justify-content:center;border-radius:calc(var(--kirby-spacing-xl) * .5);min-width:var(--kirby-spacing-xl);min-height:var(--kirby-spacing-xl);width:var(--kirby-spacing-xl);height:var(--kirby-spacing-xl);margin:var(--kirby-spacing-xxxs) 0;font-size:var(--kirby-font-size-n)}.day:focus{z-index:var(--kirby-z-index-default)}button[aria-disabled=true]{color:#b4b4b4}.day.selectable:not(.current-month,.selected){color:var(--kirby-text-color-semi-dark)}.day.today{border:1px solid var(--kirby-semi-dark)}.day.selected{color:var(--kirby-black-contrast);background-color:var(--kirby-black)}\n"] }]
|
|
468
468
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
469
469
|
type: Inject,
|
|
470
470
|
args: [LOCALE_ID]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kirbydesign-designsystem-calendar.mjs","sources":["../../calendar/src/calendar.component.ts","../../calendar/src/calendar.component.html","../../calendar/src/kirbydesign-designsystem-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n LOCALE_ID,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport {\n add,\n eachDayOfInterval,\n endOfWeek,\n format,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n isWeekend,\n lastDayOfWeek,\n Locale as LocaleDateFns,\n startOfDay,\n startOfMonth,\n startOfWeek,\n} from 'date-fns';\nimport { fromZonedTime, toZonedTime } from 'date-fns-tz';\nimport { da, de, enGB, enUS } from 'date-fns/locale';\n\nimport { capitalizeFirstLetter } from '@kirbydesign/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { DropdownComponent } from '@kirbydesign/designsystem/dropdown';\nimport { UniqueIdGenerator } from '@kirbydesign/designsystem/helpers';\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nimport { TranslationService } from '@kirbydesign/designsystem/shared';\nimport { CalendarDay, CalendarDayMetadata } from './interfaces/calendar-day';\nimport { CalendarYearNavigatorConfig } from './interfaces/calendar-year-navigator-config';\n\nexport type Locale = LocaleDateFns;\n\ninterface WeekDay {\n firstLetterCapitalized: string;\n fullName: string;\n}\n\nenum TimeUnit {\n years = 'years',\n months = 'months',\n weeks = 'weeks',\n days = 'days',\n hours = 'hours',\n minutes = 'minutes',\n seconds = 'seconds',\n milliseconds = 'milliseconds',\n}\n\n@Component({\n imports: [DropdownComponent, ButtonComponent, IconComponent],\n selector: 'kirby-calendar',\n templateUrl: './calendar.component.html',\n styleUrls: ['./calendar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CalendarComponent implements OnInit, OnChanges {\n @Output() dateChange = new EventEmitter<Date>();\n @Output() dateSelect = new EventEmitter<Date>();\n @Output() yearSelect = new EventEmitter<number>();\n @Output() previousMonthClicked = new EventEmitter<Date>();\n @Output() nextMonthClicked = new EventEmitter<Date>();\n @Input() timezone: 'local' | 'UTC' = 'local';\n @Input() disableWeekends = false;\n @Input() disablePastDates = false;\n @Input() disableFutureDates = false;\n @Input() alwaysEnableToday = false;\n\n @Input() set locales(locales: { [key: string]: Locale }) {\n console.warn(\n `Supplying additional locales to the Kirby Calendar Component via an input property is deprecated and should not be used.\n A future update will allow injecting additional locales via a provider instead.`\n );\n }\n @Input() customLocales: { [key: string]: Locale } = {};\n /**\n * @deprecated This input is no longer needed. The year selection dropdown now always uses popover positioning.\n * This input will be removed in a future major version.\n */\n @Input() set usePopover(_value: boolean) {\n console.warn(\n `[Kirby Calendar] The 'usePopover' input is deprecated and no longer has any effect. \n The year selection dropdown now always uses popover positioning. This input will be removed in a future major version.`\n );\n }\n /**\n * Configuration for the year navigator.\n *\n * Internally, calendar component:\n * - bases yearNavigatorOptions.from and yearNavigatorOptions.to on todayDate if a number is provided\n * - prioritizes minDate and maxDate over yearNavigatorOptions.from and yearNavigatorOptions.to\n */\n @Input() yearNavigatorOptions: CalendarYearNavigatorConfig;\n\n _tableMonthId = UniqueIdGenerator.scopedTo('kirby-calendar-month').next();\n _month: CalendarDay[][];\n _weekDays: WeekDay[];\n private selectedDay: CalendarDay;\n private focussedDay: CalendarDay;\n // NOTE: Internally, all Dates\n // are normalized to point to local timezone midnight, regardless of the timezone\n // setting.\n private activeMonth: Date;\n private _selectedDate: Date;\n private _disabledDates: Date[] = [];\n private _enabledDates: Date[] = [];\n private _todayDate: Date;\n private _minDate: Date;\n private _maxDate: Date;\n private focussedDate: Date;\n private locale: Locale;\n private timeZoneName: string;\n private includedLocales = { da, de, enGB, enUS };\n\n get selectedDate(): Date {\n return this._selectedDate;\n }\n\n @Input() set selectedDate(valueLocalOrUTC: Date | null) {\n const value = this.normalizeDate(valueLocalOrUTC);\n\n if (valueLocalOrUTC) {\n this.setActiveMonth(value);\n }\n\n if (this.hasDateChanged(value, this._selectedDate)) {\n this.onSelectedDateChange(value);\n this.focusDate(value);\n this._selectedDate = value;\n }\n }\n\n get disabledDates(): Date[] {\n return this._disabledDates;\n }\n\n @Input() set disabledDates(value: Date[]) {\n this._disabledDates = (value || []).map((date) => this.normalizeDate(date));\n }\n\n get enabledDates(): Date[] {\n return this._enabledDates;\n }\n\n @Input() set enabledDates(value: Date[]) {\n this._enabledDates = (value || []).map((date) => this.normalizeDate(date));\n }\n\n get todayDate(): Date {\n return this._todayDate;\n }\n\n @Input() set todayDate(value: Date) {\n this._todayDate = this.normalizeDate(value);\n }\n\n get minDate(): Date {\n return this._minDate;\n }\n\n @Input() set minDate(value: Date) {\n if (value && this.activeMonth && isBefore(this.activeMonth, value)) {\n this.setActiveMonth(value);\n }\n this._minDate = this.normalizeDate(value);\n }\n\n get maxDate(): Date {\n return this._maxDate;\n }\n\n @Input() set maxDate(value: Date) {\n if (value && this.activeMonth && isAfter(this.activeMonth, value)) {\n this.setActiveMonth(value);\n }\n this._maxDate = this.normalizeDate(value);\n }\n\n get activeMonthName(): string {\n return capitalizeFirstLetter(this.formatWithLocale(this.activeMonth, 'MMMM'));\n }\n\n get activeYear(): string {\n return this.formatWithLocale(this.activeMonth, 'yyyy');\n }\n\n /**\n * Gets navigable years for year navigator based on yearNavigatorOptions.\n */\n get navigableYears(): string[] {\n const dateOfFirstNavigableYear =\n this.minDate || this.getDateFromNavigableYear(this.yearNavigatorOptions.from);\n\n const dateOfLastNavigableYear =\n this.maxDate || this.getDateFromNavigableYear(this.yearNavigatorOptions.to);\n\n return this.getYearsBetweenDates(dateOfFirstNavigableYear, dateOfLastNavigableYear);\n }\n\n get navigatedYear(): number {\n return this.navigableYears.indexOf(this.activeYear);\n }\n\n @HostBinding('class.has-year-navigator')\n get _hasYearNavigator() {\n return !!this.yearNavigatorOptions;\n }\n\n private getTodayDate() {\n return startOfDay(this.todayDate ?? new Date());\n }\n\n constructor(\n @Inject(LOCALE_ID) locale: string,\n private elementRef: ElementRef,\n private cdr: ChangeDetectorRef,\n public translations: TranslationService\n ) {\n this.locale = this.mapLocale(locale);\n this.timeZoneName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n private formatWithLocale(date: Date, formatString: string): string {\n return format(date, formatString, {\n locale: this.locale,\n });\n }\n\n private mapLocale(locale: string): Locale {\n if (locale === 'en') {\n locale = 'enGB'; // if english locale is provided without region, we default to GB\n }\n locale = locale.replace('-', '');\n const availableLocales = { ...this.includedLocales, ...this.locales, ...this.customLocales };\n return availableLocales[locale] || this.includedLocales.enGB; // Default to enGB if injected locale doesnt exist\n }\n\n private formatDateLabel(): string {\n const localeDateFormats = {\n da: 'd. MMMM',\n de: 'd. MMMM',\n 'en-GB': 'd MMMM',\n 'en-US': 'MMMM d',\n };\n\n const defaultDateFormat = localeDateFormats['en-US'];\n const dateFormat = localeDateFormats[this.locale.code] || defaultDateFormat;\n return dateFormat;\n }\n\n ngOnInit() {\n this.focussedDate = this.getTodayDate();\n this._weekDays = this.getWeekDays();\n this.setActiveMonth(this.selectedDate);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.activeMonth) return;\n if (\n changes.disableWeekends ||\n changes.disablePastDates ||\n changes.disableFutureDates ||\n changes.disabledDates ||\n changes.enabledDates ||\n changes.minDate ||\n changes.maxDate ||\n changes.todayDate ||\n changes.timezone\n ) {\n this.refreshActiveMonth();\n }\n }\n\n private setActiveMonth(date: Date = new Date()) {\n if (!this.activeMonth || !isSameMonth(this.activeMonth, date)) {\n this.activeMonth = startOfMonth(date);\n this.refreshActiveMonth();\n }\n }\n\n // For leniency, the component will accept any Date that points to either UTC midnight\n // or to local timezone midnight although we will internally normalize the representation\n // of all received dates to point to local timezone midnight.\n // We currently log no warnings if the date doesn't match the timezone setting or\n // if it doesn't point to midnight.\n private normalizeDate(dateLocalOrUTC: Date) {\n if (!dateLocalOrUTC) return;\n\n if (startOfDay(dateLocalOrUTC).getTime() === dateLocalOrUTC.getTime()) {\n // date is local timezone midnight\n return dateLocalOrUTC;\n }\n if (\n startOfDay(toZonedTime(dateLocalOrUTC, this.timeZoneName)).getTime() ===\n toZonedTime(dateLocalOrUTC, this.timeZoneName).getTime()\n ) {\n // the date is a UTC midnight; create the equivalent local timezone midnight date\n const normalizedUTCdate = toZonedTime(dateLocalOrUTC, this.timeZoneName);\n return normalizedUTCdate;\n }\n // does not point to midnight so we make it\n return startOfDay(dateLocalOrUTC);\n }\n\n private getWeekDays(): WeekDay[] {\n const now = new Date();\n const week = eachDayOfInterval({\n start: startOfWeek(now, { locale: this.locale }),\n end: endOfWeek(now, { locale: this.locale }),\n });\n\n const weekdayNarrowFormat = 'EEEEE';\n const weekdayWideFormat = 'EEEE';\n\n return week.map((date) => ({\n firstLetterCapitalized: this.formatWithLocale(date, weekdayNarrowFormat),\n fullName: this.formatWithLocale(date, weekdayWideFormat),\n }));\n }\n\n private hasDateChanged(newDate: Date, previousDate: Date): boolean {\n if (!newDate && !previousDate) {\n return false;\n }\n if (newDate instanceof Date && !previousDate) {\n return true;\n }\n return !isSameDay(newDate, previousDate);\n }\n\n private isDisabledDate(date: Date): boolean {\n return this.disabledDates.some((disabledDate) => isSameDay(disabledDate, date));\n }\n\n private isEnabledDate(date: Date): boolean {\n return (\n this._enabledDates.length === 0 ||\n this.enabledDates.some((enabledDate) => isSameDay(enabledDate, date))\n );\n }\n\n refreshActiveMonth() {\n if (!this.activeMonth) return;\n\n const monthStart = startOfMonth(this.activeMonth);\n const startOfFirstWeek = startOfWeek(monthStart, { locale: this.locale });\n\n const totalNumberOfDays = 42; // Always show 42 days (6 weeks) in calendar\n const daysArray = Array.from(Array(totalNumberOfDays).keys());\n const today = this.getTodayDate();\n\n const calendarDays: CalendarDay[] = daysArray.map((number) => {\n const dateOfCalendarDay = add(startOfFirstWeek, { [TimeUnit.days]: number });\n\n const calendarDay: CalendarDay = {\n date: dateOfCalendarDay.getDate(),\n monthIndex: dateOfCalendarDay.getMonth(),\n year: dateOfCalendarDay.getFullYear(),\n ariaLabel: this.formatWithLocale(dateOfCalendarDay, this.formatDateLabel()),\n ...this.getCalendarDayMetadata(dateOfCalendarDay, today, monthStart),\n };\n if (calendarDay.isSelected) {\n this.selectedDay = calendarDay;\n }\n if (calendarDay.isFocussed) {\n this.focussedDay = calendarDay;\n }\n return calendarDay;\n });\n this._month = this.chunk(calendarDays, 7);\n }\n\n private getCalendarDayMetadata(date: Date, today: Date, monthStart: Date): CalendarDayMetadata {\n return {\n isToday: isSameDay(today, date),\n isPast: isBefore(date, today),\n isFuture: isAfter(date, today),\n isWeekend: isWeekend(date),\n isCurrentMonth: isSameMonth(date, monthStart),\n isSelectable: this.isSelectable(date, today),\n isFocusable: this.isWithinAllowedRange(date, today),\n isSelected: isSameDay(this.selectedDate, date),\n isFocussed: isSameDay(this.focussedDate, date),\n };\n }\n\n private isSelectable(date: Date, today: Date): boolean {\n if (this.alwaysEnableToday && isSameDay(today, date)) return true;\n\n if (!this.isWithinAllowedRange(date, today)) return false;\n if (this.isDisabledDate(date)) return false;\n if (!this.isEnabledDate(date)) return false;\n if (this.disableWeekends && isWeekend(date)) return false;\n\n return true;\n }\n\n private isWithinAllowedRange(date: Date, today: Date): boolean {\n if (this.disablePastDates && isBefore(date, today)) return false;\n if (this.disableFutureDates && isAfter(date, today)) return false;\n if (this.minDate && isBefore(date, this.minDate)) return false;\n if (this.maxDate && isAfter(date, this.maxDate)) return false;\n\n return true;\n }\n\n private chunk(array: any[], size: number) {\n const results = [];\n while (array.length) {\n results.push(array.splice(0, size));\n }\n return results;\n }\n\n private onSelectedDateChange(newDate: Date): void {\n if (this.selectedDay) {\n this.selectedDay.isSelected = false;\n }\n\n const newDay = this.getDay(newDate);\n if (newDay) {\n newDay.isSelected = true;\n this.selectedDay = newDay;\n }\n }\n\n _onDateSelected(newDay: CalendarDay) {\n if (!newDay.isSelectable) return;\n\n let newDate = new Date(newDay.year, newDay.monthIndex, newDay.date);\n\n if (this.timezone === 'UTC') {\n newDate = fromZonedTime(this.subtractTimezoneOffset(newDate), this.timeZoneName);\n }\n\n const dateToEmit = newDate;\n\n if (this.hasDateChanged(newDate, this._selectedDate)) {\n this.setActiveMonth(newDate);\n this.onSelectedDateChange(newDate);\n this.selectedDate = newDate;\n this.dateChange.emit(dateToEmit);\n }\n this.dateSelect.emit(dateToEmit);\n }\n\n _changeMonth(index: number) {\n if (index > 0 && !this._canNavigateForward) return;\n if (index < 0 && !this._canNavigateBack) return;\n\n this.changeActiveView(index, TimeUnit.months);\n index > 0\n ? this.nextMonthClicked.emit(this.activeMonth)\n : this.previousMonthClicked.emit(this.activeMonth);\n }\n\n _changeYear(year: string) {\n const yearNumeric = Number(year);\n this.changeActiveView(yearNumeric - getYear(this.activeMonth), TimeUnit.years);\n this.yearSelect.emit(yearNumeric);\n }\n\n private changeActiveView(index: number, unit: TimeUnit) {\n if (index === 0) return;\n this.activeMonth = add(this.activeMonth, { [unit]: index });\n this.focussedDate = add(this.focussedDate, { [unit]: index });\n\n this.refreshActiveMonth();\n }\n\n get _canNavigateBack(): boolean {\n const today = this.getTodayDate();\n const reachedPastDatesLimit = this.disablePastDates && isSameMonth(this.activeMonth, today);\n\n const reachedOrExceededMinDate =\n this.minDate &&\n (isSameMonth(this.activeMonth, this.minDate) || isBefore(this.activeMonth, this.minDate));\n\n return !reachedPastDatesLimit && !reachedOrExceededMinDate;\n }\n\n get _canNavigateForward(): boolean {\n const today = this.getTodayDate();\n const reachedFutureDatesLimit = this.disableFutureDates && isSameMonth(this.activeMonth, today);\n\n const reachedOrExceededMaxDate =\n this.maxDate &&\n (isSameMonth(this.activeMonth, this.maxDate) || isAfter(this.activeMonth, this.maxDate));\n\n return !reachedFutureDatesLimit && !reachedOrExceededMaxDate;\n }\n\n private getDay(date: Date) {\n let foundDay: CalendarDay = null;\n if (date) {\n for (const week of this._month) {\n foundDay = week.find((day) => {\n return day.isCurrentMonth && day.date === date.getDate();\n });\n if (foundDay) {\n break;\n }\n }\n }\n return foundDay;\n }\n\n private subtractTimezoneOffset(date: Date): Date {\n const timezoneOffsetInMs = date.getTimezoneOffset() * 60 * 1000;\n return new Date(date.getTime() - timezoneOffsetInMs);\n }\n\n private getDateFromNavigableYear(navigableYear: number | Date): Date {\n if (navigableYear instanceof Date) return navigableYear;\n const today = this.todayDate || new Date();\n return new Date(today.getFullYear() + navigableYear, 0, 1);\n }\n\n private getYearsBetweenDates(startDate: Date, endDate: Date): string[] {\n // Ensure years are ordered correctly if parameters are switched:\n const [startYear, endYear] = [startDate.getFullYear(), endDate.getFullYear()].sort();\n const numberOfYears = endYear - startYear;\n return Array.from({ length: numberOfYears + 1 }, (_, i) => (startYear + i).toString());\n }\n\n private setFocussedDay(newDate: Date) {\n const newDay = this.getDay(newDate);\n if (!newDay) return;\n\n if (this.focussedDay) {\n this.focussedDay.isFocussed = false;\n }\n newDay.isFocussed = true;\n this.focussedDay = newDay;\n }\n\n private focusDate(newDate: Date | null) {\n if (!newDate) return;\n\n newDate = this.normalizeDate(newDate);\n\n if (this.timezone === 'UTC') {\n newDate = fromZonedTime(this.subtractTimezoneOffset(newDate), this.timeZoneName);\n }\n\n const today = this.getTodayDate();\n if (!this.isWithinAllowedRange(newDate, today)) return;\n\n if (!this.hasDateChanged(newDate, this.focussedDate)) return;\n\n this.setActiveMonth(newDate);\n this.setFocussedDay(newDate);\n this.focussedDate = newDate;\n\n this.cdr.detectChanges(); //sync focussed class to template before setting focus\n const elementMarkedForFocus = this.elementRef.nativeElement.querySelector('.focussed');\n elementMarkedForFocus.focus();\n }\n\n _onDateKeydown(event: KeyboardEvent) {\n const { key, shiftKey } = event;\n let newDate;\n\n switch (key) {\n case 'ArrowUp':\n newDate = add(this.focussedDate, { days: -7 });\n break;\n case 'ArrowDown':\n newDate = add(this.focussedDate, { days: 7 });\n break;\n case 'ArrowRight':\n newDate = add(this.focussedDate, { days: 1 });\n break;\n case 'ArrowLeft':\n newDate = add(this.focussedDate, { days: -1 });\n break;\n case 'Home':\n newDate = startOfWeek(this.focussedDate, { locale: this.locale });\n break;\n case 'End':\n newDate = lastDayOfWeek(this.focussedDate, { locale: this.locale });\n break;\n case 'PageUp':\n newDate = shiftKey\n ? add(this.focussedDate, { years: -1 })\n : add(this.focussedDate, { months: -1 });\n break;\n case 'PageDown':\n newDate = shiftKey\n ? add(this.focussedDate, { years: 1 })\n : add(this.focussedDate, { months: 1 });\n break;\n default:\n return;\n }\n\n event.preventDefault();\n this.focusDate(newDate);\n }\n}\n","<div class=\"header\">\n <div class=\"month-navigator\">\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('previousMonth')\"\n [attr.aria-disabled]=\"_canNavigateBack ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(-1)\"\n >\n <kirby-icon name=\"arrow-back\" aria-hidden=\"true\"></kirby-icon>\n </button>\n\n <div class=\"month-and-year\" [id]=\"_tableMonthId\" aria-live=\"polite\" aria-atomic=\"true\">\n <span class=\"month\">{{ activeMonthName }}</span>\n @if (!_hasYearNavigator) {\n <span class=\"year\">{{ activeYear }}</span>\n }\n </div>\n\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('nextMonth')\"\n [attr.aria-disabled]=\"_canNavigateForward ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(1)\"\n >\n <kirby-icon name=\"arrow-more\" aria-hidden=\"true\"></kirby-icon>\n </button>\n </div>\n @if (_hasYearNavigator) {\n <kirby-dropdown\n [selectedIndex]=\"navigatedYear\"\n [items]=\"navigableYears\"\n [attr.aria-label]=\"translations.get('selectYear')\"\n popout=\"left\"\n (change)=\"_changeYear($event)\"\n ></kirby-dropdown>\n }\n</div>\n\n<table [attr.aria-labelledby]=\"_tableMonthId\" role=\"grid\">\n <thead>\n <tr>\n @for (weekDay of _weekDays; track weekDay.fullName) {\n <th scope=\"col\">\n <span aria-hidden=\"true\">{{ weekDay.firstLetterCapitalized }}</span>\n <span class=\"kirby-visually-hidden\">{{ weekDay.fullName }}</span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (week of _month; track $index) {\n <tr>\n @for (day of week; track day.date + '-' + day.monthIndex + '-' + day.year) {\n <td [attr.aria-selected]=\"day.isSelected ? true : false\">\n <button\n kirby-button\n type=\"button\"\n (click)=\"_onDateSelected(day)\"\n (keydown)=\"_onDateKeydown($event)\"\n class=\"day\"\n [class.current-month]=\"day.isCurrentMonth\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.selectable]=\"day.isSelectable\"\n [class.selected]=\"day.isSelected\"\n [class.focussed]=\"day.isFocussed\"\n [class.past]=\"day.isPast\"\n [attr.aria-label]=\"day.ariaLabel\"\n [attr.aria-disabled]=\"day.isSelectable ? null : true\"\n [noDecoration]=\"!day.isSelected\"\n [disabled]=\"day.isFocusable ? null : true\"\n [tabIndex]=\"day.isFocussed ? 0 : -1\"\n >\n {{ day.date }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAoDA,IAAK,QASJ;AATD,CAAA,UAAK,QAAQ,EAAA;AACX,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,QAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,QAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,QAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC/B,CAAC,EATI,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;MAkBA,iBAAiB,CAAA;IAY5B,IAAa,OAAO,CAAC,OAAkC,EAAA;QACrD,OAAO,CAAC,IAAI,CACV,CAAA;AACkF,uFAAA,CAAA,CACnF;IACH;AAEA;;;AAGG;IACH,IAAa,UAAU,CAAC,MAAe,EAAA;QACrC,OAAO,CAAC,IAAI,CACV,CAAA;AACyH,8HAAA,CAAA,CAC1H;IACH;AA8BA,IAAA,IAAI,YAAY,GAAA;QACd,OAAO,IAAI,CAAC,aAAa;IAC3B;IAEA,IAAa,YAAY,CAAC,eAA4B,EAAA;QACpD,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC;QAEjD,IAAI,eAAe,EAAE;AACnB,YAAA,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;QAC5B;QAEA,IAAI,IAAI,CAAC,cAAc,C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AA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAMhD,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;8BACC,CAAC,iBAAiB,EAAE,eAAe,EAAE,aAAa,CAAC,EAAA,QAAA,EAClD,gBAAgB,EAAA,eAAA,EAGT,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,s5FAAA,EAAA,MAAA,EAAA,CAAA,snDAAA,CAAA,EAAA;;0BA+J5C,MAAM;2BAAC,SAAS;;sBA5JlB;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBACA;;sBAEA;;sBAMA;;sBAKA;;sBAaA;;sBA0BA;;sBAkBA;;sBAQA;;sBAQA;;sBAQA;;sBAWA;;sBAgCA,WAAW;uBAAC,0BAA0B;;;AEzNzC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"kirbydesign-designsystem-calendar.mjs","sources":["../../calendar/src/calendar.component.ts","../../calendar/src/calendar.component.html","../../calendar/src/kirbydesign-designsystem-calendar.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n LOCALE_ID,\n OnChanges,\n OnInit,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport {\n add,\n eachDayOfInterval,\n endOfWeek,\n format,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n isWeekend,\n lastDayOfWeek,\n Locale as LocaleDateFns,\n startOfDay,\n startOfMonth,\n startOfWeek,\n} from 'date-fns';\nimport { fromZonedTime, toZonedTime } from 'date-fns-tz';\nimport { da, de, enGB, enUS } from 'date-fns/locale';\n\nimport { capitalizeFirstLetter } from '@kirbydesign/core';\nimport { ButtonComponent } from '@kirbydesign/designsystem/button';\nimport { DropdownComponent } from '@kirbydesign/designsystem/dropdown';\nimport { UniqueIdGenerator } from '@kirbydesign/designsystem/helpers';\nimport { IconComponent } from '@kirbydesign/designsystem/icon';\n\nimport { TranslationService } from '@kirbydesign/designsystem/shared';\nimport { CalendarDay, CalendarDayMetadata } from './interfaces/calendar-day';\nimport { CalendarYearNavigatorConfig } from './interfaces/calendar-year-navigator-config';\n\nexport type Locale = LocaleDateFns;\n\ninterface WeekDay {\n firstLetterCapitalized: string;\n fullName: string;\n}\n\nenum TimeUnit {\n years = 'years',\n months = 'months',\n weeks = 'weeks',\n days = 'days',\n hours = 'hours',\n minutes = 'minutes',\n seconds = 'seconds',\n milliseconds = 'milliseconds',\n}\n\n@Component({\n imports: [DropdownComponent, ButtonComponent, IconComponent],\n selector: 'kirby-calendar',\n templateUrl: './calendar.component.html',\n styleUrls: ['./calendar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CalendarComponent implements OnInit, OnChanges {\n @Output() dateChange = new EventEmitter<Date>();\n @Output() dateSelect = new EventEmitter<Date>();\n @Output() yearSelect = new EventEmitter<number>();\n @Output() previousMonthClicked = new EventEmitter<Date>();\n @Output() nextMonthClicked = new EventEmitter<Date>();\n @Input() timezone: 'local' | 'UTC' = 'local';\n @Input() disableWeekends = false;\n @Input() disablePastDates = false;\n @Input() disableFutureDates = false;\n @Input() alwaysEnableToday = false;\n\n @Input() set locales(locales: { [key: string]: Locale }) {\n console.warn(\n `Supplying additional locales to the Kirby Calendar Component via an input property is deprecated and should not be used.\n A future update will allow injecting additional locales via a provider instead.`\n );\n }\n @Input() customLocales: { [key: string]: Locale } = {};\n /**\n * @deprecated This input is no longer needed. The year selection dropdown now always uses popover positioning.\n * This input will be removed in a future major version.\n */\n @Input() set usePopover(_value: boolean) {\n console.warn(\n `[Kirby Calendar] The 'usePopover' input is deprecated and no longer has any effect. \n The year selection dropdown now always uses popover positioning. This input will be removed in a future major version.`\n );\n }\n /**\n * Configuration for the year navigator.\n *\n * Internally, calendar component:\n * - bases yearNavigatorOptions.from and yearNavigatorOptions.to on todayDate if a number is provided\n * - prioritizes minDate and maxDate over yearNavigatorOptions.from and yearNavigatorOptions.to\n */\n @Input() yearNavigatorOptions: CalendarYearNavigatorConfig;\n\n _tableMonthId = UniqueIdGenerator.scopedTo('kirby-calendar-month').next();\n _month: CalendarDay[][];\n _weekDays: WeekDay[];\n private selectedDay: CalendarDay;\n private focussedDay: CalendarDay;\n // NOTE: Internally, all Dates\n // are normalized to point to local timezone midnight, regardless of the timezone\n // setting.\n private activeMonth: Date;\n private _selectedDate: Date;\n private _disabledDates: Date[] = [];\n private _enabledDates: Date[] = [];\n private _todayDate: Date;\n private _minDate: Date;\n private _maxDate: Date;\n private focussedDate: Date;\n private locale: Locale;\n private timeZoneName: string;\n private includedLocales = { da, de, enGB, enUS };\n\n get selectedDate(): Date {\n return this._selectedDate;\n }\n\n @Input() set selectedDate(valueLocalOrUTC: Date | null) {\n const value = this.normalizeDate(valueLocalOrUTC);\n\n if (valueLocalOrUTC) {\n this.setActiveMonth(value);\n }\n\n if (this.hasDateChanged(value, this._selectedDate)) {\n this.onSelectedDateChange(value);\n this.focusDate(value);\n this._selectedDate = value;\n }\n }\n\n get disabledDates(): Date[] {\n return this._disabledDates;\n }\n\n @Input() set disabledDates(value: Date[]) {\n this._disabledDates = (value || []).map((date) => this.normalizeDate(date));\n }\n\n get enabledDates(): Date[] {\n return this._enabledDates;\n }\n\n @Input() set enabledDates(value: Date[]) {\n this._enabledDates = (value || []).map((date) => this.normalizeDate(date));\n }\n\n get todayDate(): Date {\n return this._todayDate;\n }\n\n @Input() set todayDate(value: Date) {\n this._todayDate = this.normalizeDate(value);\n }\n\n get minDate(): Date {\n return this._minDate;\n }\n\n @Input() set minDate(value: Date) {\n if (value && this.activeMonth && isBefore(this.activeMonth, value)) {\n this.setActiveMonth(value);\n }\n this._minDate = this.normalizeDate(value);\n }\n\n get maxDate(): Date {\n return this._maxDate;\n }\n\n @Input() set maxDate(value: Date) {\n if (value && this.activeMonth && isAfter(this.activeMonth, value)) {\n this.setActiveMonth(value);\n }\n this._maxDate = this.normalizeDate(value);\n }\n\n get activeMonthName(): string {\n return capitalizeFirstLetter(this.formatWithLocale(this.activeMonth, 'MMMM'));\n }\n\n get activeYear(): string {\n return this.formatWithLocale(this.activeMonth, 'yyyy');\n }\n\n /**\n * Gets navigable years for year navigator based on yearNavigatorOptions.\n */\n get navigableYears(): string[] {\n const dateOfFirstNavigableYear =\n this.minDate || this.getDateFromNavigableYear(this.yearNavigatorOptions.from);\n\n const dateOfLastNavigableYear =\n this.maxDate || this.getDateFromNavigableYear(this.yearNavigatorOptions.to);\n\n return this.getYearsBetweenDates(dateOfFirstNavigableYear, dateOfLastNavigableYear);\n }\n\n get navigatedYear(): number {\n return this.navigableYears.indexOf(this.activeYear);\n }\n\n @HostBinding('class.has-year-navigator')\n get _hasYearNavigator() {\n return !!this.yearNavigatorOptions;\n }\n\n private getTodayDate() {\n return startOfDay(this.todayDate ?? new Date());\n }\n\n constructor(\n @Inject(LOCALE_ID) locale: string,\n private elementRef: ElementRef,\n private cdr: ChangeDetectorRef,\n public translations: TranslationService\n ) {\n this.locale = this.mapLocale(locale);\n this.timeZoneName = Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n private formatWithLocale(date: Date, formatString: string): string {\n return format(date, formatString, {\n locale: this.locale,\n });\n }\n\n private mapLocale(locale: string): Locale {\n if (locale === 'en') {\n locale = 'enGB'; // if english locale is provided without region, we default to GB\n }\n locale = locale.replace('-', '');\n const availableLocales = { ...this.includedLocales, ...this.locales, ...this.customLocales };\n return availableLocales[locale] || this.includedLocales.enGB; // Default to enGB if injected locale doesnt exist\n }\n\n private formatDateLabel(): string {\n const localeDateFormats = {\n da: 'd. MMMM',\n de: 'd. MMMM',\n 'en-GB': 'd MMMM',\n 'en-US': 'MMMM d',\n };\n\n const defaultDateFormat = localeDateFormats['en-US'];\n const dateFormat = localeDateFormats[this.locale.code] || defaultDateFormat;\n return dateFormat;\n }\n\n ngOnInit() {\n this.focussedDate = this.getTodayDate();\n this._weekDays = this.getWeekDays();\n this.setActiveMonth(this.selectedDate);\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (!this.activeMonth) return;\n if (\n changes.disableWeekends ||\n changes.disablePastDates ||\n changes.disableFutureDates ||\n changes.disabledDates ||\n changes.enabledDates ||\n changes.minDate ||\n changes.maxDate ||\n changes.todayDate ||\n changes.timezone\n ) {\n this.refreshActiveMonth();\n }\n }\n\n private setActiveMonth(date: Date = new Date()) {\n if (!this.activeMonth || !isSameMonth(this.activeMonth, date)) {\n this.activeMonth = startOfMonth(date);\n this.refreshActiveMonth();\n }\n }\n\n // For leniency, the component will accept any Date that points to either UTC midnight\n // or to local timezone midnight although we will internally normalize the representation\n // of all received dates to point to local timezone midnight.\n // We currently log no warnings if the date doesn't match the timezone setting or\n // if it doesn't point to midnight.\n private normalizeDate(dateLocalOrUTC: Date) {\n if (!dateLocalOrUTC) return;\n\n if (startOfDay(dateLocalOrUTC).getTime() === dateLocalOrUTC.getTime()) {\n // date is local timezone midnight\n return dateLocalOrUTC;\n }\n if (\n startOfDay(toZonedTime(dateLocalOrUTC, this.timeZoneName)).getTime() ===\n toZonedTime(dateLocalOrUTC, this.timeZoneName).getTime()\n ) {\n // the date is a UTC midnight; create the equivalent local timezone midnight date\n const normalizedUTCdate = toZonedTime(dateLocalOrUTC, this.timeZoneName);\n return normalizedUTCdate;\n }\n // does not point to midnight so we make it\n return startOfDay(dateLocalOrUTC);\n }\n\n private getWeekDays(): WeekDay[] {\n const now = new Date();\n const week = eachDayOfInterval({\n start: startOfWeek(now, { locale: this.locale }),\n end: endOfWeek(now, { locale: this.locale }),\n });\n\n const weekdayNarrowFormat = 'EEEEE';\n const weekdayWideFormat = 'EEEE';\n\n return week.map((date) => ({\n firstLetterCapitalized: this.formatWithLocale(date, weekdayNarrowFormat),\n fullName: this.formatWithLocale(date, weekdayWideFormat),\n }));\n }\n\n private hasDateChanged(newDate: Date, previousDate: Date): boolean {\n if (!newDate && !previousDate) {\n return false;\n }\n if (newDate instanceof Date && !previousDate) {\n return true;\n }\n return !isSameDay(newDate, previousDate);\n }\n\n private isDisabledDate(date: Date): boolean {\n return this.disabledDates.some((disabledDate) => isSameDay(disabledDate, date));\n }\n\n private isEnabledDate(date: Date): boolean {\n return (\n this._enabledDates.length === 0 ||\n this.enabledDates.some((enabledDate) => isSameDay(enabledDate, date))\n );\n }\n\n refreshActiveMonth() {\n if (!this.activeMonth) return;\n\n const monthStart = startOfMonth(this.activeMonth);\n const startOfFirstWeek = startOfWeek(monthStart, { locale: this.locale });\n\n const totalNumberOfDays = 42; // Always show 42 days (6 weeks) in calendar\n const daysArray = Array.from(Array(totalNumberOfDays).keys());\n const today = this.getTodayDate();\n\n const calendarDays: CalendarDay[] = daysArray.map((number) => {\n const dateOfCalendarDay = add(startOfFirstWeek, { [TimeUnit.days]: number });\n\n const calendarDay: CalendarDay = {\n date: dateOfCalendarDay.getDate(),\n monthIndex: dateOfCalendarDay.getMonth(),\n year: dateOfCalendarDay.getFullYear(),\n ariaLabel: this.formatWithLocale(dateOfCalendarDay, this.formatDateLabel()),\n ...this.getCalendarDayMetadata(dateOfCalendarDay, today, monthStart),\n };\n if (calendarDay.isSelected) {\n this.selectedDay = calendarDay;\n }\n if (calendarDay.isFocussed) {\n this.focussedDay = calendarDay;\n }\n return calendarDay;\n });\n this._month = this.chunk(calendarDays, 7);\n }\n\n private getCalendarDayMetadata(date: Date, today: Date, monthStart: Date): CalendarDayMetadata {\n return {\n isToday: isSameDay(today, date),\n isPast: isBefore(date, today),\n isFuture: isAfter(date, today),\n isWeekend: isWeekend(date),\n isCurrentMonth: isSameMonth(date, monthStart),\n isSelectable: this.isSelectable(date, today),\n isFocusable: this.isWithinAllowedRange(date, today),\n isSelected: isSameDay(this.selectedDate, date),\n isFocussed: isSameDay(this.focussedDate, date),\n };\n }\n\n private isSelectable(date: Date, today: Date): boolean {\n if (this.alwaysEnableToday && isSameDay(today, date)) return true;\n\n if (!this.isWithinAllowedRange(date, today)) return false;\n if (this.isDisabledDate(date)) return false;\n if (!this.isEnabledDate(date)) return false;\n if (this.disableWeekends && isWeekend(date)) return false;\n\n return true;\n }\n\n private isWithinAllowedRange(date: Date, today: Date): boolean {\n if (this.disablePastDates && isBefore(date, today)) return false;\n if (this.disableFutureDates && isAfter(date, today)) return false;\n if (this.minDate && isBefore(date, this.minDate)) return false;\n if (this.maxDate && isAfter(date, this.maxDate)) return false;\n\n return true;\n }\n\n private chunk(array: any[], size: number) {\n const results = [];\n while (array.length) {\n results.push(array.splice(0, size));\n }\n return results;\n }\n\n private onSelectedDateChange(newDate: Date): void {\n if (this.selectedDay) {\n this.selectedDay.isSelected = false;\n }\n\n const newDay = this.getDay(newDate);\n if (newDay) {\n newDay.isSelected = true;\n this.selectedDay = newDay;\n }\n }\n\n _onDateSelected(newDay: CalendarDay) {\n if (!newDay.isSelectable) return;\n\n let newDate = new Date(newDay.year, newDay.monthIndex, newDay.date);\n\n if (this.timezone === 'UTC') {\n newDate = fromZonedTime(this.subtractTimezoneOffset(newDate), this.timeZoneName);\n }\n\n const dateToEmit = newDate;\n\n if (this.hasDateChanged(newDate, this._selectedDate)) {\n this.setActiveMonth(newDate);\n this.onSelectedDateChange(newDate);\n this.selectedDate = newDate;\n this.dateChange.emit(dateToEmit);\n }\n this.dateSelect.emit(dateToEmit);\n }\n\n _changeMonth(index: number) {\n if (index > 0 && !this._canNavigateForward) return;\n if (index < 0 && !this._canNavigateBack) return;\n\n this.changeActiveView(index, TimeUnit.months);\n index > 0\n ? this.nextMonthClicked.emit(this.activeMonth)\n : this.previousMonthClicked.emit(this.activeMonth);\n }\n\n _changeYear(year: string) {\n const yearNumeric = Number(year);\n this.changeActiveView(yearNumeric - getYear(this.activeMonth), TimeUnit.years);\n this.yearSelect.emit(yearNumeric);\n }\n\n private changeActiveView(index: number, unit: TimeUnit) {\n if (index === 0) return;\n this.activeMonth = add(this.activeMonth, { [unit]: index });\n this.focussedDate = add(this.focussedDate, { [unit]: index });\n\n this.refreshActiveMonth();\n }\n\n get _canNavigateBack(): boolean {\n const today = this.getTodayDate();\n const reachedPastDatesLimit = this.disablePastDates && isSameMonth(this.activeMonth, today);\n\n const reachedOrExceededMinDate =\n this.minDate &&\n (isSameMonth(this.activeMonth, this.minDate) || isBefore(this.activeMonth, this.minDate));\n\n return !reachedPastDatesLimit && !reachedOrExceededMinDate;\n }\n\n get _canNavigateForward(): boolean {\n const today = this.getTodayDate();\n const reachedFutureDatesLimit = this.disableFutureDates && isSameMonth(this.activeMonth, today);\n\n const reachedOrExceededMaxDate =\n this.maxDate &&\n (isSameMonth(this.activeMonth, this.maxDate) || isAfter(this.activeMonth, this.maxDate));\n\n return !reachedFutureDatesLimit && !reachedOrExceededMaxDate;\n }\n\n private getDay(date: Date) {\n let foundDay: CalendarDay = null;\n if (date) {\n for (const week of this._month) {\n foundDay = week.find((day) => {\n return day.isCurrentMonth && day.date === date.getDate();\n });\n if (foundDay) {\n break;\n }\n }\n }\n return foundDay;\n }\n\n private subtractTimezoneOffset(date: Date): Date {\n const timezoneOffsetInMs = date.getTimezoneOffset() * 60 * 1000;\n return new Date(date.getTime() - timezoneOffsetInMs);\n }\n\n private getDateFromNavigableYear(navigableYear: number | Date): Date {\n if (navigableYear instanceof Date) return navigableYear;\n const today = this.todayDate || new Date();\n return new Date(today.getFullYear() + navigableYear, 0, 1);\n }\n\n private getYearsBetweenDates(startDate: Date, endDate: Date): string[] {\n // Ensure years are ordered correctly if parameters are switched:\n const [startYear, endYear] = [startDate.getFullYear(), endDate.getFullYear()].sort();\n const numberOfYears = endYear - startYear;\n return Array.from({ length: numberOfYears + 1 }, (_, i) => (startYear + i).toString());\n }\n\n private setFocussedDay(newDate: Date) {\n const newDay = this.getDay(newDate);\n if (!newDay) return;\n\n if (this.focussedDay) {\n this.focussedDay.isFocussed = false;\n }\n newDay.isFocussed = true;\n this.focussedDay = newDay;\n }\n\n private focusDate(newDate: Date | null) {\n if (!newDate) return;\n\n newDate = this.normalizeDate(newDate);\n\n if (this.timezone === 'UTC') {\n newDate = fromZonedTime(this.subtractTimezoneOffset(newDate), this.timeZoneName);\n }\n\n const today = this.getTodayDate();\n if (!this.isWithinAllowedRange(newDate, today)) return;\n\n if (!this.hasDateChanged(newDate, this.focussedDate)) return;\n\n this.setActiveMonth(newDate);\n this.setFocussedDay(newDate);\n this.focussedDate = newDate;\n\n this.cdr.detectChanges(); //sync focussed class to template before setting focus\n const elementMarkedForFocus = this.elementRef.nativeElement.querySelector('.focussed');\n elementMarkedForFocus.focus();\n }\n\n _onDateKeydown(event: KeyboardEvent) {\n const { key, shiftKey } = event;\n let newDate;\n\n switch (key) {\n case 'ArrowUp':\n newDate = add(this.focussedDate, { days: -7 });\n break;\n case 'ArrowDown':\n newDate = add(this.focussedDate, { days: 7 });\n break;\n case 'ArrowRight':\n newDate = add(this.focussedDate, { days: 1 });\n break;\n case 'ArrowLeft':\n newDate = add(this.focussedDate, { days: -1 });\n break;\n case 'Home':\n newDate = startOfWeek(this.focussedDate, { locale: this.locale });\n break;\n case 'End':\n newDate = lastDayOfWeek(this.focussedDate, { locale: this.locale });\n break;\n case 'PageUp':\n newDate = shiftKey\n ? add(this.focussedDate, { years: -1 })\n : add(this.focussedDate, { months: -1 });\n break;\n case 'PageDown':\n newDate = shiftKey\n ? add(this.focussedDate, { years: 1 })\n : add(this.focussedDate, { months: 1 });\n break;\n default:\n return;\n }\n\n event.preventDefault();\n this.focusDate(newDate);\n }\n}\n","<div class=\"header\">\n <div class=\"month-navigator\">\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('previousMonth')\"\n [attr.aria-disabled]=\"_canNavigateBack ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(-1)\"\n >\n <kirby-icon name=\"arrow-back\" aria-hidden=\"true\"></kirby-icon>\n </button>\n\n <div class=\"month-and-year\" [id]=\"_tableMonthId\" aria-live=\"polite\" aria-atomic=\"true\">\n <span class=\"month\">{{ activeMonthName }}</span>\n @if (!_hasYearNavigator) {\n <span class=\"year\">{{ activeYear }}</span>\n }\n </div>\n\n <button\n kirby-button\n type=\"button\"\n class=\"no-margin\"\n [attr.aria-label]=\"translations.get('nextMonth')\"\n [attr.aria-disabled]=\"_canNavigateForward ? null : true\"\n [noDecoration]=\"true\"\n (click)=\"_changeMonth(1)\"\n >\n <kirby-icon name=\"arrow-more\" aria-hidden=\"true\"></kirby-icon>\n </button>\n </div>\n @if (_hasYearNavigator) {\n <kirby-dropdown\n [selectedIndex]=\"navigatedYear\"\n [items]=\"navigableYears\"\n [attr.aria-label]=\"translations.get('selectYear')\"\n popout=\"left\"\n (change)=\"_changeYear($event)\"\n ></kirby-dropdown>\n }\n</div>\n\n<table [attr.aria-labelledby]=\"_tableMonthId\" role=\"grid\">\n <thead>\n <tr>\n @for (weekDay of _weekDays; track weekDay.fullName) {\n <th scope=\"col\">\n <span aria-hidden=\"true\">{{ weekDay.firstLetterCapitalized }}</span>\n <span class=\"kirby-visually-hidden\">{{ weekDay.fullName }}</span>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (week of _month; track $index) {\n <tr>\n @for (day of week; track day.date + '-' + day.monthIndex + '-' + day.year) {\n <td [attr.aria-selected]=\"day.isSelected ? true : false\">\n <button\n kirby-button\n type=\"button\"\n (click)=\"_onDateSelected(day)\"\n (keydown)=\"_onDateKeydown($event)\"\n class=\"day\"\n [class.current-month]=\"day.isCurrentMonth\"\n [class.weekend]=\"day.isWeekend\"\n [class.today]=\"day.isToday\"\n [class.selectable]=\"day.isSelectable\"\n [class.selected]=\"day.isSelected\"\n [class.focussed]=\"day.isFocussed\"\n [class.past]=\"day.isPast\"\n [attr.aria-label]=\"day.ariaLabel\"\n [attr.aria-disabled]=\"day.isSelectable ? null : true\"\n [noDecoration]=\"true\"\n [disabled]=\"day.isFocusable ? null : true\"\n [tabIndex]=\"day.isFocussed ? 0 : -1\"\n >\n {{ day.date }}\n </button>\n </td>\n }\n </tr>\n }\n </tbody>\n</table>\n","/**\n * Generated bund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