@alauda-fe/common
Version:
Alauda frontend team common codes.
81 lines • 9.87 kB
JavaScript
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation, } from '@angular/core';
import * as i0 from "@angular/core";
const _c0 = a0 => ({ $implicit: a0 });
function NavItemUlComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function NavItemUlComponent_div_2_div_1_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "div", 7);
} }
function NavItemUlComponent_div_2_div_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 8);
i0.ɵɵtext(1);
i0.ɵɵelementEnd();
} if (rf & 2) {
const group_r1 = i0.ɵɵnextContext().$implicit;
i0.ɵɵadvance();
i0.ɵɵtextInterpolate1(" ", group_r1.title, " ");
} }
function NavItemUlComponent_div_2_ng_container_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementContainer(0);
} }
function NavItemUlComponent_div_2_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 4);
i0.ɵɵtemplate(1, NavItemUlComponent_div_2_div_1_Template, 1, 0, "div", 5)(2, NavItemUlComponent_div_2_div_2_Template, 2, 1, "div", 6)(3, NavItemUlComponent_div_2_ng_container_3_Template, 1, 0, "ng-container", 2);
i0.ɵɵelementEnd();
} if (rf & 2) {
const group_r1 = ctx.$implicit;
const i_r2 = ctx.index;
i0.ɵɵnextContext();
const li_r3 = i0.ɵɵreference(4);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", i_r2);
i0.ɵɵadvance();
i0.ɵɵproperty("ngIf", group_r1.title);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", li_r3)("ngTemplateOutletContext", i0.ɵɵpureFunction1(4, _c0, group_r1.items));
} }
function NavItemUlComponent_ng_template_3_acl_nav_item_li_0_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelement(0, "acl-nav-item-li", 10);
} if (rf & 2) {
const item_r4 = ctx.$implicit;
i0.ɵɵproperty("item", item_r4);
} }
function NavItemUlComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵtemplate(0, NavItemUlComponent_ng_template_3_acl_nav_item_li_0_Template, 1, 1, "acl-nav-item-li", 9);
} if (rf & 2) {
const items_r5 = ctx.$implicit;
const ctx_r5 = i0.ɵɵnextContext();
i0.ɵɵproperty("ngForOf", items_r5)("ngForTrackBy", ctx_r5.trackByKey);
} }
export class NavItemUlComponent {
trackByKey(_, item) {
return item.key;
}
trackByTitle(_, item) {
return item.title;
}
static { this.ɵfac = function NavItemUlComponent_Factory(t) { return new (t || NavItemUlComponent)(); }; }
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavItemUlComponent, selectors: [["acl-nav-item-ul"]], inputs: { items: "items", groups: "groups" }, decls: 5, vars: 6, consts: [["li", ""], [1, "acl-nav-item-ul"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], ["class", "acl-nav-item-group", 4, "ngFor", "ngForOf", "ngForTrackBy"], [1, "acl-nav-item-group"], ["class", "split", 4, "ngIf"], ["class", "acl-nav-item-group__title", 4, "ngIf"], [1, "split"], [1, "acl-nav-item-group__title"], [3, "item", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "item"]], template: function NavItemUlComponent_Template(rf, ctx) { if (rf & 1) {
i0.ɵɵelementStart(0, "div", 1);
i0.ɵɵtemplate(1, NavItemUlComponent_ng_container_1_Template, 1, 0, "ng-container", 2)(2, NavItemUlComponent_div_2_Template, 4, 6, "div", 3);
i0.ɵɵelementEnd();
i0.ɵɵtemplate(3, NavItemUlComponent_ng_template_3_Template, 1, 2, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
} if (rf & 2) {
const li_r3 = i0.ɵɵreference(4);
i0.ɵɵadvance();
i0.ɵɵproperty("ngTemplateOutlet", li_r3)("ngTemplateOutletContext", i0.ɵɵpureFunction1(4, _c0, ctx.items));
i0.ɵɵadvance();
i0.ɵɵproperty("ngForOf", ctx.groups)("ngForTrackBy", ctx.trackByTitle);
} }, styles: [".acl-nav-item-group{position:relative}.acl-nav-item-group__title{color:rgb(var(--aui-color-n-5));font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);padding-left:20px;padding-bottom:6px;word-break:keep-all;white-space:nowrap}.acl-nav-item-group+.acl-nav-item-group{padding-top:22px}.acl-nav-item-group .split{width:100%;border-bottom:1px solid rgb(var(--aui-color-n-8));transform:translateY(-11px);display:none}.acl-nav-menu.collapse .split{display:block}acl-nav-item-li{display:block}\n"], encapsulation: 2, changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavItemUlComponent, [{
type: Component,
args: [{ selector: 'acl-nav-item-ul', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, template: "<div class=\"acl-nav-item-ul\">\n <ng-container\n *ngTemplateOutlet=\"li; context: { $implicit: items }\"\n ></ng-container>\n\n <div\n *ngFor=\"let group of groups; index as i; trackBy: trackByTitle\"\n class=\"acl-nav-item-group\"\n >\n <div\n *ngIf=\"i\"\n class=\"split\"\n ></div>\n <div\n *ngIf=\"group.title\"\n class=\"acl-nav-item-group__title\"\n >\n {{ group.title }}\n </div>\n <ng-container\n *ngTemplateOutlet=\"li; context: { $implicit: group.items }\"\n ></ng-container>\n </div>\n</div>\n\n<ng-template\n #li\n let-items\n>\n <acl-nav-item-li\n *ngFor=\"let item of items; trackBy: trackByKey\"\n [item]=\"item\"\n ></acl-nav-item-li>\n</ng-template>\n", styles: [".acl-nav-item-group{position:relative}.acl-nav-item-group__title{color:rgb(var(--aui-color-n-5));font-size:var(--aui-font-size-m);line-height:var(--aui-line-height-m);padding-left:20px;padding-bottom:6px;word-break:keep-all;white-space:nowrap}.acl-nav-item-group+.acl-nav-item-group{padding-top:22px}.acl-nav-item-group .split{width:100%;border-bottom:1px solid rgb(var(--aui-color-n-8));transform:translateY(-11px);display:none}.acl-nav-menu.collapse .split{display:block}acl-nav-item-li{display:block}\n"] }]
}], null, { items: [{
type: Input
}], groups: [{
type: Input
}] }); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NavItemUlComponent, { className: "NavItemUlComponent" }); })();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2LWl0ZW0tdWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21tb24vc3JjL3BhZ2Utc2NhZmZvbGQvbmF2aWdhdGlvbi9uYXYtbWVudS9uYXYtaXRlbS11bC9uYXYtaXRlbS11bC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbW1vbi9zcmMvcGFnZS1zY2FmZm9sZC9uYXZpZ2F0aW9uL25hdi1tZW51L25hdi1pdGVtLXVsL25hdi1pdGVtLXVsLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCx1QkFBdUIsRUFDdkIsU0FBUyxFQUNULEtBQUssRUFDTCxpQkFBaUIsR0FDbEIsTUFBTSxlQUFlLENBQUM7Ozs7SUNKckIsd0JBRWdCOzs7SUFNZCx5QkFHTzs7O0lBQ1AsOEJBR0M7SUFDQyxZQUNGO0lBQUEsaUJBQU07OztJQURKLGNBQ0Y7SUFERSwrQ0FDRjs7O0lBQ0Esd0JBRWdCOzs7SUFoQmxCLDhCQUdDO0lBV0MsQUFOQSxBQUpBLHlFQUdDLDREQUlBLDhFQUtBO0lBQ0gsaUJBQU07Ozs7OztJQVpELGNBQU87SUFBUCwyQkFBTztJQUlQLGNBQWlCO0lBQWpCLHFDQUFpQjtJQU1qQixjQUFzQjtJQUFBLEFBQXRCLHdDQUFzQix1RUFBbUM7OztJQVM5RCxzQ0FHbU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