nk-controls
Advanced tools
Comparing version 2.1.9 to 2.1.10
@@ -1,7 +0,2 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./public-api")); | ||
export * from './public-api'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,7 +0,2 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./sortDirectionEnum")); | ||
export * from './sortDirectionEnum'; | ||
//# sourceMappingURL=public-api.js.map |
@@ -1,8 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var SortDirectionEnum; | ||
export var SortDirectionEnum; | ||
(function (SortDirectionEnum) { | ||
SortDirectionEnum[SortDirectionEnum["Ascending"] = 0] = "Ascending"; | ||
SortDirectionEnum[SortDirectionEnum["Descending"] = 1] = "Descending"; | ||
})(SortDirectionEnum = exports.SortDirectionEnum || (exports.SortDirectionEnum = {})); | ||
})(SortDirectionEnum || (SortDirectionEnum = {})); | ||
//# sourceMappingURL=sortDirectionEnum.js.map |
@@ -1,7 +0,2 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./public-api")); | ||
export * from './public-api'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,22 +0,20 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UP_ARROW = 38; | ||
exports.DOWN_ARROW = 40; | ||
exports.RIGHT_ARROW = 39; | ||
exports.LEFT_ARROW = 37; | ||
exports.PAGE_UP = 33; | ||
exports.PAGE_DOWN = 34; | ||
exports.HOME = 36; | ||
exports.END = 35; | ||
exports.ENTER = 13; | ||
exports.SPACE = 32; | ||
exports.TAB = 9; | ||
exports.ESCAPE = 27; | ||
exports.BACKSPACE = 8; | ||
exports.DELETE = 46; | ||
exports.A = 65; | ||
exports.Z = 90; | ||
exports.ZERO = 48; | ||
exports.NINE = 91; | ||
exports.COMMA = 188; | ||
export var UP_ARROW = 38; | ||
export var DOWN_ARROW = 40; | ||
export var RIGHT_ARROW = 39; | ||
export var LEFT_ARROW = 37; | ||
export var PAGE_UP = 33; | ||
export var PAGE_DOWN = 34; | ||
export var HOME = 36; | ||
export var END = 35; | ||
export var ENTER = 13; | ||
export var SPACE = 32; | ||
export var TAB = 9; | ||
export var ESCAPE = 27; | ||
export var BACKSPACE = 8; | ||
export var DELETE = 46; | ||
export var A = 65; | ||
export var Z = 90; | ||
export var ZERO = 48; | ||
export var NINE = 91; | ||
export var COMMA = 188; | ||
//# sourceMappingURL=keyCodes.js.map |
@@ -1,13 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var nkDimensions_1 = require("./nkDimensions"); | ||
exports.NkDimensions = nkDimensions_1.NkDimensions; | ||
var nkOptionsPosition_1 = require("./nkOptionsPosition"); | ||
exports.NkOptionsPosition = nkOptionsPosition_1.NkOptionsPosition; | ||
var nkPositionBuilder_1 = require("./nkPositionBuilder"); | ||
exports.NkPositionBuilder = nkPositionBuilder_1.NkPositionBuilder; | ||
var nkWithinInfo_1 = require("./nkWithinInfo"); | ||
exports.NkWithinInfo = nkWithinInfo_1.NkWithinInfo; | ||
var offset_1 = require("./offset"); | ||
exports.Offset = offset_1.Offset; | ||
export { NkDimensions } from './nkDimensions'; | ||
export { NkOptionsPosition } from './nkOptionsPosition'; | ||
export { NkPositionBuilder } from './nkPositionBuilder'; | ||
export { NkWithinInfo } from './nkWithinInfo'; | ||
export { Offset } from './offset'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkDimensions = /** @class */ (function () { | ||
@@ -11,3 +9,3 @@ function NkDimensions(width, height, offset) { | ||
}()); | ||
exports.NkDimensions = NkDimensions; | ||
export { NkDimensions }; | ||
//# sourceMappingURL=nkDimensions.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkOptionsPosition = /** @class */ (function () { | ||
@@ -8,3 +6,3 @@ function NkOptionsPosition() { | ||
}()); | ||
exports.NkOptionsPosition = NkOptionsPosition; | ||
export { NkOptionsPosition }; | ||
//# sourceMappingURL=nkOptionsPosition.js.map |
@@ -1,6 +0,4 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var offset_1 = require("./offset"); | ||
var nkDimensions_1 = require("./nkDimensions"); | ||
var nkWithinInfo_1 = require("./nkWithinInfo"); | ||
import { Offset } from './offset'; | ||
import { NkDimensions } from './nkDimensions'; | ||
import { NkWithinInfo } from './nkWithinInfo'; | ||
var NkPositionBuilder = /** @class */ (function () { | ||
@@ -228,3 +226,3 @@ function NkPositionBuilder(controlElement) { | ||
var el = elem; | ||
return new nkDimensions_1.NkDimensions(el.offsetWidth, el.offsetHeight, new offset_1.Offset(el.offsetTop, el.offsetLeft)); | ||
return new NkDimensions(el.offsetWidth, el.offsetHeight, new Offset(el.offsetTop, el.offsetLeft)); | ||
}; | ||
@@ -250,5 +248,5 @@ ; | ||
} | ||
var offset = new offset_1.Offset(offsetTop, offsetLeft); | ||
var dimensions = new nkDimensions_1.NkDimensions(offsetWidth, offsetHeight, offset); | ||
var withinInfo = new nkWithinInfo_1.NkWithinInfo(element, scrollLeft, scrollTop, dimensions); | ||
var offset = new Offset(offsetTop, offsetLeft); | ||
var dimensions = new NkDimensions(offsetWidth, offsetHeight, offset); | ||
var withinInfo = new NkWithinInfo(element, scrollLeft, scrollTop, dimensions); | ||
return withinInfo; | ||
@@ -276,4 +274,4 @@ }; | ||
var height = hasOverflowX ? this.cachedScrollbarWidth : 0; | ||
var offset = new offset_1.Offset(0, 0); | ||
var dimensions = new nkDimensions_1.NkDimensions(width, height, offset); | ||
var offset = new Offset(0, 0); | ||
var dimensions = new NkDimensions(width, height, offset); | ||
return dimensions; | ||
@@ -303,3 +301,3 @@ }; | ||
}()); | ||
exports.NkPositionBuilder = NkPositionBuilder; | ||
export { NkPositionBuilder }; | ||
//# sourceMappingURL=nkPositionBuilder.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkWithinInfo = /** @class */ (function () { | ||
@@ -19,3 +17,3 @@ function NkWithinInfo(element, scrollLeft, scrollTop, dimensions) { | ||
}()); | ||
exports.NkWithinInfo = NkWithinInfo; | ||
export { NkWithinInfo }; | ||
//# sourceMappingURL=nkWithinInfo.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Offset = /** @class */ (function () { | ||
@@ -10,3 +8,3 @@ function Offset(offsetTop, offsetLeft) { | ||
}()); | ||
exports.Offset = Offset; | ||
export { Offset }; | ||
//# sourceMappingURL=offset.js.map |
@@ -1,10 +0,5 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./enums")); | ||
__export(require("./position")); | ||
__export(require("./utils")); | ||
__export(require("./keyCodes")); | ||
export * from './enums'; | ||
export * from './position'; | ||
export * from './utils'; | ||
export * from './keyCodes'; | ||
//# sourceMappingURL=public-api.js.map |
@@ -1,7 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var objectHelper_1 = require("./objectHelper"); | ||
exports.ObjectHelper = objectHelper_1.ObjectHelper; | ||
var scrollHelper_1 = require("./scrollHelper"); | ||
exports.ScrollHelper = scrollHelper_1.ScrollHelper; | ||
export { ObjectHelper } from './objectHelper'; | ||
export { ScrollHelper } from './scrollHelper'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var ObjectHelper = /** @class */ (function () { | ||
@@ -70,3 +68,3 @@ function ObjectHelper() { | ||
}()); | ||
exports.ObjectHelper = ObjectHelper; | ||
export { ObjectHelper }; | ||
//# sourceMappingURL=objectHelper.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var ScrollHelper = /** @class */ (function () { | ||
@@ -13,5 +11,13 @@ function ScrollHelper() { | ||
if (val === null) { | ||
return win ? ('pageYOffset' in win) ? win.pageYOffset : | ||
win.document.documentElement['scrollTop'] : | ||
elem['scrollTop']; | ||
if (win) { | ||
if ('pageYOffset' in win) { | ||
return win.pageYOffset; | ||
} | ||
else { | ||
return win.document.documentElement['scrollTop']; | ||
} | ||
} | ||
else { | ||
return elem['scrollTop']; | ||
} | ||
} | ||
@@ -21,6 +27,6 @@ if (win) { | ||
//!top ? val : jQuery(win).scrollLeft(), | ||
0, top ? val : this.scrollTop(win)); | ||
0, val); | ||
} | ||
else { | ||
elem.pageYOffset = val; | ||
elem.scrollTop = val; | ||
} | ||
@@ -40,3 +46,3 @@ }; | ||
}()); | ||
exports.ScrollHelper = ScrollHelper; | ||
export { ScrollHelper }; | ||
//# sourceMappingURL=scrollHelper.js.map |
@@ -1,7 +0,2 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./public-api")); | ||
export * from './public-api'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "nk-controls", | ||
"version": "2.1.9", | ||
"version": "2.1.10", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "angular5 web controls dropDownList ribbon", |
@@ -1,9 +0,4 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./core")); | ||
__export(require("./select")); | ||
__export(require("./ribbon")); | ||
export * from './core'; | ||
export * from './select'; | ||
export * from './ribbon'; | ||
//# sourceMappingURL=public-api.js.map |
@@ -1,7 +0,2 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./public-api")); | ||
export * from './public-api'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=iRibbonOrderService.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=iRibbonService.js.map |
@@ -1,21 +0,10 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var nkRibbon_baseSelector_1 = require("./nkRibbon.baseSelector"); | ||
exports.NkRibbonBaseSelector = nkRibbon_baseSelector_1.NkRibbonBaseSelector; | ||
var nkRibbon_data_1 = require("./nkRibbon.data"); | ||
exports.NkRibbonData = nkRibbon_data_1.NkRibbonData; | ||
var nkRibbon_events_1 = require("./nkRibbon.events"); | ||
exports.NkRibbonEvents = nkRibbon_events_1.NkRibbonEvents; | ||
var nkRibbon_item_1 = require("./nkRibbon.item"); | ||
exports.NkRibbonItem = nkRibbon_item_1.NkRibbonItem; | ||
var nkRibbon_options_1 = require("./nkRibbon.options"); | ||
exports.NkRibbonOptions = nkRibbon_options_1.NkRibbonOptions; | ||
var nkRibbon_order_1 = require("./nkRibbon.order"); | ||
exports.NkRibbonOrder = nkRibbon_order_1.NkRibbonOrder; | ||
var nkRibbon_params_1 = require("./nkRibbon.params"); | ||
exports.NkRibbonParams = nkRibbon_params_1.NkRibbonParams; | ||
var nkRibbon_service_1 = require("./nkRibbon.service"); | ||
exports.NkRibbonService = nkRibbon_service_1.NkRibbonService; | ||
var nkRibbon_sortItem_1 = require("./nkRibbon.sortItem"); | ||
exports.NkRibbonSortItem = nkRibbon_sortItem_1.NkRibbonSortItem; | ||
export { NkRibbonBaseSelector } from './nkRibbon.baseSelector'; | ||
export { NkRibbonData } from './nkRibbon.data'; | ||
export { NkRibbonEvents } from './nkRibbon.events'; | ||
export { NkRibbonItem } from './nkRibbon.item'; | ||
export { NkRibbonOptions } from './nkRibbon.options'; | ||
export { NkRibbonOrder } from './nkRibbon.order'; | ||
export { NkRibbonParams } from './nkRibbon.params'; | ||
export { NkRibbonService } from './nkRibbon.service'; | ||
export { NkRibbonSortItem } from './nkRibbon.sortItem'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkRibbonBaseSelector = /** @class */ (function () { | ||
@@ -8,3 +6,3 @@ function NkRibbonBaseSelector() { | ||
}()); | ||
exports.NkRibbonBaseSelector = NkRibbonBaseSelector; | ||
export { NkRibbonBaseSelector }; | ||
//# sourceMappingURL=nkRibbon.baseSelector.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkRibbonData = /** @class */ (function () { | ||
@@ -24,3 +22,3 @@ function NkRibbonData(count, items) { | ||
}()); | ||
exports.NkRibbonData = NkRibbonData; | ||
export { NkRibbonData }; | ||
//# sourceMappingURL=nkRibbon.data.js.map |
@@ -1,18 +0,16 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
import { EventEmitter } from '@angular/core'; | ||
var NkRibbonEvents = /** @class */ (function () { | ||
function NkRibbonEvents() { | ||
this.onBeforeLoadData = new core_1.EventEmitter(); | ||
this.onAfterLoadData = new core_1.EventEmitter(); | ||
this.onErrorLoadData = new core_1.EventEmitter(); | ||
this.onSearchApply = new core_1.EventEmitter(); | ||
this.onFilterApply = new core_1.EventEmitter(); | ||
this.onOrderApply = new core_1.EventEmitter(); | ||
this.onInitialize = new core_1.EventEmitter(); | ||
this.onScroll = new core_1.EventEmitter(); | ||
this.onBeforeLoadData = new EventEmitter(); | ||
this.onAfterLoadData = new EventEmitter(); | ||
this.onErrorLoadData = new EventEmitter(); | ||
this.onSearchApply = new EventEmitter(); | ||
this.onFilterApply = new EventEmitter(); | ||
this.onOrderApply = new EventEmitter(); | ||
this.onInitialize = new EventEmitter(); | ||
this.onScroll = new EventEmitter(); | ||
} | ||
return NkRibbonEvents; | ||
}()); | ||
exports.NkRibbonEvents = NkRibbonEvents; | ||
export { NkRibbonEvents }; | ||
//# sourceMappingURL=nkRibbon.events.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkRibbonItem = /** @class */ (function () { | ||
@@ -50,3 +48,3 @@ function NkRibbonItem(index) { | ||
}()); | ||
exports.NkRibbonItem = NkRibbonItem; | ||
export { NkRibbonItem }; | ||
//# sourceMappingURL=nkRibbon.item.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkRibbonOptions = /** @class */ (function () { | ||
@@ -79,3 +77,3 @@ function NkRibbonOptions() { | ||
}()); | ||
exports.NkRibbonOptions = NkRibbonOptions; | ||
export { NkRibbonOptions }; | ||
//# sourceMappingURL=nkRibbon.options.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkRibbonOrder = /** @class */ (function () { | ||
@@ -16,3 +14,3 @@ function NkRibbonOrder() { | ||
}()); | ||
exports.NkRibbonOrder = NkRibbonOrder; | ||
export { NkRibbonOrder }; | ||
//# sourceMappingURL=nkRibbon.order.js.map |
@@ -1,2 +0,1 @@ | ||
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
@@ -12,4 +11,3 @@ var extendStatics = Object.setPrototypeOf || | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var nkRibbon_baseSelector_1 = require("./nkRibbon.baseSelector"); | ||
import { NkRibbonBaseSelector } from './nkRibbon.baseSelector'; | ||
var NkRibbonParams = /** @class */ (function (_super) { | ||
@@ -21,4 +19,4 @@ __extends(NkRibbonParams, _super); | ||
return NkRibbonParams; | ||
}(nkRibbon_baseSelector_1.NkRibbonBaseSelector)); | ||
exports.NkRibbonParams = NkRibbonParams; | ||
}(NkRibbonBaseSelector)); | ||
export { NkRibbonParams }; | ||
//# sourceMappingURL=nkRibbon.params.js.map |
@@ -1,4 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var rx_1 = require("rxjs/rx"); | ||
import { Observable } from 'rxjs/rx'; | ||
var NkRibbonService = /** @class */ (function () { | ||
@@ -21,3 +19,3 @@ function NkRibbonService() { | ||
NkRibbonService.prototype.initializeFilter = function (sender) { | ||
return new rx_1.Observable(function (observer) { observer.next(); }); | ||
return new Observable(function (observer) { observer.next(); }); | ||
}; | ||
@@ -34,3 +32,3 @@ ; | ||
}()); | ||
exports.NkRibbonService = NkRibbonService; | ||
export { NkRibbonService }; | ||
//# sourceMappingURL=nkRibbon.service.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkRibbonSortItem = /** @class */ (function () { | ||
@@ -10,3 +8,3 @@ function NkRibbonSortItem(field, rule) { | ||
}()); | ||
exports.NkRibbonSortItem = NkRibbonSortItem; | ||
export { NkRibbonSortItem }; | ||
//# sourceMappingURL=nkRibbon.sortItem.js.map |
@@ -1,32 +0,21 @@ | ||
"use strict"; | ||
// что надо сделать: | ||
//viewControl join viewService | ||
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); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// что надо сделать(режим фиксированной высоты элемента): | ||
// | ||
// что надо сделать(режим динамической высоты элемента): | ||
var core_1 = require("@angular/core"); | ||
var common_1 = require("@angular/common"); | ||
var router_1 = require("@angular/router"); | ||
var http_1 = require("@angular/http"); | ||
var rx_1 = require("rxjs/rx"); | ||
require("rxjs/add/operator/map"); | ||
require("rxjs/add/operator/catch"); | ||
var nkRibbon_options_1 = require("./models/nkRibbon.options"); | ||
var nkRibbon_repeater_1 = require("./nkRibbon.repeater"); | ||
var nkRibbon_events_1 = require("./models/nkRibbon.events"); | ||
var nkRibbon_params_1 = require("./models/nkRibbon.params"); | ||
var nkRibbon_order_1 = require("./models/nkRibbon.order"); | ||
var nkRibbon_service_1 = require("./models/nkRibbon.service"); | ||
var nkRibbon_item_1 = require("./models/nkRibbon.item"); | ||
var objectHelper_1 = require("../core/utils/objectHelper"); | ||
import { Component, Input, ElementRef, ContentChild, Compiler, ViewEncapsulation, ViewContainerRef } from '@angular/core'; | ||
import { Location } from '@angular/common'; | ||
import { DefaultUrlSerializer } from '@angular/router'; | ||
import { Http, URLSearchParams } from '@angular/http'; | ||
import { Observable } from 'rxjs/rx'; | ||
import 'rxjs/add/operator/map'; | ||
import 'rxjs/add/operator/catch'; | ||
import { NkRibbonOptions } from './models/nkRibbon.options'; | ||
import { NkRibbonRepeater } from './nkRibbon.repeater'; | ||
import { NkRibbonEvents } from './models/nkRibbon.events'; | ||
import { NkRibbonParams } from './models/nkRibbon.params'; | ||
import { NkRibbonOrder } from './models/nkRibbon.order'; | ||
import { NkRibbonService } from './models/nkRibbon.service'; | ||
import { NkRibbonItem } from './models/nkRibbon.item'; | ||
import { ObjectHelper } from '../core/utils/objectHelper'; | ||
var NkRibbon = /** @class */ (function () { | ||
@@ -39,3 +28,3 @@ function NkRibbon(elementRef, http, compiler, vcRef, _location) { | ||
this.name = 'NkRibbon'; | ||
this.objectHelper = new objectHelper_1.ObjectHelper(); | ||
this.objectHelper = new ObjectHelper(); | ||
this._offsetAfter = 0; | ||
@@ -48,4 +37,4 @@ this._offsetBefore = 0; | ||
this._isDynamicSize = false; | ||
this._URLSearchParams = new http_1.URLSearchParams(); | ||
this._ribbonRepeater = new nkRibbon_repeater_1.NkRibbonRepeater(); | ||
this._URLSearchParams = new URLSearchParams(); | ||
this._ribbonRepeater = new NkRibbonRepeater(); | ||
this._after = 0; | ||
@@ -57,6 +46,6 @@ this._before = 0; | ||
this._filter = {}; | ||
this._ribbonService = new nkRibbon_service_1.NkRibbonService(); | ||
this._events = new nkRibbon_events_1.NkRibbonEvents(); | ||
this._options = new nkRibbon_options_1.NkRibbonOptions(); | ||
this._orderBy = new nkRibbon_order_1.NkRibbonOrder(); | ||
this._ribbonService = new NkRibbonService(); | ||
this._events = new NkRibbonEvents(); | ||
this._options = new NkRibbonOptions(); | ||
this._orderBy = new NkRibbonOrder(); | ||
this._origin = elementRef.nativeElement; | ||
@@ -208,3 +197,3 @@ this._watchSettings = { | ||
if (than.busy) { | ||
return new rx_1.Observable(function (observer) { }); | ||
return new Observable(function (observer) { }); | ||
} | ||
@@ -218,3 +207,3 @@ than.busy = true; | ||
var options = than.getRouteOptions().requestOptions; | ||
var observed = new rx_1.Observable(function (observer) { | ||
var observed = new Observable(function (observer) { | ||
than.getFirstData(options).subscribe(function () { | ||
@@ -237,10 +226,10 @@ if (before > 0) { | ||
if (that.busy) { | ||
return new rx_1.Observable(function (observer) { }); | ||
return new Observable(function (observer) { }); | ||
} | ||
if (that._after >= that._totalCount || that.originalCollection.length == that._totalCount) { | ||
return new rx_1.Observable(function (observer) { }); | ||
return new Observable(function (observer) { }); | ||
} | ||
that.busy = true; | ||
var callOptions = that.getRouteOptions().requestOptions; | ||
var observed = new rx_1.Observable(function (observer) { | ||
var observed = new Observable(function (observer) { | ||
that.getNextData(callOptions).subscribe(function () { | ||
@@ -261,6 +250,6 @@ that._ribbonRepeater.totalCount = that.totalCount; | ||
if (that.busy) { | ||
return new rx_1.Observable(function (observer) { }); | ||
return new Observable(function (observer) { }); | ||
} | ||
if (that._before <= 0) { | ||
return new rx_1.Observable(function (observer) { }); | ||
return new Observable(function (observer) { }); | ||
} | ||
@@ -271,3 +260,3 @@ that.busy = true; | ||
callOptions.offset = callOptions.offset - that.options.pageSize; | ||
var observed = new rx_1.Observable(function (observer) { | ||
var observed = new Observable(function (observer) { | ||
that.getPreviosData(callOptions).subscribe(function () { | ||
@@ -310,3 +299,3 @@ that._before = callOptions.offset; | ||
that.events.onBeforeLoadData.emit({ that: that, options: options }); | ||
var observed = new rx_1.Observable(function (observer) { | ||
var observed = new Observable(function (observer) { | ||
_this._loadItems(options).subscribe(function (response) { | ||
@@ -316,3 +305,3 @@ that.totalCount = response.totalCount; | ||
response.items.forEach(function (item, index) { | ||
var ribbonItem = new nkRibbon_item_1.NkRibbonItem(options.offset + index); | ||
var ribbonItem = new NkRibbonItem(options.offset + index); | ||
that.objectHelper.extend(ribbonItem, item); | ||
@@ -341,7 +330,7 @@ that.originalCollection.push(ribbonItem); | ||
that.events.onBeforeLoadData.emit({ that: that, options: options }); | ||
var observed = new rx_1.Observable(function (observer) { | ||
var observed = new Observable(function (observer) { | ||
_this._loadItems(options).subscribe(function (response) { | ||
_this._totalCount = response.totalCount; | ||
response.items.forEach(function (item, index) { | ||
var ribbonItem = new nkRibbon_item_1.NkRibbonItem(that._after + index); | ||
var ribbonItem = new NkRibbonItem(that._after + index); | ||
that.objectHelper.extend(ribbonItem, item); | ||
@@ -373,7 +362,7 @@ that.originalCollection.push(ribbonItem); | ||
that.events.onBeforeLoadData.emit({ that: that, options: options }); | ||
var observed = new rx_1.Observable(function (observer) { | ||
var observed = new Observable(function (observer) { | ||
that._loadItems(options).subscribe(function (response) { | ||
that.totalCount = response.totalCount; | ||
response.items.reverse().forEach(function (item, index) { | ||
var itemNew = new nkRibbon_item_1.NkRibbonItem(options.offset + that.options.pageSize - index - 1); | ||
var itemNew = new NkRibbonItem(options.offset + that.options.pageSize - index - 1); | ||
that.originalCollection.unshift(itemNew); | ||
@@ -401,3 +390,3 @@ that.objectHelper.extend(itemNew, item); | ||
} | ||
var params = new nkRibbon_params_1.NkRibbonParams(); | ||
var params = new NkRibbonParams(); | ||
params.offset = _offset; | ||
@@ -417,3 +406,3 @@ params.count = this._options.pageSize; | ||
var offset = this._calculateOffsetForRoute(); | ||
var params = new nkRibbon_params_1.NkRibbonParams(); | ||
var params = new NkRibbonParams(); | ||
params.offset = offset; | ||
@@ -438,3 +427,3 @@ params.search = this.textSearch || ''; | ||
} | ||
})[0] || new nkRibbon_item_1.NkRibbonItem(0); | ||
})[0] || new NkRibbonItem(0); | ||
return firstVisibleItem.index || 0; | ||
@@ -477,3 +466,3 @@ }; | ||
var path = this._location.path(); | ||
var routeParams = new router_1.DefaultUrlSerializer().parse(path).queryParams; | ||
var routeParams = new DefaultUrlSerializer().parse(path).queryParams; | ||
return routeParams; | ||
@@ -490,3 +479,3 @@ }; | ||
var _this = this; | ||
var observed = new rx_1.Observable(function (observer) { | ||
var observed = new Observable(function (observer) { | ||
if (_this.ribbonService != null) { | ||
@@ -694,3 +683,3 @@ _this.ribbonService.initializeFilter(_this).subscribe(function (value) { | ||
var path = this._location.path(); | ||
var urlSerializer = new router_1.DefaultUrlSerializer(); | ||
var urlSerializer = new DefaultUrlSerializer(); | ||
var urlParsed = urlSerializer.parse(path); | ||
@@ -799,3 +788,3 @@ this.objectHelper.extend(urlParsed.queryParams, newParams); | ||
NkRibbon.prototype.initializeRepeater = function () { | ||
this._ribbonRepeater = new nkRibbon_repeater_1.NkRibbonRepeater(this.origin.firstChild, this.options); | ||
this._ribbonRepeater = new NkRibbonRepeater(this.origin.firstChild, this.options); | ||
this._ribbonRepeater.buildRepeatContainer(); | ||
@@ -809,3 +798,3 @@ var offset = 0; | ||
this._ribbonRepeater.scrolledToEnd = function () { | ||
return new rx_1.Observable(function (observer) { | ||
return new Observable(function (observer) { | ||
than.nextPage().subscribe(function () { observer.next(); }); | ||
@@ -815,3 +804,3 @@ }); | ||
this._ribbonRepeater.scrolledToStart = function () { | ||
return new rx_1.Observable(function (observer) { | ||
return new Observable(function (observer) { | ||
than.previosPage().subscribe(function () { observer.next(); }); | ||
@@ -824,76 +813,42 @@ }); | ||
}; | ||
__decorate([ | ||
core_1.ContentChild('ribbonItemTemplate'), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], NkRibbon.prototype, "itemRibbonTemplate", void 0); | ||
__decorate([ | ||
core_1.ContentChild('ribbonLoader'), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], NkRibbon.prototype, "ribbonLoaderTemplate", void 0); | ||
__decorate([ | ||
core_1.ContentChild('ribbonNoData'), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], NkRibbon.prototype, "ribbonNoDataTemplate", void 0); | ||
__decorate([ | ||
core_1.ContentChild('ribbonError'), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], NkRibbon.prototype, "ribbonErrorTemplate", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonRepeatContainerSelector'), | ||
__metadata("design:type", String) | ||
], NkRibbon.prototype, "_repeatContainerSelector", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonOffsetAfter'), | ||
__metadata("design:type", Number) | ||
], NkRibbon.prototype, "_offsetAfter", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonOffsetBefore'), | ||
__metadata("design:type", Number) | ||
], NkRibbon.prototype, "_offsetBefore", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonDataSource'), | ||
__metadata("design:type", Function) | ||
], NkRibbon.prototype, "_loadItems", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonScrolledToEndOffset'), | ||
__metadata("design:type", Number) | ||
], NkRibbon.prototype, "_scrolledToEndOffset", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonScrolledToStartOffset'), | ||
__metadata("design:type", Number) | ||
], NkRibbon.prototype, "_scrolledToStartOffset", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonPageSize'), | ||
__metadata("design:type", Number) | ||
], NkRibbon.prototype, "_pageSize", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonDisableSupportBrowserLine'), | ||
__metadata("design:type", Boolean) | ||
], NkRibbon.prototype, "_isDisableSupportBrowserLine", void 0); | ||
__decorate([ | ||
core_1.Input('nkRibbonDynamicSize'), | ||
__metadata("design:type", Boolean) | ||
], NkRibbon.prototype, "_isDynamicSize", void 0); | ||
NkRibbon = __decorate([ | ||
core_1.Component({ | ||
selector: 'nk-ribbon', | ||
encapsulation: core_1.ViewEncapsulation.None, | ||
templateUrl: './nkRibbon.html', | ||
styleUrls: ['./nkRibbon.css'], | ||
host: { | ||
'[class.nk-ribbon-pending]': 'busy', | ||
'[class.nk-ribbon-hidden]': '!isReady', | ||
'class': 'nk-ribbon-control', | ||
}, | ||
exportAs: 'nkRibbon' | ||
}), | ||
__metadata("design:paramtypes", [core_1.ElementRef, | ||
http_1.Http, | ||
core_1.Compiler, | ||
core_1.ViewContainerRef, | ||
common_1.Location]) | ||
], NkRibbon); | ||
NkRibbon.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'nk-ribbon', | ||
encapsulation: ViewEncapsulation.None, | ||
template: "<div class=\"nk-repeater-container\"><div class=\"nk-repeat-before-content\"><div class=\"js-ribbon-error-result\" [hidden]=\"!instance.isVisibleErrorResult()\"><div *ngIf=\"!ribbonErrorTemplate\">Data Error</div><ng-template [ngTemplateOutlet]=\"ribbonErrorTemplate\"></ng-template></div><div class=\"js-ribbon-before-progress-bar\" [hidden]=\"!instance.isVisibleBeforeProgressBar()\"><div *ngIf=\"!ribbonLoaderTemplate\">Loading data ...</div><ng-template [ngTemplateOutlet]=\"ribbonLoaderTemplate\"></ng-template></div></div><div nk-ribbon-item [ribbon]=\"instance\" *ngFor=\"let item of instance.repeater.$vsCollection; let last = last\" [readyNgFor]=\"last\" [data]=\"item\"><ng-template [ngTemplateOutlet]=\"itemRibbonTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-template></div><div class=\"nk-repeat-after-content\"><div class=\"js-ribbon-after-progress-bar\" [hidden]=\"!instance.isVisibleAfterProgressBar()\"><div *ngIf=\"!ribbonLoaderTemplate\">Loading data ...</div><ng-template [ngTemplateOutlet]=\"ribbonLoaderTemplate\"></ng-template></div><div class=\"js-ribbon-noresult\" [hidden]=\"!instance.isVisibleNoresult()\"><div *ngIf=\"!ribbonNoDataTemplate\">No Data</div><ng-template [ngTemplateOutlet]=\"ribbonNoDataTemplate\"></ng-template></div></div></div>", | ||
styles: [".nk-ribbon-control{display:block;opacity:1;-webkit-transition:opacity .5s ease-in;transition:opacity .5s ease-in}.nk-repeater-container{display:block}.nk-ribbon-hidden{opacity:0}"], | ||
host: { | ||
'[class.nk-ribbon-pending]': 'busy', | ||
'[class.nk-ribbon-hidden]': '!isReady', | ||
'class': 'nk-ribbon-control', | ||
}, | ||
exportAs: 'nkRibbon' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NkRibbon.ctorParameters = function () { return [ | ||
{ type: ElementRef, }, | ||
{ type: Http, }, | ||
{ type: Compiler, }, | ||
{ type: ViewContainerRef, }, | ||
{ type: Location, }, | ||
]; }; | ||
NkRibbon.propDecorators = { | ||
'itemRibbonTemplate': [{ type: ContentChild, args: ['ribbonItemTemplate',] },], | ||
'ribbonLoaderTemplate': [{ type: ContentChild, args: ['ribbonLoader',] },], | ||
'ribbonNoDataTemplate': [{ type: ContentChild, args: ['ribbonNoData',] },], | ||
'ribbonErrorTemplate': [{ type: ContentChild, args: ['ribbonError',] },], | ||
'_repeatContainerSelector': [{ type: Input, args: ['nkRibbonRepeatContainerSelector',] },], | ||
'_offsetAfter': [{ type: Input, args: ['nkRibbonOffsetAfter',] },], | ||
'_offsetBefore': [{ type: Input, args: ['nkRibbonOffsetBefore',] },], | ||
'_loadItems': [{ type: Input, args: ['nkRibbonDataSource',] },], | ||
'_scrolledToEndOffset': [{ type: Input, args: ['nkRibbonScrolledToEndOffset',] },], | ||
'_scrolledToStartOffset': [{ type: Input, args: ['nkRibbonScrolledToStartOffset',] },], | ||
'_pageSize': [{ type: Input, args: ['nkRibbonPageSize',] },], | ||
'_isDisableSupportBrowserLine': [{ type: Input, args: ['nkRibbonDisableSupportBrowserLine',] },], | ||
'_isDynamicSize': [{ type: Input, args: ['nkRibbonDynamicSize',] },], | ||
}; | ||
return NkRibbon; | ||
}()); | ||
exports.NkRibbon = NkRibbon; | ||
export { NkRibbon }; | ||
//# sourceMappingURL=nkRibbon.component.js.map |
@@ -1,15 +0,2 @@ | ||
"use strict"; | ||
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); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
var nkRibbon_component_1 = require("./nkRibbon.component"); | ||
var nkRibbon_item_1 = require("./models/nkRibbon.item"); | ||
import { Directive, Input, ElementRef } from '@angular/core'; | ||
var NkRibbonItemElement = /** @class */ (function () { | ||
@@ -66,27 +53,20 @@ function NkRibbonItemElement(elementRef) { | ||
}; | ||
__decorate([ | ||
core_1.Input('readyNgFor'), | ||
__metadata("design:type", Boolean), | ||
__metadata("design:paramtypes", [Boolean]) | ||
], NkRibbonItemElement.prototype, "readyNgFor", null); | ||
__decorate([ | ||
core_1.Input('ribbon'), | ||
__metadata("design:type", nkRibbon_component_1.NkRibbon), | ||
__metadata("design:paramtypes", [nkRibbon_component_1.NkRibbon]) | ||
], NkRibbonItemElement.prototype, "ribbon", null); | ||
__decorate([ | ||
core_1.Input('data'), | ||
__metadata("design:type", nkRibbon_item_1.NkRibbonItem), | ||
__metadata("design:paramtypes", [nkRibbon_item_1.NkRibbonItem]) | ||
], NkRibbonItemElement.prototype, "data", null); | ||
NkRibbonItemElement = __decorate([ | ||
core_1.Directive({ | ||
selector: '[nk-ribbon-item]', | ||
exportAs: 'nkRibbonItem', | ||
}), | ||
__metadata("design:paramtypes", [core_1.ElementRef]) | ||
], NkRibbonItemElement); | ||
NkRibbonItemElement.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[nk-ribbon-item]', | ||
exportAs: 'nkRibbonItem', | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NkRibbonItemElement.ctorParameters = function () { return [ | ||
{ type: ElementRef, }, | ||
]; }; | ||
NkRibbonItemElement.propDecorators = { | ||
'readyNgFor': [{ type: Input, args: ['readyNgFor',] },], | ||
'ribbon': [{ type: Input, args: ['ribbon',] },], | ||
'data': [{ type: Input, args: ['data',] },], | ||
}; | ||
return NkRibbonItemElement; | ||
}()); | ||
exports.NkRibbonItemElement = NkRibbonItemElement; | ||
export { NkRibbonItemElement }; | ||
//# sourceMappingURL=nkRibbon.item.directive.js.map |
@@ -1,30 +0,21 @@ | ||
"use strict"; | ||
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; | ||
}; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var nkRibbon_component_1 = require("./nkRibbon.component"); | ||
var nkRibbon_item_directive_1 = require("./nkRibbon.item.directive"); | ||
var common_1 = require("@angular/common"); | ||
var core_1 = require("@angular/core"); | ||
import { NkRibbon } from './nkRibbon.component'; | ||
import { NkRibbonItemElement } from './nkRibbon.item.directive'; | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
var NkRibbonModule = /** @class */ (function () { | ||
function NkRibbonModule() { | ||
} | ||
NkRibbonModule = __decorate([ | ||
core_1.NgModule({ | ||
imports: [common_1.CommonModule], | ||
exports: [nkRibbon_component_1.NkRibbon, nkRibbon_item_directive_1.NkRibbonItemElement], | ||
declarations: [nkRibbon_component_1.NkRibbon, nkRibbon_item_directive_1.NkRibbonItemElement] | ||
}) | ||
], NkRibbonModule); | ||
NkRibbonModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
imports: [CommonModule], | ||
exports: [NkRibbon, NkRibbonItemElement], | ||
declarations: [NkRibbon, NkRibbonItemElement] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NkRibbonModule.ctorParameters = function () { return []; }; | ||
return NkRibbonModule; | ||
}()); | ||
exports.NkRibbonModule = NkRibbonModule; | ||
__export(require("./nkRibbon.component")); | ||
export { NkRibbonModule }; | ||
export * from './nkRibbon.component'; | ||
//# sourceMappingURL=nkRibbon.module.js.map |
@@ -1,5 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var scrollHelper_1 = require("../core/utils/scrollHelper"); | ||
var core_1 = require("@angular/core"); | ||
import { ScrollHelper } from '../core/utils/scrollHelper'; | ||
import { EventEmitter } from '@angular/core'; | ||
var NkRibbonRepeater = /** @class */ (function () { | ||
@@ -14,3 +12,3 @@ function NkRibbonRepeater(repeatContainer, options) { | ||
this._beforeLoaderHeight = 0; | ||
this.scrollHelper = new scrollHelper_1.ScrollHelper(); | ||
this.scrollHelper = new ScrollHelper(); | ||
this._sizesCumulative = []; | ||
@@ -25,3 +23,3 @@ this._defaultElementSize = 0; | ||
this._oldOriginalCount = 0; | ||
this.onScrolling = new core_1.EventEmitter(); | ||
this.onScrolling = new EventEmitter(); | ||
this.$scrollPosition = 0; | ||
@@ -481,3 +479,3 @@ this._repeatContainer = repeatContainer; | ||
}()); | ||
exports.NkRibbonRepeater = NkRibbonRepeater; | ||
export { NkRibbonRepeater }; | ||
//# sourceMappingURL=nkRibbon.repeater.js.map |
@@ -1,15 +0,6 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./models")); | ||
var nkRibbon_component_1 = require("./nkRibbon.component"); | ||
exports.NkRibbon = nkRibbon_component_1.NkRibbon; | ||
var nkRibbon_item_directive_1 = require("./nkRibbon.item.directive"); | ||
exports.NkRibbonItemElement = nkRibbon_item_directive_1.NkRibbonItemElement; | ||
var nkRibbon_module_1 = require("./nkRibbon.module"); | ||
exports.NkRibbonModule = nkRibbon_module_1.NkRibbonModule; | ||
var nkRibbon_repeater_1 = require("./nkRibbon.repeater"); | ||
exports.NkRibbonRepeater = nkRibbon_repeater_1.NkRibbonRepeater; | ||
export * from './models'; | ||
export { NkRibbon } from './nkRibbon.component'; | ||
export { NkRibbonItemElement } from './nkRibbon.item.directive'; | ||
export { NkRibbonModule } from './nkRibbon.module'; | ||
export { NkRibbonRepeater } from './nkRibbon.repeater'; | ||
//# sourceMappingURL=public-api.js.map |
@@ -1,7 +0,2 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./public-api")); | ||
export * from './public-api'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,4 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var animations_1 = require("@angular/animations"); | ||
import { animate, state, style, transition, trigger, } from '@angular/animations'; | ||
/** | ||
@@ -15,4 +13,4 @@ * The following are all the animations for the md-select component, with each | ||
*/ | ||
exports.transformPlaceholder = animations_1.trigger('transformPlaceholder', [ | ||
animations_1.state('floating-ltr', animations_1.style({ | ||
export var transformPlaceholder = trigger('transformPlaceholder', [ | ||
state('floating-ltr', style({ | ||
top: '-22px', | ||
@@ -22,3 +20,3 @@ left: '-2px', | ||
})), | ||
animations_1.state('floating-rtl', animations_1.style({ | ||
state('floating-rtl', style({ | ||
top: '-22px', | ||
@@ -28,3 +26,3 @@ left: '2px', | ||
})), | ||
animations_1.transition('* => *', animations_1.animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')) | ||
transition('* => *', animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)')) | ||
]); | ||
@@ -40,4 +38,4 @@ /** | ||
*/ | ||
exports.transformMenu = animations_1.trigger('transformMenu', [ | ||
animations_1.state('showing', animations_1.style({ | ||
export var transformMenu = trigger('transformMenu', [ | ||
state('showing', style({ | ||
opacity: 1, | ||
@@ -47,3 +45,3 @@ minWidth: 'calc(100%)', | ||
})), | ||
animations_1.state('showing-multiple', animations_1.style({ | ||
state('showing-multiple', style({ | ||
opacity: 1, | ||
@@ -53,4 +51,4 @@ minWidth: 'calc(100% + 64px)', | ||
})), | ||
animations_1.transition('void => *', [ | ||
animations_1.style({ | ||
transition('void => *', [ | ||
style({ | ||
opacity: 0, | ||
@@ -60,6 +58,6 @@ minWidth: '100%', | ||
}), | ||
animations_1.animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)') | ||
animate('150ms cubic-bezier(0.25, 0.8, 0.25, 1)') | ||
]), | ||
animations_1.transition('* => void', [ | ||
animations_1.animate('250ms 100ms linear', animations_1.style({ opacity: 0 })) | ||
transition('* => void', [ | ||
animate('250ms 100ms linear', style({ opacity: 0 })) | ||
]) | ||
@@ -72,9 +70,9 @@ ]); | ||
*/ | ||
exports.fadeInContent = animations_1.trigger('fadeInContent', [ | ||
animations_1.state('showing', animations_1.style({ opacity: 1 })), | ||
animations_1.transition('void => showing', [ | ||
animations_1.style({ opacity: 0 }), | ||
animations_1.animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)') | ||
export var fadeInContent = trigger('fadeInContent', [ | ||
state('showing', style({ opacity: 1 })), | ||
transition('void => showing', [ | ||
style({ opacity: 0 }), | ||
animate('150ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)') | ||
]) | ||
]); | ||
//# sourceMappingURL=nkSelect.animation.js.map |
@@ -1,24 +0,10 @@ | ||
"use strict"; | ||
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 __param = (this && this.__param) || function (paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
var keyCodes_1 = require("../core/keyCodes"); | ||
var http_1 = require("@angular/http"); | ||
var rx_1 = require("rxjs/rx"); | ||
require("rxjs/add/operator/map"); | ||
require("rxjs/add/operator/catch"); | ||
var forms_1 = require("@angular/forms"); | ||
var nkSelect_animation_1 = require("./nkSelect.animation"); | ||
var NkSelect_Options_1 = require("./NkSelect.Options"); | ||
import { Component, Optional, Input, Output, EventEmitter, ElementRef, Renderer2, Self, ChangeDetectorRef, Attribute, ContentChild, TemplateRef, ViewEncapsulation } from '@angular/core'; | ||
import { DOWN_ARROW, END, ENTER, HOME, SPACE, UP_ARROW, ESCAPE } from '../core/keyCodes'; | ||
import { Http } from '@angular/http'; | ||
import { Observable } from 'rxjs/rx'; | ||
import 'rxjs/add/operator/map'; | ||
import 'rxjs/add/operator/catch'; | ||
import { NgControl, NgModel, Validators } from '@angular/forms'; | ||
import { transformPlaceholder, transformMenu, fadeInContent } from './nkSelect.animation'; | ||
import { NkSelectOptions } from './NkSelect.Options'; | ||
var NkSelect = /** @class */ (function () { | ||
@@ -40,8 +26,8 @@ function NkSelect(_changeDetectorRef, ngModel, renderer, elementRef, _control, tabIndex, required, http) { | ||
//events | ||
this.onSelectItem = new core_1.EventEmitter(); | ||
this.onStartLoadData = new core_1.EventEmitter(); | ||
this.onEndLoadData = new core_1.EventEmitter(); | ||
this.onOpen = new core_1.EventEmitter(); | ||
this.onClose = new core_1.EventEmitter(); | ||
this.onChange = new core_1.EventEmitter(); | ||
this.onSelectItem = new EventEmitter(); | ||
this.onStartLoadData = new EventEmitter(); | ||
this.onEndLoadData = new EventEmitter(); | ||
this.onOpen = new EventEmitter(); | ||
this.onClose = new EventEmitter(); | ||
this.onChange = new EventEmitter(); | ||
this._required = false; | ||
@@ -65,3 +51,3 @@ this._disabled = false; | ||
this._isOpen = false; | ||
this._options = new NkSelect_Options_1.NkSelectOptions(); | ||
this._options = new NkSelectOptions(); | ||
if (this._control) { | ||
@@ -180,2 +166,3 @@ this._control.valueAccessor = this; | ||
_this._isOpen = true; | ||
_this._setItemViewElementAsActive(); | ||
_this._menuDoneAnimating = false; | ||
@@ -194,3 +181,3 @@ }); | ||
var _this = this; | ||
return new rx_1.Observable(function (observer) { | ||
return new Observable(function (observer) { | ||
_this._getData().subscribe(function () { | ||
@@ -251,3 +238,3 @@ observer.next(); | ||
if (this.isOpen) { | ||
this._setItemViewElementAsActive(); | ||
this._setScrollViewForselectedItem(); | ||
this._setInputFilterInFocus(); | ||
@@ -272,3 +259,3 @@ this.onOpen.emit({ eventSource: this }); | ||
} | ||
return new rx_1.Observable(function (observer) { | ||
return new Observable(function (observer) { | ||
_this._addEmptyValueByRequiredAttribute(); | ||
@@ -284,3 +271,3 @@ _this.onEndLoadData.emit({ eventSource: _this }); | ||
this.isPending = true; | ||
var data = new rx_1.Observable(function (observer) { | ||
var data = new Observable(function (observer) { | ||
_this._request = _this.http.get(_this._options.remoteDataSource, { search: _this._searchParams.toString() }) | ||
@@ -295,3 +282,3 @@ .map(function (res) { | ||
_this._request = null; | ||
return rx_1.Observable.throw(error.json().error || 'Server error'); | ||
return Observable.throw(error.json().error || 'Server error'); | ||
}) | ||
@@ -402,3 +389,3 @@ .subscribe(function (response) { | ||
if (this._required) { | ||
this.ngModel.control.setValidators([forms_1.Validators.required]); | ||
this.ngModel.control.setValidators([Validators.required]); | ||
} | ||
@@ -416,3 +403,3 @@ else { | ||
if (this._required) { | ||
this.ngModel.control.setValidators([forms_1.Validators.required]); | ||
this.ngModel.control.setValidators([Validators.required]); | ||
} | ||
@@ -436,6 +423,13 @@ } | ||
if (resultItem) { | ||
resultItem.element.select(); | ||
//resultItem.element.select(); | ||
resultItem.selected = true; | ||
} | ||
} | ||
}; | ||
NkSelect.prototype._setScrollViewForselectedItem = function () { | ||
var resultItem = this._items.filter(function (item) { return item.selected; })[0]; | ||
if (resultItem) { | ||
resultItem.element.select(); | ||
} | ||
}; | ||
NkSelect.prototype._setInputFilterInFocus = function () { | ||
@@ -453,4 +447,4 @@ if (this._isFilter) { | ||
var keyCode = event.keyCode; | ||
var isArrowKey = keyCode === keyCodes_1.DOWN_ARROW || keyCode === keyCodes_1.UP_ARROW; | ||
var isOpenKey = keyCode === keyCodes_1.ENTER || keyCode === keyCodes_1.SPACE; | ||
var isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW; | ||
var isOpenKey = keyCode === ENTER || keyCode === SPACE; | ||
if (isOpenKey || isArrowKey) { | ||
@@ -463,7 +457,7 @@ event.preventDefault(); | ||
var keyCode = event.keyCode; | ||
var isArrowKey = keyCode === keyCodes_1.DOWN_ARROW || keyCode === keyCodes_1.UP_ARROW; | ||
var isCloseKey = keyCode === keyCodes_1.ESCAPE; | ||
var isSelectKey = keyCode === keyCodes_1.ENTER || keyCode === keyCodes_1.SPACE; | ||
var isFirstItem = keyCode === keyCodes_1.HOME; | ||
var isLastItem = keyCode === keyCodes_1.END; | ||
var isArrowKey = keyCode === DOWN_ARROW || keyCode === UP_ARROW; | ||
var isCloseKey = keyCode === ESCAPE; | ||
var isSelectKey = keyCode === ENTER || keyCode === SPACE; | ||
var isFirstItem = keyCode === HOME; | ||
var isLastItem = keyCode === END; | ||
if (isCloseKey) { | ||
@@ -475,7 +469,7 @@ this.close(); | ||
} | ||
else if (keyCode === keyCodes_1.HOME) { | ||
else if (keyCode === HOME) { | ||
event.preventDefault(); | ||
this._setFirstItemActive(); | ||
} | ||
else if (keyCode === keyCodes_1.END) { | ||
else if (keyCode === END) { | ||
event.preventDefault(); | ||
@@ -493,6 +487,6 @@ this._setLastItemActive(); | ||
switch (event.keyCode) { | ||
case keyCodes_1.DOWN_ARROW: | ||
case DOWN_ARROW: | ||
this._setNextItemActive(); | ||
break; | ||
case keyCodes_1.UP_ARROW: | ||
case UP_ARROW: | ||
this._setPreviousItemActive(); | ||
@@ -546,112 +540,61 @@ break; | ||
}; | ||
__decorate([ | ||
core_1.ContentChild(core_1.TemplateRef), | ||
__metadata("design:type", core_1.TemplateRef) | ||
], NkSelect.prototype, "itemTemplate", void 0); | ||
__decorate([ | ||
core_1.Input('appendTo'), | ||
__metadata("design:type", String) | ||
], NkSelect.prototype, "_appendTo", void 0); | ||
__decorate([ | ||
core_1.Input('themeClassMenu'), | ||
__metadata("design:type", String) | ||
], NkSelect.prototype, "_themeClassMenu", void 0); | ||
__decorate([ | ||
core_1.Input('nkSelectRemoteDataSource'), | ||
__metadata("design:type", String) | ||
], NkSelect.prototype, "_remoteDataSource", void 0); | ||
__decorate([ | ||
core_1.Input('nkSelectPrimaryKey'), | ||
__metadata("design:type", String) | ||
], NkSelect.prototype, "_primaryKey", void 0); | ||
__decorate([ | ||
core_1.Input('nkSelectViewValue'), | ||
__metadata("design:type", Object) | ||
], NkSelect.prototype, "_viewValueInitialize", void 0); | ||
__decorate([ | ||
core_1.Input('nkSelectFilterBy'), | ||
__metadata("design:type", String) | ||
], NkSelect.prototype, "_filterBy", void 0); | ||
__decorate([ | ||
core_1.Input('nkSelectDataBindingMode'), | ||
__metadata("design:type", String) | ||
], NkSelect.prototype, "_dataBindingMode", void 0); | ||
__decorate([ | ||
core_1.Input('nkSelectCache'), | ||
__metadata("design:type", Boolean) | ||
], NkSelect.prototype, "_isCache", void 0); | ||
__decorate([ | ||
core_1.Input('width'), | ||
__metadata("design:type", String) | ||
], NkSelect.prototype, "_width", void 0); | ||
__decorate([ | ||
core_1.Output('nkSelectOnSelectItem'), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], NkSelect.prototype, "onSelectItem", void 0); | ||
__decorate([ | ||
core_1.Output('nkSelectOnStartLoadData'), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], NkSelect.prototype, "onStartLoadData", void 0); | ||
__decorate([ | ||
core_1.Output('nkSelectOnEndLoadData'), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], NkSelect.prototype, "onEndLoadData", void 0); | ||
__decorate([ | ||
core_1.Output('nkSelectOnOpen'), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], NkSelect.prototype, "onOpen", void 0); | ||
__decorate([ | ||
core_1.Output('nkSelectOnClose'), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], NkSelect.prototype, "onClose", void 0); | ||
__decorate([ | ||
core_1.Output('nkSelectOnChange'), | ||
__metadata("design:type", core_1.EventEmitter) | ||
], NkSelect.prototype, "onChange", void 0); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Number), | ||
__metadata("design:paramtypes", [Number]) | ||
], NkSelect.prototype, "tabIndex", null); | ||
__decorate([ | ||
core_1.Input(), | ||
__metadata("design:type", Object), | ||
__metadata("design:paramtypes", [Object]) | ||
], NkSelect.prototype, "required", null); | ||
NkSelect = __decorate([ | ||
core_1.Component({ | ||
selector: 'nk-select', | ||
encapsulation: core_1.ViewEncapsulation.None, | ||
templateUrl: './nkSelect.html', | ||
styleUrls: ['./nkSelect.css'], | ||
host: { | ||
'[attr.tabindex]': 'tabIndex', | ||
'[class.nk-select-disabled]': 'disabled', | ||
'[class.nk-select-pending]': 'isPending', | ||
'[class.nk-select-open-menu]': 'isOpen', | ||
'[class.nk-select-close-menu]': '!isOpen', | ||
'class': 'nk-select-control', | ||
'(click)': 'toggle($event)', | ||
'(blur)': 'onBlur()', | ||
'(keydown)': 'handleKeydown($event)' | ||
}, | ||
animations: [ | ||
nkSelect_animation_1.transformPlaceholder, | ||
nkSelect_animation_1.transformMenu, | ||
nkSelect_animation_1.fadeInContent | ||
], | ||
exportAs: 'nkSelect' | ||
}), | ||
__param(4, core_1.Self()), __param(4, core_1.Optional()), | ||
__param(5, core_1.Attribute('tabindex')), | ||
__param(6, core_1.Attribute('required')), | ||
__metadata("design:paramtypes", [core_1.ChangeDetectorRef, | ||
forms_1.NgModel, | ||
core_1.Renderer2, | ||
core_1.ElementRef, | ||
forms_1.NgControl, String, String, http_1.Http]) | ||
], NkSelect); | ||
NkSelect.decorators = [ | ||
{ type: Component, args: [{ | ||
selector: 'nk-select', | ||
encapsulation: ViewEncapsulation.None, | ||
template: "<div class=\"nk-select-view-wrapper\" [style.width]=\"_width\"><div class=\"nk-select-view-selected\" *ngIf=\"_hasSelectedItem()\"><ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{ item: selectedItem }\"></ng-template></div><input class=\"nk-select-filter-input\" *ngIf=\"_isFilter && isOpen\" [value]=\"filterValue\" (input)=\"filterValue=$event.target.value\"/> <span class=\"nk-select-view-default\" *ngIf=\"!_hasSelectedItem()\">{{options.displayTextDefault}}</span> <span class=\"nk-select-arrow\"></span></div><span class=\"nk-select-loading\" *ngIf=\"isPending\">{{options.displayTextForLoading}}</span><ng-template nk-select-menu (backdropClick)=\"close()\" [open]=\"isOpen\" [menuAnimateDone]=\"_menuDoneAnimating\" [appendTo]=\"options.appendTo\" [themeClass]=\"options.themeClassMenu\" [controlElement]=\"_origin\"><div class=\"nk-menu-panel\" [style.transformOrigin]=\"transformOrigin\" [@transformMenu]=\"'showing'\" (@transformMenu.done)=\"onMenuDone()\"><div [@fadeInContent]=\"'showing'\" (@fadeInContent.done)=\"_onFadeInDone()\"><div nk-select-menu-item class=\"nk-menu-item\" *ngFor=\"let item of items | nkSelectFilter : filterBy : filterValue\" (click)=\"selectItem(item);\" [item]=\"item\"><ng-template [ngTemplateOutlet]=\"itemTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-template><div class=\"mat-ripple-element mat-ripple\"></div></div></div></div></ng-template>", | ||
styles: ["@-webkit-keyframes rotate{0%{transform:rotate(0);-o-transform:rotate(0);-moz-transform:rotate(0);-webkit-transform:rotate(0)}to{transform:rotate(360deg);-o-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg)}}@keyframes rotate{0%{transform:rotate(0);-o-transform:rotate(0);-moz-transform:rotate(0);-webkit-transform:rotate(0)}to{transform:rotate(360deg);-o-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg)}}.nk-menu-item:hover,.nk-select-control:focus .nk-select-view-default,.nk-select-control:focus .nk-select-view-selected{color:#673ab7}.nk-select-control{outline-style:none;-webkit-box-shadow:none;box-shadow:none;border-color:transparent;margin:5px;display:-webkit-box;display:-ms-flexbox;display:flex}.nk-select-control:focus .nk-select-view-wrapper{border-color:#673ab7}.nk-select-control.nk-select-menu-self{position:relative}.nk-select-view-wrapper{border:1px solid gray;border-radius:4px;position:relative;cursor:pointer}.nk-select-view-default{display:block}.nk-select-view-default,.nk-select-view-selected{padding:2px 25px 2px 8px;width:100%}.nk-select-arrow,.nk-select-view-selected{display:inline-block}.nk-menu-container{position:absolute;pointer-events:auto;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1000;max-width:280px;-webkit-overflow-scrolling:touch;padding-top:0;padding-bottom:0;max-height:256px;min-width:124.28px}.nk-select-arrow{width:0;height:0;margin:auto 4px;vertical-align:middle;border-left:6px solid transparent;border-right:6px solid transparent;border-top:10px solid;-webkit-transform-origin:6px 3px;transform-origin:6px 3px;position:absolute;top:0;bottom:0;right:4px}.nk-select-pending .nk-select-arrow{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-name:rotate;animation-name:rotate;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}.nk-select-disabled .nk-select-view-wrapper,.nk-select-pending .nk-select-view-default,.nk-select-pending .nk-select-view-selected{opacity:.3;background:#eeeded}.ng-invalid.ng-touched .nk-select-view-wrapper{border:1px solid red}.nk-menu-panel{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);background:#fff;max-height:240px;overflow:auto}.nk-menu-item{cursor:pointer}.nk-select-loading{margin-left:8px}.nk-select-menu-selected{background:rgba(0,0,0,.04)}.nk-select-filter-input{position:absolute;border:0;top:1px;width:100%;padding-right:25px}.nk-select-filter-input:focus{outline:0}"], | ||
host: { | ||
'[attr.tabindex]': 'tabIndex', | ||
'[class.nk-select-disabled]': 'disabled', | ||
'[class.nk-select-pending]': 'isPending', | ||
'[class.nk-select-open-menu]': 'isOpen', | ||
'[class.nk-select-close-menu]': '!isOpen', | ||
'class': 'nk-select-control', | ||
'(click)': 'toggle($event)', | ||
'(blur)': 'onBlur()', | ||
'(keydown)': 'handleKeydown($event)' | ||
}, | ||
animations: [ | ||
transformPlaceholder, | ||
transformMenu, | ||
fadeInContent | ||
], | ||
exportAs: 'nkSelect' | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NkSelect.ctorParameters = function () { return [ | ||
{ type: ChangeDetectorRef, }, | ||
{ type: NgModel, }, | ||
{ type: Renderer2, }, | ||
{ type: ElementRef, }, | ||
{ type: NgControl, decorators: [{ type: Self }, { type: Optional },] }, | ||
{ type: undefined, decorators: [{ type: Attribute, args: ['tabindex',] },] }, | ||
{ type: undefined, decorators: [{ type: Attribute, args: ['required',] },] }, | ||
{ type: Http, }, | ||
]; }; | ||
NkSelect.propDecorators = { | ||
'itemTemplate': [{ type: ContentChild, args: [TemplateRef,] },], | ||
'_appendTo': [{ type: Input, args: ['appendTo',] },], | ||
'_themeClassMenu': [{ type: Input, args: ['themeClassMenu',] },], | ||
'_remoteDataSource': [{ type: Input, args: ['nkSelectRemoteDataSource',] },], | ||
'_primaryKey': [{ type: Input, args: ['nkSelectPrimaryKey',] },], | ||
'_viewValueInitialize': [{ type: Input, args: ['nkSelectViewValue',] },], | ||
'_filterBy': [{ type: Input, args: ['nkSelectFilterBy',] },], | ||
'_dataBindingMode': [{ type: Input, args: ['nkSelectDataBindingMode',] },], | ||
'_isCache': [{ type: Input, args: ['nkSelectCache',] },], | ||
'_width': [{ type: Input, args: ['width',] },], | ||
'onSelectItem': [{ type: Output, args: ['nkSelectOnSelectItem',] },], | ||
'onStartLoadData': [{ type: Output, args: ['nkSelectOnStartLoadData',] },], | ||
'onEndLoadData': [{ type: Output, args: ['nkSelectOnEndLoadData',] },], | ||
'onOpen': [{ type: Output, args: ['nkSelectOnOpen',] },], | ||
'onClose': [{ type: Output, args: ['nkSelectOnClose',] },], | ||
'onChange': [{ type: Output, args: ['nkSelectOnChange',] },], | ||
'tabIndex': [{ type: Input },], | ||
'required': [{ type: Input },], | ||
}; | ||
return NkSelect; | ||
}()); | ||
exports.NkSelect = NkSelect; | ||
export { NkSelect }; | ||
//# sourceMappingURL=nkSelect.component.js.map |
@@ -1,10 +0,2 @@ | ||
"use strict"; | ||
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; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
import { Pipe, Injectable } from '@angular/core'; | ||
var NkSelectFilter = /** @class */ (function () { | ||
@@ -20,11 +12,13 @@ function NkSelectFilter() { | ||
}; | ||
NkSelectFilter = __decorate([ | ||
core_1.Pipe({ | ||
name: 'nkSelectFilter' | ||
}), | ||
core_1.Injectable() | ||
], NkSelectFilter); | ||
NkSelectFilter.decorators = [ | ||
{ type: Pipe, args: [{ | ||
name: 'nkSelectFilter' | ||
},] }, | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
NkSelectFilter.ctorParameters = function () { return []; }; | ||
return NkSelectFilter; | ||
}()); | ||
exports.NkSelectFilter = NkSelectFilter; | ||
export { NkSelectFilter }; | ||
//# sourceMappingURL=nkSelect.filter.js.map |
@@ -1,34 +0,25 @@ | ||
"use strict"; | ||
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; | ||
}; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
var nkSelect_component_1 = require("./nkSelect.component"); | ||
var nkSelectMenu_directive_1 = require("./nkSelectMenu.directive"); | ||
var nkSelectMenuItem_directive_1 = require("./nkSelectMenuItem.directive"); | ||
var nkSelect_filter_1 = require("./nkSelect.filter"); | ||
var common_1 = require("@angular/common"); | ||
import { NgModule } from '@angular/core'; | ||
import { NkSelect } from './nkSelect.component'; | ||
import { NkSelectMenuDirective } from './nkSelectMenu.directive'; | ||
import { NkSelectMenuItem } from './nkSelectMenuItem.directive'; | ||
import { NkSelectFilter } from './nkSelect.filter'; | ||
import { CommonModule } from '@angular/common'; | ||
var NkSelectModule = /** @class */ (function () { | ||
function NkSelectModule() { | ||
} | ||
NkSelectModule = __decorate([ | ||
core_1.NgModule({ | ||
imports: [common_1.CommonModule], | ||
exports: [nkSelect_component_1.NkSelect, nkSelectMenu_directive_1.NkSelectMenuDirective, nkSelectMenuItem_directive_1.NkSelectMenuItem, nkSelect_filter_1.NkSelectFilter], | ||
declarations: [nkSelect_component_1.NkSelect, nkSelectMenu_directive_1.NkSelectMenuDirective, nkSelectMenuItem_directive_1.NkSelectMenuItem, nkSelect_filter_1.NkSelectFilter], | ||
}) | ||
], NkSelectModule); | ||
NkSelectModule.decorators = [ | ||
{ type: NgModule, args: [{ | ||
imports: [CommonModule], | ||
exports: [NkSelect, NkSelectMenuDirective, NkSelectMenuItem, NkSelectFilter], | ||
declarations: [NkSelect, NkSelectMenuDirective, NkSelectMenuItem, NkSelectFilter], | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NkSelectModule.ctorParameters = function () { return []; }; | ||
return NkSelectModule; | ||
}()); | ||
exports.NkSelectModule = NkSelectModule; | ||
__export(require("./nkSelect.component")); | ||
__export(require("./nkSelectMenu.directive")); | ||
__export(require("./nkSelectMenuItem.directive")); | ||
export { NkSelectModule }; | ||
export * from './nkSelect.component'; | ||
export * from './nkSelectMenu.directive'; | ||
export * from './nkSelectMenuItem.directive'; | ||
//# sourceMappingURL=nkSelect.module.js.map |
@@ -1,3 +0,1 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var NkSelectOptions = /** @class */ (function () { | ||
@@ -100,3 +98,3 @@ function NkSelectOptions() { | ||
}()); | ||
exports.NkSelectOptions = NkSelectOptions; | ||
export { NkSelectOptions }; | ||
//# sourceMappingURL=NkSelect.Options.js.map |
@@ -1,15 +0,4 @@ | ||
"use strict"; | ||
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); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
var nkOptionsPosition_1 = require("../core/position/nkOptionsPosition"); | ||
var nkPositionBuilder_1 = require("../core/position/nkPositionBuilder"); | ||
import { Directive, Input, Output, ViewContainerRef, TemplateRef, Renderer2, EventEmitter } from '@angular/core'; | ||
import { NkOptionsPosition } from '../core/position/nkOptionsPosition'; | ||
import { NkPositionBuilder } from '../core/position/nkPositionBuilder'; | ||
var NkSelectMenuDirective = /** @class */ (function () { | ||
@@ -24,3 +13,3 @@ function NkSelectMenuDirective(_renderer, templateRef, viewContainerRef) { | ||
this.offsetX = 0; | ||
this.backdropClick = new core_1.EventEmitter(); | ||
this.backdropClick = new EventEmitter(); | ||
this._templateRef = templateRef; | ||
@@ -114,3 +103,3 @@ this._viewContainerRef = viewContainerRef; | ||
NkSelectMenuDirective.prototype._createPositionBuilder = function () { | ||
this._positionBuilder = new nkPositionBuilder_1.NkPositionBuilder(this.controlElement.firstElementChild); | ||
this._positionBuilder = new NkPositionBuilder(this.controlElement.firstElementChild); | ||
}; | ||
@@ -144,3 +133,3 @@ NkSelectMenuDirective.prototype._setElementPosition = function (element) { | ||
//['top', 'bottom', 'left', 'right'].forEach(p => element.style[p] = null); | ||
var positionOptions = new nkOptionsPosition_1.NkOptionsPosition(); | ||
var positionOptions = new NkOptionsPosition(); | ||
positionOptions.my = 'left top'; | ||
@@ -166,46 +155,27 @@ positionOptions.at = 'left bottom'; | ||
}; | ||
__decorate([ | ||
core_1.Input('open'), | ||
__metadata("design:type", Boolean) | ||
], NkSelectMenuDirective.prototype, "open", void 0); | ||
__decorate([ | ||
core_1.Input('menuAnimateDone'), | ||
__metadata("design:type", Boolean) | ||
], NkSelectMenuDirective.prototype, "menuAnimateDone", void 0); | ||
__decorate([ | ||
core_1.Input('appendTo'), | ||
__metadata("design:type", String) | ||
], NkSelectMenuDirective.prototype, "appendTo", void 0); | ||
__decorate([ | ||
core_1.Input('themeClass'), | ||
__metadata("design:type", String) | ||
], NkSelectMenuDirective.prototype, "themeClass", void 0); | ||
__decorate([ | ||
core_1.Input('offsetY'), | ||
__metadata("design:type", Number) | ||
], NkSelectMenuDirective.prototype, "offsetY", void 0); | ||
__decorate([ | ||
core_1.Input('offsetX'), | ||
__metadata("design:type", Number) | ||
], NkSelectMenuDirective.prototype, "offsetX", void 0); | ||
__decorate([ | ||
core_1.Input('controlElement'), | ||
__metadata("design:type", Element) | ||
], NkSelectMenuDirective.prototype, "controlElement", void 0); | ||
__decorate([ | ||
core_1.Output(), | ||
__metadata("design:type", Object) | ||
], NkSelectMenuDirective.prototype, "backdropClick", void 0); | ||
NkSelectMenuDirective = __decorate([ | ||
core_1.Directive({ | ||
selector: '[nk-select-menu]', | ||
exportAs: 'nkSelectMenu', | ||
}), | ||
__metadata("design:paramtypes", [core_1.Renderer2, | ||
core_1.TemplateRef, | ||
core_1.ViewContainerRef]) | ||
], NkSelectMenuDirective); | ||
NkSelectMenuDirective.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[nk-select-menu]', | ||
exportAs: 'nkSelectMenu', | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NkSelectMenuDirective.ctorParameters = function () { return [ | ||
{ type: Renderer2, }, | ||
{ type: TemplateRef, }, | ||
{ type: ViewContainerRef, }, | ||
]; }; | ||
NkSelectMenuDirective.propDecorators = { | ||
'open': [{ type: Input, args: ['open',] },], | ||
'menuAnimateDone': [{ type: Input, args: ['menuAnimateDone',] },], | ||
'appendTo': [{ type: Input, args: ['appendTo',] },], | ||
'themeClass': [{ type: Input, args: ['themeClass',] },], | ||
'offsetY': [{ type: Input, args: ['offsetY',] },], | ||
'offsetX': [{ type: Input, args: ['offsetX',] },], | ||
'controlElement': [{ type: Input, args: ['controlElement',] },], | ||
'backdropClick': [{ type: Output },], | ||
}; | ||
return NkSelectMenuDirective; | ||
}()); | ||
exports.NkSelectMenuDirective = NkSelectMenuDirective; | ||
export { NkSelectMenuDirective }; | ||
//# sourceMappingURL=nkSelectMenu.directive.js.map |
@@ -1,13 +0,2 @@ | ||
"use strict"; | ||
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); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
import { Directive, Input, Renderer2, ElementRef } from '@angular/core'; | ||
var NkSelectMenuItem = /** @class */ (function () { | ||
@@ -26,3 +15,7 @@ function NkSelectMenuItem(_renderer, _element) { | ||
this.item.element = this; | ||
this._selected = this.item.selected; | ||
}; | ||
NkSelectMenuItem.prototype.ngOnDestroy = function () { | ||
this.item.selected = false; | ||
}; | ||
NkSelectMenuItem.prototype.select = function () { | ||
@@ -35,20 +28,22 @@ this._selected = true; | ||
}; | ||
__decorate([ | ||
core_1.Input('item'), | ||
__metadata("design:type", Object) | ||
], NkSelectMenuItem.prototype, "item", void 0); | ||
NkSelectMenuItem = __decorate([ | ||
core_1.Directive({ | ||
selector: '[nk-select-menu-item]', | ||
exportAs: 'nkSelectMenuItem', | ||
host: { | ||
'[class.nk-select-menu-selected]': 'selected', | ||
}, | ||
}), | ||
__metadata("design:paramtypes", [core_1.Renderer2, | ||
core_1.ElementRef]) | ||
], NkSelectMenuItem); | ||
NkSelectMenuItem.decorators = [ | ||
{ type: Directive, args: [{ | ||
selector: '[nk-select-menu-item]', | ||
exportAs: 'nkSelectMenuItem', | ||
host: { | ||
'[class.nk-select-menu-selected]': 'selected', | ||
}, | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
NkSelectMenuItem.ctorParameters = function () { return [ | ||
{ type: Renderer2, }, | ||
{ type: ElementRef, }, | ||
]; }; | ||
NkSelectMenuItem.propDecorators = { | ||
'item': [{ type: Input, args: ['item',] },], | ||
}; | ||
return NkSelectMenuItem; | ||
}()); | ||
exports.NkSelectMenuItem = NkSelectMenuItem; | ||
export { NkSelectMenuItem }; | ||
//# sourceMappingURL=nkSelectMenuItem.directive.js.map |
@@ -1,19 +0,8 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./nkSelect.animation")); | ||
var nkSelect_filter_1 = require("./nkSelect.filter"); | ||
exports.NkSelectFilter = nkSelect_filter_1.NkSelectFilter; | ||
var nkSelect_component_1 = require("./nkSelect.component"); | ||
exports.NkSelect = nkSelect_component_1.NkSelect; | ||
var nkSelect_module_1 = require("./nkSelect.module"); | ||
exports.NkSelectModule = nkSelect_module_1.NkSelectModule; | ||
var nkSelect_options_1 = require("./nkSelect.options"); | ||
exports.NkSelectOptions = nkSelect_options_1.NkSelectOptions; | ||
var nkSelectMenu_directive_1 = require("./nkSelectMenu.directive"); | ||
exports.NkSelectMenuDirective = nkSelectMenu_directive_1.NkSelectMenuDirective; | ||
var nkSelectMenuItem_directive_1 = require("./nkSelectMenuItem.directive"); | ||
exports.NkSelectMenuItem = nkSelectMenuItem_directive_1.NkSelectMenuItem; | ||
export * from './nkSelect.animation'; | ||
export { NkSelectFilter } from './nkSelect.filter'; | ||
export { NkSelect } from './nkSelect.component'; | ||
export { NkSelectModule } from './nkSelect.module'; | ||
export { NkSelectOptions } from './nkSelect.options'; | ||
export { NkSelectMenuDirective } from './nkSelectMenu.directive'; | ||
export { NkSelectMenuItem } from './nkSelectMenuItem.directive'; | ||
//# sourceMappingURL=public-api.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183
337786
3844
4