@igo2/common 20.0.0 → 20.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/action/index.d.ts +22 -22
  2. package/clickout/index.d.ts +2 -2
  3. package/collapsible/index.d.ts +6 -10
  4. package/color/index.d.ts +3 -4
  5. package/context-menu/index.d.ts +9 -9
  6. package/datepicker/index.d.ts +65 -0
  7. package/drag-drop/index.d.ts +21 -23
  8. package/dynamic-component/index.d.ts +7 -7
  9. package/entity/index.d.ts +45 -48
  10. package/fesm2022/igo2-common-action.mjs +60 -97
  11. package/fesm2022/igo2-common-action.mjs.map +1 -1
  12. package/fesm2022/igo2-common-backdrop.mjs +7 -7
  13. package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
  14. package/fesm2022/igo2-common-badge.mjs +7 -7
  15. package/fesm2022/igo2-common-badge.mjs.map +1 -1
  16. package/fesm2022/igo2-common-clickout.mjs +10 -12
  17. package/fesm2022/igo2-common-clickout.mjs.map +1 -1
  18. package/fesm2022/igo2-common-clone.mjs +7 -7
  19. package/fesm2022/igo2-common-collapsible.mjs +18 -39
  20. package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
  21. package/fesm2022/igo2-common-color.mjs +14 -18
  22. package/fesm2022/igo2-common-color.mjs.map +1 -1
  23. package/fesm2022/igo2-common-confirm-dialog.mjs +10 -10
  24. package/fesm2022/igo2-common-context-menu.mjs +22 -31
  25. package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
  26. package/fesm2022/igo2-common-custom-html.mjs +10 -10
  27. package/fesm2022/igo2-common-custom-html.mjs.map +1 -1
  28. package/fesm2022/igo2-common-datepicker.mjs +316 -0
  29. package/fesm2022/igo2-common-datepicker.mjs.map +1 -0
  30. package/fesm2022/igo2-common-dom.mjs +7 -7
  31. package/fesm2022/igo2-common-drag-drop.mjs +59 -75
  32. package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
  33. package/fesm2022/igo2-common-dynamic-component.mjs +34 -52
  34. package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
  35. package/fesm2022/igo2-common-entity.mjs +154 -206
  36. package/fesm2022/igo2-common-entity.mjs.map +1 -1
  37. package/fesm2022/igo2-common-flexible.mjs +13 -16
  38. package/fesm2022/igo2-common-flexible.mjs.map +1 -1
  39. package/fesm2022/igo2-common-form.mjs +120 -174
  40. package/fesm2022/igo2-common-form.mjs.map +1 -1
  41. package/fesm2022/igo2-common-home-button.mjs +11 -12
  42. package/fesm2022/igo2-common-home-button.mjs.map +1 -1
  43. package/fesm2022/igo2-common-icon.mjs +18 -24
  44. package/fesm2022/igo2-common-icon.mjs.map +1 -1
  45. package/fesm2022/igo2-common-image.mjs +16 -20
  46. package/fesm2022/igo2-common-image.mjs.map +1 -1
  47. package/fesm2022/igo2-common-interactive-tour.mjs +28 -33
  48. package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
  49. package/fesm2022/igo2-common-json-dialog.mjs +11 -11
  50. package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
  51. package/fesm2022/igo2-common-keyvalue.mjs +7 -7
  52. package/fesm2022/igo2-common-list.mjs +49 -66
  53. package/fesm2022/igo2-common-list.mjs.map +1 -1
  54. package/fesm2022/igo2-common-panel.mjs +15 -28
  55. package/fesm2022/igo2-common-panel.mjs.map +1 -1
  56. package/fesm2022/igo2-common-resizable-bar.mjs +25 -32
  57. package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
  58. package/fesm2022/igo2-common-select-value-dialog.mjs +10 -10
  59. package/fesm2022/igo2-common-sidenav.mjs +7 -7
  60. package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
  61. package/fesm2022/igo2-common-spinner.mjs +11 -11
  62. package/fesm2022/igo2-common-spinner.mjs.map +1 -1
  63. package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
  64. package/fesm2022/igo2-common-stop-propagation.mjs.map +1 -1
  65. package/fesm2022/igo2-common-table.mjs +57 -87
  66. package/fesm2022/igo2-common-table.mjs.map +1 -1
  67. package/fesm2022/igo2-common-timepicker.mjs +105 -0
  68. package/fesm2022/igo2-common-timepicker.mjs.map +1 -0
  69. package/fesm2022/igo2-common-tool.mjs +29 -35
  70. package/fesm2022/igo2-common-tool.mjs.map +1 -1
  71. package/fesm2022/igo2-common-widget.mjs +27 -36
  72. package/fesm2022/igo2-common-widget.mjs.map +1 -1
  73. package/fesm2022/igo2-common-workspace.mjs +34 -44
  74. package/fesm2022/igo2-common-workspace.mjs.map +1 -1
  75. package/flexible/index.d.ts +2 -2
  76. package/form/index.d.ts +31 -33
  77. package/home-button/index.d.ts +1 -2
  78. package/icon/index.d.ts +4 -5
  79. package/image/index.d.ts +3 -3
  80. package/interactive-tour/index.d.ts +5 -5
  81. package/list/index.d.ts +23 -23
  82. package/package.json +11 -3
  83. package/panel/index.d.ts +4 -6
  84. package/resizable-bar/index.d.ts +11 -13
  85. package/table/index.d.ts +13 -19
  86. package/timepicker/index.d.ts +33 -0
  87. package/tool/index.d.ts +4 -4
  88. package/widget/index.d.ts +9 -9
  89. package/workspace/index.d.ts +7 -8
