@recursyve/nice-ui-kit.v2 14.0.0-beta.116 → 14.0.0-beta.118

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 (38) hide show
  1. package/esm2020/lib/components/assets-carousel/assets-carousel.component.mjs +9 -5
  2. package/esm2020/lib/components/assets-carousel/assets-carousel.module.mjs +8 -4
  3. package/esm2020/lib/components/public-api.mjs +2 -1
  4. package/esm2020/lib/components/translation-form/components/textarea/translation-form-textarea.component.mjs +37 -0
  5. package/esm2020/lib/components/translation-form/components/textfield/translation-form-textfield.component.mjs +25 -0
  6. package/esm2020/lib/components/translation-form/components/translation-form.component.mjs +164 -0
  7. package/esm2020/lib/components/translation-form/components/translation-form.module.mjs +71 -0
  8. package/esm2020/lib/components/translation-form/decorators/translation-form.decorator.mjs +4 -0
  9. package/esm2020/lib/components/translation-form/directives/translation-context.directive.mjs +34 -0
  10. package/esm2020/lib/components/translation-form/index.mjs +2 -0
  11. package/esm2020/lib/components/translation-form/providers/translation-form.service.mjs +46 -0
  12. package/esm2020/lib/components/translation-form/public-api.mjs +10 -0
  13. package/esm2020/lib/components/translation-form/toggle/translation-toggle.component.mjs +26 -0
  14. package/esm2020/lib/components/translation-form/translation.form.mjs +6 -0
  15. package/esm2020/lib/components/translation-form/validators/require-for-languages.validator.mjs +42 -0
  16. package/esm2020/lib/pipes/track-by-prop.pipe.mjs +1 -1
  17. package/fesm2015/recursyve-nice-ui-kit.v2.mjs +483 -79
  18. package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  19. package/fesm2020/recursyve-nice-ui-kit.v2.mjs +483 -79
  20. package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
  21. package/lib/components/assets-carousel/assets-carousel.component.d.ts +2 -1
  22. package/lib/components/assets-carousel/assets-carousel.module.d.ts +2 -1
  23. package/lib/components/public-api.d.ts +1 -0
  24. package/lib/components/translation-form/components/textarea/translation-form-textarea.component.d.ts +9 -0
  25. package/lib/components/translation-form/components/textfield/translation-form-textfield.component.d.ts +6 -0
  26. package/lib/components/translation-form/components/translation-form.component.d.ts +55 -0
  27. package/lib/components/translation-form/components/translation-form.module.d.ts +16 -0
  28. package/lib/components/translation-form/decorators/translation-form.decorator.d.ts +1 -0
  29. package/lib/components/translation-form/directives/translation-context.directive.d.ts +15 -0
  30. package/lib/components/translation-form/index.d.ts +1 -0
  31. package/lib/components/translation-form/providers/translation-form.service.d.ts +12 -0
  32. package/lib/components/translation-form/public-api.d.ts +9 -0
  33. package/lib/components/translation-form/toggle/translation-toggle.component.d.ts +14 -0
  34. package/lib/components/translation-form/translation.form.d.ts +5 -0
  35. package/lib/components/translation-form/validators/require-for-languages.validator.d.ts +14 -0
  36. package/lib/pipes/track-by-prop.pipe.d.ts +1 -1
  37. package/lib/utils/array.utils.d.ts +1 -1
  38. package/package.json +2 -2
@@ -46,6 +46,7 @@ export declare class NiceAssetsCarouselComponent implements ControlValueAccessor
46
46
  inputElement: ElementRef<HTMLInputElement>;
47
47
  color: ThemePalette;
48
48
  edit: boolean;
49
+ loading: boolean;
49
50
  accept: string[];
50
51
  customActions: NiceAssetsCarouselActions[];
51
52
  imagesProcessor: (fileList: FileList) => Promise<FileList>;
@@ -79,5 +80,5 @@ export declare class NiceAssetsCarouselComponent implements ControlValueAccessor
79
80
  startSyncVideo(): Promise<void>;
80
81
  private getProcessedFiles;
