@enigmatry/entry-components 19.0.1-preview.5 → 20.0.1-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/button/index.d.ts +54 -3
- package/common/index.d.ts +243 -3
- package/date-time-picker/index.d.ts +100 -3
- package/dialog/index.d.ts +197 -3
- package/fesm2022/enigmatry-entry-components-button.mjs +19 -30
- package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-common.mjs +129 -133
- package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +53 -50
- package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-dialog.mjs +53 -78
- package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-file-input.mjs +55 -51
- package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-permissions.mjs +28 -23
- package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-search-filter.mjs +55 -59
- package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-spinner.mjs +21 -21
- package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-table.mjs +77 -86
- package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components-validation.mjs +43 -47
- package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2022/enigmatry-entry-components.mjs +6 -6
- package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
- package/file-input/index.d.ts +87 -5
- package/index.d.ts +37 -3
- package/package.json +10 -8
- package/permissions/index.d.ts +40 -5
- package/search-filter/index.d.ts +228 -3
- package/spinner/index.d.ts +34 -5
- package/table/README.md +6 -3
- package/table/index.d.ts +260 -4
- package/validation/index.d.ts +123 -3
- package/button/entry-button-config.d.ts +0 -30
- package/button/entry-button.directive.d.ts +0 -18
- package/button/entry-button.module.d.ts +0 -9
- package/button/public-api.d.ts +0 -3
- package/common/common.module.d.ts +0 -14
- package/common/constants.d.ts +0 -2
- package/common/date-time/entry-date-time-adapter.d.ts +0 -41
- package/common/date-time/entry-date-time-formats.d.ts +0 -25
- package/common/date-time/entry-time-adapter.d.ts +0 -9
- package/common/date-time/index.d.ts +0 -4
- package/common/date-time/native-time-adapter.d.ts +0 -13
- package/common/directives/auto-disable-button.directive.d.ts +0 -26
- package/common/directives/index.d.ts +0 -4
- package/common/directives/ng-control-accessor.directive.d.ts +0 -12
- package/common/directives/noop-control-value-accessor.d.ts +0 -10
- package/common/directives/scroll-to-invalid-control.directive.d.ts +0 -18
- package/common/event-plugins/abstract.plugin.d.ts +0 -40
- package/common/event-plugins/debounce.plugin.d.ts +0 -15
- package/common/event-plugins/index.d.ts +0 -2
- package/common/event-plugins/throttle.plugin.d.ts +0 -15
- package/common/interceptors/accept-language.interceptor.d.ts +0 -16
- package/common/interceptors/index.d.ts +0 -1
- package/common/public-api.d.ts +0 -6
- package/common/utils/index.d.ts +0 -1
- package/common/utils/provide-config.d.ts +0 -3
- package/date-time-picker/date-time-picker-config.model.d.ts +0 -20
- package/date-time-picker/date-time-picker.component.d.ts +0 -38
- package/date-time-picker/date-time-picker.module.d.ts +0 -17
- package/date-time-picker/public-api.d.ts +0 -3
- package/date-time-picker/time-picker.component.d.ts +0 -26
- package/dialog/dialogs/alert/entry-alert-dialog-data.interface.d.ts +0 -18
- package/dialog/dialogs/alert/entry-alert-dialog.component.d.ts +0 -13
- package/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.d.ts +0 -8
- package/dialog/dialogs/confirm/entry-confirm-dialog.component.d.ts +0 -13
- package/dialog/dialogs/entry-dialog.component.d.ts +0 -43
- package/dialog/dialogs/error/entry-error-dialog-data.interface.d.ts +0 -9
- package/dialog/dialogs/error/entry-error-dialog.component.d.ts +0 -15
- package/dialog/entry-dialog-buttons-alignment.type.d.ts +0 -2
- package/dialog/entry-dialog-config.model.d.ts +0 -33
- package/dialog/entry-dialog.module.d.ts +0 -15
- package/dialog/entry-dialog.service.d.ts +0 -55
- package/dialog/public-api.d.ts +0 -11
- package/file-input/entry-file-input.component.d.ts +0 -74
- package/file-input/entry-file-input.module.d.ts +0 -12
- package/file-input/public-api.d.ts +0 -2
- package/modules/entry-components.module.d.ts +0 -28
- package/permissions/permission-type.d.ts +0 -3
- package/permissions/permission.directive.d.ts +0 -11
- package/permissions/permission.guard.d.ts +0 -2
- package/permissions/permission.module.d.ts +0 -9
- package/permissions/permission.pipe.d.ts +0 -11
- package/permissions/permission.service.d.ts +0 -4
- package/permissions/public-api.d.ts +0 -5
- package/public-api.d.ts +0 -10
- package/search-filter/autocomplete/autocomplete-search-filter.component.d.ts +0 -22
- package/search-filter/autocomplete/autocomplete-search-filter.model.d.ts +0 -19
- package/search-filter/control-type.d.ts +0 -7
- package/search-filter/date/date-search-filter.component.d.ts +0 -10
- package/search-filter/date/date-search-filter.model.d.ts +0 -8
- package/search-filter/date-time/date-time-search-filter.component.d.ts +0 -10
- package/search-filter/date-time/date-time-search-filter.model.d.ts +0 -8
- package/search-filter/entry-search-filter.component.d.ts +0 -38
- package/search-filter/entry-search-filter.module.d.ts +0 -22
- package/search-filter/public-api.d.ts +0 -11
- package/search-filter/search-filter-base.model.d.ts +0 -29
- package/search-filter/search-filter-config.model.d.ts +0 -16
- package/search-filter/search-filter-params.type.d.ts +0 -7
- package/search-filter/select/select-search-filter.component.d.ts +0 -14
- package/search-filter/select/select-search-filter.model.d.ts +0 -22
- package/search-filter/select-option.model.d.ts +0 -12
- package/search-filter/text/text-search-filter.component.d.ts +0 -10
- package/search-filter/text/text-search-filter.model.d.ts +0 -8
- package/spinner/entry-spinner/spinner.component.d.ts +0 -24
- package/spinner/public-api.d.ts +0 -2
- package/spinner/spinner-overlay-container.d.ts +0 -17
- package/spinner/spinner.module.d.ts +0 -10
- package/table/components/entry-cell/entry-cell.component.d.ts +0 -10
- package/table/components/entry-cell-context-menu/entry-cell-context-menu.component.d.ts +0 -18
- package/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.d.ts +0 -10
- package/table/components/entry-table/entry-table.component.d.ts +0 -82
- package/table/components/index.d.ts +0 -4
- package/table/entry-table.module.d.ts +0 -20
- package/table/interfaces/cell-template.d.ts +0 -4
- package/table/interfaces/column-def.d.ts +0 -20
- package/table/interfaces/column-sort-prop.d.ts +0 -5
- package/table/interfaces/column-type-parameter.d.ts +0 -9
- package/table/interfaces/column-type.d.ts +0 -1
- package/table/interfaces/context-menu-item.d.ts +0 -7
- package/table/interfaces/entry-table-config.d.ts +0 -33
- package/table/interfaces/index.d.ts +0 -12
- package/table/interfaces/paged-query.d.ts +0 -15
- package/table/interfaces/pagination.d.ts +0 -19
- package/table/interfaces/row-class-formatter.d.ts +0 -3
- package/table/interfaces/row-context-menu-formatter.d.ts +0 -4
- package/table/interfaces/row-selection-formatter.d.ts +0 -4
- package/table/public-api.d.ts +0 -3
- package/validation/entry-display-control-validation.directive.d.ts +0 -27
- package/validation/entry-form-errors.component.d.ts +0 -18
- package/validation/entry-validation-config.model.d.ts +0 -48
- package/validation/entry-validation.d.ts +0 -15
- package/validation/entry-validation.module.d.ts +0 -11
- package/validation/public-api.d.ts +0 -6
- package/validation/validation-problem-details.interface.d.ts +0 -9
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { inject, ElementRef, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { MatButton, MatAnchor, MatButtonModule } from '@angular/material/button';
|
|
3
4
|
import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';
|
|
4
|
-
import * as i1 from '@angular/material/button';
|
|
5
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
6
5
|
import { CommonModule } from '@angular/common';
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -25,22 +24,23 @@ const ENTRY_BUTTON_CONFIG = createInjectionToken(new EntryButtonConfig());
|
|
|
25
24
|
/**
|
|
26
25
|
* Can be used to provide custom button configuration.
|
|
27
26
|
*/
|
|
28
|
-
|
|
29
|
-
return provideConfig(ENTRY_BUTTON_CONFIG, () => new EntryButtonConfig(config));
|
|
30
|
-
}
|
|
27
|
+
const provideEntryButtonConfig = (config) => provideConfig(ENTRY_BUTTON_CONFIG, () => new EntryButtonConfig(config));
|
|
31
28
|
|
|
32
29
|
class EntryButtonDirective {
|
|
33
|
-
constructor(
|
|
34
|
-
this._elementRef = _elementRef;
|
|
35
|
-
this._config = _config;
|
|
36
|
-
this._matButton = _matButton;
|
|
37
|
-
this._matAnchor = _matAnchor;
|
|
30
|
+
constructor() {
|
|
38
31
|
this.matClasses = {
|
|
39
32
|
basic: ['mdc-button', 'mat-mdc-button'],
|
|
40
33
|
raised: ['mdc-button', 'mdc-button--raised', 'mat-mdc-raised-button'],
|
|
41
34
|
stroked: ['mdc-button', 'mdc-button--outlined', 'mat-mdc-outlined-button'],
|
|
42
35
|
flat: ['mdc-button', 'mdc-button--unelevated', 'mat-mdc-unelevated-button']
|
|
43
36
|
};
|
|
37
|
+
this._elementRef = inject((ElementRef));
|
|
38
|
+
this._config = inject(ENTRY_BUTTON_CONFIG);
|
|
39
|
+
this._matButton = inject(MatButton, { optional: true });
|
|
40
|
+
this._matAnchor = inject(MatAnchor, { optional: true });
|
|
41
|
+
this.getEntryType = () => {
|
|
42
|
+
return this._elementRef.nativeElement.hasAttribute('entry-submit-button') ? 'submit' : 'cancel';
|
|
43
|
+
};
|
|
44
44
|
}
|
|
45
45
|
ngOnInit() {
|
|
46
46
|
const entryButtonType = this.getEntryType();
|
|
@@ -58,37 +58,26 @@ class EntryButtonDirective {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
? 'submit' : 'cancel';
|
|
64
|
-
}
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryButtonDirective, deps: [{ token: i0.ElementRef }, { token: ENTRY_BUTTON_CONFIG }, { token: i1.MatButton, optional: true }, { token: i1.MatAnchor, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
66
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.3", type: EntryButtonDirective, isStandalone: false, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]", ngImport: i0 }); }
|
|
61
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
62
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.2", type: EntryButtonDirective, isStandalone: false, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]", ngImport: i0 }); }
|
|
67
63
|
}
|
|
68
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryButtonDirective, decorators: [{
|
|
69
65
|
type: Directive,
|
|
70
66
|
args: [{
|
|
71
67
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
72
68
|
selector: `[mat-button][entry-submit-button],[mat-button][entry-cancel-button]`,
|
|
73
69
|
standalone: false
|
|
74
70
|
}]
|
|
75
|
-
}]
|
|
76
|
-
type: Inject,
|
|
77
|
-
args: [ENTRY_BUTTON_CONFIG]
|
|
78
|
-
}] }, { type: i1.MatButton, decorators: [{
|
|
79
|
-
type: Optional
|
|
80
|
-
}] }, { type: i1.MatAnchor, decorators: [{
|
|
81
|
-
type: Optional
|
|
82
|
-
}] }] });
|
|
71
|
+
}] });
|
|
83
72
|
|
|
84
73
|
class EntryButtonModule {
|
|
85
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
74
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
75
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.2", ngImport: i0, type: EntryButtonModule, declarations: [EntryButtonDirective], imports: [CommonModule,
|
|
87
76
|
MatButtonModule], exports: [EntryButtonDirective] }); }
|
|
88
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
77
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryButtonModule, imports: [CommonModule,
|
|
89
78
|
MatButtonModule] }); }
|
|
90
79
|
}
|
|
91
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryButtonModule, decorators: [{
|
|
92
81
|
type: NgModule,
|
|
93
82
|
args: [{
|
|
94
83
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enigmatry-entry-components-button.mjs","sources":["../../../../libs/entry-components/button/entry-button-config.ts","../../../../libs/entry-components/button/entry-button.directive.ts","../../../../libs/entry-components/button/entry-button.module.ts","../../../../libs/entry-components/button/enigmatry-entry-components-button.ts"],"sourcesContent":["import { Provider } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\r\n\r\n/** Possible mat button variants */\r\nexport declare type MatButtonVariants = 'basic' | 'flat' | 'raised' | 'stroked';\r\n\r\n//** MatButtonConfig containing type and color */\r\nexport interface MatButtonConfig {\r\n type: MatButtonVariants;\r\n color?: ThemePalette;\r\n}\r\n\r\n/**\r\n * Used to provide button configuration on module or application level.\r\n */\r\nexport class EntryButtonConfig {\r\n /** Submit button configuration */\r\n submit: MatButtonConfig;\r\n /** Cancel button configuration */\r\n cancel: MatButtonConfig;\r\n\r\n constructor(config: Partial<EntryButtonConfig> = {}) {\r\n this.submit = config.submit ?? { type: 'flat', color: 'primary' };\r\n this.cancel = config.cancel ?? { type: 'basic', color: 'accent' };\r\n }\r\n}\r\n\r\n/**\r\n * Entry button config injection token.\r\n *\r\n * Defaults:\r\n * - submit: type: 'flat', color: 'primary'\r\n * - cancel: type: 'basic', color: 'accent'\r\n */\r\nexport const ENTRY_BUTTON_CONFIG = createInjectionToken(new EntryButtonConfig());\r\n\r\n/**\r\n * Can be used to provide custom button configuration.\r\n */\r\nexport
|
|
1
|
+
{"version":3,"file":"enigmatry-entry-components-button.mjs","sources":["../../../../libs/entry-components/button/entry-button-config.ts","../../../../libs/entry-components/button/entry-button.directive.ts","../../../../libs/entry-components/button/entry-button.module.ts","../../../../libs/entry-components/button/enigmatry-entry-components-button.ts"],"sourcesContent":["import { Provider } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\r\n\r\n/** Possible mat button variants */\r\nexport declare type MatButtonVariants = 'basic' | 'flat' | 'raised' | 'stroked';\r\n\r\n//** MatButtonConfig containing type and color */\r\nexport interface MatButtonConfig {\r\n type: MatButtonVariants;\r\n color?: ThemePalette;\r\n}\r\n\r\n/**\r\n * Used to provide button configuration on module or application level.\r\n */\r\nexport class EntryButtonConfig {\r\n /** Submit button configuration */\r\n submit: MatButtonConfig;\r\n /** Cancel button configuration */\r\n cancel: MatButtonConfig;\r\n\r\n constructor(config: Partial<EntryButtonConfig> = {}) {\r\n this.submit = config.submit ?? { type: 'flat', color: 'primary' };\r\n this.cancel = config.cancel ?? { type: 'basic', color: 'accent' };\r\n }\r\n}\r\n\r\n/**\r\n * Entry button config injection token.\r\n *\r\n * Defaults:\r\n * - submit: type: 'flat', color: 'primary'\r\n * - cancel: type: 'basic', color: 'accent'\r\n */\r\nexport const ENTRY_BUTTON_CONFIG = createInjectionToken(new EntryButtonConfig());\r\n\r\n/**\r\n * Can be used to provide custom button configuration.\r\n */\r\nexport const provideEntryButtonConfig = (config: Partial<EntryButtonConfig>): Provider =>\r\n provideConfig(ENTRY_BUTTON_CONFIG, () => new EntryButtonConfig(config));\r\n","import { Directive, ElementRef, inject, OnInit } from '@angular/core';\nimport { MatButton, MatAnchor } from '@angular/material/button';\nimport { ThemePalette } from '@angular/material/core';\nimport { ENTRY_BUTTON_CONFIG, EntryButtonConfig, MatButtonConfig } from './entry-button-config';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `[mat-button][entry-submit-button],[mat-button][entry-cancel-button]`,\n standalone: false\n})\nexport class EntryButtonDirective implements OnInit {\n matClasses: { [key: string]: string[] } = {\n basic: ['mdc-button', 'mat-mdc-button'],\n raised: ['mdc-button', 'mdc-button--raised', 'mat-mdc-raised-button'],\n stroked: ['mdc-button', 'mdc-button--outlined', 'mat-mdc-outlined-button'],\n flat: ['mdc-button', 'mdc-button--unelevated', 'mat-mdc-unelevated-button']\n };\n\n private readonly _elementRef: ElementRef<HTMLElement> = inject(ElementRef<HTMLElement>);\n private readonly _config: EntryButtonConfig = inject(ENTRY_BUTTON_CONFIG);\n private readonly _matButton = inject(MatButton, { optional: true });\n private readonly _matAnchor = inject(MatAnchor, { optional: true });\n\n ngOnInit(): void {\n const entryButtonType: 'submit' | 'cancel' = this.getEntryType();\n const buttonConfig: MatButtonConfig = this._config[entryButtonType];\n\n const entryClasses: string[] = ['entry-button', `entry-${entryButtonType}-button`];\n const matClasses = this.matClasses[buttonConfig.type];\n\n this._elementRef.nativeElement.classList.add(...entryClasses, ...matClasses);\n\n const color: ThemePalette = buttonConfig.color;\n if (color) {\n if (this._matButton) {\n this._matButton.color = color;\n }\n if (this._matAnchor) {\n this._matAnchor.color = color;\n }\n }\n }\n\n private readonly getEntryType = (): 'submit' | 'cancel' => {\n return this._elementRef.nativeElement.hasAttribute('entry-submit-button') ? 'submit' : 'cancel';\n };\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { EntryButtonDirective } from './entry-button.directive';\n\n@NgModule({\n declarations: [\n EntryButtonDirective\n ],\n imports: [\n CommonModule,\n MatButtonModule\n ],\n exports: [\n EntryButtonDirective\n ]\n})\nexport class EntryButtonModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, Self, inject, Injectable, NgModule, InjectionToken, LOCALE_ID, Optional, Inject, SkipSelf } from '@angular/core';
|
|
3
1
|
import { CommonModule } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, ElementRef, Input, Directive, Injectable, NgModule, InjectionToken, LOCALE_ID, Optional, Inject, SkipSelf } from '@angular/core';
|
|
4
|
+
import { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';
|
|
5
|
+
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
4
6
|
import { Subject, fromEvent, timer, takeUntil as takeUntil$1 } from 'rxjs';
|
|
5
7
|
import { takeUntil } from 'rxjs/operators';
|
|
6
|
-
import {
|
|
7
|
-
import * as i1 from '@angular/forms';
|
|
8
|
-
import { NG_VALUE_ACCESSOR, NgControl, FormControlDirective, FormControlName, NgModel, UntypedFormControl } from '@angular/forms';
|
|
8
|
+
import { NgControl, FormControlDirective, FormControlName, NgModel, UntypedFormControl, NG_VALUE_ACCESSOR, ControlContainer } from '@angular/forms';
|
|
9
9
|
import { debounce, throttle } from 'lodash-es';
|
|
10
|
-
import
|
|
11
|
-
import * as i1$1 from '@angular/material/core';
|
|
10
|
+
import * as i1 from '@angular/material/core';
|
|
12
11
|
import { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';
|
|
13
12
|
|
|
14
13
|
const NG_VALID_CLASS = '.ng-valid';
|
|
@@ -25,15 +24,16 @@ const NG_INVALID_CLASS = '.ng-invalid';
|
|
|
25
24
|
* <button mat-button entry-submit-button entry-auto-disable="5000" type="submit">Submit</button>
|
|
26
25
|
*/
|
|
27
26
|
class AutoDisableButtonDirective {
|
|
28
|
-
constructor(
|
|
29
|
-
this.elementRef = elementRef;
|
|
27
|
+
constructor() {
|
|
30
28
|
this._destroy$ = new Subject();
|
|
31
29
|
this._disableIntervalInMs = 2000;
|
|
30
|
+
this.elementRef = inject(ElementRef);
|
|
32
31
|
}
|
|
33
32
|
get disableIntervalInMs() {
|
|
34
33
|
return this._disableIntervalInMs;
|
|
35
34
|
}
|
|
36
35
|
set disableIntervalInMs(value) {
|
|
36
|
+
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
37
37
|
this._disableIntervalInMs = coerceNumberProperty(value, 2000);
|
|
38
38
|
}
|
|
39
39
|
ngOnInit() {
|
|
@@ -68,74 +68,73 @@ class AutoDisableButtonDirective {
|
|
|
68
68
|
.pipe(takeUntil(this._destroy$))
|
|
69
69
|
.subscribe(() => button.disabled = false);
|
|
70
70
|
}
|
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
72
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AutoDisableButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
72
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.2", type: AutoDisableButtonDirective, isStandalone: true, selector: "button[entry-auto-disable]:not([disabled])", inputs: { disableIntervalInMs: ["entry-auto-disable", "disableIntervalInMs"] }, ngImport: i0 }); }
|
|
73
73
|
}
|
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AutoDisableButtonDirective, decorators: [{
|
|
75
75
|
type: Directive,
|
|
76
76
|
args: [{
|
|
77
77
|
standalone: true,
|
|
78
78
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
79
79
|
selector: 'button[entry-auto-disable]:not([disabled])'
|
|
80
80
|
}]
|
|
81
|
-
}],
|
|
81
|
+
}], propDecorators: { disableIntervalInMs: [{
|
|
82
82
|
type: Input,
|
|
83
83
|
args: ['entry-auto-disable']
|
|
84
84
|
}] } });
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
this.form = form;
|
|
93
|
-
this.elementRef = elementRef;
|
|
86
|
+
class NgControlAccessorDirective {
|
|
87
|
+
constructor() {
|
|
88
|
+
this.ngControl = inject(NgControl, {
|
|
89
|
+
optional: true,
|
|
90
|
+
self: true
|
|
91
|
+
});
|
|
94
92
|
this.destroy$ = new Subject();
|
|
95
93
|
}
|
|
96
94
|
ngOnInit() {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
if (this.ngControl instanceof FormControlDirective ||
|
|
96
|
+
this.ngControl instanceof FormControlName ||
|
|
97
|
+
this.ngControl instanceof NgModel) {
|
|
98
|
+
this.control = this.ngControl.control;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this.control = new UntypedFormControl();
|
|
102
|
+
}
|
|
103
|
+
if (this.ngControl instanceof NgModel) {
|
|
104
|
+
const ngModel = this.ngControl;
|
|
105
|
+
ngModel.control.valueChanges
|
|
106
|
+
.pipe(takeUntil$1(this.destroy$))
|
|
107
|
+
.subscribe(newValue => {
|
|
108
|
+
if (ngModel.model !== newValue || ngModel.viewModel !== newValue) {
|
|
109
|
+
ngModel.viewToModelUpdate(newValue);
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
104
113
|
}
|
|
105
114
|
ngOnDestroy() {
|
|
106
115
|
this.destroy$.next();
|
|
107
116
|
this.destroy$.complete();
|
|
108
117
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if (firstInvalidControl) {
|
|
112
|
-
firstInvalidControl.scrollIntoView({
|
|
113
|
-
behavior: 'smooth',
|
|
114
|
-
block: 'center' // vertical alignment
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: ScrollToInvalidControlDirective, deps: [{ token: i1.ControlContainer, self: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
119
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.3", type: ScrollToInvalidControlDirective, isStandalone: true, selector: "form[formGroup],form[ngForm]", ngImport: i0 }); }
|
|
118
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: NgControlAccessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
119
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.2", type: NgControlAccessorDirective, isStandalone: true, ngImport: i0 }); }
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: NgControlAccessorDirective, decorators: [{
|
|
122
122
|
type: Directive,
|
|
123
123
|
args: [{
|
|
124
|
-
standalone: true
|
|
125
|
-
selector: 'form[formGroup],form[ngForm]'
|
|
124
|
+
standalone: true
|
|
126
125
|
}]
|
|
127
|
-
}]
|
|
128
|
-
type: Self
|
|
129
|
-
}] }, { type: i0.ElementRef }] });
|
|
126
|
+
}] });
|
|
130
127
|
|
|
131
128
|
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
132
129
|
class NoopControlValueAccessorDirective {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
130
|
+
constructor() {
|
|
131
|
+
this.writeValue = (_obj) => { };
|
|
132
|
+
this.registerOnChange = (_fn) => { };
|
|
133
|
+
this.registerOnTouched = (_fn) => { };
|
|
134
|
+
this.setDisabledState = (_isDisabled) => { };
|
|
135
|
+
}
|
|
136
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: NoopControlValueAccessorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
137
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.2", type: NoopControlValueAccessorDirective, isStandalone: true, providers: [
|
|
139
138
|
{
|
|
140
139
|
provide: NG_VALUE_ACCESSOR,
|
|
141
140
|
multi: true,
|
|
@@ -143,7 +142,7 @@ class NoopControlValueAccessorDirective {
|
|
|
143
142
|
}
|
|
144
143
|
], ngImport: i0 }); }
|
|
145
144
|
}
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: NoopControlValueAccessorDirective, decorators: [{
|
|
147
146
|
type: Directive,
|
|
148
147
|
args: [{
|
|
149
148
|
standalone: true,
|
|
@@ -157,45 +156,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
157
156
|
}]
|
|
158
157
|
}] });
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
/**
|
|
160
|
+
* Scroll to first invalid control when form is submitted.
|
|
161
|
+
* Directive is applied to 'form[formGroup],form[ngForm]' (reactive or template driven forms)
|
|
162
|
+
*/
|
|
163
|
+
class ScrollToInvalidControlDirective {
|
|
161
164
|
constructor() {
|
|
162
|
-
this.ngControl = inject(NgControl, {
|
|
163
|
-
optional: true,
|
|
164
|
-
self: true
|
|
165
|
-
});
|
|
166
165
|
this.destroy$ = new Subject();
|
|
166
|
+
this.form = inject(ControlContainer, { self: true });
|
|
167
|
+
this.elementRef = inject((ElementRef));
|
|
167
168
|
}
|
|
168
169
|
ngOnInit() {
|
|
169
|
-
|
|
170
|
-
this.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
if (this.ngControl instanceof NgModel) {
|
|
178
|
-
const ngModel = this.ngControl;
|
|
179
|
-
ngModel.control.valueChanges
|
|
180
|
-
.pipe(takeUntil$1(this.destroy$))
|
|
181
|
-
.subscribe(newValue => {
|
|
182
|
-
if (ngModel.model !== newValue || ngModel.viewModel !== newValue) {
|
|
183
|
-
ngModel.viewToModelUpdate(newValue);
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}
|
|
170
|
+
fromEvent(this.elementRef.nativeElement, 'submit')
|
|
171
|
+
.pipe(takeUntil(this.destroy$))
|
|
172
|
+
.subscribe(_ => {
|
|
173
|
+
if (this.form.invalid) {
|
|
174
|
+
this.scrollToInvalidControl();
|
|
175
|
+
}
|
|
176
|
+
});
|
|
187
177
|
}
|
|
188
178
|
ngOnDestroy() {
|
|
189
179
|
this.destroy$.next();
|
|
190
180
|
this.destroy$.complete();
|
|
191
181
|
}
|
|
192
|
-
|
|
193
|
-
|
|
182
|
+
scrollToInvalidControl() {
|
|
183
|
+
const firstInvalidControl = this.elementRef.nativeElement.querySelector(NG_INVALID_CLASS);
|
|
184
|
+
if (firstInvalidControl) {
|
|
185
|
+
firstInvalidControl.scrollIntoView({
|
|
186
|
+
behavior: 'smooth',
|
|
187
|
+
block: 'center' // vertical alignment
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ScrollToInvalidControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
192
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.2", type: ScrollToInvalidControlDirective, isStandalone: true, selector: "form[formGroup],form[ngForm]", ngImport: i0 }); }
|
|
194
193
|
}
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
194
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ScrollToInvalidControlDirective, decorators: [{
|
|
196
195
|
type: Directive,
|
|
197
196
|
args: [{
|
|
198
|
-
standalone: true
|
|
197
|
+
standalone: true,
|
|
198
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
199
|
+
selector: 'form[formGroup],form[ngForm]'
|
|
199
200
|
}]
|
|
200
201
|
}] });
|
|
201
202
|
|
|
@@ -213,6 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
213
214
|
*/
|
|
214
215
|
class EventManagerPlugin {
|
|
215
216
|
}
|
|
217
|
+
|
|
216
218
|
/**
|
|
217
219
|
* Entry event plugin base class
|
|
218
220
|
*/
|
|
@@ -257,10 +259,10 @@ class DebounceEventPlugin extends EntryEventManagerPlugin {
|
|
|
257
259
|
// register event with debounced handler
|
|
258
260
|
return this.manager.addEventListener(element, this.unwrapEventName(eventName), debouncedHandler);
|
|
259
261
|
}
|
|
260
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
261
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
262
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DebounceEventPlugin, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
263
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DebounceEventPlugin }); }
|
|
262
264
|
}
|
|
263
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: DebounceEventPlugin, decorators: [{
|
|
264
266
|
type: Injectable
|
|
265
267
|
}] });
|
|
266
268
|
|
|
@@ -287,10 +289,10 @@ class ThrottleEventPlugin extends EntryEventManagerPlugin {
|
|
|
287
289
|
// register event with throttled handler
|
|
288
290
|
return this.manager.addEventListener(element, this.unwrapEventName(eventName), throttledHandler);
|
|
289
291
|
}
|
|
290
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
291
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
292
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ThrottleEventPlugin, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
293
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ThrottleEventPlugin }); }
|
|
292
294
|
}
|
|
293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
295
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: ThrottleEventPlugin, decorators: [{
|
|
294
296
|
type: Injectable
|
|
295
297
|
}] });
|
|
296
298
|
|
|
@@ -310,23 +312,25 @@ const NG_EVENT_PLUGINS = EVENT_PLUGINS.map(useClass => ({
|
|
|
310
312
|
useClass
|
|
311
313
|
}));
|
|
312
314
|
class EntryCommonModule {
|
|
315
|
+
// Has to be function since modules needs to work with statically defined providers
|
|
316
|
+
// eslint-disable-next-line prefer-arrow-functions/prefer-arrow-functions
|
|
313
317
|
static forRoot() {
|
|
314
318
|
return {
|
|
315
319
|
ngModule: EntryCommonModule,
|
|
316
320
|
providers: NG_EVENT_PLUGINS
|
|
317
321
|
};
|
|
318
322
|
}
|
|
319
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
320
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
324
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.2", ngImport: i0, type: EntryCommonModule, imports: [CommonModule, AutoDisableButtonDirective,
|
|
321
325
|
ScrollToInvalidControlDirective,
|
|
322
326
|
NoopControlValueAccessorDirective,
|
|
323
327
|
NgControlAccessorDirective], exports: [AutoDisableButtonDirective,
|
|
324
328
|
ScrollToInvalidControlDirective,
|
|
325
329
|
NoopControlValueAccessorDirective,
|
|
326
330
|
NgControlAccessorDirective] }); }
|
|
327
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
331
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCommonModule, imports: [CommonModule] }); }
|
|
328
332
|
}
|
|
329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryCommonModule, decorators: [{
|
|
330
334
|
type: NgModule,
|
|
331
335
|
args: [{
|
|
332
336
|
declarations: [],
|
|
@@ -340,18 +344,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
|
|
|
340
344
|
}]
|
|
341
345
|
}] });
|
|
342
346
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
provide: token,
|
|
352
|
-
useFactory: factory
|
|
353
|
-
};
|
|
354
|
-
}
|
|
347
|
+
const createInjectionToken = (defaultValue) => new InjectionToken(defaultValue?.constructor.name ?? 'DefaultToken', {
|
|
348
|
+
providedIn: 'root',
|
|
349
|
+
factory: () => defaultValue
|
|
350
|
+
});
|
|
351
|
+
const provideConfig = (token, factory) => ({
|
|
352
|
+
provide: token,
|
|
353
|
+
useFactory: factory
|
|
354
|
+
});
|
|
355
355
|
|
|
356
356
|
/**
|
|
357
357
|
* @deprecated switch to acceptLanguageInterceptor function (See: https://angular.dev/guide/http/interceptors#configuring-interceptors)
|
|
@@ -366,10 +366,10 @@ class AcceptLanguageInterceptor {
|
|
|
366
366
|
});
|
|
367
367
|
return next.handle(newRequest);
|
|
368
368
|
}
|
|
369
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
370
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
369
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AcceptLanguageInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
370
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AcceptLanguageInterceptor }); }
|
|
371
371
|
}
|
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: AcceptLanguageInterceptor, decorators: [{
|
|
373
373
|
type: Injectable
|
|
374
374
|
}] });
|
|
375
375
|
/**
|
|
@@ -384,13 +384,14 @@ const acceptLanguageInterceptor = (request, next) => {
|
|
|
384
384
|
};
|
|
385
385
|
|
|
386
386
|
class EntryTimeAdapter {
|
|
387
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
388
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
387
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTimeAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
388
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTimeAdapter }); }
|
|
389
389
|
}
|
|
390
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
390
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryTimeAdapter, decorators: [{
|
|
391
391
|
type: Injectable
|
|
392
392
|
}] });
|
|
393
393
|
|
|
394
|
+
/* eslint-disable @angular-eslint/prefer-inject */
|
|
394
395
|
/**
|
|
395
396
|
* Extends DateAdapter with time support. Used by EntryDateTimePicker component.
|
|
396
397
|
*/
|
|
@@ -491,23 +492,23 @@ class EntryDateTimeAdapter extends DateAdapter {
|
|
|
491
492
|
this.getMinutes(first) - this.getMinutes(second) ||
|
|
492
493
|
this.getSeconds(first) - this.getSeconds(second);
|
|
493
494
|
}
|
|
494
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
495
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDateTimeAdapter, deps: [{ token: MAT_DATE_LOCALE, optional: true }, { token: i1.DateAdapter, skipSelf: true }, { token: EntryTimeAdapter }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
496
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDateTimeAdapter }); }
|
|
496
497
|
}
|
|
497
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDateTimeAdapter, decorators: [{
|
|
498
499
|
type: Injectable
|
|
499
500
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
500
501
|
type: Optional
|
|
501
502
|
}, {
|
|
502
503
|
type: Inject,
|
|
503
504
|
args: [MAT_DATE_LOCALE]
|
|
504
|
-
}] }, { type: i1
|
|
505
|
+
}] }, { type: i1.DateAdapter, decorators: [{
|
|
505
506
|
type: SkipSelf
|
|
506
507
|
}] }, { type: EntryTimeAdapter }] });
|
|
507
508
|
|
|
508
509
|
const defaultDateTimeFormats = {
|
|
509
510
|
parse: {
|
|
510
|
-
dateInput: ['dd-MM-yyyy', 'dd-MM-yyyy HH', 'dd-MM-yyyy HH:mm']
|
|
511
|
+
dateInput: ['dd-MM-yyyy', 'dd-MM-yyyy HH', 'dd-MM-yyyy HH:mm']
|
|
511
512
|
},
|
|
512
513
|
display: {
|
|
513
514
|
dateInput: 'dd-MM-yyyy HH:mm',
|
|
@@ -519,31 +520,26 @@ const defaultDateTimeFormats = {
|
|
|
519
520
|
const ENTRY_MAT_DATE_TIME_FORMATS = new InjectionToken('entry-date-time-formats');
|
|
520
521
|
|
|
521
522
|
class EntryNativeTimeAdapter extends EntryTimeAdapter {
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
setTime(date, hours, minutes, seconds) {
|
|
532
|
-
date?.setHours(hours, minutes, seconds, 0);
|
|
533
|
-
return date;
|
|
523
|
+
constructor() {
|
|
524
|
+
super(...arguments);
|
|
525
|
+
this.getHours = (date) => date?.getHours();
|
|
526
|
+
this.getMinutes = (date) => date?.getMinutes();
|
|
527
|
+
this.getSeconds = (date) => date?.getSeconds();
|
|
528
|
+
this.setTime = (date, hours, minutes, seconds) => {
|
|
529
|
+
date?.setHours(hours, minutes, seconds, 0);
|
|
530
|
+
return date;
|
|
531
|
+
};
|
|
534
532
|
}
|
|
535
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
536
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
533
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryNativeTimeAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
534
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryNativeTimeAdapter }); }
|
|
537
535
|
}
|
|
538
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryNativeTimeAdapter, decorators: [{
|
|
539
537
|
type: Injectable
|
|
540
538
|
}] });
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
];
|
|
546
|
-
}
|
|
539
|
+
const provideEntryNativeTimeAdapter = (dateTimeFormats = defaultDateTimeFormats) => [
|
|
540
|
+
{ provide: EntryTimeAdapter, useClass: EntryNativeTimeAdapter },
|
|
541
|
+
{ provide: ENTRY_MAT_DATE_TIME_FORMATS, useValue: dateTimeFormats }
|
|
542
|
+
];
|
|
547
543
|
|
|
548
544
|
/**
|
|
549
545
|
* Generated bundle index. Do not edit.
|