@recursyve/nice-ui-kit.v2 14.0.0-beta.120 → 14.0.0-beta.122

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 (24) hide show
  1. package/esm2020/lib/components/date-range-picker/date-range-picker.component.mjs +3 -3
  2. package/esm2020/lib/components/translation-form/components/translation-form.component.mjs +5 -5
  3. package/esm2020/lib/components/translation-form/decorators/translation-form-group.decorator.mjs +4 -0
  4. package/esm2020/lib/components/translation-form/directives/translation-context.directive.mjs +5 -5
  5. package/esm2020/lib/components/translation-form/providers/nice-translation-form.service.mjs +59 -0
  6. package/esm2020/lib/components/translation-form/public-api.mjs +7 -7
  7. package/esm2020/lib/components/translation-form/toggle/translation-toggle.component.mjs +5 -5
  8. package/esm2020/lib/components/translation-form/validators/require-for-languages.validator.mjs +22 -21
  9. package/fesm2015/recursyve-nice-ui-kit.v2.mjs +73 -59
  10. package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  11. package/fesm2020/recursyve-nice-ui-kit.v2.mjs +72 -59
  12. package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  13. package/lib/components/translation-form/components/translation-form.component.d.ts +2 -2
  14. package/lib/components/translation-form/decorators/translation-form-group.decorator.d.ts +1 -0
  15. package/lib/components/translation-form/directives/translation-context.directive.d.ts +2 -2
  16. package/lib/components/translation-form/providers/nice-translation-form.service.d.ts +16 -0
  17. package/lib/components/translation-form/public-api.d.ts +6 -6
  18. package/lib/components/translation-form/toggle/translation-toggle.component.d.ts +3 -3
  19. package/lib/components/translation-form/validators/require-for-languages.validator.d.ts +3 -3
  20. package/package.json +1 -1
  21. package/esm2020/lib/components/translation-form/decorators/translation-form.decorator.mjs +0 -4
  22. package/esm2020/lib/components/translation-form/providers/translation-form.service.mjs +0 -46
  23. package/lib/components/translation-form/decorators/translation-form.decorator.d.ts +0 -1
  24. package/lib/components/translation-form/providers/translation-form.service.d.ts +0 -12
@@ -3924,7 +3924,7 @@ NiceDateRangePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14
3924
3924
  useExisting: forwardRef(() => NiceDateRangePickerComponent),
3925
3925
  multi: true
3926
3926
  }
