@enigmatry/entry-components 17.4.0 → 18.0.0-preview

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/common/interceptors/accept-language.interceptor.d.ts +6 -2
  2. package/common/interceptors/index.d.ts +1 -1
  3. package/esm2022/button/entry-button.directive.mjs +4 -4
  4. package/esm2022/button/entry-button.module.mjs +5 -5
  5. package/esm2022/common/common.module.mjs +5 -5
  6. package/esm2022/common/date-time/entry-date-time-adapter.mjs +4 -4
  7. package/esm2022/common/date-time/entry-time-adapter.mjs +4 -4
  8. package/esm2022/common/date-time/native-time-adapter.mjs +4 -4
  9. package/esm2022/common/directives/auto-disable-button.directive.mjs +4 -4
  10. package/esm2022/common/directives/ng-control-accessor.directive.mjs +4 -4
  11. package/esm2022/common/directives/noop-control-value-accessor.mjs +4 -4
  12. package/esm2022/common/directives/scroll-to-invalid-control.directive.mjs +4 -4
  13. package/esm2022/common/event-plugins/abstract.plugin.mjs +1 -1
  14. package/esm2022/common/event-plugins/debounce.plugin.mjs +5 -5
  15. package/esm2022/common/event-plugins/throttle.plugin.mjs +5 -5
  16. package/esm2022/common/interceptors/accept-language.interceptor.mjs +15 -5
  17. package/esm2022/common/interceptors/index.mjs +2 -2
  18. package/esm2022/date-time-picker/date-time-picker.component.mjs +4 -4
  19. package/esm2022/date-time-picker/date-time-picker.module.mjs +5 -5
  20. package/esm2022/date-time-picker/time-picker.component.mjs +4 -4
  21. package/esm2022/dialog/dialogs/alert/entry-alert-dialog.component.mjs +4 -4
  22. package/esm2022/dialog/dialogs/confirm/entry-confirm-dialog.component.mjs +4 -4
  23. package/esm2022/dialog/dialogs/entry-dialog.component.mjs +10 -4
  24. package/esm2022/dialog/dialogs/error/entry-error-dialog.component.mjs +4 -4
  25. package/esm2022/dialog/entry-dialog.module.mjs +5 -5
  26. package/esm2022/dialog/entry-dialog.service.mjs +4 -4
  27. package/esm2022/file-input/entry-file-input.component.mjs +4 -4
  28. package/esm2022/file-input/entry-file-input.module.mjs +5 -5
  29. package/esm2022/modules/entry-components.module.mjs +5 -5
  30. package/esm2022/permissions/permission.directive.mjs +4 -4
  31. package/esm2022/permissions/permission.module.mjs +5 -5
  32. package/esm2022/permissions/permission.pipe.mjs +4 -4
  33. package/esm2022/search-filter/autocomplete/autocomplete-search-filter.component.mjs +4 -4
  34. package/esm2022/search-filter/date/date-search-filter.component.mjs +4 -4
  35. package/esm2022/search-filter/date-time/date-time-search-filter.component.mjs +4 -4
  36. package/esm2022/search-filter/entry-search-filter.component.mjs +4 -4
  37. package/esm2022/search-filter/entry-search-filter.module.mjs +5 -5
  38. package/esm2022/search-filter/select/select-search-filter.component.mjs +4 -4
  39. package/esm2022/search-filter/text/text-search-filter.component.mjs +4 -4
  40. package/esm2022/spinner/entry-spinner/spinner.component.mjs +4 -4
  41. package/esm2022/spinner/spinner-overlay-container.mjs +4 -4
  42. package/esm2022/spinner/spinner.module.mjs +5 -5
  43. package/esm2022/table/components/entry-cell/entry-cell.component.mjs +4 -4
  44. package/esm2022/table/components/entry-cell-context-menu/entry-cell-context-menu.component.mjs +4 -4
  45. package/esm2022/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.mjs +4 -4
  46. package/esm2022/table/components/entry-table/entry-table.component.mjs +5 -5
  47. package/esm2022/table/entry-table.module.mjs +5 -5
  48. package/esm2022/validation/entry-display-control-validation.directive.mjs +4 -4
  49. package/esm2022/validation/entry-form-errors.component.mjs +4 -4
  50. package/esm2022/validation/entry-validation.module.mjs +5 -5
  51. package/fesm2022/enigmatry-entry-components-button.mjs +7 -7
  52. package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
  53. package/fesm2022/enigmatry-entry-components-common.mjs +48 -38
  54. package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
  55. package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +10 -10
  56. package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
  57. package/fesm2022/enigmatry-entry-components-dialog.mjs +25 -19
  58. package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
  59. package/fesm2022/enigmatry-entry-components-file-input.mjs +7 -7
  60. package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
  61. package/fesm2022/enigmatry-entry-components-permissions.mjs +10 -10
  62. package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
  63. package/fesm2022/enigmatry-entry-components-search-filter.mjs +22 -22
  64. package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
  65. package/fesm2022/enigmatry-entry-components-spinner.mjs +10 -10
  66. package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
  67. package/fesm2022/enigmatry-entry-components-table.mjs +17 -17
  68. package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
  69. package/fesm2022/enigmatry-entry-components-validation.mjs +10 -10
  70. package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
  71. package/fesm2022/enigmatry-entry-components.mjs +4 -4
  72. package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
  73. package/package.json +9 -9
  74. package/styles/modules/vendors/angular-material/_generator.scss +4 -4
  75. package/styles/modules/vendors/angular-material/_typography-generator.scss +1 -1
