rd-outer-component 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/decorators/index.mjs +2 -0
- package/esm2020/lib/decorators/search-debounce.decorator.mjs +46 -0
- package/esm2020/lib/modules/custom-checkbox/custom-checkbox.component.mjs +2 -2
- package/esm2020/lib/modules/custom-date/custom-date.component.mjs +2 -2
- package/esm2020/lib/modules/custom-filter/custom-filter.component.mjs +2 -2
- package/esm2020/lib/modules/custom-input/custom-input.component.mjs +58 -67
- package/esm2020/lib/modules/custom-input-amount/custom-input-amount.component.mjs +29 -28
- package/esm2020/lib/modules/custom-radio/custom-radio.component.mjs +2 -2
- package/esm2020/lib/modules/custom-select/custom-select.component.mjs +2 -2
- package/esm2020/lib/modules/custom-textarea/custom-textarea.component.mjs +176 -0
- package/esm2020/lib/modules/custom-textarea/custom-textarea.module.mjs +20 -0
- package/esm2020/lib/modules/custom-textarea/index.mjs +3 -0
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/rd-outer-component.mjs +375 -148
- package/fesm2015/rd-outer-component.mjs.map +1 -1
- package/fesm2020/rd-outer-component.mjs +367 -147
- package/fesm2020/rd-outer-component.mjs.map +1 -1
- package/lib/decorators/index.d.ts +1 -0
- package/lib/decorators/search-debounce.decorator.d.ts +1 -0
- package/lib/modules/custom-input/custom-input.component.d.ts +3 -3
- package/lib/modules/custom-input-amount/custom-input-amount.component.d.ts +4 -4
- package/lib/modules/custom-textarea/custom-textarea.component.d.ts +41 -0
- package/lib/modules/custom-textarea/custom-textarea.module.d.ts +10 -0
- package/lib/modules/custom-textarea/index.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/src/lib/assets/scss/form-item.scss +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './search-debounce.decorator';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function DebounceSearch(milliseconds?: number, queryMinLength?: number, queryMaxLength?: number): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -9,6 +9,7 @@ export declare class CustomInputComponent implements ControlValueAccessor, Valid
|
|
|
9
9
|
disabled: boolean;
|
|
10
10
|
maskNumber: number;
|
|
11
11
|
maskType: 'amount' | 'text';
|
|
12
|
+
type: 'password' | 'text';
|
|
12
13
|
required: boolean;
|
|
13
14
|
min?: number;
|
|
14
15
|
max?: number;
|
|
@@ -16,7 +17,6 @@ export declare class CustomInputComponent implements ControlValueAccessor, Valid
|
|
|
16
17
|
maxLength?: number;
|
|
17
18
|
pattern?: string | RegExp;
|
|
18
19
|
customValidator?: ValidatorFn;
|
|
19
|
-
type: 'password' | 'text';
|
|
20
20
|
errorMessages: {
|
|
21
21
|
[key: string]: string;
|
|
22
22
|
};
|
|
@@ -30,17 +30,17 @@ export declare class CustomInputComponent implements ControlValueAccessor, Valid
|
|
|
30
30
|
private onTouched;
|
|
31
31
|
private control;
|
|
32
32
|
private onValidatorChange;
|
|
33
|
-
errors: ValidationErrors | null;
|
|
34
33
|
get currentErrorMessage(): string;
|
|
35
34
|
get showError(): boolean;
|
|
36
35
|
constructor(cdr: ChangeDetectorRef);
|
|
37
36
|
writeValue(value: string): void;
|
|
38
37
|
registerOnChange(fn: (value: string) => void): void;
|
|
39
38
|
registerOnTouched(fn: () => void): void;
|
|
39
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
40
40
|
setDisabledState(isDisabled: boolean): void;
|
|
41
41
|
onBlur(): void;
|
|
42
42
|
handleValueChange(value: string): void;
|
|
43
43
|
validate(control: AbstractControl | null): ValidationErrors | null;
|
|
44
44
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomInputComponent, never>;
|
|
45
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CustomInputComponent, "app-rd-input", never, { "label": "label"; "symbol": "symbol"; "name": "name"; "disabled": "disabled"; "maskNumber": "maskNumber"; "maskType": "maskType"; "required": "required"; "min": "min"; "max": "max"; "minLength": "minLength"; "maxLength": "maxLength"; "pattern": "pattern"; "customValidator": "customValidator"; "
|
|
45
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomInputComponent, "app-rd-input", never, { "label": "label"; "symbol": "symbol"; "name": "name"; "disabled": "disabled"; "maskNumber": "maskNumber"; "maskType": "maskType"; "type": "type"; "required": "required"; "min": "min"; "max": "max"; "minLength": "minLength"; "maxLength": "maxLength"; "pattern": "pattern"; "customValidator": "customValidator"; "errorMessages": "errorMessages"; }, { "valueChange": "valueChange"; "focus": "focus"; "blur": "blur"; }, never, never, false, never>;
|
|
46
46
|
}
|
|
@@ -20,20 +20,20 @@ export declare class CustomInputAmountComponent implements ControlValueAccessor,
|
|
|
20
20
|
private touched;
|
|
21
21
|
private control;
|
|
22
22
|
errors: ValidationErrors | null;
|
|
23
|
-
onChange
|
|
24
|
-
onTouched
|
|
23
|
+
private onChange;
|
|
24
|
+
private onTouched;
|
|
25
25
|
private onValidatorChange;
|
|
26
26
|
constructor(cdr: ChangeDetectorRef);
|
|
27
27
|
get currentErrorMessage(): string;
|
|
28
28
|
get showError(): boolean;
|
|
29
|
-
handleValueChange(
|
|
29
|
+
handleValueChange(raw: string): void;
|
|
30
30
|
onBlur(): void;
|
|
31
31
|
registerOnChange(fn: (value: string) => void): void;
|
|
32
32
|
registerOnTouched(fn: () => void): void;
|
|
33
33
|
setDisabledState(isDisabled: boolean): void;
|
|
34
34
|
registerOnValidatorChange(fn: () => void): void;
|
|
35
35
|
validate(control: AbstractControl): ValidationErrors | null;
|
|
36
|
-
writeValue(value: string): void;
|
|
36
|
+
writeValue(value: string | number | null): void;
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomInputAmountComponent, never>;
|
|
38
38
|
static ɵcmp: i0.ɵɵComponentDeclaration<CustomInputAmountComponent, "app-rd-input-amount", never, { "label": "label"; "symbol": "symbol"; "name": "name"; "disabled": "disabled"; "min": "min"; "max": "max"; "nzPrecision": "nzPrecision"; "required": "required"; "errorMessages": "errorMessages"; }, { "valueChange": "valueChange"; }, never, ["*"], false, never>;
|
|
39
39
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EventEmitter, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator, ValidatorFn } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CustomTextareaComponent implements ControlValueAccessor, Validator {
|
|
5
|
+
private cdr;
|
|
6
|
+
label: string;
|
|
7
|
+
name: string;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
required: boolean;
|
|
10
|
+
minLength?: number;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
pattern?: string | RegExp;
|
|
13
|
+
customValidator?: ValidatorFn;
|
|
14
|
+
nzAutosize: boolean;
|
|
15
|
+
errorMessages: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
};
|
|
18
|
+
valueChange: EventEmitter<string>;
|
|
19
|
+
focus: EventEmitter<void>;
|
|
20
|
+
blur: EventEmitter<void>;
|
|
21
|
+
value: string;
|
|
22
|
+
isFocused: boolean;
|
|
23
|
+
private touched;
|
|
24
|
+
private onChange;
|
|
25
|
+
private onTouched;
|
|
26
|
+
private control;
|
|
27
|
+
private onValidatorChange;
|
|
28
|
+
get currentErrorMessage(): string;
|
|
29
|
+
get showError(): boolean;
|
|
30
|
+
constructor(cdr: ChangeDetectorRef);
|
|
31
|
+
writeValue(value: string): void;
|
|
32
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
33
|
+
registerOnTouched(fn: () => void): void;
|
|
34
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
35
|
+
setDisabledState(isDisabled: boolean): void;
|
|
36
|
+
onBlur(): void;
|
|
37
|
+
handleValueChange(value: string): void;
|
|
38
|
+
validate(control: AbstractControl | null): ValidationErrors | null;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomTextareaComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CustomTextareaComponent, "app-rd-textarea", never, { "label": "label"; "name": "name"; "disabled": "disabled"; "required": "required"; "minLength": "minLength"; "maxLength": "maxLength"; "pattern": "pattern"; "customValidator": "customValidator"; "nzAutosize": "nzAutosize"; "errorMessages": "errorMessages"; }, { "valueChange": "valueChange"; "focus": "focus"; "blur": "blur"; }, never, never, false, never>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./custom-textarea.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "ng-zorro-antd/input";
|
|
6
|
+
export declare class RdTextareaModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdTextareaModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdTextareaModule, [typeof i1.CustomTextareaComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i3.FormsModule, typeof i4.NzInputModule], [typeof i1.CustomTextareaComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdTextareaModule>;
|
|
10
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './lib/modules/custom-checkbox';
|
|
2
2
|
export * from './lib/modules/custom-date';
|
|
3
3
|
export * from './lib/modules/custom-input';
|
|
4
|
+
export * from './lib/modules/custom-textarea';
|
|
4
5
|
export * from './lib/modules/custom-input-amount';
|
|
5
6
|
export * from './lib/modules/custom-radio';
|
|
6
7
|
export * from './lib/modules/custom-select';
|
|
@@ -8,4 +9,5 @@ export * from './lib/modules/custom-filter';
|
|
|
8
9
|
export * from './lib/modules/custom-pagination';
|
|
9
10
|
export * from './lib/modules/status-field';
|
|
10
11
|
export * from './lib/pipes';
|
|
12
|
+
export * from './lib/decorators';
|
|
11
13
|
export * from './lib/utils/debounce';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
.form-item {
|
|
2
2
|
position: relative;
|
|
3
3
|
border-radius: 4px;
|
|
4
|
+
padding: 2px 6px;
|
|
4
5
|
border: 1px solid #e5e7eb;
|
|
5
6
|
background-color: #fff;
|
|
6
7
|
width: 100%;
|
|
7
8
|
margin-top: 16px;
|
|
8
|
-
|
|
9
|
+
height: 64px;
|
|
9
10
|
|
|
10
11
|
.form-item-select-icon {
|
|
11
12
|
position: absolute;
|