rd-outer-component 0.1.2 → 0.1.3
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/rd-phone/rd-phone.component.mjs +9 -8
- package/fesm2015/rd-outer-component.mjs +8 -7
- package/fesm2015/rd-outer-component.mjs.map +1 -1
- package/fesm2020/rd-outer-component.mjs +8 -7
- package/fesm2020/rd-outer-component.mjs.map +1 -1
- package/lib/modules/rd-phone/rd-phone.component.d.ts +5 -4
- package/package.json +1 -1
|
@@ -5643,10 +5643,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5643
5643
|
}] } });
|
|
5644
5644
|
|
|
5645
5645
|
class RdPhoneComponent {
|
|
5646
|
-
get
|
|
5646
|
+
get filteredAreaCodeOptions() {
|
|
5647
5647
|
if (!this.excludeAreaCodes?.length)
|
|
5648
|
-
return this.
|
|
5649
|
-
return this.
|
|
5648
|
+
return this.areaCodeOptions || [];
|
|
5649
|
+
return (this.areaCodeOptions || []).filter((opt) => !this.excludeAreaCodes.includes(opt.value));
|
|
5650
5650
|
}
|
|
5651
5651
|
get hostThemeLight() {
|
|
5652
5652
|
return this.theme === 'light';
|
|
@@ -5661,7 +5661,8 @@ class RdPhoneComponent {
|
|
|
5661
5661
|
this.required = false;
|
|
5662
5662
|
/** Area codes to exclude from the dropdown (e.g. ['+86']) */
|
|
5663
5663
|
this.excludeAreaCodes = [];
|
|
5664
|
-
|
|
5664
|
+
/** Full area-code list from the host (e.g. commonService.areaDictionary) */
|
|
5665
|
+
this.areaCodeOptions = [];
|
|
5665
5666
|
this.destroy$ = new Subject();
|
|
5666
5667
|
}
|
|
5667
5668
|
ngOnInit() {
|
|
@@ -5678,10 +5679,10 @@ class RdPhoneComponent {
|
|
|
5678
5679
|
}
|
|
5679
5680
|
}
|
|
5680
5681
|
RdPhoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RdPhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5681
|
-
RdPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RdPhoneComponent, selector: "app-rd-phone", inputs: { form: "form", areaCodeControlName: "areaCodeControlName", phoneControlName: "phoneControlName", label: "label", required: "required", theme: "theme", excludeAreaCodes: "excludeAreaCodes",
|
|
5682
|
+
RdPhoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RdPhoneComponent, selector: "app-rd-phone", inputs: { form: "form", areaCodeControlName: "areaCodeControlName", phoneControlName: "phoneControlName", label: "label", required: "required", theme: "theme", excludeAreaCodes: "excludeAreaCodes", areaCodeOptions: "areaCodeOptions" }, host: { properties: { "class.theme-light": "this.hostThemeLight", "class.theme-dark": "this.hostThemeDark" } }, ngImport: i0, template: "<div class=\"rd-phone-field\" [formGroup]=\"form\">\n <div class=\"rd-phone-row\">\n <div class=\"rd-phone-area-code\">\n <app-rd-select-value\n [formControlName]=\"areaCodeControlName\"\n [options]=\"filteredAreaCodeOptions\"\n [isShowSearch]=\"true\"\n [theme]=\"theme\"\n ></app-rd-select-value>\n </div>\n <div class=\"rd-phone-number\">\n <app-rd-input\n [formControlName]=\"phoneControlName\"\n [label]=\"label\"\n [required]=\"required\"\n [maskType]=\"'number'\"\n [theme]=\"theme\"\n ></app-rd-input>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}:host .rd-phone-row{display:flex;gap:8px;align-items:flex-start}:host .rd-phone-area-code{width:93px;flex-shrink:0}:host .rd-phone-area-code ::ng-deep .rd-form-item-select .ant-select-selection-search-input{color:inherit;display:block;margin-top:-6px;padding:0 5px}:host .rd-phone-number{flex:1;min-width:0}:host .rd-phone-error{display:flex;align-items:center;gap:4px;margin-top:4px;font-size:12px;line-height:16px;color:var(--rd-copy-danger)}\n"], dependencies: [{ kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: RdSelectValueComponent, selector: "app-rd-select-value", inputs: ["options", "isShowSearch", "isShowErrorTip", "placeholder", "label", "name", "theme"] }, { kind: "component", type: CustomInputComponent, selector: "app-rd-input", inputs: ["label", "symbol", "name", "disabled", "maskNumber", "maskType", "type", "allowNegativeNumbers", "theme", "required", "placeholder", "min", "max", "minLength", "maxLength", "pattern", "customValidator", "size", "errorMessages"], outputs: ["valueChange", "focus", "blur"] }] });
|
|
5682
5683
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RdPhoneComponent, decorators: [{
|
|
5683
5684
|
type: Component,
|
|
5684
|
-
args: [{ selector: 'app-rd-phone', template: "<div class=\"rd-phone-field\" [formGroup]=\"form\">\n <div class=\"rd-phone-row\">\n <div class=\"rd-phone-area-code\">\n <app-rd-select-value\n [formControlName]=\"areaCodeControlName\"\n [options]=\"
|
|
5685
|
+
args: [{ selector: 'app-rd-phone', template: "<div class=\"rd-phone-field\" [formGroup]=\"form\">\n <div class=\"rd-phone-row\">\n <div class=\"rd-phone-area-code\">\n <app-rd-select-value\n [formControlName]=\"areaCodeControlName\"\n [options]=\"filteredAreaCodeOptions\"\n [isShowSearch]=\"true\"\n [theme]=\"theme\"\n ></app-rd-select-value>\n </div>\n <div class=\"rd-phone-number\">\n <app-rd-input\n [formControlName]=\"phoneControlName\"\n [label]=\"label\"\n [required]=\"required\"\n [maskType]=\"'number'\"\n [theme]=\"theme\"\n ></app-rd-input>\n </div>\n </div>\n</div>\n", styles: [":host{display:block}:host .rd-phone-row{display:flex;gap:8px;align-items:flex-start}:host .rd-phone-area-code{width:93px;flex-shrink:0}:host .rd-phone-area-code ::ng-deep .rd-form-item-select .ant-select-selection-search-input{color:inherit;display:block;margin-top:-6px;padding:0 5px}:host .rd-phone-number{flex:1;min-width:0}:host .rd-phone-error{display:flex;align-items:center;gap:4px;margin-top:4px;font-size:12px;line-height:16px;color:var(--rd-copy-danger)}\n"] }]
|
|
5685
5686
|
}], ctorParameters: function () { return []; }, propDecorators: { form: [{
|
|
5686
5687
|
type: Input
|
|
5687
5688
|
}], areaCodeControlName: [{
|
|
@@ -5696,7 +5697,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5696
5697
|
type: Input
|
|
5697
5698
|
}], excludeAreaCodes: [{
|
|
5698
5699
|
type: Input
|
|
5699
|
-
}],
|
|
5700
|
+
}], areaCodeOptions: [{
|
|
5700
5701
|
type: Input
|
|
5701
5702
|
}], hostThemeLight: [{
|
|
5702
5703
|
type: HostBinding,
|