@@ -18,8 +18,8 @@ import { MatInputModule } from '@angular/material/input';
18
18
  * ```
19
19
  */
20
20
  class EntryFormErrorsComponent {
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryFormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.8", type: EntryFormErrorsComponent, selector: "entry-form-errors", inputs: { form: "form" }, ngImport: i0, template: `
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryFormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", 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">
25
25
  <span class="mat-body-2">{{error}}</span>
@@ -27,7 +27,7 @@ class EntryFormErrorsComponent {
27
27
  </div>
28
28
  `, 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 }); }
29
29
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryFormErrorsComponent, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryFormErrorsComponent, decorators: [{
31
31
  type: Component,
32
32
  args: [{
33
33
  selector: 'entry-form-errors',
@@ -159,10 +159,10 @@ class EntryDisplayControlValidationDirective {
159
159
  const serverErrorsString = serverErrors instanceof Array ? serverErrors.join(', ') : '';
160
160
  return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');
161
161
  }
162
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryDisplayControlValidationDirective, deps: [{ token: ENTRY_VALIDATION_CONFIG }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
163
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.8", type: EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: { control: "control" }, ngImport: i0 }); }
162
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryDisplayControlValidationDirective, deps: [{ token: ENTRY_VALIDATION_CONFIG }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
163
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: { control: "control" }, ngImport: i0 }); }
164
164
  }
165
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryDisplayControlValidationDirective, decorators: [{
165
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryDisplayControlValidationDirective, decorators: [{
166
166
  type: Directive,
167
167
  args: [{
168
168
  selector: '[entryDisplayControlValidation]'
@@ -175,19 +175,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImpor
175
175
  }] } });
176
176
 
177
177
  class EntryValidationModule {
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
179
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: EntryValidationModule, declarations: [EntryFormErrorsComponent,
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
179
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: EntryValidationModule, declarations: [EntryFormErrorsComponent,
180
180
  EntryDisplayControlValidationDirective], imports: [CommonModule,
181
181
  FormsModule,
182
182
  ReactiveFormsModule,
183
183
  MatInputModule], exports: [EntryFormErrorsComponent,
184
184
  EntryDisplayControlValidationDirective] }); }
185
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryValidationModule, imports: [CommonModule,
185
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryValidationModule, imports: [CommonModule,
186
186
  FormsModule,
187
187
  ReactiveFormsModule,
188
188
  MatInputModule] }); }
189
189
  }
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryValidationModule, decorators: [{
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryValidationModule, decorators: [{
191
191
  type: NgModule,
192
192
  args: [{
193
193
  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\">\n <span class=\"mat-body-2\">{{error}}</span>\n </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 { Provider } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\nimport { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\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 = createInjectionToken(new EntryValidationConfig());\n\n/**\n * Can be used to provide entry validation configuration.\n */\nexport function provideEntryValidationConfig(config: Partial<EntryValidationConfig>): Provider {\n return provideConfig(ENTRY_VALIDATION_CONFIG, () => new EntryValidationConfig(config));\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_ERROR_KEY,\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;MAYU,wBAAwB,CAAA;8GAAxB,wBAAw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AAA,IAAA,EAAA,qBAAqB,YAV9B,YAAY;YACZ,WAAW;YACX,mBAAmB;YACnB,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;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;AACF,iBAAA,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\">\n <span class=\"mat-body-2\">{{error}}</span>\n </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 { Provider } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\nimport { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\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 = createInjectionToken(new EntryValidationConfig());\n\n/**\n * Can be used to provide entry validation configuration.\n */\nexport function provideEntryValidationConfig(config: Partial<EntryValidationConfig>): Provider {\n return provideConfig(ENTRY_VALIDATION_CONFIG, () => new EntryValidationConfig(config));\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_ERROR_KEY,\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;MAYU,wBAAwB,CAAA;+GAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAA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,mBAAmB;YACnB,cAAc,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAOL,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;AACF,iBAAA,CAAA;;;ACtBD;;AAEG;;;;"}
@@ -37,8 +37,8 @@ class EntryComponentsModule {
37
37
  providers
38
38
  };
39
39
  }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
41
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.8", ngImport: i0, type: EntryComponentsModule, exports: [EntryButtonModule,
40
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
41
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: EntryComponentsModule, exports: [EntryButtonModule,
42
42
  EntryCommonModule,
43
43
  EntryDialogModule,
44
44
  EntryFileInputModule,
@@ -47,7 +47,7 @@ class EntryComponentsModule {
47
47
  EntrySearchFilterModule,
48
48
  EntrySpinnerModule,
49
49
  EntryTableModule] }); }
50
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryComponentsModule, imports: [EntryButtonModule,
50
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryComponentsModule, imports: [EntryButtonModule,
51
51
  EntryCommonModule,
52
52
  EntryDialogModule,
53
53
  EntryFileInputModule,
@@ -57,7 +57,7 @@ class EntryComponentsModule {
57
57
  EntrySpinnerModule,
58
58
  EntryTableModule] }); }
59
59
  }
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.8", ngImport: i0, type: EntryComponentsModule, decorators: [{
60
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: EntryComponentsModule, decorators: [{
61
61
  type: NgModule,
62
62
  args: [{
63
63
  declarations: [],
@@ -1 +1 @@
1
- {"version":3,"file":"enigmatry-entry-components.mjs","sources":["../../../../libs/entry-components/modules/entry-components.module.ts","../../../../libs/entry-components/public-api.ts","../../../../libs/entry-components/enigmatry-entry-components.ts"],"sourcesContent":["import { ModuleWithProviders, NgModule, Provider, Type } from '@angular/core';\r\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\r\nimport { EntryDialogModule } from '@enigmatry/entry-components/dialog';\r\nimport { EntryPermissionModule, EntryPermissionService } from '@enigmatry/entry-components/permissions';\r\nimport { EntrySearchFilterModule } from '@enigmatry/entry-components/search-filter';\r\nimport { EntryValidationModule } from '@enigmatry/entry-components/validation';\r\nimport { EntryFileInputModule } from '@enigmatry/entry-components/file-input';\r\nimport { EntryTableModule } from '@enigmatry/entry-components/table';\r\nimport { EntryCommonModule, NG_EVENT_PLUGINS } from '@enigmatry/entry-components/common';\r\nimport { EntrySpinnerModule } from '@enigmatry/entry-components/spinner';\r\n\r\ninterface EntryComponentsModuleOptions {\r\n permissionService?: Type<any>;\r\n}\r\n\r\n/**\r\n * Exports all entry components.\r\n *\r\n * Usage\r\n * import EntryComponentsModule in shared.module.ts to have access to all components, directives, pipes.\r\n * import EntryComponentsModule.forRoot() in app.module.ts to register root module providers.\r\n */\r\n@NgModule({\r\n declarations: [],\r\n exports: [\r\n EntryButtonModule,\r\n EntryCommonModule,\r\n EntryDialogModule,\r\n EntryFileInputModule,\r\n EntryValidationModule,\r\n EntryPermissionModule,\r\n EntrySearchFilterModule,\r\n EntrySpinnerModule,\r\n EntryTableModule\r\n ]\r\n})\r\nexport class EntryComponentsModule {\r\n static forRoot(options: EntryComponentsModuleOptions = {}): ModuleWithProviders<EntryComponentsModule> {\r\n\r\n const permissionServiceProvider: Provider[] = options.permissionService\r\n ? [{ provide: EntryPermissionService, useClass: options.permissionService }]\r\n : [];\r\n\r\n const providers: Provider[] = [...permissionServiceProvider, ...NG_EVENT_PLUGINS];\r\n return {\r\n ngModule: EntryComponentsModule,\r\n providers\r\n };\r\n }\r\n}\r\n","\n/*\n * Public API Surface of entry-components\n */\nexport * from '@enigmatry/entry-components/button';\nexport * from '@enigmatry/entry-components/common';\nexport * from '@enigmatry/entry-components/dialog';\nexport * from '@enigmatry/entry-components/file-input';\nexport * from '@enigmatry/entry-components/permissions';\nexport * from '@enigmatry/entry-components/search-filter';\nexport * from '@enigmatry/entry-components/spinner';\nexport * from '@enigmatry/entry-components/validation';\nexport * from '@enigmatry/entry-components/table';\n\nexport { EntryComponentsModule } from './modules/entry-components.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AAMG;MAeU,qBAAqB,CAAA;AAChC,IAAA,OAAO,OAAO,CAAC,OAAA,GAAwC,EAAE,EAAA;AAEvD,QAAA,MAAM,yBAAyB,GAAe,OAAO,CAAC,iBAAiB;AACrE,cAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC;cAC1E,EAAE,CAAC;QAEP,MAAM,SAAS,GAAe,CAAC,GAAG,yBAAyB,EAAE,GAAG,gBAAgB,CAAC,CAAC;QAClF,OAAO;AACL,YAAA,QAAQ,EAAE,qBAAqB;YAC/B,SAAS;SACV,CAAC;KACH;8GAZU,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,iBAAiB;YACjB,iBAAiB;YACjB,iBAAiB;YACjB,oBAAoB;YACpB,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,kBAAkB;YAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,iBAAiB;YACjB,iBAAiB;YACjB,iBAAiB;YACjB,oBAAoB;YACpB,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,kBAAkB;YAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,iBAAiB;wBACjB,iBAAiB;wBACjB,oBAAoB;wBACpB,qBAAqB;wBACrB,qBAAqB;wBACrB,uBAAuB;wBACvB,kBAAkB;wBAClB,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;AClCD;;AAEG;;ACHH;;AAEG;;;;"}
1
+ {"version":3,"file":"enigmatry-entry-components.mjs","sources":["../../../../libs/entry-components/modules/entry-components.module.ts","../../../../libs/entry-components/public-api.ts","../../../../libs/entry-components/enigmatry-entry-components.ts"],"sourcesContent":["import { ModuleWithProviders, NgModule, Provider, Type } from '@angular/core';\r\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\r\nimport { EntryDialogModule } from '@enigmatry/entry-components/dialog';\r\nimport { EntryPermissionModule, EntryPermissionService } from '@enigmatry/entry-components/permissions';\r\nimport { EntrySearchFilterModule } from '@enigmatry/entry-components/search-filter';\r\nimport { EntryValidationModule } from '@enigmatry/entry-components/validation';\r\nimport { EntryFileInputModule } from '@enigmatry/entry-components/file-input';\r\nimport { EntryTableModule } from '@enigmatry/entry-components/table';\r\nimport { EntryCommonModule, NG_EVENT_PLUGINS } from '@enigmatry/entry-components/common';\r\nimport { EntrySpinnerModule } from '@enigmatry/entry-components/spinner';\r\n\r\ninterface EntryComponentsModuleOptions {\r\n permissionService?: Type<any>;\r\n}\r\n\r\n/**\r\n * Exports all entry components.\r\n *\r\n * Usage\r\n * import EntryComponentsModule in shared.module.ts to have access to all components, directives, pipes.\r\n * import EntryComponentsModule.forRoot() in app.module.ts to register root module providers.\r\n */\r\n@NgModule({\r\n declarations: [],\r\n exports: [\r\n EntryButtonModule,\r\n EntryCommonModule,\r\n EntryDialogModule,\r\n EntryFileInputModule,\r\n EntryValidationModule,\r\n EntryPermissionModule,\r\n EntrySearchFilterModule,\r\n EntrySpinnerModule,\r\n EntryTableModule\r\n ]\r\n})\r\nexport class EntryComponentsModule {\r\n static forRoot(options: EntryComponentsModuleOptions = {}): ModuleWithProviders<EntryComponentsModule> {\r\n\r\n const permissionServiceProvider: Provider[] = options.permissionService\r\n ? [{ provide: EntryPermissionService, useClass: options.permissionService }]\r\n : [];\r\n\r\n const providers: Provider[] = [...permissionServiceProvider, ...NG_EVENT_PLUGINS];\r\n return {\r\n ngModule: EntryComponentsModule,\r\n providers\r\n };\r\n }\r\n}\r\n","\n/*\n * Public API Surface of entry-components\n */\nexport * from '@enigmatry/entry-components/button';\nexport * from '@enigmatry/entry-components/common';\nexport * from '@enigmatry/entry-components/dialog';\nexport * from '@enigmatry/entry-components/file-input';\nexport * from '@enigmatry/entry-components/permissions';\nexport * from '@enigmatry/entry-components/search-filter';\nexport * from '@enigmatry/entry-components/spinner';\nexport * from '@enigmatry/entry-components/validation';\nexport * from '@enigmatry/entry-components/table';\n\nexport { EntryComponentsModule } from './modules/entry-components.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AAMG;MAeU,qBAAqB,CAAA;AAChC,IAAA,OAAO,OAAO,CAAC,OAAA,GAAwC,EAAE,EAAA;AAEvD,QAAA,MAAM,yBAAyB,GAAe,OAAO,CAAC,iBAAiB;AACrE,cAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC;cAC1E,EAAE,CAAC;QAEP,MAAM,SAAS,GAAe,CAAC,GAAG,yBAAyB,EAAE,GAAG,gBAAgB,CAAC,CAAC;QAClF,OAAO;AACL,YAAA,QAAQ,EAAE,qBAAqB;YAC/B,SAAS;SACV,CAAC;KACH;+GAZU,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAArB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,iBAAiB;YACjB,iBAAiB;YACjB,iBAAiB;YACjB,oBAAoB;YACpB,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,kBAAkB;YAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,iBAAiB;YACjB,iBAAiB;YACjB,iBAAiB;YACjB,oBAAoB;YACpB,qBAAqB;YACrB,qBAAqB;YACrB,uBAAuB;YACvB,kBAAkB;YAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,iBAAiB;wBACjB,iBAAiB;wBACjB,oBAAoB;wBACpB,qBAAqB;wBACrB,qBAAqB;wBACrB,uBAAuB;wBACvB,kBAAkB;wBAClB,gBAAgB;AACjB,qBAAA;AACF,iBAAA,CAAA;;;AClCD;;AAEG;;ACHH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enigmatry/entry-components",
3
- "version": "17.4.0",
3
+ "version": "18.0.0-preview",
4
4
  "author": "Enigmatry",
5
5
  "description": "Enigmatry entry angular material components",
6
6
  "homepage": "https://github.com/enigmatry/entry-angular-building-blocks/tree/master/libs/entry-components#readme",
@@ -10,17 +10,17 @@
10
10
  },
11
11
  "license": "Apache-2.0",
12
12
  "peerDependencies": {
13
- "@angular/animations": "^17.0.0",
14
- "@angular/cdk": "^17.0.0",
15
- "@angular/common": "^17.0.0",
16
- "@angular/core": "^17.0.0",
17
- "@angular/material": "^17.0.0",
18
- "@angular/forms": "^17.0.0",
19
- "@angular/platform-browser": "^17.0.0"
13
+ "@angular/animations": "^18.0.0",
14
+ "@angular/cdk": "^18.0.0",
15
+ "@angular/common": "^18.0.0",
16
+ "@angular/core": "^18.0.0",
17
+ "@angular/material": "^18.0.0",
18
+ "@angular/forms": "^18.0.0",
19
+ "@angular/platform-browser": "^18.0.0"
20
20
  },
21
21
  "dependencies": {
22
22
  "lodash-es": "^4.17.21",
23
- "tslib": "^2.6.2"
23
+ "tslib": "^2.8.1"
24
24
  },
25
25
  "publishConfig": {
26
26
  "access": "public"
@@ -14,14 +14,14 @@
14
14
  @include fonts.generate-default-font();
15
15
  }
16
16
 
17
- $primary-palette: theming.define-palette(-get-material-palette-for('primary', $entry-theme));
18
- $accent-palette: theming.define-palette(-get-material-palette-for('accent', $entry-theme));
19
- $warn-palette: theming.define-palette(theming.$red-palette);
17
+ $primary-palette: theming.m2-define-palette(-get-material-palette-for('primary', $entry-theme));
18
+ $accent-palette: theming.m2-define-palette(-get-material-palette-for('accent', $entry-theme));
19
+ $warn-palette: theming.m2-define-palette(theming.$m2-red-palette);
20
20
 
21
21
  $typography: typography-generator.generate-from($entry-theme);
22
22
  @include theming.typography-hierarchy($typography);
23
23
 
24
- $material-theme: theming.define-light-theme((
24
+ $material-theme: theming.m2-define-light-theme((
25
25
  color: (
26
26
  primary: $primary-palette,
27
27
  accent: $accent-palette,
@@ -14,7 +14,7 @@
14
14
 
15
15
  @function -generate-typography-from($theme) {
16
16
  $fonts: map.get($theme, 'general', 'fonts');
17
- $typography: theming.define-typography-config();
17
+ $typography: theming.m2-define-typography-config();
18
18
 
19
19
  $typography: -set-font-for('body', $typography, $fonts, ('body-1', 'body-2'));
20
20
  $typography: -set-font-for('buttons', $typography, $fonts, ('button'));