81
82
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceAssetsCarouselComponent, [{ optional: true; }]>;
82
- static ɵcmp: i0.ɵɵComponentDeclaration<NiceAssetsCarouselComponent, "nice-assets-carousel", never, { "color": "color"; "edit": "edit"; "accept": "accept"; "customActions": "customActions"; "imagesProcessor": "imagesProcessor"; "multipleUpload": "multipleUpload"; "visiblePreviewAsset": "visiblePreviewAsset"; "showAddAssetContainer": "showAddAssetContainer"; "assets": "assets"; }, { "activeChange": "activeChange"; "removedAsset": "removedAsset"; }, ["activeContent"], never, false>;
83
+ static ɵcmp: i0.ɵɵComponentDeclaration<NiceAssetsCarouselComponent, "nice-assets-carousel", never, { "color": "color"; "edit": "edit"; "loading": "loading"; "accept": "accept"; "customActions": "customActions"; "imagesProcessor": "imagesProcessor"; "multipleUpload": "multipleUpload"; "visiblePreviewAsset": "visiblePreviewAsset"; "showAddAssetContainer": "showAddAssetContainer"; "assets": "assets"; }, { "activeChange": "activeChange"; "removedAsset": "removedAsset"; }, ["activeContent"], never, false>;
83
84
  }
@@ -10,9 +10,10 @@ import * as i6 from "@angular/material/menu";
10
10
  import * as i7 from "@angular/material/core";
11
11
  import * as i8 from "../../directives/dropzone/dropzone.module";
12
12
  import * as i9 from "@ngx-translate/core";
13
+ import * as i10 from "@angular/material/progress-spinner";
13
14
  export declare class NiceAssetsCarouselModule {
14
15
  static forRoot(options?: NiceAssetsCarouselOptions): ModuleWithProviders<NiceAssetsCarouselModule>;
15
16
  static ɵfac: i0.ɵɵFactoryDeclaration<NiceAssetsCarouselModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<NiceAssetsCarouselModule, [typeof i1.NiceAssetsCarouselComponent, typeof i2.NiceAssetsCarouselActiveContentDirective], [typeof i3.CommonModule, typeof i4.MatIconModule, typeof i5.MatButtonModule, typeof i6.MatMenuModule, typeof i7.MatRippleModule, typeof i8.NiceDropzoneModule, typeof i9.TranslateModule], [typeof i1.NiceAssetsCarouselComponent, typeof i2.NiceAssetsCarouselActiveContentDirective]>;
17
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NiceAssetsCarouselModule, [typeof i1.NiceAssetsCarouselComponent, typeof i2.NiceAssetsCarouselActiveContentDirective], [typeof i3.CommonModule, typeof i4.MatIconModule, typeof i5.MatButtonModule, typeof i6.MatMenuModule, typeof i7.MatRippleModule, typeof i8.NiceDropzoneModule, typeof i9.TranslateModule, typeof i10.MatProgressSpinnerModule], [typeof i1.NiceAssetsCarouselComponent, typeof i2.NiceAssetsCarouselActiveContentDirective]>;
17
18
  static ɵinj: i0.ɵɵInjectorDeclaration<NiceAssetsCarouselModule>;
18
19
  }
@@ -19,4 +19,5 @@ export * from "./search-bar";
19
19
  export * from "./sweet-alert";
20
20
  export * from "./toast";
21
21
  export * from "./toggle-button-group";
22
+ export * from "./translation-form";
22
23
  export * from "./typeahead";