3927
- ], viewQueries: [{ propertyName: "picker", first: true, predicate: MatDateRangePicker, descendants: true }], ngImport: i0, template: "<div class=\"nice-date-picker-container\">\n <div class=\"nice-date-picker-header\">\n <div class=\"from-to\">\n <ng-container *ngIf=\"value.from\">\n {{ value.from | localizedDate: \"longDate\" }}\n </ng-container>\n <ng-container *ngIf=\"value.to\">\n <div class=\"separator\">-</div>\n {{ value.to | localizedDate: \"longDate\" }}\n </ng-container>\n </div>\n </div>\n\n <mat-date-range-input [formGroup]=\"formGroup\" [max]=\"nowIsMax ? now : null\" [rangePicker]=\"picker\">\n <input formControlName=\"from\" class=\"hidden-input\" matStartDate placeholder=\"Start date\">\n <input formControlName=\"to\" class=\"hidden-input\" matEndDate placeholder=\"End date\">\n </mat-date-range-input>\n\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\n <mat-date-range-picker\n [calendarHeaderComponent]=\"HeaderComponent\"\n #picker\n ></mat-date-range-picker>\n</div>\n", styles: ["nice-date-range-picker .mat-date-range-input{width:0;height:0;padding:0;margin:0;border:none;visibility:hidden}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i2$3.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2$3.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2$3.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2$3.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i1$2.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: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: LocalizedDatePipe, name: "localizedDate" }], encapsulation: i0.ViewEncapsulation.None });
3927
+ ], viewQueries: [{ propertyName: "picker", first: true, predicate: MatDateRangePicker, descendants: true }], ngImport: i0, template: "<div class=\"nice-date-picker-container\">\n <div class=\"nice-date-picker-header\">\n <div class=\"from-to\">\n <ng-container *ngIf=\"value?.from\">\n {{ value.from | localizedDate: \"longDate\" }}\n </ng-container>\n <ng-container *ngIf=\"value?.to\">\n <div class=\"separator\">-</div>\n {{ value.to | localizedDate: \"longDate\" }}\n </ng-container>\n </div>\n </div>\n\n <mat-date-range-input [formGroup]=\"formGroup\" [max]=\"nowIsMax ? now : null\" [rangePicker]=\"picker\">\n <input formControlName=\"from\" class=\"hidden-input\" matStartDate placeholder=\"Start date\">\n <input formControlName=\"to\" class=\"hidden-input\" matEndDate placeholder=\"End date\">\n </mat-date-range-input>\n\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\n <mat-date-range-picker\n [calendarHeaderComponent]=\"HeaderComponent\"\n #picker\n ></mat-date-range-picker>\n</div>\n", styles: ["nice-date-range-picker .mat-date-range-input{width:0;height:0;padding:0;margin:0;border:none;visibility:hidden}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$3.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i2$3.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2$3.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2$3.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2$3.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "directive", type: i1$3.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i1$2.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: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: LocalizedDatePipe, name: "localizedDate" }], encapsulation: i0.ViewEncapsulation.None });
3928
3928
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceDateRangePickerComponent, decorators: [{
3929
3929
  type: Component,
3930
3930
  args: [{ selector: "nice-date-range-picker", encapsulation: ViewEncapsulation.None, providers: [
@@ -3933,7 +3933,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
3933
3933
  useExisting: forwardRef(() => NiceDateRangePickerComponent),
3934
3934
  multi: true
3935
3935
  }
3936
- ], template: "<div class=\"nice-date-picker-container\">\n <div class=\"nice-date-picker-header\">\n <div class=\"from-to\">\n <ng-container *ngIf=\"value.from\">\n {{ value.from | localizedDate: \"longDate\" }}\n </ng-container>\n <ng-container *ngIf=\"value.to\">\n <div class=\"separator\">-</div>\n {{ value.to | localizedDate: \"longDate\" }}\n </ng-container>\n </div>\n </div>\n\n <mat-date-range-input [formGroup]=\"formGroup\" [max]=\"nowIsMax ? now : null\" [rangePicker]=\"picker\">\n <input formControlName=\"from\" class=\"hidden-input\" matStartDate placeholder=\"Start date\">\n <input formControlName=\"to\" class=\"hidden-input\" matEndDate placeholder=\"End date\">\n </mat-date-range-input>\n\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\n <mat-date-range-picker\n [calendarHeaderComponent]=\"HeaderComponent\"\n #picker\n ></mat-date-range-picker>\n</div>\n", styles: ["nice-date-range-picker .mat-date-range-input{width:0;height:0;padding:0;margin:0;border:none;visibility:hidden}\n"] }]
3936
+ ], template: "<div class=\"nice-date-picker-container\">\n <div class=\"nice-date-picker-header\">\n <div class=\"from-to\">\n <ng-container *ngIf=\"value?.from\">\n {{ value.from | localizedDate: \"longDate\" }}\n </ng-container>\n <ng-container *ngIf=\"value?.to\">\n <div class=\"separator\">-</div>\n {{ value.to | localizedDate: \"longDate\" }}\n </ng-container>\n </div>\n </div>\n\n <mat-date-range-input [formGroup]=\"formGroup\" [max]=\"nowIsMax ? now : null\" [rangePicker]=\"picker\">\n <input formControlName=\"from\" class=\"hidden-input\" matStartDate placeholder=\"Start date\">\n <input formControlName=\"to\" class=\"hidden-input\" matEndDate placeholder=\"End date\">\n </mat-date-range-input>\n\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n\n <mat-date-range-picker\n [calendarHeaderComponent]=\"HeaderComponent\"\n #picker\n ></mat-date-range-picker>\n</div>\n", styles: ["nice-date-range-picker .mat-date-range-input{width:0;height:0;padding:0;margin:0;border:none;visibility:hidden}\n"] }]
3937
3937
  }], propDecorators: { picker: [{
3938
3938
  type: ViewChild,
3939
3939
  args: [MatDateRangePicker]
@@ -10120,16 +10120,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
10120
10120
  }]
10121
10121
  }] });
