@anglr/datetime 9.0.0 → 9.0.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/changelog.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 9.0.1 (2025-12-12)
4
+
5
+ ### Bug Fixes
6
+
7
+ - fixed `MonthCalendarComponent` component
8
+ - now properly displays week which is last week of the year
9
+
3
10
  ## Version 9.0.0 (2025-01-23)
4
11
 
5
12
  ### Bug Fixes
@@ -1,5 +1,5 @@
1
1
  import { Component, ChangeDetectionStrategy, Inject, TemplateRef, input, viewChild, contentChild, computed, effect, inject } from '@angular/core';
2
- import { KeyValuePipe, NgTemplateOutlet } from '@angular/common';
2
+ import { NgTemplateOutlet } from '@angular/common';
3
3
  import { isString } from '@jscrpt/common';
4
4
  import { CalendarDayTemplateDirective } from '../../directives';
5
5
  import { MonthCalendarDayFormat, CalendarDayAspectRatio } from '../../misc';
@@ -87,9 +87,11 @@ export class MonthCalendarComponent {
87
87
  const workDate = this.dateApi.getValue(display);
88
88
  workDate.startOfMonth()
89
89
  .startOfWeek();
90
- const calendarData = {};
90
+ const calendarData = [];
91
91
  do {
92
- const weekData = calendarData[workDate.format(this.formatProvider.week)] = [];
92
+ const weekDataItem = [workDate.format(this.formatProvider.week), []];
93
+ calendarData.push(weekDataItem);
94
+ const [, weekData] = weekDataItem;
93
95
  for (let x = 0; x < 7; x++) {
94
96
  weekData.push({
95
97
  date: workDate.value,
@@ -108,8 +110,7 @@ export class MonthCalendarComponent {
108
110
  effect(() => {
109
111
  const events = this.eventParser.getEventsPerDay(this.events());
110
112
  const calendarData = this.calendarData();
111
- for (const week in calendarData) {
112
- const weekData = calendarData[week];
113
+ for (const [, weekData] of calendarData) {
113
114
  for (const day of weekData) {
114
115
  const found = events.find(itm => this.dateApi.getValue(itm[0]).isSame(day.date));
115
116
  day.events = found?.[1] ?? [];
@@ -121,17 +122,16 @@ export class MonthCalendarComponent {
121
122
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: MonthCalendarComponent, deps: [{ token: DATE_API }, { token: FORMAT_PROVIDER }, { token: i1.EventParser }], target: i0.ɵɵFactoryTarget.Component }); }
122
123
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.0", type: MonthCalendarComponent, isStandalone: true, selector: "month-calendar", inputs: { showWeekNumber: { classPropertyName: "showWeekNumber", publicName: "showWeekNumber", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, weekDayName: { classPropertyName: "weekDayName", publicName: "weekDayName", isSignal: true, isRequired: false, transformFunction: null }, dayAspectRatio: { classPropertyName: "dayAspectRatio", publicName: "dayAspectRatio", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
123
124
  EventParser,
124
- ], queries: [{ propertyName: "customCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "defaultCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n@for(dayName of weekDayNames(); track dayName)\n{\n <div [class.week-day-name]=\"dayName\">{{dayName}}</div>\n}\n\n@for(weekData of calendarData() | keyvalue; track weekData)\n{\n <div class=\"week-number\">\n @if(showWeekNumber())\n {\n {{weekData.key}}\n }\n </div>\n \n @for(dayData of weekData.value; track dayData)\n {\n <div [style.padding-bottom.%]=\"dayAspectRatio()\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate(); context: {$implicit: dayData}\"/></div>\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: CalendarDayTemplateDirective, selector: "[calendarDayTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
125
+ ], queries: [{ propertyName: "customCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "defaultCalendarDayTemplate", first: true, predicate: CalendarDayTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n@for(dayName of weekDayNames(); track dayName)\n{\n <div [class.week-day-name]=\"dayName\">{{dayName}}</div>\n}\n\n@for(weekData of calendarData(); track weekData)\n{\n <div class=\"week-number\">\n @if(showWeekNumber())\n {\n {{weekData[0]}}\n }\n </div>\n \n @for(dayData of weekData[1]; track dayData)\n {\n <div [style.padding-bottom.%]=\"dayAspectRatio()\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate(); context: {$implicit: dayData}\"/></div>\n </div>\n }\n}\n", dependencies: [{ kind: "directive", type: CalendarDayTemplateDirective, selector: "[calendarDayTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
125
126
  }
126
127
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0", ngImport: i0, type: MonthCalendarComponent, decorators: [{
127
128
  type: Component,
128
129
  args: [{ selector: 'month-calendar', imports: [
129
130
  CalendarDayTemplateDirective,
130
131
  NgTemplateOutlet,
131
- KeyValuePipe,
132
132
  ], providers: [
133
133
  EventParser,
134
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n@for(dayName of weekDayNames(); track dayName)\n{\n <div [class.week-day-name]=\"dayName\">{{dayName}}</div>\n}\n\n@for(weekData of calendarData() | keyvalue; track weekData)\n{\n <div class=\"week-number\">\n @if(showWeekNumber())\n {\n {{weekData.key}}\n }\n </div>\n \n @for(dayData of weekData.value; track dayData)\n {\n <div [style.padding-bottom.%]=\"dayAspectRatio()\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate(); context: {$implicit: dayData}\"/></div>\n </div>\n }\n}\n" }]
134
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n@for(dayName of weekDayNames(); track dayName)\n{\n <div [class.week-day-name]=\"dayName\">{{dayName}}</div>\n}\n\n@for(weekData of calendarData(); track weekData)\n{\n <div class=\"week-number\">\n @if(showWeekNumber())\n {\n {{weekData[0]}}\n }\n </div>\n \n @for(dayData of weekData[1]; track dayData)\n {\n <div [style.padding-bottom.%]=\"dayAspectRatio()\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate(); context: {$implicit: dayData}\"/></div>\n </div>\n }\n}\n" }]
135
135
  }], ctorParameters: () => [{ type: undefined, decorators: [{
136
136
  type: Inject,
137
137
  args: [DATE_API]
@@ -1 +1 @@
1
- {"version":3,"file":"monthCalendar.component.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/components/monthCalendar/monthCalendar.component.ts","../../../../../../src/modules/calendar/components/monthCalendar/monthCalendar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,EAAU,KAAK,EAAe,SAAS,EAAE,YAAY,EAA4B,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAC/L,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAa,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAGpD,OAAO,EAAC,4BAA4B,EAA6B,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAC,sBAAsB,EAAE,sBAAsB,EAAC,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,QAAQ,EAAE,eAAe,EAAC,MAAM,yBAAyB,CAAC;;;AAIlE;;GAEG;AACH,SAAS,uBAAuB,CAAC,KAAiD;IAE9E,IAAG,QAAQ,CAAC,KAAK,CAAC,EAClB,CAAC;QACG,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;GAEG;AAiBH,MAAM,OAAO,sBAAsB;IA0D/B,iEAAiE;IACjE,YAAwC,OAAuB,EAChB,cAA8B,EACvD,WAAuC;QAFrB,YAAO,GAAP,OAAO,CAAgB;QAChB,mBAAc,GAAd,cAAc,CAAgB;QACvD,gBAAW,GAAX,WAAW,CAA4B;QA1C7D,qFAAqF;QAErF;;WAEG;QACO,+BAA0B,GAAoD,SAAS,CAAC,QAAQ,CAAC,4BAA4B,EAAE,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC,CAAC;QAE9J;;WAEG;QACO,8BAAyB,GAAmE,YAAY,CAAC,4BAA4B,EAAE,EAAC,IAAI,EAAE,WA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ithTransform, computed, effect, inject} from '@angular/core';\nimport {KeyValuePipe, NgTemplateOutlet} from '@angular/common';\nimport {Dictionary, isString} from '@jscrpt/common';\n\nimport {CalendarDayData, EventData} from '../../interfaces';\nimport {CalendarDayTemplateDirective, CalendarDayTemplateContext} from '../../directives';\nimport {MonthCalendarDayFormat, CalendarDayAspectRatio} from '../../misc';\nimport {EventParser} from '../../services';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {DateApi} from '../../../../services';\nimport {FormatProvider} from '../../../../interfaces';\n\n/**\n * Transform function for `CalendarDayAspectRatio` allowing enter value as number or member name of `CalendarDayAspectRatio`\n */\nfunction dayAspectRatioAttribute(value: keyof typeof CalendarDayAspectRatio|number): CalendarDayAspectRatio\n{\n if(isString(value))\n {\n return CalendarDayAspectRatio[value];\n }\n\n return value;\n}\n\n/**\n * Component used for displaying month calendar\n */\n@Component(\n{\n selector: 'month-calendar',\n templateUrl: 'monthCalendar.component.html',\n imports:\n [\n CalendarDayTemplateDirective,\n NgTemplateOutlet,\n KeyValuePipe,\n ],\n providers:\n [\n EventParser,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonthCalendarComponent<TDate = unknown, TEvent = unknown>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Data that represents calendar data\n */\n protected calendarData: Signal<Dictionary<CalendarDayData<TDate, TEvent>[]>>;\n\n /**\n * Calendar day template to be used\n */\n protected calendarDayTemplate: Signal<TemplateRef<CalendarDayTemplateContext>>;\n\n /**\n * Array of weekday names\n */\n protected weekDayNames: Signal<string[]>;\n\n //######################### protected properties - children #########################\n\n /**\n * Default calendar day template\n */\n protected defaultCalendarDayTemplate: Signal<TemplateRef<CalendarDayTemplateContext>> = viewChild.required(CalendarDayTemplateDirective, {read: TemplateRef});\n\n /**\n * Custom calendar day template\n */\n protected customCalendarDayTemplate: Signal<TemplateRef<CalendarDayTemplateContext>|undefined|null> = contentChild(CalendarDayTemplateDirective, {read: TemplateRef});\n\n //######################### public properties - inputs #########################\n\n /**\n * Indication that week number should be displayed\n */\n public showWeekNumber: InputSignal<boolean> = input(false);\n\n /**\n * Date that should be displayed in month calendar\n */\n public display: InputSignal<TDate> = input(inject<DateApi<TDate>>(DATE_API).now().value);\n\n /**\n * Format for displaying week day names\n */\n public weekDayName: InputSignal<MonthCalendarDayFormat|keyof typeof MonthCalendarDayFormat> = input<MonthCalendarDayFormat|keyof typeof MonthCalendarDayFormat>(MonthCalendarDayFormat.Short);\n\n /**\n * Aspect ratio for displayed calendar day cell\n */\n public dayAspectRatio: InputSignalWithTransform<CalendarDayAspectRatio, keyof typeof CalendarDayAspectRatio|number> = input<CalendarDayAspectRatio, keyof typeof CalendarDayAspectRatio|number>(CalendarDayAspectRatio.ThreeToTwo, {transform: dayAspectRatioAttribute});\n\n /**\n * Array of events that should be displayed\n */\n public events: InputSignal<EventData<TDate, TEvent>[]> = input<EventData<TDate, TEvent>[]>([]);\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) protected formatProvider: FormatProvider,\n protected eventParser: EventParser<TDate, TEvent>,)\n {\n this.calendarDayTemplate = computed(() => this.customCalendarDayTemplate() ?? this.defaultCalendarDayTemplate());\n\n this.weekDayNames = computed(() =>\n {\n const weekDayNames = [];\n\n switch(this.weekDayName())\n {\n default:\n // case MonthCalendarDayFormat.None:\n {\n for(let x = 0; x < 7; x++)\n {\n weekDayNames.push('');\n }\n\n break;\n }\n case MonthCalendarDayFormat.Short:\n {\n const names = this.dateApi.weekdays(true);\n weekDayNames.push(...names);\n\n break;\n }\n case MonthCalendarDayFormat.Full:\n {\n const names = this.dateApi.weekdays();\n weekDayNames.push(...names);\n\n break;\n }\n }\n\n return weekDayNames;\n });\n\n this.calendarData = computed(() =>\n {\n const display = this.display();\n const workDate = this.dateApi.getValue(display);\n\n workDate.startOfMonth()\n .startOfWeek();\n\n const calendarData: Dictionary<CalendarDayData<TDate, TEvent>[]> = {};\n\n do\n {\n const weekData: CalendarDayData<TDate, TEvent>[] = calendarData[workDate.format(this.formatProvider.week)] = [];\n\n for(let x = 0; x < 7; x++)\n {\n weekData.push(\n {\n date: workDate.value,\n day: workDate.dayOfMonth(),\n events: [],\n isCurrentMonth: workDate.isSameMonth(display),\n isWeekend: workDate.isWeekend(),\n week: +workDate.format(this.formatProvider.week),\n });\n\n workDate.addDays(1);\n }\n\n workDate.startOfWeek();\n }\n while(workDate.isSameMonth(display));\n\n return calendarData;\n });\n\n effect(() =>\n {\n const events = this.eventParser.getEventsPerDay(this.events());\n const calendarData = this.calendarData();\n\n for(const week in calendarData)\n {\n const weekData = calendarData[week];\n\n for(const day of weekData)\n {\n const found = events.find(itm => this.dateApi.getValue(itm[0]).isSame(day.date));\n day.events = found?.[1] ?? [];\n }\n }\n //TODO: test whether event are refreshed when changed\n });\n }\n}","<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n@for(dayName of weekDayNames(); track dayName)\n{\n <div [class.week-day-name]=\"dayName\">{{dayName}}</div>\n}\n\n@for(weekData of calendarData() | keyvalue; track weekData)\n{\n <div class=\"week-number\">\n @if(showWeekNumber())\n {\n {{weekData.key}}\n }\n </div>\n \n @for(dayData of weekData.value; track dayData)\n {\n <div [style.padding-bottom.%]=\"dayAspectRatio()\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate(); context: {$implicit: dayData}\"/></div>\n </div>\n }\n}\n"]}
1
+ {"version":3,"file":"monthCalendar.component.js","sourceRoot":"","sources":["../../../../../../src/modules/calendar/components/monthCalendar/monthCalendar.component.ts","../../../../../../src/modules/calendar/components/monthCalendar/monthCalendar.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,EAAU,KAAK,EAAe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AC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YAC/D,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;YAEzC,KAAI,MAAM,CAAC,EAAE,QAAQ,CAAC,IAAI,YAAY,EACtC,CAAC;gBACG,KAAI,MAAM,GAAG,IAAI,QAAQ,EACzB,CAAC;oBACG,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;oBACjF,GAAG,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBAClC,CAAC;YACL,CAAC;YACD,qDAAqD;QACzD,CAAC,CAAC,CAAC;IACP,CAAC;8GAzJQ,sBAAsB,kBA2DX,QAAQ,aACR,eAAe;kGA5D1B,sBAAsB,kvBAL/B;YACI,WAAW;SACd,iFAgCkH,4BAA4B,2BAAS,WAAW,yGALxD,4BAA4B,2BAAS,WAAW,6CCnE/J,iyBAyBA,4CDSQ,4BAA4B,kEAC5B,gBAAgB;;2FAQX,sBAAsB;kBAflC,SAAS;+BAEI,gBAAgB,WAG1B;wBACI,4BAA4B;wBAC5B,gBAAgB;qBACnB,aAED;wBACI,WAAW;qBACd,mBACgB,uBAAuB,CAAC,MAAM;;0BA6DlC,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,eAAe","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, TemplateRef, Signal, input, InputSignal, viewChild, contentChild, InputSignalWithTransform, computed, effect, inject} from '@angular/core';\nimport {NgTemplateOutlet} from '@angular/common';\nimport {isString} from '@jscrpt/common';\n\nimport {CalendarDayData, EventData} from '../../interfaces';\nimport {CalendarDayTemplateDirective, CalendarDayTemplateContext} from '../../directives';\nimport {MonthCalendarDayFormat, CalendarDayAspectRatio} from '../../misc';\nimport {EventParser} from '../../services';\nimport {DATE_API, FORMAT_PROVIDER} from '../../../../misc/tokens';\nimport {DateApi} from '../../../../services';\nimport {FormatProvider} from '../../../../interfaces';\n\n/**\n * Transform function for `CalendarDayAspectRatio` allowing enter value as number or member name of `CalendarDayAspectRatio`\n */\nfunction dayAspectRatioAttribute(value: keyof typeof CalendarDayAspectRatio|number): CalendarDayAspectRatio\n{\n if(isString(value))\n {\n return CalendarDayAspectRatio[value];\n }\n\n return value;\n}\n\n/**\n * Component used for displaying month calendar\n */\n@Component(\n{\n selector: 'month-calendar',\n templateUrl: 'monthCalendar.component.html',\n imports:\n [\n CalendarDayTemplateDirective,\n NgTemplateOutlet,\n ],\n providers:\n [\n EventParser,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MonthCalendarComponent<TDate = unknown, TEvent = unknown>\n{\n //######################### protected properties - template bindings #########################\n\n /**\n * Data that represents calendar data\n */\n protected calendarData: Signal<[string, CalendarDayData<TDate, TEvent>[]][]>;\n\n /**\n * Calendar day template to be used\n */\n protected calendarDayTemplate: Signal<TemplateRef<CalendarDayTemplateContext>>;\n\n /**\n * Array of weekday names\n */\n protected weekDayNames: Signal<string[]>;\n\n //######################### protected properties - children #########################\n\n /**\n * Default calendar day template\n */\n protected defaultCalendarDayTemplate: Signal<TemplateRef<CalendarDayTemplateContext>> = viewChild.required(CalendarDayTemplateDirective, {read: TemplateRef});\n\n /**\n * Custom calendar day template\n */\n protected customCalendarDayTemplate: Signal<TemplateRef<CalendarDayTemplateContext>|undefined|null> = contentChild(CalendarDayTemplateDirective, {read: TemplateRef});\n\n //######################### public properties - inputs #########################\n\n /**\n * Indication that week number should be displayed\n */\n public showWeekNumber: InputSignal<boolean> = input(false);\n\n /**\n * Date that should be displayed in month calendar\n */\n public display: InputSignal<TDate> = input(inject<DateApi<TDate>>(DATE_API).now().value);\n\n /**\n * Format for displaying week day names\n */\n public weekDayName: InputSignal<MonthCalendarDayFormat|keyof typeof MonthCalendarDayFormat> = input<MonthCalendarDayFormat|keyof typeof MonthCalendarDayFormat>(MonthCalendarDayFormat.Short);\n\n /**\n * Aspect ratio for displayed calendar day cell\n */\n public dayAspectRatio: InputSignalWithTransform<CalendarDayAspectRatio, keyof typeof CalendarDayAspectRatio|number> = input<CalendarDayAspectRatio, keyof typeof CalendarDayAspectRatio|number>(CalendarDayAspectRatio.ThreeToTwo, {transform: dayAspectRatioAttribute});\n\n /**\n * Array of events that should be displayed\n */\n public events: InputSignal<EventData<TDate, TEvent>[]> = input<EventData<TDate, TEvent>[]>([]);\n\n //######################### constructor #########################\n constructor(@Inject(DATE_API) protected dateApi: DateApi<TDate>,\n @Inject(FORMAT_PROVIDER) protected formatProvider: FormatProvider,\n protected eventParser: EventParser<TDate, TEvent>,)\n {\n this.calendarDayTemplate = computed(() => this.customCalendarDayTemplate() ?? this.defaultCalendarDayTemplate());\n\n this.weekDayNames = computed(() =>\n {\n const weekDayNames = [];\n\n switch(this.weekDayName())\n {\n default:\n // case MonthCalendarDayFormat.None:\n {\n for(let x = 0; x < 7; x++)\n {\n weekDayNames.push('');\n }\n\n break;\n }\n case MonthCalendarDayFormat.Short:\n {\n const names = this.dateApi.weekdays(true);\n weekDayNames.push(...names);\n\n break;\n }\n case MonthCalendarDayFormat.Full:\n {\n const names = this.dateApi.weekdays();\n weekDayNames.push(...names);\n\n break;\n }\n }\n\n return weekDayNames;\n });\n\n this.calendarData = computed(() =>\n {\n const display = this.display();\n const workDate = this.dateApi.getValue(display);\n\n workDate.startOfMonth()\n .startOfWeek();\n\n const calendarData: [string, CalendarDayData<TDate, TEvent>[]][] = [];\n\n do\n {\n const weekDataItem: [string, CalendarDayData<TDate, TEvent>[]] = [workDate.format(this.formatProvider.week), []];\n calendarData.push(weekDataItem);\n const [, weekData] = weekDataItem;\n\n for(let x = 0; x < 7; x++)\n {\n weekData.push(\n {\n date: workDate.value,\n day: workDate.dayOfMonth(),\n events: [],\n isCurrentMonth: workDate.isSameMonth(display),\n isWeekend: workDate.isWeekend(),\n week: +workDate.format(this.formatProvider.week),\n });\n\n workDate.addDays(1);\n }\n\n workDate.startOfWeek();\n }\n while(workDate.isSameMonth(display));\n\n return calendarData;\n });\n\n effect(() =>\n {\n const events = this.eventParser.getEventsPerDay(this.events());\n const calendarData = this.calendarData();\n\n for(const [, weekData] of calendarData)\n {\n for(const day of weekData)\n {\n const found = events.find(itm => this.dateApi.getValue(itm[0]).isSame(day.date));\n day.events = found?.[1] ?? [];\n }\n }\n //TODO: test whether event are refreshed when changed\n });\n }\n}","<div *calendarDayTemplate=\"let data\" class=\"default-calendar-day\" [class.is-weekend]=\"data.isWeekend\" [class.is-other-month]=\"!data.isCurrentMonth\">{{data.day}}</div>\n\n<div></div>\n\n@for(dayName of weekDayNames(); track dayName)\n{\n <div [class.week-day-name]=\"dayName\">{{dayName}}</div>\n}\n\n@for(weekData of calendarData(); track weekData)\n{\n <div class=\"week-number\">\n @if(showWeekNumber())\n {\n {{weekData[0]}}\n }\n </div>\n \n @for(dayData of weekData[1]; track dayData)\n {\n <div [style.padding-bottom.%]=\"dayAspectRatio()\" class=\"day-wrapper\">\n <div class=\"day-content\"><ng-container *ngTemplateOutlet=\"calendarDayTemplate(); context: {$implicit: dayData}\"/></div>\n </div>\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anglr/datetime",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "Angular library for datetime manipulation components",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,5 +1,4 @@
1
1
  import { TemplateRef, Signal, InputSignal, InputSignalWithTransform } from '@angular/core';
2
- import { Dictionary } from '@jscrpt/common';
3
2
  import { CalendarDayData, EventData } from '../../interfaces';
4
3
  import { CalendarDayTemplateContext } from '../../directives';
5
4
  import { MonthCalendarDayFormat, CalendarDayAspectRatio } from '../../misc';
@@ -17,7 +16,7 @@ export declare class MonthCalendarComponent<TDate = unknown, TEvent = unknown> {
17
16
  /**
18
17
  * Data that represents calendar data
19
18
  */
20
- protected calendarData: Signal<Dictionary<CalendarDayData<TDate, TEvent>[]>>;
19
+ protected calendarData: Signal<[string, CalendarDayData<TDate, TEvent>[]][]>;
21
20
  /**
22
21
  * Calendar day template to be used
23
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"monthCalendar.component.d.ts","sourceRoot":"","sources":["monthCalendar.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6C,WAAW,EAAE,MAAM,EAAS,WAAW,EAA2B,wBAAwB,EAA2B,MAAM,eAAe,CAAC;AAE/L,OAAO,EAAC,UAAU,EAAW,MAAM,gBAAgB,CAAC;AAEpD,OAAO,EAAC,eAAe,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAA+B,0BAA0B,EAAC,MAAM,kBAAkB,CAAC;AAC1F,OAAO,EAAC,sBAAsB,EAAE,sBAAsB,EAAC,MAAM,YAAY,CAAC;AAC1E,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,cAAc,EAAC,MAAM,wBAAwB,CAAC;;AAetD;;GAEG;AACH,qBAgBa,sBAAsB,CAAC,KAAK,GAAG,OAAO,EAAE,MAAM,GAAG,OAAO;IA2DnC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC;IAC1B,SAAS,CAAC,cAAc,EAAE,cAAc;IACjE,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC;IAzD7D;;OAEG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7E;;OAEG;IACH,SAAS,CAAC,mBAAmB,EAAE,MAAM,CAAC,WAAW,CAAC,0BAA0B,C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AE,MAAM,OAAO,sBAAsB,GAAC,MAAM,CAAC,CAAsJ;IAEzQ;;OAEG;IACI,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAAyC;gBAGvD,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,EAChB,cAAc,EAAE,cAAc,EACvD,WAAW,EAAE,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC;yCA7DpD,sBAAsB;2CAAtB,sBAAsB;CA0JlC"}
@@ -7,16 +7,16 @@
7
7
  <div [class.week-day-name]="dayName">{{dayName}}</div>
8
8
  }
9
9
 
10
- @for(weekData of calendarData() | keyvalue; track weekData)
10
+ @for(weekData of calendarData(); track weekData)
11
11
  {
12
12
  <div class="week-number">
13
13
  @if(showWeekNumber())
14
14
  {
15
- {{weekData.key}}
15
+ {{weekData[0]}}
16
16
  }
17
17
  </div>
18
18
 
19
- @for(dayData of weekData.value; track dayData)
19
+ @for(dayData of weekData[1]; track dayData)
20
20
  {
21
21
  <div [style.padding-bottom.%]="dayAspectRatio()" class="day-wrapper">
22
22
  <div class="day-content"><ng-container *ngTemplateOutlet="calendarDayTemplate(); context: {$implicit: dayData}"/></div>
package/version.bak CHANGED
@@ -1 +1 @@
1
- 9.0.0
1
+ 9.0.1