Socket
Socket
Sign inDemoInstall

a2dt

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.7 to 0.1.8

book.json

312

jspm.config.js

@@ -302,314 +302,2 @@ SystemJS.config({

],
"angular2-data-table/bundle-core.js": [
"npm:core-js@2.4.0/index.js",
"npm:core-js@2.4.0.json",
"github:jspm/nodelibs-process@0.2.0-alpha/process.js",
"github:jspm/nodelibs-process@0.2.0-alpha.json",
"npm:core-js@2.4.0/modules/_core.js",
"npm:core-js@2.4.0/modules/core.string.unescape-html.js",
"npm:core-js@2.4.0/modules/_replacer.js",
"npm:core-js@2.4.0/modules/_export.js",
"npm:core-js@2.4.0/modules/_ctx.js",
"npm:core-js@2.4.0/modules/_a-function.js",
"npm:core-js@2.4.0/modules/_redefine.js",
"npm:core-js@2.4.0/modules/_uid.js",
"npm:core-js@2.4.0/modules/_has.js",
"npm:core-js@2.4.0/modules/_hide.js",
"npm:core-js@2.4.0/modules/_descriptors.js",
"npm:core-js@2.4.0/modules/_fails.js",
"npm:core-js@2.4.0/modules/_property-desc.js",
"npm:core-js@2.4.0/modules/_object-dp.js",
"npm:core-js@2.4.0/modules/_to-primitive.js",
"npm:core-js@2.4.0/modules/_is-object.js",
"npm:core-js@2.4.0/modules/_ie8-dom-define.js",
"npm:core-js@2.4.0/modules/_dom-create.js",
"npm:core-js@2.4.0/modules/_global.js",
"npm:core-js@2.4.0/modules/_an-object.js",
"npm:core-js@2.4.0/modules/core.string.escape-html.js",
"npm:core-js@2.4.0/modules/core.regexp.escape.js",
"npm:core-js@2.4.0/modules/core.number.iterator.js",
"npm:core-js@2.4.0/modules/_iter-define.js",
"npm:core-js@2.4.0/modules/_wks.js",
"npm:core-js@2.4.0/modules/_shared.js",
"npm:core-js@2.4.0/modules/_object-gpo.js",
"npm:core-js@2.4.0/modules/_shared-key.js",
"npm:core-js@2.4.0/modules/_to-object.js",
"npm:core-js@2.4.0/modules/_defined.js",
"npm:core-js@2.4.0/modules/_set-to-string-tag.js",
"npm:core-js@2.4.0/modules/_iter-create.js",
"npm:core-js@2.4.0/modules/_object-create.js",
"npm:core-js@2.4.0/modules/_html.js",
"npm:core-js@2.4.0/modules/_enum-bug-keys.js",
"npm:core-js@2.4.0/modules/_object-dps.js",
"npm:core-js@2.4.0/modules/_object-keys.js",
"npm:core-js@2.4.0/modules/_object-keys-internal.js",
"npm:core-js@2.4.0/modules/_array-includes.js",
"npm:core-js@2.4.0/modules/_to-index.js",
"npm:core-js@2.4.0/modules/_to-integer.js",
"npm:core-js@2.4.0/modules/_to-length.js",
"npm:core-js@2.4.0/modules/_to-iobject.js",
"npm:core-js@2.4.0/modules/_iobject.js",
"npm:core-js@2.4.0/modules/_cof.js",
"npm:core-js@2.4.0/modules/_iterators.js",
"npm:core-js@2.4.0/modules/_library.js",
"npm:core-js@2.4.0/modules/core.object.make.js",
"npm:core-js@2.4.0/modules/_object-define.js",
"npm:core-js@2.4.0/modules/_own-keys.js",
"npm:core-js@2.4.0/modules/_object-gops.js",
"npm:core-js@2.4.0/modules/_object-gopn.js",
"npm:core-js@2.4.0/modules/_object-gopd.js",
"npm:core-js@2.4.0/modules/_object-pie.js",
"npm:core-js@2.4.0/modules/core.object.define.js",
"npm:core-js@2.4.0/modules/core.object.classof.js",
"npm:core-js@2.4.0/modules/_classof.js",
"npm:core-js@2.4.0/modules/core.object.is-object.js",
"npm:core-js@2.4.0/modules/core.function.part.js",
"npm:core-js@2.4.0/modules/_partial.js",
"npm:core-js@2.4.0/modules/_invoke.js",
"npm:core-js@2.4.0/modules/_path.js",
"npm:core-js@2.4.0/modules/core.delay.js",
"npm:core-js@2.4.0/modules/core.is-iterable.js",
"npm:core-js@2.4.0/modules/core.get-iterator.js",
"npm:core-js@2.4.0/modules/core.get-iterator-method.js",
"npm:core-js@2.4.0/modules/core.dict.js",
"npm:core-js@2.4.0/modules/_iter-step.js",
"npm:core-js@2.4.0/modules/_for-of.js",
"npm:core-js@2.4.0/modules/_is-array-iter.js",
"npm:core-js@2.4.0/modules/_iter-call.js",
"npm:core-js@2.4.0/modules/_keyof.js",
"npm:core-js@2.4.0/modules/_object-assign.js",
"npm:core-js@2.4.0/shim.js",
"npm:core-js@2.4.0/modules/web.dom.iterable.js",
"npm:core-js@2.4.0/modules/es6.array.iterator.js",
"npm:core-js@2.4.0/modules/_add-to-unscopables.js",
"npm:core-js@2.4.0/modules/web.immediate.js",
"npm:core-js@2.4.0/modules/_task.js",
"npm:core-js@2.4.0/modules/web.timers.js",
"npm:core-js@2.4.0/modules/es7.observable.js",
"npm:core-js@2.4.0/modules/_set-species.js",
"npm:core-js@2.4.0/modules/_redefine-all.js",
"npm:core-js@2.4.0/modules/_an-instance.js",
"npm:core-js@2.4.0/modules/_microtask.js",
"npm:core-js@2.4.0/modules/es7.asap.js",
"npm:core-js@2.4.0/modules/es7.reflect.metadata.js",
"npm:core-js@2.4.0/modules/_metadata.js",
"npm:core-js@2.4.0/modules/es6.weak-map.js",
"npm:core-js@2.4.0/modules/_collection.js",
"npm:core-js@2.4.0/modules/_inherit-if-required.js",
"npm:core-js@2.4.0/modules/_set-proto.js",
"npm:core-js@2.4.0/modules/_iter-detect.js",
"npm:core-js@2.4.0/modules/_meta.js",
"npm:core-js@2.4.0/modules/_collection-weak.js",
"npm:core-js@2.4.0/modules/_array-methods.js",
"npm:core-js@2.4.0/modules/_array-species-create.js",
"npm:core-js@2.4.0/modules/_array-species-constructor.js",
"npm:core-js@2.4.0/modules/_is-array.js",
"npm:core-js@2.4.0/modules/es6.map.js",
"npm:core-js@2.4.0/modules/_collection-strong.js",
"npm:core-js@2.4.0/modules/es7.reflect.has-own-metadata.js",
"npm:core-js@2.4.0/modules/es7.reflect.has-metadata.js",
"npm:core-js@2.4.0/modules/es7.reflect.get-own-metadata-keys.js",
"npm:core-js@2.4.0/modules/es7.reflect.get-own-metadata.js",
"npm:core-js@2.4.0/modules/es7.reflect.get-metadata-keys.js",
"npm:core-js@2.4.0/modules/_array-from-iterable.js",
"npm:core-js@2.4.0/modules/es6.set.js",
"npm:core-js@2.4.0/modules/es7.reflect.get-metadata.js",
"npm:core-js@2.4.0/modules/es7.reflect.delete-metadata.js",
"npm:core-js@2.4.0/modules/es7.reflect.define-metadata.js",
"npm:core-js@2.4.0/modules/es7.math.umulh.js",
"npm:core-js@2.4.0/modules/es7.math.imulh.js",
"npm:core-js@2.4.0/modules/es7.math.isubh.js",
"npm:core-js@2.4.0/modules/es7.math.iaddh.js",
"npm:core-js@2.4.0/modules/es7.error.is-error.js",
"npm:core-js@2.4.0/modules/es7.system.global.js",
"npm:core-js@2.4.0/modules/es7.set.to-json.js",
"npm:core-js@2.4.0/modules/_collection-to-json.js",
"npm:core-js@2.4.0/modules/es7.map.to-json.js",
"npm:core-js@2.4.0/modules/es7.object.lookup-setter.js",
"npm:core-js@2.4.0/modules/_object-forced-pam.js",
"npm:core-js@2.4.0/modules/es7.object.lookup-getter.js",
"npm:core-js@2.4.0/modules/es7.object.define-setter.js",
"npm:core-js@2.4.0/modules/es7.object.define-getter.js",
"npm:core-js@2.4.0/modules/es7.object.entries.js",
"npm:core-js@2.4.0/modules/_object-to-array.js",
"npm:core-js@2.4.0/modules/es7.object.values.js",
"npm:core-js@2.4.0/modules/es7.object.get-own-property-descriptors.js",
"npm:core-js@2.4.0/modules/_create-property.js",
"npm:core-js@2.4.0/modules/es7.symbol.observable.js",
"npm:core-js@2.4.0/modules/_wks-define.js",
"npm:core-js@2.4.0/modules/_wks-ext.js",
"npm:core-js@2.4.0/modules/es7.symbol.async-iterator.js",
"npm:core-js@2.4.0/modules/es7.string.match-all.js",
"npm:core-js@2.4.0/modules/_flags.js",
"npm:core-js@2.4.0/modules/_is-regexp.js",
"npm:core-js@2.4.0/modules/es7.string.trim-right.js",
"npm:core-js@2.4.0/modules/_string-trim.js",
"npm:core-js@2.4.0/modules/_string-ws.js",
"npm:core-js@2.4.0/modules/es7.string.trim-left.js",
"npm:core-js@2.4.0/modules/es7.string.pad-end.js",
"npm:core-js@2.4.0/modules/_string-pad.js",
"npm:core-js@2.4.0/modules/_string-repeat.js",
"npm:core-js@2.4.0/modules/es7.string.pad-start.js",
"npm:core-js@2.4.0/modules/es7.string.at.js",
"npm:core-js@2.4.0/modules/_string-at.js",
"npm:core-js@2.4.0/modules/es7.array.includes.js",
"npm:core-js@2.4.0/modules/es6.reflect.set-prototype-of.js",
"npm:core-js@2.4.0/modules/es6.reflect.set.js",
"npm:core-js@2.4.0/modules/es6.reflect.prevent-extensions.js",
"npm:core-js@2.4.0/modules/es6.reflect.own-keys.js",
"npm:core-js@2.4.0/modules/es6.reflect.is-extensible.js",
"npm:core-js@2.4.0/modules/es6.reflect.has.js",
"npm:core-js@2.4.0/modules/es6.reflect.get-prototype-of.js",
"npm:core-js@2.4.0/modules/es6.reflect.get-own-property-descriptor.js",
"npm:core-js@2.4.0/modules/es6.reflect.get.js",
"npm:core-js@2.4.0/modules/es6.reflect.enumerate.js",
"npm:core-js@2.4.0/modules/es6.reflect.delete-property.js",
"npm:core-js@2.4.0/modules/es6.reflect.define-property.js",
"npm:core-js@2.4.0/modules/es6.reflect.construct.js",
"npm:core-js@2.4.0/modules/_bind.js",
"npm:core-js@2.4.0/modules/es6.reflect.apply.js",
"npm:core-js@2.4.0/modules/es6.typed.float64-array.js",
"npm:core-js@2.4.0/modules/_typed-array.js",
"npm:core-js@2.4.0/modules/_array-copy-within.js",
"npm:core-js@2.4.0/modules/_array-fill.js",
"npm:core-js@2.4.0/modules/_species-constructor.js",
"npm:core-js@2.4.0/modules/_same-value.js",
"npm:core-js@2.4.0/modules/_is-integer.js",
"npm:core-js@2.4.0/modules/_typed-buffer.js",
"npm:core-js@2.4.0/modules/_typed.js",
"npm:core-js@2.4.0/modules/es6.typed.float32-array.js",
"npm:core-js@2.4.0/modules/es6.typed.uint32-array.js",
"npm:core-js@2.4.0/modules/es6.typed.int32-array.js",
"npm:core-js@2.4.0/modules/es6.typed.uint16-array.js",
"npm:core-js@2.4.0/modules/es6.typed.int16-array.js",
"npm:core-js@2.4.0/modules/es6.typed.uint8-clamped-array.js",
"npm:core-js@2.4.0/modules/es6.typed.uint8-array.js",
"npm:core-js@2.4.0/modules/es6.typed.int8-array.js",
"npm:core-js@2.4.0/modules/es6.typed.data-view.js",
"npm:core-js@2.4.0/modules/es6.typed.array-buffer.js",
"npm:core-js@2.4.0/modules/es6.weak-set.js",
"npm:core-js@2.4.0/modules/es6.promise.js",
"npm:core-js@2.4.0/modules/es6.regexp.split.js",
"npm:core-js@2.4.0/modules/_fix-re-wks.js",
"npm:core-js@2.4.0/modules/es6.regexp.search.js",
"npm:core-js@2.4.0/modules/es6.regexp.replace.js",
"npm:core-js@2.4.0/modules/es6.regexp.match.js",
"npm:core-js@2.4.0/modules/es6.regexp.flags.js",
"npm:core-js@2.4.0/modules/es6.regexp.to-string.js",
"npm:core-js@2.4.0/modules/es6.regexp.constructor.js",
"npm:core-js@2.4.0/modules/es6.array.species.js",
"npm:core-js@2.4.0/modules/es6.array.find-index.js",
"npm:core-js@2.4.0/modules/es6.array.find.js",
"npm:core-js@2.4.0/modules/es6.array.fill.js",
"npm:core-js@2.4.0/modules/es6.array.copy-within.js",
"npm:core-js@2.4.0/modules/es6.array.last-index-of.js",
"npm:core-js@2.4.0/modules/_strict-method.js",
"npm:core-js@2.4.0/modules/es6.array.index-of.js",
"npm:core-js@2.4.0/modules/es6.array.reduce-right.js",
"npm:core-js@2.4.0/modules/_array-reduce.js",
"npm:core-js@2.4.0/modules/es6.array.reduce.js",
"npm:core-js@2.4.0/modules/es6.array.every.js",
"npm:core-js@2.4.0/modules/es6.array.some.js",
"npm:core-js@2.4.0/modules/es6.array.filter.js",
"npm:core-js@2.4.0/modules/es6.array.map.js",
"npm:core-js@2.4.0/modules/es6.array.for-each.js",
"npm:core-js@2.4.0/modules/es6.array.sort.js",
"npm:core-js@2.4.0/modules/es6.array.slice.js",
"npm:core-js@2.4.0/modules/es6.array.join.js",
"npm:core-js@2.4.0/modules/es6.array.of.js",
"npm:core-js@2.4.0/modules/es6.array.from.js",
"npm:core-js@2.4.0/modules/es6.array.is-array.js",
"npm:core-js@2.4.0/modules/es6.date.to-primitive.js",
"npm:core-js@2.4.0/modules/_date-to-primitive.js",
"npm:core-js@2.4.0/modules/es6.date.to-string.js",
"npm:core-js@2.4.0/modules/es6.date.to-iso-string.js",
"npm:core-js@2.4.0/modules/es6.date.to-json.js",
"npm:core-js@2.4.0/modules/es6.date.now.js",
"npm:core-js@2.4.0/modules/es6.string.sup.js",
"npm:core-js@2.4.0/modules/_string-html.js",
"npm:core-js@2.4.0/modules/es6.string.sub.js",
"npm:core-js@2.4.0/modules/es6.string.strike.js",
"npm:core-js@2.4.0/modules/es6.string.small.js",
"npm:core-js@2.4.0/modules/es6.string.link.js",
"npm:core-js@2.4.0/modules/es6.string.italics.js",
"npm:core-js@2.4.0/modules/es6.string.fontsize.js",
"npm:core-js@2.4.0/modules/es6.string.fontcolor.js",
"npm:core-js@2.4.0/modules/es6.string.fixed.js",
"npm:core-js@2.4.0/modules/es6.string.bold.js",
"npm:core-js@2.4.0/modules/es6.string.blink.js",
"npm:core-js@2.4.0/modules/es6.string.big.js",
"npm:core-js@2.4.0/modules/es6.string.anchor.js",
"npm:core-js@2.4.0/modules/es6.string.starts-with.js",
"npm:core-js@2.4.0/modules/_fails-is-regexp.js",
"npm:core-js@2.4.0/modules/_string-context.js",
"npm:core-js@2.4.0/modules/es6.string.repeat.js",
"npm:core-js@2.4.0/modules/es6.string.includes.js",
"npm:core-js@2.4.0/modules/es6.string.ends-with.js",
"npm:core-js@2.4.0/modules/es6.string.code-point-at.js",
"npm:core-js@2.4.0/modules/es6.string.iterator.js",
"npm:core-js@2.4.0/modules/es6.string.trim.js",
"npm:core-js@2.4.0/modules/es6.string.raw.js",
"npm:core-js@2.4.0/modules/es6.string.from-code-point.js",
"npm:core-js@2.4.0/modules/es6.math.trunc.js",
"npm:core-js@2.4.0/modules/es6.math.tanh.js",
"npm:core-js@2.4.0/modules/_math-expm1.js",
"npm:core-js@2.4.0/modules/es6.math.sinh.js",
"npm:core-js@2.4.0/modules/es6.math.sign.js",
"npm:core-js@2.4.0/modules/_math-sign.js",
"npm:core-js@2.4.0/modules/es6.math.log2.js",
"npm:core-js@2.4.0/modules/es6.math.log1p.js",
"npm:core-js@2.4.0/modules/_math-log1p.js",
"npm:core-js@2.4.0/modules/es6.math.log10.js",
"npm:core-js@2.4.0/modules/es6.math.imul.js",
"npm:core-js@2.4.0/modules/es6.math.hypot.js",
"npm:core-js@2.4.0/modules/es6.math.fround.js",
"npm:core-js@2.4.0/modules/es6.math.expm1.js",
"npm:core-js@2.4.0/modules/es6.math.cosh.js",
"npm:core-js@2.4.0/modules/es6.math.clz32.js",
"npm:core-js@2.4.0/modules/es6.math.cbrt.js",
"npm:core-js@2.4.0/modules/es6.math.atanh.js",
"npm:core-js@2.4.0/modules/es6.math.asinh.js",
"npm:core-js@2.4.0/modules/es6.math.acosh.js",
"npm:core-js@2.4.0/modules/es6.number.parse-int.js",
"npm:core-js@2.4.0/modules/_parse-int.js",
"npm:core-js@2.4.0/modules/es6.number.parse-float.js",
"npm:core-js@2.4.0/modules/_parse-float.js",
"npm:core-js@2.4.0/modules/es6.number.min-safe-integer.js",
"npm:core-js@2.4.0/modules/es6.number.max-safe-integer.js",
"npm:core-js@2.4.0/modules/es6.number.is-safe-integer.js",
"npm:core-js@2.4.0/modules/es6.number.is-nan.js",
"npm:core-js@2.4.0/modules/es6.number.is-integer.js",
"npm:core-js@2.4.0/modules/es6.number.is-finite.js",
"npm:core-js@2.4.0/modules/es6.number.epsilon.js",
"npm:core-js@2.4.0/modules/es6.number.to-precision.js",
"npm:core-js@2.4.0/modules/_a-number-value.js",
"npm:core-js@2.4.0/modules/es6.number.to-fixed.js",
"npm:core-js@2.4.0/modules/es6.number.constructor.js",
"npm:core-js@2.4.0/modules/es6.parse-float.js",
"npm:core-js@2.4.0/modules/es6.parse-int.js",
"npm:core-js@2.4.0/modules/es6.function.has-instance.js",
"npm:core-js@2.4.0/modules/es6.function.name.js",
"npm:core-js@2.4.0/modules/es6.function.bind.js",
"npm:core-js@2.4.0/modules/es6.object.to-string.js",
"npm:core-js@2.4.0/modules/es6.object.set-prototype-of.js",
"npm:core-js@2.4.0/modules/es6.object.is.js",
"npm:core-js@2.4.0/modules/es6.object.assign.js",
"npm:core-js@2.4.0/modules/es6.object.is-extensible.js",
"npm:core-js@2.4.0/modules/_object-sap.js",
"npm:core-js@2.4.0/modules/es6.object.is-sealed.js",
"npm:core-js@2.4.0/modules/es6.object.is-frozen.js",
"npm:core-js@2.4.0/modules/es6.object.prevent-extensions.js",
"npm:core-js@2.4.0/modules/es6.object.seal.js",
"npm:core-js@2.4.0/modules/es6.object.freeze.js",
"npm:core-js@2.4.0/modules/es6.object.get-own-property-names.js",
"npm:core-js@2.4.0/modules/_object-gopn-ext.js",
"npm:core-js@2.4.0/modules/es6.object.keys.js",
"npm:core-js@2.4.0/modules/es6.object.get-prototype-of.js",
"npm:core-js@2.4.0/modules/es6.object.get-own-property-descriptor.js",
"npm:core-js@2.4.0/modules/es6.object.define-properties.js",
"npm:core-js@2.4.0/modules/es6.object.define-property.js",
"npm:core-js@2.4.0/modules/es6.object.create.js",
"npm:core-js@2.4.0/modules/es6.symbol.js",
"npm:core-js@2.4.0/modules/_enum-keys.js"
],
"angular2-data-table/bundle-rx.js": [

@@ -616,0 +304,0 @@ "npm:rxjs@5.0.0-beta.6/Rx.js",

17

package.json
{
"name": "a2dt",
"version": "0.1.7",
"version": "0.1.8",
"description": "angular2-data-table is a Angular2 component for presenting large and complex data.",

@@ -14,10 +14,10 @@ "main": "release/angular2-data-table.js",

"build": "npm run clean && concurrently \"npm run build:ts\" \"npm run build:sass\"",
"build:ts": "tsc -p configs/tsconfig.json",
"build:ts": "tsc -p tsconfig.json; true",
"build:sass": "node-sass -o dist/ src/",
"build:css": "postcss --use autoprefixer dist/*.css -d dist/",
"build:bundle": "concurrently \"npm run build:bundle-ng\" \"npm run build:bundle-core\" \"npm run build:bundle-rx\"",
"build:bundle-ng": "jspm bundle @angular/platform-browser-dynamic dist/bundle-ng.js",
"build:bundle-rx": "jspm bundle rxjs dist/bundle-rx.js",
"build:bundle": "concurrently \"npm run build:bundle-ng\" \"npm run build:bundle-rx\"",
"build:bundle-ng": "jspm bundle @angular/platform-browser-dynamic dist/bundle-ng.js --log warn",
"build:bundle-rx": "jspm bundle rxjs dist/bundle-rx.js --log warn",
"watch": "npm run clean:dist && concurrently \"npm run watch:ts\" \"npm run watch:sass\"",
"watch:ts": "tsc --watch -p configs/tsconfig.json",
"watch:ts": "tsc --watch -p tsconfig.json",
"watch:sass": "npm run build:sass && node-sass -o dist/ -w src/",

@@ -29,4 +29,3 @@ "start": "concurrently \"npm run build:bundle\" \"npm run watch\" \"npm run start:server\"",

"release:minify": "uglifyjs release/angular2-data-table.js --source-map release/angular2-data-table.min.js.map --source-map-url release/angular2-data-table.js.map --compress --mangle --screw-ie8 --output release/angular2-data-table.min.js",
"release:build": " npm run release:build:ts && npm run release:build:bundle",
"release:build:ts": "tsc -p configs/tsconfig-prod.json",
"release:build": " npm run build:ts && npm run release:build:bundle",
"release:build:bundle": "jspm build dist/main.js - npm:@angular/platform-browser-dynamic@2.0.0-rc.1 - npm:rxjs@5.0.0-beta.6 release/angular2-data-table.js",

@@ -56,3 +55,3 @@ "release:build:umd": "jspm build dist/main.js - npm:@angular/platform-browser-dynamic@2.0.0-rc.1 - npm:rxjs@5.0.0-beta.6 release/angular2-data-table.js --format umd --global-name angular2DataTable --global-deps \"{'rxjs/Rx.js': 'Rxjs/Rx.js', '@angular/core/index.js': '@angular/core/index.js'}\""

"rimraf": "^2.5.2",
"typescript": "^1.8.10",
"typescript": ">=1.9.0-dev.20160608-1.0",
"uglify-js": "^2.6.2"

@@ -59,0 +58,0 @@ },

# angular2-data-table
`angular2-data-table` is a Angular2 component for presenting large and complex data. It has all the features you would expect from any other table but in a light package with _no external depedencies_. The table was designed to be extremely flexible and light; it doesn't make any assumptions about your data or how you: filter, sort or page it.
`angular2-data-table` is a Angular2 component for presenting large and complex data. It has all the features you would expect from any other table but in a light package with _no external dependencies_. The table was designed to be extremely flexible and light; it doesn't make any assumptions about your data or how you: filter, sort or page it.

@@ -5,0 +5,0 @@ It was engineered from its conception to handle thousands of rows without sacrificing performance. It was built for modern browsers using _TypeScript, CSS3 and HTML5_ and Angular `>=2.0.0-rc1`. This is the sister project of the [angular-data-table](https://github.com/swimlane/angular-data-table) that is designed for Angular 1.x.

@@ -1,3 +0,3 @@

!function(e){function t(e,t,n){e in c||(c[e]={name:e,declarative:!0,deps:t,declare:n,normalizedDeps:t})}function n(e){return f[e]||(f[e]={name:e,dependencies:[],exports:{},importers:[]})}function i(t){if(!t.module){var o=t.module=n(t.name),r=t.module.exports,s=t.declare.call(e,function(e,t){if(o.locked=!0,"object"==typeof e)for(var n in e)r[n]=e[n];else r[e]=t;for(var i=0,s=o.importers.length;s>i;i++){var a=o.importers[i];if(!a.locked)for(var c=0;c<a.dependencies.length;++c)a.dependencies[c]===o&&a.setters[c](r)}return o.locked=!1,t},t.name);o.setters=s.setters,o.execute=s.execute;for(var l=0,u=t.normalizedDeps.length;u>l;l++){var d,p=t.normalizedDeps[l],h=c[p],g=f[p];g?d=g.exports:h&&!h.declarative?d=h.esModule:h?(i(h),g=h.module,d=g.exports):d=a(p),g&&g.importers?(g.importers.push(o),o.dependencies.push(g)):o.dependencies.push(null),o.setters[l]&&o.setters[l](d)}}}function o(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(u)for(var i in t)"default"!==i&&r(n,t,i);else{var o=t&&t.hasOwnProperty;for(var i in t)"default"===i||o&&!t.hasOwnProperty(i)||(n[i]=t[i])}return n.default=t,d(n,"__useDefault",{value:!0}),n}function r(e,t,n){try{var i;(i=Object.getOwnPropertyDescriptor(t,n))&&d(e,n,i)}catch(i){return e[n]=t[n],!1}}function s(t,n){var i=c[t];if(i&&!i.evaluated&&i.declarative){n.push(t);for(var o=0,r=i.normalizedDeps.length;r>o;o++){var u=i.normalizedDeps[o];-1==l.call(n,u)&&(c[u]?s(u,n):a(u))}i.evaluated||(i.evaluated=!0,i.module.execute.call(e))}}function a(e){if(h[e])return h[e];if("@node/"==e.substr(0,6))return p(e.substr(6));var t=c[e];if(!t)throw"Module "+e+" not present.";return i(c[e]),s(e,[]),c[e]=void 0,t.declarative&&d(t.module.exports,"__esModule",{value:!0}),h[e]=t.declarative?t.module.exports:t.esModule}var c={},l=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},u=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){u=!1}var d;!function(){try{Object.defineProperty({},"a",{})&&(d=Object.defineProperty)}catch(e){d=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}();var f={},p="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&require.resolve&&"undefined"!=typeof process&&require,h={"@empty":{}};return function(e,n,i,r){return function(s){s(function(s){for(var c=0;c<n.length;c++)(function(e,t){t&&t.__esModule?h[e]=t:h[e]=o(t)})(n[c],arguments[c]);r({register:t});var l=a(e[0]);if(e.length>1)for(var c=1;c<e.length;c++)a(e[c]);return i?l.default:l})}}}("undefined"!=typeof self?self:global)(["1"],["4","9"],!1,function(e){this.require,this.exports,this.module;e.register("2",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){n=function(){function e(e,t){this.callback=t,window.IntersectionObserver?(this.observer=new IntersectionObserver(this.processChanges.bind(this),{threshold:[.5]}),this.observer.observe(e)):this.runPolyfill(e)}return e.prototype.runPolyfill=function(e){var t=this,n=function(){var i=e.getBoundingClientRect(),o=i.width,r=i.height;o&&r?t.callback&&t.callback():setTimeout(function(){return n()},10)};n()},e.prototype.isVisible=function(e,t){return t.width*t.height/(e.width*e.height)>=.5},e.prototype.visibleTimerCallback=function(e,t){delete e.visibleTimeout,this.processChanges(t.takeRecords()),"isVisible"in e&&(delete e.isVisible,this.callback&&this.callback(),t.unobserve(e))},e.prototype.processChanges=function(e){var t=this;e.forEach(function(e){var n=e.target;n.isVisible=t.isVisible(e.boundingClientRect,e.intersectionRect),"isVisible"in n?n.visibleTimeout=setTimeout(t.visibleTimerCallback.bind(t),1e3,n,t.observer):"visibleTimeout"in n&&(clearTimeout(n.visibleTimeout),delete n.visibleTimeout)})},e}(),e("VisibilityObserver",n)}}}),e.register("3",["4","2"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.visible=!1,this.onVisibilityChange=new n.EventEmitter,new i.VisibilityObserver(e.nativeElement,this.visbilityChange.bind(this))}return e.prototype.visbilityChange=function(){this.visible=!0,this.onVisibilityChange.emit(!0)},r([n.HostBinding("class.visible"),s("design:type",Boolean)],e.prototype,"visible",void 0),r([n.Output(),s("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onVisibilityChange",void 0),e=r([n.Directive({selector:"[visibility-observer]"}),s("design:paramtypes",["function"==typeof(o="undefined"!=typeof n.ElementRef&&n.ElementRef)&&o||Object])],e);var t,o}(),e("Visibility",o)}}}),e.register("5",["6"],function(e,t){"use strict";function n(e,t){for(var n=0,i=0,o=allColumns;i<o.length;i++){var r=o[i],s=t&&r[t];n+=s?r[t]:r.width}return n}function i(e){for(var t=0,n=0,i=e;n<i.length;n++){var o=i[n];t+=o.flexGrow||0}return t}function o(e,t){var o=n(e),s=i(e),c=a.columnsByPin(e);o!==t&&r(c,t,s)}function r(e,t,n){for(var i in e)for(var o=0,r=e[i];o<r.length;o++){var s=r[o];s.canAutoResize?s.width=0:(t-=s.width,n-=s.flexGrow)}var a={},c=t;do{var l=c/n;c=0;for(var i in e)for(var u=0,d=e[i];u<d.length;u++){var s=d[u];if(s.canAutoResize&&!a[s.prop]){var f=s.width+s.flexGrow*l;void 0!==s.minWidth&&f<s.minWidth?(c+=f-s.minWidth,s.width=s.minWidth,a[s.prop]=!0):s.width=f}}}while(0!==c)}function s(e,t,n){for(var i=0,o=n>-1?e.slice(n,e.length).filter(function(e){return e.canAutoResize}):e.filter(function(e){return e.canAutoResize}),r=0,s=e;r<s.length;r++){var a=s[r];i+=a.canAutoResize?a.$$oldWidth||a.width:a.width}for(var c=t-i,l=c/o.length,u=i>t,d=0,f=o;d<f.length;d++){var a=f[d];if(u)a.width=a.$$oldWidth||a.width;else{a.$$oldWidth||(a.$$oldWidth=a.width);var p=a.$$oldWidth+l;a.minWith&&p<a.minWidth?a.width=a.minWidth:a.maxWidth&&p>a.maxWidth?a.width=a.maxWidth:a.width=p}}}var a;t&&t.id;return e("columnTotalWidth",n),e("getTotalFlexGrow",i),e("adjustColumnWidths",o),e("forceFillColumnWidths",s),{setters:[function(e){a=e}],execute:function(){}}}),e.register("7",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(){this.duration=500,this.onLongPress=new n.EventEmitter,this.onLongPressing=new n.EventEmitter,this.onLongPressEnd=new n.EventEmitter}return Object.defineProperty(e.prototype,"press",{get:function(){return this._pressing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"longPress",{get:function(){return this._longPressing},enumerable:!0,configurable:!0}),e.prototype.onMouseDown=function(e){var t=this;1===e.which&&(this._pressing=!0,this._longPressing=!1,this._timeout=setTimeout(function(){t._longPressing=!0,t.onLongPress.emit(e),t._interval=setInterval(function(){t.onLongPressing.emit(e)},50)},this.duration))},e.prototype.endPress=function(){clearTimeout(this._timeout),clearInterval(this._interval),this._longPressing=!1,this._pressing=!1,this.onLongPressEnd.emit()},o([n.Input(),r("design:type",Number)],e.prototype,"duration",void 0),o([n.Output(),r("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onLongPress",void 0),o([n.Output(),r("design:type","function"==typeof(i="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&i||Object)],e.prototype,"onLongPressing",void 0),o([n.Output(),r("design:type","function"==typeof(s="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&s||Object)],e.prototype,"onLongPressEnd",void 0),o([n.HostBinding("class.press"),r("design:type",Object)],e.prototype,"press",null),o([n.HostBinding("class.longpress"),r("design:type",Object)],e.prototype,"longPress",null),o([n.HostListener("mousedown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onMouseDown",null),o([n.HostListener("mouseup"),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"endPress",null),e=o([n.Directive({selector:"[long-press]"}),r("design:paramtypes",[])],e);var t,i,s}(),e("LongPress",i)}}}),e.register("8",["4","9"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){if(this.resizeEnabled=!0,this.onResize=new n.EventEmitter,this.prevScreenX=0,this.resizing=!1,this.element=e.nativeElement,this.resizeEnabled){var t=document.createElement("span");t.classList.add("resize-handle"),this.element.appendChild(t)}}return e.prototype.onMouseup=function(e){this.resizing=!1,this.subcription&&(this.subcription.unsubscribe(),this.onResize.emit(this.element.clientWidth))},e.prototype.onMousedown=function(e){var t=this,n=e.target.classList.contains("resize-handle");n&&(e.stopPropagation(),this.resizing=!0,this.subcription=i.Observable.fromEvent(document,"mousemove").subscribe(function(e){return t.move(e)}))},e.prototype.move=function(e){var t=e.movementX||e.mozMovementX||e.screenX-this.prevScreenX,n=this.element.clientWidth,i=n+(t||0);this.prevScreenX=e.screenX;var o=!this.minWidth||i>=this.minWidth,r=!this.maxWidth||i<=this.maxWidth;o&&r&&(this.element.style.width=i+"px")},r([n.Input(),s("design:type",Boolean)],e.prototype,"resizeEnabled",void 0),r([n.Input(),s("design:type",Number)],e.prototype,"minWidth",void 0),r([n.Input(),s("design:type",Number)],e.prototype,"maxWidth",void 0),r([n.Output(),s("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onResize",void 0),r([n.HostListener("document:mouseup",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMouseup",null),r([n.HostListener("mousedown",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMousedown",null),e=r([n.Directive({selector:"[resizable]",host:{"[class.resizable]":"resizeEnabled"}}),s("design:paramtypes",["function"==typeof(o="undefined"!=typeof n.ElementRef&&n.ElementRef)&&o||Object])],e);var t,o}(),e("Resizable",o)}}}),e.register("a",["4","9"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.dragX=!0,this.dragY=!0,this.onDragStart=new n.EventEmitter,this.onDragging=new n.EventEmitter,this.onDragEnd=new n.EventEmitter,this.dragging=!1,this.element=e.nativeElement}return e.prototype.onMouseup=function(e){this.dragging=!1,this.subscription&&(this.subscription.unsubscribe(),this.onDragEnd.emit({event:e,element:this.element,model:this.model}))},e.prototype.onMousedown=function(e){var t=this;if(e.target.classList.contains("draggable")){e.preventDefault(),this.dragging=!0;var n={x:e.clientX,y:e.clientY};this.subscription=i.Observable.fromEvent(document,"mousemove").subscribe(function(e){return t.move(e,n)}),this.onDragStart.emit({event:e,element:this.element,model:this.model})}},e.prototype.move=function(e,t){if(this.dragging){var n=e.clientX-t.x,i=e.clientY-t.y;this.dragX&&(this.element.style.left=n+"px"),this.dragY&&(this.element.style.top=i+"px"),(this.dragX||this.dragY)&&this.onDragging.emit({event:e,element:this.element,model:this.model})}},r([n.Input(),s("design:type",Object)],e.prototype,"model",void 0),r([n.Input(),s("design:type",Boolean)],e.prototype,"dragX",void 0),r([n.Input(),s("design:type",Boolean)],e.prototype,"dragY",void 0),r([n.Output(),s("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onDragStart",void 0),r([n.Output(),s("design:type","function"==typeof(o="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&o||Object)],e.prototype,"onDragging",void 0),r([n.Output(),s("design:type","function"==typeof(a="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&a||Object)],e.prototype,"onDragEnd",void 0),r([n.HostListener("document:mouseup",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMouseup",null),r([n.HostListener("mousedown",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMousedown",null),e=r([n.Directive({selector:"[draggable]"}),s("design:paramtypes",["function"==typeof(c="undefined"!=typeof n.ElementRef&&n.ElementRef)&&c||Object])],e);var t,o,a,c}(),e("Draggable",o)}}}),e.register("b",["4","a"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(){this.onReorder=new n.EventEmitter}return e.prototype.ngAfterContentInit=function(){var e=this;this.drags.forEach(function(t){return t.onDragStart.subscribe(e.onDragStart.bind(e))&&t.onDragEnd.subscribe(e.onDragEnd.bind(e))})},e.prototype.onDragStart=function(){this.positions={};for(var e=0,t=0,n=this.drags.toArray();t<n.length;t++){var i=n[t],o=i.element;this.positions[i.model.prop]={left:parseInt(o.offsetLeft),index:e++}}},e.prototype.onDragEnd=function(e){var t=e.element,n=e.model,i=parseInt(t.offsetLeft),o=this.positions[n.prop],r=0;for(var s in this.positions){var a=this.positions[s],c=i<a.left&&o.left>a.left,l=i>a.left&&o.left<a.left;(c||l)&&this.onReorder.emit({prevIndex:o.index,newIndex:r,model:n}),r++}t.style.left="auto"},r([n.Output(),s("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onReorder",void 0),r([n.ContentChildren(i.Draggable),s("design:type","function"==typeof(o="undefined"!=typeof n.QueryList&&n.QueryList)&&o||Object)],e.prototype,"drags",void 0),e=r([n.Directive({selector:"[orderable]"}),s("design:paramtypes",[])],e);var t,o}(),e("Orderable",o)}}}),e.register("c",["4","d","e","f"],function(e,t){"use strict";var n,i,o,r,s,a=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),c=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e}],execute:function(){s=function(){function e(e,t){this.element=e,this.state=t,this.onColumnChange=new n.EventEmitter,e.nativeElement.classList.add("datatable-header-cell")}return Object.defineProperty(e.prototype,"sortDir",{get:function(){var e=this,t=this.state.options.sorts.find(function(t){return t.prop===e.model.prop});return t?t.dir:void 0},enumerable:!0,configurable:!0}),e.prototype.sortClasses=function(e){var t=this.sortDir;return{"sort-asc icon-down":t===r.SortDirection.asc,"sort-desc icon-up":t===r.SortDirection.desc}},e.prototype.onSort=function(){this.model.sortable&&(this.state.nextSort(this.model),this.onColumnChange.emit({type:"sort",value:this.model}))},a([n.Input(),c("design:type",o.TableColumn)],e.prototype,"model",void 0),a([n.Output(),c("design:type",Object)],e.prototype,"onColumnChange",void 0),e=a([n.Component({selector:"datatable-header-cell",template:'\n <div>\n <span\n class="datatable-header-cell-label draggable"\n (click)="onSort()"\n [innerHTML]="model.name">\n </span>\n <span\n class="sort-btn"\n [ngClass]="sortClasses()">\n </span>\n </div>\n ',host:{"[class.sortable]":"model.sortable","[class.resizable]":"model.resizable","[style.width]":'model.width + "px"',"[style.minWidth]":'model.minWidth + "px"',"[style.maxWidth]":'model.maxWidth + "px"',"[style.height]":'model.height + "px"',"[attr.title]":"model.name"}}),c("design:paramtypes",["function"==typeof(t="undefined"!=typeof n.ElementRef&&n.ElementRef)&&t||Object,i.StateService])],e);var t}(),e("DataTableHeaderCell",s)}}}),e.register("10",["4","d","7","a","8","b","c"],function(e,t){"use strict";var n,i,o,r,s,a,c,l,u=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),d=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e},function(e){c=e}],execute:function(){l=function(){function e(e,t){this.state=e,this.onColumnChange=new n.EventEmitter,t.nativeElement.classList.add("datatable-header")}return Object.defineProperty(e.prototype,"headerWidth",{get:function(){return this.state.options.scrollbarH?this.state.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerHeight",{get:function(){var e=this.state.options.headerHeight;return"auto"!==e?e+"px":e},enumerable:!0,configurable:!0}),e.prototype.columnResized=function(e,t){t.width=e,this.onColumnChange.emit({type:"resize",value:t})},e.prototype.columnReordered=function(e){var t=e.prevIndex,n=e.newIndex,i=e.model;this.state.options.columns.splice(t,1),this.state.options.columns.splice(n,0,i),this.onColumnChange.emit({type:"reorder",value:i})},u([n.Output(),d("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onColumnChange",void 0),e=u([n.Component({selector:"datatable-header",template:'\n <div\n [style.width]="state.columnGroupWidths.total"\n class="datatable-header-inner"\n orderable\n (onReorder)="columnReordered($event)">\n <div\n class="datatable-row-left"\n [style.width]="state.columnGroupWidths.left + \'px\'"\n *ngIf="state.columnsByPin.left.length">\n <datatable-header-cell\n *ngFor="let column of state.columnsByPin.left"\n resizable\n [resizeEnabled]="column.resizable"\n (onResize)="columnResized($event, column)"\n long-press\n (onLongPress)="draggable = true"\n (onLongPressEnd)="draggable = false"\n draggable\n [dragX]="column.draggable && draggable"\n [dragY]="false"\n [model]="column"\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header-cell>\n </div>\n <div\n class="datatable-row-center"\n [style.width]="state.columnGroupWidths.center + \'px\'"\n *ngIf="state.columnsByPin.center.length">\n <datatable-header-cell\n *ngFor="let column of state.columnsByPin.center"\n resizable\n [resizeEnabled]="column.resizable"\n (onResize)="columnResized($event, column)"\n long-press\n (onLongPress)="draggable = true"\n (onLongPressEnd)="draggable = false"\n draggable\n [dragX]="column.draggable && draggable"\n [dragY]="false"\n [model]="column"\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header-cell>\n </div>\n <div\n class="datatable-row-right"\n [style.width]="state.columnGroupWidths.right + \'px\'"\n *ngIf="state.columnsByPin.right.length">\n <datatable-header-cell\n *ngFor="let column of state.columnsByPin.right"\n resizable\n [resizeEnabled]="column.resizable"\n (onResize)="columnResized($event, column)"\n long-press\n (onLongPress)="draggable = true"\n (onLongPressEnd)="draggable = false"\n draggable\n [dragX]="column.draggable && draggable"\n [dragY]="false"\n [model]="column"\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header-cell>\n </div>\n </div>\n ',directives:[c.DataTableHeaderCell,r.Draggable,s.Resizable,a.Orderable,o.LongPress],host:{"[style.width]":"headerWidth","[style.height]":"headerHeight"}}),d("design:paramtypes",[i.StateService,"function"==typeof(l="undefined"!=typeof n.ElementRef&&n.ElementRef)&&l||Object])],e);var t,l}(),e("DataTableHeader",l)}}}),e.register("11",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.up=38]="up",e[e.down=40]="down",e[e.return=13]="return",e[e.escape=27]="escape"}(n||(n={})),e("Keys",n)}}}),e.register("12",[],function(e,t){"use strict";function n(e,t){var n=e.indexOf(t);return n>-1?e.splice(n,1):e.push(t),e}function i(e,t,n,i){for(var o=i>n,r=0,s=t.length;s>r;r++){var a=t[r],c=r>=i&&n>=r,l=i>=r&&r>=n,u={};if(u=o?{start:n,end:i-n}:{start:i,end:n+1},o&&l||!o&&c){var d=e.indexOf(a);if(o&&d>-1){e.splice(d,1);continue}r>=u.start&&r<u.end&&-1===d&&e.push(a)}}return e}t&&t.id;return e("selectRows",n),e("selectRowsBetween",i),{setters:[],execute:function(){}}}),e.register("13",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(){}return e=o([n.Component({selector:"datatable-progress",template:'\n <div\n class="progress-linear"\n role="progressbar">\n <div class="container">\n <div class="bar"></div>\n </div>\n </div>\n '}),r("design:paramtypes",[])],e)}(),e("ProgressBar",i)}}}),e.register("14",[],function(e,t){"use strict";function n(e,t){if(!e||!t)return e;var n=e,i=t.split(".");if(i.length)for(var o=0,r=i.length;r>o;o++)n=n[i[o]];return n}t&&t.id;return e("deepValueGetter",n),{setters:[],execute:function(){}}}),e.register("15",["4","e","14"],function(e,t){"use strict";var n,i,o,r,s=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e}],execute:function(){r=function(){function e(e){e.nativeElement.classList.add("datatable-body-cell")}return Object.defineProperty(e.prototype,"rowValue",{get:function(){return this.row?o.deepValueGetter(this.row,this.column.prop):""},enumerable:!0,configurable:!0}),s([n.Input(),a("design:type",i.TableColumn)],e.prototype,"column",void 0),s([n.Input(),a("design:type",Object)],e.prototype,"row",void 0),e=s([n.Component({selector:"datatable-body-cell",template:'\n <div class="datatable-body-cell-label">\n <span [innerHTML]="rowValue"></span>\n </div>\n ',directives:[],host:{"[style.width]":'column.width + "px"',"[style.height]":'column.height + "px"'}}),a("design:paramtypes",["function"==typeof(t="undefined"!=typeof n.ElementRef&&n.ElementRef)&&t||Object])],e);var t}(),e("DataTableBodyCell",r)}}}),e.register("16",["4","d","15"],function(e,t){"use strict";var n,i,o,r,s=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e}],execute:function(){r=function(){function e(e,t){this.state=e,t.nativeElement.classList.add("datatable-body-row")}return Object.defineProperty(e.prototype,"isSelected",{get:function(){return this.state.selected&&this.state.selected.indexOf(this.row)>-1},enumerable:!0,configurable:!0}),s([n.Input(),a("design:type",Object)],e.prototype,"row",void 0),e=s([n.Component({selector:"datatable-body-row",template:'\n <div>\n <div\n class="datatable-row-left"\n *ngIf="state.columnsByPin.left.length"\n [style.width]="state.columnGroupWidths.left + \'px\'">\n <datatable-body-cell\n *ngFor="let column of state.columnsByPin.left"\n [row]="row"\n [column]="column">\n </datatable-body-cell>\n </div>\n <div\n class="datatable-row-center"\n [style.width]="state.columnGroupWidths.center + \'px\'"\n *ngIf="state.columnsByPin.center.length">\n <datatable-body-cell\n *ngFor="let column of state.columnsByPin.center"\n [row]="row"\n [column]="column">\n </datatable-body-cell>\n </div>\n <div\n class="datatable-row-right"\n *ngIf="state.columnsByPin.right.length"\n [style.width]="state.columnGroupWidths.right + \'px\'">\n <datatable-body-cell\n *ngFor="let column of state.columnsByPin.right"\n [row]="row"\n [column]="column">\n </datatable-body-cell>\n </div>\n </div>\n ',directives:[o.DataTableBodyCell],host:{"[class.active]":"isSelected"}}),a("design:paramtypes",[i.StateService,"function"==typeof(t="undefined"!=typeof n.ElementRef&&n.ElementRef)&&t||Object])],e);var t}(),e("DataTableBodyRow",r)}}}),e.register("17",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(e){e.nativeElement.classList.add("datatable-scroll")}return Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this.count*this.rowHeight+"px"},enumerable:!0,configurable:!0}),o([n.Input(),r("design:type",Number)],e.prototype,"rowHeight",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"count",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"scrollWidth",void 0),e=o([n.Component({selector:"datatable-scroll",template:"\n <ng-content></ng-content>\n ",host:{"[style.height]":"scrollHeight","[style.width]":'scrollWidth + "px"'}}),r("design:paramtypes",["function"==typeof(t="undefined"!=typeof n.ElementRef&&n.ElementRef)&&t||Object])],e);var t}(),e("DataTableScroll",i)}}}),e.register("18",["4","d","19","11","12","13","16","17"],function(e,t){"use strict";var n,i,o,r,s,a,c,l,u,d=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),f=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e},function(e){c=e},function(e){l=e}],execute:function(){u=function(){function e(e,t){this.state=e,this.onRowClick=new n.EventEmitter,this.onRowSelect=new n.EventEmitter,t.nativeElement.classList.add("datatable-body")}return Object.defineProperty(e.prototype,"selectEnabled",{get:function(){return void 0!==this.state.options.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bodyHeight",{get:function(){return this.state.options.scrollbarV?this.state.bodyHeight+"px":"auto"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bodyWidth",{get:function(){return this.state.options.scrollbarH?this.state.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.rows=this.state.rows.slice(),this.state.onPageChange.subscribe(function(t){var n=e.state.indexes,i=n.first,o=n.last;e.rows=e.state.rows.slice(i,o),e.hideIndicator()}),this.state.onRowsUpdate.subscribe(function(t){var n=e.state.indexes,i=n.first,o=n.last;e.rows=t.slice(i,o),e.hideIndicator()})},e.prototype.hideIndicator=function(){var e=this;setTimeout(function(){e.state.options.loadingIndicator=!1},500)},e.prototype.rowClicked=function(e,t,n){this.onRowClick.emit({event:e,row:n}),this.selectRow(e,t,n)},e.prototype.rowKeydown=function(e,t,n){if(e.keyCode===r.Keys.return&&this.selectEnabled)this.selectRow(e,t,n);else if(e.keyCode===r.Keys.up||e.keyCode===r.Keys.down){var i=e.keyCode===r.Keys.up?e.target.previousElementSibling:e.target.nextElementSibling;i&&i.focus()}},e.prototype.selectRow=function(e,t,n){
if(this.selectEnabled){var i=this.state.options.selectionType===o.SelectionType.multiShift,r=this.state.options.selectionType===o.SelectionType.multi,a=[];if(i||r)if(i&&e.shiftKey){var c=this.state.selected.slice();a=s.selectRowsBetween(c,this.rows,t,this.prevIndex)}else if(i&&!e.shiftKey)a.push(n);else{var c=this.state.selected.slice();a=s.selectRows(c,n)}else a.push(n);this.prevIndex=t,this.onRowSelect.emit(a)}},d([n.Output(),f("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onRowClick",void 0),d([n.Output(),f("design:type","function"==typeof(u="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&u||Object)],e.prototype,"onRowSelect",void 0),e=d([n.Component({selector:"datatable-body",template:'\n <div>\n <datatable-progress\n [hidden]="!state.options.loadingIndicator">\n </datatable-progress>\n <datatable-scroll\n [rowHeight]="state.options.rowHeight"\n [count]="state.rowCount"\n [scrollWidth]="state.columnGroupWidths.total">\n <datatable-body-row\n *ngFor="let row of rows; let i = index;"\n [attr.tabindex]="i"\n (click)="rowClicked($event, i, row)"\n (keydown)="rowKeydown($event, i, row)"\n [row]="row">\n </datatable-body-row>\n <div\n class="empty"\n *ngIf="!rows.length"\n [innerHTML]="state.options.emptyMessage">\n </div>\n </datatable-scroll>\n </div>\n ',directives:[a.ProgressBar,c.DataTableBodyRow,l.DataTableScroll],host:{"[style.width]":"bodyWidth","[style.height]":"bodyHeight"}}),f("design:paramtypes",[i.StateService,"function"==typeof(p="undefined"!=typeof n.ElementRef&&n.ElementRef)&&p||Object])],e);var t,u,p}(),e("DataTableBody",u)}}}),e.register("6",[],function(e,t){"use strict";function n(e){var t={left:[],center:[],right:[]};if(e)for(var n=0,i=e.length;i>n;n++){var o=e[n];o.frozenLeft?t.left.push(o):o.frozenRight?t.right.push(o):t.center.push(o)}return t}function i(e,t){return{left:o(e.left),center:o(e.center),right:o(e.right),total:o(t)}}function o(e,t){var n=0;if(e)for(var i=0,o=e.length;o>i;i++){var r=e[i],s=t&&r[t];n+=s?r[t]:r.width}return n}t&&t.id;return e("columnsByPin",n),e("columnGroupWidths",i),e("columnTotalWidth",o),{setters:[],execute:function(){}}}),e.register("1a",[],function(e,t){"use strict";function n(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",e.appendChild(n);var i=n.offsetWidth;return e.parentNode.removeChild(e),t-i}t&&t.id;return e("scrollbarWidth",n),{setters:[],execute:function(){}}}),e.register("1b",["1c","f"],function(e,t){"use strict";function n(e,t){return e===r.SortType.single?t===s.SortDirection.asc?s.SortDirection.desc:s.SortDirection.asc:t?t===s.SortDirection.asc?s.SortDirection.desc:void(currentSort===s.SortDirection.desc):s.SortDirection.asc}function i(e,t){if(null!==e&&"undefined"!=typeof e||(e=0),null!==t&&"undefined"!=typeof t||(t=0),isNaN(parseFloat(e))||!isFinite(e)||isNaN(parseFloat(t))||!isFinite(t)){if(e.toLowerCase()<t.toLowerCase())return-1;if(e.toLowerCase()>t.toLowerCase())return 1}else{if(parseFloat(e)<parseFloat(t))return-1;if(parseFloat(e)>parseFloat(t))return 1}return 0}function o(e,t){var n=e.slice();return n.sort(function(e,n){for(var o=0,r=t;o<r.length;o++){var a=r[o],c=a.prop,l=a.dir,u=l!==s.SortDirection.desc?i(e[c],n[c]):-i(e[c],n[c]);if(0!==u)return u}return 0})}var r,s;t&&t.id;return e("nextSortDir",n),e("orderByComparator",i),e("sortRows",o),{setters:[function(e){r=e},function(e){s=e}],execute:function(){}}}),e.register("1d",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){n=function(){function e(e){Object.assign(this,e)}return e}(),e("Sort",n)}}}),e.register("d",["4","6","1a","1b","1d","1c"],function(e,t){"use strict";var n,i,o,r,s,a,c,l=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),u=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e}],execute:function(){c=function(){function e(){this.onRowsUpdate=new n.EventEmitter,this.onPageChange=new n.EventEmitter,this.scrollbarWidth=o.scrollbarWidth(),this.offsetX=0,this.offsetY=0,this.innerWidth=0,this.bodyHeight=300}return Object.defineProperty(e.prototype,"columnsByPin",{get:function(){return i.columnsByPin(this.options.columns)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnGroupWidths",{get:function(){return i.columnGroupWidths(this.columnsByPin,this.options.columns)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageCount",{get:function(){return this.options.externalPaging?this.options.count:this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageSize",{get:function(){return this.options.scrollbarV?Math.ceil(this.bodyHeight/this.options.rowHeight)+1:this.options.limit},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indexes",{get:function(){var e=0,t=0;return this.options.scrollbarV?(e=Math.max(Math.floor((this.offsetY||0)/this.options.rowHeight,0),0),t=Math.min(e+this.pageSize,this.pageCount)):(e=Math.max(this.options.offset*this.options.limit,0),t=Math.min(e+this.pageSize,this.pageCount)),{first:e,last:t}},enumerable:!0,configurable:!0}),e.prototype.setSelected=function(e){return this.selected=e,this},e.prototype.setRows=function(e){return this.rows=e.slice(),this.onRowsUpdate.emit(e),this},e.prototype.setOptions=function(e){return this.options=e,this},e.prototype.setPage=function(e){this.options.offset=e-1,this.onPageChange.emit({offset:this.options.offset,limit:this.pageSize,pageCount:this.pageCount})},e.prototype.nextSort=function(e){var t=this.options.sorts.findIndex(function(t){return t.prop===e.prop}),n=this.options.sorts[t],i=void 0;n&&(i=n.dir);var o=r.nextSortDir(this.options.sortType,i);void 0===o?this.options.sorts.splice(t,1):n?this.options.sorts[t].dir=o:(this.options.sortType===a.SortType.single&&this.options.sorts.splice(0,this.options.sorts.length),this.options.sorts.push(new s.Sort({dir:o,prop:e.prop}))),e.comparator?e.comparator(this.rows,this.options.sorts):this.setRows(r.sortRows(this.rows,this.options.sorts))},e=l([n.Injectable(),u("design:paramtypes",[])],e)}(),e("StateService",c)}}}),e.register("1e",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(e){this.page=1,this.size=0,this.count=0,this.onPaged=new n.EventEmitter,e.nativeElement.classList.add("datatable-pager")}return Object.defineProperty(e.prototype,"totalPages",{get:function(){var e=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(e||0,1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},set:function(e){this._count=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){this._page=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),e.prototype.canPrevious=function(){return this.page>1},e.prototype.canNext=function(){return this.page<this.totalPages},e.prototype.prevPage=function(){this.page>1&&this.selectPage(--this.page)},e.prototype.nextPage=function(){this.selectPage(++this.page)},e.prototype.selectPage=function(e){e>0&&e<=this.totalPages&&(this.page=e,this.onPaged.emit(e))},e.prototype.calcPages=function(e){var t=[],n=1,i=this.totalPages,o=5,r=o<this.totalPages;e=e||this.page,r&&(n=(Math.ceil(e/o)-1)*o+1,i=Math.min(n+o-1,this.totalPages));for(var s=n;i>=s;s++)t.push({number:s,text:s});return t},o([n.Input(),r("design:type",Number)],e.prototype,"page",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"size",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"count",void 0),o([n.Output(),r("design:type","function"==typeof(t="undefined"!=typeof n.EventEmitter&&n.EventEmitter)&&t||Object)],e.prototype,"onPaged",void 0),e=o([n.Component({selector:"datatable-pager",template:'\n <ul class="pager">\n <li [attr.disabled]="!canPrevious()">\n <a\n href="javascript:void(0)"\n (click)="selectPage(1)"\n class="icon-prev">\n </a>\n </li>\n <li [attr.disabled]="!canPrevious()">\n <a\n href="javascript:void(0)"\n (click)="prevPage()"\n class="icon-left">\n </a>\n </li>\n <li\n *ngFor="let pg of pages"\n [class.active]="pg.number === page">\n <a\n href="javascript:void(0)"\n (click)="selectPage(pg.number)">\n {{pg.text}}\n </a>\n </li>\n <li [attr.disabled]="!canNext()">\n <a\n href="javascript:void(0)"\n (click)="nextPage()"\n class="icon-right">\n </a>\n </li>\n <li [attr.disabled]="!canNext()">\n <a\n href="javascript:void(0)"\n (click)="selectPage(totalPages)"\n class="icon-skip">\n </a>\n </li>\n </ul>\n '}),r("design:paramtypes",["function"==typeof(i="undefined"!=typeof n.ElementRef&&n.ElementRef)&&i||Object])],e);var t,i}(),e("DataTablePager",i)}}}),e.register("1f",["4","d","1e"],function(e,t){"use strict";var n,i,o,r,s=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e}],execute:function(){r=function(){function e(e,t){this.state=t,this.onPageChange=new n.EventEmitter,e.nativeElement.classList.add("datatable-footer")}return Object.defineProperty(e.prototype,"visible",{get:function(){return this.state.pageCount/this.state.pageSize>1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"curPage",{get:function(){return this.state.options.offset+1},enumerable:!0,configurable:!0}),s([n.Output(),a("design:type",Object)],e.prototype,"onPageChange",void 0),e=s([n.Component({selector:"datatable-footer",template:'\n <div\n *ngIf="state.options.footerHeight"\n [style.height]="state.options.footerHeight">\n <div class="page-count">{{state.pageCount}} total</div>\n <datatable-pager\n [page]="curPage"\n [size]="state.pageSize"\n (onPaged)="onPageChange.emit($event)"\n [count]="state.pageCount"\n [hidden]="!visible">\n </datatable-pager>\n </div>\n ',directives:[o.DataTablePager]}),a("design:paramtypes",["function"==typeof(t="undefined"!=typeof n.ElementRef&&n.ElementRef)&&t||Object,i.StateService])],e);var t}(),e("DataTableFooter",r)}}}),e.register("20",["4","d","3","5","21","22","10","18","1f"],function(e,t){"use strict";var n,i,o,r,s,a,c,l,u,d,f=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),p=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e},function(e){c=e},function(e){l=e},function(e){u=e}],execute:function(){d=function(){function e(e,t,i){this.state=t,this.onPageChange=new n.EventEmitter,this.onRowsUpdate=new n.EventEmitter,this.onRowClick=new n.EventEmitter,this.onSelectionChange=new n.EventEmitter,this.onColumnChange=new n.EventEmitter,this.element=e.nativeElement,this.element.classList.add("datatable"),this.differ=i.find({}).create(null)}return e.prototype.ngOnInit=function(){var e=this,t=e.options,n=e.rows,i=e.selected;this.state.setOptions(t).setRows(n).setSelected(i)},e.prototype.ngAfterViewInit=function(){this.adjustColumns()},e.prototype.ngDoCheck=function(){this.differ.diff(this.rows)&&(this.state.setRows(this.rows),this.onRowsUpdate.emit(this.rows))},e.prototype.adjustSizes=function(){var e=this.element.getBoundingClientRect(),t=e.height,n=e.width;this.state.innerWidth=Math.floor(n),this.options.scrollbarV&&(this.options.headerHeight&&(t=-this.options.headerHeight),this.options.footerHeight&&(t=-this.options.footerHeight),this.state.bodyHeight=t),this.adjustColumns()},e.prototype.resize=function(){this.adjustSizes()},e.prototype.adjustColumns=function(e){var t=this.state.innerWidth;this.options.scrollbarV&&(t=-this.state.scrollbarWidth),this.options.columnMode===s.ColumnMode.force?r.forceFillColumnWidths(this.options.columns,t,e):this.options.columnMode===s.ColumnMode.flex&&r.adjustColumnWidths(this.options.columns,t)},e.prototype.onPageChanged=function(e){this.state.setPage(e),this.onPageChange.emit(e)},f([n.Input(),p("design:type",a.TableOptions)],e.prototype,"options",void 0),f([n.Input(),p("design:type",Array)],e.prototype,"rows",void 0),f([n.Input(),p("design:type",Array)],e.prototype,"selected",void 0),f([n.Output(),p("design:type",Object)],e.prototype,"onPageChange",void 0),f([n.Output(),p("design:type",Object)],e.prototype,"onRowsUpdate",void 0),f([n.Output(),p("design:type",Object)],e.prototype,"onRowClick",void 0),f([n.Output(),p("design:type",Object)],e.prototype,"onSelectionChange",void 0),f([n.Output(),p("design:type",Object)],e.prototype,"onColumnChange",void 0),f([n.HostListener("window:resize"),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",void 0)],e.prototype,"resize",null),e=f([n.Component({selector:"datatable",template:'\n <div\n visibility-observer\n (onVisibilityChange)="adjustSizes()">\n <datatable-header\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header>\n <datatable-body\n (onRowClick)="onRowClick.emit($event)"\n (onRowSelect)="state.setSelected($event)">\n </datatable-body>\n <datatable-footer\n (onPageChange)="onPageChanged($event)">\n </datatable-footer>\n </div>\n ',directives:[c.DataTableHeader,l.DataTableBody,u.DataTableFooter,o.Visibility],host:{"[class.fixed-header]":'options.headerHeight !== "auto"',"[class.fixed-row]":'options.rowHeight !== "auto"',"[class.scroll-vertical]":"options.scrollbarV","[class.scroll-horz]":"options.scrollbarH","[class.selectable]":"options.selectable","[class.checkboxable]":"options.checkboxable"},providers:[i.StateService]}),p("design:paramtypes",["function"==typeof(t="undefined"!=typeof n.ElementRef&&n.ElementRef)&&t||Object,i.StateService,"function"==typeof(d="undefined"!=typeof n.KeyValueDiffers&&n.KeyValueDiffers)&&d||Object])],e);var t,d}(),e("DataTable",d)}}}),e.register("22",["21","1c"],function(e,t){"use strict";var n,i,o;t&&t.id;return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=n.ColumnMode.standard,this.loadingMessage="Loading...",this.emptyMessage="No data to display",this.headerHeight=30,this.footerHeight=0,this.externalPaging=!1,this.limit=void 0,this.count=0,this.offset=0,this.loadingIndicator=!1,this.reorderable=!0,this.sortType=i.SortType.single,this.sorts=[],Object.assign(this,e)}return e}(),e("TableOptions",o)}}}),e.register("23",[],function(e,t){"use strict";function n(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}t&&t.id;return e("id",n),{setters:[],execute:function(){}}}),e.register("24",[],function(e,t){"use strict";function n(e){return e=e.replace(/[^a-zA-Z0-9 ]/g," "),e=e.replace(/([a-z](?=[A-Z]))/g,"$1 "),e=e.replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase(),e=e.replace(/([ 0-9]+)([a-zA-Z])/g,function(e,t,n){return t.trim()+n.toUpperCase()})}t&&t.id;return e("camelCase",n),{setters:[],execute:function(){}}}),e.register("e",["23","24"],function(e,t){"use strict";var n,i,o;t&&t.id;return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.$id=n.id(),this.frozenLeft=!1,this.frozenRight=!1,this.flexGrow=0,this.minWidth=100,this.maxWidth=void 0,this.width=150,this.resizable=!0,this.comparator=void 0,this.sortable=!0,this.draggable=!0,this.canAutoResize=!0,Object.assign(this,e),!this.prop&&this.name&&(this.prop=i.camelCase(this.name))}return e}(),e("TableColumn",o)}}}),e.register("19",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.single="single"]="single",e[e.multi="multi"]="multi",e[e.multiShift="multiShift"]="multiShift"}(n||(n={})),e("SelectionType",n)}}}),e.register("21",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.standard="standard"]="standard",e[e.flex="flex"]="flex",e[e.force="force"]="force"}(n||(n={})),e("ColumnMode",n)}}}),e.register("f",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.asc="asc"]="asc",e[e.desc="desc"]="desc"}(n||(n={})),e("SortDirection",n)}}}),e.register("1c",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.single="single"]="single",e[e.multi="multi"]="multi"}(n||(n={})),e("SortType",n)}}}),e.register("1",["20","22","e","19","21","f","1c"],function(e,t){"use strict";t&&t.id;return{setters:[function(t){e({DataTable:t.DataTable})},function(t){e({TableOptions:t.TableOptions})},function(t){e({TableColumn:t.TableColumn})},function(t){e({SelectionType:t.SelectionType})},function(t){e({ColumnMode:t.ColumnMode})},function(t){e({SortDirection:t.SortDirection})},function(t){e({SortType:t.SortType})}],execute:function(){}}})})(function(e){if("function"==typeof define&&define.amd)define(["@angular/core/index.js","rxjs/Rx.js"],e);else{if("object"!=typeof module||!module.exports||"function"!=typeof require)throw new Error("Module must be loaded as AMD or CommonJS");module.exports=e(require("@angular/core/index.js"),require("rxjs/Rx.js"))}});
!function(e){function t(e,t,n){e in c||(c[e]={name:e,declarative:!0,deps:t,declare:n,normalizedDeps:t})}function n(e){return p[e]||(p[e]={name:e,dependencies:[],exports:{},importers:[]})}function i(t){if(!t.module){var o=t.module=n(t.name),r=t.module.exports,s=t.declare.call(e,function(e,t){if(o.locked=!0,"object"==typeof e)for(var n in e)r[n]=e[n];else r[e]=t;for(var i=0,s=o.importers.length;s>i;i++){var a=o.importers[i];if(!a.locked)for(var c=0;c<a.dependencies.length;++c)a.dependencies[c]===o&&a.setters[c](r)}return o.locked=!1,t},t.name);o.setters=s.setters,o.execute=s.execute;for(var l=0,u=t.normalizedDeps.length;u>l;l++){var d,f=t.normalizedDeps[l],h=c[f],g=p[f];g?d=g.exports:h&&!h.declarative?d=h.esModule:h?(i(h),g=h.module,d=g.exports):d=a(f),g&&g.importers?(g.importers.push(o),o.dependencies.push(g)):o.dependencies.push(null),o.setters[l]&&o.setters[l](d)}}}function o(t){var n={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(u)for(var i in t)"default"!==i&&r(n,t,i);else{var o=t&&t.hasOwnProperty;for(var i in t)"default"===i||o&&!t.hasOwnProperty(i)||(n[i]=t[i])}return n.default=t,d(n,"__useDefault",{value:!0}),n}function r(e,t,n){try{var i;(i=Object.getOwnPropertyDescriptor(t,n))&&d(e,n,i)}catch(i){return e[n]=t[n],!1}}function s(t,n){var i=c[t];if(i&&!i.evaluated&&i.declarative){n.push(t);for(var o=0,r=i.normalizedDeps.length;r>o;o++){var u=i.normalizedDeps[o];-1==l.call(n,u)&&(c[u]?s(u,n):a(u))}i.evaluated||(i.evaluated=!0,i.module.execute.call(e))}}function a(e){if(h[e])return h[e];if("@node/"==e.substr(0,6))return f(e.substr(6));var t=c[e];if(!t)throw"Module "+e+" not present.";return i(c[e]),s(e,[]),c[e]=void 0,t.declarative&&d(t.module.exports,"__esModule",{value:!0}),h[e]=t.declarative?t.module.exports:t.esModule}var c={},l=Array.prototype.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},u=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(e){u=!1}var d;!function(){try{Object.defineProperty({},"a",{})&&(d=Object.defineProperty)}catch(e){d=function(e,t,n){try{e[t]=n.value||n.get.call(e)}catch(e){}}}}();var p={},f="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&require.resolve&&"undefined"!=typeof process&&require,h={"@empty":{}};return function(e,n,i,r){return function(s){s(function(s){for(var c=0;c<n.length;c++)(function(e,t){t&&t.__esModule?h[e]=t:h[e]=o(t)})(n[c],arguments[c]);r({register:t});var l=a(e[0]);if(e.length>1)for(var c=1;c<e.length;c++)a(e[c]);return i?l.default:l})}}}("undefined"!=typeof self?self:global)(["1"],["4","9"],!1,function(e){this.require,this.exports,this.module;e.register("2",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){n=function(){function e(e,t){this.callback=t,window.IntersectionObserver?(this.observer=new IntersectionObserver(this.processChanges.bind(this),{threshold:[.5]}),this.observer.observe(e)):this.runPolyfill(e)}return e.prototype.runPolyfill=function(e){var t=this,n=function(){var i=e.getBoundingClientRect(),o=i.width,r=i.height;o&&r?t.callback&&t.callback():setTimeout(function(){return n()},10)};n()},e.prototype.isVisible=function(e,t){return t.width*t.height/(e.width*e.height)>=.5},e.prototype.visibleTimerCallback=function(e,t){delete e.visibleTimeout,this.processChanges(t.takeRecords()),"isVisible"in e&&(delete e.isVisible,this.callback&&this.callback(),t.unobserve(e))},e.prototype.processChanges=function(e){var t=this;e.forEach(function(e){var n=e.target;n.isVisible=t.isVisible(e.boundingClientRect,e.intersectionRect),"isVisible"in n?n.visibleTimeout=setTimeout(t.visibleTimerCallback.bind(t),1e3,n,t.observer):"visibleTimeout"in n&&(clearTimeout(n.visibleTimeout),delete n.visibleTimeout)})},e}(),e("VisibilityObserver",n)}}}),e.register("3",["4","2"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.visible=!1,this.onVisibilityChange=new n.EventEmitter,new i.VisibilityObserver(e.nativeElement,this.visbilityChange.bind(this))}return e.prototype.visbilityChange=function(){this.visible=!0,this.onVisibilityChange.emit(!0)},r([n.HostBinding("class.visible"),s("design:type",Boolean)],e.prototype,"visible",void 0),r([n.Output(),s("design:type",n.EventEmitter)],e.prototype,"onVisibilityChange",void 0),e=r([n.Directive({selector:"[visibility-observer]"}),s("design:paramtypes",[n.ElementRef])],e)}(),e("Visibility",o)}}}),e.register("5",["6"],function(e,t){"use strict";function n(e,t){for(var n=0,i=0,o=e;i<o.length;i++){var r=o[i],s=t&&r[t];n+=s?r[t]:r.width}return n}function i(e){for(var t=0,n=0,i=e;n<i.length;n++){var o=i[n];t+=o.flexGrow||0}return t}function o(e,t){var o=n(e),s=i(e),c=a.columnsByPin(e);o!==t&&r(c,t,s)}function r(e,t,n){for(var i in e)for(var o=0,r=e[i];o<r.length;o++){var s=r[o];s.canAutoResize?s.width=0:(t-=s.width,n-=s.flexGrow)}var a={},c=t;do{var l=c/n;c=0;for(var i in e)for(var u=0,d=e[i];u<d.length;u++){var s=d[u];if(s.canAutoResize&&!a[s.prop]){var p=s.width+s.flexGrow*l;void 0!==s.minWidth&&p<s.minWidth?(c+=p-s.minWidth,s.width=s.minWidth,a[s.prop]=!0):s.width=p}}}while(0!==c)}function s(e,t,n){for(var i=0,o=n>-1?e.slice(n,e.length).filter(function(e){return e.canAutoResize}):e.filter(function(e){return e.canAutoResize}),r=0,s=e;r<s.length;r++){var a=s[r];i+=a.canAutoResize?a.$$oldWidth||a.width:a.width}for(var c=t-i,l=c/o.length,u=i>t,d=0,p=o;d<p.length;d++){var a=p[d];if(u)a.width=a.$$oldWidth||a.width;else{a.$$oldWidth||(a.$$oldWidth=a.width);var f=a.$$oldWidth+l;a.minWith&&f<a.minWidth?a.width=a.minWidth:a.maxWidth&&f>a.maxWidth?a.width=a.maxWidth:a.width=f}}}var a;t&&t.id;return e("columnTotalWidth",n),e("getTotalFlexGrow",i),e("adjustColumnWidths",o),e("forceFillColumnWidths",s),{setters:[function(e){a=e}],execute:function(){}}}),e.register("7",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(){this.duration=500,this.onLongPress=new n.EventEmitter,this.onLongPressing=new n.EventEmitter,this.onLongPressEnd=new n.EventEmitter}return Object.defineProperty(e.prototype,"press",{get:function(){return this._pressing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"longPress",{get:function(){return this._longPressing},enumerable:!0,configurable:!0}),e.prototype.onMouseDown=function(e){var t=this;1===e.which&&(this._pressing=!0,this._longPressing=!1,this._timeout=setTimeout(function(){t._longPressing=!0,t.onLongPress.emit(e),t._interval=setInterval(function(){t.onLongPressing.emit(e)},50)},this.duration))},e.prototype.endPress=function(){clearTimeout(this._timeout),clearInterval(this._interval),this._longPressing=!1,this._pressing=!1,this.onLongPressEnd.emit()},o([n.Input(),r("design:type",Number)],e.prototype,"duration",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"onLongPress",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"onLongPressing",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"onLongPressEnd",void 0),o([n.HostBinding("class.press"),r("design:type",Object)],e.prototype,"press",null),o([n.HostBinding("class.longpress"),r("design:type",Object)],e.prototype,"longPress",null),o([n.HostListener("mousedown",["$event"]),r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"onMouseDown",null),o([n.HostListener("mouseup"),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"endPress",null),e=o([n.Directive({selector:"[long-press]"}),r("design:paramtypes",[])],e)}(),e("LongPress",i)}}}),e.register("8",["4","9"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){if(this.resizeEnabled=!0,this.onResize=new n.EventEmitter,this.prevScreenX=0,this.resizing=!1,this.element=e.nativeElement,this.resizeEnabled){var t=document.createElement("span");t.classList.add("resize-handle"),this.element.appendChild(t)}}return e.prototype.onMouseup=function(e){this.resizing=!1,this.subcription&&(this.subcription.unsubscribe(),this.onResize.emit(this.element.clientWidth))},e.prototype.onMousedown=function(e){var t=this,n=e.target.classList.contains("resize-handle");n&&(e.stopPropagation(),this.resizing=!0,this.subcription=i.Observable.fromEvent(document,"mousemove").subscribe(function(e){return t.move(e)}))},e.prototype.move=function(e){var t=e.movementX||e.mozMovementX||e.screenX-this.prevScreenX,n=this.element.clientWidth,i=n+(t||0);this.prevScreenX=e.screenX;var o=!this.minWidth||i>=this.minWidth,r=!this.maxWidth||i<=this.maxWidth;o&&r&&(this.element.style.width=i+"px")},r([n.Input(),s("design:type",Boolean)],e.prototype,"resizeEnabled",void 0),r([n.Input(),s("design:type",Number)],e.prototype,"minWidth",void 0),r([n.Input(),s("design:type",Number)],e.prototype,"maxWidth",void 0),r([n.Output(),s("design:type",n.EventEmitter)],e.prototype,"onResize",void 0),r([n.HostListener("document:mouseup",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMouseup",null),r([n.HostListener("mousedown",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMousedown",null),e=r([n.Directive({selector:"[resizable]",host:{"[class.resizable]":"resizeEnabled"}}),s("design:paramtypes",[n.ElementRef])],e)}(),e("Resizable",o)}}}),e.register("a",["4","9"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.dragX=!0,this.dragY=!0,this.onDragStart=new n.EventEmitter,this.onDragging=new n.EventEmitter,this.onDragEnd=new n.EventEmitter,this.dragging=!1,this.element=e.nativeElement}return e.prototype.onMouseup=function(e){this.dragging=!1,this.subscription&&(this.subscription.unsubscribe(),this.onDragEnd.emit({event:e,element:this.element,model:this.model}))},e.prototype.onMousedown=function(e){var t=this;if(e.target.classList.contains("draggable")){e.preventDefault(),this.dragging=!0;var n={x:e.clientX,y:e.clientY};this.subscription=i.Observable.fromEvent(document,"mousemove").subscribe(function(e){return t.move(e,n)}),this.onDragStart.emit({event:e,element:this.element,model:this.model})}},e.prototype.move=function(e,t){if(this.dragging){var n=e.clientX-t.x,i=e.clientY-t.y;this.dragX&&(this.element.style.left=n+"px"),this.dragY&&(this.element.style.top=i+"px"),(this.dragX||this.dragY)&&this.onDragging.emit({event:e,element:this.element,model:this.model})}},r([n.Input(),s("design:type",Object)],e.prototype,"model",void 0),r([n.Input(),s("design:type",Boolean)],e.prototype,"dragX",void 0),r([n.Input(),s("design:type",Boolean)],e.prototype,"dragY",void 0),r([n.Output(),s("design:type",n.EventEmitter)],e.prototype,"onDragStart",void 0),r([n.Output(),s("design:type",n.EventEmitter)],e.prototype,"onDragging",void 0),r([n.Output(),s("design:type",n.EventEmitter)],e.prototype,"onDragEnd",void 0),r([n.HostListener("document:mouseup",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMouseup",null),r([n.HostListener("mousedown",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"onMousedown",null),e=r([n.Directive({selector:"[draggable]"}),s("design:paramtypes",[n.ElementRef])],e)}(),e("Draggable",o)}}}),e.register("b",["4","a"],function(e,t){"use strict";var n,i,o,r=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(){this.onReorder=new n.EventEmitter}return e.prototype.ngAfterContentInit=function(){var e=this;this.drags.forEach(function(t){return t.onDragStart.subscribe(e.onDragStart.bind(e))&&t.onDragEnd.subscribe(e.onDragEnd.bind(e))})},e.prototype.onDragStart=function(){this.positions={};for(var e=0,t=0,n=this.drags.toArray();t<n.length;t++){var i=n[t],o=i.element;this.positions[i.model.prop]={left:parseInt(o.offsetLeft),index:e++}}},e.prototype.onDragEnd=function(e){var t=e.element,n=e.model,i=parseInt(t.offsetLeft),o=this.positions[n.prop],r=0;for(var s in this.positions){var a=this.positions[s],c=i<a.left&&o.left>a.left,l=i>a.left&&o.left<a.left;(c||l)&&this.onReorder.emit({prevIndex:o.index,newIndex:r,model:n}),r++}t.style.left="auto"},r([n.Output(),s("design:type",n.EventEmitter)],e.prototype,"onReorder",void 0),r([n.ContentChildren(i.Draggable),s("design:type",n.QueryList)],e.prototype,"drags",void 0),e=r([n.Directive({selector:"[orderable]"}),s("design:paramtypes",[])],e)}(),e("Orderable",o)}}}),e.register("c",["4","d","e","f"],function(e,t){"use strict";var n,i,o,r,s,a=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),c=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e}],execute:function(){s=function(){function e(e,t){this.element=e,this.state=t,this.onColumnChange=new n.EventEmitter,e.nativeElement.classList.add("datatable-header-cell")}return Object.defineProperty(e.prototype,"sortDir",{get:function(){var e=this,t=this.state.options.sorts.find(function(t){return t.prop===e.model.prop});return t?t.dir:void 0},enumerable:!0,configurable:!0}),e.prototype.sortClasses=function(e){var t=this.sortDir;return{"sort-asc icon-down":t===r.SortDirection.asc,"sort-desc icon-up":t===r.SortDirection.desc}},e.prototype.onSort=function(){this.model.sortable&&(this.state.nextSort(this.model),this.onColumnChange.emit({type:"sort",value:this.model}))},a([n.Input(),c("design:type",o.TableColumn)],e.prototype,"model",void 0),a([n.Output(),c("design:type",n.EventEmitter)],e.prototype,"onColumnChange",void 0),e=a([n.Component({selector:"datatable-header-cell",template:'\n <div>\n <span\n class="datatable-header-cell-label draggable"\n (click)="onSort()"\n [innerHTML]="model.name">\n </span>\n <span\n class="sort-btn"\n [ngClass]="sortClasses()">\n </span>\n </div>\n ',host:{"[class.sortable]":"model.sortable","[class.resizable]":"model.resizable","[style.width]":'model.width + "px"',"[style.minWidth]":'model.minWidth + "px"',"[style.maxWidth]":'model.maxWidth + "px"',"[style.height]":'model.height + "px"',"[attr.title]":"model.name"}}),c("design:paramtypes",[n.ElementRef,i.StateService])],e)}(),e("DataTableHeaderCell",s)}}}),e.register("10",["4","d","7","a","8","b","c"],function(e,t){"use strict";var n,i,o,r,s,a,c,l,u=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),d=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e},function(e){c=e}],execute:function(){l=function(){function e(e,t){this.state=e,this.onColumnChange=new n.EventEmitter,t.nativeElement.classList.add("datatable-header")}return Object.defineProperty(e.prototype,"headerWidth",{get:function(){return this.state.options.scrollbarH?this.state.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"headerHeight",{get:function(){var e=this.state.options.headerHeight;return"auto"!==e?e+"px":e},enumerable:!0,configurable:!0}),e.prototype.columnResized=function(e,t){t.width=e,this.onColumnChange.emit({type:"resize",value:t})},e.prototype.columnReordered=function(e){var t=e.prevIndex,n=e.newIndex,i=e.model;this.state.options.columns.splice(t,1),this.state.options.columns.splice(n,0,i),this.onColumnChange.emit({type:"reorder",value:i})},u([n.Output(),d("design:type",n.EventEmitter)],e.prototype,"onColumnChange",void 0),e=u([n.Component({selector:"datatable-header",template:'\n <div\n [style.width]="state.columnGroupWidths.total"\n class="datatable-header-inner"\n orderable\n (onReorder)="columnReordered($event)">\n <div\n class="datatable-row-left"\n [style.width]="state.columnGroupWidths.left + \'px\'"\n *ngIf="state.columnsByPin.left.length">\n <datatable-header-cell\n *ngFor="let column of state.columnsByPin.left"\n resizable\n [resizeEnabled]="column.resizable"\n (onResize)="columnResized($event, column)"\n long-press\n (onLongPress)="draggable = true"\n (onLongPressEnd)="draggable = false"\n draggable\n [dragX]="column.draggable && draggable"\n [dragY]="false"\n [model]="column"\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header-cell>\n </div>\n <div\n class="datatable-row-center"\n [style.width]="state.columnGroupWidths.center + \'px\'"\n *ngIf="state.columnsByPin.center.length">\n <datatable-header-cell\n *ngFor="let column of state.columnsByPin.center"\n resizable\n [resizeEnabled]="column.resizable"\n (onResize)="columnResized($event, column)"\n long-press\n (onLongPress)="draggable = true"\n (onLongPressEnd)="draggable = false"\n draggable\n [dragX]="column.draggable && draggable"\n [dragY]="false"\n [model]="column"\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header-cell>\n </div>\n <div\n class="datatable-row-right"\n [style.width]="state.columnGroupWidths.right + \'px\'"\n *ngIf="state.columnsByPin.right.length">\n <datatable-header-cell\n *ngFor="let column of state.columnsByPin.right"\n resizable\n [resizeEnabled]="column.resizable"\n (onResize)="columnResized($event, column)"\n long-press\n (onLongPress)="draggable = true"\n (onLongPressEnd)="draggable = false"\n draggable\n [dragX]="column.draggable && draggable"\n [dragY]="false"\n [model]="column"\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header-cell>\n </div>\n </div>\n ',directives:[c.DataTableHeaderCell,r.Draggable,s.Resizable,a.Orderable,o.LongPress],host:{"[style.width]":"headerWidth","[style.height]":"headerHeight"}}),d("design:paramtypes",[i.StateService,n.ElementRef])],e)}(),e("DataTableHeader",l)}}}),e.register("11",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.up=38]="up",e[e.down=40]="down",e[e.return=13]="return",e[e.escape=27]="escape"}(n||(n={})),e("Keys",n)}}}),e.register("12",[],function(e,t){"use strict";function n(e,t){var n=e.indexOf(t);return n>-1?e.splice(n,1):e.push(t),e}function i(e,t,n,i){for(var o=i>n,r=0,s=t.length;s>r;r++){var a=t[r],c=r>=i&&n>=r,l=i>=r&&r>=n,u={start:0,end:0};if(u=o?{start:n,end:i-n}:{start:i,end:n+1},o&&l||!o&&c){var d=e.indexOf(a);if(o&&d>-1){e.splice(d,1);continue}r>=u.start&&r<u.end&&-1===d&&e.push(a)}}return e}t&&t.id;return e("selectRows",n),e("selectRowsBetween",i),{setters:[],execute:function(){}}}),e.register("13",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(){}return e=o([n.Component({selector:"datatable-progress",template:'\n <div\n class="progress-linear"\n role="progressbar">\n <div class="container">\n <div class="bar"></div>\n </div>\n </div>\n '}),r("design:paramtypes",[])],e)}(),e("ProgressBar",i)}}}),e.register("14",[],function(e,t){"use strict";function n(e,t){if(!e||!t)return e;var n=e,i=t.split(".");if(i.length)for(var o=0,r=i.length;r>o;o++)n=n[i[o]];return n}t&&t.id;return e("deepValueGetter",n),{setters:[],execute:function(){}}}),e.register("15",["4","e","14"],function(e,t){"use strict";var n,i,o,r,s=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e}],execute:function(){r=function(){function e(e){e.nativeElement.classList.add("datatable-body-cell")}return Object.defineProperty(e.prototype,"rowValue",{get:function(){return this.row?o.deepValueGetter(this.row,this.column.prop):""},enumerable:!0,configurable:!0}),s([n.Input(),a("design:type",i.TableColumn)],e.prototype,"column",void 0),s([n.Input(),a("design:type",Object)],e.prototype,"row",void 0),e=s([n.Component({selector:"datatable-body-cell",template:'\n <div class="datatable-body-cell-label">\n <span [innerHTML]="rowValue"></span>\n </div>\n ',directives:[],host:{"[style.width]":'column.width + "px"',"[style.height]":'column.height + "px"'}}),a("design:paramtypes",[n.ElementRef])],e)}(),e("DataTableBodyCell",r)}}}),e.register("16",["4","d","15"],function(e,t){"use strict";var n,i,o,r,s=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e}],execute:function(){r=function(){function e(e,t){this.state=e,t.nativeElement.classList.add("datatable-body-row")}return Object.defineProperty(e.prototype,"isSelected",{get:function(){return this.state.selected&&this.state.selected.indexOf(this.row)>-1},enumerable:!0,configurable:!0}),s([n.Input(),a("design:type",Object)],e.prototype,"row",void 0),e=s([n.Component({selector:"datatable-body-row",template:'\n <div>\n <div\n class="datatable-row-left"\n *ngIf="state.columnsByPin.left.length"\n [style.width]="state.columnGroupWidths.left + \'px\'">\n <datatable-body-cell\n *ngFor="let column of state.columnsByPin.left"\n [row]="row"\n [column]="column">\n </datatable-body-cell>\n </div>\n <div\n class="datatable-row-center"\n [style.width]="state.columnGroupWidths.center + \'px\'"\n *ngIf="state.columnsByPin.center.length">\n <datatable-body-cell\n *ngFor="let column of state.columnsByPin.center"\n [row]="row"\n [column]="column">\n </datatable-body-cell>\n </div>\n <div\n class="datatable-row-right"\n *ngIf="state.columnsByPin.right.length"\n [style.width]="state.columnGroupWidths.right + \'px\'">\n <datatable-body-cell\n *ngFor="let column of state.columnsByPin.right"\n [row]="row"\n [column]="column">\n </datatable-body-cell>\n </div>\n </div>\n ',directives:[o.DataTableBodyCell],host:{"[class.active]":"isSelected"}}),a("design:paramtypes",[i.StateService,n.ElementRef])],e)}(),e("DataTableBodyRow",r)}}}),e.register("17",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(e){e.nativeElement.classList.add("datatable-scroll")}return Object.defineProperty(e.prototype,"scrollHeight",{get:function(){return this.count*this.rowHeight+"px"},enumerable:!0,configurable:!0}),o([n.Input(),r("design:type",Number)],e.prototype,"rowHeight",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"count",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"scrollWidth",void 0),e=o([n.Component({selector:"datatable-scroll",template:"\n <ng-content></ng-content>\n ",host:{"[style.height]":"scrollHeight","[style.width]":'scrollWidth + "px"'}}),r("design:paramtypes",[n.ElementRef])],e)}(),e("DataTableScroll",i)}}}),e.register("18",["4","d","19","11","12","13","16","17"],function(e,t){"use strict";var n,i,o,r,s,a,c,l,u,d=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),p=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e},function(e){c=e},function(e){l=e}],execute:function(){u=function(){function e(e,t){this.state=e,this.onRowClick=new n.EventEmitter,this.onRowSelect=new n.EventEmitter,t.nativeElement.classList.add("datatable-body")}return Object.defineProperty(e.prototype,"selectEnabled",{get:function(){return void 0!==this.state.options.selectionType},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bodyHeight",{get:function(){return this.state.options.scrollbarV?this.state.bodyHeight+"px":"auto"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bodyWidth",{get:function(){return this.state.options.scrollbarH?this.state.innerWidth+"px":"100%"},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.rows=this.state.rows.slice(),this.state.onPageChange.subscribe(function(t){var n=e.state.indexes,i=n.first,o=n.last;e.rows=e.state.rows.slice(i,o),e.hideIndicator()}),this.state.onRowsUpdate.subscribe(function(t){var n=e.state.indexes,i=n.first,o=n.last;e.rows=t.slice(i,o),e.hideIndicator()})},e.prototype.hideIndicator=function(){var e=this;setTimeout(function(){e.state.options.loadingIndicator=!1},500)},e.prototype.rowClicked=function(e,t,n){this.onRowClick.emit({event:e,row:n}),this.selectRow(e,t,n)},e.prototype.rowKeydown=function(e,t,n){if(e.keyCode===r.Keys.return&&this.selectEnabled)this.selectRow(e,t,n);else if(e.keyCode===r.Keys.up||e.keyCode===r.Keys.down){var i=e.keyCode===r.Keys.up?e.target.previousElementSibling:e.target.nextElementSibling;i&&i.focus()}},e.prototype.selectRow=function(e,t,n){if(this.selectEnabled){var i=this.state.options.selectionType===o.SelectionType.multiShift,r=this.state.options.selectionType===o.SelectionType.multi,a=[];if(i||r)if(i&&e.shiftKey){var c=this.state.selected.slice();a=s.selectRowsBetween(c,this.rows,t,this.prevIndex)}else if(i&&!e.shiftKey)a.push(n);else{var c=this.state.selected.slice();a=s.selectRows(c,n)}else a.push(n);this.prevIndex=t,this.onRowSelect.emit(a)}},d([n.Output(),p("design:type",n.EventEmitter)],e.prototype,"onRowClick",void 0),d([n.Output(),p("design:type",n.EventEmitter)],e.prototype,"onRowSelect",void 0),e=d([n.Component({selector:"datatable-body",template:'\n <div>\n <datatable-progress\n [hidden]="!state.options.loadingIndicator">\n </datatable-progress>\n <datatable-scroll\n *ngIf="state.rows.length"\n [rowHeight]="state.options.rowHeight"\n [count]="state.rowCount"\n [scrollWidth]="state.columnGroupWidths.total">\n <datatable-body-row\n *ngFor="let row of rows; let i = index;"\n [attr.tabindex]="i"\n (click)="rowClicked($event, i, row)"\n (keydown)="rowKeydown($event, i, row)"\n [row]="row">\n </datatable-body-row>\n </datatable-scroll>\n <div\n class="empty-row"\n *ngIf="!rows.length"\n [innerHTML]="state.options.emptyMessage">\n </div>\n </div>\n ',
directives:[a.ProgressBar,c.DataTableBodyRow,l.DataTableScroll],host:{"[style.width]":"bodyWidth","[style.height]":"bodyHeight"}}),p("design:paramtypes",[i.StateService,n.ElementRef])],e)}(),e("DataTableBody",u)}}}),e.register("6",[],function(e,t){"use strict";function n(e){var t={left:[],center:[],right:[]};if(e)for(var n=0,i=e.length;i>n;n++){var o=e[n];o.frozenLeft?t.left.push(o):o.frozenRight?t.right.push(o):t.center.push(o)}return t}function i(e,t){return{left:o(e.left),center:o(e.center),right:o(e.right),total:o(t)}}function o(e,t){var n=0;if(e)for(var i=0,o=e.length;o>i;i++){var r=e[i],s=t&&r[t];n+=s?r[t]:r.width}return n}t&&t.id;return e("columnsByPin",n),e("columnGroupWidths",i),e("columnTotalWidth",o),{setters:[],execute:function(){}}}),e.register("1a",[],function(e,t){"use strict";function n(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var n=document.createElement("div");n.style.width="100%",e.appendChild(n);var i=n.offsetWidth;return e.parentNode.removeChild(e),t-i}t&&t.id;return e("scrollbarWidth",n),{setters:[],execute:function(){}}}),e.register("1b",["1c","f"],function(e,t){"use strict";function n(e,t){return e===r.SortType.single?t===s.SortDirection.asc?s.SortDirection.desc:s.SortDirection.asc:t?t===s.SortDirection.asc?s.SortDirection.desc:void(t===s.SortDirection.desc):s.SortDirection.asc}function i(e,t){if(null!==e&&"undefined"!=typeof e||(e=0),null!==t&&"undefined"!=typeof t||(t=0),isNaN(parseFloat(e))||!isFinite(e)||isNaN(parseFloat(t))||!isFinite(t)){if(e.toLowerCase()<t.toLowerCase())return-1;if(e.toLowerCase()>t.toLowerCase())return 1}else{if(parseFloat(e)<parseFloat(t))return-1;if(parseFloat(e)>parseFloat(t))return 1}return 0}function o(e,t){var n=e.slice();return n.sort(function(e,n){for(var o=0,r=t;o<r.length;o++){var a=r[o],c=a.prop,l=a.dir,u=l!==s.SortDirection.desc?i(e[c],n[c]):-i(e[c],n[c]);if(0!==u)return u}return 0})}var r,s;t&&t.id;return e("nextSortDir",n),e("orderByComparator",i),e("sortRows",o),{setters:[function(e){r=e},function(e){s=e}],execute:function(){}}}),e.register("1d",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){n=function(){function e(e){Object.assign(this,e)}return e}(),e("Sort",n)}}}),e.register("d",["4","6","1a","1b","1d","1c"],function(e,t){"use strict";var n,i,o,r,s,a,c,l=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),u=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e}],execute:function(){c=function(){function e(){this.onSelectionChange=new n.EventEmitter,this.onRowsUpdate=new n.EventEmitter,this.onPageChange=new n.EventEmitter,this.scrollbarWidth=o.scrollbarWidth(),this.offsetX=0,this.offsetY=0,this.innerWidth=0,this.bodyHeight=300}return Object.defineProperty(e.prototype,"columnsByPin",{get:function(){return i.columnsByPin(this.options.columns)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columnGroupWidths",{get:function(){return i.columnGroupWidths(this.columnsByPin,this.options.columns)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageCount",{get:function(){return this.options.externalPaging?this.options.count:this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageSize",{get:function(){return this.options.scrollbarV?Math.ceil(this.bodyHeight/this.options.rowHeight)+1:this.options.limit?this.options.limit:this.rows.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"indexes",{get:function(){var e=0,t=0;return this.options.scrollbarV?(e=Math.max(Math.floor((this.offsetY||0)/this.options.rowHeight,0),0),t=Math.min(e+this.pageSize,this.pageCount)):(e=Math.max(this.options.offset*this.pageSize,0),t=Math.min(e+this.pageSize,this.pageCount)),{first:e,last:t}},enumerable:!0,configurable:!0}),e.prototype.setSelected=function(e){return this.selected?(this.selected.splice(0,this.selected.length),(t=this.selected).push.apply(t,e)):this.selected=e||[],this.onSelectionChange.emit(this.selected),this;var t},e.prototype.setRows=function(e){return this.rows=e.slice(),this.onRowsUpdate.emit(e),this},e.prototype.setOptions=function(e){return this.options=e,this},e.prototype.setPage=function(e){this.options.offset=e-1,this.onPageChange.emit({offset:this.options.offset,limit:this.pageSize,count:this.pageCount})},e.prototype.nextSort=function(e){var t=this.options.sorts.findIndex(function(t){return t.prop===e.prop}),n=this.options.sorts[t],i=void 0;n&&(i=n.dir);var o=r.nextSortDir(this.options.sortType,i);void 0===o?this.options.sorts.splice(t,1):n?this.options.sorts[t].dir=o:(this.options.sortType===a.SortType.single&&this.options.sorts.splice(0,this.options.sorts.length),this.options.sorts.push(new s.Sort({dir:o,prop:e.prop}))),e.comparator?e.comparator(this.rows,this.options.sorts):this.setRows(r.sortRows(this.rows,this.options.sorts))},e=l([n.Injectable(),u("design:paramtypes",[])],e)}(),e("StateService",c)}}}),e.register("1e",["4"],function(e,t){"use strict";var n,i,o=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),r=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e}],execute:function(){i=function(){function e(e){this.page=1,this.size=0,this.count=0,this.onPaged=new n.EventEmitter,e.nativeElement.classList.add("datatable-pager")}return Object.defineProperty(e.prototype,"totalPages",{get:function(){var e=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(e||0,1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},set:function(e){this._count=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._page},set:function(e){this._page=e,this.pages=this.calcPages()},enumerable:!0,configurable:!0}),e.prototype.canPrevious=function(){return this.page>1},e.prototype.canNext=function(){return this.page<this.totalPages},e.prototype.prevPage=function(){this.page>1&&this.selectPage(--this.page)},e.prototype.nextPage=function(){this.selectPage(++this.page)},e.prototype.selectPage=function(e){e>0&&e<=this.totalPages&&(this.page=e,this.onPaged.emit(e))},e.prototype.calcPages=function(e){var t=[],n=1,i=this.totalPages,o=5,r=o<this.totalPages;e=e||this.page,r&&(n=(Math.ceil(e/o)-1)*o+1,i=Math.min(n+o-1,this.totalPages));for(var s=n;i>=s;s++)t.push({number:s,text:s});return t},o([n.Input(),r("design:type",Number)],e.prototype,"page",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"size",void 0),o([n.Input(),r("design:type",Number)],e.prototype,"count",void 0),o([n.Output(),r("design:type",n.EventEmitter)],e.prototype,"onPaged",void 0),e=o([n.Component({selector:"datatable-pager",template:'\n <ul class="pager">\n <li [attr.disabled]="!canPrevious()">\n <a\n href="javascript:void(0)"\n (click)="selectPage(1)"\n class="icon-prev">\n </a>\n </li>\n <li [attr.disabled]="!canPrevious()">\n <a\n href="javascript:void(0)"\n (click)="prevPage()"\n class="icon-left">\n </a>\n </li>\n <li\n *ngFor="let pg of pages"\n [class.active]="pg.number === page">\n <a\n href="javascript:void(0)"\n (click)="selectPage(pg.number)">\n {{pg.text}}\n </a>\n </li>\n <li [attr.disabled]="!canNext()">\n <a\n href="javascript:void(0)"\n (click)="nextPage()"\n class="icon-right">\n </a>\n </li>\n <li [attr.disabled]="!canNext()">\n <a\n href="javascript:void(0)"\n (click)="selectPage(totalPages)"\n class="icon-skip">\n </a>\n </li>\n </ul>\n '}),r("design:paramtypes",[n.ElementRef])],e)}(),e("DataTablePager",i)}}}),e.register("1f",["4","d","1e"],function(e,t){"use strict";var n,i,o,r,s=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e}],execute:function(){r=function(){function e(e,t){this.state=t,this.onPageChange=new n.EventEmitter,e.nativeElement.classList.add("datatable-footer")}return Object.defineProperty(e.prototype,"visible",{get:function(){return this.state.pageCount/this.state.pageSize>1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"curPage",{get:function(){return this.state.options.offset+1},enumerable:!0,configurable:!0}),s([n.Output(),a("design:type",n.EventEmitter)],e.prototype,"onPageChange",void 0),e=s([n.Component({selector:"datatable-footer",template:'\n <div\n *ngIf="state.options.footerHeight"\n [style.height]="state.options.footerHeight">\n <div class="page-count">{{state.pageCount}} total</div>\n <datatable-pager\n [page]="curPage"\n [size]="state.pageSize"\n (onPaged)="onPageChange.emit($event)"\n [count]="state.pageCount"\n [hidden]="!visible">\n </datatable-pager>\n </div>\n ',directives:[o.DataTablePager]}),a("design:paramtypes",[n.ElementRef,i.StateService])],e)}(),e("DataTableFooter",r)}}}),e.register("20",["4","d","3","5","21","22","10","18","1f"],function(e,t){"use strict";var n,i,o,r,s,a,c,l,u,d,p=(t&&t.id,this&&this.__decorate||function(e,t,n,i){var o,r=arguments.length,s=3>r?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(3>r?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}),f=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0};return{setters:[function(e){n=e},function(e){i=e},function(e){o=e},function(e){r=e},function(e){s=e},function(e){a=e},function(e){c=e},function(e){l=e},function(e){u=e}],execute:function(){d=function(){function e(e,t,i){this.state=t,this.onPageChange=new n.EventEmitter,this.onRowsUpdate=new n.EventEmitter,this.onRowClick=new n.EventEmitter,this.onSelectionChange=new n.EventEmitter,this.onColumnChange=new n.EventEmitter,this.element=e.nativeElement,this.element.classList.add("datatable"),this.differ=i.find({}).create(null)}return e.prototype.ngOnInit=function(){var e=this,t=e.options,n=e.rows,i=e.selected;this.state.setOptions(t).setRows(n).setSelected(i)},e.prototype.ngAfterViewInit=function(){this.adjustColumns()},e.prototype.ngDoCheck=function(){this.differ.diff(this.rows)&&(this.state.setRows(this.rows),this.onRowsUpdate.emit(this.rows))},e.prototype.adjustSizes=function(){var e=this.element.getBoundingClientRect(),t=e.height,n=e.width;this.state.innerWidth=Math.floor(n),this.options.scrollbarV&&(this.options.headerHeight&&(t=-this.options.headerHeight),this.options.footerHeight&&(t=-this.options.footerHeight),this.state.bodyHeight=t),this.adjustColumns()},e.prototype.resize=function(){this.adjustSizes()},e.prototype.adjustColumns=function(e){var t=this.state.innerWidth;this.options.scrollbarV&&(t=-this.state.scrollbarWidth),this.options.columnMode===s.ColumnMode.force?r.forceFillColumnWidths(this.options.columns,t,e):this.options.columnMode===s.ColumnMode.flex&&r.adjustColumnWidths(this.options.columns,t)},e.prototype.onPageChanged=function(e){this.state.setPage(e),this.onPageChange.emit(e)},e.prototype.onRowSelect=function(e){this.state.setSelected(e),this.onSelectionChange.emit(e)},p([n.Input(),f("design:type",a.TableOptions)],e.prototype,"options",void 0),p([n.Input(),f("design:type",Array)],e.prototype,"rows",void 0),p([n.Input(),f("design:type",Array)],e.prototype,"selected",void 0),p([n.Output(),f("design:type",n.EventEmitter)],e.prototype,"onPageChange",void 0),p([n.Output(),f("design:type",n.EventEmitter)],e.prototype,"onRowsUpdate",void 0),p([n.Output(),f("design:type",n.EventEmitter)],e.prototype,"onRowClick",void 0),p([n.Output(),f("design:type",n.EventEmitter)],e.prototype,"onSelectionChange",void 0),p([n.Output(),f("design:type",n.EventEmitter)],e.prototype,"onColumnChange",void 0),p([n.HostListener("window:resize"),f("design:type",Function),f("design:paramtypes",[]),f("design:returntype",void 0)],e.prototype,"resize",null),e=p([n.Component({selector:"datatable",template:'\n <div\n visibility-observer\n (onVisibilityChange)="adjustSizes()">\n <datatable-header\n (onColumnChange)="onColumnChange.emit($event)">\n </datatable-header>\n <datatable-body\n (onRowClick)="onRowClick.emit($event)"\n (onRowSelect)="onRowSelect($event)">\n </datatable-body>\n <datatable-footer\n (onPageChange)="onPageChanged($event)">\n </datatable-footer>\n </div>\n ',directives:[c.DataTableHeader,l.DataTableBody,u.DataTableFooter,o.Visibility],host:{"[class.fixed-header]":'options.headerHeight !== "auto"',"[class.fixed-row]":'options.rowHeight !== "auto"',"[class.scroll-vertical]":"options.scrollbarV","[class.scroll-horz]":"options.scrollbarH","[class.selectable]":"options.selectable","[class.checkboxable]":"options.checkboxable"},providers:[i.StateService]}),f("design:paramtypes",[n.ElementRef,i.StateService,n.KeyValueDiffers])],e)}(),e("DataTable",d)}}}),e.register("22",["21","1c"],function(e,t){"use strict";var n,i,o;t&&t.id;return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=n.ColumnMode.standard,this.loadingMessage="Loading...",this.emptyMessage="No data to display",this.headerHeight=30,this.footerHeight=0,this.externalPaging=!1,this.limit=void 0,this.count=0,this.offset=0,this.loadingIndicator=!1,this.reorderable=!0,this.sortType=i.SortType.single,this.sorts=[],Object.assign(this,e)}return e}(),e("TableOptions",o)}}}),e.register("23",[],function(e,t){"use strict";function n(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}t&&t.id;return e("id",n),{setters:[],execute:function(){}}}),e.register("24",[],function(e,t){"use strict";function n(e){return e=e.replace(/[^a-zA-Z0-9 ]/g," "),e=e.replace(/([a-z](?=[A-Z]))/g,"$1 "),e=e.replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase(),e=e.replace(/([ 0-9]+)([a-zA-Z])/g,function(e,t,n){return t.trim()+n.toUpperCase()})}t&&t.id;return e("camelCase",n),{setters:[],execute:function(){}}}),e.register("e",["23","24"],function(e,t){"use strict";var n,i,o;t&&t.id;return{setters:[function(e){n=e},function(e){i=e}],execute:function(){o=function(){function e(e){this.$id=n.id(),this.frozenLeft=!1,this.frozenRight=!1,this.flexGrow=0,this.minWidth=100,this.maxWidth=void 0,this.width=150,this.resizable=!0,this.comparator=void 0,this.sortable=!0,this.draggable=!0,this.canAutoResize=!0,Object.assign(this,e),!this.prop&&this.name&&(this.prop=i.camelCase(this.name))}return e}(),e("TableColumn",o)}}}),e.register("19",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.single="single"]="single",e[e.multi="multi"]="multi",e[e.multiShift="multiShift"]="multiShift"}(n||(n={})),e("SelectionType",n)}}}),e.register("21",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.standard="standard"]="standard",e[e.flex="flex"]="flex",e[e.force="force"]="force"}(n||(n={})),e("ColumnMode",n)}}}),e.register("f",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.asc="asc"]="asc",e[e.desc="desc"]="desc"}(n||(n={})),e("SortDirection",n)}}}),e.register("1c",[],function(e,t){"use strict";var n;t&&t.id;return{setters:[],execute:function(){!function(e){e[e.single="single"]="single",e[e.multi="multi"]="multi"}(n||(n={})),e("SortType",n)}}}),e.register("1",["20","22","e","19","21","f","1c"],function(e,t){"use strict";t&&t.id;return{setters:[function(t){e({DataTable:t.DataTable})},function(t){e({TableOptions:t.TableOptions})},function(t){e({TableColumn:t.TableColumn})},function(t){e({SelectionType:t.SelectionType})},function(t){e({ColumnMode:t.ColumnMode})},function(t){e({SortDirection:t.SortDirection})},function(t){e({SortType:t.SortType})}],execute:function(){}}})})(function(e){if("function"==typeof define&&define.amd)define(["@angular/core/index.js","rxjs/Rx.js"],e);else{if("object"!=typeof module||!module.exports||"function"!=typeof require)throw new Error("Module must be loaded as AMD or CommonJS");module.exports=e(require("@angular/core/index.js"),require("rxjs/Rx.js"))}});
//# sourceMappingURL=release/angular2-data-table.js.map
import "reflect-metadata";
import { Component } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic';
import {
DataTable,
TableOptions,
TableColumn,
SelectionType,
ColumnMode
//} from '../release/angular2-data-table.js';
} from './main';
import { App } from './demos/basic';
//import { App } from './demos/client-paging';
//import { App } from './demos/server-paging';
//import { App } from './demos/server-sorting';
//import { App } from './demos/selection';
@Component({
selector: 'app',
template: `
<div>
<h3>Basic</h3>
<datatable
class="material"
[rows]="rows"
[options]="options"
[selected]="selected"
(onPageChange)="onPage($event)">
</datatable>
</div>
`,
directives: [ DataTable ]
})
class AppComponent {
selected = [];
rows = [
{
"name": "Claudine Neal",
"gender": "female",
"company": "Sealoud"
},
{
"name": "Beryl Rice",
"gender": "female",
"company": "Velity"
}
];
options = new TableOptions({
columnMode: ColumnMode.force,
headerHeight: 50,
footerHeight: 50,
rowHeight: 'auto',
limit: 10,
selectionType: SelectionType.multiShift,
columns: [
new TableColumn({ name: "Name" }),
new TableColumn({ name: "Gender" }),
new TableColumn({ name: "Company", comparator: this.sorter.bind(this) })
]
});
constructor() {
// this.page();
}
page() {
this.fetch((results) => {
this.options.count = results.length;
let start = this.options.offset * this.options.limit;
let end = start + this.options.limit;
let paged = results.slice(start, end);
// splice doesn't let u insert at
// a new out of bounds index :(
// this.rows.splice(0, this.rows.length);
// this.rows.push(...paged)
// this.rows.splice(start, 0, ...paged);
for (let i = start; i < end; i++) {
this.rows[i] = results[i];
}
console.log('updated', start, end, this.rows)
});
}
fetch(cb) {
var req = new XMLHttpRequest();
req.open('GET', `demos/company.json`);
req.onload = () => {
cb(JSON.parse(req.response));
};
req.send();
}
sorter(rows, dirs) {
setTimeout(() => {
this.fetch((results) => {
this.rows = results;
});
}, 500);
}
onPage({ offset, limit, pageCount }) {
console.log('Paged!', offset, limit, pageCount);
this.page();
}
}
bootstrap(AppComponent, []);
bootstrap(App, []);

@@ -20,2 +20,3 @@ import { Component, Input, ElementRef, Output, EventEmitter } from '@angular/core';

<datatable-scroll
*ngIf="state.rows.length"
[rowHeight]="state.options.rowHeight"

@@ -31,8 +32,8 @@ [count]="state.rowCount"

</datatable-body-row>
<div
class="empty"
*ngIf="!rows.length"
[innerHTML]="state.options.emptyMessage">
</div>
</datatable-scroll>
<div
class="empty-row"
*ngIf="!rows.length"
[innerHTML]="state.options.emptyMessage">
</div>
</div>

@@ -52,7 +53,7 @@ `,

@Output() onRowClick: EventEmitter = new EventEmitter();
@Output() onRowSelect: EventEmitter = new EventEmitter();
@Output() onRowClick: EventEmitter<any> = new EventEmitter();
@Output() onRowSelect: EventEmitter<any> = new EventEmitter();
private state: StateService;
private prevIndex: number;
private rows: any;

@@ -59,0 +60,0 @@ get selectEnabled() {

@@ -50,4 +50,2 @@ import { Component, Input, ElementRef } from '@angular/core';

private state: StateService;
get isSelected() {

@@ -54,0 +52,0 @@ return this.state.selected &&

@@ -32,3 +32,3 @@ import {

(onRowClick)="onRowClick.emit($event)"
(onRowSelect)="state.setSelected($event)">
(onRowSelect)="onRowSelect($event)">
</datatable-body>

@@ -59,13 +59,13 @@ <datatable-footer

@Input() options: TableOptions;
@Input() rows: Array<Object>;
@Input() selected: Array<Object>;
@Input() rows: Array<any>;
@Input() selected: Array<any>;
@Output() onPageChange = new EventEmitter();
@Output() onRowsUpdate = new EventEmitter();
@Output() onRowClick = new EventEmitter();
@Output() onSelectionChange = new EventEmitter();
@Output() onColumnChange = new EventEmitter();
@Output() onPageChange: EventEmitter<any> = new EventEmitter();
@Output() onRowsUpdate: EventEmitter<any> = new EventEmitter();
@Output() onRowClick: EventEmitter<any> = new EventEmitter();
@Output() onSelectionChange: EventEmitter<any> = new EventEmitter();
@Output() onColumnChange: EventEmitter<any> = new EventEmitter();
private state: StateService;
private element: ElementRef;
private element: HTMLElement;
private differ: any;

@@ -114,3 +114,3 @@ constructor(element: ElementRef, private state: StateService, differs: KeyValueDiffers) {

adjustColumns(forceIdx) {
adjustColumns(forceIdx: any) {
let width = this.state.innerWidth;

@@ -133,2 +133,7 @@ if(this.options.scrollbarV) {

onRowSelect(event) {
this.state.setSelected(event);
this.onSelectionChange.emit(event);
}
}

@@ -32,6 +32,4 @@ import {

@Output() onPageChange = new EventEmitter();
@Output() onPageChange: EventEmitter<any> = new EventEmitter();
private state: StateService;
get visible() {

@@ -38,0 +36,0 @@ return (this.state.pageCount / this.state.pageSize) > 1;

@@ -58,6 +58,7 @@ import {

@Input() count: number = 0;
@Output() onPaged: EventEmitter = new EventEmitter();
@Output() onPaged: EventEmitter<any> = new EventEmitter();
private _count: number;
private _page: number;
private pages: any;

@@ -109,3 +110,3 @@ get totalPages() {

selectPage(page) {
selectPage(page: number) {
if (page > 0 && page <= this.totalPages) {

@@ -117,3 +118,3 @@ this.page = page;

calcPages(page) {
calcPages(page: number) {
let pages = [],

@@ -120,0 +121,0 @@ startPage = 1,

@@ -99,6 +99,4 @@ import {

@Output() onColumnChange: EventEmitter = new EventEmitter();
@Output() onColumnChange: EventEmitter<any> = new EventEmitter();
private state: StateService;
get headerWidth() {

@@ -105,0 +103,0 @@ if(this.state.options.scrollbarH)

@@ -41,6 +41,4 @@ import {

@Input() model: TableColumn;
@Output() onColumnChange = new EventEmitter();
@Output() onColumnChange: EventEmitter<any> = new EventEmitter();
private state: StateService;
get sortDir() {

@@ -47,0 +45,0 @@ let sort = this.state.options.sorts.find(s => {

@@ -30,5 +30,5 @@ import {

@Output() onDragStart: EventEmitter = new EventEmitter();
@Output() onDragging: EventEmitter = new EventEmitter();
@Output() onDragEnd: EventEmitter = new EventEmitter();
@Output() onDragStart: EventEmitter<any> = new EventEmitter();
@Output() onDragging: EventEmitter<any> = new EventEmitter();
@Output() onDragEnd: EventEmitter<any> = new EventEmitter();

@@ -35,0 +35,0 @@ private dragging: boolean = false;

@@ -15,9 +15,10 @@ import {

@Output() onLongPress: EventEmitter = new EventEmitter();
@Output() onLongPressing: EventEmitter = new EventEmitter();
@Output() onLongPressEnd: EventEmitter = new EventEmitter();
@Output() onLongPress: EventEmitter<any> = new EventEmitter();
@Output() onLongPressing: EventEmitter<any> = new EventEmitter();
@Output() onLongPressEnd: EventEmitter<any> = new EventEmitter();
private _pressing: boolean;
private _longPressing: boolean;
private _timeout: boolean;
private _timeout: any;
private _interval: any;

@@ -24,0 +25,0 @@ @HostBinding('class.press')

@@ -15,3 +15,3 @@ import {

@Output() onReorder: EventEmitter = new EventEmitter();
@Output() onReorder: EventEmitter<any> = new EventEmitter();

@@ -18,0 +18,0 @@ @ContentChildren(Draggable)

@@ -22,4 +22,6 @@ import {

@Input() maxWidth: number;
element: HTMLElement;
subcription: any;
@Output() onResize: EventEmitter = new EventEmitter();
@Output() onResize: EventEmitter<any> = new EventEmitter();

@@ -26,0 +28,0 @@ private prevScreenX: number = 0;

@@ -27,3 +27,3 @@ import {

@Output() onVisibilityChange: EventEmitter = new EventEmitter();
@Output() onVisibilityChange: EventEmitter<any> = new EventEmitter();

@@ -30,0 +30,0 @@ constructor(element: ElementRef) {

export enum ColumnMode {
standard = 'standard',
flex = 'flex',
force = 'force'
standard = 'standard' as any,
flex = 'flex' as any,
force = 'force' as any
}
export enum SelectionType {
single = 'single',
multi = 'multi',
multiShift = 'multiShift'
single = 'single' as any,
multi = 'multi' as any,
multiShift = 'multiShift' as any
}
export enum SortDirection {
asc = 'asc',
desc = 'desc'
asc = 'asc' as any,
desc = 'desc' as any
}
export enum SortType {
single = 'single',
multi = 'multi'
single = 'single' as any,
multi = 'multi' as any
}

@@ -19,4 +19,5 @@ import { Injectable, EventEmitter } from '@angular/core';

onRowsUpdate: EventEmitter = new EventEmitter();
onPageChange: EventEmitter = new EventEmitter();
onSelectionChange: EventEmitter<any> = new EventEmitter();
onRowsUpdate: EventEmitter<any> = new EventEmitter();
onPageChange: EventEmitter<any> = new EventEmitter();

@@ -40,10 +41,15 @@ scrollbarWidth: number = scrollbarWidth();

return this.rows.length;
} else {
return this.options.count;
}
return this.options.count;
}
get pageSize() {
if(this.options.scrollbarV)
if(this.options.scrollbarV) {
return Math.ceil(this.bodyHeight / this.options.rowHeight) + 1;
return this.options.limit;
} else if(this.options.limit) {
return this.options.limit;
} else {
return this.rows.length;
}
}

@@ -59,3 +65,3 @@

} else {
first = Math.max(this.options.offset * this.options.limit, 0);
first = Math.max(this.options.offset * this.pageSize, 0);
last = Math.min(first + this.pageSize, this.pageCount);

@@ -68,3 +74,10 @@ }

setSelected(selected: Array<any>) {
this.selected = selected;
if(!this.selected) {
this.selected = selected || [];
} else {
this.selected.splice(0, this.selected.length);
this.selected.push(...selected);
}
this.onSelectionChange.emit(this.selected);
return this;

@@ -90,3 +103,3 @@ }

limit: this.pageSize,
pageCount: this.pageCount
count: this.pageCount
});

@@ -93,0 +106,0 @@ }

@@ -8,6 +8,6 @@ import { columnsByPin, columnGroupWidths } from './column';

*/
export function columnTotalWidth(columns, prop) {
export function columnTotalWidth(columns: any, prop: any) {
let totalWidth = 0;
for(let column of allColumns) {
for(let column of columns) {
const has = prop && column[prop];

@@ -40,3 +40,3 @@ totalWidth = totalWidth + (has ? column[prop] : column.width);

*/
export function adjustColumnWidths(allColumns, expectedWidth){
export function adjustColumnWidths(allColumns: any, expectedWidth: any){
let columnsWidth = columnTotalWidth(allColumns),

@@ -57,3 +57,3 @@ totalFlexGrow = getTotalFlexGrow(allColumns),

*/
function scaleColumns(colsByGroup, maxWidth, totalFlexGrow) {
function scaleColumns(colsByGroup: any, maxWidth: any, totalFlexGrow: any) {
// calculate total width and flexgrow points for coulumns that can be resized

@@ -119,3 +119,3 @@ for(let attr in colsByGroup) {

*/
export function forceFillColumnWidths(allColumns, expectedWidth, startIdx){
export function forceFillColumnWidths(allColumns: any, expectedWidth: any, startIdx: any){
let contentWidth = 0,

@@ -122,0 +122,0 @@ columnsToResize = startIdx > -1 ?

@@ -21,3 +21,3 @@ export function selectRows(selected, row) {

let range = {};
let range = { start: 0, end: 0 };
if (reverse) {

@@ -24,0 +24,0 @@ range = {

@@ -23,3 +23,3 @@ import { Sort } from '../models/Sort';

return SortDirection.desc;
} else if(currentSort === SortDirection.desc) {
} else if(current === SortDirection.desc) {
return undefined;

@@ -26,0 +26,0 @@ }

@@ -16,2 +16,3 @@ /**

observer: IntersectionObserver;
callback: any;

@@ -18,0 +19,0 @@ constructor(element, callback) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc