rd-outer-component 0.0.96 → 0.0.98
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/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 +2 -2
- package/esm2020/lib/modules/custom-input-amount/custom-input-amount.component.mjs +3 -3
- package/esm2020/lib/modules/custom-textarea/custom-textarea.component.mjs +2 -2
- package/esm2020/lib/modules/rd-button/index.mjs +3 -0
- package/esm2020/lib/modules/rd-loading/OPLoading.json +1 -0
- package/esm2020/lib/modules/rd-loading/index.mjs +3 -0
- package/esm2020/lib/modules/rd-loading/rd-loading.component.mjs +178 -0
- package/esm2020/lib/modules/rd-loading/rd-loading.module.mjs +20 -0
- package/esm2020/lib/modules/rd-phone/index.mjs +3 -0
- package/esm2020/lib/modules/rd-phone/rd-phone.component.mjs +71 -0
- package/esm2020/lib/modules/rd-phone/rd-phone.module.mjs +36 -0
- package/esm2020/lib/modules/rd-remark-history/index.mjs +3 -0
- package/esm2020/lib/modules/rd-remark-history/rd-remark-history.component.mjs +24 -0
- package/esm2020/lib/modules/rd-remark-history/rd-remark-history.module.mjs +19 -0
- package/esm2020/lib/modules/rd-select-value/index.mjs +3 -0
- package/esm2020/lib/modules/rd-select-value/rd-select-value.component.mjs +136 -0
- package/esm2020/lib/modules/rd-select-value/rd-select-value.module.mjs +36 -0
- package/esm2020/lib/modules/rd-switch/index.mjs +3 -0
- package/esm2020/lib/modules/rd-switch/rd-switch.component.mjs +146 -0
- package/esm2020/lib/modules/rd-switch/rd-switch.module.mjs +39 -0
- package/esm2020/public-api.mjs +7 -1
- package/fesm2015/rd-outer-component.mjs +2695 -12
- package/fesm2015/rd-outer-component.mjs.map +1 -1
- package/fesm2020/rd-outer-component.mjs +2690 -12
- package/fesm2020/rd-outer-component.mjs.map +1 -1
- package/lib/modules/rd-button/index.d.ts +2 -0
- package/lib/modules/rd-loading/index.d.ts +2 -0
- package/lib/modules/rd-loading/rd-loading.component.d.ts +49 -0
- package/lib/modules/rd-loading/rd-loading.module.d.ts +10 -0
- package/lib/modules/rd-phone/index.d.ts +2 -0
- package/lib/modules/rd-phone/rd-phone.component.d.ts +25 -0
- package/lib/modules/rd-phone/rd-phone.module.d.ts +12 -0
- package/lib/modules/rd-remark-history/index.d.ts +2 -0
- package/lib/modules/rd-remark-history/rd-remark-history.component.d.ts +9 -0
- package/lib/modules/rd-remark-history/rd-remark-history.module.d.ts +9 -0
- package/lib/modules/rd-select-value/index.d.ts +2 -0
- package/lib/modules/rd-select-value/rd-select-value.component.d.ts +41 -0
- package/lib/modules/rd-select-value/rd-select-value.module.d.ts +12 -0
- package/lib/modules/rd-switch/index.d.ts +2 -0
- package/lib/modules/rd-switch/rd-switch.component.d.ts +41 -0
- package/lib/modules/rd-switch/rd-switch.module.d.ts +12 -0
- package/package.json +1 -1
- package/public-api.d.ts +6 -0
- package/src/lib/assets/scss/form-item.scss +9 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ElementRef, AfterViewInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RdLoadingComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
4
|
+
lottieContainer: ElementRef;
|
|
5
|
+
/**
|
|
6
|
+
* 动画容器尺寸(px)。
|
|
7
|
+
*
|
|
8
|
+
* **注意**:OPLoading.json 原始尺寸为 368×368,模板内通过 `scale(0.17)` 缩放以消除锯齿。
|
|
9
|
+
* 实际显示尺寸 = `size × 0.173`。
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* // 默认 ≈ 64px
|
|
13
|
+
* <app-rd-loading></app-rd-loading>
|
|
14
|
+
*
|
|
15
|
+
* // ≈ 40px
|
|
16
|
+
* <app-rd-loading [size]="235"></app-rd-loading>
|
|
17
|
+
*/
|
|
18
|
+
size: number;
|
|
19
|
+
loop: boolean;
|
|
20
|
+
autoplay: boolean;
|
|
21
|
+
speed: number;
|
|
22
|
+
margin: string;
|
|
23
|
+
containerClass: string;
|
|
24
|
+
customAnimationData?: any;
|
|
25
|
+
private animation;
|
|
26
|
+
private get animationData();
|
|
27
|
+
ngAfterViewInit(): void;
|
|
28
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
29
|
+
ngOnDestroy(): void;
|
|
30
|
+
private loadAnimation;
|
|
31
|
+
private reloadAnimation;
|
|
32
|
+
private destroyAnimation;
|
|
33
|
+
/** 停止动画 */
|
|
34
|
+
stop(): void;
|
|
35
|
+
/** 设置播放速度 */
|
|
36
|
+
setSpeed(speed: number): void;
|
|
37
|
+
/** 跳转到指定帧并播放 */
|
|
38
|
+
goToAndPlay(value: number, isFrame?: boolean): void;
|
|
39
|
+
/** 跳转到指定帧并停止 */
|
|
40
|
+
goToAndStop(value: number, isFrame?: boolean): void;
|
|
41
|
+
/** 获取动画总帧数 */
|
|
42
|
+
getTotalFrames(): number;
|
|
43
|
+
/** 获取动画持续时间(秒) */
|
|
44
|
+
getDuration(): number;
|
|
45
|
+
/** 重新启动动画 */
|
|
46
|
+
restart(): void;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdLoadingComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RdLoadingComponent, "app-rd-loading", never, { "size": "size"; "loop": "loop"; "autoplay": "autoplay"; "speed": "speed"; "margin": "margin"; "containerClass": "containerClass"; "customAnimationData": "customAnimationData"; }, {}, never, never, false, never>;
|
|
49
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./rd-loading.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 RdLoadingModule {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdLoadingModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdLoadingModule, [typeof i1.RdLoadingComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i3.FormsModule, typeof i4.NzInputModule], [typeof i1.RdLoadingComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdLoadingModule>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { FormGroup } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class RdPhoneComponent implements OnInit, OnDestroy {
|
|
5
|
+
/** Parent FormGroup — controls are registered into it */
|
|
6
|
+
form: any | FormGroup;
|
|
7
|
+
areaCodeControlName: string;
|
|
8
|
+
phoneControlName: string;
|
|
9
|
+
label: string;
|
|
10
|
+
required: boolean;
|
|
11
|
+
/** Local color context. Omit to inherit body `.theme-light` / `.theme-dark`. */
|
|
12
|
+
theme?: 'light' | 'dark';
|
|
13
|
+
/** Area codes to exclude from the dropdown (e.g. ['+86']) */
|
|
14
|
+
excludeAreaCodes: string[];
|
|
15
|
+
_areaCodeOptions: any[];
|
|
16
|
+
get areaCodeOptions(): any[];
|
|
17
|
+
private destroy$;
|
|
18
|
+
get hostThemeLight(): boolean;
|
|
19
|
+
get hostThemeDark(): boolean;
|
|
20
|
+
constructor();
|
|
21
|
+
ngOnInit(): void;
|
|
22
|
+
ngOnDestroy(): void;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdPhoneComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RdPhoneComponent, "app-rd-phone", never, { "form": "form"; "areaCodeControlName": "areaCodeControlName"; "phoneControlName": "phoneControlName"; "label": "label"; "required": "required"; "theme": "theme"; "excludeAreaCodes": "excludeAreaCodes"; "_areaCodeOptions": "_areaCodeOptions"; }, {}, never, never, false, never>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./rd-phone.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "@ngx-translate/core";
|
|
6
|
+
import * as i5 from "../rd-select-value/rd-select-value.module";
|
|
7
|
+
import * as i6 from "../custom-input/custom-input.module";
|
|
8
|
+
export declare class RdPhoneModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdPhoneModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdPhoneModule, [typeof i1.RdPhoneComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i4.TranslateModule, typeof i5.RdSelectValueModule, typeof i6.RdInputModule], [typeof i1.RdPhoneComponent]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdPhoneModule>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RdRemarkHistoryComponent {
|
|
4
|
+
remarks: string[];
|
|
5
|
+
select: EventEmitter<string>;
|
|
6
|
+
onSelect(remark: string): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdRemarkHistoryComponent, never>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RdRemarkHistoryComponent, "app-rd-remark-history", never, { "remarks": "remarks"; }, { "select": "select"; }, never, never, false, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./rd-remark-history.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@ngx-translate/core";
|
|
5
|
+
export declare class RdRemarkHistoryModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdRemarkHistoryModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdRemarkHistoryModule, [typeof i1.RdRemarkHistoryComponent], [typeof i2.CommonModule, typeof i3.TranslateModule], [typeof i1.RdRemarkHistoryComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdRemarkHistoryModule>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors } from '@angular/forms';
|
|
3
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RdSelectValueComponent implements ControlValueAccessor {
|
|
6
|
+
private cdr;
|
|
7
|
+
private translate;
|
|
8
|
+
options: {
|
|
9
|
+
name: string;
|
|
10
|
+
value: any;
|
|
11
|
+
}[];
|
|
12
|
+
isShowSearch: boolean;
|
|
13
|
+
isShowErrorTip: boolean;
|
|
14
|
+
placeholder: string;
|
|
15
|
+
label: string;
|
|
16
|
+
name: string;
|
|
17
|
+
/** Local color context. Omit to inherit body `.theme-light` / `.theme-dark`. */
|
|
18
|
+
theme?: 'light' | 'dark';
|
|
19
|
+
get hostThemeLight(): boolean;
|
|
20
|
+
get hostThemeDark(): boolean;
|
|
21
|
+
get dropdownClassName(): string;
|
|
22
|
+
value: any;
|
|
23
|
+
isDisabled: boolean;
|
|
24
|
+
isFocus: boolean;
|
|
25
|
+
isOpen: boolean;
|
|
26
|
+
searchInput: string;
|
|
27
|
+
private control;
|
|
28
|
+
private onChange;
|
|
29
|
+
private onTouched;
|
|
30
|
+
constructor(cdr: ChangeDetectorRef, translate: TranslateService);
|
|
31
|
+
get showError(): boolean;
|
|
32
|
+
get currentErrorMessage(): string;
|
|
33
|
+
onValueChange(val: any): void;
|
|
34
|
+
validate(control: AbstractControl | null): ValidationErrors | null;
|
|
35
|
+
writeValue(val: any): void;
|
|
36
|
+
registerOnChange(fn: (val: any) => void): void;
|
|
37
|
+
registerOnTouched(fn: () => void): void;
|
|
38
|
+
setDisabledState(isDisabled: boolean): void;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdSelectValueComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RdSelectValueComponent, "app-rd-select-value", never, { "options": "options"; "isShowSearch": "isShowSearch"; "isShowErrorTip": "isShowErrorTip"; "placeholder": "placeholder"; "label": "label"; "name": "name"; "theme": "theme"; }, {}, never, never, false, never>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./rd-select-value.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "ng-zorro-antd/select";
|
|
6
|
+
import * as i5 from "@ngx-translate/core";
|
|
7
|
+
import * as i6 from "../form-item/form-item.module";
|
|
8
|
+
export declare class RdSelectValueModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdSelectValueModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdSelectValueModule, [typeof i1.RdSelectValueComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i4.NzSelectModule, typeof i5.TranslateModule, typeof i6.FormItemModule], [typeof i1.RdSelectValueComponent]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdSelectValueModule>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EventEmitter, ChangeDetectorRef } from "@angular/core";
|
|
2
|
+
import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from "@angular/forms";
|
|
3
|
+
import { TranslateService } from "@ngx-translate/core";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class RdSwitchComponent implements ControlValueAccessor, Validator {
|
|
6
|
+
private cdr;
|
|
7
|
+
private translate;
|
|
8
|
+
label: string;
|
|
9
|
+
name: string;
|
|
10
|
+
tooltip: string;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
required: boolean;
|
|
13
|
+
checkedChildren: string;
|
|
14
|
+
unCheckedChildren: string;
|
|
15
|
+
/** Local color context. Omit to inherit body `.theme-light` / `.theme-dark`. */
|
|
16
|
+
theme?: "light" | "dark";
|
|
17
|
+
get hostThemeLight(): boolean;
|
|
18
|
+
get hostThemeDark(): boolean;
|
|
19
|
+
errorMessages: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
22
|
+
valueChange: EventEmitter<boolean>;
|
|
23
|
+
blur: EventEmitter<void>;
|
|
24
|
+
value: boolean;
|
|
25
|
+
private touched;
|
|
26
|
+
private onChange;
|
|
27
|
+
private onTouched;
|
|
28
|
+
private control;
|
|
29
|
+
get currentErrorMessage(): string;
|
|
30
|
+
get showError(): boolean;
|
|
31
|
+
constructor(cdr: ChangeDetectorRef, translate: TranslateService);
|
|
32
|
+
writeValue(value: boolean): void;
|
|
33
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
34
|
+
registerOnTouched(fn: () => void): void;
|
|
35
|
+
setDisabledState(isDisabled: boolean): void;
|
|
36
|
+
onBlur(): void;
|
|
37
|
+
handleValueChange(value: boolean): void;
|
|
38
|
+
validate(control: AbstractControl | null): ValidationErrors | null;
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdSwitchComponent, never>;
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RdSwitchComponent, "app-rd-switch", never, { "label": "label"; "name": "name"; "tooltip": "tooltip"; "disabled": "disabled"; "required": "required"; "checkedChildren": "checkedChildren"; "unCheckedChildren": "unCheckedChildren"; "theme": "theme"; "errorMessages": "errorMessages"; }, { "valueChange": "valueChange"; "blur": "blur"; }, never, never, false, never>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./rd-switch.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@angular/forms";
|
|
5
|
+
import * as i4 from "ng-zorro-antd/switch";
|
|
6
|
+
import * as i5 from "ng-zorro-antd/tooltip";
|
|
7
|
+
import * as i6 from "@ngx-translate/core";
|
|
8
|
+
export declare class RdSwitchModule {
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RdSwitchModule, never>;
|
|
10
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RdSwitchModule, [typeof i1.RdSwitchComponent], [typeof i2.CommonModule, typeof i3.ReactiveFormsModule, typeof i3.FormsModule, typeof i4.NzSwitchModule, typeof i5.NzToolTipModule, typeof i6.TranslateModule], [typeof i1.RdSwitchComponent]>;
|
|
11
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<RdSwitchModule>;
|
|
12
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ export * from './lib/modules/status-field';
|
|
|
11
11
|
export * from './lib/modules/header-step';
|
|
12
12
|
export * from './lib/modules/rd-notification';
|
|
13
13
|
export * from './lib/modules/task-base';
|
|
14
|
+
export * from './lib/modules/rd-button';
|
|
15
|
+
export * from './lib/modules/rd-loading';
|
|
16
|
+
export * from './lib/modules/rd-phone';
|
|
17
|
+
export * from './lib/modules/rd-remark-history';
|
|
18
|
+
export * from './lib/modules/rd-select-value';
|
|
19
|
+
export * from './lib/modules/rd-switch';
|
|
14
20
|
export * from './lib/pipes';
|
|
15
21
|
export * from './lib/decorators';
|
|
16
22
|
export * from './lib/utils/debounce';
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
input {
|
|
2
|
+
border: none;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
textarea[disabled] {
|
|
6
|
+
background: var(--input-bg-disable) !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
.rd-form-item {
|
|
2
10
|
position: relative;
|
|
3
11
|
border-radius: 12px;
|
|
@@ -110,7 +118,7 @@
|
|
|
110
118
|
|
|
111
119
|
.rd-form-number-item {
|
|
112
120
|
position: relative;
|
|
113
|
-
border-radius:
|
|
121
|
+
border-radius: 12px;
|
|
114
122
|
padding: 12px 16px;
|
|
115
123
|
background-color: var(--rd-input-bg-default);
|
|
116
124
|
border: 1px solid var(--rd-input-fg-default);
|