@enigmatry/entry-components 1.14.19-alpha.0.4 → 1.15.1-preview.10
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/button/README.md +47 -0
- package/button/entry-button-config.d.ts +26 -0
- package/button/entry-button.directive.d.ts +22 -0
- package/button/entry-button.module.d.ts +9 -0
- package/button/index.d.ts +5 -0
- package/button/public-api.d.ts +3 -0
- package/dialog/dialogs/alert/entry-alert-dialog.component.d.ts +1 -1
- package/dialog/dialogs/confirm/entry-confirm-dialog.component.d.ts +1 -1
- package/dialog/dialogs/entry-dialog.component.d.ts +1 -1
- package/dialog/entry-dialog-buttons-alignment.type.d.ts +1 -1
- package/esm2020/button/enigmatry-entry-components-button.mjs +5 -0
- package/esm2020/button/entry-button-config.mjs +22 -0
- package/esm2020/button/entry-button.directive.mjs +58 -0
- package/esm2020/button/entry-button.module.mjs +28 -0
- package/esm2020/button/public-api.mjs +4 -0
- package/esm2020/dialog/dialogs/alert/entry-alert-dialog.component.mjs +3 -3
- package/esm2020/dialog/dialogs/confirm/entry-confirm-dialog.component.mjs +3 -3
- package/esm2020/dialog/dialogs/entry-dialog.component.mjs +3 -3
- package/esm2020/dialog/entry-dialog-buttons-alignment.type.mjs +2 -1
- package/esm2020/dialog/entry-dialog.module.mjs +4 -4
- package/esm2020/dialog/entry-dialog.service.mjs +3 -3
- package/esm2020/header/entry-header.component.mjs +3 -3
- package/esm2020/header/entry-header.module.mjs +4 -4
- package/esm2020/public-api.mjs +2 -1
- package/esm2020/search-filter/entry-search-filter.component.mjs +3 -3
- package/esm2020/search-filter/entry-search-filter.module.mjs +4 -4
- package/esm2020/search-filter/search-filter-input/search-filter-input.component.mjs +5 -5
- package/esm2020/toolbar/entry-toolbar.component.mjs +3 -3
- package/esm2020/toolbar/entry-toolbar.module.mjs +4 -4
- package/esm2020/validation/entry-display-control-validation.directive.mjs +3 -3
- package/esm2020/validation/entry-form-errors.component.mjs +4 -4
- package/esm2020/validation/entry-validation.module.mjs +4 -4
- package/fesm2015/enigmatry-entry-components-button.mjs +112 -0
- package/fesm2015/enigmatry-entry-components-button.mjs.map +1 -0
- package/fesm2015/enigmatry-entry-components-dialog.mjs +16 -16
- package/fesm2015/enigmatry-entry-components-header.mjs +7 -7
- package/fesm2015/enigmatry-entry-components-search-filter.mjs +12 -12
- package/fesm2015/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2015/enigmatry-entry-components-toolbar.mjs +7 -7
- package/fesm2015/enigmatry-entry-components-validation.mjs +11 -11
- package/fesm2015/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2015/enigmatry-entry-components.mjs +1 -0
- package/fesm2015/enigmatry-entry-components.mjs.map +1 -1
- package/fesm2020/enigmatry-entry-components-button.mjs +109 -0
- package/fesm2020/enigmatry-entry-components-button.mjs.map +1 -0
- package/fesm2020/enigmatry-entry-components-dialog.mjs +16 -16
- package/fesm2020/enigmatry-entry-components-header.mjs +7 -7
- package/fesm2020/enigmatry-entry-components-search-filter.mjs +12 -12
- package/fesm2020/enigmatry-entry-components-search-filter.mjs.map +1 -1
- package/fesm2020/enigmatry-entry-components-toolbar.mjs +7 -7
- package/fesm2020/enigmatry-entry-components-validation.mjs +11 -11
- package/fesm2020/enigmatry-entry-components-validation.mjs.map +1 -1
- package/fesm2020/enigmatry-entry-components.mjs +1 -0
- package/fesm2020/enigmatry-entry-components.mjs.map +1 -1
- package/header/entry-header.component.d.ts +1 -1
- package/package.json +16 -8
- package/public-api.d.ts +1 -0
- package/search-filter/entry-search-filter.component.d.ts +1 -1
- package/search-filter/search-filter-input/search-filter-input.component.d.ts +1 -1
- package/search-filter/search-filter-params.type.d.ts +1 -1
- package/styles/_generator.scss +17 -0
- package/styles/modules/_default-theme.scss +90 -0
- package/styles/modules/components/dialogs/_generator.scss +11 -0
- package/styles/modules/components/forms/_generator.scss +9 -0
- package/styles/modules/components/forms/outlines/_field-outlines.scss +45 -0
- package/styles/modules/components/forms/outlines/_form-fields.scss +26 -0
- package/styles/modules/components/forms/outlines/_general.scss +9 -0
- package/styles/modules/components/forms/selectors/_checkboxes.scss +55 -0
- package/styles/modules/components/forms/selectors/_radio-buttons.scss +39 -0
- package/styles/modules/components/headers/_generator.scss +12 -0
- package/styles/modules/components/tables/_cells.scss +23 -0
- package/styles/modules/components/tables/_generator.scss +7 -0
- package/styles/modules/components/tables/_no-result.scss +12 -0
- package/styles/modules/components/tables/_rows.scss +53 -0
- package/styles/modules/components/tables/_sorting.scss +18 -0
- package/styles/modules/components/tables/_table-body.scss +11 -0
- package/styles/modules/elements/_generator.scss +20 -0
- package/styles/modules/elements/anchors/_generator.scss +16 -0
- package/styles/modules/elements/buttons/_default.scss +12 -0
- package/styles/modules/elements/buttons/_generator.scss +45 -0
- package/styles/modules/states/_hover.scss +11 -20
- package/styles/modules/typography/_fonts.scss +40 -55
- package/styles/partials/core/components/_index.scss +4 -0
- package/{dialog/styles → styles}/partials/core/components/dialogs/_general.scss +9 -10
- package/styles/partials/core/components/forms/_general.scss +32 -0
- package/styles/partials/core/components/headers/_general.scss +7 -0
- package/styles/partials/core/components/tables/_action-cells.scss +26 -0
- package/styles/partials/core/components/tables/_cells.scss +39 -0
- package/styles/partials/core/components/tables/_index.scss +5 -0
- package/styles/partials/core/components/tables/_layout.scss +47 -0
- package/styles/partials/core/components/tables/_rows.scss +13 -0
- package/styles/partials/core/components/tables/_sorting.scss +8 -0
- package/styles/partials/test.scss +35 -0
- package/styles/partials/theming.scss +1 -0
- package/toolbar/entry-toolbar.component.d.ts +1 -1
- package/validation/entry-display-control-validation.directive.d.ts +1 -1
- package/validation/entry-form-errors.component.d.ts +1 -1
- package/dialog/styles/modules/_generator.scss +0 -11
- package/dialog/styles/modules/components/dialogs/_general.scss +0 -11
- package/dialog/styles/modules/components/dialogs/footers/_general.scss +0 -26
- package/dialog/styles/modules/components/dialogs/headers/_general.scss +0 -16
- package/dialog/styles/modules/theming/_default-theming.scss +0 -29
- package/dialog/styles/partials/core/_index.scss +0 -3
- package/dialog/styles/partials/core/components/_index.scss +0 -1
- package/dialog/styles/partials/core/components/dialogs/_index.scss +0 -1
- package/dialog/styles/partials/core/elements/_general.scss +0 -10
- package/dialog/styles/partials/core/elements/_index.scss +0 -1
- package/dialog/styles/partials/core/layouts/_alignments.scss +0 -13
- package/dialog/styles/partials/core/layouts/_index.scss +0 -1
- package/dialog/styles/partials/main.scss +0 -1
- package/header/styles/modules/_generator.scss +0 -13
- package/header/styles/modules/components/buttons/_general.scss +0 -26
- package/header/styles/modules/components/headers/_general.scss +0 -13
- package/header/styles/modules/theming/_default-theming.scss +0 -21
- package/header/styles/partials/core/_index.scss +0 -3
- package/header/styles/partials/core/components/_index.scss +0 -2
- package/header/styles/partials/core/components/buttons/_general.scss +0 -42
- package/header/styles/partials/core/components/buttons/_index.scss +0 -1
- package/header/styles/partials/core/components/headers/_general.scss +0 -9
- package/header/styles/partials/core/components/headers/_index.scss +0 -1
- package/header/styles/partials/core/elements/_index.scss +0 -1
- package/header/styles/partials/core/elements/headings.scss +0 -3
- package/header/styles/partials/core/layouts/_alignment.scss +0 -6
- package/header/styles/partials/core/layouts/_index.scss +0 -1
- package/header/styles/partials/main.scss +0 -1
- package/styles/_generate.scss +0 -15
- package/styles/modules/_breakpoints.scss +0 -37
- package/styles/modules/_generate.scss +0 -5
- package/styles/modules/_variables.scss +0 -22
- package/styles/modules/theming/_default-theming.scss +0 -9
- package/styles/modules/typography/_generate.scss +0 -7
- package/toolbar/styles/modules/_generate.scss +0 -10
- package/toolbar/styles/modules/components/toolbar/_general.scss +0 -34
- package/toolbar/styles/modules/theming/_default-theming.scss +0 -8
- package/toolbar/styles/partials/core/_index.scss +0 -1
- package/toolbar/styles/partials/core/components/_index.scss +0 -1
- package/toolbar/styles/partials/core/components/toolbar/_general.scss +0 -100
- package/toolbar/styles/partials/core/components/toolbar/_index.scss +0 -1
- package/toolbar/styles/partials/main.scss +0 -1
|
@@ -18,13 +18,13 @@ import { MatInputModule } from '@angular/material/input';
|
|
|
18
18
|
*/
|
|
19
19
|
class EntryFormErrorsComponent {
|
|
20
20
|
}
|
|
21
|
-
EntryFormErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
EntryFormErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
21
|
+
EntryFormErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryFormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22
|
+
EntryFormErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntryFormErrorsComponent, selector: "entry-form-errors", inputs: { form: "form" }, ngImport: i0, template: `
|
|
23
23
|
<div *ngIf="form.errors">
|
|
24
24
|
<mat-error *ngFor="let error of form.errors.general">{{error}}</mat-error>
|
|
25
25
|
</div>
|
|
26
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatError, selector: "mat-error", inputs: ["id"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
26
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryFormErrorsComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{
|
|
30
30
|
selector: 'entry-form-errors',
|
|
@@ -154,9 +154,9 @@ class EntryDisplayControlValidationDirective {
|
|
|
154
154
|
return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
EntryDisplayControlValidationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
158
|
-
EntryDisplayControlValidationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
157
|
+
EntryDisplayControlValidationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDisplayControlValidationDirective, deps: [{ token: ENTRY_VALIDATION_CONFIG }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
158
|
+
EntryDisplayControlValidationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: { control: "control" }, ngImport: i0 });
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDisplayControlValidationDirective, decorators: [{
|
|
160
160
|
type: Directive,
|
|
161
161
|
args: [{
|
|
162
162
|
selector: '[entryDisplayControlValidation]'
|
|
@@ -172,18 +172,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
172
172
|
|
|
173
173
|
class EntryValidationModule {
|
|
174
174
|
}
|
|
175
|
-
EntryValidationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
176
|
-
EntryValidationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
175
|
+
EntryValidationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
176
|
+
EntryValidationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, declarations: [EntryFormErrorsComponent,
|
|
177
177
|
EntryDisplayControlValidationDirective], imports: [CommonModule,
|
|
178
178
|
FormsModule,
|
|
179
179
|
ReactiveFormsModule,
|
|
180
180
|
MatInputModule], exports: [EntryFormErrorsComponent,
|
|
181
181
|
EntryDisplayControlValidationDirective] });
|
|
182
|
-
EntryValidationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
182
|
+
EntryValidationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, imports: [CommonModule,
|
|
183
183
|
FormsModule,
|
|
184
184
|
ReactiveFormsModule,
|
|
185
185
|
MatInputModule] });
|
|
186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryValidationModule, decorators: [{
|
|
187
187
|
type: NgModule,
|
|
188
188
|
args: [{
|
|
189
189
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enigmatry-entry-components-validation.mjs","sources":["../../../../libs/entry-components/validation/entry-form-errors.component.ts","../../../../libs/entry-components/validation/entry-validation-config.model.ts","../../../../libs/entry-components/validation/entry-validation.ts","../../../../libs/entry-components/validation/entry-display-control-validation.directive.ts","../../../../libs/entry-components/validation/entry-validation.module.ts","../../../../libs/entry-components/validation/enigmatry-entry-components-validation.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\n/**\n * A component used to display generic (form level) server side validation messages.\n * The messages are displayed as a list, each message in a new row.\n *\n * @example\n * ```html\n * <entry-form-errors [form]=\"myForm\">\n * </entry-form-errors>\n * ```\n */\n@Component({\n selector: 'entry-form-errors',\n template: `\n <div *ngIf=\"form.errors\">\n <mat-error *ngFor=\"let error of form.errors.general\">{{error}}</mat-error>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class EntryFormErrorsComponent {\n /** A form group for which the validation errors are being displayed. */\n @Input() form: UntypedFormGroup;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\n\n/** Used to configure mapping between validation keys and messages */\nexport interface IEntryValidationMessage {\n /** Validation key (e.g. '_required_', '_minlength_', '_email_', etc.) */\n name: string;\n /**\n * Validation message. Can be static string or expression returning string\n * (when messages need to be resolved dynamically: parametrization, localization, etc.).\n */\n message: string | ((control: AbstractControl) => string);\n}\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryValidationConfig {\n /**\n * Validation key to message configuration on module level. Used to configure client side validation messages\n * for standard validators (_required_, _minLength_, _email_, etc.).\n *\n * **NOTE:** If using _Formly_ package to render forms, this configuration should not be used.\n * Instead, use `FormlyModule` to configure validation messages.\n *\n * @example\n * ```ts\n * new EntryValidationConfig() {\n * validationMessages: [\n * { name: 'required': message: 'This field is mandatory' },\n * { name: 'minlength', message: (control: AbstractControl) => `Minimal length is ${control.errors.minlength.requiredLength}`}\n * ]\n * }\n * ```\n */\n validationMessages: IEntryValidationMessage[];\n\n constructor(config: Partial<EntryValidationConfig> = {}) {\n this.validationMessages = config.validationMessages ?? [];\n }\n}\n\n/**\n * Entry validation injection token of EntryValidationConfig type containing validation default configurations.\n * Can be updated with custom configuration.\n *\n * Defaults:\n * - validationMessages: []\n */\nexport const ENTRY_VALIDATION_CONFIG = new InjectionToken<EntryValidationConfig>(\n 'EntryValidationConfig',\n {\n providedIn: 'root',\n factory: () => new EntryValidationConfig()\n }\n);\n","import { AbstractControl, FormArray, FormGroup, UntypedFormGroup, ValidationErrors } from '@angular/forms';\nimport { IValidationProblemDetails } from './validation-problem-details.interface';\n\n/** A key used to map server side validation errors on form level */\nconst FORM_ERROR_KEY = 'general';\n/** A key used to map server side validation errors on form field level */\nconst FORM_FIELD_ERROR_KEY = 'fromServer';\n\nconst getFormControl = (formControl: AbstractControl | null | undefined, keys: string[]): AbstractControl | null | undefined => {\n if (keys.length === 0) {\n return formControl;\n }\n if (formControl instanceof FormGroup) {\n return getFormControl(formControl.controls[keys[0].charAt(0).toLowerCase() + keys[0].slice(1)], keys.slice(1));\n }\n if (formControl instanceof FormArray && +keys[0] >= 0) {\n return getFormControl(formControl.controls[+keys[0]], keys.slice(1));\n }\n return null;\n};\n\n/**\n * Applies validation errors received from server side to the form.\n * The errors are applied to multiple levels: form, form group, form array, and form field.\n *\n * @param error Server side validation errors response.\n * @param form Form to apply validation errors to.\n */\nconst setServerSideValidationErrors = (error: IValidationProblemDetails, form: UntypedFormGroup) => {\n form.setErrors(null);\n const validationErrors = error?.errors;\n const formErrors: ValidationErrors = {};\n\n if (validationErrors) {\n // eslint-disable-next-line guard-for-in\n for (const key in validationErrors) {\n const control = getFormControl(form, key.split(/[.[\\]]+/gu));\n\n if (control) {\n const fieldErrors = {} as ValidationErrors;\n fieldErrors[FORM_FIELD_ERROR_KEY] = validationErrors[key];\n control.setErrors(fieldErrors);\n control.markAsTouched();\n } else {\n formErrors[FORM_ERROR_KEY] =\n formErrors[FORM_ERROR_KEY]?.concat(validationErrors[key]) || validationErrors[key];\n }\n }\n } else {\n formErrors[FORM_ERROR_KEY] = [`An error occurred on the server.`];\n }\n\n form.setErrors(formErrors);\n};\n\nexport {\n FORM_FIELD_ERROR_KEY,\n setServerSideValidationErrors\n};\n","import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ENTRY_VALIDATION_CONFIG, EntryValidationConfig } from './entry-validation-config.model';\nimport { AbstractControl, FormControlStatus } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { FORM_FIELD_ERROR_KEY } from './entry-validation';\n\n/**\n * A directive that displays configured validation messages or server side validations for given form control.\n * The messages are separated with coma(,) and displayed as _innerHTML_ value of host component.\n *\n * @example\n * ```html\n * <div entryDisplayControlValidation [control]=\"myForm.controls.firstName\">\n * </div\n * ```\n */\n@Directive({\n selector: '[entryDisplayControlValidation]'\n})\nexport class EntryDisplayControlValidationDirective implements OnInit, OnDestroy {\n /** Form control for which the validation messages are displayed for. */\n @Input() control: AbstractControl;\n\n private _controlSubscription: Subscription | undefined;\n\n constructor(\n @Inject(ENTRY_VALIDATION_CONFIG) private readonly _config: EntryValidationConfig,\n private readonly _element: ElementRef) {}\n\n ngOnInit(): void {\n this._controlSubscription = this.control.statusChanges\n .subscribe((controlStatus: FormControlStatus) => {\n if (controlStatus === 'INVALID') {\n this._element.nativeElement.innerText = this.extractValidationMessages();\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this._controlSubscription) {\n this._controlSubscription.unsubscribe();\n }\n }\n\n private extractValidationMessages(): string {\n if (!this.control.errors) {\n return '';\n }\n const errorsString = this._config.validationMessages\n .map(validationMessage => this.control.errors[validationMessage.name]\n ? typeof(validationMessage.message) === 'string'\n ? validationMessage.message : validationMessage.message(this.control)\n : ''\n )\n .filter(message => message !== '')\n .join(', ');\n\n const serverErrors = this.control.errors[FORM_FIELD_ERROR_KEY];\n const serverErrorsString = serverErrors instanceof Array ? serverErrors.join(', ') : '';\n\n return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntryFormErrorsComponent } from './entry-form-errors.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EntryDisplayControlValidationDirective } from './entry-display-control-validation.directive';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule\n ],\n exports: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ]\n})\nexport class EntryValidationModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;;;;;;AASG;MAUU,wBAAwB,CAAA;;qHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAPzB,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,CAAA,CAAA;2FAGU,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AA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,iBAd9B,wBAAwB;AACxB,QAAA,sCAAsC,aAGtC,YAAY;QACZ,WAAW;QACX,mBAAmB;AACnB,QAAA,cAAc,aAGd,wBAAwB;QACxB,sCAAsC,CAAA,EAAA,CAAA,CAAA;AAG7B,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAV9B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc,CAAA,EAAA,CAAA,CAAA;2FAOL,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAhBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"enigmatry-entry-components-validation.mjs","sources":["../../../../libs/entry-components/validation/entry-form-errors.component.ts","../../../../libs/entry-components/validation/entry-validation-config.model.ts","../../../../libs/entry-components/validation/entry-validation.ts","../../../../libs/entry-components/validation/entry-display-control-validation.directive.ts","../../../../libs/entry-components/validation/entry-validation.module.ts","../../../../libs/entry-components/validation/enigmatry-entry-components-validation.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\n/**\n * A component used to display generic (form level) server side validation messages.\n * The messages are displayed as a list, each message in a new row.\n *\n * @example\n * ```html\n * <entry-form-errors [form]=\"myForm\">\n * </entry-form-errors>\n * ```\n */\n@Component({\n selector: 'entry-form-errors',\n template: `\n <div *ngIf=\"form.errors\">\n <mat-error *ngFor=\"let error of form.errors.general\">{{error}}</mat-error>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class EntryFormErrorsComponent {\n /** A form group for which the validation errors are being displayed. */\n @Input() form: UntypedFormGroup;\n}\n","import { InjectionToken } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\n\n/** Used to configure mapping between validation keys and messages */\nexport interface IEntryValidationMessage {\n /** Validation key (e.g. '_required_', '_minlength_', '_email_', etc.) */\n name: string;\n /**\n * Validation message. Can be static string or expression returning string\n * (when messages need to be resolved dynamically: parametrization, localization, etc.).\n */\n message: string | ((control: AbstractControl) => string);\n}\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryValidationConfig {\n /**\n * Validation key to message configuration on module level. Used to configure client side validation messages\n * for standard validators (_required_, _minLength_, _email_, etc.).\n *\n * **NOTE:** If using _Formly_ package to render forms, this configuration should not be used.\n * Instead, use `FormlyModule` to configure validation messages.\n *\n * @example\n * ```ts\n * new EntryValidationConfig() {\n * validationMessages: [\n * { name: 'required': message: 'This field is mandatory' },\n * { name: 'minlength', message: (control: AbstractControl) => `Minimal length is ${control.errors.minlength.requiredLength}`}\n * ]\n * }\n * ```\n */\n validationMessages: IEntryValidationMessage[];\n\n constructor(config: Partial<EntryValidationConfig> = {}) {\n this.validationMessages = config.validationMessages ?? [];\n }\n}\n\n/**\n * Entry validation injection token of EntryValidationConfig type containing validation default configurations.\n * Can be updated with custom configuration.\n *\n * Defaults:\n * - validationMessages: []\n */\nexport const ENTRY_VALIDATION_CONFIG = new InjectionToken<EntryValidationConfig>(\n 'EntryValidationConfig',\n {\n providedIn: 'root',\n factory: () => new EntryValidationConfig()\n }\n);\n","import { AbstractControl, FormArray, FormGroup, UntypedFormGroup, ValidationErrors } from '@angular/forms';\nimport { IValidationProblemDetails } from './validation-problem-details.interface';\n\n/** A key used to map server side validation errors on form level */\nconst FORM_ERROR_KEY = 'general';\n/** A key used to map server side validation errors on form field level */\nconst FORM_FIELD_ERROR_KEY = 'fromServer';\n\nconst getFormControl = (formControl: AbstractControl | null | undefined, keys: string[]): AbstractControl | null | undefined => {\n if (keys.length === 0) {\n return formControl;\n }\n if (formControl instanceof FormGroup) {\n return getFormControl(formControl.controls[keys[0].charAt(0).toLowerCase() + keys[0].slice(1)], keys.slice(1));\n }\n if (formControl instanceof FormArray && +keys[0] >= 0) {\n return getFormControl(formControl.controls[+keys[0]], keys.slice(1));\n }\n return null;\n};\n\n/**\n * Applies validation errors received from server side to the form.\n * The errors are applied to multiple levels: form, form group, form array, and form field.\n *\n * @param error Server side validation errors response.\n * @param form Form to apply validation errors to.\n */\nconst setServerSideValidationErrors = (error: IValidationProblemDetails, form: UntypedFormGroup) => {\n form.setErrors(null);\n const validationErrors = error?.errors;\n const formErrors: ValidationErrors = {};\n\n if (validationErrors) {\n // eslint-disable-next-line guard-for-in\n for (const key in validationErrors) {\n const control = getFormControl(form, key.split(/[.[\\]]+/gu));\n\n if (control) {\n const fieldErrors = {} as ValidationErrors;\n fieldErrors[FORM_FIELD_ERROR_KEY] = validationErrors[key];\n control.setErrors(fieldErrors);\n control.markAsTouched();\n } else {\n formErrors[FORM_ERROR_KEY] =\n formErrors[FORM_ERROR_KEY]?.concat(validationErrors[key]) || validationErrors[key];\n }\n }\n } else {\n formErrors[FORM_ERROR_KEY] = [`An error occurred on the server.`];\n }\n\n form.setErrors(formErrors);\n};\n\nexport {\n FORM_FIELD_ERROR_KEY,\n setServerSideValidationErrors\n};\n","import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ENTRY_VALIDATION_CONFIG, EntryValidationConfig } from './entry-validation-config.model';\nimport { AbstractControl, FormControlStatus } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { FORM_FIELD_ERROR_KEY } from './entry-validation';\n\n/**\n * A directive that displays configured validation messages or server side validations for given form control.\n * The messages are separated with coma(,) and displayed as _innerHTML_ value of host component.\n *\n * @example\n * ```html\n * <div entryDisplayControlValidation [control]=\"myForm.controls.firstName\">\n * </div\n * ```\n */\n@Directive({\n selector: '[entryDisplayControlValidation]'\n})\nexport class EntryDisplayControlValidationDirective implements OnInit, OnDestroy {\n /** Form control for which the validation messages are displayed for. */\n @Input() control: AbstractControl;\n\n private _controlSubscription: Subscription | undefined;\n\n constructor(\n @Inject(ENTRY_VALIDATION_CONFIG) private readonly _config: EntryValidationConfig,\n private readonly _element: ElementRef) {}\n\n ngOnInit(): void {\n this._controlSubscription = this.control.statusChanges\n .subscribe((controlStatus: FormControlStatus) => {\n if (controlStatus === 'INVALID') {\n this._element.nativeElement.innerText = this.extractValidationMessages();\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this._controlSubscription) {\n this._controlSubscription.unsubscribe();\n }\n }\n\n private extractValidationMessages(): string {\n if (!this.control.errors) {\n return '';\n }\n const errorsString = this._config.validationMessages\n .map(validationMessage => this.control.errors[validationMessage.name]\n ? typeof(validationMessage.message) === 'string'\n ? validationMessage.message : validationMessage.message(this.control)\n : ''\n )\n .filter(message => message !== '')\n .join(', ');\n\n const serverErrors = this.control.errors[FORM_FIELD_ERROR_KEY];\n const serverErrorsString = serverErrors instanceof Array ? serverErrors.join(', ') : '';\n\n return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntryFormErrorsComponent } from './entry-form-errors.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EntryDisplayControlValidationDirective } from './entry-display-control-validation.directive';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule\n ],\n exports: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ]\n})\nexport class EntryValidationModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGA;;;;;;;;;AASG;MAUU,wBAAwB,CAAA;;qHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAPzB,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;AAIT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,cAAA,EAAA,eAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,IAAA,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,CAAA,IAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,CAAA,CAAA;2FAGU,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,o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,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,iBAd9B,wBAAwB;AACxB,QAAA,sCAAsC,aAGtC,YAAY;QACZ,WAAW;QACX,mBAAmB;AACnB,QAAA,cAAc,aAGd,wBAAwB;QACxB,sCAAsC,CAAA,EAAA,CAAA,CAAA;AAG7B,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAV9B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc,CAAA,EAAA,CAAA,CAAA;2FAOL,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAhBjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;;;"}
|
|
@@ -3,6 +3,7 @@ export * from '@enigmatry/entry-components/dialog';
|
|
|
3
3
|
export * from '@enigmatry/entry-components/search-filter';
|
|
4
4
|
export * from '@enigmatry/entry-components/toolbar';
|
|
5
5
|
export * from '@enigmatry/entry-components/validation';
|
|
6
|
+
export * from '@enigmatry/entry-components/button';
|
|
6
7
|
|
|
7
8
|
/*
|
|
8
9
|
* Public API Surface of entry-components
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enigmatry-entry-components.mjs","sources":["../../../../libs/entry-components/public-api.ts","../../../../libs/entry-components/enigmatry-entry-components.ts"],"sourcesContent":["/*\n * Public API Surface of entry-components\n */\n\nexport * from '@enigmatry/entry-components/header';\nexport * from '@enigmatry/entry-components/dialog';\nexport * from '@enigmatry/entry-components/search-filter';\nexport * from '@enigmatry/entry-components/toolbar';\nexport * from '@enigmatry/entry-components/validation';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"enigmatry-entry-components.mjs","sources":["../../../../libs/entry-components/public-api.ts","../../../../libs/entry-components/enigmatry-entry-components.ts"],"sourcesContent":["/*\n * Public API Surface of entry-components\n */\n\nexport * from '@enigmatry/entry-components/header';\nexport * from '@enigmatry/entry-components/dialog';\nexport * from '@enigmatry/entry-components/search-filter';\nexport * from '@enigmatry/entry-components/toolbar';\nexport * from '@enigmatry/entry-components/validation';\nexport * from '@enigmatry/entry-components/button';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG;;ACFH;;AAEG"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Directive, Inject, Optional, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/material/button';
|
|
4
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Used to provide button configuration on module or application level.
|
|
9
|
+
*/
|
|
10
|
+
class EntryButtonConfig {
|
|
11
|
+
constructor(config = {}) {
|
|
12
|
+
this.submitButton = config.submitButton ?? { type: 'flat', color: 'primary' };
|
|
13
|
+
this.cancelButton = config.cancelButton ?? { type: 'basic' };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Entry button config injection token. Can be used to provide custom button configuration.
|
|
18
|
+
*
|
|
19
|
+
* Defaults:
|
|
20
|
+
* - submitButton: type: 'flat', color: 'primary'
|
|
21
|
+
* - cancelButton: type: 'basic'
|
|
22
|
+
*/
|
|
23
|
+
const ENTRY_BUTTON_CONFIG = new InjectionToken('EntryButtonConfig', {
|
|
24
|
+
providedIn: 'root',
|
|
25
|
+
factory: () => new EntryButtonConfig()
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
class EntryButtonDirective {
|
|
29
|
+
constructor(_elementRef, _config, _matButton, _matAnchor) {
|
|
30
|
+
this._elementRef = _elementRef;
|
|
31
|
+
this._config = _config;
|
|
32
|
+
this._matButton = _matButton;
|
|
33
|
+
this._matAnchor = _matAnchor;
|
|
34
|
+
this.attributes = {
|
|
35
|
+
submit: `entry-submit-button`,
|
|
36
|
+
cancel: `entry-cancel-button`
|
|
37
|
+
};
|
|
38
|
+
this.classes = {
|
|
39
|
+
basic: ['mdc-button', 'mat-mdc-button'],
|
|
40
|
+
raised: ['mdc-button', 'mdc-button--raised', 'mat-mdc-raised-button'],
|
|
41
|
+
stroked: ['mdc-button', 'mdc-button--outlined', 'mat-mdc-outlined-button'],
|
|
42
|
+
flat: ['mdc-button', 'mdc-button--unelevated', 'mat-mdc-unelevated-button']
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
const buttonConfig = this.getButtonConfig();
|
|
47
|
+
const classes = this.classes[buttonConfig.type];
|
|
48
|
+
this._elementRef.nativeElement.classList.add(...classes);
|
|
49
|
+
const color = buttonConfig.color;
|
|
50
|
+
if (color) {
|
|
51
|
+
if (this._matButton) {
|
|
52
|
+
this._matButton.color = color;
|
|
53
|
+
}
|
|
54
|
+
if (this._matAnchor) {
|
|
55
|
+
this._matAnchor.color = color;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
getButtonConfig() {
|
|
60
|
+
return this._elementRef.nativeElement.hasAttribute(this.attributes.submit)
|
|
61
|
+
? this._config.submitButton : this._config.cancelButton;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
EntryButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", 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 });
|
|
65
|
+
EntryButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]", ngImport: i0 });
|
|
66
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryButtonDirective, decorators: [{
|
|
67
|
+
type: Directive,
|
|
68
|
+
args: [{
|
|
69
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
70
|
+
selector: `[mat-button][entry-submit-button],[mat-button][entry-cancel-button]`
|
|
71
|
+
}]
|
|
72
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: EntryButtonConfig, decorators: [{
|
|
73
|
+
type: Inject,
|
|
74
|
+
args: [ENTRY_BUTTON_CONFIG]
|
|
75
|
+
}] }, { type: i1.MatButton, decorators: [{
|
|
76
|
+
type: Optional
|
|
77
|
+
}] }, { type: i1.MatAnchor, decorators: [{
|
|
78
|
+
type: Optional
|
|
79
|
+
}] }]; } });
|
|
80
|
+
|
|
81
|
+
class EntryButtonModule {
|
|
82
|
+
}
|
|
83
|
+
EntryButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
84
|
+
EntryButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntryButtonModule, declarations: [EntryButtonDirective], imports: [CommonModule,
|
|
85
|
+
MatButtonModule], exports: [EntryButtonDirective] });
|
|
86
|
+
EntryButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryButtonModule, imports: [CommonModule,
|
|
87
|
+
MatButtonModule] });
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryButtonModule, decorators: [{
|
|
89
|
+
type: NgModule,
|
|
90
|
+
args: [{
|
|
91
|
+
declarations: [
|
|
92
|
+
EntryButtonDirective
|
|
93
|
+
],
|
|
94
|
+
imports: [
|
|
95
|
+
CommonModule,
|
|
96
|
+
MatButtonModule
|
|
97
|
+
],
|
|
98
|
+
exports: [
|
|
99
|
+
EntryButtonDirective
|
|
100
|
+
]
|
|
101
|
+
}]
|
|
102
|
+
}] });
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Generated bundle index. Do not edit.
|
|
106
|
+
*/
|
|
107
|
+
|
|
108
|
+
export { ENTRY_BUTTON_CONFIG, EntryButtonConfig, EntryButtonDirective, EntryButtonModule };
|
|
109
|
+
//# sourceMappingURL=enigmatry-entry-components-button.mjs.map
|
|
@@ -0,0 +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 { InjectionToken } from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\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 submitButton: MatButtonConfig;\r\n /** Cancel button configuration */\r\n cancelButton: MatButtonConfig;\r\n\r\n constructor(config: Partial<EntryButtonConfig> = {}) {\r\n this.submitButton = config.submitButton ?? { type: 'flat', color: 'primary' };\r\n this.cancelButton = config.cancelButton ?? { type: 'basic' };\r\n }\r\n}\r\n\r\n/**\r\n * Entry button config injection token. Can be used to provide custom button configuration.\r\n *\r\n * Defaults:\r\n * - submitButton: type: 'flat', color: 'primary'\r\n * - cancelButton: type: 'basic'\r\n */\r\nexport const ENTRY_BUTTON_CONFIG = new InjectionToken<EntryButtonConfig>('EntryButtonConfig',\r\n {\r\n providedIn: 'root',\r\n factory: () => new EntryButtonConfig()\r\n }\r\n);\r\n","import { Directive, ElementRef, Inject, OnInit, Optional } 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})\nexport class EntryButtonDirective implements OnInit {\n\n attributes = {\n submit: `entry-submit-button`,\n cancel: `entry-cancel-button`\n };\n\n classes: { [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 constructor(\n private _elementRef: ElementRef,\n @Inject(ENTRY_BUTTON_CONFIG) private _config: EntryButtonConfig,\n @Optional() private _matButton?: MatButton,\n @Optional() private _matAnchor?: MatAnchor) {\n }\n\n ngOnInit(): void {\n const buttonConfig: MatButtonConfig = this.getButtonConfig();\n\n const classes = this.classes[buttonConfig.type];\n this._elementRef.nativeElement.classList.add(...classes);\n\n const color: ThemePalette = buttonConfig.color;\n if (color) {\n if (this._matButton) { this._matButton.color = color; }\n if (this._matAnchor) { this._matAnchor.color = color; }\n }\n }\n\n private getButtonConfig(): MatButtonConfig {\n return this._elementRef.nativeElement.hasAttribute(this.attributes.submit)\n ? this._config.submitButton : this._config.cancelButton;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntryButtonDirective } from './entry-button.directive';\nimport { MatButtonModule } from '@angular/material/button';\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":";;;;;;AAYA;;AAEG;MACU,iBAAiB,CAAA;AAM5B,IAAA,WAAA,CAAY,SAAqC,EAAE,EAAA;AACjD,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAC9E,QAAA,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KAC9D;AACF,CAAA;AAED;;;;;;AAMG;MACU,mBAAmB,GAAG,IAAI,cAAc,CAAoB,mBAAmB,EAC1F;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE;AACvC,CAAA;;MC7BU,oBAAoB,CAAA;AAc/B,IAAA,WAAA,CACU,WAAuB,EACM,OAA0B,EAC3C,UAAsB,EACtB,UAAsB,EAAA;QAHlC,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QACM,IAAO,CAAA,OAAA,GAAP,OAAO,CAAmB;QAC3C,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;QACtB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAY;AAhB5C,QAAA,IAAA,CAAA,UAAU,GAAG;AACX,YAAA,MAAM,EAAE,CAAqB,mBAAA,CAAA;AAC7B,YAAA,MAAM,EAAE,CA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AA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;AAChB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;AACrB,qBAAA;AACF,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -73,9 +73,9 @@ class EntryDialogComponent {
|
|
|
73
73
|
this.close = (value = true) => this.mdDialogRef.close(value);
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
EntryDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
77
|
-
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
76
|
+
EntryDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
77
|
+
EntryDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntryDialogComponent, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogComponent, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{ selector: 'entry-dialog', template: "<div class=\"entry-dialog dialog-form\">\n <div class=\"dialog-header\">\n <h1 class=\"title\">{{ title }}</h1>\n\n <button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\">\n <span class=\"icon-close icon\"></span>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <ng-template [ngIf]=\"buttonsTemplate\" [ngIfElse]=\"defaultButtonsTemplate\">\n <ng-template [ngTemplateOutlet]=\"buttonsTemplate\"></ng-template>\n </ng-template>\n\n <ng-template #defaultButtonsTemplate>\n <div *ngIf=\"!hideButtons\" class=\"dialog-footer {{ buttonsAlignment }}\">\n <button\n cdkFocusInitial\n type=\"button\"\n class=\"button-confirm\"\n cdkFocusInitial\n (click)=\"onSubmit()\">{{confirmButtonText}}</button>\n <button\n *ngIf=\"!hideCancel\"\n type=\"button\"\n class=\"button-cancel\"\n (click)=\"cancel()\">{{cancelButtonText}}</button>\n </div>\n </ng-template>\n</div>", styles: [".align-center{margin:auto}\n"] }]
|
|
81
81
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
|
|
@@ -113,9 +113,9 @@ class EntryAlertDialogComponent extends EntryDialogComponent {
|
|
|
113
113
|
this.data = data;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
EntryAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
117
|
-
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
118
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
116
|
+
EntryAlertDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryAlertDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
EntryAlertDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntryAlertDialogComponent, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>", styles: [""], dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryAlertDialogComponent, decorators: [{
|
|
119
119
|
type: Component,
|
|
120
120
|
args: [{ selector: 'entry-alert-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
121
121
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
|
|
@@ -134,9 +134,9 @@ class EntryConfirmDialogComponent extends EntryDialogComponent {
|
|
|
134
134
|
this.data = data;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
EntryConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
138
|
-
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
137
|
+
EntryConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryConfirmDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
138
|
+
EntryConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntryConfirmDialogComponent, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>", styles: [""], dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
139
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryConfirmDialogComponent, decorators: [{
|
|
140
140
|
type: Component,
|
|
141
141
|
args: [{ selector: 'entry-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
|
|
142
142
|
}], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
|
|
@@ -204,9 +204,9 @@ class EntryDialogService {
|
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
EntryDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
208
|
-
EntryDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
207
|
+
EntryDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogService, deps: [{ token: ENTRY_DIALOG_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
208
|
+
EntryDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogService });
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogService, decorators: [{
|
|
210
210
|
type: Injectable
|
|
211
211
|
}], ctorParameters: function () { return [{ type: EntryDialogConfig, decorators: [{
|
|
212
212
|
type: Inject,
|
|
@@ -215,16 +215,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
215
215
|
|
|
216
216
|
class EntryDialogModule {
|
|
217
217
|
}
|
|
218
|
-
EntryDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
219
|
-
EntryDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
218
|
+
EntryDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
219
|
+
EntryDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogModule, declarations: [EntryDialogComponent,
|
|
220
220
|
EntryAlertDialogComponent,
|
|
221
221
|
EntryConfirmDialogComponent], imports: [CommonModule,
|
|
222
222
|
MatDialogModule], exports: [EntryDialogComponent,
|
|
223
223
|
EntryAlertDialogComponent,
|
|
224
224
|
EntryConfirmDialogComponent] });
|
|
225
|
-
EntryDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
225
|
+
EntryDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogModule, providers: [EntryDialogService], imports: [CommonModule,
|
|
226
226
|
MatDialogModule] });
|
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryDialogModule, decorators: [{
|
|
228
228
|
type: NgModule,
|
|
229
229
|
args: [{
|
|
230
230
|
declarations: [
|
|
@@ -4,9 +4,9 @@ import { CommonModule } from '@angular/common';
|
|
|
4
4
|
|
|
5
5
|
class EntryHeaderComponent {
|
|
6
6
|
}
|
|
7
|
-
EntryHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
8
|
-
EntryHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
7
|
+
EntryHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
+
EntryHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntryHeaderComponent, selector: "entry-header", inputs: { title: "title" }, ngImport: i0, template: "<header class=\"entry-header\">\n <div class=\"space-between\">\n <h1 class=\"title item\">{{title}}</h1>\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n <div class=\"row content\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</header>", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryHeaderComponent, decorators: [{
|
|
10
10
|
type: Component,
|
|
11
11
|
args: [{ selector: 'entry-header', changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"entry-header\">\n <div class=\"space-between\">\n <h1 class=\"title item\">{{title}}</h1>\n <ng-content select=\"[buttons]\"></ng-content>\n </div>\n <div class=\"row content\">\n <ng-content select=\"[content]\"></ng-content>\n </div>\n</header>" }]
|
|
12
12
|
}], propDecorators: { title: [{
|
|
@@ -15,10 +15,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
15
15
|
|
|
16
16
|
class EntryHeaderModule {
|
|
17
17
|
}
|
|
18
|
-
EntryHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
EntryHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
20
|
-
EntryHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
18
|
+
EntryHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
19
|
+
EntryHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntryHeaderModule, declarations: [EntryHeaderComponent], imports: [CommonModule], exports: [EntryHeaderComponent] });
|
|
20
|
+
EntryHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryHeaderModule, imports: [CommonModule] });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntryHeaderModule, decorators: [{
|
|
22
22
|
type: NgModule,
|
|
23
23
|
args: [{
|
|
24
24
|
declarations: [
|
|
@@ -4,9 +4,9 @@ import * as i2 from '@angular/forms';
|
|
|
4
4
|
import { UntypedFormGroup, FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i1 from '@angular/common';
|
|
6
6
|
import { CommonModule } from '@angular/common';
|
|
7
|
-
import * as i3 from '@angular/material/
|
|
8
|
-
import * as i4 from '@angular/material/input';
|
|
7
|
+
import * as i3 from '@angular/material/input';
|
|
9
8
|
import { MatInputModule } from '@angular/material/input';
|
|
9
|
+
import * as i4 from '@angular/material/form-field';
|
|
10
10
|
import * as i5 from '@angular/material/select';
|
|
11
11
|
import { MatSelectModule } from '@angular/material/select';
|
|
12
12
|
import * as i6 from '@angular/material/core';
|
|
@@ -37,9 +37,9 @@ class EntrySearchFilterInputComponent {
|
|
|
37
37
|
this.controlType = ControlType;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
EntrySearchFilterInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
41
|
-
EntrySearchFilterInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
42
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
+
EntrySearchFilterInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterInputComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
+
EntrySearchFilterInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: { searchFilter: "searchFilter", form: "form" }, ngImport: i0, template: "<mat-form-field [formGroup]=\"form\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <div [ngSwitch]=\"searchFilter.controlType\">\n\n <input *ngSwitchCase=\"controlType.text\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\"\n [type]=\"searchFilter.type\" matInput [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n\n <mat-select *ngSwitchCase=\"controlType.select\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [multiple]=\"searchFilter.multiSelect\">\n <mat-option *ngIf=\"!searchFilter.multiSelect\" [value]=\"undefined\">\n {{config.noneSelectedOptionText}}\n </mat-option>\n <div *ngIf=\"searchFilter.options$ !== undefined; else fixedSelectValues\">\n <mat-option *ngFor=\"let option of searchFilter.options$ | async\" [value]=\"option.key\">{{option.label}}</mat-option>\n </div>\n <ng-template #fixedSelectValues>\n <mat-option *ngFor=\"let option of searchFilter.options\" [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-template>\n </mat-select>\n\n </div>\n</mat-form-field>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { 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"], exportAs: ["matInput"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "component", type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator"], exportAs: ["matSelect"] }, { kind: "component", type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
42
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterInputComponent, decorators: [{
|
|
43
43
|
type: Component,
|
|
44
44
|
args: [{ selector: 'entry-search-filter-input', changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-form-field [formGroup]=\"form\">\n <mat-label [attr.for]=\"searchFilter.key\">{{searchFilter.label}}</mat-label>\n\n <div [ngSwitch]=\"searchFilter.controlType\">\n\n <input *ngSwitchCase=\"controlType.text\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\"\n [type]=\"searchFilter.type\" matInput [placeholder]=\"searchFilter.placeholder\" [maxlength]=\"searchFilter.maxLength\">\n\n <mat-select *ngSwitchCase=\"controlType.select\"\n [formControlName]=\"searchFilter.key\" [id]=\"searchFilter.key\" [multiple]=\"searchFilter.multiSelect\">\n <mat-option *ngIf=\"!searchFilter.multiSelect\" [value]=\"undefined\">\n {{config.noneSelectedOptionText}}\n </mat-option>\n <div *ngIf=\"searchFilter.options$ !== undefined; else fixedSelectValues\">\n <mat-option *ngFor=\"let option of searchFilter.options$ | async\" [value]=\"option.key\">{{option.label}}</mat-option>\n </div>\n <ng-template #fixedSelectValues>\n <mat-option *ngFor=\"let option of searchFilter.options\" [value]=\"option.key\">{{option.label}}</mat-option>\n </ng-template>\n </mat-select>\n\n </div>\n</mat-form-field>" }]
|
|
45
45
|
}], ctorParameters: function () { return [{ type: EntrySearchFilterConfig, decorators: [{
|
|
@@ -81,9 +81,9 @@ class EntrySearchFilterComponent {
|
|
|
81
81
|
return new UntypedFormGroup(group);
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
EntrySearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
85
|
-
EntrySearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
86
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
84
|
+
EntrySearchFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterComponent, deps: [{ token: ENTRY_SEARCH_FILTER_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
|
|
85
|
+
EntrySearchFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: EntrySearchFilterComponent, selector: "entry-search-filter", inputs: { searchFilters: "searchFilters" }, outputs: { searchFilterChange: "searchFilterChange" }, ngImport: i0, template: "<div class=\"search-form-container\">\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\">\r\n <div class=\"search-form-fields\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"search-form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div>\r\n <button type=\"button\" class=\"mat-raised-button mat-accent\" type=\"submit\">\r\n {{config.applyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>", styles: [".search-form-fields{display:flex;align-items:flex-start}.search-form-fields .search-form-field{width:200px}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: EntrySearchFilterInputComponent, selector: "entry-search-filter-input", inputs: ["searchFilter", "form"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterComponent, decorators: [{
|
|
87
87
|
type: Component,
|
|
88
88
|
args: [{ selector: 'entry-search-filter', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"search-form-container\">\r\n <form (ngSubmit)=\"onSubmit()\" [formGroup]=\"searchFilterForm\">\r\n <div class=\"search-form-fields\">\r\n <div *ngFor=\"let searchFilter of searchFilters\" class=\"search-form-field\">\r\n <entry-search-filter-input [searchFilter]=\"searchFilter\" [form]=\"searchFilterForm\">\r\n </entry-search-filter-input>\r\n </div>\r\n <div>\r\n <button type=\"button\" class=\"mat-raised-button mat-accent\" type=\"submit\">\r\n {{config.applyButtonText}}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n</div>", styles: [".search-form-fields{display:flex;align-items:flex-start}.search-form-fields .search-form-field{width:200px}\n"] }]
|
|
89
89
|
}], ctorParameters: function () { return [{ type: EntrySearchFilterConfig, decorators: [{
|
|
@@ -164,21 +164,21 @@ class SelectFilterOption {
|
|
|
164
164
|
|
|
165
165
|
class EntrySearchFilterModule {
|
|
166
166
|
}
|
|
167
|
-
EntrySearchFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
168
|
-
EntrySearchFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
167
|
+
EntrySearchFilterModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
168
|
+
EntrySearchFilterModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, declarations: [EntrySearchFilterComponent,
|
|
169
169
|
EntrySearchFilterInputComponent], imports: [CommonModule,
|
|
170
170
|
FormsModule,
|
|
171
171
|
ReactiveFormsModule,
|
|
172
172
|
MatInputModule,
|
|
173
173
|
MatButtonModule,
|
|
174
174
|
MatSelectModule], exports: [EntrySearchFilterComponent] });
|
|
175
|
-
EntrySearchFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
175
|
+
EntrySearchFilterModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, imports: [CommonModule,
|
|
176
176
|
FormsModule,
|
|
177
177
|
ReactiveFormsModule,
|
|
178
178
|
MatInputModule,
|
|
179
179
|
MatButtonModule,
|
|
180
180
|
MatSelectModule] });
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: EntrySearchFilterModule, decorators: [{
|
|
182
182
|
type: NgModule,
|
|
183
183
|
args: [{
|
|
184
184
|
declarations: [
|