@@ -12,10 +12,10 @@ class ConfirmDialogComponent {
12
12
  titleKey = 'igo.common.confirmDialog.title';
13
13
  proccessKey = 'igo.common.confirmDialog.confirmBtn';
14
14
  cancelKey = 'igo.common.confirmDialog.cancelBtn';
15
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: ConfirmDialogComponent, isStandalone: true, selector: "igo-confirm-dialog", ngImport: i0, template: "<h2 mat-dialog-title>\n {{ titleKey | translate }}\n</h2>\n<div mat-dialog-content>\n {{ confirmMessage | translate }}\n</div>\n<div mat-dialog-actions>\n <button matButton=\"elevated\" color=\"primary\" (click)=\"dialogRef.close(true)\">\n {{ proccessKey | translate }}\n </button>\n <button matButton=\"filled\" (click)=\"dialogRef.close(false)\">\n {{ cancelKey | translate }}\n </button>\n</div>\n", styles: ["h2{margin:5px 0 10px}div[mat-dialog-content]{max-width:200px}div[mat-dialog-actions]{margin:10px 0 0}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
15
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: ConfirmDialogComponent, isStandalone: true, selector: "igo-confirm-dialog", ngImport: i0, template: "<h2 mat-dialog-title>\n {{ titleKey | translate }}\n</h2>\n<div mat-dialog-content>\n {{ confirmMessage | translate }}\n</div>\n<div mat-dialog-actions>\n <button matButton=\"elevated\" color=\"primary\" (click)=\"dialogRef.close(true)\">\n {{ proccessKey | translate }}\n </button>\n <button matButton=\"filled\" (click)=\"dialogRef.close(false)\">\n {{ cancelKey | translate }}\n </button>\n</div>\n", styles: ["h2{margin:5px 0 10px}div[mat-dialog-content]{max-width:200px}div[mat-dialog-actions]{margin:10px 0 0}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
17
17
  }
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
18
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
19
19
  type: Component,
20
20
  args: [{ selector: 'igo-confirm-dialog', imports: [
21
21
  MatDialogTitle,
@@ -45,10 +45,10 @@ class ConfirmDialogService {
45
45
  }
46
46
  return dialogRef.afterClosed();
47
47
  }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ConfirmDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
49
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ConfirmDialogService, providedIn: 'root' });
48
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ConfirmDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
49
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ConfirmDialogService, providedIn: 'root' });
50
50
  }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ConfirmDialogService, decorators: [{
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ConfirmDialogService, decorators: [{
52
52
  type: Injectable,
53
53
  args: [{ providedIn: 'root' }]
54
54
  }] });
@@ -63,11 +63,11 @@ class IgoConfirmDialogModule {
63
63
  providers: []
64
64
  };
65
65
  }
