rd-outer-component 0.0.21 → 0.0.22
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-filter/custom-filter-select/custom-filter-select.component.mjs +9 -3
- package/esm2020/lib/modules/custom-filter/custom-filter.component.mjs +10 -4
- package/esm2020/lib/modules/custom-filter/custom-filter.types.mjs +1 -1
- package/esm2020/lib/modules/status-field/status-field.component.mjs +52 -10
- package/fesm2015/rd-outer-component.mjs +68 -55
- package/fesm2015/rd-outer-component.mjs.map +1 -1
- package/fesm2020/rd-outer-component.mjs +68 -56
- package/fesm2020/rd-outer-component.mjs.map +1 -1
- package/lib/modules/custom-filter/custom-filter-select/custom-filter-select.component.d.ts +4 -2
- package/lib/modules/custom-filter/custom-filter.component.d.ts +4 -2
- package/lib/modules/custom-filter/custom-filter.types.d.ts +14 -0
- package/lib/modules/status-field/status-field.component.d.ts +9 -23
- package/package.json +1 -1
- package/esm2020/lib/constants/common.constant.mjs +0 -21
- package/esm2020/lib/types/common.enum.mjs +0 -24
- package/lib/constants/common.constant.d.ts +0 -19
- package/lib/types/common.enum.d.ts +0 -19
package/esm2020/lib/modules/custom-filter/custom-filter-select/custom-filter-select.component.mjs
CHANGED
|
@@ -7,6 +7,8 @@ import * as i4 from "../../status-field/status-field.component";
|
|
|
7
7
|
export class RdFilterSelectComponent {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.handleChangeValue = new EventEmitter();
|
|
10
|
+
this.statusDisplayConfigs = [];
|
|
11
|
+
this.statusGroupConfigs = {};
|
|
10
12
|
this.selectValue = null;
|
|
11
13
|
}
|
|
12
14
|
get mode() {
|
|
@@ -46,13 +48,17 @@ export class RdFilterSelectComponent {
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
RdFilterSelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RdFilterSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
-
RdFilterSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RdFilterSelectComponent, selector: "app-rd-filter-select", inputs: { item: "item" }, outputs: { handleChangeValue: "handleChangeValue" }, usesOnChanges: true, ngImport: i0, template: "<nz-select\n class=\"custom-filter-select\"\n [ngStyle]=\"{ 'min-width': item.minWidth ? item.minWidth : '132px' }\"\n [nzPlaceHolder]=\"item.title\"\n [nzShowArrow]=\"true\"\n [nzMode]=\"mode\"\n [nzAllowClear]=\"false\"\n [nzDropdownClassName]=\"\n mode === 'multiple'\n ? 'custom-multiple-filter-select-dropdown'\n : 'custom-filter-select-dropdown'\n \"\n [(ngModel)]=\"selectValue\"\n [nzSuffixIcon]=\"customIcon\"\n [nzRemoveIcon]=\"removeIcon\"\n [nzOptionOverflowSize]=\"5\"\n [nzOptionHeightPx]=\"40\"\n [nzDropdownMatchSelectWidth]=\"false\"\n (ngModelChange)=\"modelChange($event)\"\n [nzCustomTemplate]=\"customTpl\"\n [nzMaxTagCount]=\"3\"\n>\n <nz-option\n *ngFor=\"let option of item.options\"\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n nzCustomContent\n >\n <app-rd-status-field\n *ngIf=\"item.isStatusField; else defaultTpl\"\n [status]=\"option.value\"\n ></app-rd-status-field>\n <ng-template #defaultTpl> {{ option.label }}</ng-template>\n </nz-option>\n</nz-select>\n\n<ng-template #customIcon>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.60136 4.90777C2.83639 4.68743 3.20555 4.69934 3.42589 4.93437L8.00033 9.81377L12.5748 4.93437C12.7951 4.69934 13.1643 4.68743 13.3993 4.90777C13.6343 5.12812 13.6462 5.49727 13.4259 5.7323L8.42589 11.0656C8.31561 11.1833 8.16157 11.25 8.00033 11.25C7.83909 11.25 7.68504 11.1833 7.57476 11.0656L2.57476 5.7323C2.35442 5.49727 2.36633 5.12811 2.60136 4.90777Z\"\n fill=\"#030712\"\n />\n </svg>\n</ng-template>\n\n<ng-template #removeIcon>\n <!-- <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.39645 2.39645C2.59171 2.20118 2.90829 2.20118 3.10355 2.39645L6 5.29289L8.89645 2.39645C9.09171 2.20118 9.40829 2.20118 9.60355 2.39645C9.79882 2.59171 9.79882 2.90829 9.60355 3.10355L6.70711 6L9.60355 8.89645C9.79882 9.09171 9.79882 9.40829 9.60355 9.60355C9.40829 9.79882 9.09171 9.79882 8.89645 9.60355L6 6.70711L3.10355 9.60355C2.90829 9.79882 2.59171 9.79882 2.39645 9.60355C2.20118 9.40829 2.20118 9.09171 2.39645 8.89645L5.29289 6L2.39645 3.10355C2.20118 2.90829 2.20118 2.59171 2.39645 2.39645Z\"\n fill=\"#030712\"\n />\n </svg> -->\n</ng-template>\n\n<ng-template #customTpl let-selected>\n <!-- <app-status-field\n *ngIf=\"item.isStatusField\"\n [status]=\"selected.nzValue\"\n ></app-status-field> -->\n <ng-container>\n {{ selected.nzLabel }}\n </ng-container>\n</ng-template>\n", styles: ["::ng-deep .custom-filter-select{min-width:113px;min-height:32px}::ng-deep .custom-filter-select.ant-select .ant-select-selection-item{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item{border-radius:4px;background:#f3f4f6;font-size:14px;font-weight:500;color:#030712;display:flex;align-items:center;gap:4px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item .ant-select-selection-item-remove{line-height:1}::ng-deep .custom-filter-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px}::ng-deep .custom-filter-select.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px;border:1px solid #367af6;background:#fff;box-shadow:0 0 0 2px #367af61a}::ng-deep .custom-filter-select .ant-select-selection-placeholder{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select .ant-select-selection-item-content{color:#030712;font-weight:500}::ng-deep .custom-filter-select .ant-select-arrow{transition:ease-in-out .2s all;cursor:pointer;pointer-events:initial}::ng-deep .custom-filter-select:hover:has(.ant-select-clear) .ant-select-arrow{opacity:0}::ng-deep .custom-filter-select.ant-select-focused .ant-select-arrow,::ng-deep .custom-filter-select .ant-select-selector:focus-within .ant-select-arrow{transform:rotate(-180deg);transition:transform .2s ease}::ng-deep .custom-filter-select-dropdown .ant-select-dropdown,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-dropdown{border-radius:4px;background:#fff;width:-moz-fit-content;width:fit-content;min-width:113px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option{background-color:transparent;padding:0 6px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;padding:0 6px;display:flex;align-items:center;color:#030712;font-size:14px;min-height:40px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content{background:rgba(54,122,246,.1)}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;font-weight:500;color:#030712;font-size:14px;padding:0 6px 0 32px;position:relative}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content:before{content:\"\";position:absolute;top:50%;left:6px;width:16px;height:16px;transform:translateY(-50%);border-radius:4px;border:1px solid #9ca3af}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-selected .ant-select-item-option-content:before{background-image:url(/assets/img/icon/checkbox.svg);background-size:contain;background-position:center;background-repeat:no-repeat;border:none}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-state{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i2.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.StatusFieldComponent, selector: "app-rd-status-field", inputs: ["status", "text", "size"] }] });
|
|
51
|
+
RdFilterSelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RdFilterSelectComponent, selector: "app-rd-filter-select", inputs: { item: "item", statusDisplayConfigs: "statusDisplayConfigs", statusGroupConfigs: "statusGroupConfigs" }, outputs: { handleChangeValue: "handleChangeValue" }, usesOnChanges: true, ngImport: i0, template: "<nz-select\n class=\"custom-filter-select\"\n [ngStyle]=\"{ 'min-width': item.minWidth ? item.minWidth : '132px' }\"\n [nzPlaceHolder]=\"item.title\"\n [nzShowArrow]=\"true\"\n [nzMode]=\"mode\"\n [nzAllowClear]=\"false\"\n [nzDropdownClassName]=\"\n mode === 'multiple'\n ? 'custom-multiple-filter-select-dropdown'\n : 'custom-filter-select-dropdown'\n \"\n [(ngModel)]=\"selectValue\"\n [nzSuffixIcon]=\"customIcon\"\n [nzRemoveIcon]=\"removeIcon\"\n [nzOptionOverflowSize]=\"5\"\n [nzOptionHeightPx]=\"40\"\n [nzDropdownMatchSelectWidth]=\"false\"\n (ngModelChange)=\"modelChange($event)\"\n [nzCustomTemplate]=\"customTpl\"\n [nzMaxTagCount]=\"3\"\n>\n <nz-option\n *ngFor=\"let option of item.options\"\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n nzCustomContent\n >\n <app-rd-status-field\n *ngIf=\"item.isStatusField; else defaultTpl\"\n [status]=\"option.value\"\n [statusGroupConfigs]=\"statusGroupConfigs\"\n [statusDisplayConfigs]=\"statusDisplayConfigs\"\n ></app-rd-status-field>\n <ng-template #defaultTpl> {{ option.label }}</ng-template>\n </nz-option>\n</nz-select>\n\n<ng-template #customIcon>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.60136 4.90777C2.83639 4.68743 3.20555 4.69934 3.42589 4.93437L8.00033 9.81377L12.5748 4.93437C12.7951 4.69934 13.1643 4.68743 13.3993 4.90777C13.6343 5.12812 13.6462 5.49727 13.4259 5.7323L8.42589 11.0656C8.31561 11.1833 8.16157 11.25 8.00033 11.25C7.83909 11.25 7.68504 11.1833 7.57476 11.0656L2.57476 5.7323C2.35442 5.49727 2.36633 5.12811 2.60136 4.90777Z\"\n fill=\"#030712\"\n />\n </svg>\n</ng-template>\n\n<ng-template #removeIcon>\n <!-- <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.39645 2.39645C2.59171 2.20118 2.90829 2.20118 3.10355 2.39645L6 5.29289L8.89645 2.39645C9.09171 2.20118 9.40829 2.20118 9.60355 2.39645C9.79882 2.59171 9.79882 2.90829 9.60355 3.10355L6.70711 6L9.60355 8.89645C9.79882 9.09171 9.79882 9.40829 9.60355 9.60355C9.40829 9.79882 9.09171 9.79882 8.89645 9.60355L6 6.70711L3.10355 9.60355C2.90829 9.79882 2.59171 9.79882 2.39645 9.60355C2.20118 9.40829 2.20118 9.09171 2.39645 8.89645L5.29289 6L2.39645 3.10355C2.20118 2.90829 2.20118 2.59171 2.39645 2.39645Z\"\n fill=\"#030712\"\n />\n </svg> -->\n</ng-template>\n\n<ng-template #customTpl let-selected>\n <!-- <app-status-field\n *ngIf=\"item.isStatusField\"\n [status]=\"selected.nzValue\"\n ></app-status-field> -->\n <ng-container>\n {{ selected.nzLabel }}\n </ng-container>\n</ng-template>\n", styles: ["::ng-deep .custom-filter-select{min-width:113px;min-height:32px}::ng-deep .custom-filter-select.ant-select .ant-select-selection-item{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item{border-radius:4px;background:#f3f4f6;font-size:14px;font-weight:500;color:#030712;display:flex;align-items:center;gap:4px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item .ant-select-selection-item-remove{line-height:1}::ng-deep .custom-filter-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px}::ng-deep .custom-filter-select.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px;border:1px solid #367af6;background:#fff;box-shadow:0 0 0 2px #367af61a}::ng-deep .custom-filter-select .ant-select-selection-placeholder{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select .ant-select-selection-item-content{color:#030712;font-weight:500}::ng-deep .custom-filter-select .ant-select-arrow{transition:ease-in-out .2s all;cursor:pointer;pointer-events:initial}::ng-deep .custom-filter-select:hover:has(.ant-select-clear) .ant-select-arrow{opacity:0}::ng-deep .custom-filter-select.ant-select-focused .ant-select-arrow,::ng-deep .custom-filter-select .ant-select-selector:focus-within .ant-select-arrow{transform:rotate(-180deg);transition:transform .2s ease}::ng-deep .custom-filter-select-dropdown .ant-select-dropdown,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-dropdown{border-radius:4px;background:#fff;width:-moz-fit-content;width:fit-content;min-width:113px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option{background-color:transparent;padding:0 6px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;padding:0 6px;display:flex;align-items:center;color:#030712;font-size:14px;min-height:40px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content{background:rgba(54,122,246,.1)}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;font-weight:500;color:#030712;font-size:14px;padding:0 6px 0 32px;position:relative}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content:before{content:\"\";position:absolute;top:50%;left:6px;width:16px;height:16px;transform:translateY(-50%);border-radius:4px;border:1px solid #9ca3af}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-selected .ant-select-item-option-content:before{background-image:url(/assets/img/icon/checkbox.svg);background-size:contain;background-position:center;background-repeat:no-repeat;border:none}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-state{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2.NzOptionComponent, selector: "nz-option", inputs: ["nzLabel", "nzValue", "nzDisabled", "nzHide", "nzCustomContent"], exportAs: ["nzOption"] }, { kind: "component", type: i2.NzSelectComponent, selector: "nz-select", inputs: ["nzId", "nzSize", "nzStatus", "nzOptionHeightPx", "nzOptionOverflowSize", "nzDropdownClassName", "nzDropdownMatchSelectWidth", "nzDropdownStyle", "nzNotFoundContent", "nzPlaceHolder", "nzPlacement", "nzMaxTagCount", "nzDropdownRender", "nzCustomTemplate", "nzSuffixIcon", "nzClearIcon", "nzRemoveIcon", "nzMenuItemSelectedIcon", "nzTokenSeparators", "nzMaxTagPlaceholder", "nzMaxMultipleCount", "nzMode", "nzFilterOption", "compareWith", "nzAllowClear", "nzBorderless", "nzShowSearch", "nzLoading", "nzAutoFocus", "nzAutoClearSearchValue", "nzServerSearch", "nzDisabled", "nzOpen", "nzSelectOnTab", "nzBackdrop", "nzOptions", "nzShowArrow"], outputs: ["nzOnSearch", "nzScrollToBottom", "nzOpenChange", "nzBlur", "nzFocus"], exportAs: ["nzSelect"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.StatusFieldComponent, selector: "app-rd-status-field", inputs: ["status", "text", "size", "statusDisplayConfigs", "statusGroupConfigs"] }] });
|
|
50
52
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RdFilterSelectComponent, decorators: [{
|
|
51
53
|
type: Component,
|
|
52
|
-
args: [{ selector: 'app-rd-filter-select', template: "<nz-select\n class=\"custom-filter-select\"\n [ngStyle]=\"{ 'min-width': item.minWidth ? item.minWidth : '132px' }\"\n [nzPlaceHolder]=\"item.title\"\n [nzShowArrow]=\"true\"\n [nzMode]=\"mode\"\n [nzAllowClear]=\"false\"\n [nzDropdownClassName]=\"\n mode === 'multiple'\n ? 'custom-multiple-filter-select-dropdown'\n : 'custom-filter-select-dropdown'\n \"\n [(ngModel)]=\"selectValue\"\n [nzSuffixIcon]=\"customIcon\"\n [nzRemoveIcon]=\"removeIcon\"\n [nzOptionOverflowSize]=\"5\"\n [nzOptionHeightPx]=\"40\"\n [nzDropdownMatchSelectWidth]=\"false\"\n (ngModelChange)=\"modelChange($event)\"\n [nzCustomTemplate]=\"customTpl\"\n [nzMaxTagCount]=\"3\"\n>\n <nz-option\n *ngFor=\"let option of item.options\"\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n nzCustomContent\n >\n <app-rd-status-field\n *ngIf=\"item.isStatusField; else defaultTpl\"\n [status]=\"option.value\"\n ></app-rd-status-field>\n <ng-template #defaultTpl> {{ option.label }}</ng-template>\n </nz-option>\n</nz-select>\n\n<ng-template #customIcon>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.60136 4.90777C2.83639 4.68743 3.20555 4.69934 3.42589 4.93437L8.00033 9.81377L12.5748 4.93437C12.7951 4.69934 13.1643 4.68743 13.3993 4.90777C13.6343 5.12812 13.6462 5.49727 13.4259 5.7323L8.42589 11.0656C8.31561 11.1833 8.16157 11.25 8.00033 11.25C7.83909 11.25 7.68504 11.1833 7.57476 11.0656L2.57476 5.7323C2.35442 5.49727 2.36633 5.12811 2.60136 4.90777Z\"\n fill=\"#030712\"\n />\n </svg>\n</ng-template>\n\n<ng-template #removeIcon>\n <!-- <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.39645 2.39645C2.59171 2.20118 2.90829 2.20118 3.10355 2.39645L6 5.29289L8.89645 2.39645C9.09171 2.20118 9.40829 2.20118 9.60355 2.39645C9.79882 2.59171 9.79882 2.90829 9.60355 3.10355L6.70711 6L9.60355 8.89645C9.79882 9.09171 9.79882 9.40829 9.60355 9.60355C9.40829 9.79882 9.09171 9.79882 8.89645 9.60355L6 6.70711L3.10355 9.60355C2.90829 9.79882 2.59171 9.79882 2.39645 9.60355C2.20118 9.40829 2.20118 9.09171 2.39645 8.89645L5.29289 6L2.39645 3.10355C2.20118 2.90829 2.20118 2.59171 2.39645 2.39645Z\"\n fill=\"#030712\"\n />\n </svg> -->\n</ng-template>\n\n<ng-template #customTpl let-selected>\n <!-- <app-status-field\n *ngIf=\"item.isStatusField\"\n [status]=\"selected.nzValue\"\n ></app-status-field> -->\n <ng-container>\n {{ selected.nzLabel }}\n </ng-container>\n</ng-template>\n", styles: ["::ng-deep .custom-filter-select{min-width:113px;min-height:32px}::ng-deep .custom-filter-select.ant-select .ant-select-selection-item{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item{border-radius:4px;background:#f3f4f6;font-size:14px;font-weight:500;color:#030712;display:flex;align-items:center;gap:4px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item .ant-select-selection-item-remove{line-height:1}::ng-deep .custom-filter-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px}::ng-deep .custom-filter-select.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px;border:1px solid #367af6;background:#fff;box-shadow:0 0 0 2px #367af61a}::ng-deep .custom-filter-select .ant-select-selection-placeholder{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select .ant-select-selection-item-content{color:#030712;font-weight:500}::ng-deep .custom-filter-select .ant-select-arrow{transition:ease-in-out .2s all;cursor:pointer;pointer-events:initial}::ng-deep .custom-filter-select:hover:has(.ant-select-clear) .ant-select-arrow{opacity:0}::ng-deep .custom-filter-select.ant-select-focused .ant-select-arrow,::ng-deep .custom-filter-select .ant-select-selector:focus-within .ant-select-arrow{transform:rotate(-180deg);transition:transform .2s ease}::ng-deep .custom-filter-select-dropdown .ant-select-dropdown,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-dropdown{border-radius:4px;background:#fff;width:-moz-fit-content;width:fit-content;min-width:113px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option{background-color:transparent;padding:0 6px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;padding:0 6px;display:flex;align-items:center;color:#030712;font-size:14px;min-height:40px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content{background:rgba(54,122,246,.1)}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;font-weight:500;color:#030712;font-size:14px;padding:0 6px 0 32px;position:relative}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content:before{content:\"\";position:absolute;top:50%;left:6px;width:16px;height:16px;transform:translateY(-50%);border-radius:4px;border:1px solid #9ca3af}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-selected .ant-select-item-option-content:before{background-image:url(/assets/img/icon/checkbox.svg);background-size:contain;background-position:center;background-repeat:no-repeat;border:none}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-state{display:none}\n"] }]
|
|
54
|
+
args: [{ selector: 'app-rd-filter-select', template: "<nz-select\n class=\"custom-filter-select\"\n [ngStyle]=\"{ 'min-width': item.minWidth ? item.minWidth : '132px' }\"\n [nzPlaceHolder]=\"item.title\"\n [nzShowArrow]=\"true\"\n [nzMode]=\"mode\"\n [nzAllowClear]=\"false\"\n [nzDropdownClassName]=\"\n mode === 'multiple'\n ? 'custom-multiple-filter-select-dropdown'\n : 'custom-filter-select-dropdown'\n \"\n [(ngModel)]=\"selectValue\"\n [nzSuffixIcon]=\"customIcon\"\n [nzRemoveIcon]=\"removeIcon\"\n [nzOptionOverflowSize]=\"5\"\n [nzOptionHeightPx]=\"40\"\n [nzDropdownMatchSelectWidth]=\"false\"\n (ngModelChange)=\"modelChange($event)\"\n [nzCustomTemplate]=\"customTpl\"\n [nzMaxTagCount]=\"3\"\n>\n <nz-option\n *ngFor=\"let option of item.options\"\n [nzValue]=\"option.value\"\n [nzLabel]=\"option.label\"\n nzCustomContent\n >\n <app-rd-status-field\n *ngIf=\"item.isStatusField; else defaultTpl\"\n [status]=\"option.value\"\n [statusGroupConfigs]=\"statusGroupConfigs\"\n [statusDisplayConfigs]=\"statusDisplayConfigs\"\n ></app-rd-status-field>\n <ng-template #defaultTpl> {{ option.label }}</ng-template>\n </nz-option>\n</nz-select>\n\n<ng-template #customIcon>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.60136 4.90777C2.83639 4.68743 3.20555 4.69934 3.42589 4.93437L8.00033 9.81377L12.5748 4.93437C12.7951 4.69934 13.1643 4.68743 13.3993 4.90777C13.6343 5.12812 13.6462 5.49727 13.4259 5.7323L8.42589 11.0656C8.31561 11.1833 8.16157 11.25 8.00033 11.25C7.83909 11.25 7.68504 11.1833 7.57476 11.0656L2.57476 5.7323C2.35442 5.49727 2.36633 5.12811 2.60136 4.90777Z\"\n fill=\"#030712\"\n />\n </svg>\n</ng-template>\n\n<ng-template #removeIcon>\n <!-- <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M2.39645 2.39645C2.59171 2.20118 2.90829 2.20118 3.10355 2.39645L6 5.29289L8.89645 2.39645C9.09171 2.20118 9.40829 2.20118 9.60355 2.39645C9.79882 2.59171 9.79882 2.90829 9.60355 3.10355L6.70711 6L9.60355 8.89645C9.79882 9.09171 9.79882 9.40829 9.60355 9.60355C9.40829 9.79882 9.09171 9.79882 8.89645 9.60355L6 6.70711L3.10355 9.60355C2.90829 9.79882 2.59171 9.79882 2.39645 9.60355C2.20118 9.40829 2.20118 9.09171 2.39645 8.89645L5.29289 6L2.39645 3.10355C2.20118 2.90829 2.20118 2.59171 2.39645 2.39645Z\"\n fill=\"#030712\"\n />\n </svg> -->\n</ng-template>\n\n<ng-template #customTpl let-selected>\n <!-- <app-status-field\n *ngIf=\"item.isStatusField\"\n [status]=\"selected.nzValue\"\n ></app-status-field> -->\n <ng-container>\n {{ selected.nzLabel }}\n </ng-container>\n</ng-template>\n", styles: ["::ng-deep .custom-filter-select{min-width:113px;min-height:32px}::ng-deep .custom-filter-select.ant-select .ant-select-selection-item{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item{border-radius:4px;background:#f3f4f6;font-size:14px;font-weight:500;color:#030712;display:flex;align-items:center;gap:4px}::ng-deep .custom-filter-select.ant-select-multiple .ant-select-selection-item .ant-select-selection-item-remove{line-height:1}::ng-deep .custom-filter-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px}::ng-deep .custom-filter-select.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-radius:4px;border:1px solid #367af6;background:#fff;box-shadow:0 0 0 2px #367af61a}::ng-deep .custom-filter-select .ant-select-selection-placeholder{color:#030712;font-weight:500;font-size:14px}::ng-deep .custom-filter-select .ant-select-selection-item-content{color:#030712;font-weight:500}::ng-deep .custom-filter-select .ant-select-arrow{transition:ease-in-out .2s all;cursor:pointer;pointer-events:initial}::ng-deep .custom-filter-select:hover:has(.ant-select-clear) .ant-select-arrow{opacity:0}::ng-deep .custom-filter-select.ant-select-focused .ant-select-arrow,::ng-deep .custom-filter-select .ant-select-selector:focus-within .ant-select-arrow{transform:rotate(-180deg);transition:transform .2s ease}::ng-deep .custom-filter-select-dropdown .ant-select-dropdown,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-dropdown{border-radius:4px;background:#fff;width:-moz-fit-content;width:fit-content;min-width:113px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option{background-color:transparent;padding:0 6px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;padding:0 6px;display:flex;align-items:center;color:#030712;font-size:14px;min-height:40px}::ng-deep .custom-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content,::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-active .ant-select-item-option-content{background:rgba(54,122,246,.1)}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content{border-radius:4px;font-weight:500;color:#030712;font-size:14px;padding:0 6px 0 32px;position:relative}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-content:before{content:\"\";position:absolute;top:50%;left:6px;width:16px;height:16px;transform:translateY(-50%);border-radius:4px;border:1px solid #9ca3af}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-selected .ant-select-item-option-content:before{background-image:url(/assets/img/icon/checkbox.svg);background-size:contain;background-position:center;background-repeat:no-repeat;border:none}::ng-deep .custom-multiple-filter-select-dropdown .ant-select-item-option-state{display:none}\n"] }]
|
|
53
55
|
}], propDecorators: { item: [{
|
|
54
56
|
type: Input
|
|
55
57
|
}], handleChangeValue: [{
|
|
56
58
|
type: Output
|
|
59
|
+
}], statusDisplayConfigs: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], statusGroupConfigs: [{
|
|
62
|
+
type: Input
|
|
57
63
|
}] } });
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLWZpbHRlci1zZWxlY3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2hhcmVkLWxpYi9zcmMvbGliL21vZHVsZXMvY3VzdG9tLWZpbHRlci9jdXN0b20tZmlsdGVyLXNlbGVjdC9jdXN0b20tZmlsdGVyLXNlbGVjdC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zaGFyZWQtbGliL3NyYy9saWIvbW9kdWxlcy9jdXN0b20tZmlsdGVyL2N1c3RvbS1maWx0ZXItc2VsZWN0L2N1c3RvbS1maWx0ZXItc2VsZWN0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsWUFBWSxFQUNaLEtBQUssRUFFTCxNQUFNLEdBRVAsTUFBTSxlQUFlLENBQUM7Ozs7OztBQVl2QixNQUFNLE9BQU8sdUJBQXVCO0lBTHBDO1FBT1ksc0JBQWlCLEdBQUcsSUFBSSxZQUFZLEVBQUUsQ0FBQztRQUN4Qyx5QkFBb0IsR0FBMEIsRUFBRSxDQUFDO1F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2VsZWN0ZWQubnpWYWx1ZVwiXG4gID48L2FwcC1zdGF0dXMtZmllbGQ+IC0tPlxuICA8bmctY29udGFpbmVyPlxuICAgIHt7IHNlbGVjdGVkLm56TGFiZWwgfX1cbiAgPC9uZy1jb250YWluZXI+XG48L25nLXRlbXBsYXRlPlxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component, EventEmitter, Input, Output, } from '@angular/core';
|
|
2
|
-
import { FilterTypeEnum } from './custom-filter.types';
|
|
2
|
+
import { FilterTypeEnum, } from './custom-filter.types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "@angular/common";
|
|
5
5
|
import * as i2 from "ng-zorro-antd/button";
|
|
@@ -16,6 +16,8 @@ export class RdFilterComponent {
|
|
|
16
16
|
this.filterArr = [];
|
|
17
17
|
this.defSearchChange = new EventEmitter();
|
|
18
18
|
this.clearFilter = new EventEmitter();
|
|
19
|
+
this.statusDisplayConfigs = [];
|
|
20
|
+
this.statusGroupConfigs = {};
|
|
19
21
|
this.filterTypeEnum = FilterTypeEnum;
|
|
20
22
|
}
|
|
21
23
|
handleChangeValue(value) {
|
|
@@ -26,15 +28,19 @@ export class RdFilterComponent {
|
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
RdFilterComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RdFilterComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
-
RdFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RdFilterComponent, selector: "app-rd-filter", inputs: { filterArr: "filterArr" }, outputs: { defSearchChange: "defSearchChange", clearFilter: "clearFilter" }, ngImport: i0, template: "<div class=\"custom-filter-wrap\" *ngIf=\"filterArr?.length\">\n <ng-container *ngFor=\"let item of filterArr\">\n <ng-container [ngSwitch]=\"item.formType\">\n <app-rd-filter-date\n *ngSwitchCase=\"filterTypeEnum.date\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n >\n </app-rd-filter-date>\n <app-rd-filter-select\n *ngSwitchCase=\"filterTypeEnum.select\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-select>\n <app-rd-filter-input\n *ngSwitchCase=\"filterTypeEnum.input\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-input>\n </ng-container>\n </ng-container>\n <button\n [disabled]=\"!isClearAble\"\n (click)=\"clear()\"\n class=\"custom-filter-clear\"\n nz-button\n nzType=\"link\"\n >\n Clear filter\n </button>\n</div>\n", styles: [".custom-filter-wrap{display:flex;align-items:center;gap:8px;padding-top:12px}.custom-filter-clear{font-size:13px;font-weight:600;color:#367af6;padding:0}.custom-filter-clear:disabled{color:#9ca3af}\n", ".form-item{position:relative;border-radius:4px;padding:2px 6px;border:1px solid #e5e7eb;background-color:#fff;width:100%;margin-top:16px;height:64px}.form-item .form-item-select-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;pointer-events:none}.form-item-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:#6b7280;transition:all .3s ease;pointer-events:none;z-index:1;font-size:14px;font-weight:500}.form-item-input{color:#030712;font-size:14px;width:100%;font-weight:500;padding:18px 16px}.form-item-input:focus,.form-item-input:not(:placeholder-shown){top:10px}.form-item .form-item-input:focus~.form-item-label,.form-item .form-item-input:not(:placeholder-shown)~.form-item-label{top:16px;font-size:12px}.form-item-select{width:100%}.form-item-select ::ng-deep .ant-select-selection-item{color:#030712;font-size:14px;font-weight:500}.form-item.selected .form-item-label{top:16px;font-size:12px}.form-item.selected .form-item-select{top:10px}.form-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-item.disabled .form-item-label,.form-item.disabled .form-item-input{color:#9ca3af}.form-item.disabled ::ng-deep .ant-select-selection-item{color:#9ca3af}.form-item.error{border-color:#e51c36}.form-item-check{position:relative;background-color:#fff;width:100%;margin-top:16px}.form-item-error{color:#d2152e;font-size:12px;font-weight:500;display:flex;align-items:center;gap:4px;margin-top:4px}.form-item-error img{width:16px}.form-number-item{position:relative;border-radius:4px;padding:12px 16px;background-color:#fff;border:1px solid #e5e7eb;width:100%;margin-top:16px}.form-number-item .item-label{color:#6b7280;font-size:12px;font-weight:600}.form-number-item .item-content{display:flex;align-items:center;font-size:32px;font-weight:600;line-height:48px;color:#9ca3af}.form-number-item .item-content-value{flex:1;font-size:32px;font-weight:600;line-height:48px;color:#030712;border:none;padding:4px 0}.form-number-item .item-content-value:focus,.form-number-item .item-content-value:active,.form-number-item .item-content-value:hover{outline:none;box-shadow:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-handler-wrap{display:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-input{font-size:32px;font-weight:600;line-height:48px}.form-number-item .item-content-value ::ng-deep .ant-input-number-input::placeholder{color:#9ca3af}.form-number-item .item-content-symbol{flex-shrink:0}.form-number-item ::ng-deep .item-warning{font-weight:500;font-size:12px;color:#6b7280;margin-top:4px;padding:0 12px}.form-number-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-number-item.disabled .item-label,.form-number-item.disabled .item-content-value{color:#9ca3af}.form-number-item.error{border-color:#e51c36}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "component", type: i4.RdFilterDateComponent, selector: "app-rd-filter-date", inputs: ["item"], outputs: ["handleChangeValue"] }, { kind: "component", type: i5.RdFilterSelectComponent, selector: "app-rd-filter-select", inputs: ["item"], outputs: ["handleChangeValue"] }, { kind: "component", type: i6.RdFilterInputComponent, selector: "app-rd-filter-input", inputs: ["item"], outputs: ["handleChangeValue"] }] });
|
|
31
|
+
RdFilterComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RdFilterComponent, selector: "app-rd-filter", inputs: { filterArr: "filterArr", statusDisplayConfigs: "statusDisplayConfigs", statusGroupConfigs: "statusGroupConfigs" }, outputs: { defSearchChange: "defSearchChange", clearFilter: "clearFilter" }, ngImport: i0, template: "<div class=\"custom-filter-wrap\" *ngIf=\"filterArr?.length\">\n <ng-container *ngFor=\"let item of filterArr\">\n <ng-container [ngSwitch]=\"item.formType\">\n <app-rd-filter-date\n *ngSwitchCase=\"filterTypeEnum.date\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n >\n </app-rd-filter-date>\n <app-rd-filter-select\n *ngSwitchCase=\"filterTypeEnum.select\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n [statusGroupConfigs]=\"statusGroupConfigs\"\n [statusDisplayConfigs]=\"statusDisplayConfigs\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-select>\n <app-rd-filter-input\n *ngSwitchCase=\"filterTypeEnum.input\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-input>\n </ng-container>\n </ng-container>\n <button\n [disabled]=\"!isClearAble\"\n (click)=\"clear()\"\n class=\"custom-filter-clear\"\n nz-button\n nzType=\"link\"\n >\n Clear filter\n </button>\n</div>\n", styles: [".custom-filter-wrap{display:flex;align-items:center;gap:8px;padding-top:12px}.custom-filter-clear{font-size:13px;font-weight:600;color:#367af6;padding:0}.custom-filter-clear:disabled{color:#9ca3af}\n", ".form-item{position:relative;border-radius:4px;padding:2px 6px;border:1px solid #e5e7eb;background-color:#fff;width:100%;margin-top:16px;height:64px}.form-item .form-item-select-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;pointer-events:none}.form-item-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:#6b7280;transition:all .3s ease;pointer-events:none;z-index:1;font-size:14px;font-weight:500}.form-item-input{color:#030712;font-size:14px;width:100%;font-weight:500;padding:18px 16px}.form-item-input:focus,.form-item-input:not(:placeholder-shown){top:10px}.form-item .form-item-input:focus~.form-item-label,.form-item .form-item-input:not(:placeholder-shown)~.form-item-label{top:16px;font-size:12px}.form-item-select{width:100%}.form-item-select ::ng-deep .ant-select-selection-item{color:#030712;font-size:14px;font-weight:500}.form-item.selected .form-item-label{top:16px;font-size:12px}.form-item.selected .form-item-select{top:10px}.form-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-item.disabled .form-item-label,.form-item.disabled .form-item-input{color:#9ca3af}.form-item.disabled ::ng-deep .ant-select-selection-item{color:#9ca3af}.form-item.error{border-color:#e51c36}.form-item-check{position:relative;background-color:#fff;width:100%;margin-top:16px}.form-item-error{color:#d2152e;font-size:12px;font-weight:500;display:flex;align-items:center;gap:4px;margin-top:4px}.form-item-error img{width:16px}.form-number-item{position:relative;border-radius:4px;padding:12px 16px;background-color:#fff;border:1px solid #e5e7eb;width:100%;margin-top:16px}.form-number-item .item-label{color:#6b7280;font-size:12px;font-weight:600}.form-number-item .item-content{display:flex;align-items:center;font-size:32px;font-weight:600;line-height:48px;color:#9ca3af}.form-number-item .item-content-value{flex:1;font-size:32px;font-weight:600;line-height:48px;color:#030712;border:none;padding:4px 0}.form-number-item .item-content-value:focus,.form-number-item .item-content-value:active,.form-number-item .item-content-value:hover{outline:none;box-shadow:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-handler-wrap{display:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-input{font-size:32px;font-weight:600;line-height:48px}.form-number-item .item-content-value ::ng-deep .ant-input-number-input::placeholder{color:#9ca3af}.form-number-item .item-content-symbol{flex-shrink:0}.form-number-item ::ng-deep .item-warning{font-weight:500;font-size:12px;color:#6b7280;margin-top:4px;padding:0 12px}.form-number-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-number-item.disabled .item-label,.form-number-item.disabled .item-content-value{color:#9ca3af}.form-number-item.error{border-color:#e51c36}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2.NzButtonComponent, selector: "button[nz-button], a[nz-button]", inputs: ["nzBlock", "nzGhost", "nzSearch", "nzLoading", "nzDanger", "disabled", "tabIndex", "nzType", "nzShape", "nzSize"], exportAs: ["nzButton"] }, { kind: "directive", type: i3.ɵNzTransitionPatchDirective, selector: "[nz-button], nz-button-group, [nz-icon], [nz-menu-item], [nz-submenu], nz-select-top-control, nz-select-placeholder, nz-input-group", inputs: ["hidden"] }, { kind: "component", type: i4.RdFilterDateComponent, selector: "app-rd-filter-date", inputs: ["item"], outputs: ["handleChangeValue"] }, { kind: "component", type: i5.RdFilterSelectComponent, selector: "app-rd-filter-select", inputs: ["item", "statusDisplayConfigs", "statusGroupConfigs"], outputs: ["handleChangeValue"] }, { kind: "component", type: i6.RdFilterInputComponent, selector: "app-rd-filter-input", inputs: ["item"], outputs: ["handleChangeValue"] }] });
|
|
30
32
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RdFilterComponent, decorators: [{
|
|
31
33
|
type: Component,
|
|
32
|
-
args: [{ selector: 'app-rd-filter', template: "<div class=\"custom-filter-wrap\" *ngIf=\"filterArr?.length\">\n <ng-container *ngFor=\"let item of filterArr\">\n <ng-container [ngSwitch]=\"item.formType\">\n <app-rd-filter-date\n *ngSwitchCase=\"filterTypeEnum.date\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n >\n </app-rd-filter-date>\n <app-rd-filter-select\n *ngSwitchCase=\"filterTypeEnum.select\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-select>\n <app-rd-filter-input\n *ngSwitchCase=\"filterTypeEnum.input\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-input>\n </ng-container>\n </ng-container>\n <button\n [disabled]=\"!isClearAble\"\n (click)=\"clear()\"\n class=\"custom-filter-clear\"\n nz-button\n nzType=\"link\"\n >\n Clear filter\n </button>\n</div>\n", styles: [".custom-filter-wrap{display:flex;align-items:center;gap:8px;padding-top:12px}.custom-filter-clear{font-size:13px;font-weight:600;color:#367af6;padding:0}.custom-filter-clear:disabled{color:#9ca3af}\n", ".form-item{position:relative;border-radius:4px;padding:2px 6px;border:1px solid #e5e7eb;background-color:#fff;width:100%;margin-top:16px;height:64px}.form-item .form-item-select-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;pointer-events:none}.form-item-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:#6b7280;transition:all .3s ease;pointer-events:none;z-index:1;font-size:14px;font-weight:500}.form-item-input{color:#030712;font-size:14px;width:100%;font-weight:500;padding:18px 16px}.form-item-input:focus,.form-item-input:not(:placeholder-shown){top:10px}.form-item .form-item-input:focus~.form-item-label,.form-item .form-item-input:not(:placeholder-shown)~.form-item-label{top:16px;font-size:12px}.form-item-select{width:100%}.form-item-select ::ng-deep .ant-select-selection-item{color:#030712;font-size:14px;font-weight:500}.form-item.selected .form-item-label{top:16px;font-size:12px}.form-item.selected .form-item-select{top:10px}.form-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-item.disabled .form-item-label,.form-item.disabled .form-item-input{color:#9ca3af}.form-item.disabled ::ng-deep .ant-select-selection-item{color:#9ca3af}.form-item.error{border-color:#e51c36}.form-item-check{position:relative;background-color:#fff;width:100%;margin-top:16px}.form-item-error{color:#d2152e;font-size:12px;font-weight:500;display:flex;align-items:center;gap:4px;margin-top:4px}.form-item-error img{width:16px}.form-number-item{position:relative;border-radius:4px;padding:12px 16px;background-color:#fff;border:1px solid #e5e7eb;width:100%;margin-top:16px}.form-number-item .item-label{color:#6b7280;font-size:12px;font-weight:600}.form-number-item .item-content{display:flex;align-items:center;font-size:32px;font-weight:600;line-height:48px;color:#9ca3af}.form-number-item .item-content-value{flex:1;font-size:32px;font-weight:600;line-height:48px;color:#030712;border:none;padding:4px 0}.form-number-item .item-content-value:focus,.form-number-item .item-content-value:active,.form-number-item .item-content-value:hover{outline:none;box-shadow:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-handler-wrap{display:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-input{font-size:32px;font-weight:600;line-height:48px}.form-number-item .item-content-value ::ng-deep .ant-input-number-input::placeholder{color:#9ca3af}.form-number-item .item-content-symbol{flex-shrink:0}.form-number-item ::ng-deep .item-warning{font-weight:500;font-size:12px;color:#6b7280;margin-top:4px;padding:0 12px}.form-number-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-number-item.disabled .item-label,.form-number-item.disabled .item-content-value{color:#9ca3af}.form-number-item.error{border-color:#e51c36}\n"] }]
|
|
34
|
+
args: [{ selector: 'app-rd-filter', template: "<div class=\"custom-filter-wrap\" *ngIf=\"filterArr?.length\">\n <ng-container *ngFor=\"let item of filterArr\">\n <ng-container [ngSwitch]=\"item.formType\">\n <app-rd-filter-date\n *ngSwitchCase=\"filterTypeEnum.date\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n >\n </app-rd-filter-date>\n <app-rd-filter-select\n *ngSwitchCase=\"filterTypeEnum.select\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n [statusGroupConfigs]=\"statusGroupConfigs\"\n [statusDisplayConfigs]=\"statusDisplayConfigs\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-select>\n <app-rd-filter-input\n *ngSwitchCase=\"filterTypeEnum.input\"\n [item]=\"item\"\n (handleChangeValue)=\"handleChangeValue($event)\"\n ></app-rd-filter-input>\n </ng-container>\n </ng-container>\n <button\n [disabled]=\"!isClearAble\"\n (click)=\"clear()\"\n class=\"custom-filter-clear\"\n nz-button\n nzType=\"link\"\n >\n Clear filter\n </button>\n</div>\n", styles: [".custom-filter-wrap{display:flex;align-items:center;gap:8px;padding-top:12px}.custom-filter-clear{font-size:13px;font-weight:600;color:#367af6;padding:0}.custom-filter-clear:disabled{color:#9ca3af}\n", ".form-item{position:relative;border-radius:4px;padding:2px 6px;border:1px solid #e5e7eb;background-color:#fff;width:100%;margin-top:16px;height:64px}.form-item .form-item-select-icon{position:absolute;right:12px;top:50%;transform:translateY(-50%);width:16px;height:16px;pointer-events:none}.form-item-label{position:absolute;left:16px;top:50%;transform:translateY(-50%);color:#6b7280;transition:all .3s ease;pointer-events:none;z-index:1;font-size:14px;font-weight:500}.form-item-input{color:#030712;font-size:14px;width:100%;font-weight:500;padding:18px 16px}.form-item-input:focus,.form-item-input:not(:placeholder-shown){top:10px}.form-item .form-item-input:focus~.form-item-label,.form-item .form-item-input:not(:placeholder-shown)~.form-item-label{top:16px;font-size:12px}.form-item-select{width:100%}.form-item-select ::ng-deep .ant-select-selection-item{color:#030712;font-size:14px;font-weight:500}.form-item.selected .form-item-label{top:16px;font-size:12px}.form-item.selected .form-item-select{top:10px}.form-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-item.disabled .form-item-label,.form-item.disabled .form-item-input{color:#9ca3af}.form-item.disabled ::ng-deep .ant-select-selection-item{color:#9ca3af}.form-item.error{border-color:#e51c36}.form-item-check{position:relative;background-color:#fff;width:100%;margin-top:16px}.form-item-error{color:#d2152e;font-size:12px;font-weight:500;display:flex;align-items:center;gap:4px;margin-top:4px}.form-item-error img{width:16px}.form-number-item{position:relative;border-radius:4px;padding:12px 16px;background-color:#fff;border:1px solid #e5e7eb;width:100%;margin-top:16px}.form-number-item .item-label{color:#6b7280;font-size:12px;font-weight:600}.form-number-item .item-content{display:flex;align-items:center;font-size:32px;font-weight:600;line-height:48px;color:#9ca3af}.form-number-item .item-content-value{flex:1;font-size:32px;font-weight:600;line-height:48px;color:#030712;border:none;padding:4px 0}.form-number-item .item-content-value:focus,.form-number-item .item-content-value:active,.form-number-item .item-content-value:hover{outline:none;box-shadow:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-handler-wrap{display:none}.form-number-item .item-content-value ::ng-deep .ant-input-number-input{font-size:32px;font-weight:600;line-height:48px}.form-number-item .item-content-value ::ng-deep .ant-input-number-input::placeholder{color:#9ca3af}.form-number-item .item-content-symbol{flex-shrink:0}.form-number-item ::ng-deep .item-warning{font-weight:500;font-size:12px;color:#6b7280;margin-top:4px;padding:0 12px}.form-number-item.disabled{background-color:#f3f4f6;border-color:#d1d5db}.form-number-item.disabled .item-label,.form-number-item.disabled .item-content-value{color:#9ca3af}.form-number-item.error{border-color:#e51c36}\n"] }]
|
|
33
35
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { filterArr: [{
|
|
34
36
|
type: Input
|
|
35
37
|
}], defSearchChange: [{
|
|
36
38
|
type: Output
|
|
37
39
|
}], clearFilter: [{
|
|
38
40
|
type: Output
|
|
41
|
+
}], statusDisplayConfigs: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], statusGroupConfigs: [{
|
|
44
|
+
type: Input
|
|
39
45
|
}] } });
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLWZpbHRlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9zaGFyZWQtbGliL3NyYy9saWIvbW9kdWxlcy9jdXN0b20tZmlsdGVyL2N1c3RvbS1maWx0ZXIuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc2hhcmVkLWxpYi9zcmMvbGliL21vZHVsZXMvY3VzdG9tLWZpbHRlci9jdXN0b20tZmlsdGVyLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxTQUFTLEVBQ1QsWUFBWSxFQUNaLEtBQUssRUFDTCxNQUFNLEdBQ1AsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUNMLGNBQWMsR0FJZixNQUFNLHVCQUF1QixDQUFDOzs7Ozs7OztBQVUvQixNQUFNLE9BQU8saUJBQWlCO0lBUTVCLElBQUksV0FBVztRQUNiLE9BQU8sSUFBSSxDQUFDLFNBQVMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7SUFDL0QsQ0FBQztJQUVELFlBQW9CLEdBQXNCO1FBQXRCLFFBQUcsR0FBSCxHQUFHLENBQW1CO1FBWGpDLGNBQVMsR0FBb0IsRUFBRSxDQUFDO1FBQy9CLG9CQUFlLEdBQUcsSUFBSSxZQUFZLEVBQVUsQ0FBQztRQUM3QyxnQkFBVyxHQUFHLElBQUksWUFBWSxFQUFFLEN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2FwcC1yZC1maWx0ZXItaW5wdXQ+XG4gICAgPC9uZy1jb250YWluZXI+XG4gIDwvbmctY29udGFpbmVyPlxuICA8YnV0dG9uXG4gICAgW2Rpc2FibGVkXT1cIiFpc0NsZWFyQWJsZVwiXG4gICAgKGNsaWNrKT1cImNsZWFyKClcIlxuICAgIGNsYXNzPVwiY3VzdG9tLWZpbHRlci1jbGVhclwiXG4gICAgbnotYnV0dG9uXG4gICAgbnpUeXBlPVwibGlua1wiXG4gID5cbiAgICBDbGVhciBmaWx0ZXJcbiAgPC9idXR0b24+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -4,4 +4,4 @@ export var FilterTypeEnum;
|
|
|
4
4
|
FilterTypeEnum[FilterTypeEnum["select"] = 2] = "select";
|
|
5
5
|
FilterTypeEnum[FilterTypeEnum["date"] = 3] = "date";
|
|
6
6
|
})(FilterTypeEnum || (FilterTypeEnum = {}));
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLWZpbHRlci50eXBlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3NoYXJlZC1saWIvc3JjL2xpYi9tb2R1bGVzL2N1c3RvbS1maWx0ZXIvY3VzdG9tLWZpbHRlci50eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxNQUFNLENBQU4sSUFBWSxjQUlYO0FBSkQsV0FBWSxjQUFjO0lBQ3hCLHFEQUFTLENBQUE7SUFDVCx1REFBVSxDQUFBO0lBQ1YsbURBQVEsQ0FBQTtBQUNWLENBQUMsRUFKVyxjQUFjLEtBQWQsY0FBYyxRQUl6QiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE56U2VsZWN0TW9kZVR5cGUgfSBmcm9tICduZy16b3Jyby1hbnRkL3NlbGVjdCc7XG5cbmV4cG9ydCBlbnVtIEZpb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ZXhwb3J0IGludGVyZmFjZSBJQ3VzdG9tRmlsdGVyIHtcbiAga2V5OiBzdHJpbmc7XG4gIHRpdGxlOiBzdHJpbmc7XG4gIGZvcm1UeXBlOiBGaWx0ZXJUeXBlRW51bTtcbiAgdmFsdWU6IHN0cmluZztcbiAgb3B0aW9ucz86IEFycmF5PHsgbGFiZWw6IHN0cmluZzsgdmFsdWU6IHN0cmluZyB8IG51bWJlcjsgaWNvbj86IHN0cmluZyB9PjtcbiAgc2VsZWN0TW9kZT86IE56U2VsZWN0TW9kZVR5cGU7XG4gIGlzU3RhdHVzRmllbGQ/OiBib29sZWFuO1xuICBtaW5XaWR0aD86IHN0cmluZztcbiAgc3RhdHVzR3JvdXBDb25maWdzPzogU3RhdHVzR3JvdXBDb25maWc7XG4gIHN0YXR1c0Rpc3BsYXlDb25maWdzPzogU3RhdHVzRGlzcGxheUNvbmZpZ1tdO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFN0YXR1c0dyb3VwQ29uZmlnIHtcbiAgW2dyb3VwTmFtZTogc3RyaW5nXToge1xuICAgIGljb246IHN0cmluZztcbiAgICBtYXRjaDogKHN0YXR1czogc3RyaW5nIHwgbnVtYmVyKSA9PiBib29sZWFuO1xuICB9O1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFN0YXR1c0Rpc3BsYXlDb25maWcge1xuICBzdGF0dXM6IHN0cmluZyB8IG51bWJlcjtcbiAgaWNvbjogc3RyaW5nO1xuICB0ZXh0Pzogc3RyaW5nO1xuICBncm91cD86IHN0cmluZztcbn1cbiJdfQ==
|
|
@@ -1,28 +1,70 @@
|
|
|
1
1
|
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { ONOFFStatusEnum } from '../../types/common.enum';
|
|
3
|
-
import { ONOFFStatusEnumTextMap } from '../../constants/common.constant';
|
|
4
2
|
import * as i0 from "@angular/core";
|
|
5
3
|
import * as i1 from "@angular/common";
|
|
6
4
|
export class StatusFieldComponent {
|
|
7
5
|
constructor() {
|
|
8
6
|
this.size = 'default';
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
7
|
+
this.statusDisplayConfigs = [];
|
|
8
|
+
this.statusGroupConfigs = {};
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
getStatusDisplay() {
|
|
11
|
+
// 1. 查找精确匹配的配置
|
|
12
|
+
const exactMatch = this.statusDisplayConfigs?.find((c) => c?.status === this.status);
|
|
13
|
+
if (exactMatch) {
|
|
14
|
+
return {
|
|
15
|
+
icon: exactMatch?.icon,
|
|
16
|
+
text: exactMatch?.text || this.status,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
// 2. 查找分组匹配
|
|
20
|
+
for (const groupName in this.statusGroupConfigs) {
|
|
21
|
+
const group = this.statusGroupConfigs[groupName];
|
|
22
|
+
if (group?.match(this.status)) {
|
|
23
|
+
return {
|
|
24
|
+
icon: group?.icon,
|
|
25
|
+
text: this.status, // 或者可以配置默认文本
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// 3. 默认返回
|
|
30
|
+
return {
|
|
31
|
+
icon: '',
|
|
32
|
+
text: this.status,
|
|
33
|
+
};
|
|
14
34
|
}
|
|
15
35
|
}
|
|
16
36
|
StatusFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StatusFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17
|
-
StatusFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: StatusFieldComponent, selector: "app-rd-status-field", inputs: { status: "status", text: "text", size: "size"
|
|
37
|
+
StatusFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: StatusFieldComponent, selector: "app-rd-status-field", inputs: { status: "status", text: "text", size: "size", statusDisplayConfigs: "statusDisplayConfigs", statusGroupConfigs: "statusGroupConfigs" }, ngImport: i0, template: `
|
|
38
|
+
<div class="status-field" [ngClass]="size">
|
|
39
|
+
<img
|
|
40
|
+
*ngIf="getStatusDisplay()?.icon"
|
|
41
|
+
[src]="getStatusDisplay()?.icon"
|
|
42
|
+
alt=""
|
|
43
|
+
/>
|
|
44
|
+
{{ getStatusDisplay()?.text }}
|
|
45
|
+
</div>
|
|
46
|
+
`, isInline: true, styles: [":host .status-field{display:flex;align-items:center;gap:8px;font-weight:500}:host .status-field img{width:12px;height:12px;flex-shrink:0}:host .status-field.large img{width:16px;height:16px}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
18
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: StatusFieldComponent, decorators: [{
|
|
19
48
|
type: Component,
|
|
20
|
-
args: [{ selector: 'app-rd-status-field', template:
|
|
21
|
-
|
|
49
|
+
args: [{ selector: 'app-rd-status-field', template: `
|
|
50
|
+
<div class="status-field" [ngClass]="size">
|
|
51
|
+
<img
|
|
52
|
+
*ngIf="getStatusDisplay()?.icon"
|
|
53
|
+
[src]="getStatusDisplay()?.icon"
|
|
54
|
+
alt=""
|
|
55
|
+
/>
|
|
56
|
+
{{ getStatusDisplay()?.text }}
|
|
57
|
+
</div>
|
|
58
|
+
`, styles: [":host .status-field{display:flex;align-items:center;gap:8px;font-weight:500}:host .status-field img{width:12px;height:12px;flex-shrink:0}:host .status-field.large img{width:16px;height:16px}\n"] }]
|
|
59
|
+
}], ctorParameters: function () { return []; }, propDecorators: { status: [{
|
|
22
60
|
type: Input
|
|
23
61
|
}], text: [{
|
|
24
62
|
type: Input
|
|
25
63
|
}], size: [{
|
|
26
64
|
type: Input
|
|
65
|
+
}], statusDisplayConfigs: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], statusGroupConfigs: [{
|
|
68
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