ngxsmk-datepicker 2.3.1 → 2.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,13 +2,85 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- **Last updated:** June 3, 2026 - **Current stable:** v2.3.1
5
+ **Last updated:** July 11, 2026 - **Current stable:** v2.4.0
6
6
 
7
7
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
8
8
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ### Added
13
+
14
+ - **`ng add ngxsmk-datepicker` schematic**: installs the package, adds the missing `luxon` peer
15
+ dependency, and prints a getting-started snippet. Shipped in the npm package under `schematics/`
16
+ and self-verified on every publish.
17
+ - **ISO week numbers**: `[showWeekNumbers]` renders an ISO 8601 week-number column; header label is
18
+ customizable via `[weekNumberLabel]` (e.g. `"KW"`). New exported util `getISOWeekNumber`.
19
+ - **Guided input masking**: `[inputMask]` (requires `allowTyping`) slots typed digits into
20
+ `DD`/`MM`/`YY`/`YYYY`/`HH`/`mm`/`ss` tokens and auto-inserts separators. `true` uses
21
+ `displayFormat` (falling back to `MM/DD/YYYY`); a string sets an explicit pattern.
22
+ - **Server-driven disabled dates**: `[asyncDateFilter]` is called with the visible month range on
23
+ every navigation and disables the resolved dates. Stale responses are discarded; new
24
+ `(asyncDateFilterLoading)` and `(asyncDateFilterError)` outputs report request state.
25
+ - **Secondary calendar systems**: `[secondaryCalendar]` annotates each day cell with its date in a
26
+ second calendar (`islamic`, `persian`, `hebrew`, `buddhist`, `japanese`) rendered via `Intl`;
27
+ the grid itself remains Gregorian. New exported utils `getSecondaryDayLabel` and
28
+ `formatDateInCalendarSystem`.
29
+ - **Per-day metadata decorations**: `[dayMetadata]` provider adds a label under the day number
30
+ (e.g. a price), an indicator dot, extra CSS classes, and a tooltip per day — booking-style
31
+ calendars without custom templates. Also available as `meta` in day-template contexts.
32
+ New exported types `DayMetadata` / `DayMetadataProvider`.
33
+ - **Header/footer action slots**: `[calendarHeaderTemplate]` renders custom content at the top of
34
+ the popover; `[calendarFooterTemplate]` replaces the default Clear/Close footer (and, unlike the
35
+ default, also renders in inline mode). Both receive `{ clear(), close() }` actions in context.
36
+
37
+ ### Fixed
38
+
39
+ - **Memory leak — multi-calendar lazy-loading observer**: the `IntersectionObserver` was stored in
40
+ the timeout set and "cleaned up" with `clearTimeout`, so it was never disconnected and retained
41
+ the whole component. It is now tracked separately and disconnected on destroy.
42
+ - **Memory leak — destroy with open popover**: destroying the component while the calendar was open
43
+ (e.g. route navigation) leaked the window `scroll`/`resize` listeners and left the body-appended
44
+ portal view attached to `ApplicationRef`. `ngOnDestroy` now tears both down.
45
+ - **Input mask zero-padding**: with `displayFormat` set, typing a partial token was zero-padded
46
+ (typing `1` became `10`), corrupting subsequent input. Partial tokens are now left as typed, and
47
+ the caret stays at the end when the mask inserts separators.
48
+ - `ngOnDestroy` "state clearing" used no-op `??=` assignments; date references are now actually
49
+ released.
50
+ - The workspace root `package.json` is now `private`, preventing an accidental `npm publish` of the
51
+ workspace itself (releases publish from `dist/ngxsmk-datepicker` as before).
52
+
53
+ ## [2.4.0] - 2026-07-02
54
+
55
+ ### Added
56
+
57
+ - **Dual-Range Comparison**: New `[comparisonRange]="[start, end]"` input highlights a secondary,
58
+ purely-presentational range alongside the primary selection (analytics "this period vs previous"
59
+ use case). Themeable via the `--datepicker-comparison-range-color` CSS variable; does not affect
60
+ selection or emitted values.
61
+
62
+ ### Changed
63
+
64
+ - **Modern reactivity (non-breaking)**: Migrated all `@Output()`s to the `output()` function and an
65
+ initial batch of read-only `@Input()`s to signal `input()`. Public template bindings
66
+ (`[x]="…"` / `(event)="…"`) are unchanged.
67
+ - **Signal-backed internal state**: Converted transient state (`isOpeningCalendar`,
68
+ `naturalLanguagePreview`, `showNaturalLanguagePreview`, `validationErrorMessage`, `typedInputValue`)
69
+ to signals and made the `displayValue` getter side-effect free, reducing manual `markForCheck()`.
70
+
71
+ ### Fixed
72
+
73
+ - **TypeScript 6.0 build compatibility**: Removed the now-invalid `baseUrl` and `importsNotUsedAsValues`
74
+ compiler options that broke the production build and test suite on the TS 6 toolchain.
75
+ - Corrected three internal guards (`autoApplyClose`, `timeRangeMode`, `allowSameDay`) surfaced during
76
+ the signal migration.
77
+
78
+ ### Removed
79
+
80
+ - **Dead SCSS architecture** (~7k lines): the unreferenced, stale `datepicker.scss` +
81
+ `styles/{components,core,abstracts}/` partials, `_legacy-datepicker.scss`, and an orphaned
82
+ `datepicker.css.map`. The maintained flat `styles/datepicker.css` is unaffected.
83
+
12
84
  ## [2.3.1] - 2026-06-03
13
85
 
14
86
  ### Added
@@ -57,7 +129,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
57
129
 
58
130
  ### Fixed
59
131
 
60
- - **npm package**: The `2.2.12` tarball on the registry omitted `fesm2022/` and `types/` (only docs, styles, and package metadata). **Use `ngxsmk-datepicker@2.2.11` until `2.3.0` or later** with a full ng-packagr build ([#230](https://github.com/NGXSMK/ngxsmk-datepicker/issues/230)).
132
+ - **npm package**: The `2.2.12` tarball on the registry omitted `fesm2022/` and `types/` (only docs, styles, and package metadata). **Use `ngxsmk-datepicker@2.2.11` until `2.4.0` or later** with a full ng-packagr build ([#230](https://github.com/NGXSMK/ngxsmk-datepicker/issues/230)).
61
133
 
62
134
  ## [2.2.11] - 2026-03-24
63
135
 
@@ -939,7 +1011,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
939
1011
  - No breaking changes from v1.9.11
940
1012
  - SEO improvements are automatic and require no code changes
941
1013
  - See [MIGRATION.md](MIGRATION.md) for detailed migration guide
942
- - See [docs/SEO.md](projects/ngxsmk-datepicker/docs/SEO.md) for SEO best practices
1014
+ - See docs/SEO.md for SEO best practices *(document removed in July 2026 cleanup)*
943
1015
 
944
1016
  ## [1.9.11] - 2025-11-17
945
1017