@@ -0,0 +1,9 @@
1
+ import { TranslationFormComponent } from "../translation-form.component";
2
+ import * as i0 from "@angular/core";
3
+ export declare class TranslationFormTextareaComponent extends TranslationFormComponent {
4
+ resizable: boolean;
5
+ rows: number;
6
+ cols: number;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationFormTextareaComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<TranslationFormTextareaComponent, "nice-translation-form-textarea", never, { "resizable": "resizable"; "rows": "rows"; "cols": "cols"; }, {}, never, never, false>;
9
+ }
@@ -0,0 +1,6 @@
1
+ import { TranslationFormComponent } from "../translation-form.component";
2
+ import * as i0 from "@angular/core";
3
+ export declare class TranslationFormTextfieldComponent extends TranslationFormComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationFormTextfieldComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<TranslationFormTextfieldComponent, "nice-translation-form-textfield", never, {}, {}, never, never, false>;
6
+ }
@@ -0,0 +1,55 @@
1
+ import { ChangeDetectorRef, OnDestroy, OnInit } from "@angular/core";
2
+ import { AbstractControlDirective, ControlContainer, ControlValueAccessor, FormControl, FormGroup, NgControl } from "@angular/forms";
3
+ import { MatFormFieldControl } from "@angular/material/form-field";
4
+ import { Subject } from "rxjs";
5
+ import { TranslationContextDirective } from "../directives/translation-context.directive";
6
+ import { TranslationFormService } from "../providers/translation-form.service";
7
+ import * as i0 from "@angular/core";
8
+ export declare abstract class TranslationFormComponent implements OnInit, OnDestroy, MatFormFieldControl<string>, ControlValueAccessor {
9
+ private container;
10
+ private context;
11
+ private service;
12
+ private changeDetectorRef;
13
+ get classList(): any;
14
+ get shouldLabelFloat(): boolean;
15
+ set required(req: boolean);
16
+ get required(): boolean;
17
+ get disabled(): boolean;
18
+ set disabled(value: boolean);
19
+ set placeholder(placeholder: string);
20
+ get placeholder(): string;
21
+ set value(value: any);
22
+ get value(): any;
23
+ get empty(): boolean;
24
+ get errorState(): boolean;
25
+ constructor(container: ControlContainer, context: TranslationContextDirective, service: TranslationFormService, changeDetectorRef: ChangeDetectorRef);
26
+ floating: boolean;
27
+ maxLength: number;
28
+ id: string;
29
+ describedBy: string;
30
+ formGroup: FormGroup;
31
+ currentControl?: FormControl;
32
+ stateChanges: Subject<void>;
33
+ ngControl: AbstractControlDirective | NgControl;
34
+ focused: boolean;
35
+ controlType: string;
36
+ private _unsubscribeAll$;
37
+ private _required;
38
+ private _disabled;
39
+ private _placeholder;
40
+ private _value;
41
+ readonly autofilled: boolean;
42
+ readonly userAriaDescribedBy: string;
43
+ propagate: (value: string) => void;
44
+ onContainerClick(event: MouseEvent): void;
45
+ setDescribedByIds(ids: string[]): void;
46
+ registerOnChange(fn: any): void;
47
+ registerOnTouched(fn: any): void;
48
+ writeValue(value: any): void;
49
+ ngOnInit(): void;
50
+ ngOnDestroy(): void;
51
+ setLanguage(language: string): void;
52
+ private setupFormControls;
53
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationFormComponent, never>;
54
+ static ɵcmp: i0.ɵɵComponentDeclaration<TranslationFormComponent, "ng-component", never, { "required": "required"; "disabled": "disabled"; "placeholder": "placeholder"; "floating": "floating"; "maxLength": "maxLength"; }, {}, never, never, false>;
55
+ }
@@ -0,0 +1,16 @@
1
+ import { ModuleWithProviders } from "@angular/core";
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "./textfield/translation-form-textfield.component";
4
+ import * as i2 from "./textarea/translation-form-textarea.component";
5
+ import * as i3 from "../toggle/translation-toggle.component";
6
+ import * as i4 from "../directives/translation-context.directive";
7
+ import * as i5 from "@angular/material/button-toggle";
8
+ import * as i6 from "@angular/material/input";
9
+ import * as i7 from "@angular/forms";
10
+ import * as i8 from "@angular/common";
11
+ export declare class NiceTranslationFormModule {
12
+ static forRoot(): ModuleWithProviders<NiceTranslationFormModule>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<NiceTranslationFormModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NiceTranslationFormModule, [typeof i1.TranslationFormTextfieldComponent, typeof i2.TranslationFormTextareaComponent, typeof i3.TranslationToggleComponent, typeof i4.TranslationContextDirective], [typeof i5.MatButtonToggleModule, typeof i6.MatInputModule, typeof i7.ReactiveFormsModule, typeof i8.NgForOf, typeof i8.NgIf, typeof i8.AsyncPipe, typeof i8.UpperCasePipe], [typeof i1.TranslationFormTextfieldComponent, typeof i2.TranslationFormTextareaComponent, typeof i3.TranslationToggleComponent, typeof i4.TranslationContextDirective]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<NiceTranslationFormModule>;
16
+ }
@@ -0,0 +1 @@
1
+ export declare const TranslationFormDecorator: () => PropertyDecorator;
@@ -0,0 +1,15 @@
1
+ import { OnDestroy, OnInit } from "@angular/core";
2
+ import { BehaviorSubject } from "rxjs";
3
+ import { TranslationFormService } from "../providers/translation-form.service";
4
+ import * as i0 from "@angular/core";
5
+ export declare class TranslationContextDirective implements OnInit, OnDestroy {
6
+ private translationFormService;
7
+ activeLanguage$: BehaviorSubject<string>;
8
+ private _unsubscribeAll$;
9
+ constructor(translationFormService: TranslationFormService);
10
+ ngOnInit(): void;
11
+ ngOnDestroy(): void;
12
+ updateLanguage(language: string): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationContextDirective, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TranslationContextDirective, "[niceTranslationContext]", never, {}, {}, never, never, false>;
15
+ }
@@ -0,0 +1 @@
1
+ export * from "./public-api";
@@ -0,0 +1,12 @@
1
+ import { BehaviorSubject } from "rxjs";
2
+ import * as i0 from "@angular/core";
3
+ export declare class TranslationFormService {
4
+ private _languages$;
5
+ private _requiredLanguages$;
6
+ get languages$(): BehaviorSubject<string[]>;
7
+ get requiredLanguages$(): BehaviorSubject<string[]>;
8
+ setLanguages(languages?: string[]): void;
9
+ setRequiredLanguages(languages?: string[]): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationFormService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<TranslationFormService>;
12
+ }
@@ -0,0 +1,9 @@
1
+ export * from "./toggle/translation-toggle.component";
2
+ export * from "./directives/translation-context.directive";
3
+ export * from "./providers/translation-form.service";
4
+ export * from "./validators/require-for-languages.validator";
5
+ export * from "./translation.form";
6
+ export * from "./components/translation-form.module";
7
+ export * from "./components/textarea/translation-form-textarea.component";
8
+ export * from "./components/textfield/translation-form-textfield.component";
9
+ export * from "./decorators/translation-form.decorator";
@@ -0,0 +1,14 @@
1
+ import { MatButtonToggleChange } from "@angular/material/button-toggle";
2
+ import { TranslationContextDirective } from "../directives/translation-context.directive";
3
+ import { TranslationFormService } from "../providers/translation-form.service";
4
+ import * as i0 from "@angular/core";
5
+ export declare class TranslationToggleComponent {
6
+ private context;
7
+ private translationFormService;
8
+ languages$: import("rxjs").BehaviorSubject<string[]>;
9
+ activeLanguage$: import("rxjs").BehaviorSubject<string>;
10
+ constructor(context: TranslationContextDirective, translationFormService: TranslationFormService);
11
+ onChange($event: MatButtonToggleChange): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationToggleComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<TranslationToggleComponent, "nice-translation-toggle", never, {}, {}, never, never, false>;
14
+ }
@@ -0,0 +1,5 @@
1
+ export declare class TranslationForm {
2
+ constructor(values?: {
3
+ [language: string]: string;
4
+ });
5
+ }
@@ -0,0 +1,14 @@
1
+ import { ValidationErrors, FormGroup } from "@angular/forms";
2
+ import { AsyncValidator } from "@recursyve/ngx-form-generator";
3
+ import { Observable } from "rxjs";
4
+ import { TranslationFormService } from "../providers/translation-form.service";
5
+ import * as i0 from "@angular/core";
6
+ export declare function RequireForLanguages(): (target: object, propertyKey: string) => void;
7
+ export declare class RequireForLanguagesValidator extends AsyncValidator {
8
+ private service;
9
+ name: string;
10
+ constructor(service: TranslationFormService);
11
+ validate(formGroup: FormGroup): Observable<ValidationErrors | null>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<RequireForLanguagesValidator, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<RequireForLanguagesValidator>;
14
+ }
@@ -1,6 +1,6 @@
1
1
  import { PipeTransform, TrackByFunction } from "@angular/core";
