-
Notifications
You must be signed in to change notification settings - Fork 9
/
ng-table.min.js.map
1 lines (1 loc) · 296 KB
/
ng-table.min.js.map
1
{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///ng-table.min.js","webpack:///webpack/bootstrap a04a664fd136d6195bd8","webpack:///external \"angular\"","webpack:///./src/core/index.ts","webpack:///./src/browser/index.ts","webpack:///./src/browser/ngTableFilterConfig.ts","webpack:///./src/core/grouping/groupSettings.ts","webpack:///./src/core/ngTableEventsChannel.ts","webpack:///./src/core/ngTableParams.ts","webpack:///./src/core/ngTableSettings.ts","webpack:///./src/core/util.ts","webpack:///./src/browser/ngTable.directive.ts","webpack:///./src/browser/ngTableColumn.ts","webpack:///./src/browser/ngTableColumnsBinding.directive.ts","webpack:///./src/browser/ngTableController.ts","webpack:///./src/browser/ngTableDynamic.directive.ts","webpack:///./src/browser/ngTableFilterRow.directive.ts","webpack:///./src/browser/ngTableFilterRowController.ts","webpack:///./src/browser/ngTableGroupRow.directive.ts","webpack:///./src/browser/ngTableGroupRowController.ts","webpack:///./src/browser/ngTablePagination.directive.ts","webpack:///./src/browser/ngTableSelectFilterDs.directive.ts","webpack:///./src/browser/ngTableSorterRow.directive.ts","webpack:///./src/browser/ngTableSorterRowController.ts","webpack:///./src/core/data/dataSettings.ts","webpack:///./src/core/data/ngTableDefaultGetData.ts","webpack:///./src/core/filtering/filterSettings.ts","webpack:///./src/core/grouping/ngTableDefaultGetGroups.ts","webpack:///./src/core/ngTableDefaults.ts","webpack:///./src/shared/assign-partial-deep.ts","webpack:///./src/shared/check-class-init.ts","webpack:///./src/browser/filterRow.html","webpack:///./src/browser/filters/number.html","webpack:///./src/browser/filters/select-multiple.html","webpack:///./src/browser/filters/select.html","webpack:///./src/browser/filters/text.html","webpack:///./src/browser/groupRow.html","webpack:///./src/browser/header.html","webpack:///./src/browser/pager.html","webpack:///./src/browser/sorterRow.html","webpack:///./index.ts"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_0__","modules","__webpack_require__","moduleId","installedModules","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","__WEBPACK_IMPORTED_MODULE_0_angular__","__WEBPACK_IMPORTED_MODULE_1__data__","__WEBPACK_IMPORTED_MODULE_2__grouping__","__WEBPACK_IMPORTED_MODULE_3__ngTableDefaults__","__WEBPACK_IMPORTED_MODULE_4__ngTableSettings__","__WEBPACK_IMPORTED_MODULE_5__ngTableParams__","__WEBPACK_IMPORTED_MODULE_6__ngTableEventsChannel__","__WEBPACK_IMPORTED_MODULE_7__filtering__","__WEBPACK_IMPORTED_MODULE_8__grouping_publicExports__","ngTableCoreModule","provider","service","run","init","__WEBPACK_IMPORTED_MODULE_1__ngTable_directive__","__WEBPACK_IMPORTED_MODULE_2__ngTableColumn__","__WEBPACK_IMPORTED_MODULE_3__ngTableColumnsBinding_directive__","__WEBPACK_IMPORTED_MODULE_4__ngTableController__","__WEBPACK_IMPORTED_MODULE_5__ngTableDynamic_directive__","__WEBPACK_IMPORTED_MODULE_6__ngTableFilterConfig__","__WEBPACK_IMPORTED_MODULE_7__ngTableFilterRow_directive__","__WEBPACK_IMPORTED_MODULE_8__ngTableFilterRowController__","__WEBPACK_IMPORTED_MODULE_9__ngTableGroupRow_directive__","__WEBPACK_IMPORTED_MODULE_10__ngTableGroupRowController__","__WEBPACK_IMPORTED_MODULE_11__ngTablePagination_directive__","__WEBPACK_IMPORTED_MODULE_12__ngTableSelectFilterDs_directive__","__WEBPACK_IMPORTED_MODULE_13__ngTableSorterRow_directive__","__WEBPACK_IMPORTED_MODULE_14__ngTableSorterRowController__","__WEBPACK_IMPORTED_MODULE_15__filters_number_html__","__WEBPACK_IMPORTED_MODULE_16__filters_select_html__","__WEBPACK_IMPORTED_MODULE_17__filters_select_multiple_html__","__WEBPACK_IMPORTED_MODULE_18__filters_text_html__","__WEBPACK_IMPORTED_MODULE_19__pager_html__","__WEBPACK_IMPORTED_MODULE_20__header_html__","ngTableBrowserModule","directive","controller","__WEBPACK_IMPORTED_MODULE_0__dataSettings__","__WEBPACK_IMPORTED_MODULE_1__ngTableDefaultGetData__","__WEBPACK_IMPORTED_MODULE_0__assign_partial_deep__","__WEBPACK_IMPORTED_MODULE_1__check_class_init__","__WEBPACK_IMPORTED_MODULE_1__shared__","FilterConfigValues","NgTableFilterConfigProvider","NgTableFilterConfig","defaultBaseUrl","defaultExt","aliasUrls","$injector","_this","$get","instantiate","config","$inject","resetConfigs","setConfig","customConfig","getUrlForAlias","aliasName","filterKey","getTemplateUrl","filterDef","filterName","id","indexOf","__WEBPACK_IMPORTED_MODULE_0__filterSettings__","GroupSettings","defaultSort","isExpanded","__WEBPACK_IMPORTED_MODULE_0__groupSettings__","__WEBPACK_IMPORTED_MODULE_1__ngTableDefaultGetGroups__","NgTableEventsChannel","$rootScope","events","addTableParamsEvent","eventName","target","fnName","charAt","toUpperCase","substring","event","_a","createEventSubscriptionFn","createPublishEventFn","args","_i","arguments","length","$broadcast","apply","concat","createEventSelectorFn","eventSelector","isEventSelectorFunc","publisher","val","isScopeLike","$new","handler","eventSelectorOrScope","actualEvtSelector","scope","$on","params","eventArgs","isNullInstance","fnArgs","isNumber","isNaN","parseFloat","isFinite","__WEBPACK_IMPORTED_MODULE_1__util__","__WEBPACK_IMPORTED_MODULE_2__shared__","__WEBPACK_IMPORTED_MODULE_3__ngTableSettings__","ParamValues","NgTableParams","page","count","filter","sorting","group","baseParameters","baseSettings","data","defaultSettings","createWithOverrides","isCommittedDataset","initialEvents","_params","_settings","reloadPages","currentPages","oldPages","newPages","generatePagesArray","total","ngTableEventsChannel","publishPagesChanged","ngTableDefaults","settings","parameters","publishAfterCreated","undefined","keys","significantFilter","filterValue","currentPage","totalItems","pageSize","maxBlocks","maxPage","maxPivotPages","minPage","numPages","pages","Math","ceil","push","type","number","max","active","current","round","paginationMaxBlocks","paginationMinBlocks","min","sortDirection","newParameters","hasErrorState","errParamsMemento","createComparableParams","hasFilter","hasFilterChanges","previousFilter","prevParamsMemento","hasGlobalSearchFieldChanges","hasGroup","isDataReloadRequired","isSortBy","field","direction","orderBy","parseParamsFromUrl","key","split","reverse","lastKey","len","name_1","v","parseGroup","log","reload","pData","$loading","runInterceptorPipeline","$q","when","getGroups","fn","getData","oldData","then","publishAfterReloadData","catch","reason","reject","newSettings","merge","originalDataset","dataset","hasDatasetChanged","fireEvent","publishDatasetChanged","url","asString","collectValue","isArray","pairs","encodeURIComponent","isSignificantValue","item","name_2","subkey","pname","groupSortDirection","currentVal","previousVal","debugMode","$log","debug","groupOptions","fetchedData","interceptors","reduce","result","interceptor","thenFn","response","bind","rejectFn","responseError","__WEBPACK_IMPORTED_MODULE_2__data__","__WEBPACK_IMPORTED_MODULE_3__filtering__","__WEBPACK_IMPORTED_MODULE_4__grouping__","Settings","counts","dataOptions","filterOptions","defaultGetData","defaultGetGroups","Array","sortingIndicator","instance","existing","optionalPropNames","results","destValue","srcValue","optimizeFilterDelay","filterDelay","filterDelayThreshold","ngTableDefaultGetData","ngTableDefaultGetGroups","isInitialized","convertSortToOrderBy","column","isGroupingFun","ngTable","$parse","restrict","priority","compile","element","dataRow","groupRow","compiledColumns","rows","find","tr","hasClass","el","attr","getAttrValue","setAttrValue","parsedAttribute","expr","localValue","context","assign","$scope","parsedExpr","$parent","titleExpr","title","titleAlt","headerTitle","sortable","class","groupable","headerTemplateURL","filterData","show","attrs","columns","$columns","buildColumns","setupBindingsToInternalScope","loadFilterData","compileDirectiveTemplates","NgTableColumn","buildColumn","defaultScope","extendedCol","create","defaults","createDefaults","_loop_1","prop","getterSetter","getterFn","$column","localValue_1","wrappedGetterFn_1","createGetterSetter","initialValue","newValue","ngTableColumnsBinding","linkFn","$element","$attrs","setter","$watch","newColumns","shallowClone","slice","link","__WEBPACK_IMPORTED_MODULE_1__core__","NgTableController","$timeout","$compile","$document","ngTableColumn","$filterRow","disabled","delayFilter","timer","callback","ms","cancel","newParams","oldParams","subscribeToTableEvents","some","onDataReloadStatusChange","newStatus","currentParams","applyFilter","templates","header","templateHeader","pagination","templatePagination","addClass","headerTemplate","theadFound_1","children","e","tagName","prepend","paginationTemplate","after","isPromiseLike","forEach","col","parseNgTableDynamicExpr","parts","tableParams","Error","tableParamsExpr","setupFilterRowBindingsToInternalScope","setupGroupRowBindingsToInternalScope","showFilter","show_filter","hasVisibleFilterColumn","disableFilter","$groupRow","showGroup","showGroupGetter_1","getVisibleColumns","onAfterReloadData","newDatapage","visibleColumns","$groups","visibleColumnCount","$data","onPagesChanged","array","predicate","found","obj","toArray","arr","ngTableDynamic","tElement","tRows","getElementsByTagName","tRow","tCell","showExpr","$watchCollection","newCols","ngTableFilterRow","replace","templateUrl","controllerAs","NgTableFilterRowController","ngTableFilterConfig","getFilterPlaceholderValue","getFilterCellCss","layout","size","width","parseInt","toString","placeholder","ngTableGroupRow","NgTableGroupRowController","groupFns","newGrouping","setGroup","getGroupables","groupableCols","getGroupTitle","isGroupingFunc","groupBy","isSelectedGroup","changeSortDirection","$selGroup","toggleDetail","newDirection","findGroupColumn","groupKey","grouping","existingGroupCol","$selGroupTitle","groupedColumn","ngTablePagination","pubParams","template","append","ngTableSelectFilterDs","NgTableSelectFilterDsController","bindDataSource","getSelectListData","hasEmptyOption","unshift","$selectData","isMatch","dataInput","ngTableSorterRow","NgTableSorterRowController","sortBy","parsedSortable","inverseSort","sortingParams","ctrlKey","metaKey","DataSettings","applyPaging","applySort","NgTableDefaultGetDataProvider","$filter","getFilterFn","filterFn","filterFilterName","getOrderByFn","sortingFilterName","filterKeys","parsedFilter","setPath","filterComparator","pagedData","orderByFn","options","fData","publishAfterDataFiltered","orderedData","publishAfterDataSorted","path","ret","parentPathKeys","FilterSettings","filterLayout","groupFn","groupField_1","getPath","originalDataOptions","gotData","groups","groupName","$hideRows","finally","ks","assignPartialDeep","destination","partial","optionalPropSelector","customizer","keys_1","srcVal","destVal","customVal","checkClassInit","clazz","html","angular","put","__WEBPACK_IMPORTED_MODULE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hB","file":"ng-table.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"angular\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ng-table\"] = factory(require(\"angular\"));\n\telse\n\t\troot[\"ng-table\"] = factory(root[\"angular\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"angular\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"angular\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ng-table\"] = factory(require(\"angular\"));\n\telse\n\t\troot[\"ng-table\"] = factory(root[\"angular\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 44);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports) {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__data__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__grouping__ = __webpack_require__(8);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ngTableDefaults__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ngTableSettings__ = __webpack_require__(11);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ngTableParams__ = __webpack_require__(10);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ngTableEventsChannel__ = __webpack_require__(9);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_6__ngTableEventsChannel__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(exports, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_4__ngTableSettings__[\"a\"]; });\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_5__ngTableParams__[\"a\"]; });\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_5__ngTableParams__[\"b\"]; });\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"f\", function() { return __WEBPACK_IMPORTED_MODULE_1__data__[\"a\"]; });\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"g\", function() { return __WEBPACK_IMPORTED_MODULE_1__data__[\"b\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__filtering__ = __webpack_require__(6);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"h\", function() { return __WEBPACK_IMPORTED_MODULE_7__filtering__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__grouping_publicExports__ = __webpack_require__(31);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"i\", function() { return __WEBPACK_IMPORTED_MODULE_8__grouping_publicExports__[\"a\"]; });\n/* harmony export (binding) */ __webpack_require__.d(exports, \"b\", function() { return ngTableCoreModule; });\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar ngTableCoreModule = __WEBPACK_IMPORTED_MODULE_0_angular__[\"module\"]('ngTable-core', [])\r\n .provider('ngTableDefaultGetData', __WEBPACK_IMPORTED_MODULE_1__data__[\"b\" /* NgTableDefaultGetDataProvider */])\r\n .factory('ngTableDefaultGetGroups', __WEBPACK_IMPORTED_MODULE_2__grouping__[\"b\" /* ngTableDefaultGetGroups */])\r\n .value('ngTableDefaults', __WEBPACK_IMPORTED_MODULE_3__ngTableDefaults__[\"a\" /* ngTableDefaults */])\r\n .service('ngTableEventsChannel', __WEBPACK_IMPORTED_MODULE_6__ngTableEventsChannel__[\"a\" /* NgTableEventsChannel */])\r\n .run(__WEBPACK_IMPORTED_MODULE_4__ngTableSettings__[\"a\" /* Settings */].init)\r\n .run(__WEBPACK_IMPORTED_MODULE_5__ngTableParams__[\"a\" /* NgTableParams */].init);\r\n// note: if you are using ES6 or typescript prefer:\r\n// import { NgTableParams } from 'ng-table';\r\nngTableCoreModule.value('NgTableParams', __WEBPACK_IMPORTED_MODULE_5__ngTableParams__[\"a\" /* NgTableParams */]);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ngTable_directive__ = __webpack_require__(14);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__ngTableColumn__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ngTableColumnsBinding_directive__ = __webpack_require__(16);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__ngTableController__ = __webpack_require__(17);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__ngTableDynamic_directive__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__ngTableFilterConfig__ = __webpack_require__(5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__ngTableFilterRow_directive__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ngTableFilterRowController__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__ngTableGroupRow_directive__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__ngTableGroupRowController__ = __webpack_require__(22);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__ngTablePagination_directive__ = __webpack_require__(23);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__ngTableSelectFilterDs_directive__ = __webpack_require__(24);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__ngTableSorterRow_directive__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__ngTableSorterRowController__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__filters_number_html__ = __webpack_require__(36);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__filters_number_html___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_15__filters_number_html__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__filters_select_html__ = __webpack_require__(38);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__filters_select_html___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_16__filters_select_html__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__filters_select_multiple_html__ = __webpack_require__(37);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__filters_select_multiple_html___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_17__filters_select_multiple_html__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__filters_text_html__ = __webpack_require__(39);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__filters_text_html___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_18__filters_text_html__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__pager_html__ = __webpack_require__(42);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__pager_html___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_19__pager_html__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__header_html__ = __webpack_require__(41);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__header_html___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_20__header_html__);\n/* harmony reexport (binding) */ __webpack_require__.d(exports, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_4__ngTableController__[\"a\"]; });\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"c\", function() { return __WEBPACK_IMPORTED_MODULE_6__ngTableFilterConfig__[\"b\"]; });\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"d\", function() { return __WEBPACK_IMPORTED_MODULE_6__ngTableFilterConfig__[\"a\"]; });\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"e\", function() { return __WEBPACK_IMPORTED_MODULE_6__ngTableFilterConfig__[\"c\"]; });\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return ngTableBrowserModule; });\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar ngTableBrowserModule = __WEBPACK_IMPORTED_MODULE_0_angular__[\"module\"]('ngTable-browser', [])\r\n .directive('ngTable', __WEBPACK_IMPORTED_MODULE_1__ngTable_directive__[\"a\" /* ngTable */])\r\n .service('ngTableColumn', __WEBPACK_IMPORTED_MODULE_2__ngTableColumn__[\"a\" /* NgTableColumn */])\r\n .directive('ngTableColumnsBinding', __WEBPACK_IMPORTED_MODULE_3__ngTableColumnsBinding_directive__[\"a\" /* ngTableColumnsBinding */])\r\n .controller('ngTableController', __WEBPACK_IMPORTED_MODULE_4__ngTableController__[\"a\" /* NgTableController */])\r\n .directive('ngTableDynamic', __WEBPACK_IMPORTED_MODULE_5__ngTableDynamic_directive__[\"a\" /* ngTableDynamic */])\r\n .provider('ngTableFilterConfig', __WEBPACK_IMPORTED_MODULE_6__ngTableFilterConfig__[\"a\" /* NgTableFilterConfigProvider */])\r\n .directive('ngTableFilterRow', __WEBPACK_IMPORTED_MODULE_7__ngTableFilterRow_directive__[\"a\" /* ngTableFilterRow */])\r\n .controller('ngTableFilterRowController', __WEBPACK_IMPORTED_MODULE_8__ngTableFilterRowController__[\"a\" /* NgTableFilterRowController */])\r\n .directive('ngTableGroupRow', __WEBPACK_IMPORTED_MODULE_9__ngTableGroupRow_directive__[\"a\" /* ngTableGroupRow */])\r\n .controller('ngTableGroupRowController', __WEBPACK_IMPORTED_MODULE_10__ngTableGroupRowController__[\"a\" /* NgTableGroupRowController */])\r\n .directive('ngTablePagination', __WEBPACK_IMPORTED_MODULE_11__ngTablePagination_directive__[\"a\" /* ngTablePagination */])\r\n .directive('ngTableSelectFilterDs', __WEBPACK_IMPORTED_MODULE_12__ngTableSelectFilterDs_directive__[\"a\" /* ngTableSelectFilterDs */])\r\n .directive('ngTableSorterRow', __WEBPACK_IMPORTED_MODULE_13__ngTableSorterRow_directive__[\"a\" /* ngTableSorterRow */])\r\n .controller('ngTableSorterRowController', __WEBPACK_IMPORTED_MODULE_14__ngTableSorterRowController__[\"a\" /* NgTableSorterRowController */]);\r\n\r\n\r\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__dataSettings__ = __webpack_require__(27);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__dataSettings__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ngTableDefaultGetData__ = __webpack_require__(28);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__ngTableDefaultGetData__[\"a\"]; });\n\r\n\r\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__assign_partial_deep__ = __webpack_require__(33);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_0__assign_partial_deep__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__check_class_init__ = __webpack_require__(34);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_1__check_class_init__[\"a\"]; });\n\r\n\r\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shared__ = __webpack_require__(4);\n/* harmony export (binding) */ __webpack_require__.d(exports, \"b\", function() { return FilterConfigValues; });\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableFilterConfigProvider; });\n/* harmony export (binding) */ __webpack_require__.d(exports, \"c\", function() { return NgTableFilterConfig; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n\r\n/**\r\n * Configuration values that determine the behaviour of the `ngTableFilterConfig` service\r\n */\r\nvar FilterConfigValues = (function () {\r\n function FilterConfigValues() {\r\n /**\r\n * The default base url to use when deriving the url for a filter template given just an alias name\r\n */\r\n this.defaultBaseUrl = 'ng-table/filters/';\r\n /**\r\n * The extension to use when deriving the url of a filter template when given just an alias name\r\n */\r\n this.defaultExt = '.html';\r\n /**\r\n * A map of alias names and their corrosponding urls. A lookup against this map will be used\r\n * to find the url matching an alias name.\r\n * If no match is found then a url will be derived using the following pattern `${defaultBaseUrl}${aliasName}.${defaultExt}`\r\n */\r\n this.aliasUrls = {};\r\n }\r\n return FilterConfigValues;\r\n}());\r\n\r\n/**\r\n * The angular provider used to configure the behaviour of the `NgTableFilterConfig` service.\r\n */\r\nvar NgTableFilterConfigProvider = (function () {\r\n function NgTableFilterConfigProvider($injector) {\r\n var _this = this;\r\n this.$get = function () {\r\n return $injector.instantiate(NgTableFilterConfig, { config: __WEBPACK_IMPORTED_MODULE_0_angular__[\"copy\"](_this.config) });\r\n };\r\n this.$get.$inject = [];\r\n this.resetConfigs();\r\n }\r\n /**\r\n * Reset back to factory defaults the config values that `NgTableFilterConfig` service will use\r\n */\r\n NgTableFilterConfigProvider.prototype.resetConfigs = function () {\r\n this.config = new FilterConfigValues();\r\n };\r\n /**\r\n * Set the config values used by `NgTableFilterConfig` service\r\n */\r\n NgTableFilterConfigProvider.prototype.setConfig = function (customConfig) {\r\n this.config = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__shared__[\"b\" /* assignPartialDeep */])(__WEBPACK_IMPORTED_MODULE_0_angular__[\"copy\"](this.config), customConfig);\r\n };\r\n return NgTableFilterConfigProvider;\r\n}());\r\n\r\nNgTableFilterConfigProvider.$inject = ['$injector'];\r\n/**\r\n * Exposes configuration values and methods used to return the location of the html\r\n * templates used to render the filter row of an ng-table directive\r\n */\r\nvar NgTableFilterConfig = (function () {\r\n function NgTableFilterConfig(\r\n /**\r\n * Readonly copy of the final values used to configure the service.\r\n */\r\n config) {\r\n this.config = config;\r\n }\r\n /**\r\n * Return the url of the html filter template registered with the alias supplied\r\n */\r\n NgTableFilterConfig.prototype.getUrlForAlias = function (aliasName, filterKey) {\r\n return this.config.aliasUrls[aliasName] || this.config.defaultBaseUrl + aliasName + this.config.defaultExt;\r\n };\r\n /**\r\n * Return the url of the html filter template for the supplied definition and key.\r\n * For more information see the documentation for {@link FilterTemplateMap}\r\n */\r\n NgTableFilterConfig.prototype.getTemplateUrl = function (filterDef, filterKey) {\r\n var filterName;\r\n if (typeof filterDef !== 'string') {\r\n filterName = filterDef.id;\r\n }\r\n else {\r\n filterName = filterDef;\r\n }\r\n if (filterName.indexOf('/') !== -1) {\r\n return filterName;\r\n }\r\n return this.getUrlForAlias(filterName, filterKey);\r\n };\r\n return NgTableFilterConfig;\r\n}());\r\n\r\nNgTableFilterConfig.$inject = ['config'];\r\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__filterSettings__ = __webpack_require__(29);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__filterSettings__[\"a\"]; });\n\r\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return GroupSettings; });\n/**\r\n * Configuration that determines the data row grouping behaviour of a table\r\n */\r\nvar GroupSettings = (function () {\r\n function GroupSettings() {\r\n /**\r\n * The default sort direction that will be used whenever a group is supplied that\r\n * does not define its own sort direction\r\n */\r\n this.defaultSort = 'asc';\r\n /**\r\n * Determines whether groups should be displayed expanded to show their items. Defaults to true\r\n */\r\n this.isExpanded = true;\r\n }\r\n return GroupSettings;\r\n}());\r\n\r\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__groupSettings__ = __webpack_require__(7);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__groupSettings__[\"a\"]; });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__ngTableDefaultGetGroups__ = __webpack_require__(30);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"b\", function() { return __WEBPACK_IMPORTED_MODULE_1__ngTableDefaultGetGroups__[\"a\"]; });\n\r\n\r\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableEventsChannel; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\nvar NgTableEventsChannel = (function () {\r\n function NgTableEventsChannel($rootScope) {\r\n this.$rootScope = $rootScope;\r\n var events = this;\r\n events = this.addTableParamsEvent('afterCreated', events);\r\n events = this.addTableParamsEvent('afterReloadData', events);\r\n events = this.addTableParamsEvent('datasetChanged', events);\r\n events = this.addTableParamsEvent('pagesChanged', events);\r\n events = this.addTableParamsEvent('afterDataFiltered', events);\r\n events = this.addTableParamsEvent('afterDataSorted', events);\r\n }\r\n NgTableEventsChannel.prototype.addTableParamsEvent = function (eventName, target) {\r\n var fnName = eventName.charAt(0).toUpperCase() + eventName.substring(1);\r\n var event = (_a = {},\r\n _a['on' + fnName] = this.createEventSubscriptionFn(eventName),\r\n _a['publish' + fnName] = this.createPublishEventFn(eventName),\r\n _a);\r\n return __WEBPACK_IMPORTED_MODULE_0_angular__[\"extend\"](target, event);\r\n var _a;\r\n };\r\n NgTableEventsChannel.prototype.createPublishEventFn = function (eventName) {\r\n var _this = this;\r\n return function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n (_a = _this.$rootScope).$broadcast.apply(_a, ['ngTable:' + eventName].concat(args));\r\n var _a;\r\n };\r\n };\r\n NgTableEventsChannel.prototype.createEventSubscriptionFn = function (eventName) {\r\n var _this = this;\r\n return function (handler, eventSelectorOrScope, eventSelector) {\r\n var actualEvtSelector;\r\n var scope = _this.$rootScope;\r\n if (isScopeLike(eventSelectorOrScope)) {\r\n scope = eventSelectorOrScope;\r\n actualEvtSelector = createEventSelectorFn(eventSelector);\r\n }\r\n else {\r\n actualEvtSelector = createEventSelectorFn(eventSelectorOrScope);\r\n }\r\n return scope.$on('ngTable:' + eventName, function (event, params) {\r\n var eventArgs = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n eventArgs[_i - 2] = arguments[_i];\r\n }\r\n // don't send events published by the internal NgTableParams created by ngTableController\r\n if (params.isNullInstance)\r\n return;\r\n var fnArgs = [params].concat(eventArgs);\r\n if (actualEvtSelector.apply(this, fnArgs)) {\r\n handler.apply(this, fnArgs);\r\n }\r\n });\r\n };\r\n function createEventSelectorFn(eventSelector) {\r\n if (eventSelector === void 0) { eventSelector = function () { return true; }; }\r\n if (isEventSelectorFunc(eventSelector)) {\r\n return eventSelector;\r\n }\r\n else {\r\n // shorthand for subscriber to only receive events from a specific publisher instance\r\n return function (publisher) { return publisher === eventSelector; };\r\n }\r\n }\r\n function isEventSelectorFunc(val) {\r\n return typeof val === 'function';\r\n }\r\n function isScopeLike(val) {\r\n return val && typeof val.$new === 'function';\r\n }\r\n };\r\n return NgTableEventsChannel;\r\n}());\r\n\r\nNgTableEventsChannel.$inject = ['$rootScope'];\r\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__(12);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__shared__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__ngTableSettings__ = __webpack_require__(11);\n/* harmony export (binding) */ __webpack_require__.d(exports, \"b\", function() { return ParamValues; });\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableParams; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n\r\n\r\n\r\n/**\r\n * The runtime values for {@link NgTableParams} that determine the set of data rows and\r\n * how they are to be displayed in a table\r\n */\r\nvar ParamValues = (function () {\r\n function ParamValues() {\r\n /**\r\n * The index of the \"slice\" of data rows, starting at 1, to be displayed by the table.\r\n */\r\n this.page = 1;\r\n /**\r\n * The number of data rows per page\r\n */\r\n this.count = 10;\r\n /**\r\n * The filter that should be applied to restrict the set of data rows\r\n */\r\n this.filter = {};\r\n /**\r\n * The sort order that should be applied to the data rows.\r\n */\r\n this.sorting = {};\r\n /**\r\n * The grouping that should be applied to the data rows\r\n */\r\n this.group = {};\r\n }\r\n return ParamValues;\r\n}());\r\n\r\n/**\r\n * @private\r\n */\r\nfunction isNumber(n) {\r\n return !isNaN(parseFloat(n)) && isFinite(n);\r\n}\r\n/**\r\n * Parameters manager for an ngTable directive\r\n */\r\nvar NgTableParams = (function () {\r\n function NgTableParams(baseParameters, baseSettings) {\r\n if (baseParameters === void 0) { baseParameters = {}; }\r\n if (baseSettings === void 0) { baseSettings = {}; }\r\n var _this = this;\r\n /**\r\n * The page of data rows currently being displayed in the table\r\n */\r\n this.data = [];\r\n this.defaultSettings = __WEBPACK_IMPORTED_MODULE_3__ngTableSettings__[\"a\" /* Settings */].createWithOverrides();\r\n this.isCommittedDataset = false;\r\n this.initialEvents = [];\r\n this._params = new ParamValues();\r\n this._settings = this.defaultSettings;\r\n // the ngTableController \"needs\" to create a dummy/null instance and it's important to know whether an instance\r\n // is one of these\r\n if (typeof baseParameters === \"boolean\") {\r\n this.isNullInstance = true;\r\n }\r\n this.reloadPages = (function () {\r\n var currentPages;\r\n return function () {\r\n var oldPages = currentPages;\r\n var newPages = _this.generatePagesArray(_this.page(), _this.total(), _this.count());\r\n if (!__WEBPACK_IMPORTED_MODULE_0_angular__[\"equals\"](oldPages, newPages)) {\r\n currentPages = newPages;\r\n _this.ngTableEventsChannel.publishPagesChanged(_this, newPages, oldPages);\r\n }\r\n };\r\n })();\r\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__shared__[\"b\" /* assignPartialDeep */])(this._params, this.ngTableDefaults.params);\r\n this.settings(baseSettings);\r\n this.parameters(baseParameters, true);\r\n this.ngTableEventsChannel.publishAfterCreated(this);\r\n // run events during construction after the initial create event. That way a consumer\r\n // can subscribe to all events for a table without \"dropping\" an event\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"forEach\"](this.initialEvents, function (event) {\r\n event();\r\n });\r\n this.initialEvents = null;\r\n }\r\n NgTableParams.prototype.count = function (count) {\r\n // reset to first page because can be blank page\r\n return count !== undefined ? this.parameters({\r\n 'count': count,\r\n 'page': 1\r\n }) : this._params.count;\r\n };\r\n NgTableParams.prototype.filter = function (filter) {\r\n if (filter != null && typeof filter === 'object') {\r\n return this.parameters({\r\n 'filter': filter,\r\n 'page': 1\r\n });\r\n }\r\n else if (filter === true) {\r\n var keys = Object.keys(this._params.filter);\r\n var significantFilter = {};\r\n for (var i = 0; i < keys.length; i++) {\r\n var filterValue = this._params.filter[keys[i]];\r\n if (filterValue != null && filterValue !== '') {\r\n significantFilter[keys[i]] = filterValue;\r\n }\r\n }\r\n return significantFilter;\r\n }\r\n else {\r\n return this._params.filter;\r\n }\r\n };\r\n /**\r\n * Generate array of pages.\r\n * When no arguments supplied, the current parameter state of this `NgTableParams` instance will be used\r\n * @param currentPage Which page must be active\r\n * @param totalItems Total quantity of items\r\n * @param pageSize Quantity of items on page\r\n * @param maxBlocks Quantity of blocks for pagination\r\n * @returns Array of pages\r\n */\r\n NgTableParams.prototype.generatePagesArray = function (currentPage, totalItems, pageSize, maxBlocks) {\r\n if (!arguments.length) {\r\n currentPage = this.page();\r\n totalItems = this.total();\r\n pageSize = this.count();\r\n }\r\n var maxPage, maxPivotPages, minPage, numPages;\r\n maxBlocks = maxBlocks && maxBlocks < 6 ? 6 : maxBlocks;\r\n var pages = [];\r\n numPages = Math.ceil(totalItems / pageSize);\r\n if (numPages > 1) {\r\n pages.push({\r\n type: 'prev',\r\n number: Math.max(1, currentPage - 1),\r\n active: currentPage > 1\r\n });\r\n pages.push({\r\n type: 'first',\r\n number: 1,\r\n active: currentPage > 1,\r\n current: currentPage === 1\r\n });\r\n maxPivotPages = Math.round((this._settings.paginationMaxBlocks - this._settings.paginationMinBlocks) / 2);\r\n minPage = Math.max(2, currentPage - maxPivotPages);\r\n maxPage = Math.min(numPages - 1, currentPage + maxPivotPages * 2 - (currentPage - minPage));\r\n minPage = Math.max(2, minPage - (maxPivotPages * 2 - (maxPage - minPage)));\r\n var i = minPage;\r\n while (i <= maxPage) {\r\n if ((i === minPage && i !== 2) || (i === maxPage && i !== numPages - 1)) {\r\n pages.push({\r\n type: 'more',\r\n active: false\r\n });\r\n }\r\n else {\r\n pages.push({\r\n type: 'page',\r\n number: i,\r\n active: currentPage !== i,\r\n current: currentPage === i\r\n });\r\n }\r\n i++;\r\n }\r\n pages.push({\r\n type: 'last',\r\n number: numPages,\r\n active: currentPage !== numPages,\r\n current: currentPage === numPages\r\n });\r\n pages.push({\r\n type: 'next',\r\n number: Math.min(numPages, currentPage + 1),\r\n active: currentPage < numPages\r\n });\r\n }\r\n return pages;\r\n };\r\n NgTableParams.prototype.group = function (group, sortDirection) {\r\n if (group === undefined) {\r\n return this._params.group;\r\n }\r\n var newParameters = {\r\n page: 1\r\n };\r\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"a\" /* isGroupingFun */])(group) && sortDirection !== undefined) {\r\n group.sortDirection = sortDirection;\r\n newParameters.group = group;\r\n }\r\n else if (typeof group === 'string' && sortDirection !== undefined) {\r\n newParameters.group = (_a = {}, _a[group] = sortDirection, _a);\r\n }\r\n else {\r\n newParameters.group = group;\r\n }\r\n this.parameters(newParameters);\r\n return this;\r\n var _a;\r\n };\r\n /**\r\n * Returns true when an attempt to `reload` the current `parameter` values have resulted in a failure.\r\n * This method will continue to return true until the `reload` is successfully called or when the\r\n * `parameter` values have changed\r\n */\r\n NgTableParams.prototype.hasErrorState = function () {\r\n return !!(this.errParamsMemento && __WEBPACK_IMPORTED_MODULE_0_angular__[\"equals\"](this.errParamsMemento, this.createComparableParams()));\r\n };\r\n /**\r\n * Returns true if `filter` has significant filter value(s) (any value except null, undefined, or empty string),\r\n * otherwise false\r\n */\r\n NgTableParams.prototype.hasFilter = function () {\r\n return Object.keys(this.filter(true)).length > 0;\r\n };\r\n /**\r\n * Return true when a change to `filters` require the `reload` method\r\n * to be run so as to ensure the data presented to the user reflects these filters\r\n */\r\n NgTableParams.prototype.hasFilterChanges = function () {\r\n var previousFilter = (this.prevParamsMemento && this.prevParamsMemento.params.filter);\r\n return !__WEBPACK_IMPORTED_MODULE_0_angular__[\"equals\"]((this._params.filter), previousFilter) || this.hasGlobalSearchFieldChanges();\r\n };\r\n NgTableParams.prototype.hasGroup = function (group, sortDirection) {\r\n if (group == null) {\r\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"a\" /* isGroupingFun */])(this._params.group) || Object.keys(this._params.group).length > 0;\r\n }\r\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"a\" /* isGroupingFun */])(group)) {\r\n if (sortDirection == null) {\r\n return this._params.group === group;\r\n }\r\n else {\r\n return this._params.group === group && group.sortDirection === sortDirection;\r\n }\r\n }\r\n else {\r\n if (sortDirection == null) {\r\n return Object.keys(this._params.group).indexOf(group) !== -1;\r\n }\r\n else {\r\n return this._params.group[group] === sortDirection;\r\n }\r\n }\r\n };\r\n /**\r\n * Return true when a change to this instance should require the `reload` method\r\n * to be run so as to ensure the data rows presented to the user reflects the current state.\r\n *\r\n * Note that this method will return false when the `reload` method has run but fails. In this case\r\n * `hasErrorState` will return true.\r\n *\r\n * The built-in `ngTable` directives will watch for when this function returns true and will then call\r\n * the `reload` method to load its data rows\r\n */\r\n NgTableParams.prototype.isDataReloadRequired = function () {\r\n // note: using != as want to treat null and undefined the same\r\n return !this.isCommittedDataset || !__WEBPACK_IMPORTED_MODULE_0_angular__[\"equals\"](this.createComparableParams(), this.prevParamsMemento)\r\n || this.hasGlobalSearchFieldChanges();\r\n };\r\n /**\r\n * Returns true if sorting by the field supplied. Where direction supplied\r\n * the field must also be sorted by that direction to return true\r\n */\r\n NgTableParams.prototype.isSortBy = function (field, direction) {\r\n if (direction !== undefined) {\r\n return this._params.sorting[field] !== undefined && this._params.sorting[field] == direction;\r\n }\r\n else {\r\n return this._params.sorting[field] !== undefined;\r\n }\r\n };\r\n /**\r\n * Returns sorting values in a format that can be consumed by the angular `$orderBy` filter service\r\n */\r\n NgTableParams.prototype.orderBy = function () {\r\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"b\" /* convertSortToOrderBy */])(this._params.sorting);\r\n };\r\n NgTableParams.prototype.page = function (page) {\r\n return page !== undefined ? this.parameters({\r\n 'page': page\r\n }) : this._params.page;\r\n };\r\n NgTableParams.prototype.parameters = function (newParameters, parseParamsFromUrl) {\r\n if (newParameters === undefined) {\r\n return this._params;\r\n }\r\n // todo: move parsing of url like parameters into a seperate method\r\n parseParamsFromUrl = parseParamsFromUrl || false;\r\n for (var key in newParameters) {\r\n var value = newParameters[key];\r\n if (parseParamsFromUrl && key.indexOf('[') >= 0) {\r\n var keys = key.split(/\\[(.*)\\]/).reverse();\r\n var lastKey = '';\r\n for (var i = 0, len = keys.length; i < len; i++) {\r\n var name_1 = keys[i];\r\n if (name_1 !== '') {\r\n var v = value;\r\n value = {};\r\n value[lastKey = name_1] = (isNumber(v) ? parseFloat(v) : v);\r\n }\r\n }\r\n if (lastKey === 'sorting') {\r\n this._params[lastKey] = {};\r\n }\r\n this._params[lastKey] = __WEBPACK_IMPORTED_MODULE_0_angular__[\"extend\"](this._params[lastKey] || {}, value[lastKey]);\r\n }\r\n else {\r\n if (newParameters[key] === undefined) {\r\n }\r\n else if (key === 'group') {\r\n this._params[key] = this.parseGroup(newParameters[key]);\r\n }\r\n else {\r\n this._params[key] = (isNumber(newParameters[key]) ? parseFloat(newParameters[key]) : newParameters[key]);\r\n }\r\n }\r\n }\r\n this.log('ngTable: set parameters', this._params);\r\n return this;\r\n };\r\n /**\r\n * Trigger a reload of the data rows\r\n */\r\n NgTableParams.prototype.reload = function () {\r\n var _this = this;\r\n var pData;\r\n this._settings.$loading = true;\r\n this.prevParamsMemento = __WEBPACK_IMPORTED_MODULE_0_angular__[\"copy\"](this.createComparableParams());\r\n this.isCommittedDataset = true;\r\n if (this.hasGroup()) {\r\n pData = this.runInterceptorPipeline(this.$q.when(this._settings.getGroups(this)));\r\n }\r\n else {\r\n var fn = this._settings.getData;\r\n pData = this.runInterceptorPipeline(this.$q.when(fn(this)));\r\n }\r\n this.log('ngTable: reload data');\r\n var oldData = this.data;\r\n return pData.then(function (data) {\r\n _this._settings.$loading = false;\r\n _this.errParamsMemento = null;\r\n _this.data = data;\r\n // note: I think it makes sense to publish this event even when data === oldData\r\n // subscribers can always set a filter to only receive the event when data !== oldData\r\n _this.ngTableEventsChannel.publishAfterReloadData(_this, data, oldData);\r\n _this.reloadPages();\r\n return data;\r\n }).catch(function (reason) {\r\n _this.errParamsMemento = _this.prevParamsMemento;\r\n // \"rethrow\"\r\n return _this.$q.reject(reason);\r\n });\r\n };\r\n NgTableParams.prototype.settings = function (newSettings) {\r\n var _this = this;\r\n if (newSettings === undefined) {\r\n return this._settings;\r\n }\r\n var settings = __WEBPACK_IMPORTED_MODULE_3__ngTableSettings__[\"a\" /* Settings */].merge(this._settings, newSettings);\r\n var originalDataset = this._settings.dataset;\r\n this._settings = settings;\r\n // note: using != as want null and undefined to be treated the same\r\n var hasDatasetChanged = newSettings.hasOwnProperty('dataset') && (newSettings.dataset != originalDataset);\r\n if (hasDatasetChanged) {\r\n if (this.isCommittedDataset) {\r\n this.page(1); // reset page as a new dataset has been supplied\r\n }\r\n this.isCommittedDataset = false;\r\n var fireEvent = function () {\r\n _this.ngTableEventsChannel.publishDatasetChanged(_this, newSettings.dataset, originalDataset);\r\n };\r\n if (this.initialEvents) {\r\n this.initialEvents.push(fireEvent);\r\n }\r\n else {\r\n fireEvent();\r\n }\r\n }\r\n this.log('ngTable: set settings', this._settings);\r\n return this;\r\n };\r\n NgTableParams.prototype.sorting = function (sorting, direction) {\r\n if (typeof sorting === 'string') {\r\n this.parameters({\r\n 'sorting': (_a = {}, _a[sorting] = direction || this.settings().defaultSort, _a)\r\n });\r\n return this;\r\n }\r\n return sorting !== undefined ? this.parameters({\r\n 'sorting': sorting\r\n }) : this._params.sorting;\r\n var _a;\r\n };\r\n NgTableParams.prototype.total = function (total) {\r\n return total !== undefined ? this.settings({\r\n 'total': total\r\n }) : this._settings.total;\r\n };\r\n /**\r\n * Returns the current parameter values uri-encoded. Set `asString` to\r\n * true for the parameters to be returned as an array of strings of the form 'paramName=value'\r\n * otherwise parameters returned as a key-value object\r\n */\r\n NgTableParams.prototype.url = function (asString) {\r\n if (asString === void 0) { asString = false; }\r\n var pairs = (asString ? [] : {});\r\n for (var key in this._params) {\r\n if (this._params.hasOwnProperty(key)) {\r\n var item = this._params[key], name_2 = encodeURIComponent(key);\r\n if (typeof item === \"object\") {\r\n for (var subkey in item) {\r\n if (isSignificantValue(item[subkey], key)) {\r\n var pname = name_2 + \"[\" + encodeURIComponent(subkey) + \"]\";\r\n collectValue(item[subkey], pname);\r\n }\r\n }\r\n }\r\n else if (!__WEBPACK_IMPORTED_MODULE_0_angular__[\"isFunction\"](item) && isSignificantValue(item, key)) {\r\n collectValue(item, name_2);\r\n }\r\n }\r\n }\r\n return pairs;\r\n function collectValue(value, key) {\r\n if (isArray(pairs)) {\r\n pairs.push(key + \"=\" + encodeURIComponent(value));\r\n }\r\n else {\r\n pairs[key] = encodeURIComponent(value);\r\n }\r\n }\r\n function isArray(pairs) {\r\n return asString;\r\n }\r\n function isSignificantValue(value, key) {\r\n return key === \"group\" ? true : typeof value !== undefined && value !== \"\";\r\n }\r\n };\r\n NgTableParams.prototype.createComparableParams = function () {\r\n var group = this._params.group;\r\n return {\r\n params: this._params,\r\n groupSortDirection: __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"a\" /* isGroupingFun */])(group) ? group.sortDirection : undefined\r\n };\r\n };\r\n NgTableParams.prototype.hasGlobalSearchFieldChanges = function () {\r\n var currentVal = (this._params.filter && this._params.filter['$']);\r\n var previousVal = (this.prevParamsMemento && this.prevParamsMemento.params.filter && this.prevParamsMemento.params.filter['$']);\r\n return !__WEBPACK_IMPORTED_MODULE_0_angular__[\"equals\"](currentVal, previousVal);\r\n };\r\n NgTableParams.prototype.log = function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n if (this._settings.debugMode && this.$log.debug) {\r\n (_a = this.$log).debug.apply(_a, args);\r\n }\r\n var _a;\r\n };\r\n NgTableParams.prototype.parseGroup = function (group) {\r\n var defaultSort = this._settings.groupOptions.defaultSort;\r\n if (!group) {\r\n return group;\r\n }\r\n else if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"a\" /* isGroupingFun */])(group)) {\r\n if (group.sortDirection == null) {\r\n group.sortDirection = defaultSort;\r\n }\r\n return group;\r\n }\r\n else if (typeof group === 'object') {\r\n for (var key in group) {\r\n if (group[key] == null) {\r\n group[key] = defaultSort;\r\n }\r\n }\r\n return group;\r\n }\r\n else {\r\n return _a = {},\r\n _a[group] = defaultSort,\r\n _a;\r\n }\r\n var _a;\r\n };\r\n NgTableParams.prototype.runInterceptorPipeline = function (fetchedData) {\r\n var _this = this;\r\n return this._settings.interceptors.reduce(function (result, interceptor) {\r\n var thenFn = (interceptor.response && interceptor.response.bind(interceptor)) || _this.$q.when;\r\n var rejectFn = (interceptor.responseError && interceptor.responseError.bind(interceptor)) || _this.$q.reject;\r\n return result.then(function (data) {\r\n return thenFn(data, _this);\r\n }, function (reason) {\r\n return rejectFn(reason, _this);\r\n });\r\n }, fetchedData);\r\n };\r\n NgTableParams.init = function ($q, $log, ngTableDefaults, ngTableEventsChannel) {\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"extend\"](NgTableParams.prototype, {\r\n $q: $q, $log: $log, ngTableDefaults: ngTableDefaults, ngTableEventsChannel: ngTableEventsChannel\r\n });\r\n };\r\n return NgTableParams;\r\n}());\r\n\r\nNgTableParams.init.$inject = ['$q', '$log', 'ngTableDefaults', 'ngTableEventsChannel'];\r\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__shared__ = __webpack_require__(4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__data__ = __webpack_require__(3);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__filtering__ = __webpack_require__(6);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__grouping__ = __webpack_require__(8);\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return Settings; });\n\r\n\r\n\r\n\r\n\r\n/**\r\n * Configuration settings for {@link NgTableParams}\r\n */\r\nvar Settings = (function () {\r\n function Settings() {\r\n /**\r\n * Returns true whenever a call to `getData` is in progress\r\n */\r\n this.$loading = false;\r\n /**\r\n * The page size buttons that should be displayed. Each value defined in the array\r\n * determines the possible values that can be supplied to {@link NgTableParams} `page`\r\n */\r\n this.counts = [10, 25, 50, 100];\r\n /**\r\n * An array that contains all the data rows that table should manage.\r\n * The `gateData` function will be used to manage the data rows\r\n * that ultimately will be displayed.\r\n */\r\n this.dataset = undefined;\r\n this.dataOptions = new __WEBPACK_IMPORTED_MODULE_2__data__[\"a\" /* DataSettings */]();\r\n this.debugMode = false;\r\n /**\r\n * The total number of data rows before paging has been applied.\r\n * Typically you will not need to supply this yourself\r\n */\r\n this.total = 0;\r\n /**\r\n * The default sort direction that will be used whenever a sorting is supplied that\r\n * does not define its own sort direction\r\n */\r\n this.defaultSort = 'desc';\r\n this.filterOptions = new __WEBPACK_IMPORTED_MODULE_3__filtering__[\"a\" /* FilterSettings */]();\r\n /**\r\n * The function that will be used fetch data rows. Leave undefined to let the {@link IDefaultGetData}\r\n * service provide a default implementation that will work with the `dataset` array you supply.\r\n *\r\n * Typically you will supply a custom function when you need to execute filtering, paging and sorting\r\n * on the server\r\n */\r\n this.getData = Settings.defaultGetData;\r\n /**\r\n * The function that will be used group data rows according to the groupings returned by {@link NgTableParams} `group`\r\n */\r\n this.getGroups = Settings.defaultGetGroups;\r\n this.groupOptions = new __WEBPACK_IMPORTED_MODULE_4__grouping__[\"a\" /* GroupSettings */]();\r\n /**\r\n * The collection of interceptors that should apply to the results of a call to\r\n * the `getData` function before the data rows are displayed in the table\r\n */\r\n this.interceptors = new Array();\r\n /**\r\n * Configuration for the template that will display the page size buttons\r\n */\r\n this.paginationMaxBlocks = 11;\r\n /**\r\n * Configuration for the template that will display the page size buttons\r\n */\r\n this.paginationMinBlocks = 5;\r\n /**\r\n * The html tag that will be used to display the sorting indicator in the table header\r\n */\r\n this.sortingIndicator = 'span';\r\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__shared__[\"a\" /* checkClassInit */])(Settings);\r\n }\r\n Settings.createWithOverrides = function () {\r\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__shared__[\"a\" /* checkClassInit */])(Settings);\r\n return Settings.merge(Settings.instance, Settings.ngTableDefaults.settings || {});\r\n };\r\n Settings.merge = function (existing, newSettings) {\r\n __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__shared__[\"a\" /* checkClassInit */])(Settings);\r\n var optionalPropNames = ['dataset'];\r\n var results = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__shared__[\"b\" /* assignPartialDeep */])(__WEBPACK_IMPORTED_MODULE_0_angular__[\"copy\"](existing), newSettings, function (key) { return optionalPropNames.indexOf(key) !== -1; }, function (destValue, srcValue, key) {\r\n // copy *reference* to dataset\r\n if (key === 'dataset') {\r\n return srcValue;\r\n }\r\n return undefined;\r\n });\r\n if (newSettings.dataset) {\r\n results.total = newSettings.dataset.length;\r\n Settings.optimizeFilterDelay(results);\r\n }\r\n return results;\r\n };\r\n Settings.optimizeFilterDelay = function (settings) {\r\n // don't debounce by default filter input when working with small synchronous datasets\r\n if (settings.filterOptions.filterDelay === Settings.instance.filterOptions.filterDelay &&\r\n settings.total <= settings.filterOptions.filterDelayThreshold &&\r\n settings.getData === Settings.instance.getData) {\r\n settings.filterOptions.filterDelay = 0;\r\n }\r\n };\r\n Settings.init = function (ngTableDefaultGetData, ngTableDefaultGetGroups, ngTableDefaults) {\r\n Settings.defaultGetData = function (params) {\r\n return ngTableDefaultGetData(params.settings().dataset, params);\r\n };\r\n Settings.defaultGetGroups = ngTableDefaultGetGroups;\r\n Settings.ngTableDefaults = ngTableDefaults;\r\n Settings.isInitialized = true;\r\n Settings.instance = new Settings();\r\n };\r\n return Settings;\r\n}());\r\n\r\nSettings.isInitialized = false;\r\nSettings.init.$inject = ['ngTableDefaultGetData', 'ngTableDefaultGetGroups', 'ngTableDefaults'];\r\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ exports[\"b\"] = convertSortToOrderBy;\n/* harmony export (immutable) */ exports[\"a\"] = isGroupingFun;\n/**\r\n * @private\r\n */\r\nfunction convertSortToOrderBy(sorting) {\r\n var result = [];\r\n for (var column in sorting) {\r\n result.push((sorting[column] === \"asc\" ? \"+\" : \"-\") + column);\r\n }\r\n return result;\r\n}\r\n/**\r\n * @private\r\n */\r\nfunction isGroupingFun(val) {\r\n return typeof val === 'function';\r\n}\r\n\n\n/***/ },\n/* 13 */,\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony export (immutable) */ exports[\"a\"] = ngTable;\n\r\nngTable.$inject = ['$q', '$parse'];\r\n/**\r\n * Directive that instantiates {@link NgTableController NgTableController}.\r\n * @ngdoc directive\r\n * @name ngTable\r\n * @example\r\n *\r\n * ```html\r\n * <table ng-table=\"$ctrl.tableParams\" show-filter=\"true\" class=\"table table-bordered\">\r\n * <tr ng-repeat=\"user in $data\">\r\n * <td data-title=\"'Name'\" sortable=\"'name'\" filter=\"{ 'name': 'text' }\">\r\n * {{user.name}}\r\n * </td>\r\n * <td data-title=\"'Age'\" sortable=\"'age'\" filter=\"{ 'age': 'text' }\">\r\n * {{user.age}}\r\n * </td>\r\n * </tr>\r\n * </table>\r\n * ```\r\n */\r\nfunction ngTable($q, $parse) {\r\n return {\r\n restrict: 'A',\r\n priority: 1001,\r\n scope: true,\r\n controller: 'ngTableController',\r\n compile: function (element) {\r\n var compiledColumns = [], i = 0, dataRow, groupRow;\r\n var rows = [];\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"forEach\"](element.find('tr'), function (tr) {\r\n rows.push(__WEBPACK_IMPORTED_MODULE_0_angular__[\"element\"](tr));\r\n });\r\n dataRow = rows.filter(function (tr) { return !tr.hasClass('ng-table-group'); })[0];\r\n groupRow = rows.filter(function (tr) { return tr.hasClass('ng-table-group'); })[0];\r\n if (!dataRow) {\r\n return undefined;\r\n }\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"forEach\"](dataRow.find('td'), function (item) {\r\n var el = __WEBPACK_IMPORTED_MODULE_0_angular__[\"element\"](item);\r\n if (el.attr('ignore-cell') && 'true' === el.attr('ignore-cell')) {\r\n return;\r\n }\r\n var getAttrValue = function (attr) {\r\n return el.attr('x-data-' + attr) || el.attr('data-' + attr) || el.attr(attr);\r\n };\r\n var setAttrValue = function (attr, value) {\r\n if (el.attr('x-data-' + attr)) {\r\n el.attr('x-data-' + attr, value);\r\n }\r\n else if (el.attr('data' + attr)) {\r\n el.attr('data' + attr, value);\r\n }\r\n else {\r\n el.attr(attr, value);\r\n }\r\n };\r\n var parsedAttribute = function (attr) {\r\n var expr = getAttrValue(attr);\r\n if (!expr) {\r\n return undefined;\r\n }\r\n var localValue;\r\n var getter = function (context) {\r\n if (localValue !== undefined) {\r\n return localValue;\r\n }\r\n return $parse(expr)(context);\r\n };\r\n getter.assign = function ($scope, value) {\r\n var parsedExpr = $parse(expr);\r\n if (parsedExpr.assign) {\r\n // we should be writing back to the parent scope as this is where the expression\r\n // came from\r\n parsedExpr.assign($scope.$parent, value);\r\n }\r\n else {\r\n localValue = value;\r\n }\r\n };\r\n return getter;\r\n };\r\n var titleExpr = getAttrValue('title-alt') || getAttrValue('title');\r\n if (titleExpr) {\r\n el.attr('data-title-text', '{{' + titleExpr + '}}'); // this used in responsive table\r\n }\r\n // NOTE TO MAINTAINERS: if you add extra fields to a $column be sure to extend ngTableColumn with\r\n // a corresponding \"safe\" default\r\n compiledColumns.push({\r\n id: i++,\r\n title: parsedAttribute('title'),\r\n titleAlt: parsedAttribute('title-alt'),\r\n headerTitle: parsedAttribute('header-title'),\r\n sortable: parsedAttribute('sortable'),\r\n 'class': parsedAttribute('header-class'),\r\n filter: parsedAttribute('filter'),\r\n groupable: parsedAttribute('groupable'),\r\n headerTemplateURL: parsedAttribute('header'),\r\n filterData: parsedAttribute('filter-data'),\r\n show: el.attr(\"ng-if\") ? parsedAttribute('ng-if') : undefined\r\n });\r\n if (groupRow || el.attr(\"ng-if\")) {\r\n // change ng-if to bind to our column definition which we know will be writable\r\n // because this will potentially increase the $watch count, only do so if we already have an\r\n // ng-if or when we definitely need to change visibility of the columns.\r\n // currently only ngTableGroupRow directive needs to change visibility\r\n setAttrValue('ng-if', '$columns[' + (compiledColumns.length - 1) + '].show(this)');\r\n }\r\n });\r\n return function (scope, element, attrs, controller) {\r\n var columns = scope.$columns = controller.buildColumns(compiledColumns);\r\n controller.setupBindingsToInternalScope(attrs.ngTable);\r\n controller.loadFilterData(columns);\r\n controller.compileDirectiveTemplates();\r\n };\r\n }\r\n };\r\n}\r\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableColumn; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n/**\r\n * @private\r\n */\r\nfunction isScopeLike(object) {\r\n return object != null && __WEBPACK_IMPORTED_MODULE_0_angular__[\"isFunction\"](object.$new);\r\n}\r\n/**\r\n * @private\r\n * Service to construct a $column definition used by {@link ngTable ngTable} directive\r\n */\r\nvar NgTableColumn = (function () {\r\n function NgTableColumn() {\r\n }\r\n /**\r\n * Creates a $column for use within a header template\r\n *\r\n * @param column the initial definition for $column to build\r\n * @param defaultScope the $scope to supply to the $column getter methods when not supplied by caller\r\n * @param columns a reference to the $columns array to make available on the context supplied to the\r\n * $column getter methods\r\n */\r\n NgTableColumn.prototype.buildColumn = function (column, defaultScope, columns) {\r\n // note: we're not modifying the original column object. This helps to avoid unintended side affects\r\n var extendedCol = Object.create(column);\r\n var defaults = this.createDefaults();\r\n var _loop_1 = function (prop) {\r\n if (extendedCol[prop] === undefined) {\r\n extendedCol[prop] = defaults[prop];\r\n }\r\n if (!__WEBPACK_IMPORTED_MODULE_0_angular__[\"isFunction\"](extendedCol[prop])) {\r\n // wrap raw field values with \"getter\" functions\r\n // - this is to ensure consistency with how ngTable.compile builds columns\r\n // - note that the original column object is being \"proxied\"; this is important\r\n // as it ensure that any changes to the original object will be returned by the \"getter\"\r\n var getterSetter = function getterSetter() {\r\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\r\n getterSetter.assign(null, arguments[0]);\r\n }\r\n else {\r\n return column[prop];\r\n }\r\n };\r\n getterSetter.assign = function ($scope, value) {\r\n column[prop] = value;\r\n };\r\n extendedCol[prop] = getterSetter;\r\n }\r\n // satisfy the arguments expected by the function returned by parsedAttribute in the ngTable directive\r\n var getterFn = extendedCol[prop];\r\n extendedCol[prop] = function () {\r\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\r\n getterFn.assign(defaultScope, arguments[0]);\r\n }\r\n else {\r\n var scope = arguments[0] || defaultScope;\r\n var context = Object.create(scope);\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"extend\"](context, {\r\n $column: extendedCol,\r\n $columns: columns\r\n });\r\n return getterFn.call(column, context);\r\n }\r\n };\r\n if (getterFn.assign) {\r\n extendedCol[prop].assign = getterFn.assign;\r\n }\r\n else {\r\n var wrappedGetterFn_1 = extendedCol[prop];\r\n var localValue_1;\r\n var getterSetter = function getterSetter() {\r\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\r\n getterSetter.assign(null, arguments[0]);\r\n }\r\n else {\r\n return localValue_1 != undefined ? localValue_1 : wrappedGetterFn_1.apply(extendedCol, arguments);\r\n }\r\n };\r\n getterSetter.assign = function ($scope, value) {\r\n localValue_1 = value;\r\n };\r\n extendedCol[prop] = getterSetter;\r\n }\r\n };\r\n for (var prop in defaults) {\r\n _loop_1(prop);\r\n }\r\n return extendedCol;\r\n };\r\n NgTableColumn.prototype.createDefaults = function () {\r\n return {\r\n 'class': this.createGetterSetter(''),\r\n filter: this.createGetterSetter(false),\r\n groupable: this.createGetterSetter(false),\r\n filterData: __WEBPACK_IMPORTED_MODULE_0_angular__[\"noop\"],\r\n headerTemplateURL: this.createGetterSetter(false),\r\n headerTitle: this.createGetterSetter(''),\r\n sortable: this.createGetterSetter(false),\r\n show: this.createGetterSetter(true),\r\n title: this.createGetterSetter(''),\r\n titleAlt: this.createGetterSetter('')\r\n };\r\n };\r\n NgTableColumn.prototype.createGetterSetter = function (initialValue) {\r\n var value = initialValue;\r\n var getterSetter = function getterSetter() {\r\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\r\n getterSetter.assign(null, arguments[0]);\r\n }\r\n else {\r\n return value;\r\n }\r\n };\r\n getterSetter.assign = function ($scope, newValue) {\r\n value = newValue;\r\n };\r\n return getterSetter;\r\n };\r\n return NgTableColumn;\r\n}());\r\n\r\nNgTableColumn.$inject = [];\r\n\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ exports[\"a\"] = ngTableColumnsBinding;\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\nngTableColumnsBinding.$inject = [\"$parse\"];\r\n/**\r\n * One-way data binds the $columns array generated by ngTable/ngTableDynamic to the specified\r\n * expression.\r\n * This allows the $columns array created for the table to be accessed outside of the html table\r\n * markup.\r\n *\r\n * @ngdoc directive\r\n *\r\n * @example\r\n * ```html\r\n * <table ng-table=\"$ctrl.tableParams\" class=\"table\" ng-table-columns-binding=\"$ctlr.tableColumns\">\r\n * ```\r\n */\r\nfunction ngTableColumnsBinding($parse) {\r\n var directive = {\r\n restrict: 'A',\r\n link: linkFn\r\n };\r\n return directive;\r\n function linkFn($scope, $element, $attrs) {\r\n var setter = $parse($attrs.ngTableColumnsBinding).assign;\r\n if (setter) {\r\n $scope.$watch('$columns', function (newColumns) {\r\n var shallowClone = (newColumns || []).slice(0);\r\n setter($scope, shallowClone);\r\n });\r\n }\r\n }\r\n}\r\n\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__core__ = __webpack_require__(1);\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableController; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n\r\n/**\r\n * The controller for the {@link ngTable ngTable} and {@link ngTableDynamic ngTableDynamic} directives\r\n */\r\nvar NgTableController = (function () {\r\n function NgTableController($scope, $timeout, $parse, $compile, $attrs, $element, $document, ngTableColumn, ngTableEventsChannel) {\r\n this.$scope = $scope;\r\n this.$parse = $parse;\r\n this.$compile = $compile;\r\n this.$attrs = $attrs;\r\n this.$element = $element;\r\n this.$document = $document;\r\n this.ngTableColumn = ngTableColumn;\r\n this.ngTableEventsChannel = ngTableEventsChannel;\r\n var isFirstTimeLoad = true;\r\n $scope.$filterRow = { disabled: false };\r\n $scope.$loading = false;\r\n // until such times as the directive uses an isolated scope, we need to ensure that the check for\r\n // the params field only consults the \"own properties\" of the $scope. This is to avoid seeing the params\r\n // field on a $scope higher up in the prototype chain\r\n if (!$scope.hasOwnProperty(\"params\")) {\r\n $scope.params = new __WEBPACK_IMPORTED_MODULE_1__core__[\"a\" /* NgTableParams */](true);\r\n }\r\n this.delayFilter = (function () {\r\n var timer;\r\n return function (callback, ms) {\r\n $timeout.cancel(timer);\r\n timer = $timeout(callback, ms);\r\n };\r\n })();\r\n // watch for when a new NgTableParams is bound to the scope\r\n // CRITICAL: the watch must be for reference and NOT value equality; this is because NgTableParams maintains\r\n // the current data page as a field. Checking this for value equality would be terrible for performance\r\n // and potentially cause an error if the items in that array has circular references\r\n this.$scope.$watch('params', function (newParams, oldParams) {\r\n if (newParams === oldParams || !newParams) {\r\n return;\r\n }\r\n newParams.reload();\r\n }, false);\r\n this.subscribeToTableEvents();\r\n }\r\n Object.defineProperty(NgTableController.prototype, \"hasVisibleFilterColumn\", {\r\n get: function () {\r\n var _this = this;\r\n if (!this.$scope.$columns)\r\n return false;\r\n return this.some(this.$scope.$columns, function ($column) {\r\n return $column.show(_this.$scope) && !!$column.filter(_this.$scope);\r\n });\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n NgTableController.prototype.onDataReloadStatusChange = function (newStatus /*, oldStatus*/) {\r\n if (!newStatus || this.$scope.params.hasErrorState()) {\r\n return;\r\n }\r\n var currentParams = this.$scope.params;\r\n var filterOptions = currentParams.settings().filterOptions;\r\n if (currentParams.hasFilterChanges()) {\r\n var applyFilter = function () {\r\n currentParams.page(1);\r\n currentParams.reload();\r\n };\r\n if (filterOptions.filterDelay) {\r\n this.delayFilter(applyFilter, filterOptions.filterDelay);\r\n }\r\n else {\r\n applyFilter();\r\n }\r\n }\r\n else {\r\n currentParams.reload();\r\n }\r\n };\r\n NgTableController.prototype.compileDirectiveTemplates = function () {\r\n if (!this.$element.hasClass('ng-table')) {\r\n this.$scope.templates = {\r\n header: (this.$attrs.templateHeader ? this.$attrs.templateHeader : 'ng-table/header.html'),\r\n pagination: (this.$attrs.templatePagination ? this.$attrs.templatePagination : 'ng-table/pager.html')\r\n };\r\n this.$element.addClass('ng-table');\r\n var headerTemplate = void 0;\r\n // $element.find('> thead').length === 0 doesn't work on jqlite\r\n var theadFound_1 = false;\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"forEach\"](this.$element.children(), function (e) {\r\n if (e.tagName === 'THEAD') {\r\n theadFound_1 = true;\r\n }\r\n });\r\n if (!theadFound_1) {\r\n headerTemplate = __WEBPACK_IMPORTED_MODULE_0_angular__[\"element\"]('<thead ng-include=\"templates.header\"></thead>', this.$document);\r\n this.$element.prepend(headerTemplate);\r\n }\r\n var paginationTemplate = __WEBPACK_IMPORTED_MODULE_0_angular__[\"element\"]('<div ng-table-pagination=\"params\" template-url=\"templates.pagination\"></div>', this.$document);\r\n this.$element.after(paginationTemplate);\r\n if (headerTemplate) {\r\n this.$compile(headerTemplate)(this.$scope);\r\n }\r\n this.$compile(paginationTemplate)(this.$scope);\r\n }\r\n };\r\n NgTableController.prototype.loadFilterData = function ($columns) {\r\n var _this = this;\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"forEach\"]($columns, function ($column) {\r\n var result = $column.filterData(_this.$scope);\r\n if (!result) {\r\n delete $column.filterData;\r\n return undefined;\r\n }\r\n if (isPromiseLike(result)) {\r\n delete $column.filterData;\r\n return result.then(function (data) {\r\n // our deferred can eventually return arrays, functions and objects\r\n if (!__WEBPACK_IMPORTED_MODULE_0_angular__[\"isArray\"](data) && !__WEBPACK_IMPORTED_MODULE_0_angular__[\"isFunction\"](data) && !__WEBPACK_IMPORTED_MODULE_0_angular__[\"isObject\"](data)) {\r\n // if none of the above was found - we just want an empty array\r\n data = [];\r\n }\r\n $column.data = data;\r\n });\r\n }\r\n else {\r\n return $column.data = result;\r\n }\r\n });\r\n function isPromiseLike(val) {\r\n return val && typeof val === 'object' && typeof val.then === 'function';\r\n }\r\n };\r\n NgTableController.prototype.buildColumns = function (columns) {\r\n var _this = this;\r\n // todo: use strictNullChecks and remove guard clause\r\n var result = [];\r\n (columns || []).forEach(function (col) {\r\n result.push(_this.ngTableColumn.buildColumn(col, _this.$scope, result));\r\n });\r\n return result;\r\n };\r\n NgTableController.prototype.parseNgTableDynamicExpr = function (attr) {\r\n if (!attr || attr.indexOf(\" with \") > -1) {\r\n var parts = attr.split(/\\s+with\\s+/);\r\n return {\r\n tableParams: parts[0],\r\n columns: parts[1]\r\n };\r\n }\r\n else {\r\n throw new Error('Parse error (expected example: ng-table-dynamic=\\'tableParams with cols\\')');\r\n }\r\n };\r\n NgTableController.prototype.setupBindingsToInternalScope = function (tableParamsExpr) {\r\n // note: this we're setting up watches to simulate angular's isolated scope bindings\r\n var _this = this;\r\n // note: is REALLY important to watch for a change to the ngTableParams *reference* rather than\r\n // $watch for value equivalence. This is because ngTableParams references the current page of data as\r\n // a field and it's important not to watch this\r\n this.$scope.$watch(tableParamsExpr, function (params) {\r\n if (params === undefined) {\r\n return;\r\n }\r\n _this.$scope.params = params;\r\n }, false);\r\n this.setupFilterRowBindingsToInternalScope();\r\n this.setupGroupRowBindingsToInternalScope();\r\n };\r\n NgTableController.prototype.setupFilterRowBindingsToInternalScope = function () {\r\n var _this = this;\r\n if (this.$attrs.showFilter) {\r\n this.$scope.$parent.$watch(this.$attrs.showFilter, function (value) {\r\n _this.$scope.show_filter = value;\r\n });\r\n }\r\n else {\r\n this.$scope.$watch(function () { return _this.hasVisibleFilterColumn; }, function (value) {\r\n _this.$scope.show_filter = value;\r\n });\r\n }\r\n if (this.$attrs.disableFilter) {\r\n this.$scope.$parent.$watch(this.$attrs.disableFilter, function (value) {\r\n _this.$scope.$filterRow.disabled = value;\r\n });\r\n }\r\n };\r\n NgTableController.prototype.setupGroupRowBindingsToInternalScope = function () {\r\n var _this = this;\r\n this.$scope.$groupRow = { show: false };\r\n if (this.$attrs.showGroup) {\r\n var showGroupGetter_1 = this.$parse(this.$attrs.showGroup);\r\n this.$scope.$parent.$watch(showGroupGetter_1, function (value) {\r\n _this.$scope.$groupRow.show = value;\r\n });\r\n if (showGroupGetter_1.assign) {\r\n // setup two-way databinding thus allowing ngTableGrowRow to assign to the showGroup expression\r\n this.$scope.$watch('$groupRow.show', function (value) {\r\n showGroupGetter_1.assign(_this.$scope.$parent, value);\r\n });\r\n }\r\n }\r\n else {\r\n this.$scope.$watch('params.hasGroup()', function (newValue) {\r\n _this.$scope.$groupRow.show = newValue;\r\n });\r\n }\r\n };\r\n NgTableController.prototype.getVisibleColumns = function () {\r\n var _this = this;\r\n return (this.$scope.$columns || []).filter(function (c) {\r\n return c.show(_this.$scope);\r\n });\r\n };\r\n NgTableController.prototype.subscribeToTableEvents = function () {\r\n var _this = this;\r\n this.$scope.$watch('params.isDataReloadRequired()', function (newStatus /*, oldStatus*/) {\r\n _this.onDataReloadStatusChange(newStatus);\r\n });\r\n this.ngTableEventsChannel.onAfterReloadData(function (params, newDatapage) {\r\n var visibleColumns = _this.getVisibleColumns();\r\n if (params.hasGroup()) {\r\n _this.$scope.$groups = (newDatapage || []);\r\n _this.$scope.$groups.visibleColumnCount = visibleColumns.length;\r\n }\r\n else {\r\n _this.$scope.$data = (newDatapage || []);\r\n _this.$scope.$data.visibleColumnCount = visibleColumns.length;\r\n }\r\n }, this.$scope, function (publisher) { return _this.$scope.params === publisher; });\r\n this.ngTableEventsChannel.onPagesChanged(function (params, newPages) {\r\n _this.$scope.pages = newPages;\r\n }, this.$scope, function (publisher) { return _this.$scope.params === publisher; });\r\n };\r\n NgTableController.prototype.some = function (array, predicate) {\r\n var found = false;\r\n for (var i = 0; i < array.length; i++) {\r\n var obj = array[i];\r\n if (predicate(obj)) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n return found;\r\n };\r\n return NgTableController;\r\n}());\r\n\r\nNgTableController.$inject = [\r\n '$scope', '$timeout', '$parse', '$compile', '$attrs', '$element', '$document', 'ngTableColumn', 'ngTableEventsChannel'\r\n];\r\n\n\n/***/ },\n/* 18 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony export (immutable) */ exports[\"a\"] = ngTableDynamic;\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\nfunction toArray(arr) {\r\n return Array.prototype.slice.call(arr);\r\n}\r\nngTableDynamic.$inject = [];\r\n/**\r\n * A dynamic version of the {@link ngTable ngTable} directive that accepts a dynamic list of columns\r\n * definitions to render\r\n * @ngdoc directive\r\n *\r\n * @example\r\n * ```html\r\n * <table ng-table-dynamic=\"$ctrl.tableParams with $ctrl.cols\" class=\"table\">\r\n * <tr ng-repeat=\"row in $data\">\r\n * <td ng-repeat=\"col in $columns\">{{row[col.field]}}</td>\r\n * </tr>\r\n * </table>\r\n * ```\r\n */\r\nfunction ngTableDynamic() {\r\n return {\r\n restrict: 'A',\r\n priority: 1001,\r\n scope: true,\r\n controller: 'ngTableController',\r\n compile: function (tElement) {\r\n var tRows = toArray(tElement[0].getElementsByTagName('tr'));\r\n var tRow = tRows.filter(function (tr) { return !__WEBPACK_IMPORTED_MODULE_0_angular__[\"element\"](tr).hasClass('ng-table-group'); })[0];\r\n if (!tRow) {\r\n return undefined;\r\n }\r\n toArray(tRow.getElementsByTagName('td')).forEach(function (tCell) {\r\n var el = __WEBPACK_IMPORTED_MODULE_0_angular__[\"element\"](tCell);\r\n var getAttrValue = function (attr) {\r\n return el.attr('x-data-' + attr) || el.attr('data-' + attr) || el.attr(attr);\r\n };\r\n // this used in responsive table\r\n var titleExpr = getAttrValue('title');\r\n if (!titleExpr) {\r\n el.attr('data-title-text', '{{$columns[$index].titleAlt(this) || $columns[$index].title(this)}}');\r\n }\r\n var showExpr = el.attr('ng-if');\r\n if (!showExpr) {\r\n el.attr('ng-if', '$columns[$index].show(this)');\r\n }\r\n });\r\n return function (scope, element, attrs, controller) {\r\n var expr = controller.parseNgTableDynamicExpr(attrs.ngTableDynamic);\r\n controller.setupBindingsToInternalScope(expr.tableParams);\r\n controller.compileDirectiveTemplates();\r\n scope.$watchCollection(expr.columns, function (newCols /*, oldCols*/) {\r\n scope.$columns = controller.buildColumns(newCols);\r\n controller.loadFilterData(scope.$columns);\r\n });\r\n };\r\n }\r\n };\r\n}\r\n\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ exports[\"a\"] = ngTableFilterRow;\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\nvar templateUrl = __webpack_require__(35);\r\nngTableFilterRow.$inject = [];\r\n/**\r\n * directive that renders the filter header row for a table\r\n * @ngdoc directive\r\n * @example\r\n * ```html\r\n * <ng-table-filter-row></ng-table-filter-row>\r\n * ```\r\n */\r\nfunction ngTableFilterRow() {\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: templateUrl,\r\n scope: true,\r\n controller: 'ngTableFilterRowController',\r\n controllerAs: '$ctrl'\r\n };\r\n return directive;\r\n}\r\n\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableFilterRowController; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n/**\r\n * Controller for the {@link ngTableFilterRow ngTableFilterRow} directive\r\n */\r\nvar NgTableFilterRowController = (function () {\r\n function NgTableFilterRowController($scope, ngTableFilterConfig) {\r\n this.config = ngTableFilterConfig;\r\n // todo: stop doing this. Why?\r\n // * scope inheritance makes it hard to know how supplies functions\r\n // * scope is not a concept in angular 2\r\n // make function available to filter templates\r\n $scope.getFilterPlaceholderValue = this.getFilterPlaceholderValue.bind(this);\r\n }\r\n NgTableFilterRowController.prototype.getFilterCellCss = function (filter, layout) {\r\n if (layout !== 'horizontal') {\r\n return 's12';\r\n }\r\n var size = Object.keys(filter).length;\r\n var width = parseInt((12 / size).toString(), 10);\r\n return 's' + width;\r\n };\r\n NgTableFilterRowController.prototype.getFilterPlaceholderValue = function (filterDef, filterKey) {\r\n if (typeof filterDef === 'string') {\r\n return '';\r\n }\r\n else {\r\n return filterDef.placeholder;\r\n }\r\n };\r\n return NgTableFilterRowController;\r\n}());\r\n\r\nNgTableFilterRowController.$inject = ['$scope', 'ngTableFilterConfig'];\r\n\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ exports[\"a\"] = ngTableGroupRow;\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\nvar templateUrl = __webpack_require__(40);\r\nngTableGroupRow.$inject = [];\r\n/**\r\n * directive that renders the group header row for a table\r\n * @ngdoc directive\r\n * @example\r\n * ```html\r\n * <ng-table-group-row></ng-table-group-row>\r\n * ```\r\n */\r\nfunction ngTableGroupRow() {\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: templateUrl,\r\n scope: true,\r\n controller: 'ngTableGroupRowController',\r\n controllerAs: '$ctrl'\r\n };\r\n return directive;\r\n}\r\n\n\n/***/ },\n/* 22 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableGroupRowController; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n/**\r\n * Controller for the {@link ngTableGroupRow ngTableGroupRow} directive\r\n */\r\nvar NgTableGroupRowController = (function () {\r\n function NgTableGroupRowController($scope) {\r\n var _this = this;\r\n this.$scope = $scope;\r\n this.groupFns = [];\r\n $scope.$watch('params.group()', function (newGrouping) {\r\n _this.setGroup(newGrouping);\r\n }, true);\r\n }\r\n NgTableGroupRowController.prototype.getGroupables = function () {\r\n var _this = this;\r\n var groupableCols = this.$scope.$columns.filter(function ($column) { return !!$column.groupable(_this.$scope); });\r\n return this.groupFns.concat(groupableCols);\r\n };\r\n NgTableGroupRowController.prototype.getGroupTitle = function (group) {\r\n return this.isGroupingFunc(group) ? group.title : group.title(this.$scope);\r\n };\r\n NgTableGroupRowController.prototype.getVisibleColumns = function () {\r\n var _this = this;\r\n return this.$scope.$columns.filter(function ($column) { return $column.show(_this.$scope); });\r\n };\r\n NgTableGroupRowController.prototype.groupBy = function (group) {\r\n if (this.isSelectedGroup(group)) {\r\n this.changeSortDirection();\r\n }\r\n else {\r\n if (this.isGroupingFunc(group)) {\r\n this.$scope.params.group(group);\r\n }\r\n else {\r\n // it's OK, we know that groupable will return a string\r\n // this is guaranteed by getGroupables returning only\r\n // columns that return (truthy) strings\r\n this.$scope.params.group(group.groupable(this.$scope));\r\n }\r\n }\r\n };\r\n NgTableGroupRowController.prototype.isSelectedGroup = function (group) {\r\n if (this.isGroupingFunc(group)) {\r\n return group === this.$scope.$selGroup;\r\n }\r\n else {\r\n return group.groupable(this.$scope) === this.$scope.$selGroup;\r\n }\r\n };\r\n NgTableGroupRowController.prototype.toggleDetail = function () {\r\n this.$scope.params.settings().groupOptions.isExpanded = !this.$scope.params.settings().groupOptions.isExpanded;\r\n return this.$scope.params.reload();\r\n };\r\n NgTableGroupRowController.prototype.changeSortDirection = function () {\r\n var newDirection;\r\n if (this.$scope.params.hasGroup(this.$scope.$selGroup, 'asc')) {\r\n newDirection = 'desc';\r\n }\r\n else if (this.$scope.params.hasGroup(this.$scope.$selGroup, 'desc')) {\r\n newDirection = '';\r\n }\r\n else {\r\n newDirection = 'asc';\r\n }\r\n this.$scope.params.group(this.$scope.$selGroup, newDirection);\r\n };\r\n NgTableGroupRowController.prototype.findGroupColumn = function (groupKey) {\r\n var _this = this;\r\n return this.$scope.$columns.filter(function ($column) { return $column.groupable(_this.$scope) === groupKey; })[0];\r\n };\r\n NgTableGroupRowController.prototype.isGroupingFunc = function (val) {\r\n return typeof val === 'function';\r\n };\r\n NgTableGroupRowController.prototype.setGroup = function (grouping) {\r\n var existingGroupCol = this.findGroupColumn(this.$scope.$selGroup);\r\n if (existingGroupCol && existingGroupCol.show.assign) {\r\n existingGroupCol.show.assign(this.$scope, true);\r\n }\r\n if (this.isGroupingFunc(grouping)) {\r\n this.groupFns = [grouping];\r\n this.$scope.$selGroup = grouping;\r\n this.$scope.$selGroupTitle = grouping.title || '';\r\n }\r\n else {\r\n // note: currently only one group is implemented\r\n var groupKey = Object.keys(grouping || {})[0];\r\n var groupedColumn = this.findGroupColumn(groupKey);\r\n if (groupedColumn) {\r\n this.$scope.$selGroupTitle = groupedColumn.title(this.$scope);\r\n this.$scope.$selGroup = groupKey;\r\n if (groupedColumn.show.assign) {\r\n groupedColumn.show.assign(this.$scope, false);\r\n }\r\n }\r\n }\r\n };\r\n return NgTableGroupRowController;\r\n}());\r\n\r\nNgTableGroupRowController.$inject = ['$scope'];\r\n\n\n/***/ },\n/* 23 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony export (immutable) */ exports[\"a\"] = ngTablePagination;\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\nngTablePagination.$inject = ['$compile', '$document', 'ngTableEventsChannel'];\r\n/**\r\n * Directive that renders the table pagination controls\r\n * @ngdoc directive\r\n */\r\nfunction ngTablePagination($compile, $document, ngTableEventsChannel) {\r\n return {\r\n restrict: 'A',\r\n scope: {\r\n 'params': '=ngTablePagination',\r\n 'templateUrl': '='\r\n },\r\n replace: false,\r\n link: function (scope, element /*, attrs*/) {\r\n ngTableEventsChannel.onAfterReloadData(function (pubParams) {\r\n scope.pages = pubParams.generatePagesArray();\r\n }, scope, function (pubParams) {\r\n return pubParams === scope.params;\r\n });\r\n scope.$watch('templateUrl', function (templateUrl) {\r\n if (templateUrl === undefined) {\r\n return;\r\n }\r\n var template = __WEBPACK_IMPORTED_MODULE_0_angular__[\"element\"]('<div ng-include=\"templateUrl\"></div>', $document);\r\n element.append(template);\r\n $compile(template)(scope);\r\n });\r\n }\r\n };\r\n}\r\n\n\n/***/ },\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export NgTableSelectFilterDsController */\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return ngTableSelectFilterDs; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\nngTableSelectFilterDs.$inject = [];\r\n/**\r\n * Takes the array returned by $column.filterData and makes it available as `$selectData` on the `$scope`.\r\n *\r\n * The resulting `$selectData` array will contain an extra item that is suitable to represent the user\r\n * \"deselecting\" an item from a `<select>` tag\r\n *\r\n * This directive is is focused on providing a datasource to an `ngOptions` directive\r\n */\r\nfunction ngTableSelectFilterDs() {\r\n // note: not using isolated or child scope \"by design\"\r\n // this is to allow this directive to be combined with other directives that do\r\n var directive = {\r\n restrict: 'A',\r\n controller: NgTableSelectFilterDsController\r\n };\r\n return directive;\r\n}\r\n/**\r\n * @private\r\n */\r\nvar NgTableSelectFilterDsController = (function () {\r\n function NgTableSelectFilterDsController($scope, $parse, $attrs, $q) {\r\n var _this = this;\r\n this.$scope = $scope;\r\n this.$attrs = $attrs;\r\n this.$q = $q;\r\n this.$column = $parse($attrs.ngTableSelectFilterDs)($scope);\r\n $scope.$watch(function () { return _this.$column && _this.$column.data; }, function () { _this.bindDataSource(); });\r\n }\r\n NgTableSelectFilterDsController.prototype.bindDataSource = function () {\r\n var _this = this;\r\n this.getSelectListData(this.$column).then(function (data) {\r\n if (data && !_this.hasEmptyOption(data)) {\r\n data.unshift({ id: '', title: '' });\r\n }\r\n data = data || [];\r\n _this.$scope.$selectData = data;\r\n });\r\n };\r\n NgTableSelectFilterDsController.prototype.hasEmptyOption = function (data) {\r\n var isMatch = false;\r\n for (var i = 0; i < data.length; i++) {\r\n var item = data[i];\r\n if (item && item.id === '') {\r\n isMatch = true;\r\n break;\r\n }\r\n }\r\n return isMatch;\r\n };\r\n NgTableSelectFilterDsController.prototype.getSelectListData = function ($column) {\r\n var dataInput = $column.data;\r\n var result;\r\n if (typeof dataInput === 'function') {\r\n result = dataInput();\r\n }\r\n else {\r\n result = dataInput;\r\n }\r\n return this.$q.when(result);\r\n };\r\n return NgTableSelectFilterDsController;\r\n}());\r\n\r\nNgTableSelectFilterDsController.$inject = ['$scope', '$parse', '$attrs', '$q'];\r\n\r\n\n\n/***/ },\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ exports[\"a\"] = ngTableSorterRow;\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\nvar templateUrl = __webpack_require__(43);\r\nngTableSorterRow.$inject = [];\r\n/**\r\n * directive that renders the sorting header row for a table\r\n * @ngdoc directive\r\n * @example\r\n * ```html\r\n * <ng-table-sorter-row></ng-table-sorter-row>\r\n * ```\r\n */\r\nfunction ngTableSorterRow() {\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: templateUrl,\r\n scope: true,\r\n controller: 'ngTableSorterRowController',\r\n controllerAs: '$ctrl'\r\n };\r\n return directive;\r\n}\r\n\n\n/***/ },\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableSorterRowController; });\n/**\r\n * Controller for the {@link ngTableSorterRow ngTableSorterRow} directive\r\n */\r\nvar NgTableSorterRowController = (function () {\r\n function NgTableSorterRowController($scope) {\r\n this.$scope = $scope;\r\n }\r\n NgTableSorterRowController.prototype.sortBy = function ($column, event) {\r\n var parsedSortable = $column.sortable && $column.sortable();\r\n if (!parsedSortable || typeof parsedSortable !== 'string') {\r\n return;\r\n }\r\n else {\r\n var defaultSort = this.$scope.params.settings().defaultSort;\r\n var inverseSort = (defaultSort === 'asc' ? 'desc' : 'asc');\r\n var sorting = this.$scope.params.sorting() && this.$scope.params.sorting()[parsedSortable] && (this.$scope.params.sorting()[parsedSortable] === defaultSort);\r\n var sortingParams = (event.ctrlKey || event.metaKey) ? this.$scope.params.sorting() : {};\r\n sortingParams[parsedSortable] = (sorting ? inverseSort : defaultSort);\r\n this.$scope.params.parameters({\r\n sorting: sortingParams\r\n });\r\n }\r\n };\r\n return NgTableSorterRowController;\r\n}());\r\n\r\nNgTableSorterRowController.$inject = ['$scope'];\r\n\n\n/***/ },\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return DataSettings; });\nvar DataSettings = (function () {\r\n function DataSettings() {\r\n this.applyFilter = true;\r\n this.applyPaging = true;\r\n this.applySort = true;\r\n }\r\n return DataSettings;\r\n}());\r\n\r\n\n\n/***/ },\n/* 28 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return NgTableDefaultGetDataProvider; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n/**\r\n * Implementation of the {@link DefaultGetDataProvider} interface\r\n */\r\nvar NgTableDefaultGetDataProvider = (function () {\r\n function NgTableDefaultGetDataProvider() {\r\n /**\r\n * The name of a angular filter that knows how to apply the values returned by\r\n * `NgTableParams.filter()` to restrict an array of data.\r\n * (defaults to the angular `filter` filter service)\r\n */\r\n this.filterFilterName = 'filter';\r\n /**\r\n * The name of a angular filter that knows how to apply the values returned by\r\n * `NgTableParams.orderBy()` to sort an array of data.\r\n * (defaults to the angular `orderBy` filter service)\r\n */\r\n this.sortingFilterName = 'orderBy';\r\n var provider = this;\r\n this.$get = ngTableDefaultGetData;\r\n ngTableDefaultGetData.$inject = ['$filter', 'ngTableEventsChannel'];\r\n function ngTableDefaultGetData($filter, ngTableEventsChannel) {\r\n getData.applyPaging = applyPaging;\r\n getData.getFilterFn = getFilterFn;\r\n getData.getOrderByFn = getOrderByFn;\r\n return getData;\r\n function getFilterFn(params) {\r\n var filterOptions = params.settings().filterOptions;\r\n if (__WEBPACK_IMPORTED_MODULE_0_angular__[\"isFunction\"](filterOptions.filterFn)) {\r\n return filterOptions.filterFn;\r\n }\r\n else {\r\n return $filter(filterOptions.filterFilterName || provider.filterFilterName);\r\n }\r\n }\r\n function getOrderByFn(params) {\r\n return $filter(provider.sortingFilterName);\r\n }\r\n function applyFilter(data, params) {\r\n if (!params.hasFilter()) {\r\n return data;\r\n }\r\n var filter = params.filter(true);\r\n var filterKeys = Object.keys(filter);\r\n var parsedFilter = filterKeys.reduce(function (result, key) {\r\n result = setPath(result, filter[key], key);\r\n return result;\r\n }, {});\r\n var filterFn = getFilterFn(params);\r\n return filterFn.call(params, data, parsedFilter, params.settings().filterOptions.filterComparator);\r\n }\r\n function applyPaging(data, params) {\r\n var pagedData = data.slice((params.page() - 1) * params.count(), params.page() * params.count());\r\n params.total(data.length); // set total for recalc pagination\r\n return pagedData;\r\n }\r\n function applySort(data, params) {\r\n var orderBy = params.orderBy();\r\n var orderByFn = getOrderByFn(params);\r\n return orderBy.length ? orderByFn(data, orderBy) : data;\r\n }\r\n function getData(data, params) {\r\n if (data == null) {\r\n return [];\r\n }\r\n var options = params.settings().dataOptions;\r\n var fData = options.applyFilter ? applyFilter(data, params) : data;\r\n ngTableEventsChannel.publishAfterDataFiltered(params, fData);\r\n var orderedData = options.applySort ? applySort(fData, params) : fData;\r\n ngTableEventsChannel.publishAfterDataSorted(params, orderedData);\r\n return options.applyPaging ? applyPaging(orderedData, params) : orderedData;\r\n }\r\n // Sets the value at any depth in a nested object based on the path\r\n // note: adapted from: underscore-contrib#setPath\r\n function setPath(obj, value, path) {\r\n var keys = path.split('.');\r\n var ret = obj;\r\n var lastKey = keys[keys.length - 1];\r\n var target = ret;\r\n var parentPathKeys = keys.slice(0, keys.length - 1);\r\n parentPathKeys.forEach(function (key) {\r\n if (!target.hasOwnProperty(key)) {\r\n target[key] = {};\r\n }\r\n target = target[key];\r\n });\r\n target[lastKey] = value;\r\n return ret;\r\n }\r\n }\r\n }\r\n return NgTableDefaultGetDataProvider;\r\n}());\r\n\r\n\n\n/***/ },\n/* 29 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return FilterSettings; });\nvar FilterSettings = (function () {\r\n function FilterSettings() {\r\n /**\r\n * Use this to determine how items are matched against the filter values.\r\n * This setting is identical to the `comparator` parameter supported by the angular\r\n * `$filter` filter service\r\n *\r\n * Defaults to `undefined` which will result in a case insensitive susbstring match when\r\n * `DefaultGetData` service is supplying the implementation for the\r\n * `Settings.getData` function\r\n */\r\n this.filterComparator = undefined; // look for a substring match in case insensitive way\r\n /**\r\n * A duration to wait for the user to stop typing before applying the filter.\r\n * Note: this delay will NOT be applied when *small* managed inmemory arrays are supplied as a\r\n * `SettingsPartial.dataset` argument to `NgTableParams.settings`.\r\n */\r\n this.filterDelay = 500;\r\n /**\r\n * The number of elements up to which a managed inmemory array is considered small\r\n */\r\n this.filterDelayThreshold = 10000;\r\n /**\r\n * Overrides `DefaultGetDataProvider.filterFilterName`.\r\n * The value supplied should be the name of the angular `$filter` service that will be selected to perform\r\n * the actual filter logic.\r\n */\r\n this.filterFilterName = undefined;\r\n /**\r\n * Tells `DefaultGetData` to use this function supplied to perform the filtering instead of selecting an angular $filter.\r\n */\r\n this.filterFn = undefined;\r\n /**\r\n * The layout to use when multiple html templates are to rendered in a single table header column.\r\n */\r\n this.filterLayout = 'stack';\r\n }\r\n return FilterSettings;\r\n}());\r\n\r\n\n\n/***/ },\n/* 30 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__util__ = __webpack_require__(12);\n/* harmony export (immutable) */ exports[\"a\"] = ngTableDefaultGetGroups;\n\r\n\r\nngTableDefaultGetGroups.$inject = ['$q', 'ngTableDefaultGetData'];\r\n/**\r\n * Implementation of the {@link DefaultGetData} interface\r\n *\r\n * @ngdoc service\r\n */\r\nfunction ngTableDefaultGetGroups($q, ngTableDefaultGetData) {\r\n return getGroups;\r\n function getGroups(params) {\r\n var group = params.group();\r\n var groupFn;\r\n var sortDirection;\r\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"a\" /* isGroupingFun */])(group)) {\r\n groupFn = group;\r\n sortDirection = group.sortDirection;\r\n }\r\n else {\r\n // currently support for only one group implemented\r\n var groupField_1 = Object.keys(group)[0];\r\n sortDirection = group[groupField_1];\r\n groupFn = function (item) {\r\n return getPath(item, groupField_1);\r\n };\r\n }\r\n var settings = params.settings();\r\n var originalDataOptions = settings.dataOptions;\r\n settings.dataOptions = __WEBPACK_IMPORTED_MODULE_0_angular__[\"extend\"]({}, originalDataOptions, { applyPaging: false });\r\n var getData = settings.getData;\r\n var gotData = $q.when(getData(params));\r\n return gotData.then(function (data) {\r\n var groups = {};\r\n __WEBPACK_IMPORTED_MODULE_0_angular__[\"forEach\"](data, function (item) {\r\n var groupName = groupFn(item);\r\n groups[groupName] = groups[groupName] || {\r\n data: [],\r\n $hideRows: !settings.groupOptions.isExpanded,\r\n value: groupName\r\n };\r\n groups[groupName].data.push(item);\r\n });\r\n var result = [];\r\n for (var i in groups) {\r\n result.push(groups[i]);\r\n }\r\n if (sortDirection) {\r\n var orderByFn = ngTableDefaultGetData.getOrderByFn();\r\n var orderBy = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"b\" /* convertSortToOrderBy */])({\r\n value: sortDirection\r\n });\r\n result = orderByFn(result, orderBy);\r\n }\r\n return ngTableDefaultGetData.applyPaging(result, params);\r\n }).finally(function () {\r\n // restore the real options\r\n settings.dataOptions = originalDataOptions;\r\n });\r\n }\r\n}\r\n/**\r\n * @private\r\n */\r\nfunction getPath(obj, ks) {\r\n // origianl source https://github.com/documentcloud/underscore-contrib\r\n var keys;\r\n if (typeof ks === \"string\") {\r\n keys = ks.split(\".\");\r\n }\r\n else {\r\n keys = ks;\r\n }\r\n // If we have reached an undefined property\r\n // then stop executing and return undefined\r\n if (obj === undefined)\r\n return void 0;\r\n // If the path array has no more elements, we've reached\r\n // the intended property and return its value\r\n if (keys.length === 0)\r\n return obj;\r\n // If we still have elements in the path array and the current\r\n // value is null, stop executing and return undefined\r\n if (obj === null)\r\n return void 0;\r\n return getPath(obj[keys[0]], keys.slice(1));\r\n}\r\n\n\n/***/ },\n/* 31 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__groupSettings__ = __webpack_require__(7);\n/* harmony namespace reexport (by used) */ __webpack_require__.d(exports, \"a\", function() { return __WEBPACK_IMPORTED_MODULE_0__groupSettings__[\"a\"]; });\n\r\n\n\n/***/ },\n/* 32 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (binding) */ __webpack_require__.d(exports, \"a\", function() { return ngTableDefaults; });\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <[email protected]>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n/**\r\n * Default values for ngTable\r\n */\r\nvar ngTableDefaults = {\r\n params: {},\r\n settings: {}\r\n};\r\n\n\n/***/ },\n/* 33 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony export (immutable) */ exports[\"a\"] = assignPartialDeep;\n\r\n/**\r\n * @private\r\n */\r\nfunction assignPartialDeep(destination, partial, optionalPropSelector, customizer) {\r\n if (optionalPropSelector === void 0) { optionalPropSelector = function () { return false; }; }\r\n if (customizer === void 0) { customizer = function () { return undefined; }; }\r\n var keys = Object.keys(partial);\r\n for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {\r\n var key = keys_1[_i];\r\n var srcVal = partial[key];\r\n if (srcVal === undefined) {\r\n if (optionalPropSelector(key, destination)) {\r\n destination[key] = srcVal;\r\n }\r\n else {\r\n }\r\n continue;\r\n }\r\n var destVal = destination[key];\r\n var customVal = customizer(destVal, srcVal, key);\r\n if (customVal !== undefined) {\r\n destination[key] = customVal;\r\n }\r\n else if (__WEBPACK_IMPORTED_MODULE_0_angular__[\"isArray\"](srcVal)) {\r\n destination[key] = srcVal.slice();\r\n }\r\n else if (!__WEBPACK_IMPORTED_MODULE_0_angular__[\"isObject\"](srcVal)) {\r\n destination[key] = srcVal;\r\n }\r\n else {\r\n destination[key] = assignPartialDeep(destVal, srcVal);\r\n }\r\n }\r\n return destination;\r\n}\r\n\n\n/***/ },\n/* 34 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ exports[\"a\"] = checkClassInit;\n/**\r\n * @private\r\n */\r\nfunction checkClassInit(clazz) {\r\n if (!clazz.isInitialized) {\r\n throw new Error('Class used before initialized. Hint: it is only safe to use this class after all run blocks (ng 1) / app initializers (ng 2) have executed.');\r\n }\r\n}\r\n\n\n/***/ },\n/* 35 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/filterRow.html';\nvar html = \"<tr ng-show=show_filter class=ng-table-filters> <th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\" ng-class=\\\"params.settings().filterOptions.filterLayout === 'horizontal' ? 'filter-horizontal' : ''\\\"> <div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\" ng-include=$ctrl.config.getTemplateUrl(filter) class=filter-cell ng-class=\\\"[$ctrl.getFilterCellCss($column.filter(this), params.settings().filterOptions.filterLayout), $last ? 'last' : '']\\\"> </div> </th> </tr> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 36 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/filters/number.html';\nvar html = \"<input type=number name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class=\\\"input-filter form-control\\\" placeholder=\\\"{{getFilterPlaceholderValue(filter, name)}}\\\"/> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 37 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/filters/select-multiple.html';\nvar html = \"<select ng-options=\\\"data.id as data.title for data in $column.data\\\" ng-disabled=$filterRow.disabled multiple=multiple ng-multiple=true ng-model=params.filter()[name] class=\\\"filter filter-select-multiple form-control\\\" name={{name}}> </select> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 38 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/filters/select.html';\nvar html = \"<select ng-options=\\\"data.id as data.title for data in $selectData\\\" ng-table-select-filter-ds=$column ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class=\\\"filter filter-select form-control\\\" name={{name}}> <option style=display:none value=\\\"\\\"></option> </select> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 39 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/filters/text.html';\nvar html = \"<input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class=\\\"input-filter form-control\\\" placeholder=\\\"{{getFilterPlaceholderValue(filter, name)}}\\\"/> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 40 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/groupRow.html';\nvar html = \"<tr ng-if=params.hasGroup() ng-show=$groupRow.show class=ng-table-group-header> <th colspan={{$ctrl.getVisibleColumns().length}} class=sortable ng-class=\\\"{\\n 'sort-asc': params.hasGroup($selGroup, 'asc'),\\n 'sort-desc':params.hasGroup($selGroup, 'desc')\\n }\\\"> <a href=\\\"\\\" ng-click=\\\"isSelectorOpen = !isSelectorOpen\\\" class=ng-table-group-selector> <strong class=sort-indicator>{{$selGroupTitle}}</strong> <button class=\\\"btn btn-default btn-xs ng-table-group-close\\\" ng-click=\\\"$groupRow.show = false; $event.preventDefault(); $event.stopPropagation();\\\"> <span class=\\\"glyphicon glyphicon-remove\\\"></span> </button> <button class=\\\"btn btn-default btn-xs ng-table-group-toggle\\\" ng-click=\\\"$ctrl.toggleDetail(); $event.preventDefault(); $event.stopPropagation();\\\"> <span class=glyphicon ng-class=\\\"{\\n 'glyphicon-resize-small': params.settings().groupOptions.isExpanded,\\n 'glyphicon-resize-full': !params.settings().groupOptions.isExpanded\\n }\\\"></span> </button> </a> <div class=list-group ng-if=isSelectorOpen> <a href=\\\"\\\" class=list-group-item ng-repeat=\\\"group in $ctrl.getGroupables()\\\" ng-click=$ctrl.groupBy(group)> <strong>{{ $ctrl.getGroupTitle(group)}}</strong> <strong ng-class=\\\"$ctrl.isSelectedGroup(group) && 'sort-indicator'\\\"></strong> </a> </div> </th> </tr> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 41 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/header.html';\nvar html = \"<ng-table-group-row></ng-table-group-row> <ng-table-sorter-row></ng-table-sorter-row> <ng-table-filter-row></ng-table-filter-row> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 42 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/pager.html';\nvar html = \"<div class=\\\"ng-cloak ng-table-pager\\\" ng-if=params.data.length> <div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right\\\"> <button ng-repeat=\\\"count in params.settings().counts\\\" type=button ng-class=\\\"{'active':params.count() == count}\\\" ng-click=params.count(count) class=\\\"btn btn-default\\\"> <span ng-bind=count></span> </button> </div> <ul ng-if=pages.length class=\\\"pagination ng-table-pagination\\\"> <li class=page-item ng-class=\\\"{'disabled': !page.active && !page.current, 'active': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type> <a class=page-link ng-switch-when=prev ng-click=params.page(page.number) href=\\\"\\\">«</a> <a class=page-link ng-switch-when=first ng-click=params.page(page.number) href=\\\"\\\"><span ng-bind=page.number></span></a> <a class=page-link ng-switch-when=page ng-click=params.page(page.number) href=\\\"\\\"><span ng-bind=page.number></span></a> <a class=page-link ng-switch-when=more ng-click=params.page(page.number) href=\\\"\\\">…</a> <a class=page-link ng-switch-when=last ng-click=params.page(page.number) href=\\\"\\\"><span ng-bind=page.number></span></a> <a class=page-link ng-switch-when=next ng-click=params.page(page.number) href=\\\"\\\">»</a> </li> </ul> </div> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 43 */\n/***/ function(module, exports, __webpack_require__) {\n\nvar path = 'ng-table/sorterRow.html';\nvar html = \"<tr class=ng-table-sort-header> <th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{\\n 'sortable': $column.sortable(this),\\n 'sort-asc': params.sorting()[$column.sortable(this)]=='asc',\\n 'sort-desc': params.sorting()[$column.sortable(this)]=='desc'\\n }\\\" ng-click=\\\"$ctrl.sortBy($column, $event)\\\" ng-if=$column.show(this) ng-init=\\\"template = $column.headerTemplateURL(this)\\\" class=\\\"header {{$column.class(this)}}\\\"> <div ng-if=!template class=ng-table-header ng-class=\\\"{'sort-indicator': params.settings().sortingIndicator == 'div'}\\\"> <span ng-bind=$column.title(this) ng-class=\\\"{'sort-indicator': params.settings().sortingIndicator == 'span'}\\\"></span> </div> <div ng-if=template ng-include=template></div> </th> </tr> \";\nvar angular = __webpack_require__(0);\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n/***/ },\n/* 44 */\n/***/ function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular__ = __webpack_require__(0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_angular___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_angular__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__src_core__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__src_browser__ = __webpack_require__(2);\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"ngTableCoreModule\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"b\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"Settings\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"c\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"NgTableEventsChannel\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"d\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"ParamValues\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"e\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"NgTableParams\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"a\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"DataSettings\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"f\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"NgTableDefaultGetDataProvider\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"g\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"FilterSettings\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"h\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"GroupSettings\", function() { return __WEBPACK_IMPORTED_MODULE_1__src_core__[\"i\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"NgTableController\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_browser__[\"b\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"ngTableBrowserModule\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_browser__[\"a\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"FilterConfigValues\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_browser__[\"c\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"NgTableFilterConfigProvider\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_browser__[\"d\"]; });\n/* harmony namespace reexport (by provided) */ __webpack_require__.d(exports, \"NgTableFilterConfig\", function() { return __WEBPACK_IMPORTED_MODULE_2__src_browser__[\"e\"]; });\n/* harmony export (binding) */ __webpack_require__.d(exports, \"ngTableModule\", function() { return ngTableModule; });\n\r\n\r\n\r\nvar ngTableModule = __WEBPACK_IMPORTED_MODULE_0_angular__[\"module\"]('ngTable', [__WEBPACK_IMPORTED_MODULE_1__src_core__[\"b\" /* ngTableCoreModule */].name, __WEBPACK_IMPORTED_MODULE_2__src_browser__[\"a\" /* ngTableBrowserModule */].name]);\r\n\r\n\r\n\r\n\n\n/***/ }\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// ng-table.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 44);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a04a664fd136d6195bd8","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"angular\"\n// module id = 0\n// module chunks = 0","import * as angular from 'angular';\nimport { NgTableDefaultGetDataProvider, DefaultGetData } from './data';\nimport { GroupSettingsPartial, ngTableDefaultGetGroups } from './grouping';\nimport { ngTableDefaults, Defaults } from './ngTableDefaults';\nimport { SettingsPartial, Settings } from './ngTableSettings';\nimport { NgTableParams } from './ngTableParams';\nimport { NgTableEventsChannel } from './ngTableEventsChannel';\n\nconst ngTableCoreModule = angular.module('ngTable-core', [])\n .provider('ngTableDefaultGetData', NgTableDefaultGetDataProvider)\n .factory('ngTableDefaultGetGroups', ngTableDefaultGetGroups)\n .value('ngTableDefaults',ngTableDefaults)\n .service('ngTableEventsChannel', NgTableEventsChannel)\n .run(Settings.init)\n .run(NgTableParams.init);\n\n// note: if you are using ES6 or typescript prefer:\n// import { NgTableParams } from 'ng-table';\nngTableCoreModule.value('NgTableParams', NgTableParams)\n\nexport { ngTableCoreModule };\n\nexport { Defaults } from './ngTableDefaults';\nexport * from './ngTableEventsChannel';\nexport { SettingsPartial, Settings };\nexport * from './ngTableParams';\nexport * from './data';\nexport * from './filtering';\nexport * from './grouping/publicExports';\nexport * from './paging';\nexport * from './sorting';\n\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/index.ts","import * as angular from 'angular';\nimport { ngTable } from './ngTable.directive';\nimport { NgTableColumn } from './ngTableColumn';\nimport { ngTableColumnsBinding } from './ngTableColumnsBinding.directive';\nimport { NgTableController } from './ngTableController';\nimport { ngTableDynamic } from './ngTableDynamic.directive';\nimport { NgTableFilterConfigProvider, NgTableFilterConfig } from './ngTableFilterConfig';\nimport { ngTableFilterRow } from './ngTableFilterRow.directive';\nimport { NgTableFilterRowController } from './ngTableFilterRowController';\nimport { ngTableGroupRow } from './ngTableGroupRow.directive';\nimport { NgTableGroupRowController } from './ngTableGroupRowController';\nimport { ngTablePagination } from './ngTablePagination.directive';\nimport { ngTableSelectFilterDs } from './ngTableSelectFilterDs.directive';\nimport { ngTableSorterRow } from './ngTableSorterRow.directive';\nimport { NgTableSorterRowController } from './ngTableSorterRowController';\nimport './filters/number.html';\nimport './filters/select.html';\nimport './filters/select-multiple.html';\nimport './filters/text.html';\nimport './pager.html';\nimport './header.html';\n\nconst ngTableBrowserModule = angular.module('ngTable-browser', [])\n .directive('ngTable', ngTable)\n .service('ngTableColumn', NgTableColumn)\n .directive('ngTableColumnsBinding', ngTableColumnsBinding)\n .controller('ngTableController', NgTableController)\n .directive('ngTableDynamic', ngTableDynamic)\n .provider('ngTableFilterConfig', NgTableFilterConfigProvider)\n .directive('ngTableFilterRow', ngTableFilterRow)\n .controller('ngTableFilterRowController', NgTableFilterRowController)\n .directive('ngTableGroupRow', ngTableGroupRow)\n .controller('ngTableGroupRowController', NgTableGroupRowController)\n .directive('ngTablePagination', ngTablePagination)\n .directive('ngTableSelectFilterDs', ngTableSelectFilterDs)\n .directive('ngTableSorterRow', ngTableSorterRow)\n .controller('ngTableSorterRowController', NgTableSorterRowController);\n\nexport * from './public-interfaces';\nexport { NgTableController, ngTableBrowserModule };\nexport * from './ngTableFilterConfig';\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/index.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport * as ng1 from 'angular';\nimport { IServiceProvider, auto } from 'angular';\nimport { assignPartialDeep } from '../shared';\nimport { FilterTemplateDef } from './public-interfaces';\n\n/**\n * Configuration values that determine the behaviour of the `ngTableFilterConfig` service\n */\nexport class FilterConfigValues {\n /**\n * The default base url to use when deriving the url for a filter template given just an alias name\n */\n defaultBaseUrl = 'ng-table/filters/';\n /**\n * The extension to use when deriving the url of a filter template when given just an alias name\n */\n defaultExt = '.html';\n /**\n * A map of alias names and their corrosponding urls. A lookup against this map will be used\n * to find the url matching an alias name.\n * If no match is found then a url will be derived using the following pattern `${defaultBaseUrl}${aliasName}.${defaultExt}`\n */\n aliasUrls: { [name: string]: string } = {};\n}\n\nexport type FilterConfigValuesPartial = Partial<FilterConfigValues>\n\n/**\n * The angular provider used to configure the behaviour of the `NgTableFilterConfig` service.\n */\nexport class NgTableFilterConfigProvider implements IServiceProvider {\n static $inject = ['$injector'];\n $get: () => NgTableFilterConfig;\n private config: FilterConfigValues;\n constructor($injector: auto.IInjectorService) {\n this.$get = () => {\n return $injector.instantiate<NgTableFilterConfig>(NgTableFilterConfig, { config: ng1.copy(this.config) });\n }\n this.$get.$inject = [];\n this.resetConfigs();\n }\n\n /**\n * Reset back to factory defaults the config values that `NgTableFilterConfig` service will use\n */\n resetConfigs() {\n this.config = new FilterConfigValues();\n }\n\n /**\n * Set the config values used by `NgTableFilterConfig` service\n */\n setConfig(customConfig: FilterConfigValuesPartial) {\n this.config = assignPartialDeep(ng1.copy(this.config), customConfig);\n }\n}\n\n/**\n * Exposes configuration values and methods used to return the location of the html\n * templates used to render the filter row of an ng-table directive\n */\nexport class NgTableFilterConfig {\n static $inject = ['config'];\n constructor(\n /**\n * Readonly copy of the final values used to configure the service.\n */\n public readonly config: FilterConfigValues\n ) { }\n\n /**\n * Return the url of the html filter template registered with the alias supplied\n */\n getUrlForAlias(aliasName: string, filterKey?: string) {\n return this.config.aliasUrls[aliasName] || this.config.defaultBaseUrl + aliasName + this.config.defaultExt;\n }\n \n /**\n * Return the url of the html filter template for the supplied definition and key.\n * For more information see the documentation for {@link FilterTemplateMap}\n */\n getTemplateUrl(filterDef: string | FilterTemplateDef, filterKey?: string) {\n let filterName: string;\n if (typeof filterDef !== 'string') {\n filterName = filterDef.id;\n } else {\n filterName = filterDef;\n }\n if (filterName.indexOf('/') !== -1) {\n return filterName;\n }\n\n return this.getUrlForAlias(filterName, filterKey);\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableFilterConfig.ts","import { SortDirection } from '../sorting';\n\nexport type GroupSort = SortDirection | '';\n\nexport type GroupSettingsPartial = Partial<GroupSettings>\n\n/**\n * Configuration that determines the data row grouping behaviour of a table\n */\nexport class GroupSettings {\n /**\n * The default sort direction that will be used whenever a group is supplied that\n * does not define its own sort direction\n */\n defaultSort: SortDirection = 'asc';\n /**\n * Determines whether groups should be displayed expanded to show their items. Defaults to true\n */\n isExpanded = true;\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/grouping/groupSettings.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport * as ng1 from 'angular';\nimport { IScope } from 'angular';\nimport { DataResult, DefaultGetData } from './data';\nimport { PageButton } from './paging';\nimport { InternalTableParams, NgTableParams } from './ngTableParams';\n\n\n/**\n * Alias for the types that can be used to filter events\n */\nexport type EventSelector<T> = NgTableParams<T> | EventSelectorFunc\n\n/**\n * Signature of the event hander that is registered to receive the *afterCreated* event\n */\nexport interface AfterCreatedListener {\n (publisher: NgTableParams<any>): any\n}\n/**\n * Signature of the event hander that is registered to receive the *afterReloadData* event\n */\nexport interface AfterReloadDataListener<T> {\n (publisher: NgTableParams<T>, newData: DataResult<T>[], oldData: DataResult<T>[]): any\n}\n/**\n * Signature of the event hander that is registered to receive the *datasetChanged* event\n */\nexport interface DatasetChangedListener<T> {\n (publisher: NgTableParams<T>, newDataset: T[], oldDataset: T[]): any\n}\n/**\n * Signature of the function used to filter the events to only specific instances of \n * {@link NgTableParams}\n */\nexport interface EventSelectorFunc {\n (publisher: NgTableParams<any>): boolean\n}\n/**\n * Signature of the event hander that is registered to receive the *pagesChanged* event\n */\nexport interface PagesChangedListener {\n (publisher: NgTableParams<any>, newPages: PageButton[], oldPages: PageButton[]): any\n}\n/**\n* Signature of the event hander that is registered to receive the *afterDataFiltered* event\n*/\nexport interface AfterDataFilteredListener<T> {\n (publisher: NgTableParams<T>, newData: DataResult<T>[] ): any\n}\n/**\n* Signature of the event hander that is registered to receive the *afterDataSorted* event\n*/\nexport interface AfterDataSortedListener<T> {\n (publisher: NgTableParams<T>, newData: DataResult<T>[] ): any\n}\n\n/**\n * Signature of the function used to explicitly unregister an event handler so that it stops\n * receiving notifications\n */\nexport interface UnregistrationFunc {\n (): void\n}\n\n/**\n * Strongly typed pub/sub for {@link NgTableParams}\n *\n * Supported events:\n *\n * * afterCreated - raised when a new instance of {@link NgTableParams} has finished being constructed\n * * afterReloadData - raised when the {@link NgTableParams} `reload` method has finished loading new data\n * * datasetChanged - raised when {@link Settings} `dataset` receives a new data array\n * * pagesChanged - raised when a new pages array has been generated\n */\nexport interface NgTableEventsChannel {\n /**\n * Subscribe to receive notification whenever a new `NgTableParams` instance has finished being constructed.\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called. Supply a\n * `scope` to have angular automatically unregister the listener when the `scope` is destroyed.\n *\n * @param listener the function that will be called when the event fires\n * @param scope the angular `$scope` that will limit the lifetime of the event subscription\n * @param eventFilter a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterCreated(listener: AfterCreatedListener, scope: IScope, eventFilter?: EventSelectorFunc): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever a new `NgTableParams` instance has finished being constructed.\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param eventFilter a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterCreated(listener: AfterCreatedListener, eventFilter?: EventSelectorFunc): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever the `reload` method of an `NgTableParams` instance has successfully executed\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called. Supply a\n * `scope` to have angular automatically unregister the listener when the `scope` is destroyed.\n *\n * @param listener the function that will be called when the event fires\n * @param scope the angular `$scope` that will limit the lifetime of the event subscription\n * @param eventFilter either the specific `NgTableParams` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterReloadData<T>(listener: AfterReloadDataListener<T>, scope: IScope, eventFilter?: EventSelector<T>): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever the `reload` method of an `NgTableParams` instance has successfully executed\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param eventFilter a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterReloadData<T>(listener: AfterReloadDataListener<T>, eventFilter?: EventSelector<T>): UnregistrationFunc;\n\n /**\n * Subscribe to receive notification whenever a new data rows *array* is supplied as a `settings` value to a `NgTableParams` instance.\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called. Supply a\n * `scope` to have angular automatically unregister the listener when the `scope` is destroyed.\n *\n * @param listener the function that will be called when the event fires\n * @param scope the angular `$scope` that will limit the lifetime of the event subscription\n * @param eventFilter either the specific `NgTableParams` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onDatasetChanged<T>(listener: DatasetChangedListener<T>, scope: IScope, eventFilter?: EventSelector<T>): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever a new data rows *array* is supplied as a `settings` value to a `NgTableParams` instance.\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param eventFilter either the specific `NgTableParams` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onDatasetChanged<T>(listener: DatasetChangedListener<T>, eventFilter?: EventSelector<T>): UnregistrationFunc;\n\n /**\n * Subscribe to receive notification whenever the paging buttons for an `NgTableParams` instance change\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called. Supply a\n * `scope` to have angular automatically unregister the listener when the `scope` is destroyed.\n *\n * @param listener the function that will be called when the event fires\n * @param scope the angular `$scope` that will limit the lifetime of the event subscription\n * @param eventFilter either the specific `NgTableParams` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onPagesChanged<T>(listener: PagesChangedListener, scope: IScope, eventFilter?: EventSelector<T>): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever the paging buttons for an `NgTableParams` instance change\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param eventFilter either the specific `NgTableParams` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onPagesChanged<T>(listener: PagesChangedListener, eventFilter?: EventSelector<T>): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever a `ngTableDefaultGetData` instance filters data\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param scope the angular `$scope` that will limit the lifetime of the event subscription\n * @param eventFilter either the specific `DefaultGetData` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterDataFiltered<T>(listener: AfterDataFilteredListener<T>, scope: IScope, eventFilter?: EventSelector<T> ): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever a `ngTableDefaultGetData` instance filters data\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param eventFilter either the specific `DefaultGetData` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterDataFiltered<T>(listener: AfterDataFilteredListener<T>, eventFilter?: EventSelector<T> ): UnregistrationFunc; \n /**\n * Subscribe to receive notification whenever a `ngTableDefaultGetData` instance orders data\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param scope the angular `$scope` that will limit the lifetime of the event subscription\n * @param eventFilter either the specific `DefaultGetData` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterDataSorted<T>(listener: AfterDataSortedListener<T>, scope: IScope, eventFilter?: EventSelector<T> ): UnregistrationFunc;\n /**\n * Subscribe to receive notification whenever a `ngTableDefaultGetData` instance orders data\n * Optionally supply an `eventFilter` to restrict which events that should trigger the `listener` to be called.\n *\n * @param listener the function that will be called when the event fires\n * @param eventFilter either the specific `DefaultGetData` instance you want to receive events for or a predicate function that should return true to receive the event\n * @return a unregistration function that when called will unregister the `listener`\n */\n onAfterDataSorted<T>(listener: AfterDataSortedListener<T>, eventFilter?: EventSelector<T> ): UnregistrationFunc;\n\n\n publishAfterCreated<T>(publisher: NgTableParams<T>): void;\n publishAfterReloadData<T>(publisher: NgTableParams<T>, newData: T[], oldData: T[]): void;\n publishDatasetChanged<T>(publisher: NgTableParams<T>, newDataset: T[] | undefined, oldDataset: T[] | undefined): void;\n publishPagesChanged<T>(publisher: NgTableParams<T>, newPages: PageButton[], oldPages: PageButton[]): void;\n publishAfterDataFiltered<T>(publisher: NgTableParams<T>, newData: T[]): void;\n publishAfterDataSorted<T>(params: NgTableParams<T>, newData: T[]): void;\n}\n\nexport class NgTableEventsChannel {\n static $inject = ['$rootScope'];\n constructor(private $rootScope: ng1.IRootScopeService) {\n let events = this;\n events = this.addTableParamsEvent('afterCreated', events);\n events = this.addTableParamsEvent('afterReloadData', events);\n events = this.addTableParamsEvent('datasetChanged', events);\n events = this.addTableParamsEvent('pagesChanged', events);\n events = this.addTableParamsEvent('afterDataFiltered', events);\n events = this.addTableParamsEvent('afterDataSorted', events);\n }\n private addTableParamsEvent(eventName: string, target: {}) {\n const fnName = eventName.charAt(0).toUpperCase() + eventName.substring(1);\n const event = {\n ['on' + fnName]: this.createEventSubscriptionFn(eventName),\n ['publish' + fnName]: this.createPublishEventFn(eventName)\n };\n return ng1.extend(target, event);\n }\n private createPublishEventFn(eventName: string) {\n return (...args: any[]) => {\n this.$rootScope.$broadcast('ngTable:' + eventName, ...args);\n }\n }\n private createEventSubscriptionFn(eventName: string) {\n\n return <T>(\n handler: (...args: any[]) => void,\n eventSelectorOrScope: EventSelector<T> | ng1.IScope,\n eventSelector?: EventSelector<T>) => {\n\n let actualEvtSelector: (publisher: NgTableParams<any>) => boolean;\n let scope: ng1.IScope = this.$rootScope;\n\n if (isScopeLike(eventSelectorOrScope)) {\n scope = eventSelectorOrScope;\n actualEvtSelector = createEventSelectorFn(eventSelector);\n } else {\n actualEvtSelector = createEventSelectorFn(eventSelectorOrScope);\n }\n\n return scope.$on('ngTable:' + eventName, function (event: ng1.IAngularEvent, params: InternalTableParams<any>, ...eventArgs: any[]) {\n // don't send events published by the internal NgTableParams created by ngTableController\n if (params.isNullInstance) return;\n\n const fnArgs = [params].concat(eventArgs);\n if (actualEvtSelector.apply(this, fnArgs)) {\n handler.apply(this, fnArgs);\n }\n });\n }\n\n function createEventSelectorFn<T>(eventSelector: EventSelector<T> = () => true): EventSelectorFunc {\n if (isEventSelectorFunc(eventSelector)) {\n return eventSelector\n } else {\n // shorthand for subscriber to only receive events from a specific publisher instance\n return (publisher: NgTableParams<any>) => publisher === eventSelector;\n }\n }\n\n function isEventSelectorFunc<T>(val: EventSelector<T>): val is (publisher: NgTableParams<any>) => boolean {\n return typeof val === 'function';\n }\n\n function isScopeLike(val: any): val is ng1.IScope {\n return val && typeof val.$new === 'function';\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/ngTableEventsChannel.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport * as ng1 from 'angular';\nimport { ILogService, IPromise, IQService } from 'angular';\nimport { convertSortToOrderBy, isGroupingFun } from './util';\nimport { assignPartialDeep } from '../shared';\nimport { Defaults } from './ngTableDefaults'\nimport { NgTableEventsChannel } from './ngTableEventsChannel'\nimport { SettingsPartial, Settings } from './ngTableSettings'\nimport { DataResult, DataRowGroup, GetDataFunc } from './data';\nimport { FilterValues } from './filtering';\nimport { GetGroupFunc, Grouping, GroupingPartial, GroupValuesPartial, GroupingFunc, GroupSort, GroupValues } from './grouping';\nimport { SortDirection, SortingValues } from './sorting';\nimport { PageButton } from './paging';\n\n/**\n * @private\n */\nexport interface InternalTableParams<T> extends NgTableParams<T> {\n isNullInstance: boolean\n}\n\n\nexport type ParamValuesPartial<T> =\n Partial<Pick<ParamValues<T>, 'page' | 'count' | 'filter' | 'sorting'>>\n & {\n group?: string | GroupingPartial<T>\n };\n\n/**\n * The runtime values for {@link NgTableParams} that determine the set of data rows and\n * how they are to be displayed in a table\n */\nexport class ParamValues<T> {\n /**\n * The index of the \"slice\" of data rows, starting at 1, to be displayed by the table.\n */\n page = 1;\n /**\n * The number of data rows per page\n */\n count = 10;\n /**\n * The filter that should be applied to restrict the set of data rows\n */\n filter: FilterValues = {};\n /**\n * The sort order that should be applied to the data rows.\n */\n sorting: SortingValues = {};\n /**\n * The grouping that should be applied to the data rows\n */\n group: string | Grouping<T> = {};\n}\n\n\n/**\n * @private\n */\nfunction isNumber(n: any) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * @private\n */\ntype Memento<T> = {\n params: ParamValues<T>;\n groupSortDirection?: string;\n};\n\n/**\n * Parameters manager for an ngTable directive\n */\nexport class NgTableParams<T> {\n /**\n * The page of data rows currently being displayed in the table\n */\n data: T[] = [];\n reloadPages: () => void;\n private defaultSettings = Settings.createWithOverrides<T>();\n private errParamsMemento: Memento<T> | null;\n private isCommittedDataset = false;\n isNullInstance: boolean;\n private initialEvents: Function[] | null = [];\n private ngTableDefaults: Defaults\n private ngTableEventsChannel: NgTableEventsChannel;\n private prevParamsMemento: Memento<T>;\n private _params = new ParamValues<T>();\n private _settings = this.defaultSettings;\n private $q: IQService;\n private $log: ILogService\n constructor(baseParameters: ParamValuesPartial<T> | boolean = {}, baseSettings: SettingsPartial<T> = {}) {\n\n // the ngTableController \"needs\" to create a dummy/null instance and it's important to know whether an instance\n // is one of these\n if (typeof baseParameters === \"boolean\") {\n this.isNullInstance = true;\n }\n\n this.reloadPages = (() => {\n let currentPages: PageButton[];\n return () => {\n const oldPages = currentPages;\n const newPages = this.generatePagesArray(this.page(), this.total(), this.count());\n if (!ng1.equals(oldPages, newPages)) {\n currentPages = newPages;\n this.ngTableEventsChannel.publishPagesChanged(this, newPages, oldPages);\n }\n }\n })();\n\n assignPartialDeep(this._params, this.ngTableDefaults.params);\n\n this.settings(baseSettings);\n this.parameters(baseParameters, true);\n\n this.ngTableEventsChannel.publishAfterCreated(this);\n // run events during construction after the initial create event. That way a consumer\n // can subscribe to all events for a table without \"dropping\" an event\n ng1.forEach(this.initialEvents, event => {\n event();\n });\n this.initialEvents = null;\n }\n /**\n * Returns the number of data rows per page\n */\n count(): number\n /**\n * Sets the number of data rows per page.\n * Changes to count will cause `isDataReloadRequired` to return true\n */\n count(count: number): this\n count(count?: number) {\n // reset to first page because can be blank page\n return count !== undefined ? this.parameters({\n 'count': count,\n 'page': 1\n }) : this._params.count;\n }\n /**\n * Returns the current filter values used to restrict the set of data rows.\n * @param trim supply true to return the current filter minus any insignificant values\n * (null, undefined and empty string)\n */\n filter(trim?: boolean): FilterValues\n /**\n * Sets filter values to the `filter` supplied; any existing filter will be removed\n * Changes to filter will cause `isDataReloadRequired` to return true and the current `page` to be set to 1\n */\n filter(filter: FilterValues): this\n filter(filter?: FilterValues | boolean) {\n if (filter != null && typeof filter === 'object') {\n return this.parameters({\n 'filter': filter,\n 'page': 1\n });\n } else if (filter === true) {\n const keys = Object.keys(this._params.filter);\n const significantFilter: FilterValues = {};\n for (let i = 0; i < keys.length; i++) {\n const filterValue = this._params.filter[keys[i]];\n if (filterValue != null && filterValue !== '') {\n significantFilter[keys[i]] = filterValue;\n }\n }\n return significantFilter;\n } else {\n return this._params.filter;\n }\n }\n /**\n * Generate array of pages.\n * When no arguments supplied, the current parameter state of this `NgTableParams` instance will be used\n * @param currentPage Which page must be active\n * @param totalItems Total quantity of items\n * @param pageSize Quantity of items on page\n * @param maxBlocks Quantity of blocks for pagination\n * @returns Array of pages\n */\n generatePagesArray(currentPage?: number, totalItems?: number, pageSize?: number, maxBlocks?: number) {\n if (!arguments.length) {\n currentPage = this.page();\n totalItems = this.total();\n pageSize = this.count();\n }\n\n let maxPage: number, maxPivotPages: number, minPage: number, numPages: number;\n maxBlocks = maxBlocks && maxBlocks < 6 ? 6 : maxBlocks;\n\n const pages: PageButton[] = [];\n numPages = Math.ceil(totalItems / pageSize);\n if (numPages > 1) {\n pages.push({\n type: 'prev',\n number: Math.max(1, currentPage - 1),\n active: currentPage > 1\n });\n pages.push({\n type: 'first',\n number: 1,\n active: currentPage > 1,\n current: currentPage === 1\n });\n maxPivotPages = Math.round((this._settings.paginationMaxBlocks - this._settings.paginationMinBlocks) / 2);\n minPage = Math.max(2, currentPage - maxPivotPages);\n maxPage = Math.min(numPages - 1, currentPage + maxPivotPages * 2 - (currentPage - minPage));\n minPage = Math.max(2, minPage - (maxPivotPages * 2 - (maxPage - minPage)));\n let i = minPage;\n while (i <= maxPage) {\n if ((i === minPage && i !== 2) || (i === maxPage && i !== numPages - 1)) {\n pages.push({\n type: 'more',\n active: false\n });\n } else {\n pages.push({\n type: 'page',\n number: i,\n active: currentPage !== i,\n current: currentPage === i\n });\n }\n i++;\n }\n pages.push({\n type: 'last',\n number: numPages,\n active: currentPage !== numPages,\n current: currentPage === numPages\n });\n pages.push({\n type: 'next',\n number: Math.min(numPages, currentPage + 1),\n active: currentPage < numPages\n });\n }\n return pages;\n }\n /**\n * Returns the current grouping used to group the data rows\n */\n group(): Grouping<T>\n /**\n * Sets grouping to the `group` supplied; any existing grouping will be removed.\n * Changes to group will cause `isDataReloadRequired` to return true and the current `page` to be set to 1\n */\n group(group: GroupValuesPartial): this\n /**\n * Sets grouping to the `field` and `sortDirection` supplied; any existing grouping will be removed\n * Changes to group will cause `isDataReloadRequired` to return true and the current `page` to be set to 1\n */\n group(field: string, sortDirection?: GroupSort): this\n /**\n * Sets grouping to the `group` supplied; any existing grouping will be removed.\n * If `sortDirection` is supplied, this will be assigned to the sortDirection property of `group`\n * Changes to group will cause `isDataReloadRequired` to return true and the current `page` to be set to 1\n */\n group(group: GroupingFunc<T> | string, sortDirection?: GroupSort): this\n group(group?: GroupingPartial<T> | string, sortDirection?: GroupSort): string | Grouping<T> | this {\n if (group === undefined) {\n return this._params.group;\n }\n\n const newParameters: ParamValuesPartial<T> = {\n page: 1\n };\n if (isGroupingFun(group) && sortDirection !== undefined) {\n group.sortDirection = sortDirection;\n newParameters.group = group;\n } else if (typeof group === 'string' && sortDirection !== undefined) {\n newParameters.group = { [group]: sortDirection };\n } else {\n newParameters.group = group;\n }\n this.parameters(newParameters);\n return this;\n }\n /**\n * Returns true when an attempt to `reload` the current `parameter` values have resulted in a failure.\n * This method will continue to return true until the `reload` is successfully called or when the\n * `parameter` values have changed\n */\n hasErrorState() {\n return !!(this.errParamsMemento && ng1.equals(this.errParamsMemento, this.createComparableParams()));\n }\n /**\n * Returns true if `filter` has significant filter value(s) (any value except null, undefined, or empty string),\n * otherwise false\n */\n hasFilter() {\n return Object.keys(this.filter(true)).length > 0;\n }\n /**\n * Return true when a change to `filters` require the `reload` method\n * to be run so as to ensure the data presented to the user reflects these filters\n */\n hasFilterChanges() {\n const previousFilter = (this.prevParamsMemento && this.prevParamsMemento.params.filter);\n return !ng1.equals((this._params.filter), previousFilter) || this.hasGlobalSearchFieldChanges();\n }\n /**\n * Returns true when at least one group has been set\n */\n hasGroup(): boolean\n /**\n * Returns true when the `group` and when supplied, the `sortDirection` matches an existing group\n */\n hasGroup(group: string | GroupingFunc<T>, sortDirection?: string): boolean\n hasGroup(group?: string | GroupingFunc<T>, sortDirection?: string) {\n if (group == null) {\n return isGroupingFun(this._params.group) || Object.keys(this._params.group).length > 0\n }\n\n if (isGroupingFun(group)) {\n if (sortDirection == null) {\n return this._params.group === group;\n } else {\n return this._params.group === group && group.sortDirection === sortDirection;\n }\n } else {\n if (sortDirection == null) {\n return Object.keys(this._params.group).indexOf(group) !== -1;\n } else {\n return (this._params.group as GroupValues)[group] === sortDirection;\n }\n }\n }\n /**\n * Return true when a change to this instance should require the `reload` method\n * to be run so as to ensure the data rows presented to the user reflects the current state.\n *\n * Note that this method will return false when the `reload` method has run but fails. In this case\n * `hasErrorState` will return true.\n *\n * The built-in `ngTable` directives will watch for when this function returns true and will then call\n * the `reload` method to load its data rows\n */\n isDataReloadRequired() {\n // note: using != as want to treat null and undefined the same\n return !this.isCommittedDataset || !ng1.equals(this.createComparableParams(), this.prevParamsMemento)\n || this.hasGlobalSearchFieldChanges();\n }\n /**\n * Returns true if sorting by the field supplied. Where direction supplied\n * the field must also be sorted by that direction to return true\n */\n isSortBy(field: string, direction?: string) {\n if (direction !== undefined) {\n return this._params.sorting[field] !== undefined && this._params.sorting[field] == direction;\n } else {\n return this._params.sorting[field] !== undefined;\n }\n }\n /**\n * Returns sorting values in a format that can be consumed by the angular `$orderBy` filter service\n */\n orderBy() {\n return convertSortToOrderBy(this._params.sorting);\n }\n /**\n * Returns the index of the current \"slice\" of data rows\n */\n page(): number\n /**\n * Sets the index of the current \"slice\" of data rows. The index starts at 1.\n * Changing the page number will cause `isDataReloadRequired` to return true\n */\n page(page: number): this\n page(page?: number) {\n return page !== undefined ? this.parameters({\n 'page': page\n }) : this._params.page;\n }\n parameters(): ParamValues<T>\n /**\n * Set new parameters\n */\n parameters(newParameters?: ParamValuesPartial<T> | { [name: string]: string }, parseParamsFromUrl?: boolean): this\n parameters(newParameters?: ParamValuesPartial<T> | { [name: string]: string }, parseParamsFromUrl?: boolean): ParamValues<T> | this {\n if (newParameters === undefined) {\n return this._params;\n }\n\n // todo: move parsing of url like parameters into a seperate method\n\n parseParamsFromUrl = parseParamsFromUrl || false;\n for (const key in newParameters) {\n let value = newParameters[key];\n if (parseParamsFromUrl && key.indexOf('[') >= 0) {\n const keys = key.split(/\\[(.*)\\]/).reverse()\n let lastKey = '';\n for (let i = 0, len = keys.length; i < len; i++) {\n const name = keys[i];\n if (name !== '') {\n const v = value;\n value = {};\n value[lastKey = name] = (isNumber(v) ? parseFloat(v) : v);\n }\n }\n if (lastKey === 'sorting') {\n this._params[lastKey] = {};\n }\n this._params[lastKey] = ng1.extend(this._params[lastKey] || {}, value[lastKey]);\n } else {\n if (newParameters[key] === undefined) {\n // skip\n }\n else if (key === 'group') {\n this._params[key] = this.parseGroup(newParameters[key]);\n } else {\n this._params[key] = (isNumber(newParameters[key]) ? parseFloat(newParameters[key]) : newParameters[key]);\n }\n }\n }\n this.log('ngTable: set parameters', this._params);\n return this;\n }\n /**\n * Trigger a reload of the data rows\n */\n reload<TResult extends DataResult<T>>(): IPromise<TResult[]> {\n let pData: ng1.IPromise<any>;\n\n this._settings.$loading = true;\n\n this.prevParamsMemento = ng1.copy(this.createComparableParams());\n this.isCommittedDataset = true;\n\n if (this.hasGroup()) {\n pData = this.runInterceptorPipeline(this.$q.when(this._settings.getGroups(this)));\n } else {\n const fn = this._settings.getData as GetDataFunc<T>;\n pData = this.runInterceptorPipeline(this.$q.when(fn(this)));\n }\n\n this.log('ngTable: reload data');\n\n const oldData = this.data;\n return pData.then(data => {\n this._settings.$loading = false;\n this.errParamsMemento = null;\n\n this.data = data;\n // note: I think it makes sense to publish this event even when data === oldData\n // subscribers can always set a filter to only receive the event when data !== oldData\n this.ngTableEventsChannel.publishAfterReloadData(this, data, oldData);\n this.reloadPages();\n\n return data;\n }).catch(reason => {\n this.errParamsMemento = this.prevParamsMemento;\n // \"rethrow\"\n return this.$q.reject(reason);\n });\n }\n /**\n * Returns the settings for the table.\n */\n settings(): Settings<T>\n /**\n * Sets the settings for the table; new setting values will be merged with the existing settings.\n * Supplying a new `dataset` will cause `isDataReloadRequired` to return true and the `ngTableEventsChannel`\n * to fire its `datasetChanged` event\n */\n settings(newSettings: SettingsPartial<T>): this\n settings(newSettings?: SettingsPartial<T>): this | Settings<T> {\n if (newSettings === undefined) {\n return this._settings;\n }\n\n const settings = Settings.merge(this._settings, newSettings);\n\n const originalDataset = this._settings.dataset;\n this._settings = settings;\n\n // note: using != as want null and undefined to be treated the same\n const hasDatasetChanged = newSettings.hasOwnProperty('dataset') && (newSettings.dataset != originalDataset);\n if (hasDatasetChanged) {\n if (this.isCommittedDataset) {\n this.page(1); // reset page as a new dataset has been supplied\n }\n this.isCommittedDataset = false;\n\n const fireEvent = () => {\n this.ngTableEventsChannel.publishDatasetChanged(this, newSettings.dataset, originalDataset);\n };\n\n if (this.initialEvents) {\n this.initialEvents.push(fireEvent);\n } else {\n fireEvent();\n }\n }\n this.log('ngTable: set settings', this._settings);\n return this;\n }\n /**\n * Returns the current sorting used to order the data rows.\n * Changes to sorting will cause `isDataReloadRequired` to return true\n */\n sorting(): SortingValues\n /**\n * Sets sorting values to the `sorting` supplied; any existing sorting will be removed.\n * Changes to sorting will cause `isDataReloadRequired` to return true\n */\n sorting(sorting: SortingValues): this\n /**\n * Sets sorting to the `field` and `direction` supplied; any existing sorting will be removed\n */\n sorting(field: string, direction?: string): this\n sorting(sorting?: SortingValues | string, direction?: SortDirection) {\n if (typeof sorting === 'string') {\n this.parameters({\n 'sorting': { [sorting]: direction || this.settings().defaultSort }\n });\n return this;\n }\n return sorting !== undefined ? this.parameters({\n 'sorting': sorting\n }) : this._params.sorting;\n }\n /**\n * Returns the count of the data rows that match the current `filter`\n */\n total(): number\n /**\n * Sets `settings().total` to the value supplied.\n * Typically you will need to set a `total` in the body of any custom `getData` function\n * you supply as a setting value to this instance.\n * @example\n * ```js\n * const tp = new NgTableParams({}, { getData: customGetData })\n * function customGetData(params) {\n * const queryResult = // code to fetch current data rows and total //\n * params.total(queryResult.total);\n * return queryResult.dataRowsPage;\n * }\n * ```\n */\n total(total: number): this\n total(total?: number) {\n return total !== undefined ? this.settings({\n 'total': total\n }) : this._settings.total;\n }\n /**\n * Returns the current parameter values uri-encoded. Set `asString` to\n * true for the parameters to be returned as an array of strings of the form 'paramName=value'\n * otherwise parameters returned as a key-value object\n */\n url(asString = false) {\n const pairs: any[] | { [name: string]: string } = (asString ? [] : {});\n for (const key in this._params) {\n if (this._params.hasOwnProperty(key)) {\n const item = (this._params as { [name: string]: any })[key],\n name = encodeURIComponent(key);\n if (typeof item === \"object\") {\n for (const subkey in item) {\n if (isSignificantValue(item[subkey], key)) {\n const pname = name + \"[\" + encodeURIComponent(subkey) + \"]\";\n collectValue(item[subkey], pname);\n }\n }\n } else if (!ng1.isFunction(item) && isSignificantValue(item, key)) {\n collectValue(item, name);\n }\n }\n }\n return pairs;\n\n function collectValue(value: any, key: string) {\n if (isArray(pairs)) {\n pairs.push(key + \"=\" + encodeURIComponent(value));\n } else {\n pairs[key] = encodeURIComponent(value);\n }\n }\n\n function isArray(pairs: any[] | {}): pairs is Array<any> {\n return asString;\n }\n\n function isSignificantValue(value: any, key: string) {\n return key === \"group\" ? true : typeof value !== undefined && value !== \"\";\n }\n }\n private createComparableParams(): Memento<T> {\n const group = this._params.group;\n return {\n params: this._params,\n groupSortDirection: isGroupingFun(group) ? group.sortDirection : undefined\n };\n }\n private hasGlobalSearchFieldChanges() {\n const currentVal = (this._params.filter && this._params.filter['$']);\n const previousVal =\n (this.prevParamsMemento && this.prevParamsMemento.params.filter && this.prevParamsMemento.params.filter['$']);\n return !ng1.equals(currentVal, previousVal);\n }\n private log(...args: any[]) {\n if (this._settings.debugMode && this.$log.debug) {\n this.$log.debug(...args);\n }\n }\n private parseGroup(group: string | Grouping<T>) {\n const defaultSort = this._settings.groupOptions.defaultSort;\n if (!group) {\n return group;\n } else if (isGroupingFun(group)) {\n if (group.sortDirection == null) {\n group.sortDirection = defaultSort;\n }\n return group;\n } else if (typeof group === 'object') {\n for (const key in group) {\n if (group[key] == null) {\n group[key] = defaultSort;\n }\n }\n return group;\n } else {\n return {\n [group]: defaultSort\n };\n }\n }\n private runInterceptorPipeline(fetchedData: IPromise<any>) {\n return this._settings.interceptors.reduce((result, interceptor) => {\n const thenFn = (interceptor.response && interceptor.response.bind(interceptor)) || this.$q.when;\n const rejectFn = (interceptor.responseError && interceptor.responseError.bind(interceptor)) || this.$q.reject;\n return result.then(data => {\n return thenFn(data, this);\n }, reason => {\n return rejectFn(reason, this);\n });\n }, fetchedData);\n }\n\n static init(\n $q: IQService,\n $log: ILogService,\n ngTableDefaults: Defaults,\n ngTableEventsChannel: NgTableEventsChannel) {\n ng1.extend(NgTableParams.prototype, {\n $q, $log, ngTableDefaults, ngTableEventsChannel\n });\n }\n}\n\nNgTableParams.init.$inject = ['$q', '$log', 'ngTableDefaults', 'ngTableEventsChannel'];\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/ngTableParams.ts","import * as ng1 from 'angular';\nimport { assignPartialDeep, checkClassInit } from '../shared';\nimport { IPromise } from 'angular';\nimport { Defaults } from './ngTableDefaults';\nimport { DataRowGroup, DataSettingsPartial, DataSettings, DefaultGetData, GetDataFunc, Interceptor, InterceptableGetDataFunc } from './data';\nimport { FilterValues, FilterSettingsPartial, FilterSettings } from './filtering';\nimport { GetGroupFunc, GroupSettingsPartial, GroupSettings } from './grouping';\nimport { SortDirection } from './sorting';\nimport { NgTableParams } from './ngTableParams';\n\n/**\n * Configuration settings for {@link NgTableParams}\n */\nexport class Settings<T> {\n constructor() {\n checkClassInit(Settings);\n }\n /**\n * Returns true whenever a call to `getData` is in progress\n */\n $loading = false;\n /**\n * The page size buttons that should be displayed. Each value defined in the array\n * determines the possible values that can be supplied to {@link NgTableParams} `page`\n */\n counts = [10, 25, 50, 100];\n /**\n * An array that contains all the data rows that table should manage.\n * The `gateData` function will be used to manage the data rows\n * that ultimately will be displayed.\n */\n dataset?: T[] = undefined;\n dataOptions = new DataSettings();\n debugMode = false;\n /**\n * The total number of data rows before paging has been applied.\n * Typically you will not need to supply this yourself\n */\n total = 0;\n /**\n * The default sort direction that will be used whenever a sorting is supplied that\n * does not define its own sort direction\n */\n defaultSort: SortDirection = 'desc';\n filterOptions = new FilterSettings<T>();\n /**\n * The function that will be used fetch data rows. Leave undefined to let the {@link IDefaultGetData}\n * service provide a default implementation that will work with the `dataset` array you supply.\n *\n * Typically you will supply a custom function when you need to execute filtering, paging and sorting\n * on the server\n */\n getData: GetDataFunc<T> | InterceptableGetDataFunc<T> = Settings.defaultGetData;\n /**\n * The function that will be used group data rows according to the groupings returned by {@link NgTableParams} `group`\n */\n getGroups: GetGroupFunc<T> = Settings.defaultGetGroups;\n groupOptions = new GroupSettings();\n /**\n * The collection of interceptors that should apply to the results of a call to\n * the `getData` function before the data rows are displayed in the table\n */\n interceptors = new Array<Interceptor<T>>();\n /**\n * Configuration for the template that will display the page size buttons\n */\n paginationMaxBlocks = 11;\n /**\n * Configuration for the template that will display the page size buttons\n */\n paginationMinBlocks = 5;\n /**\n * The html tag that will be used to display the sorting indicator in the table header\n */\n sortingIndicator = 'span'\n static isInitialized = false;\n private static defaultGetData: GetDataFunc<any>;\n private static defaultGetGroups: GetGroupFunc<any>;\n private static ngTableDefaults: Defaults\n private static instance: Settings<any>;\n static createWithOverrides<T>(): Settings<T> {\n checkClassInit(Settings);\n return Settings.merge(Settings.instance, Settings.ngTableDefaults.settings || {});\n }\n static merge<T>(existing: Settings<T>, newSettings: SettingsPartial<T>): Settings<T> {\n checkClassInit(Settings);\n\n const optionalPropNames: (keyof Settings<T>)[] = ['dataset'];\n const results = assignPartialDeep(\n ng1.copy(existing),\n newSettings,\n (key: keyof Settings<T>) => optionalPropNames.indexOf(key) !== -1,\n (destValue: any, srcValue: any, key: keyof Settings<T>) => {\n // copy *reference* to dataset\n if (key === 'dataset') {\n return srcValue;\n }\n return undefined;\n });\n\n if (newSettings.dataset) {\n results.total = newSettings.dataset.length;\n Settings.optimizeFilterDelay(results);\n }\n return results;\n }\n private static optimizeFilterDelay<T>(settings: Settings<T>) {\n // don't debounce by default filter input when working with small synchronous datasets\n if (settings.filterOptions.filterDelay === Settings.instance.filterOptions.filterDelay &&\n settings.total <= settings.filterOptions.filterDelayThreshold &&\n settings.getData === Settings.instance.getData) {\n settings.filterOptions.filterDelay = 0;\n }\n }\n static init(ngTableDefaultGetData: DefaultGetData<any>,\n ngTableDefaultGetGroups: GetGroupFunc<any>,\n ngTableDefaults: Defaults) {\n Settings.defaultGetData = (params: NgTableParams<any>) => {\n return ngTableDefaultGetData(params.settings().dataset, params) as any[];\n };\n Settings.defaultGetGroups = ngTableDefaultGetGroups;\n Settings.ngTableDefaults = ngTableDefaults;\n Settings.isInitialized = true;\n Settings.instance = new Settings();\n }\n}\n\nSettings.init.$inject = ['ngTableDefaultGetData', 'ngTableDefaultGetGroups', 'ngTableDefaults'];\n\nexport type SettingsPartial<T> =\n Partial<Pick<Settings<T>,\n '$loading' |\n 'counts' |\n 'dataset' |\n 'debugMode' |\n 'total' |\n 'defaultSort' |\n 'getData' |\n 'getGroups' |\n 'interceptors' |\n 'paginationMaxBlocks' |\n 'paginationMinBlocks' |\n 'sortingIndicator'>>\n & {\n dataOptions?: DataSettingsPartial;\n filterOptions?: FilterSettingsPartial<T>;\n groupOptions?: GroupSettingsPartial;\n }\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/ngTableSettings.ts","import { GroupingPartial, GroupingFunc } from './grouping';\nimport { SortingValues } from './sorting';\n\n/**\n * @private\n */\nexport function convertSortToOrderBy(sorting: SortingValues) {\n const result: string[] = [];\n for (let column in sorting) {\n result.push((sorting[column] === \"asc\" ? \"+\" : \"-\") + column);\n }\n return result;\n}\n\n/**\n * @private\n */\nexport function isGroupingFun(val: string | GroupingPartial<any>): val is GroupingFunc<any> {\n return typeof val === 'function'\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/util.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\nimport { IAugmentedJQuery, IDirective, IQService, IParseService, IPromise, IScope } from 'angular';\nimport * as ng1 from 'angular';\nimport { \n ColumnDef, ColumnDefPartial, ColumnFieldContext, ColumnField, DeclarativeTableHtmlAttributes, \n FilterTemplateDefMap, SelectData \n} from './public-interfaces';\nimport { NgTableController } from './ngTableController';\n\ninterface ScopeExtensions {\n $columns: ColumnDef[]\n}\n\nngTable.$inject = ['$q', '$parse'];\n\n/**\n * Directive that instantiates {@link NgTableController NgTableController}.\n * @ngdoc directive\n * @name ngTable\n * @example\n * \n * ```html\n * <table ng-table=\"$ctrl.tableParams\" show-filter=\"true\" class=\"table table-bordered\">\n * <tr ng-repeat=\"user in $data\">\n * <td data-title=\"'Name'\" sortable=\"'name'\" filter=\"{ 'name': 'text' }\">\n * {{user.name}}\n * </td>\n * <td data-title=\"'Age'\" sortable=\"'age'\" filter=\"{ 'age': 'text' }\">\n * {{user.age}}\n * </td>\n * </tr>\n * </table>\n * ```\n */\nexport function ngTable($q: IQService, $parse: IParseService) : IDirective {\n\n return {\n restrict: 'A',\n priority: 1001,\n scope: true,\n controller: 'ngTableController',\n compile: function(element: IAugmentedJQuery) {\n let compiledColumns: ColumnDefPartial[] = [],\n i = 0,\n dataRow: JQuery,\n groupRow: JQuery\n const rows: JQuery[] = [];\n\n ng1.forEach(element.find('tr'), (tr: JQuery) => {\n rows.push(ng1.element(tr))\n });\n dataRow = rows.filter(tr => !tr.hasClass('ng-table-group'))[0];\n groupRow = rows.filter(tr => tr.hasClass('ng-table-group'))[0];\n\n if (!dataRow) {\n return undefined;\n }\n ng1.forEach(dataRow.find('td'), (item: JQuery) => {\n const el = ng1.element(item);\n if (el.attr('ignore-cell') && 'true' === el.attr('ignore-cell')) {\n return;\n }\n\n const getAttrValue = function(attr: string){\n return el.attr('x-data-' + attr) || el.attr('data-' + attr) || el.attr(attr);\n };\n const setAttrValue = function(attr: string, value: string){\n if (el.attr('x-data-' + attr)){\n el.attr('x-data-' + attr, value)\n } else if (el.attr('data' + attr)){\n el.attr('data' + attr, value)\n } else {\n el.attr(attr, value)\n }\n };\n\n const parsedAttribute = function<T>(attr: string): ColumnField<T> | undefined {\n const expr = getAttrValue(attr);\n if (!expr){\n return undefined;\n }\n\n let localValue: any;\n const getter = (context: ColumnFieldContext) => {\n if (localValue !== undefined){\n return localValue as T;\n }\n return $parse(expr)(context) as T;\n };\n (getter as any).assign = ($scope: ColumnFieldContext, value: any) => {\n const parsedExpr = $parse(expr);\n if (parsedExpr.assign) {\n // we should be writing back to the parent scope as this is where the expression\n // came from\n parsedExpr.assign($scope.$parent, value);\n } else {\n localValue = value;\n }\n };\n return getter as ColumnField<T>;\n };\n const titleExpr = getAttrValue('title-alt') || getAttrValue('title');\n if (titleExpr){\n el.attr('data-title-text', '{{' + titleExpr + '}}'); // this used in responsive table\n }\n // NOTE TO MAINTAINERS: if you add extra fields to a $column be sure to extend ngTableColumn with\n // a corresponding \"safe\" default\n compiledColumns.push({\n id: i++,\n title: parsedAttribute<string>('title'),\n titleAlt: parsedAttribute<string>('title-alt'),\n headerTitle: parsedAttribute<string>('header-title'),\n sortable: parsedAttribute<string | boolean>('sortable'),\n 'class': parsedAttribute<string>('header-class'),\n filter: parsedAttribute<FilterTemplateDefMap>('filter'),\n groupable: parsedAttribute<string | boolean>('groupable'),\n headerTemplateURL: parsedAttribute<string | boolean>('header'),\n filterData: parsedAttribute<IPromise<SelectData> | SelectData>('filter-data'),\n show: el.attr(\"ng-if\") ? parsedAttribute<boolean>('ng-if') : undefined\n });\n\n if (groupRow || el.attr(\"ng-if\")){\n // change ng-if to bind to our column definition which we know will be writable\n // because this will potentially increase the $watch count, only do so if we already have an\n // ng-if or when we definitely need to change visibility of the columns.\n // currently only ngTableGroupRow directive needs to change visibility\n setAttrValue('ng-if', '$columns[' + (compiledColumns.length - 1) + '].show(this)');\n }\n });\n return function(scope: IScope & ScopeExtensions, element: IAugmentedJQuery, attrs: DeclarativeTableHtmlAttributes, controller: NgTableController<any, ColumnDefPartial>) {\n const columns = scope.$columns = controller.buildColumns(compiledColumns);\n\n controller.setupBindingsToInternalScope(attrs.ngTable);\n controller.loadFilterData(columns);\n controller.compileDirectiveTemplates();\n };\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTable.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport { IScope } from 'angular';\nimport * as ng1 from 'angular';\nimport { ColumnDef, ColumnDefPartial, DynamicTableColDef } from './public-interfaces';\n\n/**\n * @private\n */\nfunction isScopeLike(object: any) {\n return object != null && ng1.isFunction(object.$new);\n}\n\n/**\n * @private\n * Service to construct a $column definition used by {@link ngTable ngTable} directive\n */\nexport class NgTableColumn<TCol extends ColumnDefPartial | DynamicTableColDef> {\n static $inject: string[] = [];\n\n /**\n * Creates a $column for use within a header template\n *\n * @param column the initial definition for $column to build\n * @param defaultScope the $scope to supply to the $column getter methods when not supplied by caller\n * @param columns a reference to the $columns array to make available on the context supplied to the\n * $column getter methods\n */\n buildColumn(column: TCol, defaultScope: IScope, columns: ColumnDef[]): ColumnDef {\n // note: we're not modifying the original column object. This helps to avoid unintended side affects\n const extendedCol = Object.create(column);\n const defaults = this.createDefaults();\n for (const prop in defaults) {\n if (extendedCol[prop] === undefined) {\n extendedCol[prop] = defaults[prop];\n }\n if (!ng1.isFunction(extendedCol[prop])) {\n // wrap raw field values with \"getter\" functions\n // - this is to ensure consistency with how ngTable.compile builds columns\n // - note that the original column object is being \"proxied\"; this is important\n // as it ensure that any changes to the original object will be returned by the \"getter\"\n const getterSetter = function getterSetter(/*[value] || [$scope, locals]*/) {\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\n (getterSetter as any).assign(null, arguments[0]);\n } else {\n return column[prop];\n }\n };\n (getterSetter as any).assign = function ($scope: IScope, value: any) {\n column[prop] = value;\n };\n extendedCol[prop] = getterSetter;\n }\n // satisfy the arguments expected by the function returned by parsedAttribute in the ngTable directive\n const getterFn = extendedCol[prop];\n extendedCol[prop] = function () {\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\n getterFn.assign(defaultScope, arguments[0]);\n } else {\n const scope = arguments[0] || defaultScope;\n const context = Object.create(scope);\n ng1.extend(context, {\n $column: extendedCol,\n $columns: columns\n });\n return getterFn.call(column, context);\n }\n };\n if (getterFn.assign) {\n extendedCol[prop].assign = getterFn.assign;\n } else {\n const wrappedGetterFn = extendedCol[prop];\n let localValue: any;\n const getterSetter = function getterSetter(/*[value] || [$scope, locals]*/) {\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\n (getterSetter as any).assign(null, arguments[0]);\n } else {\n return localValue != undefined ? localValue : wrappedGetterFn.apply(extendedCol, arguments);\n }\n };\n (getterSetter as any).assign = function ($scope: IScope, value: any) {\n localValue = value;\n };\n extendedCol[prop] = getterSetter;\n }\n }\n return extendedCol as ColumnDef;\n }\n\n private createDefaults() {\n return {\n 'class': this.createGetterSetter(''),\n filter: this.createGetterSetter(false),\n groupable: this.createGetterSetter(false),\n filterData: ng1.noop,\n headerTemplateURL: this.createGetterSetter(false),\n headerTitle: this.createGetterSetter(''),\n sortable: this.createGetterSetter(false),\n show: this.createGetterSetter(true),\n title: this.createGetterSetter(''),\n titleAlt: this.createGetterSetter('')\n };\n }\n\n private createGetterSetter(initialValue: any) {\n let value = initialValue;\n const getterSetter = function getterSetter(/*[value] || [$scope, locals]*/) {\n if (arguments.length === 1 && !isScopeLike(arguments[0])) {\n (getterSetter as any).assign(null, arguments[0]);\n } else {\n return value;\n }\n };\n (getterSetter as any).assign = function ($scope: IScope, newValue: any) {\n value = newValue;\n };\n return getterSetter;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableColumn.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport { IAugmentedJQuery, IAttributes, IDirective, IParseService } from 'angular';\nimport { TableScope } from './ngTableController';\nimport { ColumnDef } from './public-interfaces';\n\n/**\n * @private\n */\ninterface InputAttributes extends IAttributes {\n ngTableColumnsBinding: string;\n}\n\nngTableColumnsBinding.$inject = [\"$parse\"];\n\n/**\n * One-way data binds the $columns array generated by ngTable/ngTableDynamic to the specified\n * expression.\n * This allows the $columns array created for the table to be accessed outside of the html table\n * markup.\n * \n * @ngdoc directive\n * \n * @example\n * ```html\n * <table ng-table=\"$ctrl.tableParams\" class=\"table\" ng-table-columns-binding=\"$ctlr.tableColumns\">\n * ```\n */\nexport function ngTableColumnsBinding<T>($parse: IParseService) : IDirective {\n const directive = {\n restrict: 'A',\n link: linkFn\n };\n return directive;\n\n function linkFn($scope: TableScope<T>, $element: IAugmentedJQuery, $attrs: InputAttributes){\n const setter = $parse($attrs.ngTableColumnsBinding).assign;\n if (setter){\n $scope.$watch<ColumnDef[]>('$columns', newColumns => {\n const shallowClone = (newColumns || []).slice(0);\n setter($scope, shallowClone);\n });\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableColumnsBinding.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport {\n IAttributes, IAugmentedJQuery, ICompileService, IDocumentService, IParseService, IPromise, IScope,\n ITimeoutService\n} from 'angular';\nimport * as ng1 from 'angular';\nimport {\n DataResult, DataResults, DataRowGroup, GroupedDataResults, NgTableParams, NgTableEventsChannel,\n PageButton\n} from '../core';\nimport { ColumnDef, ColumnDefPartial, DynamicTableColDef, SelectData, TableHtmlAttributes } from './public-interfaces';\nimport { NgTableColumn } from './ngTableColumn';\n\n/**\n * @private\n */\nexport interface TableScope<T> extends IScope {\n $columns: ColumnDef[];\n $loading: boolean;\n $filterRow: {\n disabled: boolean;\n };\n $data?: DataResults<T>;\n $groups?: GroupedDataResults<T>;\n $groupRow: {\n show: boolean;\n };\n show_filter: boolean;\n pages: PageButton[];\n templates: {\n header: string;\n pagination: string;\n },\n params: NgTableParams<T>\n}\n\n/**\n * The controller for the {@link ngTable ngTable} and {@link ngTableDynamic ngTableDynamic} directives\n */\nexport class NgTableController<TParams, TCol extends ColumnDefPartial | DynamicTableColDef> {\n static $inject = [\n '$scope', '$timeout', '$parse', '$compile', '$attrs', '$element', '$document', 'ngTableColumn', 'ngTableEventsChannel'\n ];\n private delayFilter: (callback: () => void, ms: number) => void;\n private get hasVisibleFilterColumn() {\n if (!this.$scope.$columns) return false;\n\n return this.some(this.$scope.$columns, ($column) => {\n return $column.show(this.$scope) && !!$column.filter(this.$scope);\n });\n }\n constructor(\n private $scope: TableScope<TParams>,\n $timeout: ITimeoutService,\n private $parse: IParseService,\n private $compile: ICompileService,\n private $attrs: IAttributes & TableHtmlAttributes,\n private $element: IAugmentedJQuery,\n private $document: IDocumentService,\n private ngTableColumn: NgTableColumn<TCol>,\n private ngTableEventsChannel: NgTableEventsChannel) {\n\n const isFirstTimeLoad = true;\n $scope.$filterRow = { disabled: false };\n $scope.$loading = false;\n\n // until such times as the directive uses an isolated scope, we need to ensure that the check for\n // the params field only consults the \"own properties\" of the $scope. This is to avoid seeing the params\n // field on a $scope higher up in the prototype chain\n if (!$scope.hasOwnProperty(\"params\")) {\n $scope.params = new NgTableParams<TParams>(true);\n }\n\n this.delayFilter = (function () {\n let timer: IPromise<any>;\n return (callback: () => void, ms: number) => {\n $timeout.cancel(timer);\n timer = $timeout(callback, ms);\n };\n })();\n\n // watch for when a new NgTableParams is bound to the scope\n // CRITICAL: the watch must be for reference and NOT value equality; this is because NgTableParams maintains\n // the current data page as a field. Checking this for value equality would be terrible for performance\n // and potentially cause an error if the items in that array has circular references\n this.$scope.$watch<NgTableParams<TParams>>('params', (newParams, oldParams) => {\n if (newParams === oldParams || !newParams) {\n return;\n }\n\n newParams.reload();\n }, false);\n\n this.subscribeToTableEvents();\n }\n\n private onDataReloadStatusChange(newStatus: boolean/*, oldStatus*/) {\n if (!newStatus || this.$scope.params.hasErrorState()) {\n return;\n }\n\n const currentParams = this.$scope.params;\n const filterOptions = currentParams.settings().filterOptions;\n\n if (currentParams.hasFilterChanges()) {\n const applyFilter = () => {\n currentParams.page(1);\n currentParams.reload();\n };\n if (filterOptions.filterDelay) {\n this.delayFilter(applyFilter, filterOptions.filterDelay);\n } else {\n applyFilter();\n }\n } else {\n currentParams.reload();\n }\n }\n\n compileDirectiveTemplates() {\n if (!this.$element.hasClass('ng-table')) {\n this.$scope.templates = {\n header: (this.$attrs.templateHeader ? this.$attrs.templateHeader : 'ng-table/header.html'),\n pagination: (this.$attrs.templatePagination ? this.$attrs.templatePagination : 'ng-table/pager.html')\n };\n this.$element.addClass('ng-table');\n let headerTemplate: IAugmentedJQuery | undefined;\n\n // $element.find('> thead').length === 0 doesn't work on jqlite\n let theadFound = false;\n ng1.forEach(this.$element.children(), (e) => {\n if (e.tagName === 'THEAD') {\n theadFound = true;\n }\n });\n if (!theadFound) {\n headerTemplate = ng1.element('<thead ng-include=\"templates.header\"></thead>', this.$document);\n this.$element.prepend(headerTemplate);\n }\n const paginationTemplate = ng1.element(\n '<div ng-table-pagination=\"params\" template-url=\"templates.pagination\"></div>',\n this.$document\n );\n this.$element.after(paginationTemplate);\n if (headerTemplate) {\n this.$compile(headerTemplate)(this.$scope);\n }\n this.$compile(paginationTemplate)(this.$scope);\n }\n }\n\n loadFilterData($columns: ColumnDef[]) {\n ng1.forEach($columns, ($column) => {\n const result = $column.filterData(this.$scope);\n if (!result) {\n delete $column.filterData;\n return undefined;\n }\n\n if (isPromiseLike(result)) {\n delete $column.filterData;\n return result.then(data => {\n // our deferred can eventually return arrays, functions and objects\n if (!ng1.isArray(data) && !ng1.isFunction(data) && !ng1.isObject(data)) {\n // if none of the above was found - we just want an empty array\n data = [];\n }\n $column.data = data;\n });\n }\n // otherwise, we just return what the user gave us. It could be a function, array, object, whatever\n else {\n return $column.data = result;\n }\n });\n\n function isPromiseLike(val: any): val is IPromise<SelectData> {\n return val && typeof val === 'object' && typeof val.then === 'function';\n }\n }\n\n buildColumns(columns: TCol[]): ColumnDef[] {\n // todo: use strictNullChecks and remove guard clause\n const result: ColumnDef[] = [];\n (columns || []).forEach(col => {\n result.push(this.ngTableColumn.buildColumn(col, this.$scope, result));\n });\n return result\n }\n\n parseNgTableDynamicExpr(attr: string) {\n if (!attr || attr.indexOf(\" with \") > -1) {\n const parts = attr.split(/\\s+with\\s+/);\n return {\n tableParams: parts[0],\n columns: parts[1]\n };\n } else {\n throw new Error('Parse error (expected example: ng-table-dynamic=\\'tableParams with cols\\')');\n }\n }\n\n setupBindingsToInternalScope(tableParamsExpr: string) {\n\n // note: this we're setting up watches to simulate angular's isolated scope bindings\n\n // note: is REALLY important to watch for a change to the ngTableParams *reference* rather than\n // $watch for value equivalence. This is because ngTableParams references the current page of data as\n // a field and it's important not to watch this\n this.$scope.$watch<NgTableParams<TParams>>(tableParamsExpr, (params) => {\n if (params === undefined) {\n return;\n }\n this.$scope.params = params;\n }, false);\n\n this.setupFilterRowBindingsToInternalScope();\n this.setupGroupRowBindingsToInternalScope();\n }\n\n private setupFilterRowBindingsToInternalScope() {\n if (this.$attrs.showFilter) {\n this.$scope.$parent.$watch<boolean>(this.$attrs.showFilter, (value) => {\n this.$scope.show_filter = value;\n });\n } else {\n this.$scope.$watch(() => this.hasVisibleFilterColumn, (value) => {\n this.$scope.show_filter = value;\n })\n }\n\n if (this.$attrs.disableFilter) {\n this.$scope.$parent.$watch<boolean>(this.$attrs.disableFilter, (value) => {\n this.$scope.$filterRow.disabled = value;\n });\n }\n }\n\n private setupGroupRowBindingsToInternalScope() {\n this.$scope.$groupRow = { show: false };\n if (this.$attrs.showGroup) {\n const showGroupGetter = this.$parse(this.$attrs.showGroup);\n this.$scope.$parent.$watch<boolean>(showGroupGetter, (value) => {\n this.$scope.$groupRow.show = value;\n });\n if (showGroupGetter.assign) {\n // setup two-way databinding thus allowing ngTableGrowRow to assign to the showGroup expression\n this.$scope.$watch<boolean>('$groupRow.show', (value) => {\n showGroupGetter.assign(this.$scope.$parent, value);\n });\n }\n } else {\n this.$scope.$watch<boolean>('params.hasGroup()', (newValue) => {\n this.$scope.$groupRow.show = newValue;\n });\n }\n }\n\n private getVisibleColumns() {\n return (this.$scope.$columns || []).filter((c) => {\n return c.show(this.$scope);\n });\n }\n\n private subscribeToTableEvents() {\n\n this.$scope.$watch('params.isDataReloadRequired()', (newStatus: boolean/*, oldStatus*/) => {\n this.onDataReloadStatusChange(newStatus);\n });\n\n this.ngTableEventsChannel.onAfterReloadData<TParams>(\n (params, newDatapage) => {\n const visibleColumns = this.getVisibleColumns();\n if (params.hasGroup()) {\n this.$scope.$groups = (newDatapage || []) as GroupedDataResults<TParams>;\n this.$scope.$groups.visibleColumnCount = visibleColumns.length;\n } else {\n this.$scope.$data = (newDatapage || []) as DataResults<TParams>;\n this.$scope.$data.visibleColumnCount = visibleColumns.length;\n }\n },\n this.$scope,\n (publisher) => this.$scope.params === publisher\n );\n\n this.ngTableEventsChannel.onPagesChanged<TParams>(\n (params, newPages) => {\n this.$scope.pages = newPages;\n },\n this.$scope,\n (publisher) => this.$scope.params === publisher\n );\n }\n\n private some<T>(array: T[], predicate: (item: T) => boolean) {\n let found = false;\n for (let i = 0; i < array.length; i++) {\n const obj = array[i];\n if (predicate(obj)) {\n found = true;\n break;\n }\n }\n return found;\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableController.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport { IAugmentedJQuery, IDirective, IScope } from 'angular';\nimport * as ng1 from 'angular';\nimport { ColumnDef, DynamicTableColDef, DynamicTableHtmlAttributes } from './public-interfaces';\nimport { NgTableController } from './ngTableController';\n\ninterface ScopeExtensions {\n $columns: ColumnDef[]\n}\n\nfunction toArray<T>(arr: ArrayLike<T>) {\n return Array.prototype.slice.call(arr) as T[];\n}\n\nngTableDynamic.$inject = [];\n\n/**\n * A dynamic version of the {@link ngTable ngTable} directive that accepts a dynamic list of columns\n * definitions to render\n * @ngdoc directive\n *\n * @example\n * ```html\n * <table ng-table-dynamic=\"$ctrl.tableParams with $ctrl.cols\" class=\"table\">\n * <tr ng-repeat=\"row in $data\">\n * <td ng-repeat=\"col in $columns\">{{row[col.field]}}</td>\n * </tr>\n * </table>\n * ```\n */\nexport function ngTableDynamic(): IDirective {\n\n return {\n restrict: 'A',\n priority: 1001,\n scope: true,\n controller: 'ngTableController',\n compile: function (tElement: IAugmentedJQuery) {\n\n const tRows = toArray(tElement[0].getElementsByTagName('tr'));\n const tRow = tRows.filter(tr => !ng1.element(tr).hasClass('ng-table-group'))[0];\n\n if (!tRow) {\n return undefined;\n }\n\n toArray(tRow.getElementsByTagName('td')).forEach(tCell => {\n const el = ng1.element(tCell);\n const getAttrValue = (attr: string) => {\n return el.attr('x-data-' + attr) || el.attr('data-' + attr) || el.attr(attr);\n };\n\n // this used in responsive table\n const titleExpr = getAttrValue('title');\n if (!titleExpr) {\n el.attr('data-title-text', '{{$columns[$index].titleAlt(this) || $columns[$index].title(this)}}');\n }\n const showExpr = el.attr('ng-if');\n if (!showExpr) {\n el.attr('ng-if', '$columns[$index].show(this)');\n }\n });\n return function (scope: IScope & ScopeExtensions, element: IAugmentedJQuery, attrs: DynamicTableHtmlAttributes, controller: NgTableController<any, DynamicTableColDef>) {\n const expr = controller.parseNgTableDynamicExpr(attrs.ngTableDynamic);\n\n controller.setupBindingsToInternalScope(expr.tableParams);\n controller.compileDirectiveTemplates();\n\n scope.$watchCollection<DynamicTableColDef[]>(expr.columns, (newCols/*, oldCols*/) => {\n scope.$columns = controller.buildColumns(newCols);\n controller.loadFilterData(scope.$columns);\n });\n };\n }\n };\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableDynamic.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nconst templateUrl = require('./filterRow.html');\n\nngTableFilterRow.$inject = [];\n\n/**\n * directive that renders the filter header row for a table \n * @ngdoc directive\n * @example\n * ```html\n * <ng-table-filter-row></ng-table-filter-row>\n * ```\n */\nexport function ngTableFilterRow(){\n const directive = {\n restrict: 'E',\n replace: true,\n templateUrl: templateUrl,\n scope: true,\n controller: 'ngTableFilterRowController',\n controllerAs: '$ctrl'\n };\n return directive;\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableFilterRow.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport { IScope } from 'angular';\nimport { FilterTemplateDef, FilterTemplateDefMap } from './public-interfaces';\nimport { NgTableFilterConfig } from './ngTableFilterConfig';\n\n/**\n * @private\n */\nexport interface ScopeExtensions {\n getFilterPlaceholderValue(filterDef: string | FilterTemplateDef, filterKey?: string): string;\n}\n\n/**\n * Controller for the {@link ngTableFilterRow ngTableFilterRow} directive\n */\nexport class NgTableFilterRowController {\n static $inject = ['$scope', 'ngTableFilterConfig'];\n config: NgTableFilterConfig;\n constructor($scope: IScope & ScopeExtensions, ngTableFilterConfig: NgTableFilterConfig) {\n this.config = ngTableFilterConfig;\n\n // todo: stop doing this. Why?\n // * scope inheritance makes it hard to know how supplies functions\n // * scope is not a concept in angular 2\n // make function available to filter templates\n $scope.getFilterPlaceholderValue = this.getFilterPlaceholderValue.bind(this);\n }\n\n getFilterCellCss(filter: FilterTemplateDefMap, layout: string) {\n if (layout !== 'horizontal') {\n return 's12';\n }\n\n const size = Object.keys(filter).length;\n const width = parseInt((12 / size).toString(), 10);\n return 's' + width;\n }\n\n getFilterPlaceholderValue(filterDef: string | FilterTemplateDef, filterKey?: string) {\n if (typeof filterDef === 'string') {\n return '';\n } else {\n return filterDef.placeholder;\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableFilterRowController.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nconst templateUrl = require('./groupRow.html');\n\nngTableGroupRow.$inject = [];\n\n/**\n * directive that renders the group header row for a table \n * @ngdoc directive\n * @example\n * ```html\n * <ng-table-group-row></ng-table-group-row>\n * ```\n */\nexport function ngTableGroupRow(){\n const directive = {\n restrict: 'E',\n replace: true,\n templateUrl: templateUrl,\n scope: true,\n controller: 'ngTableGroupRowController',\n controllerAs: '$ctrl'\n };\n return directive;\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableGroupRow.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport { IPromise } from 'angular';\nimport { DataResult, GroupingFunc, Grouping, GroupSort } from '../core';\nimport { ColumnDef } from './public-interfaces';\nimport { TableScope } from './ngTableController';\n\n/**\n * @private\n */\nexport interface ScopeExtensions<T> {\n $selGroup: GroupingFunc<any> | string;\n $selGroupTitle: string;\n}\n\n\n/**\n * Controller for the {@link ngTableGroupRow ngTableGroupRow} directive\n */\nexport class NgTableGroupRowController<T> {\n static $inject = ['$scope'];\n private groupFns: Array<GroupingFunc<any> | ColumnDef> = [];\n constructor(private $scope: TableScope<T> & ScopeExtensions<T>) {\n $scope.$watch<Grouping<any>>('params.group()', (newGrouping) => {\n this.setGroup(newGrouping);\n }, true);\n }\n\n getGroupables() {\n const groupableCols = this.$scope.$columns.filter($column => !!$column.groupable(this.$scope));\n return this.groupFns.concat(groupableCols);\n }\n\n getGroupTitle(group: GroupingFunc<any> | ColumnDef) {\n return this.isGroupingFunc(group) ? group.title : group.title(this.$scope);\n }\n\n\n getVisibleColumns() {\n return this.$scope.$columns.filter($column => $column.show(this.$scope))\n }\n\n groupBy(group: GroupingFunc<any> | ColumnDef) {\n if (this.isSelectedGroup(group)) {\n this.changeSortDirection();\n } else {\n if (this.isGroupingFunc(group)) {\n this.$scope.params.group(group);\n } else {\n // it's OK, we know that groupable will return a string\n // this is guaranteed by getGroupables returning only\n // columns that return (truthy) strings\n this.$scope.params.group(group.groupable(this.$scope) as string);\n }\n }\n }\n\n isSelectedGroup(group: GroupingFunc<any> | ColumnDef) {\n if (this.isGroupingFunc(group)) {\n return group === this.$scope.$selGroup;\n } else {\n return group.groupable(this.$scope) === this.$scope.$selGroup;\n }\n }\n\n toggleDetail() {\n this.$scope.params.settings().groupOptions.isExpanded = !this.$scope.params.settings().groupOptions.isExpanded;\n return this.$scope.params.reload();\n }\n\n private changeSortDirection() {\n let newDirection: GroupSort;\n if (this.$scope.params.hasGroup(this.$scope.$selGroup, 'asc')) {\n newDirection = 'desc';\n } else if (this.$scope.params.hasGroup(this.$scope.$selGroup, 'desc')) {\n newDirection = '';\n } else {\n newDirection = 'asc';\n }\n this.$scope.params.group(this.$scope.$selGroup, newDirection);\n }\n\n private findGroupColumn(groupKey: GroupingFunc<any> | string) {\n return this.$scope.$columns.filter($column => $column.groupable(this.$scope) === groupKey)[0];\n }\n\n private isGroupingFunc(val: ColumnDef | Grouping<any>): val is GroupingFunc<any> {\n return typeof val === 'function';\n }\n\n private setGroup(grouping: Grouping<any>) {\n const existingGroupCol = this.findGroupColumn(this.$scope.$selGroup);\n if (existingGroupCol && existingGroupCol.show.assign) {\n existingGroupCol.show.assign(this.$scope, true);\n }\n if (this.isGroupingFunc(grouping)) {\n this.groupFns = [grouping];\n this.$scope.$selGroup = grouping;\n this.$scope.$selGroupTitle = grouping.title || '';\n } else {\n // note: currently only one group is implemented\n const groupKey = Object.keys(grouping || {})[0];\n const groupedColumn = this.findGroupColumn(groupKey);\n if (groupedColumn) {\n this.$scope.$selGroupTitle = groupedColumn.title(this.$scope);\n this.$scope.$selGroup = groupKey;\n if (groupedColumn.show.assign) {\n groupedColumn.show.assign(this.$scope, false);\n }\n }\n }\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableGroupRowController.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport * as ng1 from 'angular';\nimport { NgTableEventsChannel, PageButton } from '../core'\nimport { TableScope } from './ngTableController';\n\ninterface ScopeExtensions {\n pages: PageButton[]\n}\n\nngTablePagination.$inject = ['$compile', '$document', 'ngTableEventsChannel'];\n\n/**\n * Directive that renders the table pagination controls\n * @ngdoc directive\n */\nexport function ngTablePagination<T>($compile: ng1.ICompileService, $document: ng1.IDocumentService, ngTableEventsChannel: NgTableEventsChannel): ng1.IDirective {\n\n return {\n restrict: 'A',\n scope: {\n 'params': '=ngTablePagination',\n 'templateUrl': '='\n },\n replace: false,\n link: function(scope: TableScope<T> & ScopeExtensions, element: ng1.IAugmentedJQuery/*, attrs*/) {\n\n ngTableEventsChannel.onAfterReloadData<T>(function(pubParams) {\n scope.pages = pubParams.generatePagesArray();\n }, scope, function(pubParams){\n return pubParams === scope.params;\n });\n\n scope.$watch<string>('templateUrl', function(templateUrl) {\n if (templateUrl === undefined) {\n return;\n }\n const template = ng1.element('<div ng-include=\"templateUrl\"></div>', $document);\n element.append(template);\n $compile(template)(scope);\n });\n }\n };\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTablePagination.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport { IAttributes, IDirective, IParseService, IQService, IPromise, IScope } from 'angular';\nimport { ColumnDef, SelectData, SelectDataFunc, SelectOption } from './public-interfaces';\n\n/**\n * @private\n */\nexport interface InputAttributes extends IAttributes {\n ngTableSelectFilterDs: string;\n}\n\n/**\n * @private\n */\nexport interface ScopeExtensions {\n $selectData: SelectOption[]\n}\n\nngTableSelectFilterDs.$inject = [];\n\n/**\n * Takes the array returned by $column.filterData and makes it available as `$selectData` on the `$scope`.\n *\n * The resulting `$selectData` array will contain an extra item that is suitable to represent the user\n * \"deselecting\" an item from a `<select>` tag\n *\n * This directive is is focused on providing a datasource to an `ngOptions` directive\n */\nfunction ngTableSelectFilterDs(): IDirective {\n // note: not using isolated or child scope \"by design\"\n // this is to allow this directive to be combined with other directives that do\n\n const directive = {\n restrict: 'A',\n controller: NgTableSelectFilterDsController\n };\n return directive;\n}\n\n/**\n * @private\n */\nexport class NgTableSelectFilterDsController {\n static $inject = ['$scope', '$parse', '$attrs', '$q'];\n $column: ColumnDef;\n constructor(\n private $scope: IScope & ScopeExtensions,\n $parse: IParseService,\n private $attrs: InputAttributes,\n private $q: IQService) {\n\n this.$column = $parse($attrs.ngTableSelectFilterDs)($scope);\n $scope.$watch<SelectData | undefined>(\n () => this.$column && this.$column.data,\n () => { this.bindDataSource(); });\n }\n private bindDataSource() {\n this.getSelectListData(this.$column).then(data => {\n if (data && !this.hasEmptyOption(data)) {\n data.unshift({ id: '', title: '' });\n }\n data = data || [];\n this.$scope.$selectData = data;\n });\n }\n\n private hasEmptyOption(data: SelectOption[]) {\n let isMatch = false;\n for (let i = 0; i < data.length; i++) {\n const item = data[i];\n if (item && item.id === '') {\n isMatch = true;\n break;\n }\n }\n return isMatch;\n }\n\n private getSelectListData($column: ColumnDef) {\n const dataInput = $column.data;\n let result: IPromise<SelectOption[]> | SelectOption[] | undefined;\n if (typeof dataInput === 'function') {\n result = dataInput();\n } else {\n result = dataInput;\n }\n return this.$q.when<SelectOption[] | undefined>(result);\n }\n}\nexport { ngTableSelectFilterDs };\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableSelectFilterDs.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nconst templateUrl = require('./sorterRow.html');\n\nngTableSorterRow.$inject = [];\n\n/**\n * directive that renders the sorting header row for a table \n * @ngdoc directive\n * @example\n * ```html\n * <ng-table-sorter-row></ng-table-sorter-row>\n * ```\n */\nexport function ngTableSorterRow(){\n const directive = {\n restrict: 'E',\n replace: true,\n templateUrl: templateUrl,\n scope: true,\n controller: 'ngTableSorterRowController',\n controllerAs: '$ctrl'\n };\n return directive;\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableSorterRow.directive.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\nimport { IAngularEvent } from 'angular';\nimport { SortDirection, SortingValues } from '../core';\nimport { ColumnDef } from './public-interfaces';\nimport { TableScope } from './ngTableController';\n\n/**\n * @private\n */\nexport interface IAugmentedMouseEvent extends IAngularEvent {\n ctrlKey: boolean;\n metaKey: boolean;\n}\n/**\n * Controller for the {@link ngTableSorterRow ngTableSorterRow} directive\n */\nexport class NgTableSorterRowController<T> {\n static $inject = ['$scope'];\n constructor(private $scope: TableScope<T>) {}\n\n sortBy($column: ColumnDef, event: IAugmentedMouseEvent) {\n const parsedSortable = $column.sortable && $column.sortable();\n if (!parsedSortable || typeof parsedSortable !== 'string') {\n return;\n } else {\n const defaultSort = this.$scope.params.settings().defaultSort;\n const inverseSort: SortDirection = (defaultSort === 'asc' ? 'desc' : 'asc');\n const sorting = this.$scope.params.sorting() && this.$scope.params.sorting()[parsedSortable] && (this.$scope.params.sorting()[parsedSortable] === defaultSort);\n const sortingParams: SortingValues = (event.ctrlKey || event.metaKey) ? this.$scope.params.sorting() : {};\n sortingParams[parsedSortable] = (sorting ? inverseSort : defaultSort);\n this.$scope.params.parameters({\n sorting: sortingParams\n });\n }\n\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/browser/ngTableSorterRowController.ts","export type DataSettingsPartial = Partial<DataSettings>;\n\nexport class DataSettings {\n applyFilter = true;\n applyPaging = true;\n applySort = true;\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/data/dataSettings.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport * as ng1 from 'angular';\nimport { IFilterFilter, IFilterOrderBy, IFilterService, IPromise, IServiceProvider} from 'angular';\nimport { FilterFunc } from '../filtering';\nimport { NgTableParams } from '../ngTableParams';\nimport { NgTableEventsChannel } from '../ngTableEventsChannel';\n\n\n/**\n * A default implementation of the getData function that will apply the `filter`, `orderBy` and\n * paging values from the {@link NgTableParams} instance supplied to the data array supplied.\n *\n * A call to this function will:\n * - return the resulting array\n * - assign the total item count after filtering to the `total` of the `NgTableParams` instance supplied\n */\nexport interface DefaultGetData<T> {\n (data: T[] | undefined, params: NgTableParams<T>): T[];\n /**\n * Convenience function that this service will use to apply paging to the data rows.\n *\n * Returns a slice of rows from the `data` array supplied and sets the `NgTableParams.total()`\n * on the `params` instance supplied to `data.length`\n */\n applyPaging(data: T[], params: NgTableParams<any>): T[],\n /**\n * Returns a reference to the function that this service will use to filter data rows\n */\n getFilterFn(params: NgTableParams<T>): FilterFunc<T>,\n /**\n * Returns a reference to the function that this service will use to sort data rows\n */\n getOrderByFn(params?: NgTableParams<T>): IFilterOrderBy\n}\n\n/**\n * Implementation of the {@link DefaultGetDataProvider} interface\n */\nexport class NgTableDefaultGetDataProvider implements IServiceProvider {\n /**\n * The name of a angular filter that knows how to apply the values returned by\n * `NgTableParams.filter()` to restrict an array of data.\n * (defaults to the angular `filter` filter service)\n */\n filterFilterName = 'filter';\n /**\n * The name of a angular filter that knows how to apply the values returned by\n * `NgTableParams.orderBy()` to sort an array of data.\n * (defaults to the angular `orderBy` filter service)\n */\n sortingFilterName = 'orderBy';\n $get: ($filter: IFilterService, ngTableEventsChannel: NgTableEventsChannel) => DefaultGetData<any>;\n constructor() {\n const provider = this;\n this.$get = ngTableDefaultGetData;\n\n ngTableDefaultGetData.$inject = ['$filter', 'ngTableEventsChannel'];\n\n function ngTableDefaultGetData<T>($filter: IFilterService, ngTableEventsChannel: NgTableEventsChannel): DefaultGetData<T> {\n\n (getData as DefaultGetData<T>).applyPaging = applyPaging;\n (getData as DefaultGetData<T>).getFilterFn = getFilterFn;\n (getData as DefaultGetData<T>).getOrderByFn = getOrderByFn;\n\n return getData as DefaultGetData<T>;\n\n function getFilterFn(params: NgTableParams<T>): FilterFunc<T> {\n const filterOptions = params.settings().filterOptions;\n if (ng1.isFunction(filterOptions.filterFn)) {\n return filterOptions.filterFn;\n } else {\n return $filter<IFilterFilter>(filterOptions.filterFilterName || provider.filterFilterName);\n }\n }\n\n function getOrderByFn(params: NgTableParams<T>) {\n return $filter<IFilterOrderBy>(provider.sortingFilterName);\n }\n\n function applyFilter(data: T[], params: NgTableParams<T>): T[] {\n if (!params.hasFilter()) {\n return data;\n }\n\n const filter = params.filter(true);\n const filterKeys = Object.keys(filter);\n const parsedFilter = filterKeys.reduce((result, key) => {\n result = setPath(result, filter[key], key);\n return result;\n }, {});\n const filterFn = getFilterFn(params);\n return filterFn.call(params, data, parsedFilter, params.settings().filterOptions.filterComparator);\n }\n\n function applyPaging(data: T[], params: NgTableParams<any>): T[] {\n const pagedData = data.slice((params.page() - 1) * params.count(), params.page() * params.count());\n params.total(data.length); // set total for recalc pagination\n return pagedData;\n }\n\n function applySort(data: T[], params: NgTableParams<T>): T[] {\n const orderBy = params.orderBy();\n const orderByFn = getOrderByFn(params);\n return orderBy.length ? orderByFn(data, orderBy) : data;\n }\n\n function getData(data: T[], params: NgTableParams<T>): T[] {\n if (data == null) {\n return [];\n }\n\n const options = params.settings().dataOptions;\n\n const fData = options.applyFilter ? applyFilter(data, params) : data;\n ngTableEventsChannel.publishAfterDataFiltered(params, fData);\n\n const orderedData = options.applySort ? applySort(fData, params) : fData;\n ngTableEventsChannel.publishAfterDataSorted(params,orderedData);\n\n return options.applyPaging ? applyPaging(orderedData, params) : orderedData;\n }\n\n // Sets the value at any depth in a nested object based on the path\n // note: adapted from: underscore-contrib#setPath\n function setPath(obj: any, value: any, path: string) {\n const keys = path.split('.');\n const ret = obj;\n const lastKey = keys[keys.length - 1];\n let target = ret;\n\n const parentPathKeys = keys.slice(0, keys.length - 1);\n parentPathKeys.forEach(function (key) {\n if (!target.hasOwnProperty(key)) {\n target[key] = {};\n }\n target = target[key];\n });\n\n target[lastKey] = value;\n return ret;\n }\n }\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/data/ngTableDefaultGetData.ts","import { FilterComparator } from './filterComparator';\nimport { FilterFunc } from './filterFunc';\n\nexport type FilterLayout = 'stack' | 'horizontal';\n\nexport type FilterSettingsPartial<T> = Partial<FilterSettings<T>>\n\nexport class FilterSettings<T> {\n /**\n * Use this to determine how items are matched against the filter values.\n * This setting is identical to the `comparator` parameter supported by the angular\n * `$filter` filter service\n *\n * Defaults to `undefined` which will result in a case insensitive susbstring match when\n * `DefaultGetData` service is supplying the implementation for the\n * `Settings.getData` function\n */\n filterComparator?: FilterComparator<T> = undefined; // look for a substring match in case insensitive way\n /**\n * A duration to wait for the user to stop typing before applying the filter.\n * Note: this delay will NOT be applied when *small* managed inmemory arrays are supplied as a \n * `SettingsPartial.dataset` argument to `NgTableParams.settings`.\n */\n filterDelay = 500;\n /**\n * The number of elements up to which a managed inmemory array is considered small\n */\n filterDelayThreshold: number | null = 10000;\n /**\n * Overrides `DefaultGetDataProvider.filterFilterName`.\n * The value supplied should be the name of the angular `$filter` service that will be selected to perform\n * the actual filter logic.\n */\n filterFilterName?: string = undefined;\n /**\n * Tells `DefaultGetData` to use this function supplied to perform the filtering instead of selecting an angular $filter.\n */\n filterFn?: FilterFunc<T> = undefined;\n /**\n * The layout to use when multiple html templates are to rendered in a single table header column.\n */\n filterLayout: FilterLayout = 'stack';\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/filtering/filterSettings.ts","import { IQService } from 'angular';\nimport * as ng1 from 'angular';\nimport { convertSortToOrderBy, isGroupingFun } from '../util';\nimport { NgTableParams, } from '../ngTableParams';\nimport { DataRowGroup, DefaultGetData, GetDataFunc } from '../data';\nimport { GetGroupFunc, Grouping, GroupingFunc, GroupSort } from './';\nimport { SortingValues } from '../sorting';\n\nngTableDefaultGetGroups.$inject = ['$q', 'ngTableDefaultGetData'];\n\n/**\n * Implementation of the {@link DefaultGetData} interface\n * \n * @ngdoc service\n */\nexport function ngTableDefaultGetGroups<T>($q: IQService, ngTableDefaultGetData: DefaultGetData<DataRowGroup<T>>): GetGroupFunc<T> {\n\n return getGroups;\n\n function getGroups(params: NgTableParams<T>) {\n\n const group = params.group();\n let groupFn: GroupingFunc<T>;\n let sortDirection: GroupSort | undefined;\n if (isGroupingFun(group)) {\n groupFn = group;\n sortDirection = group.sortDirection;\n } else {\n // currently support for only one group implemented\n const groupField = Object.keys(group)[0];\n sortDirection = group[groupField];\n groupFn = item => {\n return getPath(item, groupField);\n };\n }\n\n const settings = params.settings();\n const originalDataOptions = settings.dataOptions;\n settings.dataOptions = ng1.extend({}, originalDataOptions, { applyPaging: false });\n const getData: GetDataFunc<T> = settings.getData;\n const gotData = $q.when(getData(params));\n return gotData.then(data => {\n const groups: { [name: string]: DataRowGroup<T> } = {};\n ng1.forEach(data, item => {\n const groupName = groupFn(item);\n groups[groupName] = groups[groupName] || {\n data: [],\n $hideRows: !settings.groupOptions.isExpanded,\n value: groupName\n };\n groups[groupName].data.push(item);\n });\n let result: DataRowGroup<T>[] = [];\n for (const i in groups) {\n result.push(groups[i]);\n }\n if (sortDirection) {\n const orderByFn = ngTableDefaultGetData.getOrderByFn();\n const orderBy = convertSortToOrderBy({\n value: sortDirection\n });\n result = orderByFn(result, orderBy);\n }\n\n return ngTableDefaultGetData.applyPaging(result, params);\n }).finally(() => {\n // restore the real options\n settings.dataOptions = originalDataOptions;\n });\n }\n}\n\n\n/**\n * @private\n */\nfunction getPath(obj: { [name: string]: any }, ks: string | string[]): any {\n // origianl source https://github.com/documentcloud/underscore-contrib\n\n let keys: string[];\n if (typeof ks === \"string\") {\n keys = ks.split(\".\");\n } else {\n keys = ks;\n }\n\n // If we have reached an undefined property\n // then stop executing and return undefined\n if (obj === undefined) return void 0;\n\n // If the path array has no more elements, we've reached\n // the intended property and return its value\n if (keys.length === 0) return obj;\n\n // If we still have elements in the path array and the current\n // value is null, stop executing and return undefined\n if (obj === null) return void 0;\n\n return getPath(obj[keys[0]], keys.slice(1));\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/grouping/ngTableDefaultGetGroups.ts","/**\n * ngTable: Table + Angular JS\n *\n * @author Vitalii Savchuk <[email protected]>\n * @url https://github.com/esvit/ng-table/\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\n */\n\nimport { ParamValuesPartial } from './ngTableParams';\nimport { SettingsPartial } from './ngTableSettings';\n\n\n/**\n * An angular value object that allow for overriding of the initial default values used when constructing\n * an instance of `NgTableParams`\n */\nexport interface Defaults {\n params?: ParamValuesPartial<any>;\n settings?: SettingsPartial<any>\n}\n\n/**\n * Default values for ngTable\n */\nexport let ngTableDefaults : Defaults = {\n params: {},\n settings: {}\n};\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/core/ngTableDefaults.ts","import * as ng1 from 'angular';\n\n/**\n * @private\n */\nexport function assignPartialDeep<T extends TPartial, TPartial>(\n destination: T, \n partial: TPartial,\n optionalPropSelector: (key: string, destination: T) => boolean = () => false,\n customizer: (destValue: any, srcValue: any, key: string) => any = () => undefined\n ) {\n const keys = Object.keys(partial);\n for(const key of keys) {\n let srcVal = partial[key];\n if (srcVal === undefined) {\n if (optionalPropSelector(key, destination)){\n destination[key] = srcVal;\n } else {\n // don't assign undefined to destination\n }\n continue;\n }\n\n const destVal = destination[key];\n const customVal = customizer(destVal, srcVal, key);\n if (customVal !== undefined){\n destination[key] = customVal;\n } else if (ng1.isArray(srcVal)) {\n destination[key] = [...srcVal];\n } else if (!ng1.isObject(srcVal)) {\n destination[key] = srcVal;\n } else {\n destination[key] = assignPartialDeep(destVal, srcVal);\n }\n }\n return destination;\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/shared/assign-partial-deep.ts","export interface InitializedClass {\n new(...args: any[]): any;\n isInitialized: boolean;\n}\n\n/**\n * @private\n */\nexport function checkClassInit(clazz: InitializedClass ) {\n if (!clazz.isInitialized) {\n throw new Error('Class used before initialized. Hint: it is only safe to use this class after all run blocks (ng 1) / app initializers (ng 2) have executed.');\n }\n}\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./src/shared/check-class-init.ts","var path = 'ng-table/filterRow.html';\nvar html = \"<tr ng-show=show_filter class=ng-table-filters> <th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\" ng-class=\\\"params.settings().filterOptions.filterLayout === 'horizontal' ? 'filter-horizontal' : ''\\\"> <div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\" ng-include=$ctrl.config.getTemplateUrl(filter) class=filter-cell ng-class=\\\"[$ctrl.getFilterCellCss($column.filter(this), params.settings().filterOptions.filterLayout), $last ? 'last' : '']\\\"> </div> </th> </tr> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/filterRow.html\n// module id = 35\n// module chunks = 0","var path = 'ng-table/filters/number.html';\nvar html = \"<input type=number name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class=\\\"input-filter form-control\\\" placeholder=\\\"{{getFilterPlaceholderValue(filter, name)}}\\\"/> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/filters/number.html\n// module id = 36\n// module chunks = 0","var path = 'ng-table/filters/select-multiple.html';\nvar html = \"<select ng-options=\\\"data.id as data.title for data in $column.data\\\" ng-disabled=$filterRow.disabled multiple=multiple ng-multiple=true ng-model=params.filter()[name] class=\\\"filter filter-select-multiple form-control\\\" name={{name}}> </select> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/filters/select-multiple.html\n// module id = 37\n// module chunks = 0","var path = 'ng-table/filters/select.html';\nvar html = \"<select ng-options=\\\"data.id as data.title for data in $selectData\\\" ng-table-select-filter-ds=$column ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class=\\\"filter filter-select form-control\\\" name={{name}}> <option style=display:none value=\\\"\\\"></option> </select> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/filters/select.html\n// module id = 38\n// module chunks = 0","var path = 'ng-table/filters/text.html';\nvar html = \"<input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class=\\\"input-filter form-control\\\" placeholder=\\\"{{getFilterPlaceholderValue(filter, name)}}\\\"/> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/filters/text.html\n// module id = 39\n// module chunks = 0","var path = 'ng-table/groupRow.html';\nvar html = \"<tr ng-if=params.hasGroup() ng-show=$groupRow.show class=ng-table-group-header> <th colspan={{$ctrl.getVisibleColumns().length}} class=sortable ng-class=\\\"{\\n 'sort-asc': params.hasGroup($selGroup, 'asc'),\\n 'sort-desc':params.hasGroup($selGroup, 'desc')\\n }\\\"> <a href=\\\"\\\" ng-click=\\\"isSelectorOpen = !isSelectorOpen\\\" class=ng-table-group-selector> <strong class=sort-indicator>{{$selGroupTitle}}</strong> <button class=\\\"btn btn-default btn-xs ng-table-group-close\\\" ng-click=\\\"$groupRow.show = false; $event.preventDefault(); $event.stopPropagation();\\\"> <span class=\\\"glyphicon glyphicon-remove\\\"></span> </button> <button class=\\\"btn btn-default btn-xs ng-table-group-toggle\\\" ng-click=\\\"$ctrl.toggleDetail(); $event.preventDefault(); $event.stopPropagation();\\\"> <span class=glyphicon ng-class=\\\"{\\n 'glyphicon-resize-small': params.settings().groupOptions.isExpanded,\\n 'glyphicon-resize-full': !params.settings().groupOptions.isExpanded\\n }\\\"></span> </button> </a> <div class=list-group ng-if=isSelectorOpen> <a href=\\\"\\\" class=list-group-item ng-repeat=\\\"group in $ctrl.getGroupables()\\\" ng-click=$ctrl.groupBy(group)> <strong>{{ $ctrl.getGroupTitle(group)}}</strong> <strong ng-class=\\\"$ctrl.isSelectedGroup(group) && 'sort-indicator'\\\"></strong> </a> </div> </th> </tr> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/groupRow.html\n// module id = 40\n// module chunks = 0","var path = 'ng-table/header.html';\nvar html = \"<ng-table-group-row></ng-table-group-row> <ng-table-sorter-row></ng-table-sorter-row> <ng-table-filter-row></ng-table-filter-row> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/header.html\n// module id = 41\n// module chunks = 0","var path = 'ng-table/pager.html';\nvar html = \"<div class=\\\"ng-cloak ng-table-pager\\\" ng-if=params.data.length> <div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right\\\"> <button ng-repeat=\\\"count in params.settings().counts\\\" type=button ng-class=\\\"{'active':params.count() == count}\\\" ng-click=params.count(count) class=\\\"btn btn-default\\\"> <span ng-bind=count></span> </button> </div> <ul ng-if=pages.length class=\\\"pagination ng-table-pagination\\\"> <li class=page-item ng-class=\\\"{'disabled': !page.active && !page.current, 'active': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type> <a class=page-link ng-switch-when=prev ng-click=params.page(page.number) href=\\\"\\\">«</a> <a class=page-link ng-switch-when=first ng-click=params.page(page.number) href=\\\"\\\"><span ng-bind=page.number></span></a> <a class=page-link ng-switch-when=page ng-click=params.page(page.number) href=\\\"\\\"><span ng-bind=page.number></span></a> <a class=page-link ng-switch-when=more ng-click=params.page(page.number) href=\\\"\\\">…</a> <a class=page-link ng-switch-when=last ng-click=params.page(page.number) href=\\\"\\\"><span ng-bind=page.number></span></a> <a class=page-link ng-switch-when=next ng-click=params.page(page.number) href=\\\"\\\">»</a> </li> </ul> </div> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/pager.html\n// module id = 42\n// module chunks = 0","var path = 'ng-table/sorterRow.html';\nvar html = \"<tr class=ng-table-sort-header> <th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{\\n 'sortable': $column.sortable(this),\\n 'sort-asc': params.sorting()[$column.sortable(this)]=='asc',\\n 'sort-desc': params.sorting()[$column.sortable(this)]=='desc'\\n }\\\" ng-click=\\\"$ctrl.sortBy($column, $event)\\\" ng-if=$column.show(this) ng-init=\\\"template = $column.headerTemplateURL(this)\\\" class=\\\"header {{$column.class(this)}}\\\"> <div ng-if=!template class=ng-table-header ng-class=\\\"{'sort-indicator': params.settings().sortingIndicator == 'div'}\\\"> <span ng-bind=$column.title(this) ng-class=\\\"{'sort-indicator': params.settings().sortingIndicator == 'span'}\\\"></span> </div> <div ng-if=template ng-include=template></div> </th> </tr> \";\nvar angular = require('angular');\nangular.module('ng').run(['$templateCache', function(c) { c.put(path, html) }]);\nmodule.exports = path;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/browser/sorterRow.html\n// module id = 43\n// module chunks = 0","import * as ng1 from 'angular';\nimport { ngTableCoreModule } from './src/core';\nimport { ngTableBrowserModule } from './src/browser';\n\nconst ngTableModule = ng1.module('ngTable', [ngTableCoreModule.name, ngTableBrowserModule.name]);\n\nexport { ngTableModule };\nexport * from './src/core';\nexport * from './src/browser';\n\n\n// WEBPACK FOOTER //\n// ./~/angular1-template-loader!./index.ts"],"sourceRoot":""}