UNPKG

ng-semantic

Version:

Angular2 building blocks based on Semantic UI

955 lines (927 loc) 141 kB
System.registerDynamic("src/menu/menu", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticMenuComponent = function () { function SemanticMenuComponent() { this.logoClass = "logo"; } SemanticMenuComponent.prototype.ngAfterViewInit = function () { Array.from(this.innerElement.nativeElement.childNodes).filter(function (element) { return element.nodeName === "SM-MENU"; }).map(function (element) { return element.firstElementChild.classList.remove("ui"); }); }; return SemanticMenuComponent; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticMenuComponent.prototype, "logo", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticMenuComponent.prototype, "class", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticMenuComponent.prototype, "logoClass", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticMenuComponent.prototype, "title", void 0); __decorate([core_1.ViewChild("innerElement"), __metadata("design:type", core_1.ElementRef)], SemanticMenuComponent.prototype, "innerElement", void 0); SemanticMenuComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-menu", template: "<div class=\"ui menu {{class}}\" #innerElement>\n<a href=\"#/\" *ngIf=\"logo\" class=\"header item\">\n <img class=\"{{logoClass}}\" alt=\"{{title}}\" src=\"{{logo}}\">\n</a>\n\n<a href=\"#/\" *ngIf=\"title && !logo\" class=\"header item\">\n {{title}}\n</a>\n\n<ng-content></ng-content>\n</div>\n" }), __metadata("design:paramtypes", [])], SemanticMenuComponent); exports.SemanticMenuComponent = SemanticMenuComponent; return module.exports; }); System.registerDynamic("src/message/message", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticMessageComponent = function () { function SemanticMessageComponent(renderer) { this.renderer = renderer; } SemanticMessageComponent.prototype.close = function () { this.renderer.detachView([this.message.nativeElement]); }; return SemanticMessageComponent; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticMessageComponent.prototype, "icon", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticMessageComponent.prototype, "class", void 0); __decorate([core_1.ViewChild("message"), __metadata("design:type", core_1.ElementRef)], SemanticMessageComponent.prototype, "message", void 0); SemanticMessageComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, encapsulation: core_1.ViewEncapsulation.None, selector: "sm-message", styles: ["sm-message { display: block; margin: 1em 0; } message-header {display: block}"], template: "<div class=\"ui message {{class}}\" [ngClass]=\"{'icon': icon}\" #message>\n<i class=\"close icon\" (click)=\"close()\"></i>\n<i *ngIf=\"icon\" class=\"icon {{icon}}\"></i>\n <div class=\"content\">\n <div class=\"header\">\n <ng-content select=\"message-header\"></ng-content>\n </div>\n <ng-content select=\"message-content\"></ng-content>\n </div>\n</div>" }), __metadata("design:paramtypes", [core_1.Renderer])], SemanticMessageComponent); exports.SemanticMessageComponent = SemanticMessageComponent; return module.exports; }); System.registerDynamic("src/popup/tooltip", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SMTooltipDirective = function () { function SMTooltipDirective(element) { this.element = element; } SMTooltipDirective.prototype.ngOnInit = function () { this.element.element.nativeElement.setAttribute("data-position", this.smDirPosition || "top center"); this.element.element.nativeElement.setAttribute("data-tooltip", this.smDirTooltip); }; return SMTooltipDirective; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SMTooltipDirective.prototype, "smDirTooltip", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SMTooltipDirective.prototype, "smDirPosition", void 0); SMTooltipDirective = __decorate([core_1.Directive({ selector: "[smDirTooltip]" }), __metadata("design:paramtypes", [core_1.ViewContainerRef])], SMTooltipDirective); exports.SMTooltipDirective = SMTooltipDirective; return module.exports; }); System.registerDynamic("src/popup/popup", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticPopupComponent = function () { function SemanticPopupComponent() { this.visible = false; } SemanticPopupComponent.prototype.show = function (element, data) { var _this = this; if (data === void 0) { data = {}; } if (!this.visible) { this.visible = true; this.element = element.target; var options = Object.assign({ closable: true, exclusive: true, lastResort: true, on: "click", onHide: function () { return _this.hide(); }, popup: this.popup.nativeElement, position: "bottom center", preserve: true }, data); jQuery(this.element).popup(options).popup("show"); } }; SemanticPopupComponent.prototype.hide = function () { if (this.visible && this.element) { this.visible = false; jQuery(this.element).popup("hide"); } }; return SemanticPopupComponent; }(); __decorate([core_1.ViewChild("popup"), __metadata("design:type", core_1.ElementRef)], SemanticPopupComponent.prototype, "popup", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticPopupComponent.prototype, "class", void 0); SemanticPopupComponent = __decorate([core_1.Component({ selector: "sm-popup", template: "<div class=\"ui popup very wide {{class}}\" #popup>\n <div class=\"content\">\n <ng-content></ng-content>\n </div>\n</div>" }), __metadata("design:paramtypes", [])], SemanticPopupComponent); exports.SemanticPopupComponent = SemanticPopupComponent; return module.exports; }); System.registerDynamic("src/modal/modal", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticModalComponent = function () { function SemanticModalComponent() {} SemanticModalComponent.prototype.show = function (data) { jQuery(this.modal.nativeElement).modal(data || {}).modal("toggle"); }; SemanticModalComponent.prototype.hide = function () { jQuery(this.modal.nativeElement).modal("hide"); }; return SemanticModalComponent; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticModalComponent.prototype, "class", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticModalComponent.prototype, "title", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticModalComponent.prototype, "icon", void 0); __decorate([core_1.ViewChild("modal"), __metadata("design:type", core_1.ElementRef)], SemanticModalComponent.prototype, "modal", void 0); SemanticModalComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-modal", template: "<div class=\"ui modal {{class}}\" #modal>\n <i class=\"close icon\"></i>\n <div [ngClass]=\"{'icon': icon}\" class=\"ui header\">\n <i *ngIf=\"icon\" class=\"icon {{icon}}\"></i>\n {{title}}\n </div>\n <div class=\"content\">\n <ng-content select=\"modal-content\"></ng-content>\n </div>\n <div class=\"actions\">\n <ng-content select=\"modal-actions\"></ng-content>\n </div>\n</div>" }), __metadata("design:paramtypes", [])], SemanticModalComponent); exports.SemanticModalComponent = SemanticModalComponent; var SMModalTagsDirective = function () { function SMModalTagsDirective() {} return SMModalTagsDirective; }(); SMModalTagsDirective = __decorate([core_1.Directive({ selector: 'modal-content, modal-actions' }), __metadata("design:paramtypes", [])], SMModalTagsDirective); exports.SMModalTagsDirective = SMModalTagsDirective; return module.exports; }); System.registerDynamic("src/segment/segment", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticSegmentComponent = function () { function SemanticSegmentComponent() {} return SemanticSegmentComponent; }(); __decorate([core_1.Input("class"), __metadata("design:type", String)], SemanticSegmentComponent.prototype, "class", void 0); SemanticSegmentComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-segment", template: "<div class=\"ui segment {{class}}\">\n <p><ng-content></ng-content></p>\n</div>" }), __metadata("design:paramtypes", [])], SemanticSegmentComponent); exports.SemanticSegmentComponent = SemanticSegmentComponent; return module.exports; }); System.registerDynamic("src/list/list", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticListComponent = function () { function SemanticListComponent() {} SemanticListComponent.prototype.ngAfterViewInit = function () { Array.from(this.innerElement.nativeElement.childNodes).filter(function (element) { return element.nodeName === "SM-LIST"; }).map(function (element) { return element.firstElementChild.classList.remove("ui"); }); }; return SemanticListComponent; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticListComponent.prototype, "class", void 0); __decorate([core_1.ViewChild("innerElement"), __metadata("design:type", core_1.ElementRef)], SemanticListComponent.prototype, "innerElement", void 0); SemanticListComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-list", template: "\n<div class=\"ui list {{class}}\" #innerElement>\n<ng-content></ng-content>\n</div>\n" }), __metadata("design:paramtypes", [])], SemanticListComponent); exports.SemanticListComponent = SemanticListComponent; return module.exports; }); System.registerDynamic("src/button/button", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticButtonComponent = function () { function SemanticButtonComponent() { this.disabled = false; } return SemanticButtonComponent; }(); __decorate([core_1.Input("class"), __metadata("design:type", String)], SemanticButtonComponent.prototype, "class", void 0); __decorate([core_1.Input("icon"), __metadata("design:type", String)], SemanticButtonComponent.prototype, "icon", void 0); __decorate([core_1.Input("disabled"), __metadata("design:type", Boolean)], SemanticButtonComponent.prototype, "disabled", void 0); SemanticButtonComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-button", template: "<button [ngClass]=\"{icon: icon}\" [attr.disabled]=\"disabled ? true : null\" class=\"ui {{class}} button\">\n <i *ngIf=\"icon\" class=\"{{icon}} icon\"></i>\n <ng-content></ng-content>\n</button>" }), __metadata("design:paramtypes", [])], SemanticButtonComponent); exports.SemanticButtonComponent = SemanticButtonComponent; return module.exports; }); System.registerDynamic("src/item/item", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticItemComponent = function () { function SemanticItemComponent() {} SemanticItemComponent.prototype.ngAfterViewInit = function () { this.innerItemElement.nativeElement.parentElement.classList.add("item"); }; return SemanticItemComponent; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticItemComponent.prototype, "icon", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticItemComponent.prototype, "header", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticItemComponent.prototype, "image", void 0); __decorate([core_1.ViewChild("innerItemElement"), __metadata("design:type", core_1.ElementRef)], SemanticItemComponent.prototype, "innerItemElement", void 0); SemanticItemComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "a[sm-item], sm-item", template: "<i *ngIf=\"icon\" class=\"{{icon}} icon\"></i>\n<img *ngIf=\"image\" class=\"ui avatar image\" src=\"{{image}}\">\n<div class=\"content\" #innerItemElement>\n <div *ngIf=\"header\" class=\"header\">\n {{header}}\n </div>\n <ng-content></ng-content>\n</div>" }), __metadata("design:paramtypes", [])], SemanticItemComponent); exports.SemanticItemComponent = SemanticItemComponent; return module.exports; }); System.registerDynamic("src/visibility/visibility", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SMVisibilityDirective = function () { function SMVisibilityDirective(element) { this.element = element; this.onTopVisible = new core_1.EventEmitter(); this.onTopPassed = new core_1.EventEmitter(); this.onUpdate = new core_1.EventEmitter(); } SMVisibilityDirective.prototype.ngOnInit = function () { var _this = this; if (this.element.element.nativeElement) { jQuery(this.element.element.nativeElement).visibility({ onTopPassed: function (calculations) { return _this.onTopPassed.emit(calculations); }, onTopVisible: function (calculations) { return _this.onTopVisible.emit(calculations); }, onUpdate: function (calculations) { return _this.onUpdate.emit(calculations); } }); } }; return SMVisibilityDirective; }(); __decorate([core_1.Input(), __metadata("design:type", Object)], SMVisibilityDirective.prototype, "smDirVisibility", void 0); __decorate([core_1.Output(), __metadata("design:type", core_1.EventEmitter)], SMVisibilityDirective.prototype, "onTopVisible", void 0); __decorate([core_1.Output(), __metadata("design:type", core_1.EventEmitter)], SMVisibilityDirective.prototype, "onTopPassed", void 0); __decorate([core_1.Output(), __metadata("design:type", core_1.EventEmitter)], SMVisibilityDirective.prototype, "onUpdate", void 0); SMVisibilityDirective = __decorate([core_1.Directive({ selector: "[smDirVisibility]" }), __metadata("design:paramtypes", [core_1.ViewContainerRef])], SMVisibilityDirective); exports.SMVisibilityDirective = SMVisibilityDirective; var SMDeviceVisibilityDirective = function () { function SMDeviceVisibilityDirective(element) { this.element = element; } SMDeviceVisibilityDirective.prototype.ngOnInit = function () { (_a = this.element.element.nativeElement.classList).add.apply(_a, this.smDeviceVisibility.split(" ")); var _a; }; return SMDeviceVisibilityDirective; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SMDeviceVisibilityDirective.prototype, "smDeviceVisibility", void 0); SMDeviceVisibilityDirective = __decorate([core_1.Directive({ selector: "[smDeviceVisibility]" }), __metadata("design:paramtypes", [core_1.ViewContainerRef])], SMDeviceVisibilityDirective); exports.SMDeviceVisibilityDirective = SMDeviceVisibilityDirective; return module.exports; }); System.registerDynamic("src/dropdown/dropdown", ["@angular/core"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var SemanticDropdownComponent = function () { function SemanticDropdownComponent() { this.options = {}; this.onChange = new core_1.EventEmitter(); } SemanticDropdownComponent.prototype.ngAfterViewInit = function () { var _this = this; var options = Object.assign({ onChange: function (value, a, b) { if (b != null && b.length) { _this.onChange.emit(b[0].innerText); } } }, this.options); jQuery(this.dropdown.nativeElement).dropdown(options); }; return SemanticDropdownComponent; }(); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticDropdownComponent.prototype, "class", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticDropdownComponent.prototype, "title", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticDropdownComponent.prototype, "icon", void 0); __decorate([core_1.Input(), __metadata("design:type", Array)], SemanticDropdownComponent.prototype, "items", void 0); __decorate([core_1.Input(), __metadata("design:type", Object)], SemanticDropdownComponent.prototype, "options", void 0); __decorate([core_1.Output(), __metadata("design:type", core_1.EventEmitter)], SemanticDropdownComponent.prototype, "onChange", void 0); __decorate([core_1.ViewChild("dropdown"), __metadata("design:type", core_1.ElementRef)], SemanticDropdownComponent.prototype, "dropdown", void 0); SemanticDropdownComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-dropdown", template: "\n <div class=\"ui {{class}} dropdown item\" #dropdown>\n <i *ngIf=\"icon\" class=\"{{icon}} icon\"></i>\n <div *ngIf=\"title\" class=\"text\">{{title}}</div>\n <i class=\"dropdown icon\"></i>\n <div class=\"menu\">\n <ng-content></ng-content>\n </div>\n </div>\n" }), __metadata("design:paramtypes", [])], SemanticDropdownComponent); exports.SemanticDropdownComponent = SemanticDropdownComponent; return module.exports; }); System.registerDynamic("src/select/select", ["@angular/core", "@angular/forms"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __decorate = this && this.__decorate || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = this && this.__metadata || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = $__require("@angular/core"); var forms_1 = $__require("@angular/forms"); var SemanticSelectComponent = function () { function SemanticSelectComponent() { this.control = new forms_1.FormControl(); this.options = {}; this.modelChange = new core_1.EventEmitter(); this.onChange = new core_1.EventEmitter(); this.multiple = false; } Object.defineProperty(SemanticSelectComponent.prototype, "disabled", { set: function (data) { var _this = this; setTimeout(function () { if (data) { jQuery(_this.select.nativeElement.parentNode).addClass("disabled"); } else { jQuery(_this.select.nativeElement.parentNode).removeClass("disabled"); } }, 1); }, enumerable: true, configurable: true }); ; Object.defineProperty(SemanticSelectComponent.prototype, "model", { set: function (data) { var _this = this; if (data) { setTimeout(function () { jQuery(_this.select.nativeElement).dropdown("set selected", data); }, 1); } }, enumerable: true, configurable: true }); SemanticSelectComponent.prototype.ngAfterViewInit = function () { var _this = this; if (typeof this.class === "string" && this.class.search("multiple") >= 0) { this.select.nativeElement.setAttribute("multiple", true); } var options = Object.assign({ onChange: function (value) { _this.modelChange.emit(value); _this.onChange.emit(value); }, onHide: function () { return _this.control.markAsTouched(); } }, this.options); jQuery(this.select.nativeElement).dropdown(options); }; return SemanticSelectComponent; }(); __decorate([core_1.Input(), __metadata("design:type", forms_1.FormControl)], SemanticSelectComponent.prototype, "control", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticSelectComponent.prototype, "class", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticSelectComponent.prototype, "label", void 0); __decorate([core_1.Input("disabled"), __metadata("design:type", Boolean), __metadata("design:paramtypes", [Boolean])], SemanticSelectComponent.prototype, "disabled", null); __decorate([core_1.Input(), __metadata("design:type", Object)], SemanticSelectComponent.prototype, "options", void 0); __decorate([core_1.Input(), __metadata("design:type", String)], SemanticSelectComponent.prototype, "placeholder", void 0); __decorate([core_1.Output(), __metadata("design:type", core_1.EventEmitter)], SemanticSelectComponent.prototype, "modelChange", void 0); __decorate([core_1.Output(), __metadata("design:type", core_1.EventEmitter)], SemanticSelectComponent.prototype, "onChange", void 0); __decorate([core_1.ViewChild("select"), __metadata("design:type", core_1.ElementRef)], SemanticSelectComponent.prototype, "select", void 0); __decorate([core_1.Input("model"), __metadata("design:type", Object), __metadata("design:paramtypes", [Object])], SemanticSelectComponent.prototype, "model", null); SemanticSelectComponent = __decorate([core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-select", template: "<div class=\"field\" [ngClass]=\"{error: (!control?.valid && control?.touched) }\">\n <label *ngIf=\"label\">{{label}}</label>\n<select [formControl]=\"control\" class=\"ui {{class}} dropdown\" #select>\n <option value=\"\">{{placeholder}}</option>\n <ng-content></ng-content>\n</select>\n</div>" }), __metadata("design:paramtypes", [])], SemanticSelectComponent); exports.SemanticSelectComponent = SemanticSelectComponent; return module.exports; }); System.registerDynamic("node_modules/rxjs/scheduler/Action", ["../Subscription"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __extends = this && this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscription_1 = $__require("../Subscription"); /** * A unit of work to be executed in a {@link Scheduler}. An action is typically * created from within a Scheduler and an RxJS user does not need to concern * themselves about creating and manipulating an Action. * * ```ts * class Action<T> extends Subscription { * new (scheduler: Scheduler, work: (state?: T) => void); * schedule(state?: T, delay: number = 0): Subscription; * } * ``` * * @class Action<T> */ var Action = function (_super) { __extends(Action, _super); function Action(scheduler, work) { _super.call(this); } /** * Schedules this action on its parent Scheduler for execution. May be passed * some context object, `state`. May happen at some point in the future, * according to the `delay` parameter, if specified. * @param {T} [state] Some contextual data that the `work` function uses when * called by the Scheduler. * @param {number} [delay] Time to wait before executing the work, where the * time unit is implicit and defined by the Scheduler. * @return {void} */ Action.prototype.schedule = function (state, delay) { if (delay === void 0) { delay = 0; } return this; }; return Action; }(Subscription_1.Subscription); exports.Action = Action; return module.exports; }); System.registerDynamic('node_modules/rxjs/scheduler/AsyncAction', ['../util/root', './Action'], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __extends = this && this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var root_1 = $__require('../util/root'); var Action_1 = $__require('./Action'); /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ var AsyncAction = function (_super) { __extends(AsyncAction, _super); function AsyncAction(scheduler, work) { _super.call(this, scheduler, work); this.scheduler = scheduler; this.work = work; this.pending = false; } AsyncAction.prototype.schedule = function (state, delay) { if (delay === void 0) { delay = 0; } if (this.closed) { return this; } // Always replace the current state with the new state. this.state = state; // Set the pending flag indicating that this action has been scheduled, or // has recursively rescheduled itself. this.pending = true; var id = this.id; var scheduler = this.scheduler; // // Important implementation note: // // Actions only execute once by default, unless rescheduled from within the // scheduled callback. This allows us to implement single and repeat // actions via the same code path, without adding API surface area, as well // as mimic traditional recursion but across asynchronous boundaries. // // However, JS runtimes and timers distinguish between intervals achieved by // serial `setTimeout` calls vs. a single `setInterval` call. An interval of // serial `setTimeout` calls can be individually delayed, which delays // scheduling the next `setTimeout`, and so on. `setInterval` attempts to // guarantee the interval callback will be invoked more precisely to the // interval period, regardless of load. // // Therefore, we use `setInterval` to schedule single and repeat actions. // If the action reschedules itself with the same delay, the interval is not // canceled. If the action doesn't reschedule, or reschedules with a // different delay, the interval will be canceled after scheduled callback // execution. // if (id != null) { this.id = this.recycleAsyncId(scheduler, id, delay); } this.delay = delay; // If this action has already an async Id, don't request a new one. this.id = this.id || this.requestAsyncId(scheduler, this.id, delay); return this; }; AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) { if (delay === void 0) { delay = 0; } return root_1.root.setInterval(scheduler.flush.bind(scheduler, this), delay); }; AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) { if (delay === void 0) { delay = 0; } // If this action is rescheduled with the same delay time, don't clear the interval id. if (delay !== null && this.delay === delay) { return id; } // Otherwise, if the action's delay time is different from the current delay, // clear the interval id return root_1.root.clearInterval(id) && undefined || undefined; }; /** * Immediately executes this action and the `work` it contains. * @return {any} */ AsyncAction.prototype.execute = function (state, delay) { if (this.closed) { return new Error('executing a cancelled action'); } this.pending = false; var error = this._execute(state, delay); if (error) { return error; } else if (this.pending === false && this.id != null) { // Dequeue if the action didn't reschedule itself. Don't call // unsubscribe(), because the action could reschedule later. // For example: // ``` // scheduler.schedule(function doWork(counter) { // /* ... I'm a busy worker bee ... */ // var originalAction = this; // /* wait 100ms before rescheduling the action */ // setTimeout(function () { // originalAction.schedule(counter + 1); // }, 100); // }, 1000); // ``` this.id = this.recycleAsyncId(this.scheduler, this.id, null); } }; AsyncAction.prototype._execute = function (state, delay) { var errored = false; var errorValue = undefined; try { this.work(state); } catch (e) { errored = true; errorValue = !!e && e || new Error(e); } if (errored) { this.unsubscribe(); return errorValue; } }; AsyncAction.prototype._unsubscribe = function () { var id = this.id; var scheduler = this.scheduler; var actions = scheduler.actions; var index = actions.indexOf(this); this.work = null; this.delay = null; this.state = null; this.pending = false; this.scheduler = null; if (index !== -1) { actions.splice(index, 1); } if (id != null) { this.id = this.recycleAsyncId(scheduler, id, null); } }; return AsyncAction; }(Action_1.Action); exports.AsyncAction = AsyncAction; return module.exports; }); System.registerDynamic("node_modules/rxjs/Scheduler", [], true, function ($__require, exports, module) { "use strict"; /** * An execution context and a data structure to order tasks and schedule their * execution. Provides a notion of (potentially virtual) time, through the * `now()` getter method. * * Each unit of work in a Scheduler is called an {@link Action}. * * ```ts * class Scheduler { * now(): number; * schedule(work, delay?, state?): Subscription; * } * ``` * * @class Scheduler */ var define, global = this || self, GLOBAL = global; var Scheduler = function () { function Scheduler(SchedulerAction, now) { if (now === void 0) { now = Scheduler.now; } this.SchedulerAction = SchedulerAction; this.now = now; } /** * Schedules a function, `work`, for execution. May happen at some point in * the future, according to the `delay` parameter, if specified. May be passed * some context object, `state`, which will be passed to the `work` function. * * The given arguments will be processed an stored as an Action object in a * queue of actions. * * @param {function(state: ?T): ?Subscription} work A function representing a * task, or some unit of work to be executed by the Scheduler. * @param {number} [delay] Time to wait before executing the work, where the * time unit is implicit and defined by the Scheduler itself. * @param {T} [state] Some contextual data that the `work` function uses when * called by the Scheduler. * @return {Subscription} A subscription in order to be able to unsubscribe * the scheduled work. */ Scheduler.prototype.schedule = function (work, delay, state) { if (delay === void 0) { delay = 0; } return new this.SchedulerAction(this, work).schedule(state, delay); }; Scheduler.now = Date.now ? Date.now : function () { return +new Date(); }; return Scheduler; }(); exports.Scheduler = Scheduler; return module.exports; }); System.registerDynamic("node_modules/rxjs/scheduler/AsyncScheduler", ["../Scheduler"], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __extends = this && this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Scheduler_1 = $__require("../Scheduler"); var AsyncScheduler = function (_super) { __extends(AsyncScheduler, _super); function AsyncScheduler() { _super.apply(this, arguments); this.actions = []; /** * A flag to indicate whether the Scheduler is currently executing a batch of * queued actions. * @type {boolean} */ this.active = false; /** * An internal ID used to track the latest asynchronous task such as those * coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and * others. * @type {any} */ this.scheduled = undefined; } AsyncScheduler.prototype.flush = function (action) { var actions = this.actions; if (this.active) { actions.push(action); return; } var error; this.active = true; do { if (error = action.execute(action.state, action.delay)) { break; } } while (action = actions.shift()); // exhaust the scheduler queue this.active = false; if (error) { while (action = actions.shift()) { action.unsubscribe(); } throw error; } }; return AsyncScheduler; }(Scheduler_1.Scheduler); exports.AsyncScheduler = AsyncScheduler; return module.exports; }); System.registerDynamic('node_modules/rxjs/scheduler/async', ['./AsyncAction', './AsyncScheduler'], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var AsyncAction_1 = $__require('./AsyncAction'); var AsyncScheduler_1 = $__require('./AsyncScheduler'); exports.async = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction); return module.exports; }); System.registerDynamic('node_modules/rxjs/operator/debounceTime', ['../Subscriber', '../scheduler/async'], true, function ($__require, exports, module) { "use strict"; var define, global = this || self, GLOBAL = global; var __extends = this && this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var Subscriber_1 = $__require('../Subscriber'); var async_1 = $__require('../scheduler/async'); /** * Emits a value from the source Observable only after a particular time span * has passed without another source emission. * * <span class="informal">It's like {@link delay}, but passes only the most * recent value from each burst of emissions.</span> * * <img src="./img/debounceTime.png" width="100%"> * * `debounceTime` delays values emitted by the source Observable, but drops * previous pending delayed emissions if a new value arrives on the source * Observable. This operator keeps track of the most recent value from the * source Observable, and emits that only when `dueTime` enough time has passed * without any other value appearing on the source Observable. If a new value * appears before `dueTime` silence occurs, the previous value will be dropped * and will not be emitted on the output Observable. * * This is a rate-limiting operator, because it is impossible for more than one * value to be emitted in any time window of duration `dueTime`, but it is also * a delay-like operator since output emissions do not occur at the same time as * they did on the source Observable. Optionally takes a {@link Scheduler} for * managing timers. * * @example <capti