@alauda-fe/common
Version:
Alauda frontend team common codes.
147 lines • 18.2 kB
JavaScript
import { ButtonComponent, IconComponent, isTemplateRef } from '@alauda/ui';
import { NgClass, NgFor, NgIf, NgStyle, NgTemplateOutlet, } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input, TemplateRef, } from '@angular/core';
import { FieldNotAvailablePipe, PurePipe } from '../../public-api';
import { TranslatePipe, TranslateService } from '../../translate/public-api';
import * as i0 from "@angular/core";
import * as i1 from "../../translate/public-api";
const _c0 = (a0, a1) => ({ unfolded: a0, "has-more": a1 });
const _c1 = a0 => ({ marginBottom: a0 });
const _c2 = a0 => ({ $implicit: a0 });
const _c3 = a0 => ({ folded: a0 });
function FoldableItemInTableComponent_div_0_li_3_ng_container_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function FoldableItemInTableComponent_div_0_li_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainerStart(0);
i0.ɵɵtemplate(1, FoldableItemInTableComponent_div_0_li_3_ng_container_2_ng_container_1_Template, 1, 0, "ng-container", 9);
i0.ɵɵelementContainerEnd();
} if (rf & 2) {
const item_r1 = i0.ɵɵnextContext().$implicit;
const ctx_r1 = i0.ɵɵnextContext(2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.itemTpl)("ngTemplateOutletContext", i0.ɵɵpureFunction1(2, _c2, item_r1));
} }
function FoldableItemInTableComponent_div_0_li_3_ng_template_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtext(0);
} if (rf & 2) {
const item_r1 = i0.ɵɵnextContext().$implicit;
i0.ɵɵtextInterpolate(item_r1);
} }
function FoldableItemInTableComponent_div_0_li_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "li", 7);
i0.ɵɵpipe(1, "pure");
i0.ɵɵtemplate(2, FoldableItemInTableComponent_div_0_li_3_ng_container_2_Template, 2, 4, "ng-container", 8)(3, FoldableItemInTableComponent_div_0_li_3_ng_template_3_Template, 1, 1, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
i0.ɵɵelementEnd();
} if (rf & 2) {
const item_r1 = ctx.$implicit;
const normal_r3 = i0.ɵɵreference(4);
const ctx_r1 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("title", i0.ɵɵpipeBind3(1, 3, item_r1, ctx_r1.itemTitle, ctx_r1.translate.locale));
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngIf", ctx_r1.isTemplateRef(ctx_r1.itemTpl))("ngIfElse", normal_r3);
} }
function FoldableItemInTableComponent_div_0_button_5_Template(rf, ctx) { if (rf & 1) {
const _r4 = i0.ɵɵgetCurrentView();
i0.ɵɵelementStart(0, "button", 10);
i0.ɵɵlistener("click", function FoldableItemInTableComponent_div_0_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.folded = !ctx_r1.folded); });
i0.ɵɵtext(1);
i0.ɵɵpipe(2, "translate");
i0.ɵɵelement(3, "aui-icon", 11);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r1 = i0.ɵɵnextContext(2);
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c3, !ctx_r1.folded))("round", true)("plain", ctx_r1.folded);
i0.ɵɵadvance();
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 5, ctx_r1.folded ? "unfold" : "collapse"), " ");
i0.ɵɵadvance(2);
i0.ɵɵproperty("icon", ctx_r1.folded ? "angles_down" : "angles_up");
} }
function FoldableItemInTableComponent_div_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 3)(1, "ul", 4);
i0.ɵɵpipe(2, "pure");
i0.ɵɵtemplate(3, FoldableItemInTableComponent_div_0_li_3_Template, 5, 7, "li", 5);
i0.ɵɵpipe(4, "pure");
i0.ɵɵelementEnd();
i0.ɵɵtemplate(5, FoldableItemInTableComponent_div_0_button_5_Template, 4, 9, "button", 6);
i0.ɵɵelementEnd();
} if (rf & 2) {
const ctx_r1 = i0.ɵɵnextContext();
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(12, _c0, !ctx_r1.folded, ctx_r1.items.length > ctx_r1.min))("ngStyle", i0.ɵɵpureFunction1(15, _c1, ctx_r1.items.length > ctx_r1.min ? "10px" : null));
i0.ɵɵadvance();
i0.ɵɵproperty("ngStyle", i0.ɵɵpipeBind2(2, 5, ctx_r1.max, ctx_r1.getStyle));
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind3(4, 8, ctx_r1.items, ctx_r1.getItems, ctx_r1.folded));
i0.ɵɵadvance(2);
i0.ɵɵproperty("ngIf", ctx_r1.items.length > ctx_r1.min);
} }
function FoldableItemInTableComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtext(0);
i0.ɵɵpipe(1, "aclFieldNotAvailable");
} if (rf & 2) {
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(1, 1, null), "\n");
} }
export class FoldableItemInTableComponent {
constructor(translate) {
this.translate = translate;
this.itemTitle = String;
this.folded = true;
this.min = 2; // 默认显示几条数据,如果总数超过这个值则显示更多的按钮
this.max = 4; // 最多显示几条数据,如果超过这个值,则内部滚动
this.isTemplateRef = isTemplateRef;
this.getItems = (items, folded) => folded ? items.slice(0, this.min) : items;
}
getStyle(max) {
const height = max * 24;
return {
maxHeight: `${height}px`,
};
}
static { this.ɵfac = function FoldableItemInTableComponent_Factory(t) { return new (t || FoldableItemInTableComponent)(i0.ɵɵdirectiveInject(i1.TranslateService)); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FoldableItemInTableComponent, selectors: [["acl-foldable-item-in-table"]], inputs: { hint: "hint", itemTpl: "itemTpl", itemTitle: "itemTitle", folded: "folded", items: "items", min: "min", max: "max" }, standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 3, vars: 2, consts: [["empty", ""], ["normal", ""], ["class", "foldable", 3, "ngClass", "ngStyle", 4, "ngIf", "ngIfElse"], [1, "foldable", 3, "ngClass", "ngStyle"], [3, "ngStyle"], [3, "title", 4, "ngFor", "ngForOf"], ["aui-button", "primary", "size", "mini", "type", "button", 3, "ngClass", "round", "plain", "click", 4, "ngIf"], [3, "title"], [4, "ngIf", "ngIfElse"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["aui-button", "primary", "size", "mini", "type", "button", 3, "click", "ngClass", "round", "plain"], [3, "icon"]], template: function FoldableItemInTableComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, FoldableItemInTableComponent_div_0_Template, 6, 17, "div", 2)(1, FoldableItemInTableComponent_ng_template_1_Template, 2, 3, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
} if (rf & 2) {
const empty_r5 = i0.ɵɵreference(2);
i0.ɵɵproperty("ngIf", ctx.items == null ? null : ctx.items.length)("ngIfElse", empty_r5);
} }, dependencies: [NgIf,
NgClass,
NgStyle,
NgFor,
TranslatePipe,
PurePipe,
NgTemplateOutlet,
ButtonComponent,
IconComponent,
FieldNotAvailablePipe], styles: [".foldable[_ngcontent-%COMP%]{position:relative;border-radius:4px;min-width:60px}.foldable.has-more[_ngcontent-%COMP%]{border-bottom:1px solid rgb(var(--aui-color-n-8));padding-bottom:7px}.foldable.has-more.unfolded[_ngcontent-%COMP%]{margin-left:-9px;padding:8px;border:1px dashed rgb(var(--aui-color-primary))}.foldable[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{overflow:auto}.foldable[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px;height:4px}.foldable[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}.foldable[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}.foldable[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]::-webkit-scrollbar-corner{background-color:transparent}.foldable[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]:not(:last-child){margin-bottom:4px}.foldable[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{line-height:20px}.foldable[_ngcontent-%COMP%] li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]{margin-top:4px}.foldable[_ngcontent-%COMP%] .aui-button[_ngcontent-%COMP%]{height:24px;font-size:12px;position:absolute;left:50%;transform:translate(-50%);bottom:-12px;border:2px solid rgb(var(--aui-color-n-10))}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FoldableItemInTableComponent, [{
type: Component,
args: [{ selector: 'acl-foldable-item-in-table', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
NgIf,
NgClass,
NgStyle,
NgFor,
TranslatePipe,
PurePipe,
NgTemplateOutlet,
ButtonComponent,
IconComponent,
FieldNotAvailablePipe,
], template: "<div\n *ngIf=\"items?.length; else empty\"\n class=\"foldable\"\n [ngClass]=\"{\n unfolded: !folded,\n 'has-more': items.length > min\n }\"\n [ngStyle]=\"{ marginBottom: items.length > min ? '10px' : null }\"\n>\n <ul [ngStyle]=\"max | pure: getStyle\">\n <li\n *ngFor=\"let item of items | pure: getItems:folded\"\n [title]=\"item | pure: itemTitle:translate.locale\"\n >\n <ng-container *ngIf=\"isTemplateRef(itemTpl); else normal\">\n <ng-container\n *ngTemplateOutlet=\"itemTpl; context: { $implicit: item }\"\n ></ng-container>\n </ng-container>\n <ng-template #normal>{{ item }}</ng-template>\n </li>\n </ul>\n <button\n *ngIf=\"items.length > min\"\n (click)=\"folded = !folded\"\n [ngClass]=\"{ folded: !folded }\"\n aui-button=\"primary\"\n [round]=\"true\"\n [plain]=\"folded\"\n size=\"mini\"\n type=\"button\"\n >\n {{ (folded ? 'unfold' : 'collapse') | translate }}\n <aui-icon [icon]=\"folded ? 'angles_down' : 'angles_up'\"></aui-icon>\n </button>\n</div>\n\n<ng-template #empty>\n {{ null | aclFieldNotAvailable }}\n</ng-template>\n", styles: [".foldable{position:relative;border-radius:4px;min-width:60px}.foldable.has-more{border-bottom:1px solid rgb(var(--aui-color-n-8));padding-bottom:7px}.foldable.has-more.unfolded{margin-left:-9px;padding:8px;border:1px dashed rgb(var(--aui-color-primary))}.foldable ul{overflow:auto}.foldable ul::-webkit-scrollbar{width:8px;height:4px}.foldable ul::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}.foldable ul::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}.foldable ul::-webkit-scrollbar-corner{background-color:transparent}.foldable ul:not(:last-child){margin-bottom:4px}.foldable li{line-height:20px}.foldable li+li{margin-top:4px}.foldable .aui-button{height:24px;font-size:12px;position:absolute;left:50%;transform:translate(-50%);bottom:-12px;border:2px solid rgb(var(--aui-color-n-10))}\n"] }]
}], () => [{ type: i1.TranslateService }], { hint: [{
type: Input
}], itemTpl: [{
type: Input
}], itemTitle: [{
type: Input
}], folded: [{
type: Input
}], items: [{
type: Input
}], min: [{
type: Input
}], max: [{
type: Input
}] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FoldableItemInTableComponent, { className: "FoldableItemInTableComponent" }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21tb24vc3JjL3dpZGdldC9mb2xkYWJsZS1pdGVtLWluLXRhYmxlL2NvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tbW9uL3NyYy93aWRnZXQvZm9sZGFibGUtaXRlbS1pbi10YWJsZS90ZW1wbGF0ZS5odG1sIl0sIm5hbWVzI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