@memberjunction/ng-ui-components 0.0.1 → 5.24.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.
Files changed (69) hide show
  1. package/dist/lib/accordion/accordion.component.d.ts +58 -0
  2. package/dist/lib/accordion/accordion.component.d.ts.map +1 -0
  3. package/dist/lib/accordion/accordion.component.js +163 -0
  4. package/dist/lib/accordion/accordion.component.js.map +1 -0
  5. package/dist/lib/accordion/accordion.scss +45 -0
  6. package/dist/lib/button/button.directive.d.ts +45 -0
  7. package/dist/lib/button/button.directive.d.ts.map +1 -0
  8. package/dist/lib/button/button.directive.js +114 -0
  9. package/dist/lib/button/button.directive.js.map +1 -0
  10. package/dist/lib/button/button.scss +250 -0
  11. package/dist/lib/calendar/calendar-utils.d.ts +16 -0
  12. package/dist/lib/calendar/calendar-utils.d.ts.map +1 -0
  13. package/dist/lib/calendar/calendar-utils.js +41 -0
  14. package/dist/lib/calendar/calendar-utils.js.map +1 -0
  15. package/dist/lib/combobox/combobox.component.d.ts +83 -0
  16. package/dist/lib/combobox/combobox.component.d.ts.map +1 -0
  17. package/dist/lib/combobox/combobox.component.js +483 -0
  18. package/dist/lib/combobox/combobox.component.js.map +1 -0
  19. package/dist/lib/combobox/combobox.scss +86 -0
  20. package/dist/lib/datepicker/datepicker.component.d.ts +50 -0
  21. package/dist/lib/datepicker/datepicker.component.d.ts.map +1 -0
  22. package/dist/lib/datepicker/datepicker.component.js +279 -0
  23. package/dist/lib/datepicker/datepicker.component.js.map +1 -0
  24. package/dist/lib/datepicker/datepicker.scss +60 -0
  25. package/dist/lib/dialog/dialog.component.d.ts +84 -0
  26. package/dist/lib/dialog/dialog.component.d.ts.map +1 -0
  27. package/dist/lib/dialog/dialog.component.js +285 -0
  28. package/dist/lib/dialog/dialog.component.js.map +1 -0
  29. package/dist/lib/dialog/dialog.scss +134 -0
  30. package/dist/lib/dialog/dialog.service.d.ts +114 -0
  31. package/dist/lib/dialog/dialog.service.d.ts.map +1 -0
  32. package/dist/lib/dialog/dialog.service.js +282 -0
  33. package/dist/lib/dialog/dialog.service.js.map +1 -0
  34. package/dist/lib/dropdown/dropdown.component.d.ts +75 -0
  35. package/dist/lib/dropdown/dropdown.component.d.ts.map +1 -0
  36. package/dist/lib/dropdown/dropdown.component.js +445 -0
  37. package/dist/lib/dropdown/dropdown.component.js.map +1 -0
  38. package/dist/lib/dropdown/dropdown.scss +68 -0
  39. package/dist/lib/input/chip.scss +64 -0
  40. package/dist/lib/input/input-switch-progress.scss +57 -0
  41. package/dist/lib/input/input.scss +77 -0
  42. package/dist/lib/numeric-input/numeric-input.component.d.ts +31 -0
  43. package/dist/lib/numeric-input/numeric-input.component.d.ts.map +1 -0
  44. package/dist/lib/numeric-input/numeric-input.component.js +103 -0
  45. package/dist/lib/numeric-input/numeric-input.component.js.map +1 -0
  46. package/dist/lib/progress-bar/progress-bar.component.d.ts +14 -0
  47. package/dist/lib/progress-bar/progress-bar.component.d.ts.map +1 -0
  48. package/dist/lib/progress-bar/progress-bar.component.js +62 -0
  49. package/dist/lib/progress-bar/progress-bar.component.js.map +1 -0
  50. package/dist/lib/splitter/splitter.component.d.ts +23 -0
  51. package/dist/lib/splitter/splitter.component.d.ts.map +1 -0
  52. package/dist/lib/splitter/splitter.component.js +24 -0
  53. package/dist/lib/splitter/splitter.component.js.map +1 -0
  54. package/dist/lib/splitter/splitter.scss +29 -0
  55. package/dist/lib/switch/switch.component.d.ts +24 -0
  56. package/dist/lib/switch/switch.component.d.ts.map +1 -0
  57. package/dist/lib/switch/switch.component.js +82 -0
  58. package/dist/lib/switch/switch.component.js.map +1 -0
  59. package/dist/lib/window/window.component.d.ts +115 -0
  60. package/dist/lib/window/window.component.d.ts.map +1 -0
  61. package/dist/lib/window/window.component.js +502 -0
  62. package/dist/lib/window/window.component.js.map +1 -0
  63. package/dist/lib/window/window.scss +97 -0
  64. package/dist/public-api.d.ts +14 -0
  65. package/dist/public-api.d.ts.map +1 -0
  66. package/dist/public-api.js +16 -0
  67. package/dist/public-api.js.map +1 -0
  68. package/package.json +39 -6
  69. package/README.md +0 -45
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datepicker.component.d.ts","sourceRoot":"","sources":["../../../src/lib/datepicker/datepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAkD,SAAS,EAA6B,MAAM,eAAe,CAAC;AAC7J,OAAO,EAAqB,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAgE,MAAM,4BAA4B,CAAC;;AAEvH;;GAEG;AACH,qBAkDa,qBAAsB,YAAW,oBAAoB,EAAE,SAAS;IAClE,GAAG,EAAE,IAAI,GAAG,IAAI,CAAQ;IACxB,GAAG,EAAE,IAAI,GAAG,IAAI,CAAQ;IACxB,MAAM,SAAgB;IACtB,WAAW,SAAM;IACjB,QAAQ,UAAS;IAChB,WAAW,4BAAmC;IAClC,OAAO,CAAC,SAAS,CAA2B;IACzB,QAAQ,CAAC,SAAS,QAAQ;IACnE,OAAO,CAAC,GAAG,CAA6B;IAExC,MAAM,UAAS;IAAC,UAAU,UAAS;IAAC,YAAY,SAAM;IACtD,KAAK,EAAE,WAAW,EAAE,EAAE,CAAM;IAAC,QAAQ,WAAa;IAClD,SAAS,EAAE,iBAAiB,EAAE,CAG5B;IACF,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,QAAQ,CAA0C;IAC1D,OAAO,CAAC,SAAS,CAAwB;IAEzC,IAAI,cAAc,IAAI,MAAM,CAA6C;IAEzE,MAAM,IAAI,IAAI;IACd,IAAI,IAAI,IAAI;IAKZ,KAAK,IAAI,IAAI;IACb,aAAa,IAAI,IAAI;IACrB,SAAS,IAAI,IAAI;IAEjB,UAAU,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI;IAKlC,WAAW,IAAI,IAAI;IAKnB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO;IAIxC,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO;IAKvC,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAKjC,MAAM,IAAI,IAAI;IACd,SAAS,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAIrC,UAAU,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI;IAI7C,gBAAgB,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI;IACxD,iBAAiB,CAAC,EAAE,EAAE,MAAM,IAAI,GAAG,IAAI;IACvC,gBAAgB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAC3C,WAAW,IAAI,IAAI;yCAtER,qBAAqB;2CAArB,qBAAqB;CAuEjC"}
@@ -0,0 +1,279 @@
1
+ import { Component, Input, Output, EventEmitter, forwardRef, HostBinding, ViewChild, inject, ChangeDetectorRef } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { OverlayModule } from '@angular/cdk/overlay';
4
+ import { WEEK_DAYS, BuildCalendarWeeks, FormatDate, GetMonthYearLabel } from '../calendar/calendar-utils';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@angular/cdk/overlay";
7
+ const _c0 = ["trigger"];
8
+ const _forTrack0 = ($index, $item) => $item.date.getTime();
9
+ function MJDatepickerComponent_ng_template_7_For_10_Template(rf, ctx) { if (rf & 1) {
10
+ i0.ɵɵelementStart(0, "span", 15);
11
+ i0.ɵɵtext(1);
12
+ i0.ɵɵelementEnd();
13
+ } if (rf & 2) {
14
+ const day_r4 = ctx.$implicit;
15
+ i0.ɵɵadvance();
16
+ i0.ɵɵtextInterpolate(day_r4);
17
+ } }
18
+ function MJDatepickerComponent_ng_template_7_For_12_For_2_Template(rf, ctx) { if (rf & 1) {
19
+ const _r5 = i0.ɵɵgetCurrentView();
20
+ i0.ɵɵelementStart(0, "button", 20);
21
+ i0.ɵɵlistener("click", function MJDatepickerComponent_ng_template_7_For_12_For_2_Template_button_click_0_listener() { const day_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r2 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r2.SelectDate(day_r6)); });
22
+ i0.ɵɵtext(1);
23
+ i0.ɵɵelementEnd();
24
+ } if (rf & 2) {
25
+ const day_r6 = ctx.$implicit;
26
+ const ctx_r2 = i0.ɵɵnextContext(3);
27
+ i0.ɵɵclassProp("mj-calendar-day--selected", ctx_r2.IsSelectedDay(day_r6))("mj-calendar-day--today", day_r6.isToday)("mj-calendar-day--other-month", !day_r6.isCurrentMonth);
28
+ i0.ɵɵproperty("disabled", ctx_r2.IsOutOfRange(day_r6));
29
+ i0.ɵɵattribute("aria-selected", ctx_r2.IsSelectedDay(day_r6));
30
+ i0.ɵɵadvance();
31
+ i0.ɵɵtextInterpolate(day_r6.dayNumber);
32
+ } }
33
+ function MJDatepickerComponent_ng_template_7_For_12_Template(rf, ctx) { if (rf & 1) {
34
+ i0.ɵɵelementStart(0, "div", 16);
35
+ i0.ɵɵrepeaterCreate(1, MJDatepickerComponent_ng_template_7_For_12_For_2_Template, 2, 9, "button", 19, _forTrack0);
36
+ i0.ɵɵelementEnd();
37
+ } if (rf & 2) {
38
+ const week_r7 = ctx.$implicit;
39
+ i0.ɵɵadvance();
40
+ i0.ɵɵrepeater(week_r7);
41
+ } }
42
+ function MJDatepickerComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
43
+ const _r2 = i0.ɵɵgetCurrentView();
44
+ i0.ɵɵelementStart(0, "div", 7)(1, "div", 8)(2, "button", 9);
45
+ i0.ɵɵlistener("click", function MJDatepickerComponent_ng_template_7_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.PreviousMonth()); });
46
+ i0.ɵɵelement(3, "i", 10);
47
+ i0.ɵɵelementEnd();
48
+ i0.ɵɵelementStart(4, "span", 11);
49
+ i0.ɵɵtext(5);
50
+ i0.ɵɵelementEnd();
51
+ i0.ɵɵelementStart(6, "button", 12);
52
+ i0.ɵɵlistener("click", function MJDatepickerComponent_ng_template_7_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.NextMonth()); });
53
+ i0.ɵɵelement(7, "i", 13);
54
+ i0.ɵɵelementEnd()();
55
+ i0.ɵɵelementStart(8, "div", 14);
56
+ i0.ɵɵrepeaterCreate(9, MJDatepickerComponent_ng_template_7_For_10_Template, 2, 1, "span", 15, i0.ɵɵrepeaterTrackByIdentity);
57
+ i0.ɵɵelementEnd();
58
+ i0.ɵɵrepeaterCreate(11, MJDatepickerComponent_ng_template_7_For_12_Template, 3, 0, "div", 16, i0.ɵɵrepeaterTrackByIndex);
59
+ i0.ɵɵelementStart(13, "div", 17)(14, "button", 18);
60
+ i0.ɵɵlistener("click", function MJDatepickerComponent_ng_template_7_Template_button_click_14_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SelectToday()); });
61
+ i0.ɵɵtext(15, "Today");
62
+ i0.ɵɵelementEnd()()();
63
+ } if (rf & 2) {
64
+ const ctx_r2 = i0.ɵɵnextContext();
65
+ i0.ɵɵadvance(5);
66
+ i0.ɵɵtextInterpolate(ctx_r2.MonthYearLabel);
67
+ i0.ɵɵadvance(4);
68
+ i0.ɵɵrepeater(ctx_r2.WeekDays);
69
+ i0.ɵɵadvance(2);
70
+ i0.ɵɵrepeater(ctx_r2.Weeks);
71
+ } }
72
+ /**
73
+ * mj-datepicker — Date picker with calendar popup. Replaces `<kendo-datepicker>`.
74
+ */
75
+ export class MJDatepickerComponent {
76
+ Min = null;
77
+ Max = null;
78
+ Format = 'MM/dd/yyyy';
79
+ Placeholder = '';
80
+ Disabled = false;
81
+ ValueChange = new EventEmitter();
82
+ triggerEl;
83
+ hostClass = true;
84
+ cdr = inject(ChangeDetectorRef);
85
+ IsOpen = false;
86
+ IsDisabled = false;
87
+ DisplayValue = '';
88
+ Weeks = [];
89
+ WeekDays = WEEK_DAYS;
90
+ Positions = [
91
+ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },
92
+ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }
93
+ ];
94
+ viewDate = new Date();
95
+ selectedDate = null;
96
+ onChange = () => { };
97
+ onTouched = () => { };
98
+ get MonthYearLabel() { return GetMonthYearLabel(this.viewDate); }
99
+ Toggle() { if (this.IsDisabled)
100
+ return; this.IsOpen ? this.Close() : this.Open(); }
101
+ Open() {
102
+ if (this.IsDisabled || this.IsOpen)
103
+ return;
104
+ this.viewDate = this.selectedDate ? new Date(this.selectedDate) : new Date();
105
+ this.Weeks = BuildCalendarWeeks(this.viewDate);
106
+ this.IsOpen = true;
107
+ this.cdr.detectChanges();
108
+ }
109
+ Close() { if (!this.IsOpen)
110
+ return; this.IsOpen = false; this.cdr.detectChanges(); }
111
+ PreviousMonth() { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() - 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }
112
+ NextMonth() { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() + 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }
113
+ SelectDate(day) {
114
+ if (this.IsOutOfRange(day))
115
+ return;
116
+ this.selectedDate = day.date;
117
+ this.DisplayValue = FormatDate(day.date);
118
+ this.onChange(day.date);
119
+ this.ValueChange.emit(day.date);
120
+ this.Close();
121
+ }
122
+ SelectToday() {
123
+ const today = new Date();
124
+ today.setHours(0, 0, 0, 0);
125
+ this.selectedDate = today;
126
+ this.DisplayValue = FormatDate(today);
127
+ this.onChange(today);
128
+ this.ValueChange.emit(today);
129
+ this.Close();
130
+ }
131
+ IsSelectedDay(day) {
132
+ if (!this.selectedDate)
133
+ return false;
134
+ return day.date.getFullYear() === this.selectedDate.getFullYear() && day.date.getMonth() === this.selectedDate.getMonth() && day.date.getDate() === this.selectedDate.getDate();
135
+ }
136
+ IsOutOfRange(day) {
137
+ if (this.Min && day.date < this.Min)
138
+ return true;
139
+ if (this.Max && day.date > this.Max)
140
+ return true;
141
+ return false;
142
+ }
143
+ OnInputChange(event) {
144
+ const value = event.target.value;
145
+ this.DisplayValue = value;
146
+ const parsed = new Date(value);
147
+ if (!isNaN(parsed.getTime())) {
148
+ this.selectedDate = parsed;
149
+ this.onChange(parsed);
150
+ this.ValueChange.emit(parsed);
151
+ }
152
+ }
153
+ OnBlur() { this.onTouched(); }
154
+ OnKeyDown(event) {
155
+ if (event.key === 'Escape')
156
+ this.Close();
157
+ else if (event.key === 'Enter' && !this.IsOpen)
158
+ this.Open();
159
+ }
160
+ writeValue(value) {
161
+ if (value == null) {
162
+ this.selectedDate = null;
163
+ this.DisplayValue = '';
164
+ }
165
+ else {
166
+ const d = typeof value === 'string' ? new Date(value) : value;
167
+ if (!isNaN(d.getTime())) {
168
+ this.selectedDate = d;
169
+ this.DisplayValue = FormatDate(d);
170
+ }
171
+ }
172
+ }
173
+ registerOnChange(fn) { this.onChange = fn; }
174
+ registerOnTouched(fn) { this.onTouched = fn; }
175
+ setDisabledState(isDisabled) { this.IsDisabled = isDisabled || this.Disabled; }
176
+ ngOnDestroy() { this.Close(); }
177
+ static ɵfac = function MJDatepickerComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJDatepickerComponent)(); };
178
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJDatepickerComponent, selectors: [["mj-datepicker"]], viewQuery: function MJDatepickerComponent_Query(rf, ctx) { if (rf & 1) {
179
+ i0.ɵɵviewQuery(_c0, 5);
180
+ } if (rf & 2) {
181
+ let _t;
182
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.triggerEl = _t.first);
183
+ } }, hostVars: 2, hostBindings: function MJDatepickerComponent_HostBindings(rf, ctx) { if (rf & 2) {
184
+ i0.ɵɵclassProp("mj-datepicker-host", ctx.hostClass);
185
+ } }, inputs: { Min: "Min", Max: "Max", Format: "Format", Placeholder: "Placeholder", Disabled: "Disabled" }, outputs: { ValueChange: "ValueChange" }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJDatepickerComponent), multi: true }])], decls: 8, vars: 10, consts: [["trigger", "", "overlayOrigin", "cdkOverlayOrigin"], ["dateInput", ""], ["cdkOverlayOrigin", "", 1, "mj-datepicker"], ["type", "text", 1, "mj-input", "mj-datepicker-input", 3, "input", "blur", "keydown", "placeholder", "disabled", "value"], ["type", "button", "tabindex", "-1", "aria-label", "Open calendar", 1, "mj-datepicker-toggle", 3, "click", "disabled"], [1, "fa-solid", "fa-calendar"], ["cdkConnectedOverlay", "", "cdkConnectedOverlayBackdropClass", "mj-dropdown-backdrop", 3, "backdropClick", "detach", "cdkConnectedOverlayOrigin", "cdkConnectedOverlayOpen", "cdkConnectedOverlayPositions", "cdkConnectedOverlayHasBackdrop"], ["role", "grid", "aria-label", "Calendar", 1, "mj-calendar"], [1, "mj-calendar-header"], ["type", "button", "aria-label", "Previous month", 1, "mj-calendar-nav", 3, "click"], [1, "fa-solid", "fa-chevron-left"], [1, "mj-calendar-title"], ["type", "button", "aria-label", "Next month", 1, "mj-calendar-nav", 3, "click"], [1, "fa-solid", "fa-chevron-right"], ["role", "row", 1, "mj-calendar-weekdays"], ["role", "columnheader", 1, "mj-calendar-weekday"], ["role", "row", 1, "mj-calendar-row"], [1, "mj-calendar-footer"], ["type", "button", 1, "mj-calendar-today", 3, "click"], ["type", "button", "role", "gridcell", 1, "mj-calendar-day", 3, "mj-calendar-day--selected", "mj-calendar-day--today", "mj-calendar-day--other-month", "disabled"], ["type", "button", "role", "gridcell", 1, "mj-calendar-day", 3, "click", "disabled"]], template: function MJDatepickerComponent_Template(rf, ctx) { if (rf & 1) {
186
+ const _r1 = i0.ɵɵgetCurrentView();
187
+ i0.ɵɵelementStart(0, "div", 2, 0)(3, "input", 3, 1);
188
+ i0.ɵɵlistener("input", function MJDatepickerComponent_Template_input_input_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnInputChange($event)); })("blur", function MJDatepickerComponent_Template_input_blur_3_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnBlur()); })("keydown", function MJDatepickerComponent_Template_input_keydown_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.OnKeyDown($event)); });
189
+ i0.ɵɵelementEnd();
190
+ i0.ɵɵelementStart(5, "button", 4);
191
+ i0.ɵɵlistener("click", function MJDatepickerComponent_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.Toggle()); });
192
+ i0.ɵɵelement(6, "i", 5);
193
+ i0.ɵɵelementEnd()();
194
+ i0.ɵɵtemplate(7, MJDatepickerComponent_ng_template_7_Template, 16, 1, "ng-template", 6);
195
+ i0.ɵɵlistener("backdropClick", function MJDatepickerComponent_Template_ng_template_backdropClick_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.Close()); })("detach", function MJDatepickerComponent_Template_ng_template_detach_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.Close()); });
196
+ } if (rf & 2) {
197
+ const overlayOrigin_r8 = i0.ɵɵreference(2);
198
+ i0.ɵɵclassProp("mj-datepicker--disabled", ctx.IsDisabled);
199
+ i0.ɵɵadvance(3);
200
+ i0.ɵɵproperty("placeholder", ctx.Placeholder)("disabled", ctx.IsDisabled)("value", ctx.DisplayValue);
201
+ i0.ɵɵadvance(2);
202
+ i0.ɵɵproperty("disabled", ctx.IsDisabled);
203
+ i0.ɵɵadvance(2);
204
+ i0.ɵɵproperty("cdkConnectedOverlayOrigin", overlayOrigin_r8)("cdkConnectedOverlayOpen", ctx.IsOpen)("cdkConnectedOverlayPositions", ctx.Positions)("cdkConnectedOverlayHasBackdrop", true);
205
+ } }, dependencies: [OverlayModule, i1.CdkConnectedOverlay, i1.CdkOverlayOrigin], encapsulation: 2 });
206
+ }
207
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJDatepickerComponent, [{
208
+ type: Component,
209
+ args: [{
210
+ selector: 'mj-datepicker',
211
+ standalone: true,
212
+ imports: [OverlayModule],
213
+ template: `
214
+ <div class="mj-datepicker" #trigger cdkOverlayOrigin #overlayOrigin="cdkOverlayOrigin"
215
+ [class.mj-datepicker--disabled]="IsDisabled">
216
+ <input #dateInput class="mj-input mj-datepicker-input" type="text"
217
+ [placeholder]="Placeholder" [disabled]="IsDisabled" [value]="DisplayValue"
218
+ (input)="OnInputChange($event)" (blur)="OnBlur()" (keydown)="OnKeyDown($event)" />
219
+ <button type="button" class="mj-datepicker-toggle" tabindex="-1" [disabled]="IsDisabled"
220
+ (click)="Toggle()" aria-label="Open calendar">
221
+ <i class="fa-solid fa-calendar"></i>
222
+ </button>
223
+ </div>
224
+ <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]="overlayOrigin"
225
+ [cdkConnectedOverlayOpen]="IsOpen" [cdkConnectedOverlayPositions]="Positions"
226
+ [cdkConnectedOverlayHasBackdrop]="true" cdkConnectedOverlayBackdropClass="mj-dropdown-backdrop"
227
+ (backdropClick)="Close()" (detach)="Close()">
228
+ <div class="mj-calendar" role="grid" aria-label="Calendar">
229
+ <div class="mj-calendar-header">
230
+ <button type="button" (click)="PreviousMonth()" aria-label="Previous month" class="mj-calendar-nav">
231
+ <i class="fa-solid fa-chevron-left"></i></button>
232
+ <span class="mj-calendar-title">{{ MonthYearLabel }}</span>
233
+ <button type="button" (click)="NextMonth()" aria-label="Next month" class="mj-calendar-nav">
234
+ <i class="fa-solid fa-chevron-right"></i></button>
235
+ </div>
236
+ <div class="mj-calendar-weekdays" role="row">
237
+ @for (day of WeekDays; track day) { <span class="mj-calendar-weekday" role="columnheader">{{ day }}</span> }
238
+ </div>
239
+ @for (week of Weeks; track $index) {
240
+ <div class="mj-calendar-row" role="row">
241
+ @for (day of week; track day.date.getTime()) {
242
+ <button type="button" class="mj-calendar-day" role="gridcell"
243
+ [class.mj-calendar-day--selected]="IsSelectedDay(day)"
244
+ [class.mj-calendar-day--today]="day.isToday"
245
+ [class.mj-calendar-day--other-month]="!day.isCurrentMonth"
246
+ [disabled]="IsOutOfRange(day)" [attr.aria-selected]="IsSelectedDay(day)"
247
+ (click)="SelectDate(day)">{{ day.dayNumber }}</button>
248
+ }
249
+ </div>
250
+ }
251
+ <div class="mj-calendar-footer">
252
+ <button type="button" class="mj-calendar-today" (click)="SelectToday()">Today</button>
253
+ </div>
254
+ </div>
255
+ </ng-template>
256
+ `,
257
+ providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJDatepickerComponent), multi: true }]
258
+ }]
259
+ }], null, { Min: [{
260
+ type: Input
261
+ }], Max: [{
262
+ type: Input
263
+ }], Format: [{
264
+ type: Input
265
+ }], Placeholder: [{
266
+ type: Input
267
+ }], Disabled: [{
268
+ type: Input
269
+ }], ValueChange: [{
270
+ type: Output
271
+ }], triggerEl: [{
272
+ type: ViewChild,
273
+ args: ['trigger']
274
+ }], hostClass: [{
275
+ type: HostBinding,
276
+ args: ['class.mj-datepicker-host']
277
+ }] }); })();
278
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJDatepickerComponent, { className: "MJDatepickerComponent", filePath: "lib/datepicker/datepicker.component.ts", lineNumber: 59 }); })();
279
+ //# sourceMappingURL=datepicker.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datepicker.component.js","sourceRoot":"","sources":["../../../src/lib/datepicker/datepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,M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,EAAE,IAAI,EAAE,CAAC;aAC/G;;kBAEE,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,MAAM;;kBACN,SAAS;mBAAC,SAAS;;kBACnB,WAAW;mBAAC,0BAA0B;;kFAR5B,qBAAqB","sourcesContent":["import { Component, Input, Output, EventEmitter, forwardRef, HostBinding, ElementRef, ViewChild, OnDestroy, inject, ChangeDetectorRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { OverlayModule, ConnectedPosition } from '@angular/cdk/overlay';\nimport { CalendarDay, WEEK_DAYS, BuildCalendarWeeks, FormatDate, GetMonthYearLabel } from '../calendar/calendar-utils';\n\n/**\n * mj-datepicker — Date picker with calendar popup. Replaces `<kendo-datepicker>`.\n */\n@Component({\n selector: 'mj-datepicker',\n standalone: true,\n imports: [OverlayModule],\n template: `\n <div class=\"mj-datepicker\" #trigger cdkOverlayOrigin #overlayOrigin=\"cdkOverlayOrigin\"\n [class.mj-datepicker--disabled]=\"IsDisabled\">\n <input #dateInput class=\"mj-input mj-datepicker-input\" type=\"text\"\n [placeholder]=\"Placeholder\" [disabled]=\"IsDisabled\" [value]=\"DisplayValue\"\n (input)=\"OnInputChange($event)\" (blur)=\"OnBlur()\" (keydown)=\"OnKeyDown($event)\" />\n <button type=\"button\" class=\"mj-datepicker-toggle\" tabindex=\"-1\" [disabled]=\"IsDisabled\"\n (click)=\"Toggle()\" aria-label=\"Open calendar\">\n <i class=\"fa-solid fa-calendar\"></i>\n </button>\n </div>\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"IsOpen\" [cdkConnectedOverlayPositions]=\"Positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\" cdkConnectedOverlayBackdropClass=\"mj-dropdown-backdrop\"\n (backdropClick)=\"Close()\" (detach)=\"Close()\">\n <div class=\"mj-calendar\" role=\"grid\" aria-label=\"Calendar\">\n <div class=\"mj-calendar-header\">\n <button type=\"button\" (click)=\"PreviousMonth()\" aria-label=\"Previous month\" class=\"mj-calendar-nav\">\n <i class=\"fa-solid fa-chevron-left\"></i></button>\n <span class=\"mj-calendar-title\">{{ MonthYearLabel }}</span>\n <button type=\"button\" (click)=\"NextMonth()\" aria-label=\"Next month\" class=\"mj-calendar-nav\">\n <i class=\"fa-solid fa-chevron-right\"></i></button>\n </div>\n <div class=\"mj-calendar-weekdays\" role=\"row\">\n @for (day of WeekDays; track day) { <span class=\"mj-calendar-weekday\" role=\"columnheader\">{{ day }}</span> }\n </div>\n @for (week of Weeks; track $index) {\n <div class=\"mj-calendar-row\" role=\"row\">\n @for (day of week; track day.date.getTime()) {\n <button type=\"button\" class=\"mj-calendar-day\" role=\"gridcell\"\n [class.mj-calendar-day--selected]=\"IsSelectedDay(day)\"\n [class.mj-calendar-day--today]=\"day.isToday\"\n [class.mj-calendar-day--other-month]=\"!day.isCurrentMonth\"\n [disabled]=\"IsOutOfRange(day)\" [attr.aria-selected]=\"IsSelectedDay(day)\"\n (click)=\"SelectDate(day)\">{{ day.dayNumber }}</button>\n }\n </div>\n }\n <div class=\"mj-calendar-footer\">\n <button type=\"button\" class=\"mj-calendar-today\" (click)=\"SelectToday()\">Today</button>\n </div>\n </div>\n </ng-template>\n `,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJDatepickerComponent), multi: true }]\n})\nexport class MJDatepickerComponent implements ControlValueAccessor, OnDestroy {\n @Input() Min: Date | null = null;\n @Input() Max: Date | null = null;\n @Input() Format = 'MM/dd/yyyy';\n @Input() Placeholder = '';\n @Input() Disabled = false;\n @Output() ValueChange = new EventEmitter<Date | null>();\n @ViewChild('trigger') private triggerEl!: ElementRef<HTMLElement>;\n @HostBinding('class.mj-datepicker-host') readonly hostClass = true;\n private cdr = inject(ChangeDetectorRef);\n\n IsOpen = false; IsDisabled = false; DisplayValue = '';\n Weeks: CalendarDay[][] = []; WeekDays = WEEK_DAYS;\n Positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ];\n private viewDate = new Date();\n private selectedDate: Date | null = null;\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n\n get MonthYearLabel(): string { return GetMonthYearLabel(this.viewDate); }\n\n Toggle(): void { if (this.IsDisabled) return; this.IsOpen ? this.Close() : this.Open(); }\n Open(): void {\n if (this.IsDisabled || this.IsOpen) return;\n this.viewDate = this.selectedDate ? new Date(this.selectedDate) : new Date();\n this.Weeks = BuildCalendarWeeks(this.viewDate); this.IsOpen = true; this.cdr.detectChanges();\n }\n Close(): void { if (!this.IsOpen) return; this.IsOpen = false; this.cdr.detectChanges(); }\n PreviousMonth(): void { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() - 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }\n NextMonth(): void { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() + 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }\n\n SelectDate(day: CalendarDay): void {\n if (this.IsOutOfRange(day)) return;\n this.selectedDate = day.date; this.DisplayValue = FormatDate(day.date);\n this.onChange(day.date); this.ValueChange.emit(day.date); this.Close();\n }\n SelectToday(): void {\n const today = new Date(); today.setHours(0, 0, 0, 0);\n this.selectedDate = today; this.DisplayValue = FormatDate(today);\n this.onChange(today); this.ValueChange.emit(today); this.Close();\n }\n IsSelectedDay(day: CalendarDay): boolean {\n if (!this.selectedDate) return false;\n return day.date.getFullYear() === this.selectedDate.getFullYear() && day.date.getMonth() === this.selectedDate.getMonth() && day.date.getDate() === this.selectedDate.getDate();\n }\n IsOutOfRange(day: CalendarDay): boolean {\n if (this.Min && day.date < this.Min) return true;\n if (this.Max && day.date > this.Max) return true;\n return false;\n }\n OnInputChange(event: Event): void {\n const value = (event.target as HTMLInputElement).value; this.DisplayValue = value;\n const parsed = new Date(value);\n if (!isNaN(parsed.getTime())) { this.selectedDate = parsed; this.onChange(parsed); this.ValueChange.emit(parsed); }\n }\n OnBlur(): void { this.onTouched(); }\n OnKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Escape') this.Close();\n else if (event.key === 'Enter' && !this.IsOpen) this.Open();\n }\n writeValue(value: Date | string | null): void {\n if (value == null) { this.selectedDate = null; this.DisplayValue = ''; }\n else { const d = typeof value === 'string' ? new Date(value) : value; if (!isNaN(d.getTime())) { this.selectedDate = d; this.DisplayValue = FormatDate(d); } }\n }\n registerOnChange(fn: (value: Date | null) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.IsDisabled = isDisabled || this.Disabled; }\n ngOnDestroy(): void { this.Close(); }\n}\n"]}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * MJ Datepicker / Calendar Styles
3
+ */
4
+
5
+ .mj-datepicker-host { display: inline-block; width: 100%; }
6
+
7
+ .mj-datepicker {
8
+ display: flex; align-items: center;
9
+ background: var(--mj-bg-surface); border: 1px solid var(--mj-border-default);
10
+ border-radius: var(--mj-radius-sm); transition: var(--mj-transition-colors), box-shadow var(--mj-transition-base);
11
+ &:hover:not(.mj-datepicker--disabled) { border-color: var(--mj-border-strong); }
12
+ &:focus-within:not(.mj-datepicker--disabled) { border-color: var(--mj-brand-primary); box-shadow: var(--mj-focus-ring); }
13
+ &.mj-datepicker--disabled { opacity: 0.5; cursor: not-allowed; background: var(--mj-bg-surface-sunken); }
14
+ }
15
+
16
+ .mj-datepicker-input { flex: 1; border: none !important; outline: none !important; box-shadow: none !important; background: transparent !important; min-width: 0; }
17
+
18
+ .mj-datepicker-toggle {
19
+ display: flex; align-items: center; justify-content: center; width: 38px; align-self: stretch;
20
+ background: none; border: none; border-left: 1px solid var(--mj-border-default);
21
+ cursor: pointer; color: var(--mj-text-muted); padding: 0;
22
+ &:hover:not(:disabled) { color: var(--mj-brand-primary); background: var(--mj-bg-surface-hover); }
23
+ &:disabled { cursor: not-allowed; }
24
+ }
25
+
26
+ .mj-calendar {
27
+ background: var(--mj-bg-surface-elevated); border: 1px solid var(--mj-border-default);
28
+ border-radius: var(--mj-radius-md); box-shadow: var(--mj-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
29
+ padding: 12px; width: 280px; z-index: 1000;
30
+ }
31
+ .mj-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
32
+ .mj-calendar-title { font-weight: var(--mj-font-semibold); font-size: var(--mj-text-sm); color: var(--mj-text-primary); }
33
+ .mj-calendar-nav {
34
+ display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
35
+ border: none; background: none; cursor: pointer; color: var(--mj-text-muted); border-radius: var(--mj-radius-sm);
36
+ &:hover { background: var(--mj-bg-surface-hover); color: var(--mj-text-primary); }
37
+ }
38
+ .mj-calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
39
+ .mj-calendar-weekday { text-align: center; font-size: 0.75rem; font-weight: var(--mj-font-semibold); color: var(--mj-text-muted); padding: 4px 0; }
40
+ .mj-calendar-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
41
+ .mj-calendar-day {
42
+ display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
43
+ border: none; background: none; cursor: pointer; font-size: var(--mj-text-sm);
44
+ color: var(--mj-text-primary); border-radius: var(--mj-radius-sm);
45
+ transition: background var(--mj-transition-fast);
46
+ &:hover:not(:disabled):not(.mj-calendar-day--selected) { background: var(--mj-bg-surface-hover); }
47
+ &.mj-calendar-day--selected { background: var(--mj-brand-primary); color: var(--mj-brand-on-primary); font-weight: var(--mj-font-semibold); }
48
+ &.mj-calendar-day--today:not(.mj-calendar-day--selected) { font-weight: var(--mj-font-semibold); border: 1px solid var(--mj-brand-primary); }
49
+ &.mj-calendar-day--other-month { color: var(--mj-text-disabled); }
50
+ &:disabled { color: var(--mj-text-disabled); cursor: not-allowed; opacity: 0.4; }
51
+ }
52
+ .mj-calendar-footer { display: flex; justify-content: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--mj-border-default); }
53
+ .mj-calendar-today {
54
+ background: none; border: none; color: var(--mj-brand-primary);
55
+ font-size: var(--mj-text-sm); font-weight: var(--mj-font-semibold);
56
+ cursor: pointer; padding: 4px 12px; border-radius: var(--mj-radius-sm);
57
+ &:hover { background: var(--mj-bg-surface-hover); }
58
+ }
59
+
60
+ @media (prefers-reduced-motion: reduce) { .mj-calendar-day { transition: none; } }
@@ -0,0 +1,84 @@
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export type MjDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'auto';
4
+ /**
5
+ * mj-dialog — Modal dialog component using native `<dialog>` element.
6
+ *
7
+ * Replaces `<kendo-dialog>`.
8
+ *
9
+ * Supports both explicit width/height and size presets.
10
+ * Content is projected, with an optional `<mj-dialog-actions>` for the footer.
11
+ *
12
+ * @example
13
+ * ```html
14
+ * <mj-dialog [Visible]="showDialog" Title="Confirm" (Close)="onClose()">
15
+ * <p>Are you sure?</p>
16
+ * <mj-dialog-actions>
17
+ * <button mjButton variant="primary" (click)="onConfirm()">Yes</button>
18
+ * <button mjButton (click)="onClose()">No</button>
19
+ * </mj-dialog-actions>
20
+ * </mj-dialog>
21
+ * ```
22
+ */
23
+ export declare class MJDialogComponent implements OnDestroy {
24
+ private _visible;
25
+ private static nextId;
26
+ set Visible(value: boolean);
27
+ get Visible(): boolean;
28
+ Title: string;
29
+ Width: number | string | null;
30
+ Height: number | string | null;
31
+ Size: MjDialogSize;
32
+ Closeable: boolean;
33
+ MinWidth: number | null;
34
+ Close: EventEmitter<void>;
35
+ DialogId: number;
36
+ get dialogId(): number;
37
+ get resolvedWidth(): string;
38
+ get resolvedHeight(): string;
39
+ OnEscapeKey(): void;
40
+ OnBackdropClick(event: Event): void;
41
+ OnCloseClick(): void;
42
+ private onOpen;
43
+ private onCloseInternal;
44
+ ngOnDestroy(): void;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<MJDialogComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<MJDialogComponent, "mj-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; "Title": { "alias": "Title"; "required": false; }; "Width": { "alias": "Width"; "required": false; }; "Height": { "alias": "Height"; "required": false; }; "Size": { "alias": "Size"; "required": false; }; "Closeable": { "alias": "Closeable"; "required": false; }; "MinWidth": { "alias": "MinWidth"; "required": false; }; }, { "Close": "Close"; }, never, ["mj-dialog-titlebar", "*", "mj-dialog-actions"], true, never>;
47
+ }
48
+ /**
49
+ * mj-dialog-titlebar — Custom titlebar content for mj-dialog.
50
+ *
51
+ * Replaces `<kendo-dialog-titlebar>`.
52
+ *
53
+ * @example
54
+ * ```html
55
+ * <mj-dialog [Visible]="show" (Close)="onClose()">
56
+ * <mj-dialog-titlebar>
57
+ * <i class="fa-solid fa-save"></i> Custom Title
58
+ * </mj-dialog-titlebar>
59
+ * <p>Dialog content</p>
60
+ * </mj-dialog>
61
+ * ```
62
+ */
63
+ export declare class MJDialogTitlebarComponent {
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<MJDialogTitlebarComponent, never>;
65
+ static ɵcmp: i0.ɵɵComponentDeclaration<MJDialogTitlebarComponent, "mj-dialog-titlebar", never, {}, {}, never, ["*"], true, never>;
66
+ }
67
+ /**
68
+ * mj-dialog-actions — Footer action bar for mj-dialog.
69
+ *
70
+ * Replaces `<kendo-dialog-actions>`.
71
+ *
72
+ * @example
73
+ * ```html
74
+ * <mj-dialog-actions>
75
+ * <button mjButton variant="primary">Save</button>
76
+ * <button mjButton>Cancel</button>
77
+ * </mj-dialog-actions>
78
+ * ```
79
+ */
80
+ export declare class MJDialogActionsComponent {
81
+ static ɵfac: i0.ɵɵFactoryDeclaration<MJDialogActionsComponent, never>;
82
+ static ɵcmp: i0.ɵɵComponentDeclaration<MJDialogActionsComponent, "mj-dialog-actions", never, {}, {}, never, ["*"], true, never>;
83
+ }
84
+ //# sourceMappingURL=dialog.component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.component.d.ts","sourceRoot":"","sources":["../../../src/lib/dialog/dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAKZ,SAAS,EAEV,MAAM,eAAe,CAAC;;AAEvB,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAU9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBA2Ca,iBAAkB,YAAW,SAAS;IACjD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAK;IAE1B,IACI,OAAO,CAAC,KAAK,EAAE,OAAO,EASzB;IACD,IAAI,OAAO,IAAI,OAAO,CAErB;IAEQ,KAAK,SAAM;IACX,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAQ;IACrC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAQ;IACtC,IAAI,EAAE,YAAY,CAAU;IAC5B,SAAS,UAAQ;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE9B,KAAK,qBAA4B;IAE3C,QAAQ,SAA8B;IAEtC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,IAAI,aAAa,IAAI,MAAM,CAK1B;IAED,IAAI,cAAc,IAAI,MAAM,CAK3B;IAGD,WAAW,IAAI,IAAI;IAMnB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAMnC,YAAY,IAAI,IAAI;IAIpB,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,eAAe;IAIvB,WAAW,IAAI,IAAI;yCAzER,iBAAiB;2CAAjB,iBAAiB;CA4E7B;AAED;;;;;;;;;;;;;;GAcG;AACH,qBAK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