66
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoConfirmDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
67
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoConfirmDialogModule, imports: [ConfirmDialogComponent], exports: [ConfirmDialogComponent] });
68
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoConfirmDialogModule, providers: [ConfirmDialogService], imports: [ConfirmDialogComponent] });
66
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoConfirmDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
67
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoConfirmDialogModule, imports: [ConfirmDialogComponent], exports: [ConfirmDialogComponent] });
68
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoConfirmDialogModule, providers: [ConfirmDialogService], imports: [ConfirmDialogComponent] });
69
69
  }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoConfirmDialogModule, decorators: [{
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoConfirmDialogModule, decorators: [{
71
71
  type: NgModule,
72
72
  args: [{
73
73
  imports: [ConfirmDialogComponent],
@@ -1,7 +1,7 @@
1
1
  import { Overlay } from '@angular/cdk/overlay';
2
2
  import { TemplatePortal } from '@angular/cdk/portal';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, ViewContainerRef, ElementRef, EventEmitter, HostListener, Output, Input, Directive, NgModule } from '@angular/core';
4
+ import { inject, ViewContainerRef, ElementRef, input, output, HostListener, Directive, NgModule } from '@angular/core';
5
5
  import { fromEvent } from 'rxjs';
6
6
  import { filter, take } from 'rxjs/operators';
7
7
 
@@ -11,8 +11,10 @@ class ContextMenuDirective {
11
11
  elementRef = inject(ElementRef);
12
12
  overlayRef;
13
13
  sub;
14
- menuContext;
15
- menuPosition = new EventEmitter();
14
+ menuContext = input(undefined, ...(ngDevMode ? [{ debugName: "menuContext", alias: 'igoContextMenu' }] : [{
15
+ alias: 'igoContextMenu'
16
+ }]));
17
+ menuPosition = output();
16
18
  onContextMenu(e) {
17
19
  let x;
18
20
  let y;
@@ -46,7 +48,7 @@ class ContextMenuDirective {
46
48
  positionStrategy,
47
49
  scrollStrategy: this.overlay.scrollStrategies.close()
48
50
  });
49
- this.overlayRef.attach(new TemplatePortal(this.menuContext, this.viewContainerRef, {
51
+ this.overlayRef.attach(new TemplatePortal(this.menuContext(), this.viewContainerRef, {
50
52
  $implicit: undefined
51
53
  }));
52
54
  this.sub = fromEvent(document, 'click')
@@ -80,21 +82,16 @@ class ContextMenuDirective {
80
82
  this.sub.unsubscribe();
81
83
  }
82
84
  }
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
84
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: ContextMenuDirective, isStandalone: true, selector: "[igoContextMenu]", inputs: { menuContext: ["igoContextMenu", "menuContext"] }, outputs: { menuPosition: "menuPosition" }, host: { listeners: { "longpress": "onContextMenu($event)", "contextmenu": "onContextMenu($event)" } }, ngImport: i0 });
85
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextMenuDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
86
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.6", type: ContextMenuDirective, isStandalone: true, selector: "[igoContextMenu]", inputs: { menuContext: { classPropertyName: "menuContext", publicName: "igoContextMenu", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { menuPosition: "menuPosition" }, host: { listeners: { "longpress": "onContextMenu($event)", "contextmenu": "onContextMenu($event)" } }, ngImport: i0 });
85
87
  }
86
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ContextMenuDirective, decorators: [{
88
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ContextMenuDirective, decorators: [{
87
89
  type: Directive,
88
90
  args: [{
89
91
  selector: '[igoContextMenu]',
90
92
  standalone: true
91
93
  }]
92
- }], propDecorators: { menuContext: [{
93
- type: Input,
94
- args: ['igoContextMenu']
95
- }], menuPosition: [{
96
- type: Output
97
- }], onContextMenu: [{
94
+ }], propDecorators: { menuContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "igoContextMenu", required: false }] }], menuPosition: [{ type: i0.Output, args: ["menuPosition"] }], onContextMenu: [{
98
95
  type: HostListener,
99
96
  args: ['longpress', ['$event']]
100
97
  }, {
@@ -110,9 +107,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
110
107
  */
111
108
  class LongPressDirective {
112
109
  touchTimeout;
113
- touchDuration = 400;
114
- onlyIOS = true;
115
- longpress = new EventEmitter();
110
+ touchDuration = input(400, ...(ngDevMode ? [{ debugName: "touchDuration" }] : []));
111
+ onlyIOS = input(true, ...(ngDevMode ? [{ debugName: "onlyIOS" }] : []));
112
+ longpress = output();
116
113
  touchstart(e) {
117
114
  if (e.touches.length > 1) {
118
115
  this.touchEnd();
@@ -120,7 +117,7 @@ class LongPressDirective {
120
117
  }
121
118
  this.touchTimeout = setTimeout(() => {
122
119
  this.longpress.emit(e);
123
- }, this.touchDuration);
120
+ }, this.touchDuration());
124
121
  }
125
122
  touchend() {
126
123
  this.touchEnd();
@@ -128,22 +125,16 @@ class LongPressDirective {
128
125
  touchEnd() {
129
126
  clearTimeout(this.touchTimeout);
130
127
  }
131
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LongPressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
132
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.4", type: LongPressDirective, isStandalone: true, selector: "[igoLongPress]", inputs: { touchDuration: "touchDuration", onlyIOS: "onlyIOS" }, outputs: { longpress: "longpress" }, host: { listeners: { "touchstart": "touchstart($event)", "touchmove": "touchend()", "touchcancel": "touchend()", "touchend": "touchend()" } }, ngImport: i0 });
128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LongPressDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
129
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.6", type: LongPressDirective, isStandalone: true, selector: "[igoLongPress]", inputs: { touchDuration: { classPropertyName: "touchDuration", publicName: "touchDuration", isSignal: true, isRequired: false, transformFunction: null }, onlyIOS: { classPropertyName: "onlyIOS", publicName: "onlyIOS", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { longpress: "longpress" }, host: { listeners: { "touchstart": "touchstart($event)", "touchmove": "touchend()", "touchcancel": "touchend()", "touchend": "touchend()" } }, ngImport: i0 });
133
130
  }
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: LongPressDirective, decorators: [{
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: LongPressDirective, decorators: [{
135
132
  type: Directive,
136
133
  args: [{
137
134
  selector: '[igoLongPress]',
138
135
  standalone: true
139
136
  }]
140
- }], propDecorators: { touchDuration: [{
141
- type: Input
142
- }], onlyIOS: [{
143
- type: Input
144
- }], longpress: [{
145
- type: Output
146
- }], touchstart: [{
137
+ }], propDecorators: { touchDuration: [{ type: i0.Input, args: [{ isSignal: true, alias: "touchDuration", required: false }] }], onlyIOS: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyIOS", required: false }] }], longpress: [{ type: i0.Output, args: ["longpress"] }], touchstart: [{
147
138
  type: HostListener,
148
139
  args: ['touchstart', ['$event']]
149
140
  }], touchend: [{
@@ -167,11 +158,11 @@ class IgoContextMenuModule {
167
158
  providers: []
168
159
  };
169
160
  }
170
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
171
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoContextMenuModule, imports: [ContextMenuDirective, LongPressDirective], exports: [ContextMenuDirective, LongPressDirective] });
172
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoContextMenuModule });
161
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
162
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMenuModule, imports: [ContextMenuDirective, LongPressDirective], exports: [ContextMenuDirective, LongPressDirective] });
163
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMenuModule });
173
164
  }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoContextMenuModule, decorators: [{
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoContextMenuModule, decorators: [{
175
166
  type: NgModule,
176
167
  args: [{
177
168
  imports: [ContextMenuDirective, LongPressDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-context-menu.mjs","sources":["../../../packages/common/context-menu/src/context-menu.directive.ts","../../../packages/common/context-menu/src/long-press.directive.ts","../../../packages/common/context-menu/src/context-menu.module.ts","../../../packages/common/context-menu/src/public_api.ts","../../../packages/common/context-menu/src/igo2-common-context-menu.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n EventEmitter,\n HostListener,\n Input,\n Output,\n ViewContainerRef,\n inject\n} from '@angular/core';\nimport type { TemplateRef } from '@angular/core';\n\nimport { Subscription, fromEvent } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\n@Directive({\n selector: '[igoContextMenu]',\n standalone: true\n})\nexport class ContextMenuDirective {\n overlay = inject(Overlay);\n viewContainerRef = inject(ViewContainerRef);\n private elementRef = inject(ElementRef);\n\n private overlayRef: OverlayRef | null;\n private sub: Subscription;\n\n @Input('igoContextMenu') menuContext: TemplateRef<any>;\n @Output() menuPosition = new EventEmitter<{ x: number; y: number }>();\n\n @HostListener('longpress', ['$event'])\n @HostListener('contextmenu', ['$event'])\n public onContextMenu(e: MouseEvent | TouchEvent): void {\n let x;\n let y;\n if (e instanceof MouseEvent) {\n x = e.x;\n y = e.y;\n } else if (e instanceof TouchEvent) {\n x = e.touches[0].pageX;\n y = e.touches[0].pageY;\n }\n if (!x || !y) {\n return;\n }\n\n this.close();\n e.preventDefault();\n this.menuPosition.emit({ x, y });\n this.overlayRef = null;\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo({ x, y })\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n }\n ]);\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.close()\n });\n this.overlayRef.attach(\n new TemplatePortal(this.menuContext, this.viewContainerRef, {\n $implicit: undefined\n })\n );\n\n this.sub = fromEvent<MouseEvent>(document, 'click')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n this.close();\n return (\n !!this.overlayRef &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n );\n }),\n take(1)\n )\n .subscribe(() => this.close());\n\n this.sub = fromEvent<MouseEvent>(document, 'contextmenu')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n if (\n clickTarget &&\n !this.elementRef.nativeElement.contains(clickTarget) &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n ) {\n return true;\n } else {\n event.preventDefault();\n }\n }),\n take(1)\n )\n .subscribe(() => this.close());\n }\n\n close() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n if (this.sub) {\n this.sub.unsubscribe();\n }\n }\n}\n","import {\n Directive,\n EventEmitter,\n HostListener,\n Input,\n Output\n} from '@angular/core';\n\n/**\n * IgoLongPress trigger longpress event after a define duration.\n * This directive exist to patch the unavailable contextmenu event on iOS.\n * @param touchDuration touch duration in ms, default value is 400ms\n * @param iOSOnly define if longpress is triggered only for iOS, default value = true\n */\n@Directive({\n selector: '[igoLongPress]',\n standalone: true\n})\nexport class LongPressDirective {\n private touchTimeout: any;\n @Input() touchDuration = 400;\n @Input() onlyIOS = true;\n @Output() longpress = new EventEmitter();\n\n @HostListener('touchstart', ['$event'])\n public touchstart(e: TouchEvent) {\n if (e.touches.length > 1) {\n this.touchEnd();\n return;\n }\n this.touchTimeout = setTimeout(() => {\n this.longpress.emit(e);\n }, this.touchDuration);\n }\n @HostListener('touchmove')\n @HostListener('touchcancel')\n @HostListener('touchend')\n public touchend() {\n this.touchEnd();\n }\n\n private touchEnd() {\n clearTimeout(this.touchTimeout);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\n/**\n * @deprecated import the components/directives directly or CONTEXT_MENU_DIRECTIVES for the set\n */\n@NgModule({\n imports: [ContextMenuDirective, LongPressDirective],\n exports: [ContextMenuDirective, LongPressDirective]\n})\nexport class IgoContextMenuModule {\n static forRoot(): ModuleWithProviders<IgoContextMenuModule> {\n return {\n ngModule: IgoContextMenuModule,\n providers: []\n };\n }\n}\n","import { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\nexport * from './context-menu.module';\nexport * from './context-menu.directive';\nexport * from './long-press.directive';\n\nexport const CONTEXT_MENU_DIRECTIVES = [\n ContextMenuDirective,\n LongPressDirective\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAqBa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACnC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,UAAU;AACV,IAAA,GAAG;AAEc,IAAA,WAAW;AAC1B,IAAA,YAAY,GAAG,IAAI,YAAY,EAA4B;AAI9D,IAAA,aAAa,CAAC,CAA0B,EAAA;AAC7C,QAAA,IAAI,CAAC;AACL,QAAA,IAAI,CAAC;AACL,QAAA,IAAI,CAAC,YAAY,UAAU,EAAE;AAC3B,YAAA,CAAC,GAAG,CAAC,CAAC,CAAC;AACP,YAAA,CAAC,GAAG,CAAC,CAAC,CAAC;QACT;AAAO,aAAA,IAAI,CA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,YAHrB,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CACxC,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,CAAA;wGAEvC,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB;AACnD,iBAAA;;;ACJM,MAAM,uBAAuB,GAAG;IACrC,oBAAoB;IACpB;;;ACTF;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-context-menu.mjs","sources":["../../../packages/common/context-menu/src/context-menu.directive.ts","../../../packages/common/context-menu/src/long-press.directive.ts","../../../packages/common/context-menu/src/context-menu.module.ts","../../../packages/common/context-menu/src/public_api.ts","../../../packages/common/context-menu/src/igo2-common-context-menu.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n HostListener,\n ViewContainerRef,\n inject,\n input,\n output\n} from '@angular/core';\nimport type { TemplateRef } from '@angular/core';\n\nimport { Subscription, fromEvent } from 'rxjs';\nimport { filter, take } from 'rxjs/operators';\n\n@Directive({\n selector: '[igoContextMenu]',\n standalone: true\n})\nexport class ContextMenuDirective {\n overlay = inject(Overlay);\n viewContainerRef = inject(ViewContainerRef);\n private elementRef = inject(ElementRef);\n\n private overlayRef: OverlayRef | null;\n private sub: Subscription;\n\n readonly menuContext = input<TemplateRef<any>>(undefined, {\n alias: 'igoContextMenu'\n });\n readonly menuPosition = output<{\n x: number;\n y: number;\n }>();\n\n @HostListener('longpress', ['$event'])\n @HostListener('contextmenu', ['$event'])\n public onContextMenu(e: MouseEvent | TouchEvent): void {\n let x;\n let y;\n if (e instanceof MouseEvent) {\n x = e.x;\n y = e.y;\n } else if (e instanceof TouchEvent) {\n x = e.touches[0].pageX;\n y = e.touches[0].pageY;\n }\n if (!x || !y) {\n return;\n }\n\n this.close();\n e.preventDefault();\n this.menuPosition.emit({ x, y });\n this.overlayRef = null;\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo({ x, y })\n .withPositions([\n {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top'\n }\n ]);\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.close()\n });\n this.overlayRef.attach(\n new TemplatePortal(this.menuContext(), this.viewContainerRef, {\n $implicit: undefined\n })\n );\n\n this.sub = fromEvent<MouseEvent>(document, 'click')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n this.close();\n return (\n !!this.overlayRef &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n );\n }),\n take(1)\n )\n .subscribe(() => this.close());\n\n this.sub = fromEvent<MouseEvent>(document, 'contextmenu')\n .pipe(\n filter((event) => {\n const clickTarget = event.target as HTMLElement;\n if (\n clickTarget &&\n !this.elementRef.nativeElement.contains(clickTarget) &&\n !this.overlayRef.overlayElement.contains(clickTarget)\n ) {\n return true;\n } else {\n event.preventDefault();\n }\n }),\n take(1)\n )\n .subscribe(() => this.close());\n }\n\n close() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n if (this.sub) {\n this.sub.unsubscribe();\n }\n }\n}\n","import { Directive, HostListener, input, output } from '@angular/core';\n\n/**\n * IgoLongPress trigger longpress event after a define duration.\n * This directive exist to patch the unavailable contextmenu event on iOS.\n * @param touchDuration touch duration in ms, default value is 400ms\n * @param iOSOnly define if longpress is triggered only for iOS, default value = true\n */\n@Directive({\n selector: '[igoLongPress]',\n standalone: true\n})\nexport class LongPressDirective {\n private touchTimeout: any;\n readonly touchDuration = input(400);\n readonly onlyIOS = input(true);\n readonly longpress = output<TouchEvent>();\n\n @HostListener('touchstart', ['$event'])\n public touchstart(e: TouchEvent) {\n if (e.touches.length > 1) {\n this.touchEnd();\n return;\n }\n this.touchTimeout = setTimeout(() => {\n this.longpress.emit(e);\n }, this.touchDuration());\n }\n @HostListener('touchmove')\n @HostListener('touchcancel')\n @HostListener('touchend')\n public touchend() {\n this.touchEnd();\n }\n\n private touchEnd() {\n clearTimeout(this.touchTimeout);\n }\n}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\n/**\n * @deprecated import the components/directives directly or CONTEXT_MENU_DIRECTIVES for the set\n */\n@NgModule({\n imports: [ContextMenuDirective, LongPressDirective],\n exports: [ContextMenuDirective, LongPressDirective]\n})\nexport class IgoContextMenuModule {\n static forRoot(): ModuleWithProviders<IgoContextMenuModule> {\n return {\n ngModule: IgoContextMenuModule,\n providers: []\n };\n }\n}\n","import { ContextMenuDirective } from './context-menu.directive';\nimport { LongPressDirective } from './long-press.directive';\n\nexport * from './context-menu.module';\nexport * from './context-menu.directive';\nexport * from './long-press.directive';\n\nexport const CONTEXT_MENU_DIRECTIVES = [\n ContextMenuDirective,\n LongPressDirective\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;MAoBa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;AACzB,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACnC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAE/B,IAAA,UAAU;AACV,IAAA,GAAG;IAEF,WAAW,GAAG,KAAK,CAAmB,SAAS,+CACtD,KAAK,EAAE,gBAAgB,EAAA,CAAA,GAAA,CADiC;AACxD,YAAA,KAAK,EAAE;AACR,SAAA,CAAA,CAAA,CAAC;IACO,YAAY,GAAG,MAAM,EAG1B;AAIG,IAAA,aAAa,CAAC,CAA0B,EAAA;AAC7C,QAAA,IAAI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AACL,YAAA,QAAQ,EAAE,oBAAoB;AAC9B,YAAA,SAAS,EAAE;SACZ;IACH;uGANW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAHrB,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CACxC,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,CAAA;wGAEvC,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;AACnD,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,kBAAkB;AACnD,iBAAA;;;ACJM,MAAM,uBAAuB,GAAG;IACrC,oBAAoB;IACpB;;;ACTF;;AAEG;;;;"}
@@ -7,10 +7,10 @@ class SanitizeHtmlPipe {
7
7
  transform(v) {
8
8
  return this._sanitizer.bypassSecurityTrustHtml(v);
9
9
  }
10
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SanitizeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
11
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: SanitizeHtmlPipe, isStandalone: true, name: "sanitizeHtml" });
10
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: SanitizeHtmlPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
11
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: SanitizeHtmlPipe, isStandalone: true, name: "sanitizeHtml" });
12
12
  }
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SanitizeHtmlPipe, decorators: [{
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: SanitizeHtmlPipe, decorators: [{
14
14
  type: Pipe,
15
15
  args: [{
16
16
  name: 'sanitizeHtml',
@@ -26,10 +26,10 @@ class CustomHtmlComponent {
26
26
  this._html = value;
27
27
  }
28
28
  _html = '';
29
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CustomHtmlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: CustomHtmlComponent, isStandalone: true, selector: "igo-custom-html", inputs: { html: "html" }, ngImport: i0, template: "<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n", styles: [":host .custom-html{padding:16px}\n"], dependencies: [{ kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }] });
29
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: CustomHtmlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
30
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: CustomHtmlComponent, isStandalone: true, selector: "igo-custom-html", inputs: { html: "html" }, ngImport: i0, template: "<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n", styles: [":host .custom-html{padding:16px}\n"], dependencies: [{ kind: "pipe", type: SanitizeHtmlPipe, name: "sanitizeHtml" }] });
31
31
  }
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CustomHtmlComponent, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: CustomHtmlComponent, decorators: [{
33
33
  type: Component,
34
34
  args: [{ selector: 'igo-custom-html', imports: [SanitizeHtmlPipe], template: "<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n", styles: [":host .custom-html{padding:16px}\n"] }]
35
35
  }], propDecorators: { html: [{
@@ -45,11 +45,11 @@ class IgoCustomHtmlModule {
45
45
  ngModule: IgoCustomHtmlModule
46
46
  };
47
47
  }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoCustomHtmlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
49
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.4", ngImport: i0, type: IgoCustomHtmlModule, imports: [SanitizeHtmlPipe, CustomHtmlComponent], exports: [SanitizeHtmlPipe, CustomHtmlComponent] });
50
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoCustomHtmlModule });
48
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoCustomHtmlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
49
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.6", ngImport: i0, type: IgoCustomHtmlModule, imports: [SanitizeHtmlPipe, CustomHtmlComponent], exports: [SanitizeHtmlPipe, CustomHtmlComponent] });
50
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoCustomHtmlModule });
51
51
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: IgoCustomHtmlModule, decorators: [{
52
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: IgoCustomHtmlModule, decorators: [{
53
53
  type: NgModule,
54
54
  args: [{
55
55
  imports: [SanitizeHtmlPipe, CustomHtmlComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-common-custom-html.mjs","sources":["../../../packages/common/custom-html/src/custom-html.pipe.ts","../../../packages/common/custom-html/src/custom-html.component.ts","../../../packages/common/custom-html/src/custom-html.component.html","../../../packages/common/custom-html/src/custom-html.module.ts","../../../packages/common/custom-html/src/public_api.ts","../../../packages/common/custom-html/src/igo2-common-custom-html.ts"],"sourcesContent":["import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({\n name: 'sanitizeHtml',\n standalone: true\n})\nexport class SanitizeHtmlPipe implements PipeTransform {\n private _sanitizer = inject(DomSanitizer);\n\n transform(v: string): SafeHtml {\n return this._sanitizer.bypassSecurityTrustHtml(v);\n }\n}\n","import { Component, Input } from '@angular/core';\n\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\n@Component({\n selector: 'igo-custom-html',\n templateUrl: './custom-html.component.html',\n styleUrls: ['./custom-html.component.scss'],\n imports: [SanitizeHtmlPipe]\n})\nexport class CustomHtmlComponent {\n @Input()\n get html(): string {\n return this._html;\n }\n set html(value: string) {\n this._html = value;\n }\n private _html = '';\n}\n","<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { CustomHtmlComponent } from './custom-html.component';\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\n/**\n * @deprecated import the components/directives directly or CUSTOM_HTML_DIRECTIVES for the set\n */\n@NgModule({\n imports: [SanitizeHtmlPipe, CustomHtmlComponent],\n exports: [SanitizeHtmlPipe, CustomHtmlComponent]\n})\nexport class IgoCustomHtmlModule {\n static forRoot(): ModuleWithProviders<IgoCustomHtmlModule> {\n return {\n ngModule: IgoCustomHtmlModule\n };\n }\n}\n","import { CustomHtmlComponent } from './custom-html.component';\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\nexport * from './custom-html.module';\nexport * from './custom-html.component';\nexport * from './custom-html.pipe';\n\nexport const CUSTOM_HTML_DIRECTIVES = [\n SanitizeHtmlPipe,\n CustomHtmlComponent\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MAOa,gBAAgB,CAAA;AACnB,IAAA,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC;AAEzC,IAAA,SAAS,CAAC,CAAS,EAAA;QACjB,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,CAAC;IACnD;uGALW,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;qGAAhB,gBAAgB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,cAAc;AACpB,oBAAA,UAAU,EAAE;AACb,iBAAA;;;MCIY,mBAAmB,CAAA;AAC9B,IAAA,IACI,IAAI,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;IACA,IAAI,IAAI,CAAC,KAAa,EAAA;AACpB,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK;IACpB;IACQ,KAAK,GAAG,EAAE;uGARP,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVhC,yEACA,EAAA,MAAA,EAAA,CAAA,oCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EDOY,gBAAgB,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,CAAA;;2FAEf,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;+BACE,iBAAiB,EAAA,OAAA,EAGlB,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,yEAAA,EAAA,MAAA,EAAA,CAAA,oCAAA,CAAA,EAAA;8BAIvB,IAAI,EAAA,CAAA;sBADP;;;AENH;;AAEG;MAKU,mBAAmB,CAAA;AAC9B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE;SACX;IACH;uGALW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHpB,gBAAgB,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACrC,gBAAgB,EAAE,mBAAmB,CAAA,EAAA,CAAA;wGAEpC,mBAAmB,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;AAChD,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,mBAAmB;AAChD,iBAAA;;;ACJM,MAAM,sBAAsB,GAAG;IACpC,gBAAgB;IAChB;;;ACTF;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-common-custom-html.mjs","sources":["../../../packages/common/custom-html/src/custom-html.pipe.ts","../../../packages/common/custom-html/src/custom-html.component.ts","../../../packages/common/custom-html/src/custom-html.component.html","../../../packages/common/custom-html/src/custom-html.module.ts","../../../packages/common/custom-html/src/public_api.ts","../../../packages/common/custom-html/src/igo2-common-custom-html.ts"],"sourcesContent":["import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({\n name: 'sanitizeHtml',\n standalone: true\n})\nexport class SanitizeHtmlPipe implements PipeTransform {\n private _sanitizer = inject(DomSanitizer);\n\n transform(v: string): SafeHtml {\n return this._sanitizer.bypassSecurityTrustHtml(v);\n }\n}\n","import { Component, Input } from '@angular/core';\n\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\n@Component({\n selector: 'igo-custom-html',\n templateUrl: './custom-html.component.html',\n styleUrls: ['./custom-html.component.scss'],\n imports: [SanitizeHtmlPipe]\n})\nexport class CustomHtmlComponent {\n @Input()\n get html(): string {\n return this._html;\n }\n set html(value: string) {\n this._html = value;\n }\n private _html = '';\n}\n","<div class=\"custom-html\" [innerHTML]=\"html | sanitizeHtml\"></div>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { CustomHtmlComponent } from './custom-html.component';\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\n/**\n * @deprecated import the components/directives directly or CUSTOM_HTML_DIRECTIVES for the set\n */\n@NgModule({\n imports: [SanitizeHtmlPipe, CustomHtmlComponent],\n exports: [SanitizeHtmlPipe, CustomHtmlComponent]\n})\nexport class IgoCustomHtmlModule {\n static forRoot(): ModuleWithProviders<IgoCustomHtmlModule> {\n return {\n ngModule: IgoCustomHtmlModule\n };\n }\n}\n","import { CustomHtmlComponent } from './custom-html.component';\nimport { SanitizeHtmlPipe } from './custom-html.pipe';\n\nexport * from './custom-html.module';\nexport * from './custom-html.component';\nexport * from './custom-html.pipe';\n\nexport const CUSTOM_HTML_DIRECTIVES = [\n SanitizeHtmlPipe,\n CustomHtmlComponent\n] as const;\n","/**\n * Generated bundle index. Do not edit.\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,EAAA,OAAA,EAGlB,CAAC,gBAAgB,CAAC,EAAA,QAAA,EAAA,yEAAA,EAAA,MAAA,EAAA,CAAA,oCAAA,CAAA,EAAA;;sBAG1B;;;AENH;;AAEG;MAKU,mBAAmB,CAAA;AAC9B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE;SACX;IACH;uGALW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHpB,gBAAgB,EAAE,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACrC,gBAAgB,EAAE,mBAAmB,CAAA,EAAA,CAAA;wGAEpC,mBAAmB,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,mBAAmB,CAAC;AAChD,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,mBAAmB;AAChD,iBAAA;;;ACJM,MAAM,sBAAsB,GAAG;IACpC,gBAAgB;IAChB;;;ACTF;;AAEG;;;;"}
@@ -0,0 +1,316 @@
1
+ import { DatePipe } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, LOCALE_ID, viewChild, input, model, output, Input, Component } from '@angular/core';
4
+ import * as i4 from '@angular/forms';
5
+ import { FormControl, ReactiveFormsModule } from '@angular/forms';
6
+ import * as i1 from '@angular/material/button';
7
+ import { MatButtonModule } from '@angular/material/button';
8
+ import { provideNativeDateAdapter } from '@angular/material/core';
9
+ import * as i5 from '@angular/material/datepicker';
10
+ import { MatDatepickerModule } from '@angular/material/datepicker';
11
+ import * as i2 from '@angular/material/form-field';
12
+ import { MatFormFieldModule } from '@angular/material/form-field';
13
+ import { MatIconModule } from '@angular/material/icon';
14
+ import * as i3 from '@angular/material/input';
15
+ import { MatInputModule } from '@angular/material/input';
16
+ import { resolveDate, isTimeFrame, TimeFrame } from '@igo2/utils';
17
+ import { Subject } from 'rxjs';
18
+ import { takeUntil } from 'rxjs/operators';
19
+
20
+ class DatepickerComponent {
21
+ datePipe = inject(DatePipe);
22
+ _locale = inject(LOCALE_ID);
23
+ picker = viewChild.required('picker');
24
+ set disabled(value) {
25
+ this._disabled = value;
26
+ this.setDisabledState();
27
+ }
28
+ get disabled() {
29
+ return this._disabled;
30
+ }
31
+ _disabled = false;
32
+ placeholder = input(undefined, ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
33
+ minDate = input(undefined, ...(ngDevMode ? [{ debugName: "minDate" }] : []));
34
+ maxDate = input(undefined, ...(ngDevMode ? [{ debugName: "maxDate" }] : []));
35
+ calendarType = input('date', ...(ngDevMode ? [{ debugName: "calendarType" }] : []));
36
+ startView = model(undefined, ...(ngDevMode ? [{ debugName: "startView" }] : []));
37
+ startAt = input(undefined, ...(ngDevMode ? [{ debugName: "startAt" }] : []));
38
+ datepickerFilter = input(undefined, ...(ngDevMode ? [{ debugName: "datepickerFilter" }] : []));
39
+ value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : []));
40
+ todayButtonLabel = input('Today', ...(ngDevMode ? [{ debugName: "todayButtonLabel" }] : []));
41
+ clearButtonLabel = input('Clear', ...(ngDevMode ? [{ debugName: "clearButtonLabel" }] : []));
42
+ valueChange = output();
43
+ get panelClassName() {
44
+ return ['year', 'month'].includes(this.calendarType())
45
+ ? 'igo-datepicker-month-year-picker'
46
+ : '';
47
+ }
48
+ resolveDate = resolveDate;
49
+ dateFormControl;
50
+ dateLabelFormControl;
51
+ showActions = false;
52
+ todaySelected = false;
53
+ previousTodaySelected;
54
+ previousValue;
55
+ destroy$ = new Subject();
56
+ ngOnInit() {
57
+ this.initStartView();
58
+ this.initFormControls();
59
+ this.todaySelected = isTimeFrame(this.value());
60
+ this.dateFormControl.valueChanges.subscribe((value) => {
61
+ this.picker().startAt = value;
62
+ if (!this.todaySelected) {
63
+ this.dateLabelFormControl.setValue(this.getFormattedLabel(value));
64
+ }
65
+ const emittedValue = this.todaySelected
66
+ ? this.calendarType() === 'datetime'
67
+ ? TimeFrame[0]
68
+ : TimeFrame[1]
69
+ : value;
70
+ this.valueChange.emit(emittedValue);
71
+ });
72
+ }
73
+ ngAfterViewInit() {
74
+ this.attachCalendarTypeListeners();
75
+ this.picker()
76
+ .openedStream.pipe(takeUntil(this.destroy$))
77
+ .subscribe(() => {
78
+ this.previousValue = this.dateFormControl.value;
79
+ this.previousTodaySelected = this.todaySelected;
80
+ this.todaySelected = false;
81
+ this.registerAutoCloseEvents();
82
+ });
83
+ this.picker()
84
+ .closedStream.pipe(takeUntil(this.destroy$))
85
+ .subscribe(() => {
86
+ if (this.previousValue === this.dateFormControl.value) {
87
+ this.todaySelected = this.previousTodaySelected;
88
+ }
89
+ else if (isTimeFrame(this.value())) {
90
+ this.todaySelected = true;
91
+ }
92
+ });
93
+ }
94
+ ngOnDestroy() {
95
+ this.destroy$.next();
96
+ this.destroy$.complete();
97
+ }
98
+ setToday() {
99
+ const keyword = this.calendarType() === 'datetime' ? TimeFrame[0] : TimeFrame[1];
100
+ const picker = this.picker();
101
+ const date = (picker.startAt = resolveDate(keyword));
102
+ this.dateLabelFormControl.setValue(this.getFormattedLabel(keyword));
103
+ this.todaySelected = true;
104
+ this.updateDateControl(date);
105
+ picker.close();
106
+ }
107
+ clearDate() {
108
+ this.dateFormControl.reset();
109
+ this.dateLabelFormControl.reset();
110
+ this.picker().close();
111
+ }
112
+ registerAutoCloseEvents() {
113
+ const resolvedMaxDate = resolveDate(this.maxDate());
114
+ this.showActions =
115
+ (!resolvedMaxDate || resolvedMaxDate >= new Date()) &&
116
+ ['date', 'datetime'].includes(this.calendarType());
117
+ if (this.showActions) {
118
+ // Workaround, we need the next event queue to get the calendar
119
+ setTimeout(() => {
120
+ const calendar = this.picker()['_componentRef'].instance._calendar;
121
+ calendar?._userSelection.subscribe((event) => {
122
+ this.dateFormControl.setValue(event.value);
123
+ this.picker().close();
124
+ });
125
+ }, 0);
126
+ }
127
+ }
128
+ /** Public API methods */
129
+ reset(date) {
130
+ this.todaySelected = isTimeFrame(date);
131
+ this.dateLabelFormControl.setValue(this.getFormattedLabel(date));
132
+ this.dateFormControl.setValue(resolveDate(date));
133
+ }
134
+ handleDateLabelBlur() {
135
+ const value = this.dateLabelFormControl.value;
136
+ const parsedDate = this.parseInput(value);
137
+ if (!parsedDate)
138
+ return;
139
+ this.dateFormControl.setValue(parsedDate);
140
+ }
141
+ parseInput(value) {
142
+ if (!value)
143
+ return undefined;
144
+ switch (this.calendarType()) {
145
+ case 'year':
146
+ return this.parseYearInput(value);
147
+ case 'month':
148
+ return this.parseMonthInput(value);
149
+ default:
150
+ return this.parseDateInput(value);
151
+ }
152
+ }
153
+ parseYearInput(value) {
154
+ // Accept "yyyy"
155
+ const match = value.match(/^\s*(\d{4})\s*$/);
156
+ if (!match)
157
+ return undefined;
158
+ const year = +match[1];
159
+ const date = new Date(year, 0, 1);
160
+ return date.getFullYear() === year ? date : undefined;
161
+ }
162
+ parseMonthInput(value) {
163
+ return this.parseFromLocalizedInput(value, {
164
+ year: 'numeric',
165
+ month: '2-digit'
166
+ });
167
+ }
168
+ parseDateInput(value) {
169
+ return this.parseFromLocalizedInput(value, {
170
+ year: 'numeric',
171
+ month: '2-digit',
172
+ day: '2-digit'
173
+ });
174
+ }
175
+ initStartView() {
176
+ if (this.startView())
177
+ return;
178
+ switch (this.calendarType()) {
179
+ case 'year':
180
+ this.startView.set('multi-year');
181
+ break;
182
+ case 'month':
183
+ this.startView.set('year');
184
+ break;
185
+ case 'date':
186
+ case 'datetime':
187
+ default:
188
+ this.startView.set('month');
189
+ break;
190
+ }
191
+ }
192
+ initFormControls() {
193
+ const date = this.value() ?? new Date();
194
+ this.dateFormControl = new FormControl({
195
+ value: resolveDate(date),
196
+ disabled: this.disabled
197
+ });
198
+ this.dateLabelFormControl = new FormControl({
199
+ value: this.getFormattedLabel(date),
200
+ disabled: this.disabled
201
+ });
202
+ }
203
+ setDisabledState() {
204
+ const method = this.disabled ? 'disable' : 'enable';
205
+ this.dateFormControl?.[method]({ emitEvent: false });
206
+ this.dateLabelFormControl?.[method]({ emitEvent: false });
207
+ }
208
+ attachCalendarTypeListeners() {
209
+ const calendarType = this.calendarType();
210
+ if (calendarType === 'year') {
211
+ this.picker().yearSelected.subscribe((date) => {
212
+ this.updateDateControl(date);
213
+ this.picker().close();
214
+ });
215
+ }
216
+ else if (calendarType === 'month') {
217
+ this.picker().monthSelected.subscribe((date) => {
218
+ this.updateDateControl(date);
219
+ this.picker().close();
220
+ });
221
+ }
222
+ }
223
+ updateDateControl(date) {
224
+ this.dateFormControl.setValue(date);
225
+ }
226
+ getFormattedLabel(date) {
227
+ if (isTimeFrame(date))
228
+ return this.todayButtonLabel();
229
+ const calendarType = this.calendarType();
230
+ if (calendarType === 'year') {
231
+ return this.format(date, 'yyyy');
232
+ }
233
+ else if (calendarType === 'month') {
234
+ return this.formatYearMonth(date);
235
+ }
236
+ return this.format(date, 'shortDate');
237
+ }
238
+ format(date, formatStr) {
239
+ return (this.datePipe.transform(date, formatStr, undefined, this._locale) ?? '');
240
+ }
241
+ formatYearMonth(date) {
242
+ return new Intl.DateTimeFormat(this._locale, {
243
+ year: 'numeric',
244
+ month: '2-digit'
245
+ }).format(date);
246
+ }
247
+ parseFromLocalizedInput(value, formatOptions) {
248
+ const expectedOrder = this.getExpectedDateOrder(formatOptions);
249
+ const inputParts = value.trim().match(/\d+/g);
250
+ if (!inputParts || inputParts.length !== expectedOrder.length)
251
+ return undefined;
252
+ let year;
253
+ let month;
254
+ let day;
255
+ expectedOrder.forEach((type, i) => {
256
+ const num = Number(inputParts[i]);
257
+ if (type === 'year')
258
+ year = num;
259
+ else if (type === 'month')
260
+ month = num;
261
+ else if (type === 'day')
262
+ day = num;
263
+ });
264
+ // Basic range checks
265
+ if (!year || !month || month < 1 || month > 12)
266
+ return undefined;
267
+ const date = new Date(year, month - 1, day !== undefined ? day : 1);
268
+ const isValid = date.getFullYear() === year &&
269
+ date.getMonth() === month - 1 &&
270
+ day !== undefined
271
+ ? date.getDate() === day
272
+ : true;
273
+ return isValid ? date : undefined;
274
+ }
275
+ /**
276
+ * Returns the expected order of date parts (year, month, day) as used by
277
+ * Intl.DateTimeFormat.formatToParts for the provided options and current locale.
278
+ */
279
+ getExpectedDateOrder(formatOptions) {
280
+ const sampleDate = new Date(2001, 1, 3);
281
+ const formatter = new Intl.DateTimeFormat(this._locale, formatOptions);
282
+ const formatParts = formatter.formatToParts(sampleDate);
283
+ // Extract expected order from locale formatting
284
+ const expectedOrder = [];
285
+ formatParts.forEach((part) => {
286
+ if (part.type === 'year' ||
287
+ part.type === 'month' ||
288
+ part.type === 'day') {
289
+ expectedOrder.push(part.type);
290
+ }
291
+ });
292
+ return expectedOrder;
293
+ }
294
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
295
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: DatepickerComponent, isStandalone: true, selector: "igo-datepicker", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, calendarType: { classPropertyName: "calendarType", publicName: "calendarType", isSignal: true, isRequired: false, transformFunction: null }, startView: { classPropertyName: "startView", publicName: "startView", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, datepickerFilter: { classPropertyName: "datepickerFilter", publicName: "datepickerFilter", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, todayButtonLabel: { classPropertyName: "todayButtonLabel", publicName: "todayButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, clearButtonLabel: { classPropertyName: "clearButtonLabel", publicName: "clearButtonLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { startView: "startViewChange", valueChange: "valueChange" }, providers: [DatePipe, provideNativeDateAdapter()], viewQueries: [{ propertyName: "picker", first: true, predicate: ["picker"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-form-field subscriptSizing=\"dynamic\">\n @if (startView() === 'multi-year' && calendarType() === 'year') {\n <mat-label>\n {{ placeholder() }}\n </mat-label>\n }\n\n <!-- Text input for displaying the selected date -->\n <input\n matInput\n type=\"text\"\n name=\"dateLabel\"\n [formControl]=\"dateLabelFormControl\"\n [placeholder]=\"placeholder()\"\n (blur)=\"handleDateLabelBlur()\"\n [readonly]=\"todaySelected\"\n />\n <!-- Hidden input for the actual datepicker -->\n <input\n [matDatepicker]=\"picker\"\n hidden=\"true\"\n name=\"date\"\n [formControl]=\"dateFormControl\"\n [min]=\"resolveDate(minDate())\"\n [max]=\"resolveDate(maxDate())\"\n [matDatepickerFilter]=\"datepickerFilter()\"\n />\n\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\" [disabled]=\"disabled\" />\n <mat-datepicker\n #picker\n [startView]=\"startView()\"\n [startAt]=\"resolveDate(startAt())\"\n [panelClass]=\"panelClassName\"\n >\n @if (showActions) {\n <mat-datepicker-actions>\n <button mat-button (click)=\"clearDate()\">\n {{ clearButtonLabel() }}\n </button>\n <button mat-raised-button color=\"primary\" (click)=\"setToday()\">\n {{ todayButtonLabel() }}\n </button>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n</mat-form-field>\n", styles: [":host mat-form-field{width:150px}::ng-deep .igo-datepicker-month-year-picker .mat-calendar-period-button{pointer-events:none;cursor:default;color:#00000061}.igo-datepicker-custom-footer{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px;gap:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i5.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i5.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i5.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }] });
296
+ }
297
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DatepickerComponent, decorators: [{
298
+ type: Component,
299
+ args: [{ selector: 'igo-datepicker', imports: [
300
+ MatButtonModule,
301
+ MatIconModule,
302
+ MatFormFieldModule,
303
+ MatInputModule,
304
+ ReactiveFormsModule,
305
+ MatDatepickerModule
306
+ ], providers: [DatePipe, provideNativeDateAdapter()], template: "<mat-form-field subscriptSizing=\"dynamic\">\n @if (startView() === 'multi-year' && calendarType() === 'year') {\n <mat-label>\n {{ placeholder() }}\n </mat-label>\n }\n\n <!-- Text input for displaying the selected date -->\n <input\n matInput\n type=\"text\"\n name=\"dateLabel\"\n [formControl]=\"dateLabelFormControl\"\n [placeholder]=\"placeholder()\"\n (blur)=\"handleDateLabelBlur()\"\n [readonly]=\"todaySelected\"\n />\n <!-- Hidden input for the actual datepicker -->\n <input\n [matDatepicker]=\"picker\"\n hidden=\"true\"\n name=\"date\"\n [formControl]=\"dateFormControl\"\n [min]=\"resolveDate(minDate())\"\n [max]=\"resolveDate(maxDate())\"\n [matDatepickerFilter]=\"datepickerFilter()\"\n />\n\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\" [disabled]=\"disabled\" />\n <mat-datepicker\n #picker\n [startView]=\"startView()\"\n [startAt]=\"resolveDate(startAt())\"\n [panelClass]=\"panelClassName\"\n >\n @if (showActions) {\n <mat-datepicker-actions>\n <button mat-button (click)=\"clearDate()\">\n {{ clearButtonLabel() }}\n </button>\n <button mat-raised-button color=\"primary\" (click)=\"setToday()\">\n {{ todayButtonLabel() }}\n </button>\n </mat-datepicker-actions>\n }\n </mat-datepicker>\n</mat-form-field>\n", styles: [":host mat-form-field{width:150px}::ng-deep .igo-datepicker-month-year-picker .mat-calendar-period-button{pointer-events:none;cursor:default;color:#00000061}.igo-datepicker-custom-footer{display:flex;justify-content:flex-end;align-items:center;padding:0 8px 8px;gap:5px}\n"] }]
307
+ }], propDecorators: { picker: [{ type: i0.ViewChild, args: ['picker', { isSignal: true }] }], disabled: [{
308
+ type: Input
309
+ }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], calendarType: [{ type: i0.Input, args: [{ isSignal: true, alias: "calendarType", required: false }] }], startView: [{ type: i0.Input, args: [{ isSignal: true, alias: "startView", required: false }] }, { type: i0.Output, args: ["startViewChange"] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], datepickerFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "datepickerFilter", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], todayButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayButtonLabel", required: false }] }], clearButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButtonLabel", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
310
+
311
+ /**
312
+ * Generated bundle index. Do not edit.
313
+ */
314
+
315
+ export { DatepickerComponent };
316
+ //# sourceMappingURL=igo2-common-datepicker.mjs.map