10122
10122
 
10123
- class TranslationFormService {
10123
+ class NiceTranslationFormService {
10124
10124
  constructor() {
10125
10125
  this._languages$ = new BehaviorSubject([]);
10126
10126
  this._requiredLanguages$ = new BehaviorSubject([]);
10127
10127
  }
10128
10128
  get languages$() {
10129
- return this._languages$;
10129
+ return this._languages$.asObservable();
10130
+ }
10131
+ get languages() {
10132
+ return this._languages$.getValue();
10130
10133
  }
10131
10134
  get requiredLanguages$() {
10132
- return this._requiredLanguages$;
10135
+ return this._requiredLanguages$.asObservable();
10136
+ }
10137
+ get requiredLanguages() {
10138
+ return this._requiredLanguages$.value;
10139
+ }
10140
+ get hasLanguages$() {
10141
+ return this._languages$.asObservable().pipe(map((languages) => !!(languages === null || languages === void 0 ? void 0 : languages.length)));
10142
+ }
10143
+ get hasLanguages() {
10144
+ var _a;
10145
+ return !!((_a = this.languages) === null || _a === void 0 ? void 0 : _a.length);
10133
10146
  }
10134
10147
  setLanguages(languages) {
10135
10148
  this._languages$.next(languages !== null && languages !== void 0 ? languages : []);
@@ -10138,7 +10151,7 @@ class TranslationFormService {
10138
10151
  if (!(languages === null || languages === void 0 ? void 0 : languages.length)) {
10139
10152
  this._requiredLanguages$.next([]);
10140
10153
  }
10141
- const languagesValues = this.languages$.getValue();
10154
+ const languagesValues = this.languages;
10142
10155
  const unregisteredLanguages = languages === null || languages === void 0 ? void 0 : languages.filter((language) => !languagesValues.includes(language));
10143
10156
  if (unregisteredLanguages === null || unregisteredLanguages === void 0 ? void 0 : unregisteredLanguages.length) {
10144
10157
  throw new Error(`You provided languages that are not configured
@@ -10154,9 +10167,9 @@ class TranslationFormService {
10154
10167
  }
10155
10168
  }
10156
10169
  }
10157
- TranslationFormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10158
- TranslationFormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationFormService, providedIn: "root" });
10159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationFormService, decorators: [{
10170
+ NiceTranslationFormService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceTranslationFormService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10171
+ NiceTranslationFormService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceTranslationFormService, providedIn: "root" });
10172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: NiceTranslationFormService, decorators: [{
10160
10173
  type: Injectable,
10161
10174
  args: [{
10162
10175
  providedIn: "root",
@@ -10184,12 +10197,12 @@ class TranslationContextDirective {
10184
10197
  this.activeLanguage$.next(language);
10185
10198
  }
10186
10199
  }
10187
- TranslationContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationContextDirective, deps: [{ token: TranslationFormService }], target: i0.ɵɵFactoryTarget.Directive });
10200
+ TranslationContextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationContextDirective, deps: [{ token: NiceTranslationFormService }], target: i0.ɵɵFactoryTarget.Directive });
10188
10201
  TranslationContextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.3", type: TranslationContextDirective, selector: "[niceTranslationContext]", ngImport: i0 });
10189
10202
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationContextDirective, decorators: [{
10190
10203
  type: Directive,
10191
10204
  args: [{ selector: "[niceTranslationContext]" }]
10192
- }], ctorParameters: function () { return [{ type: TranslationFormService }]; } });
10205
+ }], ctorParameters: function () { return [{ type: NiceTranslationFormService }]; } });
10193
10206
 
10194
10207
  class TranslationToggleComponent {
10195
10208
  constructor(context, translationFormService) {
@@ -10202,54 +10215,12 @@ class TranslationToggleComponent {
10202
10215
  this.context.updateLanguage($event.value);
10203
10216
  }
10204
10217
  }
10205
- TranslationToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationToggleComponent, deps: [{ token: TranslationContextDirective }, { token: TranslationFormService }], target: i0.ɵɵFactoryTarget.Component });
10218
+ TranslationToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationToggleComponent, deps: [{ token: TranslationContextDirective }, { token: NiceTranslationFormService }], target: i0.ɵɵFactoryTarget.Component });
10206
10219
  TranslationToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: TranslationToggleComponent, selector: "nice-translation-toggle", ngImport: i0, template: "<mat-button-toggle-group\n *ngIf=\"(languages$ | async)?.length > 1\"\n (change)=\"onChange($event)\"\n [value]=\"activeLanguage$ | async\"\n>\n <mat-button-toggle *ngFor=\"let language of languages$ | async\" [value]=\"language\">\n {{ language | uppercase }}\n </mat-button-toggle>\n</mat-button-toggle-group>\n", dependencies: [{ kind: "directive", type: i3$2.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$2.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.UpperCasePipe, name: "uppercase" }] });
10207
10220
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationToggleComponent, decorators: [{
10208
10221
  type: Component,
10209
10222
  args: [{ selector: "nice-translation-toggle", template: "<mat-button-toggle-group\n *ngIf=\"(languages$ | async)?.length > 1\"\n (change)=\"onChange($event)\"\n [value]=\"activeLanguage$ | async\"\n>\n <mat-button-toggle *ngFor=\"let language of languages$ | async\" [value]=\"language\">\n {{ language | uppercase }}\n </mat-button-toggle>\n</mat-button-toggle-group>\n" }]
10210
- }], ctorParameters: function () { return [{ type: TranslationContextDirective }, { type: TranslationFormService }]; } });
10211
-
10212
- function RequireForLanguages() {
10213
- return registerAsyncValidatorDecorator({
10214
- name: "RequireForLanguages",
10215
- });
10216
- }
10217
- class RequireForLanguagesValidator extends AsyncValidator {
10218
- constructor(service) {
10219
- super();
10220
- this.service = service;
10221
- this.name = "RequireForLanguages";
10222
- }
10223
- validate(formGroup) {
10224
- const requiredLanguages = this.service.requiredLanguages$.getValue();
10225
- if (!requiredLanguages.length) {
10226
- return of(null);
10227
- }
10228
- const missingLanguages = [];
10229
- for (const requiredLanguage of requiredLanguages) {
10230
- const control = formGroup.get(requiredLanguage);
10231
- if (control === null || control === void 0 ? void 0 : control.value) {
10232
- continue;
10233
- }
10234
- missingLanguages.push(requiredLanguage);
10235
- }
10236
- if (missingLanguages === null || missingLanguages === void 0 ? void 0 : missingLanguages.length) {
10237
- return of({ languageRequired: { missingLanguages } });
10238
- }
10239
- return of(null);
10240
- }
10241
- }
10242
- RequireForLanguagesValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RequireForLanguagesValidator, deps: [{ token: TranslationFormService }], target: i0.ɵɵFactoryTarget.Injectable });
10243
- RequireForLanguagesValidator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RequireForLanguagesValidator });
10244
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RequireForLanguagesValidator, decorators: [{
10245
- type: Injectable
10246
- }], ctorParameters: function () { return [{ type: TranslationFormService }]; } });
10247
-
10248
- class TranslationForm {
10249
- constructor(values) {
10250
- Object.assign(this, values !== null && values !== void 0 ? values : {});
10251
- }
10252
- }
10223
+ }], ctorParameters: function () { return [{ type: TranslationContextDirective }, { type: NiceTranslationFormService }]; } });
10253
10224
 
10254
10225
  class TranslationFormComponent {
10255
10226
  constructor(container, context, service, changeDetectorRef) {
@@ -10373,14 +10344,14 @@ class TranslationFormComponent {
10373
10344
  this.currentControl = this.formGroup.get(languages[0]);
10374
10345
  }
10375
10346
  }
10376
- TranslationFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationFormComponent, deps: [{ token: i1$2.ControlContainer }, { token: TranslationContextDirective }, { token: TranslationFormService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10347
+ TranslationFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationFormComponent, deps: [{ token: i1$2.ControlContainer }, { token: TranslationContextDirective }, { token: NiceTranslationFormService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
10377
10348
  TranslationFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.3", type: TranslationFormComponent, selector: "ng-component", inputs: { required: "required", disabled: "disabled", placeholder: "placeholder", floating: "floating", maxLength: "maxLength" }, host: { properties: { "class": "this.classList", "class.floating": "this.shouldLabelFloat", "id": "this.id", "attr.aria-describedby": "this.describedBy" } }, ngImport: i0, template: ``, isInline: true });
10378
10349
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: TranslationFormComponent, decorators: [{
10379
10350
  type: Component,
10380
10351
  args: [{
10381
10352
  template: ``,
10382
10353
  }]
10383
- }], ctorParameters: function () { return [{ type: i1$2.ControlContainer }, { type: TranslationContextDirective }, { type: TranslationFormService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { classList: [{
10354
+ }], ctorParameters: function () { return [{ type: i1$2.ControlContainer }, { type: TranslationContextDirective }, { type: NiceTranslationFormService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { classList: [{
10384
10355
  type: HostBinding,
10385
10356
  args: ["class"]
10386
10357
  }], shouldLabelFloat: [{
@@ -10453,6 +10424,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
10453
10424
  ], template: "<input\n matInput\n [formControl]=\"currentControl\"\n [placeholder]=\"placeholder\"\n [maxlength]=\"maxLength\"\n/>\n" }]
10454
10425
  }] });
10455
10426
 
10427
+ function RequireForLanguages() {
10428
+ return registerAsyncValidatorDecorator({
10429
+ name: "RequireForLanguages",
10430
+ });
10431
+ }
10432
+ class RequireForLanguagesValidator extends AsyncValidator {
10433
+ constructor(service) {
10434
+ super();
10435
+ this.service = service;
10436
+ this.name = "RequireForLanguages";
10437
+ }
10438
+ validate(formGroup) {
10439
+ return this.service.requiredLanguages$.pipe(take(1), map((requiredLanguages) => {
10440
+ if (!requiredLanguages.length) {
10441
+ return null;
10442
+ }
10443
+ const missingLanguages = [];
10444
+ for (const requiredLanguage of requiredLanguages) {
10445
+ const control = formGroup.get(requiredLanguage);
10446
+ if (control === null || control === void 0 ? void 0 : control.value) {
10447
+ continue;
10448
+ }
10449
+ missingLanguages.push(requiredLanguage);
10450
+ }
10451
+ if (missingLanguages === null || missingLanguages === void 0 ? void 0 : missingLanguages.length) {
10452
+ return { languageRequired: { missingLanguages } };
10453
+ }
10454
+ return null;
10455
+ }));
10456
+ }
10457
+ }
10458
+ RequireForLanguagesValidator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RequireForLanguagesValidator, deps: [{ token: NiceTranslationFormService }], target: i0.ɵɵFactoryTarget.Injectable });
10459
+ RequireForLanguagesValidator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RequireForLanguagesValidator });
10460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImport: i0, type: RequireForLanguagesValidator, decorators: [{
10461
+ type: Injectable
10462
+ }], ctorParameters: function () { return [{ type: NiceTranslationFormService }]; } });
10463
+
10456
10464
  class NiceTranslationFormModule {
10457
10465
  static forRoot() {
10458
10466
  return {
@@ -10513,7 +10521,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
10513
10521
  }] });
10514
10522
 
10515
10523
  // tslint:disable-next-line:variable-name
10516
- const TranslationFormDecorator = () => DynamicGroup();
10524
+ const TranslationFormGroup = () => DynamicGroup();
10525
+
10526
+ class TranslationForm {
10527
+ constructor(values) {
10528
+ Object.assign(this, values !== null && values !== void 0 ? values : {});
10529
+ }
10530
+ }
10517
10531
 
10518
10532
  class NiceAutofocusDirective {
10519
10533
  constructor(elem) {
@@ -11396,5 +11410,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.3", ngImpor
11396
11410
  * Generated bundle index. Do not edit.
11397
11411
  */
11398
11412
 
11399
- export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ChipListItemLabelDirective, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LexoRankUtils, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NICE_ASYNC_TYPEAHEAD_PROVIDER, NavigationHideItemResolver, NavigationHintResolver, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselActiveContentDirective, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceChipAsyncTypeaheadDirective, NiceChipListDirective, NiceChipListDirectiveModule, NiceChipListItemsComponent, NiceClickStopPropagationDirective, NiceCollapsableComponent, NiceCollapsableModule, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDateRangePickerComponent, NiceDateRangePickerModule, NiceDraggableListDirective, NiceDraggableListModule, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceDropzoneDirective, NiceDropzoneModule, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertDirective, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTranslationFormModule, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RequireForLanguages, RequireForLanguagesValidator, RerenderDirective, ResolveDirective, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TrackByPropPipe, TranslationContextDirective, TranslationForm, TranslationFormDecorator, TranslationFormService, TranslationFormTextareaComponent, TranslationFormTextfieldComponent, TranslationToggleComponent, TypeUtils, UrlUtils, _HintComponentBase, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
11413
+ export { ArrayUtils, BooleanPipe, CapitalizeFirstLetterPipe, CarouselComponent, CaseUtils, CeilPipe, ChipListItemLabelDirective, ColorsUtils, DateUtils, DefaultExportBottomSheetService, EntriesPipe, ExportBottomSheetComponent, ExportBottomSheetService, FileUtils, FindByKeyPipe, FirstLetterPipe, FloorPipe, FontAwesomeUtils, FormDataUtils, HttpStatusCodes, ImgCropperConfig, ImgCropperError, ImgResolution, JoinPipe, KeyboardCodes, LexoRankUtils, LinkPipe, LocalizedBooleanPipe, LocalizedCurrencyPipe, LocalizedDateOnlyPipe, LocalizedDatePipe, MinutesToTimePipe, ModalMode, NICE_ASYNC_TYPEAHEAD_PROVIDER, NavigationHideItemResolver, NavigationHintResolver, NiceAlertComponent, NiceAlertModule, NiceAlertService, NiceApiException, NiceAssetsCarouselActiveContentDirective, NiceAssetsCarouselComponent, NiceAssetsCarouselModule, NiceAsyncTypeaheadComponent, NiceAsyncTypeaheadModule, NiceAsyncTypeaheadProvider, NiceAutofocusDirective, NiceAutofocusDirectiveModule, NiceAutogrowDirective, NiceAutogrowModule, NiceBaseForm, NiceBaseFormComponent, NiceBaseFormModule, NiceCardComponent, NiceCardModule, NiceCarouselModule, NiceChipAsyncTypeaheadDirective, NiceChipListDirective, NiceChipListDirectiveModule, NiceChipListItemsComponent, NiceClickStopPropagationDirective, NiceCollapsableComponent, NiceCollapsableModule, NiceConfigModule, NiceConfigService, NiceControlStatusDirective, NiceCropperAreaComponent, NiceDateRangePickerComponent, NiceDateRangePickerModule, NiceDraggableListDirective, NiceDraggableListModule, NiceDrawerComponent, NiceDrawerModule, NiceDrawerService, NiceDropzoneDirective, NiceDropzoneModule, NiceExportBottomSheetModule, NiceFormErrorComponent, NiceFormErrorModule, NiceFormSubmitDirective, NiceHorizontalNavigationBasicItemComponent, NiceHorizontalNavigationBranchItemComponent, NiceHorizontalNavigationComponent, NiceHorizontalNavigationDividerItemComponent, NiceHorizontalNavigationSpacerItemComponent, NiceHorizontalStepperComponent, NiceHorizontalStepperModule, NiceHttpExceptionFactory, NiceImageCropperComponent, NiceImageCropperModule, NiceImageErrorPlaceholderDirective, NiceImageErrorPlaceholderDirectiveModule, NiceLayoutComponent, NiceLayoutModule, NiceLoadingDirective, NiceLoadingSpinnerComponent, NiceLoadingSpinnerModule, NiceLottieComponent, NiceLottieModule, NiceMaterialModule, NiceMaterialStyleDirective, NiceMediaWatcherModule, NiceMediaWatcherService, NiceModalOnClickDirective, NiceModalOpenerDirective, NiceModule, NiceNavigationComponent, NiceNavigationModule, NiceNavigationService, NicePipesModule, NicePreventCloseWindowDirective, NiceRoundedStyleDirective, NiceScrollResetDirective, NiceScrollResetModule, NiceScrollbarDirective, NiceScrollbarModule, NiceSearchBarComponent, NiceSearchBarModule, NiceSplashScreenModule, NiceSplashScreenService, NiceStepComponent, NiceStopPropagationModule, NiceSweetAlertComponent, NiceSweetAlertDirective, NiceSweetAlertModule, NiceSweetAlertService, NiceToastComponent, NiceToastModule, NiceToastService, NiceToggleButtonGroupModule, NiceTransformResponseInterceptor, NiceTranslationFormModule, NiceTranslationFormService, NiceTypeaheadComponent, NiceTypeaheadModule, NiceTypeaheadNewValue, NiceUtilsModule, NiceUtilsService, NiceVerticalNavigationAsideItemComponent, NiceVerticalNavigationBasicItemComponent, NiceVerticalNavigationCollapsableItemComponent, NiceVerticalNavigationComponent, NiceVerticalNavigationDividerItemComponent, NiceVerticalNavigationGroupItemComponent, NiceVerticalNavigationSpacerItemComponent, NiceWindowDirectiveModule, NumberToOrdinalIndicatorPipe, NumberUtils, ObjectUtils, OptionsScrollDirective, PadPipe, PhonePipe, PictureModalComponent, PictureModalService, PostalCodePipe, PromiseUtils, QueryParamsUtils, RangePipe, RegexUtils, RequireForLanguages, RequireForLanguagesValidator, RerenderDirective, ResolveDirective, RoundPipe, SanitizeBypassPipe, SecondsToTimePipe, TRANSFORM_TYPE, ToggleButtonComponent, ToggleButtonGroupComponent, TrackByPropPipe, TranslationContextDirective, TranslationForm, TranslationFormGroup, TranslationFormTextareaComponent, TranslationFormTextfieldComponent, TranslationToggleComponent, TypeUtils, UrlUtils, _HintComponentBase, _normalizeDegrees, isNotNullOrUndefined, isNullOrUndefined, mergeDeep, mixinNiceApi, niceAnimations, round };
11400
11414
  //# sourceMappingURL=recursyve-nice-ui-kit.v2.mjs.map