2
2
  import * as i0 from "@angular/core";
3
- export declare class TrackByPropPipe<T = any> implements PipeTransform {
3
+ export declare class TrackByPropPipe<T> implements PipeTransform {
4
4
  transform(prop: keyof T & string): TrackByFunction<T>;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<TrackByPropPipe<any>, never>;
6
6
  static ɵpipe: i0.ɵɵPipeDeclaration<TrackByPropPipe<any>, "trackByProp", false>;
@@ -8,7 +8,7 @@ export declare class ArrayUtils {
8
8
  }): boolean;
9
9
  private static unorderedShallowEquals;
10
10
  static sortByKey(array: any[], key: string): any[];
11
- static sortByKeyFn(key: string): (a: any, b: any) => 1 | -1 | 0;
11
+ static sortByKeyFn(key: string): (a: any, b: any) => 0 | 1 | -1;
12
12
  static groupBy<Item, Key, Value>(array: Item[], keySelector: (item: Item) => Key, valueSelector: (item: Item) => Value[] | Value): Map<Key, Value[]>;
13
13
  }
14
14
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@recursyve/nice-ui-kit.v2",
3
- "version": "14.0.0-beta.116",
3
+ "version": "14.0.0-beta.118",
4
4
  "exports": {
5
5
  ".": {
6
6
  "sass": "./_index.scss",
@@ -22,7 +22,7 @@
22
22
  "@angular/forms": "^14.0.0",
23
23
  "@angular/material": "^14.0.0",
24
24
  "@ngx-translate/core": "^14.0.0",
25
- "@recursyve/ngx-form-generator": ">= 14.0.0-beta.36",
25
+ "@recursyve/ngx-form-generator": ">= 14.0.0-beta.40",
26
26
  "ngx-mask": "^14.0.0",
27
27
  "perfect-scrollbar": "^1.5.3",
28
28
  "uuid": ">= 9.0.0"