UNPKG

bea-shell

Version:

An angular component for a configurable application shell, consisting of a topbar and sidebar

51 lines 4.21 kB
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ import { Component, Input } from '@angular/core'; import { MenuItem, SidebarOptions } from '@bea-shell/common/objects'; var SidebarItemComponent = /** @class */ (function () { function SidebarItemComponent() { } /** * @return {?} */ SidebarItemComponent.prototype.ngOnInit = /** * @return {?} */ function () { }; /** * @return {?} */ SidebarItemComponent.prototype.select = /** * @return {?} */ function () { this.selected = !this.selected; }; SidebarItemComponent.decorators = [ { type: Component, args: [{ selector: 'sidebar-item', template: "<div class=\"item-group\" *ngIf=\"options\">\r\n <menu-item [barClass]=\"'sidebar-item'\" [menuItem]=\"menuItem\" [submenuIcon]=\"options?.submenuIcon\" (click)=select()></menu-item>\r\n <div class=\"sub-items\" *ngIf=\"menuItem.subitems\" [class.selected]=\"selected\">\r\n <div *ngFor=\"let subItem of menuItem.subitems\">\r\n <sidebar-item [options]=\"options\" [menuItem]=\"subItem\"></sidebar-item>\r\n </div>\r\n </div>\r\n</div>", styles: [".topbar{height:54px;box-shadow:rgba(0,0,0,.2) 0 3px 5px -1px,rgba(0,0,0,.14) 0 6px 10px 0,transparent 0 1px 18px 0;background-color:#f0f0f0}.sidebar{width:300px;box-shadow:rgba(0,0,0,.2) 0 3px 5px -1px,rgba(0,0,0,.14) 0 6px 10px 0,transparent 0 1px 18px 0;background-color:#f0f0f0}.noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.item-group{cursor:pointer}.item-group .sub-items{height:0;overflow-y:hidden}.item-group .sub-items.selected{height:auto;padding-top:5px;padding-bottom:5px}"] }] } ]; /** @nocollapse */ SidebarItemComponent.ctorParameters = function () { return []; }; SidebarItemComponent.propDecorators = { options: [{ type: Input, args: ['options',] }], menuItem: [{ type: Input, args: ['menuItem',] }] }; return SidebarItemComponent; }()); export { SidebarItemComponent }; if (false) { /** @type {?} */ SidebarItemComponent.prototype.options; /** @type {?} */ SidebarItemComponent.prototype.menuItem; /** @type {?} */ SidebarItemComponent.prototype.selected; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2lkZWJhci1pdGVtLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL2JlYS1zaGVsbC8iLCJzb3VyY2VzIjpbImxpYi9zaWRlYmFyL3NpZGViYXItaXRlbS9zaWRlYmFyLWl0ZW0uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUV6RCxPQUFPLEVBQUUsUUFBUSxFQUFFLGNBQWMsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBRXJFO0lBWUU7SUFDQSxDQUFDOzs7O0lBRUQsdUNBQVE7OztJQUFSO0lBQ0EsQ0FBQzs7OztJQUVELHFDQUFNOzs7SUFBTjtRQUNFLElBQUksQ0FBQyxRQUFRLEdBQUcsQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDO0lBQ2pDLENBQUM7O2dCQXBCRixTQUFTLFNBQUM7b0JBQ1QsUUFBUSxFQUFFLGNBQWM7b0JBQ3hCLGllQUE0Qzs7aUJBRTdDOzs7OzswQkFHRSxLQUFLLFNBQUMsU0FBUzsyQkFDZixLQUFLLFNBQUMsVUFBVTs7SUFhbkIsMkJBQUM7Q0FBQSxBQXJCRCxJQXFCQztTQWhCWSxvQkFBb0I7OztJQUUvQix1Q0FBMEM7O0lBQzFDLHdDQUFzQzs7SUFFdEMsd0NBQWtCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50LCBPbkluaXQsIElucHV0IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcblxyXG5pbXBvcnQgeyBNZW51SXRlbSw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