@dereekb/dbx-web 13.11.14 → 13.11.16

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.
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-web/eslint",
3
- "version": "13.11.14",
3
+ "version": "13.11.16",
4
4
  "peerDependencies": {
5
- "@typescript-eslint/utils": "8.59.0"
5
+ "@typescript-eslint/utils": "8.59.3"
6
6
  },
7
7
  "devDependencies": {
8
8
  "@angular/core": "21.2.11",
9
- "@dereekb/dbx-core": "13.11.14",
10
- "@dereekb/rxjs": "13.11.14",
11
- "@typescript-eslint/parser": "8.59.0",
12
- "eslint": "9.39.4",
9
+ "@dereekb/dbx-core": "13.11.16",
10
+ "@dereekb/rxjs": "13.11.16",
11
+ "@typescript-eslint/parser": "8.59.3",
12
+ "eslint": "10.4.0",
13
13
  "rxjs": "^7.8.2"
14
14
  },
15
15
  "exports": {
@@ -1,4 +1,7 @@
1
- export { dbxWebRequireCleanSubscriptionRule } from './require-clean-subscription.rule';
2
- export { dbxWebRequireCompleteOnDestroyRule } from './require-complete-on-destroy.rule';
3
- export { dbxWebNoRedundantOnDestroyRule } from './no-redundant-on-destroy.rule';
4
- export { dbxWebEslintPlugin } from './plugin';
1
+ export { DBX_WEB_REQUIRE_CLEAN_SUBSCRIPTION_RULE } from './require-clean-subscription.rule';
2
+ export { DBX_WEB_REQUIRE_COMPLETE_ON_DESTROY_RULE } from './require-complete-on-destroy.rule';
3
+ export { DBX_WEB_NO_REDUNDANT_ON_DESTROY_RULE } from './no-redundant-on-destroy.rule';
4
+ export { DBX_WEB_REQUIRE_COMPUTED_SIGNAL_SUFFIX_RULE } from './require-computed-signal-suffix.rule';
5
+ export { DBX_WEB_REQUIRE_COMPONENT_CONFIG_INPUT_RULE } from './require-component-config-input.rule';
6
+ export { DBX_WEB_REQUIRE_TOP_LEVEL_COMPUTED_SIGNALS_RULE } from './require-top-level-computed-signals.rule';
7
+ export { DBX_WEB_ESLINT_PLUGIN, dbxWebESLintPlugin, type DbxWebEslintPlugin } from './plugin';
@@ -37,4 +37,4 @@ export interface DbxWebNoRedundantOnDestroyRuleDefinition {
37
37
  * no `ngOnDestroy()` method (e.g. left over from a previous run), the
38
38
  * orphaned implements clause is removed.
39
39
  */
40
- export declare const dbxWebNoRedundantOnDestroyRule: DbxWebNoRedundantOnDestroyRuleDefinition;
40
+ export declare const DBX_WEB_NO_REDUNDANT_ON_DESTROY_RULE: DbxWebNoRedundantOnDestroyRuleDefinition;
@@ -1,14 +1,20 @@
1
- import { dbxWebRequireCleanSubscriptionRule } from './require-clean-subscription.rule';
2
- import { dbxWebRequireCompleteOnDestroyRule } from './require-complete-on-destroy.rule';
3
- import { dbxWebNoRedundantOnDestroyRule } from './no-redundant-on-destroy.rule';
1
+ import { DBX_WEB_REQUIRE_CLEAN_SUBSCRIPTION_RULE } from './require-clean-subscription.rule';
2
+ import { DBX_WEB_REQUIRE_COMPLETE_ON_DESTROY_RULE } from './require-complete-on-destroy.rule';
3
+ import { DBX_WEB_NO_REDUNDANT_ON_DESTROY_RULE } from './no-redundant-on-destroy.rule';
4
+ import { DBX_WEB_REQUIRE_COMPUTED_SIGNAL_SUFFIX_RULE } from './require-computed-signal-suffix.rule';
5
+ import { DBX_WEB_REQUIRE_COMPONENT_CONFIG_INPUT_RULE } from './require-component-config-input.rule';
6
+ import { DBX_WEB_REQUIRE_TOP_LEVEL_COMPUTED_SIGNALS_RULE } from './require-top-level-computed-signals.rule';
4
7
  /**
5
8
  * ESLint plugin interface for dbx-web rules.
6
9
  */
7
10
  export interface DbxWebEslintPlugin {
8
11
  readonly rules: {
9
- readonly 'require-clean-subscription': typeof dbxWebRequireCleanSubscriptionRule;
10
- readonly 'require-complete-on-destroy': typeof dbxWebRequireCompleteOnDestroyRule;
11
- readonly 'no-redundant-on-destroy': typeof dbxWebNoRedundantOnDestroyRule;
12
+ readonly 'require-clean-subscription': typeof DBX_WEB_REQUIRE_CLEAN_SUBSCRIPTION_RULE;
13
+ readonly 'require-complete-on-destroy': typeof DBX_WEB_REQUIRE_COMPLETE_ON_DESTROY_RULE;
14
+ readonly 'no-redundant-on-destroy': typeof DBX_WEB_NO_REDUNDANT_ON_DESTROY_RULE;
15
+ readonly 'require-computed-signal-suffix': typeof DBX_WEB_REQUIRE_COMPUTED_SIGNAL_SUFFIX_RULE;
16
+ readonly 'require-component-config-input': typeof DBX_WEB_REQUIRE_COMPONENT_CONFIG_INPUT_RULE;
17
+ readonly 'require-top-level-computed-signals': typeof DBX_WEB_REQUIRE_TOP_LEVEL_COMPUTED_SIGNALS_RULE;
12
18
  };
13
19
  }
14
20
  /**
@@ -17,4 +23,10 @@ export interface DbxWebEslintPlugin {
17
23
  * Register as a plugin in your flat ESLint config, then enable individual rules
18
24
  * under the chosen plugin prefix (e.g. 'dereekb-dbx-web/require-clean-subscription').
19
25
  */
20
- export declare const dbxWebEslintPlugin: DbxWebEslintPlugin;
26
+ export declare const DBX_WEB_ESLINT_PLUGIN: DbxWebEslintPlugin;
27
+ /**
28
+ * camelCase alias of {@link DBX_WEB_ESLINT_PLUGIN} matching the conventional ESLint plugin export name.
29
+ *
30
+ * @dbxAllowConstantName
31
+ */
32
+ export declare const dbxWebESLintPlugin: DbxWebEslintPlugin;
@@ -58,7 +58,7 @@ export interface CollectNgOnDestroyRemovalFixesInput {
58
58
  * - Inserts the `cleanSubscription` named import from `@dereekb/dbx-core` if missing.
59
59
  * - Removes any matching `this.<field>.destroy();` line from the same class's `ngOnDestroy`.
60
60
  */
61
- export declare const dbxWebRequireCleanSubscriptionRule: DbxWebRequireCleanSubscriptionRuleDefinition;
61
+ export declare const DBX_WEB_REQUIRE_CLEAN_SUBSCRIPTION_RULE: DbxWebRequireCleanSubscriptionRuleDefinition;
62
62
  /**
63
63
  * Pushes fixes that remove `this.<propName>.<methodName>()` ExpressionStatements
64
64
  * from `ngOnDestroy`'s body. Removes the statement node and any preceding
@@ -30,4 +30,4 @@ export interface DbxWebRequireCompleteOnDestroyRuleDefinition {
30
30
  * - Inserts the `completeOnDestroy` named import from `@dereekb/dbx-core` if missing.
31
31
  * - Removes any matching `this.<field>.complete();` line from the same class's `ngOnDestroy`.
32
32
  */
33
- export declare const dbxWebRequireCompleteOnDestroyRule: DbxWebRequireCompleteOnDestroyRuleDefinition;
33
+ export declare const DBX_WEB_REQUIRE_COMPLETE_ON_DESTROY_RULE: DbxWebRequireCompleteOnDestroyRuleDefinition;
@@ -0,0 +1,50 @@
1
+ import { type AstNode } from './util';
2
+ /**
3
+ * Options for {@link DBX_WEB_REQUIRE_COMPONENT_CONFIG_INPUT_RULE}.
4
+ */
5
+ export interface DbxWebRequireComponentConfigInputRuleOptions {
6
+ /**
7
+ * Maximum number of signal-input properties allowed before the rule reports.
8
+ * Defaults to {@link DEFAULT_INPUT_THRESHOLD}.
9
+ */
10
+ readonly threshold?: number;
11
+ }
12
+ /**
13
+ * ESLint rule definition shape used by `require-component-config-input`.
14
+ */
15
+ export interface DbxWebRequireComponentConfigInputRuleDefinition {
16
+ readonly meta: {
17
+ readonly type: 'suggestion';
18
+ readonly fixable: undefined;
19
+ readonly docs: {
20
+ readonly description: string;
21
+ readonly recommended: boolean;
22
+ };
23
+ readonly messages: {
24
+ readonly tooManySignalInputs: string;
25
+ };
26
+ readonly schema: readonly object[];
27
+ };
28
+ create(context: AstNode): Record<string, (node: AstNode) => void>;
29
+ }
30
+ /**
31
+ * ESLint rule that flags `@Component` / `@Directive` / `@Pipe` classes which
32
+ * declare more than `threshold` (default 3) signal-input properties.
33
+ *
34
+ * When a component-tier class drifts past the threshold, the convention is to
35
+ * consolidate the loose inputs into a single config-typed input, e.g.
36
+ * `config = input<Maybe<DbxFooConfig>>()`. This rule does not enforce a specific
37
+ * property name or shape — it is purely a count, analogous to the workspace's
38
+ * `dereekb-util/prefer-config-object` rule for function parameters.
39
+ *
40
+ * Only `input(...)` and `input.required(...)` calls whose root identifier is
41
+ * imported from `@angular/core` are counted. Static and `declare` members are
42
+ * ignored, as are non-decorated classes and imports from other modules.
43
+ *
44
+ * Not auto-fixable: consolidating loose inputs into a config interface is a
45
+ * design-level refactor that updates the template, the consuming sites, and the
46
+ * type surface — outside the safe scope of an ESLint autofix.
47
+ *
48
+ * @see `dbx__note__angular-conventions` → ANG-C1 Component Config Input.
49
+ */
50
+ export declare const DBX_WEB_REQUIRE_COMPONENT_CONFIG_INPUT_RULE: DbxWebRequireComponentConfigInputRuleDefinition;
@@ -0,0 +1,38 @@
1
+ import { type AstNode } from './util';
2
+ /**
3
+ * ESLint rule definition shape used by `require-computed-signal-suffix`.
4
+ */
5
+ export interface DbxWebRequireComputedSignalSuffixRuleDefinition {
6
+ readonly meta: {
7
+ readonly type: 'suggestion';
8
+ readonly fixable: undefined;
9
+ readonly docs: {
10
+ readonly description: string;
11
+ readonly recommended: boolean;
12
+ };
13
+ readonly messages: {
14
+ readonly missingSignalSuffix: string;
15
+ readonly signalSuffixOnInput: string;
16
+ };
17
+ readonly schema: readonly object[];
18
+ };
19
+ create(context: AstNode): Record<string, (node: AstNode) => void>;
20
+ }
21
+ /**
22
+ * ESLint rule that enforces the dbx-components Angular signal naming convention:
23
+ *
24
+ * - Class properties initialized with `computed(...)` must end with `Signal`.
25
+ * - Class properties initialized with `input(...)`, `input.required(...)`, `model(...)`,
26
+ * or `model.required(...)` must NOT end with `Signal`.
27
+ *
28
+ * Fires only on classes decorated with `@Component`, `@Directive`, or `@Pipe` from
29
+ * `@angular/core`, and only when the relevant initializer identifier is imported from
30
+ * `@angular/core`.
31
+ *
32
+ * Not auto-fixable: renaming a class field also requires updating every reference in the
33
+ * class body and any associated templates, which is outside the safe scope of an ESLint
34
+ * autofix.
35
+ *
36
+ * @see `dbx__note__angular-conventions` → ANG-C2 Computed Signal Naming.
37
+ */
38
+ export declare const DBX_WEB_REQUIRE_COMPUTED_SIGNAL_SUFFIX_RULE: DbxWebRequireComputedSignalSuffixRuleDefinition;
@@ -0,0 +1,66 @@
1
+ import { type AstNode } from './util';
2
+ /**
3
+ * ESLint rule definition shape used by `require-top-level-computed-signals`.
4
+ */
5
+ export interface DbxWebRequireTopLevelComputedSignalsRuleDefinition {
6
+ readonly meta: {
7
+ readonly type: 'problem';
8
+ readonly fixable: 'code';
9
+ readonly docs: {
10
+ readonly description: string;
11
+ readonly recommended: boolean;
12
+ };
13
+ readonly messages: {
14
+ readonly conditionalSignalRead: string;
15
+ };
16
+ readonly schema: readonly object[];
17
+ };
18
+ create(context: AstNode): Record<string, (node: AstNode) => void>;
19
+ }
20
+ /**
21
+ * ESLint rule that requires every signal read inside a `computed(() => { ... })`
22
+ * callback to appear in an unconditional, top-level position rather than
23
+ * inside a branching path (if/else, ternary, short-circuit, switch case,
24
+ * loop body, catch handler).
25
+ *
26
+ * Angular `computed` re-tracks its dependencies on every run, so a signal
27
+ * read that only happens inside one branch is not registered as a dependency
28
+ * when the other branch executes. When that signal subsequently changes the
29
+ * computed does not recompute and the value goes stale. Reading every signal
30
+ * up front — before any branching — keeps the dependency set stable.
31
+ *
32
+ * To avoid false positives on plain methods and utility functions, the rule
33
+ * only flags calls whose name can be statically traced back to a signal
34
+ * factory:
35
+ *
36
+ * - `this.<name>()` is flagged when `<name>` is a class property initialized
37
+ * with one of `signal`, `computed`, `input`, `input.required`, `model`,
38
+ * `model.required`, `linkedSignal` (from `@angular/core`), or `toSignal`
39
+ * (from `@angular/core/rxjs-interop`).
40
+ * - `<name>()` (bare identifier) is flagged when `<name>` is a module-level
41
+ * `const` initialized with one of those factories.
42
+ *
43
+ * Everything else — calls with arguments, chained property accesses on
44
+ * services, calls on local loop variables, calls on globals — is left
45
+ * alone. Cross-class signal tracking (e.g. `this.someService.someSignal()`)
46
+ * is intentionally out of scope: it would require type analysis to
47
+ * distinguish signal getters from plain getter methods, and the rule
48
+ * prefers a clean report set over partial coverage.
49
+ *
50
+ * Only `computed` identifiers imported from `@angular/core` are considered.
51
+ * Nested function expressions (callbacks passed to `.map` / `.filter` etc.)
52
+ * are not inspected because Angular does not synchronously track signals
53
+ * read inside them.
54
+ *
55
+ * Auto-fix: for each flagged callback, the fix inserts one
56
+ * `const <localName> = this.<signalName>();` (or `const <localName> = <signalName>();`
57
+ * for module-scope captures) at the top of the callback body and replaces
58
+ * every flagged call with `<localName>`. The local name is the signal name
59
+ * with the trailing `Signal` suffix removed when present (`xSignal` → `x`).
60
+ * If that name would shadow an existing local binding in the callback, the
61
+ * fix is skipped for that signal to avoid generating a syntax error.
62
+ * Expression-body callbacks (`computed(() => …)`) are converted to block
63
+ * bodies as part of the fix; the previous expression becomes the `return`
64
+ * value.
65
+ */
66
+ export declare const DBX_WEB_REQUIRE_TOP_LEVEL_COMPUTED_SIGNALS_RULE: DbxWebRequireTopLevelComputedSignalsRuleDefinition;
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from '@dereekb/util';
1
2
  /**
2
3
  * Module that holds Angular component decorators.
3
4
  */
@@ -72,7 +73,7 @@ export interface ImportRegistry {
72
73
  /**
73
74
  * The last ImportDeclaration node in the file. Used to insert brand-new imports.
74
75
  */
75
- lastImportDeclaration: AstNode | null;
76
+ lastImportDeclaration: Maybe<AstNode>;
76
77
  }
77
78
  /**
78
79
  * Creates an empty {@link ImportRegistry}.
@@ -117,10 +118,10 @@ export declare function getDecoratorName(decorator: AstNode): string;
117
118
  * identifier really came from `@angular/core` (and not a local alias).
118
119
  * @returns The matching decorator and its name, or null.
119
120
  */
120
- export declare function findAngularComponentDecorator(classNode: AstNode, registry: ImportRegistry): {
121
+ export declare function findAngularComponentDecorator(classNode: AstNode, registry: ImportRegistry): Maybe<{
121
122
  readonly decorator: AstNode;
122
123
  readonly name: string;
123
- } | null;
124
+ }>;
124
125
  /**
125
126
  * Returns the property name of a class member when its key is a simple Identifier or string Literal.
126
127
  *
@@ -129,28 +130,28 @@ export declare function findAngularComponentDecorator(classNode: AstNode, regist
129
130
  * @param member - A ClassBody member AST node.
130
131
  * @returns The property name, or null when not a simple key.
131
132
  */
132
- export declare function getClassMemberName(member: AstNode): string | null;
133
+ export declare function getClassMemberName(member: AstNode): Maybe<string>;
133
134
  /**
134
135
  * Finds the `ngOnDestroy` method declaration on the given class, if any.
135
136
  *
136
137
  * @param classNode - The ClassDeclaration / ClassExpression AST node.
137
138
  * @returns The MethodDefinition AST node for `ngOnDestroy`, or null.
138
139
  */
139
- export declare function findNgOnDestroyMethod(classNode: AstNode): AstNode | null;
140
+ export declare function findNgOnDestroyMethod(classNode: AstNode): Maybe<AstNode>;
140
141
  /**
141
142
  * If the given expression is a `CallExpression` whose callee is one of the
142
143
  * accepted identifier names, returns the matching name. Otherwise null.
143
144
  *
145
+ * @param node - The expression AST node.
146
+ * @param names - The accepted identifier names.
147
+ * @returns The matched name, or null.
148
+ *
144
149
  * @example
145
150
  * ```
146
151
  * isCalledIdentifier(node, ['cleanSubscription', 'clean']) // returns 'cleanSubscription'
147
152
  * ```
148
- *
149
- * @param node - The expression AST node.
150
- * @param names - The accepted identifier names.
151
- * @returns The matched name, or null.
152
153
  */
153
- export declare function isCalledIdentifier(node: AstNode, names: ReadonlySet<string>): string | null;
154
+ export declare function isCalledIdentifier(node: AstNode, names: ReadonlySet<string>): Maybe<string>;
154
155
  /**
155
156
  * Returns true when the given AST node is a `this.<propName>` MemberExpression.
156
157
  *
@@ -190,7 +191,7 @@ export interface EnsureNamedImportFixInput {
190
191
  * @param input - The fixer, registry, and import names.
191
192
  * @returns A fix operation, or null when the import is already present.
192
193
  */
193
- export declare function ensureNamedImportFix(input: EnsureNamedImportFixInput): AstNode | null;
194
+ export declare function ensureNamedImportFix(input: EnsureNamedImportFixInput): Maybe<AstNode>;
194
195
  /**
195
196
  * Returns true when the given PropertyDefinition declares a `static` member.
196
197
  *
@@ -236,7 +237,7 @@ export interface OnDestroyImplementsMatch {
236
237
  * @param registry - The file's import registry.
237
238
  * @returns The match details, or null.
238
239
  */
239
- export declare function findOnDestroyImplementsClause(classNode: AstNode, registry: ImportRegistry): OnDestroyImplementsMatch | null;
240
+ export declare function findOnDestroyImplementsClause(classNode: AstNode, registry: ImportRegistry): Maybe<OnDestroyImplementsMatch>;
240
241
  /**
241
242
  * Computes the source range to remove for the given `implements` specifier so
242
243
  * that the surrounding `implements` clause stays well-formed.
@@ -65,8 +65,8 @@ function visibleDateRangeForCalendarState(calendarState) {
65
65
  distance = 1;
66
66
  break;
67
67
  }
68
- const isMinDateVisible = navigationRangeLimit?.start != null ? !isAfter(start, navigationRangeLimit.start) : false;
69
- const isMaxDateVisible = navigationRangeLimit?.end != null ? !isBefore(end, navigationRangeLimit.end) : false;
68
+ const isMinDateVisible = navigationRangeLimit?.start != null && !isAfter(start, navigationRangeLimit.start);
69
+ const isMaxDateVisible = navigationRangeLimit?.end != null && !isBefore(end, navigationRangeLimit.end);
70
70
  // TODO: Consider changing min/max date visible logical utility to be fully within the current month or not,
71
71
  // not just visible, since it can change to a locked out calendar and doesn't feel as UI friendly.
72
72
  return {
@@ -204,12 +204,16 @@ function updateCalendarStateWithTappedDate(state, date) {
204
204
  */
205
205
  function updateCalendarStateWithNavigationRangeLimit(state, navigationRangeLimit) {
206
206
  const { date } = state;
207
+ let result;
207
208
  // cap the date if it doesn't fall within the range.
208
209
  if (navigationRangeLimit && !isDateInDateRange(date, navigationRangeLimit)) {
209
210
  const clampedDate = clampDateToDateRange(date, navigationRangeLimit);
210
- return { ...state, date: clampedDate, navigationRangeLimit };
211
+ result = { ...state, date: clampedDate, navigationRangeLimit };
211
212
  }
212
- return { ...state, navigationRangeLimit };
213
+ else {
214
+ result = { ...state, navigationRangeLimit };
215
+ }
216
+ return result;
213
217
  }
214
218
 
215
219
  function timeSubtitleForEvent(event) {
@@ -257,10 +261,7 @@ class DbxCalendarBaseComponent {
257
261
  hasMultiplePages$ = this.calendarStore.hasMultiplePages$;
258
262
  showPageButtons$ = this.calendarStore.showPageButtons$;
259
263
  activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(withLatestFrom(this.calendarStore.date$), map(([x, date]) => {
260
- if (x.events.length && isSameMonth(x.date, date)) {
261
- return !x.dateTappedTwice;
262
- }
263
- return false;
264
+ return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;
264
265
  }));
265
266
  displayType$ = this.calendarStore.displayType$;
266
267
  viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });
@@ -304,10 +305,7 @@ class DbxCalendarComponent {
304
305
  viewDate$ = this.calendarStore.date$;
305
306
  events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));
306
307
  activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(withLatestFrom(this.calendarStore.date$), map(([x, date]) => {
307
- if (x.events.length && isSameMonth(x.date, date)) {
308
- return !x.dateTappedTwice;
309
- }
310
- return false;
308
+ return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;
311
309
  }), distinctUntilChanged(), shareReplay(1));
312
310
  displayType$ = this.calendarStore.displayType$;
313
311
  viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });
@@ -342,7 +340,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImpo
342
340
  }], propDecorators: { clickEvent: [{ type: i0.Output, args: ["clickEvent"] }] } });
343
341
 
344
342
  /**
345
- * Provides default configuration for the DbxCalendarModule
343
+ * Provides default configuration for the DbxCalendarModule.
346
344
  *
347
345
  * @returns Providers that register the calendar with a date-fns date adapter.
348
346
  */
@@ -1 +1 @@
1
- {"version":3,"file":"dereekb-dbx-web-calendar.mjs","sources":["../../../../packages/dbx-web/calendar/src/lib/calendar.store.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.provider.ts","../../../../packages/dbx-web/calendar/src/dereekb-dbx-web-calendar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { clampDateToDateRange, type DateRange, dateRangeOverlapsDateRangeFunction, isDateInDateRange, isFullDateRange, isSameDateDay, isSameDateRange } from '@dereekb/date';\nimport { invertDecision, type Maybe, reduceBooleansWithAndFn } from '@dereekb/util';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { type CalendarEvent } from 'angular-calendar';\nimport { differenceInDays, addDays, endOfDay, endOfMonth, endOfWeek, isSameDay, startOfDay, startOfMonth, startOfWeek, isBefore, isAfter } from 'date-fns';\nimport { type Observable, distinctUntilChanged, first, map, shareReplay, switchMap, tap, combineLatest } from 'rxjs';\n\nexport enum CalendarDisplayType {\n MONTH = 'month',\n WEEK = 'week',\n DAY = 'day'\n}\n\nexport interface CalendarViewDateRange {\n readonly type: CalendarDisplayType;\n readonly start: Date;\n readonly end: Date;\n readonly distance: number;\n /**\n * Whether or not the min navigation date is currently visible. This implies that we're at the minimum date.\n */\n readonly isMinDateVisible: boolean;\n /**\n * Whether or not the maximum navigation date is visible. This implies that we're at the maximum date.\n */\n readonly isMaxDateVisible: boolean;\n}\n\n/**\n * Compares two {@link CalendarViewDateRange} values for equality by checking type, start/end dates, distance, and min/max visibility flags.\n *\n * @param a - First calendar view date range to compare.\n * @param b - Second calendar view date range to compare.\n * @returns Whether the two date ranges are considered equal.\n */\nexport function isCalendarViewDateRangeEqual(a: CalendarViewDateRange, b: CalendarViewDateRange): boolean {\n return a.type === b.type && isSameDay(a.start, b.start) && isSameDay(a.end, b.end) && a.distance === b.distance && a.isMinDateVisible === b.isMinDateVisible && a.isMaxDateVisible === b.isMaxDateVisible;\n}\n\nexport interface CalendarState<T = any> {\n /**\n * Calendar display mode\n */\n readonly type: CalendarDisplayType;\n /**\n * Whether or not to show the today button. Defaults to true.\n */\n readonly showTodayButton?: boolean;\n /**\n * Date that is selected.\n */\n readonly date: Date;\n /**\n * Whether or not the day was tapped/set twice.\n */\n readonly dateTappedTwice: boolean;\n /**\n * Set of calendar events.\n */\n readonly events: CalendarEvent<T>[];\n /**\n * Optional navigation range limitation that limits which dates can be navigated to.\n */\n readonly navigationRangeLimit?: Maybe<Partial<DateRange>>;\n /**\n * Whether or not to display the page buttons when applicable. Can only be displayed when a navigationRangeLimit is set.\n */\n readonly showPageButtons?: boolean;\n}\n\n/**\n * Computes the visible date range for the given calendar state based on display type (month, week, or day)\n * and the optional navigation range limit.\n *\n * @param calendarState - The current calendar state containing display type, date, and navigation limits.\n * @returns The computed visible date range including start, end, distance, and min/max visibility flags.\n */\nexport function visibleDateRangeForCalendarState(calendarState: CalendarState): CalendarViewDateRange {\n const { navigationRangeLimit, type, date } = calendarState;\n\n let start: Date;\n let end: Date;\n let distance: number;\n\n switch (type) {\n case CalendarDisplayType.MONTH:\n start = startOfDay(startOfWeek(startOfMonth(date), { weekStartsOn: 0 }));\n end = endOfWeek(endOfMonth(date));\n distance = differenceInDays(end, start) + 1;\n break;\n case CalendarDisplayType.WEEK:\n start = startOfWeek(date);\n end = endOfWeek(start);\n distance = 7; // 7 days in a week.\n break;\n case CalendarDisplayType.DAY:\n start = startOfDay(date);\n end = endOfDay(date);\n distance = 1;\n break;\n }\n\n const isMinDateVisible: boolean = navigationRangeLimit?.start != null ? !isAfter(start, navigationRangeLimit.start) : false;\n const isMaxDateVisible: boolean = navigationRangeLimit?.end != null ? !isBefore(end, navigationRangeLimit.end) : false;\n\n // TODO: Consider changing min/max date visible logical utility to be fully within the current month or not,\n // not just visible, since it can change to a locked out calendar and doesn't feel as UI friendly.\n\n return {\n type,\n start,\n end,\n distance,\n isMinDateVisible,\n isMaxDateVisible\n };\n}\n\nconst distinctUntilDateOrTypeOrEventsChanged = distinctUntilChanged<CalendarState>((a, b) => a?.date === b?.date && a?.type === b?.type && a?.events === b?.events);\n\n@Injectable()\nexport class DbxCalendarStore<T = any> extends ComponentStore<CalendarState<T>> {\n constructor() {\n super({\n type: CalendarDisplayType.MONTH,\n showTodayButton: true,\n date: new Date(),\n dateTappedTwice: false,\n events: []\n });\n }\n\n // MARK: Effects\n readonly tapFirstPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.minNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n readonly tapNext = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ end, isMaxDateVisible }) => {\n if (!isMaxDateVisible) {\n this.tapDay(addDays(end, 1));\n }\n })\n )\n )\n );\n });\n\n readonly tapPrevious = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ start, isMinDateVisible }) => {\n if (!isMinDateVisible) {\n this.tapDay(addDays(start, -1));\n }\n })\n )\n )\n );\n });\n\n readonly tapLastPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.maxNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n // MARK: Accessors\n\n readonly showTodayButton$ = this.state$.pipe(\n map((x) => x.showTodayButton),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly date$ = this.state$.pipe(map((x) => x.date));\n readonly dateTappedTwice$ = this.state$.pipe(map((x) => x.dateTappedTwice));\n\n readonly events$ = this.state$.pipe(\n map((x) => x.events),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Returns the events that match the tapped date range state.\n */\n readonly eventsForDateState$ = this.state$.pipe(\n distinctUntilDateOrTypeOrEventsChanged,\n map((state) => ({\n date: state.date,\n events: state.events.filter((x) => isSameDay(x.start, state.date) || (x.end && isBefore(x.start, state.date) && isAfter(x.end, state.date))),\n dateTappedTwice: state.dateTappedTwice\n })),\n shareReplay(1)\n );\n\n readonly eventsForDate$ = this.eventsForDateState$.pipe(map((state) => state.events));\n\n readonly visibleDateRange$: Observable<CalendarViewDateRange> = this.state$.pipe(map(visibleDateRangeForCalendarState), distinctUntilChanged(isCalendarViewDateRangeEqual), shareReplay(1));\n\n readonly visibleEvents$ = combineLatest([this.events$, this.visibleDateRange$]).pipe(\n map(([events, dateRange]) => {\n const isEventInDateRange = dateRangeOverlapsDateRangeFunction(dateRange);\n return events.filter((x) => isEventInDateRange(x));\n }),\n shareReplay(1)\n );\n\n readonly isLookingAtToday$ = this.visibleDateRange$.pipe(\n map((x) => isDateInDateRange(new Date(), x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMinimumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMinDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMaximumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMaxDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly hasMultiplePages$ = combineLatest([this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(map(invertDecision(reduceBooleansWithAndFn(true))), distinctUntilChanged(), shareReplay(1));\n\n readonly displayType$ = this.state$.pipe(\n map((x) => x.type),\n distinctUntilChanged((a, b) => a === b),\n shareReplay(1)\n );\n\n readonly navigationRangeLimit$ = this.state$.pipe(\n map((x) => x.navigationRangeLimit),\n distinctUntilChanged(isSameDateRange),\n shareReplay(1)\n );\n\n readonly minNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.start),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly maxNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.end),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly isTodayInNavigationRangeLimit$ = this.navigationRangeLimit$.pipe(\n map((x) => isDateInDateRange(new Date(), x ?? {})),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canJumpToToday$ = combineLatest([this.isLookingAtToday$, this.isTodayInNavigationRangeLimit$]).pipe(\n map(([isLookingAtToday, isTodayInNavigationRangeLimit]) => !isLookingAtToday && isTodayInNavigationRangeLimit),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canShowPageButtons$ = this.state$.pipe(\n map((x) => x.showPageButtons && x.navigationRangeLimit && isFullDateRange(x.navigationRangeLimit)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showPageButtons$ = combineLatest([this.canShowPageButtons$, this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(\n map(([canShowPageButtons, isLookingAtMinimumDate, isLookingAtMaximumDate]) => {\n return canShowPageButtons && !(isLookingAtMinimumDate && isLookingAtMaximumDate);\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n // MARK: State Changes\n /**\n * Tap a day.\n *\n * - If the same day is presented, dateTappedTwice is flipped.\n */\n readonly tapDay = this.updater((state, date: Date) => updateCalendarStateWithTappedDate(state, date));\n\n /**\n * Set all events on the calendar.\n */\n readonly setEvents = this.updater((state, events: CalendarEvent<T>[]) => ({ ...state, events }));\n\n /**\n * Set all events on the calendar.\n */\n readonly setDisplayType = this.updater((state, type: CalendarDisplayType) => ({ ...state, type }));\n\n /**\n * Sets the navigation limit.\n */\n readonly setNavigationRangeLimit = this.updater((state, navigationRangeLimit: Maybe<Partial<DateRange>>) => updateCalendarStateWithNavigationRangeLimit(state, navigationRangeLimit));\n\n readonly setShowTodayButton = this.updater((state, showTodayButton: Maybe<boolean>) => ({ ...state, showTodayButton: showTodayButton ?? true }));\n readonly setShowPageButtons = this.updater((state, showPageButtons: Maybe<boolean>) => ({ ...state, showPageButtons: showPageButtons ?? false }));\n}\n\n/**\n * Returns an updated calendar state after tapping a date. Only updates if the date differs from the current one\n * and falls within the navigation range limit. Toggles `dateTappedTwice` when the same day is tapped again.\n *\n * @param state - The current calendar state.\n * @param date - The date that was tapped.\n * @returns The updated calendar state reflecting the tapped date.\n */\nexport function updateCalendarStateWithTappedDate(state: CalendarState, date: Date) {\n // only update the date if it is different\n if (\n !isSameDateDay(state.date, date) && // Only update the date if it is within the date range\n (!state.navigationRangeLimit || isDateInDateRange(date, state.navigationRangeLimit))\n ) {\n state = { ...state, date, dateTappedTwice: isSameDay(date, state.date) ? !state.dateTappedTwice : false };\n }\n\n return state;\n}\n\n/**\n * Returns an updated calendar state with a new navigation range limit. If the current date falls outside\n * the new range, it is clamped to fit within the limit.\n *\n * @param state - The current calendar state.\n * @param navigationRangeLimit - The new navigation date range limit, or undefined/null to remove the limit.\n * @returns The updated calendar state with the applied navigation range limit.\n */\nexport function updateCalendarStateWithNavigationRangeLimit(state: CalendarState, navigationRangeLimit: Maybe<Partial<DateRange>>) {\n const { date } = state;\n\n // cap the date if it doesn't fall within the range.\n if (navigationRangeLimit && !isDateInDateRange(date, navigationRangeLimit)) {\n const clampedDate = clampDateToDateRange(date, navigationRangeLimit);\n return { ...state, date: clampedDate, navigationRangeLimit };\n }\n\n return { ...state, navigationRangeLimit };\n}\n","import { formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';\nimport { type CalendarEvent } from 'angular-calendar';\n\nexport interface DbxCalendarEvent<T> {\n event: CalendarEvent<T>;\n action?: string;\n}\n\nfunction timeSubtitleForEvent(event: CalendarEvent): string {\n let subtitle;\n\n if (event.allDay) {\n subtitle = `(All Day)`;\n } else {\n subtitle = formatToTimeAndDurationString(event.start, event.end ?? new Date());\n }\n\n return subtitle;\n}\n\n/**\n * Appends time/duration subtitles to each calendar event's title and sorts the events by start date in ascending order.\n *\n * @param events - The calendar events to prepare and sort.\n * @returns A new array of calendar events with updated titles, sorted by start date.\n */\nexport function prepareAndSortCalendarEvents(events: CalendarEvent[]): CalendarEvent[] {\n return events\n .map((event: CalendarEvent) => {\n const subtitle = timeSubtitleForEvent(event);\n let title;\n\n if (event.allDay) {\n title = event.title + ' ' + subtitle;\n } else {\n title = `${event.title} - ${subtitle}`;\n }\n\n return {\n ...event,\n title\n };\n })\n .sort(sortDateRangeStartAscendingCompareFunction);\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { DbxCalendarStore } from './calendar.store';\nimport { map, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FlexLayoutModule } from '@ngbracket/ngx-layout';\nimport { MatButtonModule } from '@angular/material/button';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CalendarDatePipe } from 'angular-calendar';\n\n@Component({\n selector: 'dbx-calendar-base',\n standalone: true,\n imports: [MatButtonModule, MatButtonToggleModule, DbxButtonSpacerDirective, MatIconModule, CalendarDatePipe, FlexLayoutModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './calendar.base.component.html'\n})\nexport class DbxCalendarBaseComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly showTodayButton$ = this.calendarStore.showTodayButton$;\n readonly canJumpToToday$ = this.calendarStore.canJumpToToday$;\n\n readonly isLookingAtMinimumDate$ = this.calendarStore.isLookingAtMinimumDate$;\n readonly isLookingAtMaximumDate$ = this.calendarStore.isLookingAtMaximumDate$;\n readonly hasMultiplePages$ = this.calendarStore.hasMultiplePages$;\n\n readonly showPageButtons$ = this.calendarStore.showPageButtons$;\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return false;\n })\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly showTodayButtonSignal = toSignal(this.showTodayButton$);\n readonly canJumpToTodaySignal = toSignal(this.canJumpToToday$);\n readonly isLookingAtMinimumDateSignal = toSignal(this.isLookingAtMinimumDate$, { initialValue: false });\n readonly isLookingAtMaximumDateSignal = toSignal(this.isLookingAtMaximumDate$, { initialValue: false });\n readonly hasMultiplePagesSignal = toSignal(this.hasMultiplePages$, { initialValue: false });\n readonly showPageButtonsSignal = toSignal(this.showPageButtons$);\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$);\n readonly displayTypeSignal = toSignal(this.displayType$);\n\n todayClicked(): void {\n this.calendarStore.tapDay(new Date());\n }\n\n firstPageButtonClicked(): void {\n this.calendarStore.tapFirstPage();\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n lastPageButtonClicked(): void {\n this.calendarStore.tapLastPage();\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ viewDateSignal() | calendarDate: displayTypeSignal() + 'ViewTitle' : 'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\" fxLayout.xs=\"column\" ngClass.xs=\"dbx-calendar-controls-compact\">\n <span class=\"dbx-calendar-controls-left dbx-flex\" fxFlex=\"nogrow\">\n @if (showTodayButtonSignal()) {\n <button mat-stroked-button [disabled]=\"!canJumpToTodaySignal()\" (click)=\"todayClicked()\">Today</button>\n }\n <dbx-button-spacer></dbx-button-spacer>\n @if (hasMultiplePagesSignal()) {\n <div class=\"d-iblock\">\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" aria-label=\"first page button\" (click)=\"firstPageButtonClicked()\">\n <mat-icon>first_page</mat-icon>\n </button>\n }\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" [attr.aria-label]=\"'Previous ' + displayTypeSignal() + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" [attr.aria-label]=\"'Next ' + displayTypeSignal() + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" aria-label=\"last page button\" (click)=\"lastPageButtonClicked()\">\n <mat-icon>last_page</mat-icon>\n </button>\n }\n </div>\n }\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n","import { Component, inject, output, ChangeDetectionStrategy, computed } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { type CalendarEvent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent } from 'angular-calendar';\nimport { DbxCalendarStore } from './calendar.store';\nimport { distinctUntilChanged, map, shareReplay, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { type DbxCalendarEvent, prepareAndSortCalendarEvents } from './calendar';\nimport { DbxCalendarBaseComponent } from './calendar.base.component';\nimport { NgClass } from '@angular/common';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'dbx-calendar',\n templateUrl: './calendar.component.html',\n imports: [DbxCalendarBaseComponent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent, MatButtonToggleModule, NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxCalendarComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly clickEvent = output<DbxCalendarEvent<T>>();\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return false;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly eventsSignal = toSignal(this.events$, { initialValue: [] });\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$, { initialValue: true });\n readonly displayTypeSignal = toSignal(this.displayType$);\n readonly displayTypeClassSignal = computed(() => `dbx-calendar-content-${this.displayTypeSignal()}`);\n\n todayClicked(): void {\n this.dayClicked({ date: new Date() });\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n dayClicked({ date }: { date: Date }): void {\n this.calendarStore.tapDay(date);\n }\n\n eventClicked(action: string, event: CalendarEvent<T>): void {\n this.clickEvent.emit({ action, event });\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"displayTypeSignal()\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"displayTypeClassSignal()\">\n @switch (displayTypeSignal()) {\n @case ('month') {\n <mwl-calendar-month-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" [activeDayIsOpen]=\"activeDayIsOpenSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n }\n @case ('week') {\n <mwl-calendar-week-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-week-view>\n }\n @case ('day') {\n <mwl-calendar-day-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-day-view>\n }\n }\n </div>\n</dbx-calendar-base>\n","import { type Provider } from '@angular/core';\nimport { DateAdapter, provideCalendar } from 'angular-calendar';\nimport { adapterFactory as dateAdapterFactory } from 'angular-calendar/date-adapters/date-fns';\n\n/**\n * Provides default configuration for the DbxCalendarModule\n *\n * @returns Providers that register the calendar with a date-fns date adapter.\n */\nexport function provideDbxCalendar(): Provider[] {\n return provideCalendar({ provide: DateAdapter, useFactory: dateAdapterFactory });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dateAdapterFactory"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,mBAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACb,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,GAAA,EAAA,CAAA,CAAA;AAqB/B;;;;;;AAMG;AACG,SAAU,4BAA4B,CAAC,CAAwB,EAAE,CAAwB,EAAA;IAC7F,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,gBAAgB,KAAK,CAAC,CAAC,gBAAgB,IAAI,CAAC,CAAC,gBA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EAAE,OAAO,CAAC,EAAA,eAAA,EACnI,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,gzCAAA,EAAA;;;AEZlB;;;;AAIG;SACa,kBAAkB,GAAA;AAChC,IAAA,OAAO,eAAe,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAEA,cAAkB,EAAE,CAAC;AAClF;;ACXA;;AAEG;;;;"}
1
+ {"version":3,"file":"dereekb-dbx-web-calendar.mjs","sources":["../../../../packages/dbx-web/calendar/src/lib/calendar.store.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.component.ts","../../../../packages/dbx-web/calendar/src/lib/calendar.component.html","../../../../packages/dbx-web/calendar/src/lib/calendar.provider.ts","../../../../packages/dbx-web/calendar/src/dereekb-dbx-web-calendar.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { clampDateToDateRange, type DateRange, dateRangeOverlapsDateRangeFunction, isDateInDateRange, isFullDateRange, isSameDateDay, isSameDateRange } from '@dereekb/date';\nimport { invertDecision, type Maybe, reduceBooleansWithAndFn } from '@dereekb/util';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { type CalendarEvent } from 'angular-calendar';\nimport { differenceInDays, addDays, endOfDay, endOfMonth, endOfWeek, isSameDay, startOfDay, startOfMonth, startOfWeek, isBefore, isAfter } from 'date-fns';\nimport { type Observable, distinctUntilChanged, first, map, shareReplay, switchMap, tap, combineLatest } from 'rxjs';\n\nexport enum CalendarDisplayType {\n MONTH = 'month',\n WEEK = 'week',\n DAY = 'day'\n}\n\nexport interface CalendarViewDateRange {\n readonly type: CalendarDisplayType;\n readonly start: Date;\n readonly end: Date;\n readonly distance: number;\n /**\n * Whether or not the min navigation date is currently visible. This implies that we're at the minimum date.\n */\n readonly isMinDateVisible: boolean;\n /**\n * Whether or not the maximum navigation date is visible. This implies that we're at the maximum date.\n */\n readonly isMaxDateVisible: boolean;\n}\n\n/**\n * Compares two {@link CalendarViewDateRange} values for equality by checking type, start/end dates, distance, and min/max visibility flags.\n *\n * @param a - First calendar view date range to compare.\n * @param b - Second calendar view date range to compare.\n * @returns Whether the two date ranges are considered equal.\n */\nexport function isCalendarViewDateRangeEqual(a: CalendarViewDateRange, b: CalendarViewDateRange): boolean {\n return a.type === b.type && isSameDay(a.start, b.start) && isSameDay(a.end, b.end) && a.distance === b.distance && a.isMinDateVisible === b.isMinDateVisible && a.isMaxDateVisible === b.isMaxDateVisible;\n}\n\nexport interface CalendarState<T = any> {\n /**\n * Calendar display mode\n */\n readonly type: CalendarDisplayType;\n /**\n * Whether or not to show the today button. Defaults to true.\n */\n readonly showTodayButton?: boolean;\n /**\n * Date that is selected.\n */\n readonly date: Date;\n /**\n * Whether or not the day was tapped/set twice.\n */\n readonly dateTappedTwice: boolean;\n /**\n * Set of calendar events.\n */\n readonly events: CalendarEvent<T>[];\n /**\n * Optional navigation range limitation that limits which dates can be navigated to.\n */\n readonly navigationRangeLimit?: Maybe<Partial<DateRange>>;\n /**\n * Whether or not to display the page buttons when applicable. Can only be displayed when a navigationRangeLimit is set.\n */\n readonly showPageButtons?: boolean;\n}\n\n/**\n * Computes the visible date range for the given calendar state based on display type (month, week, or day)\n * and the optional navigation range limit.\n *\n * @param calendarState - The current calendar state containing display type, date, and navigation limits.\n * @returns The computed visible date range including start, end, distance, and min/max visibility flags.\n */\nexport function visibleDateRangeForCalendarState(calendarState: CalendarState): CalendarViewDateRange {\n const { navigationRangeLimit, type, date } = calendarState;\n\n let start: Date;\n let end: Date;\n let distance: number;\n\n switch (type) {\n case CalendarDisplayType.MONTH:\n start = startOfDay(startOfWeek(startOfMonth(date), { weekStartsOn: 0 }));\n end = endOfWeek(endOfMonth(date));\n distance = differenceInDays(end, start) + 1;\n break;\n case CalendarDisplayType.WEEK:\n start = startOfWeek(date);\n end = endOfWeek(start);\n distance = 7; // 7 days in a week.\n break;\n case CalendarDisplayType.DAY:\n start = startOfDay(date);\n end = endOfDay(date);\n distance = 1;\n break;\n }\n\n const isMinDateVisible: boolean = navigationRangeLimit?.start != null && !isAfter(start, navigationRangeLimit.start);\n const isMaxDateVisible: boolean = navigationRangeLimit?.end != null && !isBefore(end, navigationRangeLimit.end);\n\n // TODO: Consider changing min/max date visible logical utility to be fully within the current month or not,\n // not just visible, since it can change to a locked out calendar and doesn't feel as UI friendly.\n\n return {\n type,\n start,\n end,\n distance,\n isMinDateVisible,\n isMaxDateVisible\n };\n}\n\nconst distinctUntilDateOrTypeOrEventsChanged = distinctUntilChanged<CalendarState>((a, b) => a?.date === b?.date && a?.type === b?.type && a?.events === b?.events);\n\n@Injectable()\nexport class DbxCalendarStore<T = any> extends ComponentStore<CalendarState<T>> {\n constructor() {\n super({\n type: CalendarDisplayType.MONTH,\n showTodayButton: true,\n date: new Date(),\n dateTappedTwice: false,\n events: []\n });\n }\n\n // MARK: Effects\n readonly tapFirstPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.minNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n readonly tapNext = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ end, isMaxDateVisible }) => {\n if (!isMaxDateVisible) {\n this.tapDay(addDays(end, 1));\n }\n })\n )\n )\n );\n });\n\n readonly tapPrevious = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ start, isMinDateVisible }) => {\n if (!isMinDateVisible) {\n this.tapDay(addDays(start, -1));\n }\n })\n )\n )\n );\n });\n\n readonly tapLastPage = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.maxNavigationDate$.pipe(\n first(),\n tap((x) => {\n if (x) {\n this.tapDay(x);\n }\n })\n )\n )\n );\n });\n\n // MARK: Accessors\n\n readonly showTodayButton$ = this.state$.pipe(\n map((x) => x.showTodayButton),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly date$ = this.state$.pipe(map((x) => x.date));\n readonly dateTappedTwice$ = this.state$.pipe(map((x) => x.dateTappedTwice));\n\n readonly events$ = this.state$.pipe(\n map((x) => x.events),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * Returns the events that match the tapped date range state.\n */\n readonly eventsForDateState$ = this.state$.pipe(\n distinctUntilDateOrTypeOrEventsChanged,\n map((state) => ({\n date: state.date,\n events: state.events.filter((x) => isSameDay(x.start, state.date) || (x.end && isBefore(x.start, state.date) && isAfter(x.end, state.date))),\n dateTappedTwice: state.dateTappedTwice\n })),\n shareReplay(1)\n );\n\n readonly eventsForDate$ = this.eventsForDateState$.pipe(map((state) => state.events));\n\n readonly visibleDateRange$: Observable<CalendarViewDateRange> = this.state$.pipe(map(visibleDateRangeForCalendarState), distinctUntilChanged(isCalendarViewDateRangeEqual), shareReplay(1));\n\n readonly visibleEvents$ = combineLatest([this.events$, this.visibleDateRange$]).pipe(\n map(([events, dateRange]) => {\n const isEventInDateRange = dateRangeOverlapsDateRangeFunction(dateRange);\n return events.filter((x) => isEventInDateRange(x));\n }),\n shareReplay(1)\n );\n\n readonly isLookingAtToday$ = this.visibleDateRange$.pipe(\n map((x) => isDateInDateRange(new Date(), x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMinimumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMinDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isLookingAtMaximumDate$ = this.visibleDateRange$.pipe(\n map((x) => x.isMaxDateVisible),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly hasMultiplePages$ = combineLatest([this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(map(invertDecision(reduceBooleansWithAndFn(true))), distinctUntilChanged(), shareReplay(1));\n\n readonly displayType$ = this.state$.pipe(\n map((x) => x.type),\n distinctUntilChanged((a, b) => a === b),\n shareReplay(1)\n );\n\n readonly navigationRangeLimit$ = this.state$.pipe(\n map((x) => x.navigationRangeLimit),\n distinctUntilChanged(isSameDateRange),\n shareReplay(1)\n );\n\n readonly minNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.start),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly maxNavigationDate$: Observable<Maybe<Date>> = this.navigationRangeLimit$.pipe(\n map((x) => x?.end),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly isTodayInNavigationRangeLimit$ = this.navigationRangeLimit$.pipe(\n map((x) => isDateInDateRange(new Date(), x ?? {})),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canJumpToToday$ = combineLatest([this.isLookingAtToday$, this.isTodayInNavigationRangeLimit$]).pipe(\n map(([isLookingAtToday, isTodayInNavigationRangeLimit]) => !isLookingAtToday && isTodayInNavigationRangeLimit),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly canShowPageButtons$ = this.state$.pipe(\n map((x) => x.showPageButtons && x.navigationRangeLimit && isFullDateRange(x.navigationRangeLimit)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showPageButtons$ = combineLatest([this.canShowPageButtons$, this.isLookingAtMinimumDate$, this.isLookingAtMaximumDate$]).pipe(\n map(([canShowPageButtons, isLookingAtMinimumDate, isLookingAtMaximumDate]) => {\n return canShowPageButtons && !(isLookingAtMinimumDate && isLookingAtMaximumDate);\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n // MARK: State Changes\n /**\n * Tap a day.\n *\n * - If the same day is presented, dateTappedTwice is flipped.\n */\n readonly tapDay = this.updater((state, date: Date) => updateCalendarStateWithTappedDate(state, date));\n\n /**\n * Set all events on the calendar.\n */\n readonly setEvents = this.updater((state, events: CalendarEvent<T>[]) => ({ ...state, events }));\n\n /**\n * Set all events on the calendar.\n */\n readonly setDisplayType = this.updater((state, type: CalendarDisplayType) => ({ ...state, type }));\n\n /**\n * Sets the navigation limit.\n */\n readonly setNavigationRangeLimit = this.updater((state, navigationRangeLimit: Maybe<Partial<DateRange>>) => updateCalendarStateWithNavigationRangeLimit(state, navigationRangeLimit));\n\n readonly setShowTodayButton = this.updater((state, showTodayButton: Maybe<boolean>) => ({ ...state, showTodayButton: showTodayButton ?? true }));\n readonly setShowPageButtons = this.updater((state, showPageButtons: Maybe<boolean>) => ({ ...state, showPageButtons: showPageButtons ?? false }));\n}\n\n/**\n * Returns an updated calendar state after tapping a date. Only updates if the date differs from the current one\n * and falls within the navigation range limit. Toggles `dateTappedTwice` when the same day is tapped again.\n *\n * @param state - The current calendar state.\n * @param date - The date that was tapped.\n * @returns The updated calendar state reflecting the tapped date.\n */\nexport function updateCalendarStateWithTappedDate(state: CalendarState, date: Date) {\n // only update the date if it is different\n if (\n !isSameDateDay(state.date, date) && // Only update the date if it is within the date range\n (!state.navigationRangeLimit || isDateInDateRange(date, state.navigationRangeLimit))\n ) {\n state = { ...state, date, dateTappedTwice: isSameDay(date, state.date) ? !state.dateTappedTwice : false };\n }\n\n return state;\n}\n\n/**\n * Returns an updated calendar state with a new navigation range limit. If the current date falls outside\n * the new range, it is clamped to fit within the limit.\n *\n * @param state - The current calendar state.\n * @param navigationRangeLimit - The new navigation date range limit, or undefined/null to remove the limit.\n * @returns The updated calendar state with the applied navigation range limit.\n */\nexport function updateCalendarStateWithNavigationRangeLimit(state: CalendarState, navigationRangeLimit: Maybe<Partial<DateRange>>) {\n const { date } = state;\n let result: CalendarState;\n\n // cap the date if it doesn't fall within the range.\n if (navigationRangeLimit && !isDateInDateRange(date, navigationRangeLimit)) {\n const clampedDate = clampDateToDateRange(date, navigationRangeLimit);\n result = { ...state, date: clampedDate, navigationRangeLimit };\n } else {\n result = { ...state, navigationRangeLimit };\n }\n\n return result;\n}\n","import { formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';\nimport { type CalendarEvent } from 'angular-calendar';\n\nexport interface DbxCalendarEvent<T> {\n event: CalendarEvent<T>;\n action?: string;\n}\n\nfunction timeSubtitleForEvent(event: CalendarEvent): string {\n let subtitle;\n\n if (event.allDay) {\n subtitle = `(All Day)`;\n } else {\n subtitle = formatToTimeAndDurationString(event.start, event.end ?? new Date());\n }\n\n return subtitle;\n}\n\n/**\n * Appends time/duration subtitles to each calendar event's title and sorts the events by start date in ascending order.\n *\n * @param events - The calendar events to prepare and sort.\n * @returns A new array of calendar events with updated titles, sorted by start date.\n */\nexport function prepareAndSortCalendarEvents(events: CalendarEvent[]): CalendarEvent[] {\n return events\n .map((event: CalendarEvent) => {\n const subtitle = timeSubtitleForEvent(event);\n let title;\n\n if (event.allDay) {\n title = event.title + ' ' + subtitle;\n } else {\n title = `${event.title} - ${subtitle}`;\n }\n\n return {\n ...event,\n title\n };\n })\n .sort(sortDateRangeStartAscendingCompareFunction);\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { DbxCalendarStore } from './calendar.store';\nimport { map, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { FlexLayoutModule } from '@ngbracket/ngx-layout';\nimport { MatButtonModule } from '@angular/material/button';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CalendarDatePipe } from 'angular-calendar';\n\n@Component({\n selector: 'dbx-calendar-base',\n standalone: true,\n imports: [MatButtonModule, MatButtonToggleModule, DbxButtonSpacerDirective, MatIconModule, CalendarDatePipe, FlexLayoutModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './calendar.base.component.html'\n})\nexport class DbxCalendarBaseComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly showTodayButton$ = this.calendarStore.showTodayButton$;\n readonly canJumpToToday$ = this.calendarStore.canJumpToToday$;\n\n readonly isLookingAtMinimumDate$ = this.calendarStore.isLookingAtMinimumDate$;\n readonly isLookingAtMaximumDate$ = this.calendarStore.isLookingAtMaximumDate$;\n readonly hasMultiplePages$ = this.calendarStore.hasMultiplePages$;\n\n readonly showPageButtons$ = this.calendarStore.showPageButtons$;\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;\n })\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly showTodayButtonSignal = toSignal(this.showTodayButton$);\n readonly canJumpToTodaySignal = toSignal(this.canJumpToToday$);\n readonly isLookingAtMinimumDateSignal = toSignal(this.isLookingAtMinimumDate$, { initialValue: false });\n readonly isLookingAtMaximumDateSignal = toSignal(this.isLookingAtMaximumDate$, { initialValue: false });\n readonly hasMultiplePagesSignal = toSignal(this.hasMultiplePages$, { initialValue: false });\n readonly showPageButtonsSignal = toSignal(this.showPageButtons$);\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$);\n readonly displayTypeSignal = toSignal(this.displayType$);\n\n todayClicked(): void {\n this.calendarStore.tapDay(new Date());\n }\n\n firstPageButtonClicked(): void {\n this.calendarStore.tapFirstPage();\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n lastPageButtonClicked(): void {\n this.calendarStore.tapLastPage();\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ viewDateSignal() | calendarDate: displayTypeSignal() + 'ViewTitle' : 'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\" fxLayout.xs=\"column\" ngClass.xs=\"dbx-calendar-controls-compact\">\n <span class=\"dbx-calendar-controls-left dbx-flex\" fxFlex=\"nogrow\">\n @if (showTodayButtonSignal()) {\n <button mat-stroked-button [disabled]=\"!canJumpToTodaySignal()\" (click)=\"todayClicked()\">Today</button>\n }\n <dbx-button-spacer></dbx-button-spacer>\n @if (hasMultiplePagesSignal()) {\n <div class=\"d-iblock\">\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" aria-label=\"first page button\" (click)=\"firstPageButtonClicked()\">\n <mat-icon>first_page</mat-icon>\n </button>\n }\n <button mat-icon-button [disabled]=\"isLookingAtMinimumDateSignal()\" [attr.aria-label]=\"'Previous ' + displayTypeSignal() + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" [attr.aria-label]=\"'Next ' + displayTypeSignal() + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n @if (showPageButtonsSignal()) {\n <button mat-icon-button [disabled]=\"isLookingAtMaximumDateSignal()\" aria-label=\"last page button\" (click)=\"lastPageButtonClicked()\">\n <mat-icon>last_page</mat-icon>\n </button>\n }\n </div>\n }\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n","import { Component, inject, output, ChangeDetectionStrategy, computed } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { type CalendarEvent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent } from 'angular-calendar';\nimport { DbxCalendarStore } from './calendar.store';\nimport { distinctUntilChanged, map, shareReplay, withLatestFrom } from 'rxjs';\nimport { type MatButtonToggleChange, MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { type DbxCalendarEvent, prepareAndSortCalendarEvents } from './calendar';\nimport { DbxCalendarBaseComponent } from './calendar.base.component';\nimport { NgClass } from '@angular/common';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n@Component({\n selector: 'dbx-calendar',\n templateUrl: './calendar.component.html',\n imports: [DbxCalendarBaseComponent, CalendarMonthViewComponent, CalendarDayViewComponent, CalendarWeekViewComponent, MatButtonToggleModule, NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxCalendarComponent<T> {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n\n readonly clickEvent = output<DbxCalendarEvent<T>>();\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n return x.events.length && isSameMonth(x.date, date) ? !x.dateTappedTwice : false;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n readonly eventsSignal = toSignal(this.events$, { initialValue: [] });\n readonly activeDayIsOpenSignal = toSignal(this.activeDayIsOpen$, { initialValue: true });\n readonly displayTypeSignal = toSignal(this.displayType$);\n readonly displayTypeClassSignal = computed(() => `dbx-calendar-content-${this.displayTypeSignal()}`);\n\n todayClicked(): void {\n this.dayClicked({ date: new Date() });\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n dayClicked({ date }: { date: Date }): void {\n this.calendarStore.tapDay(date);\n }\n\n eventClicked(action: string, event: CalendarEvent<T>): void {\n this.clickEvent.emit({ action, event });\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"displayTypeSignal()\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"displayTypeClassSignal()\">\n @switch (displayTypeSignal()) {\n @case ('month') {\n <mwl-calendar-month-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" [activeDayIsOpen]=\"activeDayIsOpenSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n }\n @case ('week') {\n <mwl-calendar-week-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-week-view>\n }\n @case ('day') {\n <mwl-calendar-day-view [viewDate]=\"viewDateSignal()\" [events]=\"eventsSignal()\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-day-view>\n }\n }\n </div>\n</dbx-calendar-base>\n","import { type Provider } from '@angular/core';\nimport { DateAdapter, provideCalendar } from 'angular-calendar';\nimport { adapterFactory as dateAdapterFactory } from 'angular-calendar/date-adapters/date-fns';\n\n/**\n * Provides default configuration for the DbxCalendarModule.\n *\n * @returns Providers that register the calendar with a date-fns date adapter.\n */\nexport function provideDbxCalendar(): Provider[] {\n return provideCalendar({ provide: DateAdapter, useFactory: dateAdapterFactory });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dateAdapterFactory"],"mappings":";;;;;;;;;;;;;;;;;;;;;;IAQY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AA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