@recursyve/nice-ui-kit.v2 14.0.0-beta.117 → 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.
- package/esm2020/lib/components/public-api.mjs +2 -1
- package/esm2020/lib/components/translation-form/components/textarea/translation-form-textarea.component.mjs +37 -0
- package/esm2020/lib/components/translation-form/components/textfield/translation-form-textfield.component.mjs +25 -0
- package/esm2020/lib/components/translation-form/components/translation-form.component.mjs +164 -0
- package/esm2020/lib/components/translation-form/components/translation-form.module.mjs +71 -0
- package/esm2020/lib/components/translation-form/decorators/translation-form.decorator.mjs +4 -0
- package/esm2020/lib/components/translation-form/directives/translation-context.directive.mjs +34 -0
- package/esm2020/lib/components/translation-form/index.mjs +2 -0
- package/esm2020/lib/components/translation-form/providers/translation-form.service.mjs +46 -0
- package/esm2020/lib/components/translation-form/public-api.mjs +10 -0
- package/esm2020/lib/components/translation-form/toggle/translation-toggle.component.mjs +26 -0
- package/esm2020/lib/components/translation-form/translation.form.mjs +6 -0
- package/esm2020/lib/components/translation-form/validators/require-for-languages.validator.mjs +42 -0
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs +468 -70
- package/fesm2015/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs +468 -70
- package/fesm2020/recursyve-nice-ui-kit.v2.mjs.map +1 -1
- package/lib/components/public-api.d.ts +1 -0
- package/lib/components/translation-form/components/textarea/translation-form-textarea.component.d.ts +9 -0
- package/lib/components/translation-form/components/textfield/translation-form-textfield.component.d.ts +6 -0
- package/lib/components/translation-form/components/translation-form.component.d.ts +55 -0
- package/lib/components/translation-form/components/translation-form.module.d.ts +16 -0
- package/lib/components/translation-form/decorators/translation-form.decorator.d.ts +1 -0
- package/lib/components/translation-form/directives/translation-context.directive.d.ts +15 -0
- package/lib/components/translation-form/index.d.ts +1 -0
- package/lib/components/translation-form/providers/translation-form.service.d.ts +12 -0
- package/lib/components/translation-form/public-api.d.ts +9 -0
- package/lib/components/translation-form/toggle/translation-toggle.component.d.ts +14 -0
- package/lib/components/translation-form/translation.form.d.ts +5 -0
- package/lib/components/translation-form/validators/require-for-languages.validator.d.ts +14 -0
- package/package.json +2 -2
package/lib/components/translation-form/components/textarea/translation-form-textarea.component.d.ts
ADDED
|
@@ -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,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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recursyve/nice-ui-kit.v2",
|
|
3
|
-
"version": "14.0.0-beta.
|
|
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.
|
|
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"
|