@easyquery/enterprise 7.2.0-rc02 → 7.2.0-rc06
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/eq.enterprise.js +1116 -1009
- package/dist/browser/eq.enterprise.js.map +1 -1
- package/dist/browser/eq.enterprise.min.js +3 -3
- package/dist/browser/eq.enterprise.min.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.js +29 -19
- package/dist/bundles/easyquery.enterprise.js.map +1 -1
- package/dist/bundles/easyquery.enterprise.min.js +1 -1
- package/dist/bundles/easyquery.enterprise.min.js.map +1 -1
- package/dist/lib/data/data_table_aggr_calculator.js +13 -11
- package/dist/lib/data/data_table_aggr_calculator.js.map +1 -1
- package/dist/lib/data/eqs_aggr_calculator.js +0 -1
- package/dist/lib/data/eqs_aggr_calculator.js.map +1 -1
- package/dist/lib/extensions.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* EasyQuery.JS Enterprise 7.2.0-
|
|
3
|
-
* Copyright
|
|
2
|
+
* EasyQuery.JS Enterprise 7.2.0-rc06 (https://korzh.com/easyquery/javascript)
|
|
3
|
+
* Copyright 2022 Korzh.com. All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* EasyQuery.JS commercial licenses may be obtained at
|
|
6
6
|
* https://korzh.com/easyquery/javascript#LIC or as a part of
|
|
@@ -91,7 +91,7 @@ window["easyquery"] =
|
|
|
91
91
|
/******/
|
|
92
92
|
/******/
|
|
93
93
|
/******/ // Load entry module and return exports
|
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
94
|
+
/******/ return __webpack_require__(__webpack_require__.s = 112);
|
|
95
95
|
/******/ })
|
|
96
96
|
/************************************************************************/
|
|
97
97
|
/******/ ([
|
|
@@ -158,7 +158,7 @@ var EditorTag = {
|
|
|
158
158
|
};
|
|
159
159
|
//# sourceMappingURL=editor_tag.js.map
|
|
160
160
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/http/http_method.js
|
|
161
|
-
var http_method = __webpack_require__(
|
|
161
|
+
var http_method = __webpack_require__(36);
|
|
162
162
|
|
|
163
163
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/core/dist/lib/http/http_request.js
|
|
164
164
|
var http_request = __webpack_require__(57);
|
|
@@ -295,6 +295,7 @@ var meta_entity_MetaEntityAttr = /** @class */ (function () {
|
|
|
295
295
|
this.lookupEntity = dto.lent;
|
|
296
296
|
this.dataAttr = dto.dattr;
|
|
297
297
|
this.lookupDataAttr = dto.ldattr;
|
|
298
|
+
this.defaultValue = dto.defVal;
|
|
298
299
|
this.isNullable = utils["a" /* utils */].getIfDefined(dto.nul, this.isNullable);
|
|
299
300
|
this.isEditable = utils["a" /* utils */].getIfDefined(dto.ied, this.isEditable);
|
|
300
301
|
this.showOnView = utils["a" /* utils */].getIfDefined(dto.ivis || dto.sov, this.showOnView);
|
|
@@ -1349,10 +1350,10 @@ __webpack_require__.d(__webpack_exports__, "DialogFooterAlignment", function() {
|
|
|
1349
1350
|
__webpack_require__.d(__webpack_exports__, "dialogs", function() { return /* binding */ dialogs; });
|
|
1350
1351
|
|
|
1351
1352
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/grid/easy_grid.js
|
|
1352
|
-
var easy_grid = __webpack_require__(
|
|
1353
|
+
var easy_grid = __webpack_require__(106);
|
|
1353
1354
|
|
|
1354
1355
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/grid/easy_grid_options.js
|
|
1355
|
-
var easy_grid_options = __webpack_require__(
|
|
1356
|
+
var easy_grid_options = __webpack_require__(34);
|
|
1356
1357
|
|
|
1357
1358
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/grid/easy_grid_columns.js
|
|
1358
1359
|
var easy_grid_columns = __webpack_require__(21);
|
|
@@ -2014,7 +2015,7 @@ var default_date_time_picker_DefaultDateTimePicker = /** @class */ (function (_s
|
|
|
2014
2015
|
var browser_utils = __webpack_require__(68);
|
|
2015
2016
|
|
|
2016
2017
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/utils/drag_manager.js
|
|
2017
|
-
var drag_manager = __webpack_require__(
|
|
2018
|
+
var drag_manager = __webpack_require__(37);
|
|
2018
2019
|
|
|
2019
2020
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/easydata/easydata.js/packs/ui/dist/lib/utils/mask.js
|
|
2020
2021
|
var mask = __webpack_require__(69);
|
|
@@ -2102,6 +2103,7 @@ __webpack_require__.d(__webpack_exports__, "Operand", function() { return /* ree
|
|
|
2102
2103
|
__webpack_require__.d(__webpack_exports__, "EqValueEditor", function() { return /* reexport */ value_editor["a" /* EqValueEditor */]; });
|
|
2103
2104
|
__webpack_require__.d(__webpack_exports__, "EqAction", function() { return /* reexport */ EqAction; });
|
|
2104
2105
|
__webpack_require__.d(__webpack_exports__, "EqModelLoader", function() { return /* reexport */ model_loader["a" /* EqModelLoader */]; });
|
|
2106
|
+
__webpack_require__.d(__webpack_exports__, "InMemoryModelStorage", function() { return /* reexport */ model_storage["a" /* InMemoryModelStorage */]; });
|
|
2105
2107
|
__webpack_require__.d(__webpack_exports__, "BrowserQueryStorage", function() { return /* reexport */ query_storage["a" /* BrowserQueryStorage */]; });
|
|
2106
2108
|
__webpack_require__.d(__webpack_exports__, "EqContext", function() { return /* reexport */ context_EqContext; });
|
|
2107
2109
|
__webpack_require__.d(__webpack_exports__, "Widget", function() { return /* reexport */ widget_Widget; });
|
|
@@ -2410,6 +2412,7 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
2410
2412
|
this.httpClient = new public_api["HttpClient"]();
|
|
2411
2413
|
this.httpClient.defaultHeaders['x-eqjs-version'] = '7.2.0';
|
|
2412
2414
|
this.modelResolver = function (_) { return new data_model["a" /* DataModel */](); };
|
|
2415
|
+
this.modelStorageResolver = null;
|
|
2413
2416
|
this.queryResolver = function (context) { return new query_query["b" /* Query */](context.getModel()); };
|
|
2414
2417
|
this.modelLoaderResolver = function (context) { return new EqServerModelLoader(context); };
|
|
2415
2418
|
this.queryStorageResolver = function (context) { return new query_storage["a" /* BrowserQueryStorage */](context); };
|
|
@@ -2420,6 +2423,7 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
2420
2423
|
this.aggrCalculatoResolver = function (context) { return new eq_aggr_container["a" /* DefaultAggregatesCalculator */](context); };
|
|
2421
2424
|
}
|
|
2422
2425
|
EqServiceProvider.prototype.reset = function () {
|
|
2426
|
+
this.modelStorage = null;
|
|
2423
2427
|
this.modelLoader = null;
|
|
2424
2428
|
this.queryStorage = null;
|
|
2425
2429
|
this.querySynchronizer = null;
|
|
@@ -2448,6 +2452,15 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
2448
2452
|
}
|
|
2449
2453
|
return this.modelLoader;
|
|
2450
2454
|
};
|
|
2455
|
+
EqServiceProvider.prototype.getModelStorage = function () {
|
|
2456
|
+
if (!this.modelStorage) {
|
|
2457
|
+
if (!this.modelStorageResolver) {
|
|
2458
|
+
throw 'ModelStorageResolver is not defined';
|
|
2459
|
+
}
|
|
2460
|
+
this.modelStorage = this.modelStorageResolver(this.context);
|
|
2461
|
+
}
|
|
2462
|
+
return this.modelStorage;
|
|
2463
|
+
};
|
|
2451
2464
|
EqServiceProvider.prototype.getQueryStorage = function () {
|
|
2452
2465
|
if (!this.queryStorage) {
|
|
2453
2466
|
if (!this.queryStorageResolver) {
|
|
@@ -2511,6 +2524,9 @@ var eq_services_EqServiceProvider = /** @class */ (function () {
|
|
|
2511
2524
|
EqServiceProvider.prototype.registerModelLoaderResolver = function (resolver) {
|
|
2512
2525
|
this.modelLoaderResolver = resolver;
|
|
2513
2526
|
};
|
|
2527
|
+
EqServiceProvider.prototype.registerModelStorageResolver = function (resolver) {
|
|
2528
|
+
this.modelStorageResolver = resolver;
|
|
2529
|
+
};
|
|
2514
2530
|
EqServiceProvider.prototype.registerQueryStorageResolver = function (resolver) {
|
|
2515
2531
|
this.queryStorageResolver = resolver;
|
|
2516
2532
|
};
|
|
@@ -2609,6 +2625,9 @@ var EqAction;
|
|
|
2609
2625
|
EqAction["UploadQueryFile"] = "UploadQueryFile";
|
|
2610
2626
|
})(EqAction || (EqAction = {}));
|
|
2611
2627
|
//# sourceMappingURL=eq_actions.js.map
|
|
2628
|
+
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/core/dist/lib/main/model_storage.js
|
|
2629
|
+
var model_storage = __webpack_require__(105);
|
|
2630
|
+
|
|
2612
2631
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/core/dist/lib/query/query_events.js
|
|
2613
2632
|
var query_events = __webpack_require__(14);
|
|
2614
2633
|
|
|
@@ -2913,10 +2932,14 @@ var context_EqContext = /** @class */ (function () {
|
|
|
2913
2932
|
}
|
|
2914
2933
|
if (options.endpoint) {
|
|
2915
2934
|
this.baseEndpoint = options.endpoint;
|
|
2916
|
-
console.warn('The `endpoint` option is deprecated
|
|
2935
|
+
console.warn('The `endpoint` option is deprecated.\n'
|
|
2917
2936
|
+ 'Please use `context.useEndpoint(endpointURL)` function instead.');
|
|
2918
2937
|
}
|
|
2919
2938
|
this.setDefaultEndpoints(this.baseEndpoint);
|
|
2939
|
+
if (options.modelStorageResolver) {
|
|
2940
|
+
var eqServices = this.getServices();
|
|
2941
|
+
eqServices.registerModelStorageResolver(options.modelStorageResolver);
|
|
2942
|
+
}
|
|
2920
2943
|
this.loadQueryOnStart = false;
|
|
2921
2944
|
if (options.loadQueryOnStart) {
|
|
2922
2945
|
this.loadQueryOnStart = options.loadQueryOnStart;
|
|
@@ -3785,6 +3808,7 @@ var context_EqContext = /** @class */ (function () {
|
|
|
3785
3808
|
_this.resultContent = result;
|
|
3786
3809
|
if (result.resultSet) {
|
|
3787
3810
|
_this.resultTable.clear();
|
|
3811
|
+
_this.resultTable.id = _this.query.getId();
|
|
3788
3812
|
var resultSet = result.resultSet;
|
|
3789
3813
|
for (var _i = 0, _a = resultSet.cols; _i < _a.length; _i++) {
|
|
3790
3814
|
var col = _a[_i];
|
|
@@ -4261,6 +4285,7 @@ addEasyQueryCoreTexts();
|
|
|
4261
4285
|
|
|
4262
4286
|
|
|
4263
4287
|
|
|
4288
|
+
|
|
4264
4289
|
|
|
4265
4290
|
|
|
4266
4291
|
//for backward compatibility
|
|
@@ -4706,6 +4731,10 @@ var DomSelectElementBuilder = /** @class */ (function (_super) {
|
|
|
4706
4731
|
this.element.appendChild(option);
|
|
4707
4732
|
return this;
|
|
4708
4733
|
};
|
|
4734
|
+
DomSelectElementBuilder.prototype.value = function (value) {
|
|
4735
|
+
this.element.value = value;
|
|
4736
|
+
return this;
|
|
4737
|
+
};
|
|
4709
4738
|
return DomSelectElementBuilder;
|
|
4710
4739
|
}(DomElementBuilder));
|
|
4711
4740
|
|
|
@@ -8198,7 +8227,7 @@ var qp_editable_part = __webpack_require__(10);
|
|
|
8198
8227
|
var popup_menu = __webpack_require__(9);
|
|
8199
8228
|
|
|
8200
8229
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/condition_renderer.js
|
|
8201
|
-
var condition_renderer = __webpack_require__(
|
|
8230
|
+
var condition_renderer = __webpack_require__(35);
|
|
8202
8231
|
|
|
8203
8232
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/condition_group_renderer.js
|
|
8204
8233
|
var condition_group_renderer = __webpack_require__(78);
|
|
@@ -8207,7 +8236,7 @@ var condition_group_renderer = __webpack_require__(78);
|
|
|
8207
8236
|
var input_expression_renderer = __webpack_require__(80);
|
|
8208
8237
|
|
|
8209
8238
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/attribute_expression_renderer.js
|
|
8210
|
-
var attribute_expression_renderer = __webpack_require__(
|
|
8239
|
+
var attribute_expression_renderer = __webpack_require__(52);
|
|
8211
8240
|
|
|
8212
8241
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/addrow_renderer.js
|
|
8213
8242
|
var addrow_renderer = __webpack_require__(81);
|
|
@@ -9596,8 +9625,6 @@ var Query = /** @class */ (function () {
|
|
|
9596
9625
|
}
|
|
9597
9626
|
this.setDefaultName();
|
|
9598
9627
|
this.description = "";
|
|
9599
|
-
this.modelId = "";
|
|
9600
|
-
this.modelName = "";
|
|
9601
9628
|
this.model = (model) ? model : new _dm_data_model__WEBPACK_IMPORTED_MODULE_2__[/* DataModel */ "a"]();
|
|
9602
9629
|
if (data) {
|
|
9603
9630
|
this.loadFromData(data);
|
|
@@ -9611,10 +9638,14 @@ var Query = /** @class */ (function () {
|
|
|
9611
9638
|
this.parentQuery = options.parent;
|
|
9612
9639
|
}
|
|
9613
9640
|
this.addChangedCallback(function (ev) {
|
|
9614
|
-
if (ev.data
|
|
9615
|
-
&& ev.data.
|
|
9641
|
+
if (ev.data
|
|
9642
|
+
&& ((ev.data.part & _query_events__WEBPACK_IMPORTED_MODULE_10__[/* QueryChangePart */ "b"].Columns) > 0)
|
|
9616
9643
|
&& !ev.data.aggregation) {
|
|
9617
|
-
_this.
|
|
9644
|
+
if (_this._enableAggregation && _this.updateAggregationSettings()) {
|
|
9645
|
+
_this.fireChangedEvent({
|
|
9646
|
+
part: _query_events__WEBPACK_IMPORTED_MODULE_10__[/* QueryChangePart */ "b"].Aggregation
|
|
9647
|
+
});
|
|
9648
|
+
}
|
|
9618
9649
|
}
|
|
9619
9650
|
});
|
|
9620
9651
|
}
|
|
@@ -9635,19 +9666,6 @@ var Query = /** @class */ (function () {
|
|
|
9635
9666
|
this.processQueryForAggregation();
|
|
9636
9667
|
var aggrCols = this.columns.filter(function (c) { return c.enabled
|
|
9637
9668
|
&& c.expr.tag == _types_expr_tag__WEBPACK_IMPORTED_MODULE_8__[/* ExprTag */ "a"].AggregateFunction; });
|
|
9638
|
-
// // query contains aggregate columns
|
|
9639
|
-
// if (aggrCols.length) {
|
|
9640
|
-
// for (const col of aggrCols) {
|
|
9641
|
-
// const attr = this.model.getAttributeById(col.expr.args[0].value);
|
|
9642
|
-
// this.changeColumnType(col, ExprTag.EntityAttribute, {
|
|
9643
|
-
// caption: this.model.getAttributeText(attr, `{attr}`)
|
|
9644
|
-
// });
|
|
9645
|
-
// }
|
|
9646
|
-
// this.fireChangedEvent({
|
|
9647
|
-
// part: QueryChangePart.Columns,
|
|
9648
|
-
// wasModified: true
|
|
9649
|
-
// });
|
|
9650
|
-
// }
|
|
9651
9669
|
}
|
|
9652
9670
|
if (!this._enableAggregation) {
|
|
9653
9671
|
this.aggrSettings.clear();
|
|
@@ -9656,6 +9674,40 @@ var Query = /** @class */ (function () {
|
|
|
9656
9674
|
enumerable: true,
|
|
9657
9675
|
configurable: true
|
|
9658
9676
|
});
|
|
9677
|
+
Query.prototype.updateAggregationSettings = function () {
|
|
9678
|
+
var hasChanged = false;
|
|
9679
|
+
var aggrSettings = this.getAggregationSettings();
|
|
9680
|
+
for (var i = aggrSettings.groups.length - 1; i >= 0; i--) {
|
|
9681
|
+
var group = aggrSettings.groups[i];
|
|
9682
|
+
var _loop_1 = function (j) {
|
|
9683
|
+
var colId = group.columns[j];
|
|
9684
|
+
if (!this_1.columns.find(function (col) { return col.id === colId; })) {
|
|
9685
|
+
group.columns.splice(j, 1);
|
|
9686
|
+
hasChanged = true;
|
|
9687
|
+
}
|
|
9688
|
+
};
|
|
9689
|
+
var this_1 = this;
|
|
9690
|
+
for (var j = group.columns.length - 1; j >= 0; j--) {
|
|
9691
|
+
_loop_1(j);
|
|
9692
|
+
}
|
|
9693
|
+
if (group.columns.length == 0) {
|
|
9694
|
+
aggrSettings.groups.slice(i, 1);
|
|
9695
|
+
}
|
|
9696
|
+
}
|
|
9697
|
+
var aggregates = aggrSettings.getAggregates();
|
|
9698
|
+
var _loop_2 = function (i) {
|
|
9699
|
+
var aggr = aggregates[i];
|
|
9700
|
+
if (!this_2.columns.find(function (col) { return col.id === aggr.colId; })) {
|
|
9701
|
+
aggregates.splice(i, 1);
|
|
9702
|
+
hasChanged = true;
|
|
9703
|
+
}
|
|
9704
|
+
};
|
|
9705
|
+
var this_2 = this;
|
|
9706
|
+
for (var i = aggregates.length - 1; i >= 0; i--) {
|
|
9707
|
+
_loop_2(i);
|
|
9708
|
+
}
|
|
9709
|
+
return hasChanged;
|
|
9710
|
+
};
|
|
9659
9711
|
Query.prototype.createSubQuery = function () {
|
|
9660
9712
|
return new Query(this.model);
|
|
9661
9713
|
};
|
|
@@ -11862,6 +11914,10 @@ var view_View = /** @class */ (function () {
|
|
|
11862
11914
|
View.prototype.fetchData = function (options) {
|
|
11863
11915
|
var _this = this;
|
|
11864
11916
|
options = options || { refresh: true };
|
|
11917
|
+
this.context.clearResult();
|
|
11918
|
+
//don't run fetch if the query is empty
|
|
11919
|
+
if (this.context.getQuery().isEmpty() && !this.resultOptions.fetchEmptyQueries)
|
|
11920
|
+
return;
|
|
11865
11921
|
this.showResultSpinner();
|
|
11866
11922
|
this.context.fetchData({
|
|
11867
11923
|
elasticPaging: options.elasticPaging,
|
|
@@ -12243,6 +12299,20 @@ var Operand = /** @class */ (function () {
|
|
|
12243
12299
|
/* 34 */
|
|
12244
12300
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12245
12301
|
|
|
12302
|
+
"use strict";
|
|
12303
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AutoResizeColumns; });
|
|
12304
|
+
var AutoResizeColumns;
|
|
12305
|
+
(function (AutoResizeColumns) {
|
|
12306
|
+
AutoResizeColumns[AutoResizeColumns["Always"] = 0] = "Always";
|
|
12307
|
+
AutoResizeColumns[AutoResizeColumns["Once"] = 1] = "Once";
|
|
12308
|
+
AutoResizeColumns[AutoResizeColumns["Never"] = 2] = "Never";
|
|
12309
|
+
})(AutoResizeColumns || (AutoResizeColumns = {}));
|
|
12310
|
+
//# sourceMappingURL=easy_grid_options.js.map
|
|
12311
|
+
|
|
12312
|
+
/***/ }),
|
|
12313
|
+
/* 35 */
|
|
12314
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12315
|
+
|
|
12246
12316
|
"use strict";
|
|
12247
12317
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ConditionAction; });
|
|
12248
12318
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ConditionRenderer; });
|
|
@@ -12765,7 +12835,7 @@ var SimpleConditionRenderer = /** @class */ (function (_super) {
|
|
|
12765
12835
|
//# sourceMappingURL=condition_renderer.js.map
|
|
12766
12836
|
|
|
12767
12837
|
/***/ }),
|
|
12768
|
-
/*
|
|
12838
|
+
/* 36 */
|
|
12769
12839
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12770
12840
|
|
|
12771
12841
|
"use strict";
|
|
@@ -12782,7 +12852,7 @@ var HttpMethod;
|
|
|
12782
12852
|
//# sourceMappingURL=http_method.js.map
|
|
12783
12853
|
|
|
12784
12854
|
/***/ }),
|
|
12785
|
-
/*
|
|
12855
|
+
/* 37 */
|
|
12786
12856
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12787
12857
|
|
|
12788
12858
|
"use strict";
|
|
@@ -13160,20 +13230,6 @@ var DragManager = /** @class */ (function () {
|
|
|
13160
13230
|
var eqDragManager = new DragManager();
|
|
13161
13231
|
//# sourceMappingURL=drag_manager.js.map
|
|
13162
13232
|
|
|
13163
|
-
/***/ }),
|
|
13164
|
-
/* 37 */
|
|
13165
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13166
|
-
|
|
13167
|
-
"use strict";
|
|
13168
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AutoResizeColumns; });
|
|
13169
|
-
var AutoResizeColumns;
|
|
13170
|
-
(function (AutoResizeColumns) {
|
|
13171
|
-
AutoResizeColumns[AutoResizeColumns["Always"] = 0] = "Always";
|
|
13172
|
-
AutoResizeColumns[AutoResizeColumns["Once"] = 1] = "Once";
|
|
13173
|
-
AutoResizeColumns[AutoResizeColumns["Never"] = 2] = "Never";
|
|
13174
|
-
})(AutoResizeColumns || (AutoResizeColumns = {}));
|
|
13175
|
-
//# sourceMappingURL=easy_grid_options.js.map
|
|
13176
|
-
|
|
13177
13233
|
/***/ }),
|
|
13178
13234
|
/* 38 */
|
|
13179
13235
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
@@ -15314,21 +15370,6 @@ var EasyGridWidget = /** @class */ (function (_super) {
|
|
|
15314
15370
|
this.grid.refresh();
|
|
15315
15371
|
};
|
|
15316
15372
|
EasyGridWidget.prototype.attachQueryObserver = function () {
|
|
15317
|
-
var _this = this;
|
|
15318
|
-
var query = this.getQuery();
|
|
15319
|
-
this.queryEventCallbackId = query.addChangedCallback(function (event) {
|
|
15320
|
-
//if something has changed, and that change is related to columns
|
|
15321
|
-
var edata = event.data;
|
|
15322
|
-
if (!edata || (edata.part != _easyquery_core__WEBPACK_IMPORTED_MODULE_0__["QueryChangePart"].Columns && edata.part != _easyquery_core__WEBPACK_IMPORTED_MODULE_0__["QueryChangePart"].All)) {
|
|
15323
|
-
return;
|
|
15324
|
-
}
|
|
15325
|
-
if (event.data.source == _this) {
|
|
15326
|
-
_this.grid.refresh();
|
|
15327
|
-
}
|
|
15328
|
-
else {
|
|
15329
|
-
_this.refresh();
|
|
15330
|
-
}
|
|
15331
|
-
});
|
|
15332
15373
|
};
|
|
15333
15374
|
EasyGridWidget.prototype.destroyCore = function () {
|
|
15334
15375
|
this.detachQueryObserver();
|
|
@@ -16584,577 +16625,104 @@ var Condition = /** @class */ (function () {
|
|
|
16584
16625
|
|
|
16585
16626
|
/***/ }),
|
|
16586
16627
|
/* 51 */
|
|
16587
|
-
/***/ (function(module,
|
|
16588
|
-
|
|
16589
|
-
"use strict";
|
|
16590
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AttributeExpressionRenderer; });
|
|
16591
|
-
/* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
16592
|
-
/* harmony import */ var _easyquery_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
16593
|
-
/* harmony import */ var _easydata_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
16594
|
-
/* harmony import */ var _list_expression_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
|
|
16595
|
-
/* harmony import */ var _utils_browser_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
|
|
16596
|
-
/* harmony import */ var _types_qp_editable_part__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
|
|
16597
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
16598
|
-
var extendStatics = function (d, b) {
|
|
16599
|
-
extendStatics = Object.setPrototypeOf ||
|
|
16600
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16601
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
16602
|
-
return extendStatics(d, b);
|
|
16603
|
-
};
|
|
16604
|
-
return function (d, b) {
|
|
16605
|
-
extendStatics(d, b);
|
|
16606
|
-
function __() { this.constructor = d; }
|
|
16607
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16608
|
-
};
|
|
16609
|
-
})();
|
|
16610
|
-
|
|
16611
|
-
|
|
16612
|
-
|
|
16613
|
-
|
|
16614
|
-
|
|
16615
|
-
|
|
16616
|
-
var AttributeExpressionRenderer = /** @class */ (function (_super) {
|
|
16617
|
-
__extends(AttributeExpressionRenderer, _super);
|
|
16618
|
-
function AttributeExpressionRenderer(panel, expression, entitiesMenu, slot) {
|
|
16619
|
-
var _this = _super.call(this, panel, expression, null, slot) || this;
|
|
16620
|
-
_this.menu = entitiesMenu;
|
|
16621
|
-
return _this;
|
|
16622
|
-
}
|
|
16623
|
-
AttributeExpressionRenderer.prototype.renderEditor = function () {
|
|
16624
|
-
//create menu
|
|
16625
|
-
};
|
|
16626
|
-
AttributeExpressionRenderer.prototype.getLabelText = function () {
|
|
16627
|
-
var model = this.panel.getContext().getModel();
|
|
16628
|
-
var attrId = this.expression.value;
|
|
16629
|
-
var attrObj = attrId ? model.getAttributeByIdSafe(attrId) : null;
|
|
16630
|
-
var attrFormat = this.panel.options.attrElementFormat;
|
|
16631
|
-
return attrObj ? model.getAttributeText(attrObj, attrFormat) : this.getEmptyText();
|
|
16632
|
-
};
|
|
16633
|
-
AttributeExpressionRenderer.prototype.setValue = function (value, silent) {
|
|
16634
|
-
if (silent === void 0) { silent = false; }
|
|
16635
|
-
silent = silent && value !== this.expression.value;
|
|
16636
|
-
var result = _super.prototype.setValue.call(this, value, true);
|
|
16637
|
-
if (!silent) {
|
|
16638
|
-
this.expression.getParent().fireChangedEvent(_easyquery_core__WEBPACK_IMPORTED_MODULE_1__["ConditionPart"].EntityAttr | _easyquery_core__WEBPACK_IMPORTED_MODULE_1__["ConditionPart"].Operator);
|
|
16639
|
-
}
|
|
16640
|
-
return result;
|
|
16641
|
-
};
|
|
16642
|
-
AttributeExpressionRenderer.prototype.isEditable = function () {
|
|
16643
|
-
return !this.isReadOnly()
|
|
16644
|
-
&& ((this.panel.options.editableParts & _types_qp_editable_part__WEBPACK_IMPORTED_MODULE_5__[/* QPEditablePart */ "a"].Attribute) === _types_qp_editable_part__WEBPACK_IMPORTED_MODULE_5__[/* QPEditablePart */ "a"].Attribute);
|
|
16645
|
-
};
|
|
16646
|
-
AttributeExpressionRenderer.prototype.getEmptyText = function () {
|
|
16647
|
-
return this.panel.options.emptyTextAttribute || _easydata_core__WEBPACK_IMPORTED_MODULE_0__["i18n"].getText('MsgEmptyAttrValue');
|
|
16648
|
-
};
|
|
16649
|
-
AttributeExpressionRenderer.prototype.getClassesToAdd = function () {
|
|
16650
|
-
return this.cssPrefix + "-condelement " + this.cssPrefix + "-attrelement";
|
|
16651
|
-
};
|
|
16652
|
-
AttributeExpressionRenderer.prototype.adjustWidth = function () {
|
|
16653
|
-
if (_utils_browser_utils__WEBPACK_IMPORTED_MODULE_4__[/* browserUtils */ "a"].isMobileMode()) {
|
|
16654
|
-
return;
|
|
16655
|
-
}
|
|
16656
|
-
var elWidth = this.element.clientWidth;
|
|
16657
|
-
var parWidth = this.element.parentElement.clientWidth;
|
|
16658
|
-
if (elWidth > parWidth / 2) {
|
|
16659
|
-
Object(_easydata_ui__WEBPACK_IMPORTED_MODULE_2__["domel"])(this.element)
|
|
16660
|
-
.addClass(this.cssPrefix + "-attrelement-wide");
|
|
16661
|
-
}
|
|
16662
|
-
};
|
|
16663
|
-
return AttributeExpressionRenderer;
|
|
16664
|
-
}(_list_expression_renderer__WEBPACK_IMPORTED_MODULE_3__[/* ListExpressionRenderer */ "b"]));
|
|
16665
|
-
|
|
16666
|
-
//# sourceMappingURL=attribute_expression_renderer.js.map
|
|
16628
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
16667
16629
|
|
|
16668
|
-
|
|
16669
|
-
|
|
16670
|
-
|
|
16630
|
+
/* WEBPACK VAR INJECTION */(function(process, global) {/*!
|
|
16631
|
+
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
16632
|
+
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
16633
|
+
* @license Licensed under MIT license
|
|
16634
|
+
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
16635
|
+
* @version v4.2.8+1e68dce6
|
|
16636
|
+
*/
|
|
16671
16637
|
|
|
16672
|
-
|
|
16673
|
-
|
|
16674
|
-
|
|
16675
|
-
|
|
16676
|
-
/* harmony import */ var _chart_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
|
|
16677
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
16678
|
-
var extendStatics = function (d, b) {
|
|
16679
|
-
extendStatics = Object.setPrototypeOf ||
|
|
16680
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
16681
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
16682
|
-
return extendStatics(d, b);
|
|
16683
|
-
};
|
|
16684
|
-
return function (d, b) {
|
|
16685
|
-
extendStatics(d, b);
|
|
16686
|
-
function __() { this.constructor = d; }
|
|
16687
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
16688
|
-
};
|
|
16689
|
-
})();
|
|
16690
|
-
|
|
16691
|
-
|
|
16692
|
-
|
|
16693
|
-
var GoogleChartWidget = /** @class */ (function (_super) {
|
|
16694
|
-
__extends(GoogleChartWidget, _super);
|
|
16695
|
-
/**
|
|
16696
|
-
* The default constructor.
|
|
16697
|
-
* @param slot The html element.
|
|
16698
|
-
* @param provider The provider.
|
|
16699
|
-
*/
|
|
16700
|
-
function GoogleChartWidget(slot) {
|
|
16701
|
-
var _this = _super.call(this, slot) || this;
|
|
16702
|
-
_this.hasChartTypes = [
|
|
16703
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Column,
|
|
16704
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Bar,
|
|
16705
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Histogram,
|
|
16706
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Combo,
|
|
16707
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Area,
|
|
16708
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Line,
|
|
16709
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].SteppedLine,
|
|
16710
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Pie,
|
|
16711
|
-
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Doughnut
|
|
16712
|
-
];
|
|
16713
|
-
_this.options.legend = {
|
|
16714
|
-
show: true,
|
|
16715
|
-
position: 'right'
|
|
16716
|
-
};
|
|
16717
|
-
return _this;
|
|
16718
|
-
}
|
|
16719
|
-
GoogleChartWidget.prototype.getWidgetType = function () {
|
|
16720
|
-
return 'chartGoogle';
|
|
16721
|
-
};
|
|
16722
|
-
GoogleChartWidget.prototype.canDraw = function () {
|
|
16723
|
-
return GoogleChartWidget.hasGoogleCharts();
|
|
16724
|
-
};
|
|
16725
|
-
GoogleChartWidget.hasGoogleCharts = function () {
|
|
16726
|
-
return typeof google !== 'undefined' && typeof google.charts !== 'undefined';
|
|
16727
|
-
};
|
|
16728
|
-
GoogleChartWidget.prototype.initChart = function () {
|
|
16729
|
-
if (GoogleChartWidget.hasGoogleCharts() && this.labelColumn >= 0
|
|
16730
|
-
&& this.dataColumns && this.dataColumns.length > 0) {
|
|
16731
|
-
this.googleDataView =
|
|
16732
|
-
new google.visualization.DataView(this.convertToGoogleFormat());
|
|
16733
|
-
this.updateChartColumns();
|
|
16734
|
-
}
|
|
16735
|
-
};
|
|
16736
|
-
GoogleChartWidget.prototype.convertToGoogleType = function (type) {
|
|
16737
|
-
switch (type) {
|
|
16738
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Date:
|
|
16739
|
-
return "date";
|
|
16740
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].DateTime:
|
|
16741
|
-
return "datetime";
|
|
16742
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Time:
|
|
16743
|
-
return "timeofday";
|
|
16744
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Byte:
|
|
16745
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Word:
|
|
16746
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Int32:
|
|
16747
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Int64:
|
|
16748
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Currency:
|
|
16749
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Float:
|
|
16750
|
-
return "number";
|
|
16751
|
-
default:
|
|
16752
|
-
return "string";
|
|
16753
|
-
}
|
|
16754
|
-
};
|
|
16755
|
-
GoogleChartWidget.prototype.convertToGoogleValue = function (value, type) {
|
|
16756
|
-
switch (type) {
|
|
16757
|
-
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Bool:
|
|
16758
|
-
return value.toString();
|
|
16759
|
-
default:
|
|
16760
|
-
return value;
|
|
16761
|
-
}
|
|
16762
|
-
};
|
|
16763
|
-
GoogleChartWidget.prototype.convertToGoogleFormat = function () {
|
|
16764
|
-
var googleTable = new google.visualization.DataTable();
|
|
16765
|
-
var columns = this.dataTable.columns;
|
|
16766
|
-
for (var i = 0; i < columns.count; i++) {
|
|
16767
|
-
var column = columns.get(i);
|
|
16768
|
-
googleTable.addColumn(this.convertToGoogleType(column.type), column.label, column.id);
|
|
16769
|
-
}
|
|
16770
|
-
var rows = this.dataTable.getCachedRows();
|
|
16771
|
-
googleTable.addRows(rows.length);
|
|
16772
|
-
for (var i = 0; i < rows.length; i++) {
|
|
16773
|
-
var row = rows[i];
|
|
16774
|
-
for (var j = 0; j < columns.count; j++) {
|
|
16775
|
-
googleTable.setCell(i, j, this.convertToGoogleValue(row.getValue(j), columns.get(j).type));
|
|
16776
|
-
}
|
|
16777
|
-
}
|
|
16778
|
-
return googleTable;
|
|
16779
|
-
};
|
|
16780
|
-
GoogleChartWidget.prototype.drawCore = function () {
|
|
16781
|
-
if (this.googleDataView != null) {
|
|
16782
|
-
this.options.legend = this.options.legend || {};
|
|
16783
|
-
var chartOptions = {
|
|
16784
|
-
width: "100%",
|
|
16785
|
-
height: "100%",
|
|
16786
|
-
chartArea: { width: this.getChartAreaWidth }
|
|
16787
|
-
};
|
|
16788
|
-
if (this.chartType == _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Doughnut) {
|
|
16789
|
-
chartOptions.pieHole = 0.4;
|
|
16790
|
-
}
|
|
16791
|
-
if (!this.options.legend.show) {
|
|
16792
|
-
chartOptions.legend = 'none';
|
|
16793
|
-
}
|
|
16794
|
-
else {
|
|
16795
|
-
chartOptions.legend = { position: this.options.legend.position };
|
|
16796
|
-
}
|
|
16797
|
-
var chart = this.createChart(this.chartDiv);
|
|
16798
|
-
chart.draw(this.googleDataView, chartOptions);
|
|
16799
|
-
}
|
|
16800
|
-
};
|
|
16801
|
-
GoogleChartWidget.prototype.getChartAreaWidth = function (chartType) {
|
|
16802
|
-
if (chartType == _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Pie) {
|
|
16803
|
-
return "100%";
|
|
16804
|
-
}
|
|
16805
|
-
else {
|
|
16806
|
-
return "50%";
|
|
16807
|
-
}
|
|
16808
|
-
};
|
|
16809
|
-
GoogleChartWidget.prototype.updateChartColumns = function () {
|
|
16810
|
-
if (this.googleDataView) {
|
|
16811
|
-
this.googleDataView.setColumns([].concat(this.labelColumn).concat(this.dataColumns));
|
|
16812
|
-
}
|
|
16813
|
-
};
|
|
16814
|
-
GoogleChartWidget.prototype.createChart = function (slot) {
|
|
16815
|
-
switch (this.chartType) {
|
|
16816
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Column:
|
|
16817
|
-
return new google.visualization.ColumnChart(slot);
|
|
16818
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Histogram:
|
|
16819
|
-
return new google.visualization.Histogram(slot);
|
|
16820
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Bar:
|
|
16821
|
-
return new google.visualization.BarChart(slot);
|
|
16822
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Combo:
|
|
16823
|
-
return new google.visualization.ComboChart(slot);
|
|
16824
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Area:
|
|
16825
|
-
return new google.visualization.AreaChart(slot);
|
|
16826
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Line:
|
|
16827
|
-
return new google.visualization.LineChart(slot);
|
|
16828
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].SteppedLine:
|
|
16829
|
-
return new google.visualization.SteppedAreaChart(slot);
|
|
16830
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Pie:
|
|
16831
|
-
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Doughnut:
|
|
16832
|
-
return new google.visualization.PieChart(slot);
|
|
16833
|
-
default:
|
|
16834
|
-
return new google.visualization.PieChart(slot);
|
|
16835
|
-
}
|
|
16836
|
-
};
|
|
16837
|
-
return GoogleChartWidget;
|
|
16838
|
-
}(_chart_widget__WEBPACK_IMPORTED_MODULE_1__[/* ChartWidget */ "a"]));
|
|
16839
|
-
|
|
16840
|
-
//# sourceMappingURL=chart_widget_google.js.map
|
|
16638
|
+
(function (global, factory) {
|
|
16639
|
+
true ? module.exports = factory() :
|
|
16640
|
+
undefined;
|
|
16641
|
+
}(this, (function () { 'use strict';
|
|
16841
16642
|
|
|
16842
|
-
|
|
16843
|
-
|
|
16844
|
-
|
|
16643
|
+
function objectOrFunction(x) {
|
|
16644
|
+
var type = typeof x;
|
|
16645
|
+
return x !== null && (type === 'object' || type === 'function');
|
|
16646
|
+
}
|
|
16845
16647
|
|
|
16846
|
-
|
|
16847
|
-
|
|
16648
|
+
function isFunction(x) {
|
|
16649
|
+
return typeof x === 'function';
|
|
16650
|
+
}
|
|
16848
16651
|
|
|
16849
|
-
// cached from whatever global is present so that test runners that stub it
|
|
16850
|
-
// don't break things. But we need to wrap it in a try catch in case it is
|
|
16851
|
-
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
16852
|
-
// function because try/catches deoptimize in certain engines.
|
|
16853
16652
|
|
|
16854
|
-
var cachedSetTimeout;
|
|
16855
|
-
var cachedClearTimeout;
|
|
16856
16653
|
|
|
16857
|
-
|
|
16858
|
-
|
|
16859
|
-
|
|
16860
|
-
|
|
16861
|
-
|
|
16654
|
+
var _isArray = void 0;
|
|
16655
|
+
if (Array.isArray) {
|
|
16656
|
+
_isArray = Array.isArray;
|
|
16657
|
+
} else {
|
|
16658
|
+
_isArray = function (x) {
|
|
16659
|
+
return Object.prototype.toString.call(x) === '[object Array]';
|
|
16660
|
+
};
|
|
16862
16661
|
}
|
|
16863
|
-
|
|
16864
|
-
|
|
16865
|
-
|
|
16866
|
-
|
|
16867
|
-
|
|
16868
|
-
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
|
|
16875
|
-
|
|
16876
|
-
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
|
|
16880
|
-
|
|
16881
|
-
|
|
16882
|
-
} ())
|
|
16883
|
-
function runTimeout(fun) {
|
|
16884
|
-
if (cachedSetTimeout === setTimeout) {
|
|
16885
|
-
//normal enviroments in sane situations
|
|
16886
|
-
return setTimeout(fun, 0);
|
|
16887
|
-
}
|
|
16888
|
-
// if setTimeout wasn't available but was latter defined
|
|
16889
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
16890
|
-
cachedSetTimeout = setTimeout;
|
|
16891
|
-
return setTimeout(fun, 0);
|
|
16892
|
-
}
|
|
16893
|
-
try {
|
|
16894
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
16895
|
-
return cachedSetTimeout(fun, 0);
|
|
16896
|
-
} catch(e){
|
|
16897
|
-
try {
|
|
16898
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
16899
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
16900
|
-
} catch(e){
|
|
16901
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
16902
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
16903
|
-
}
|
|
16662
|
+
|
|
16663
|
+
var isArray = _isArray;
|
|
16664
|
+
|
|
16665
|
+
var len = 0;
|
|
16666
|
+
var vertxNext = void 0;
|
|
16667
|
+
var customSchedulerFn = void 0;
|
|
16668
|
+
|
|
16669
|
+
var asap = function asap(callback, arg) {
|
|
16670
|
+
queue[len] = callback;
|
|
16671
|
+
queue[len + 1] = arg;
|
|
16672
|
+
len += 2;
|
|
16673
|
+
if (len === 2) {
|
|
16674
|
+
// If len is 2, that means that we need to schedule an async flush.
|
|
16675
|
+
// If additional callbacks are queued before the queue is flushed, they
|
|
16676
|
+
// will be processed by this flush that we are scheduling.
|
|
16677
|
+
if (customSchedulerFn) {
|
|
16678
|
+
customSchedulerFn(flush);
|
|
16679
|
+
} else {
|
|
16680
|
+
scheduleFlush();
|
|
16904
16681
|
}
|
|
16682
|
+
}
|
|
16683
|
+
};
|
|
16905
16684
|
|
|
16685
|
+
function setScheduler(scheduleFn) {
|
|
16686
|
+
customSchedulerFn = scheduleFn;
|
|
16687
|
+
}
|
|
16906
16688
|
|
|
16689
|
+
function setAsap(asapFn) {
|
|
16690
|
+
asap = asapFn;
|
|
16907
16691
|
}
|
|
16908
|
-
function runClearTimeout(marker) {
|
|
16909
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
16910
|
-
//normal enviroments in sane situations
|
|
16911
|
-
return clearTimeout(marker);
|
|
16912
|
-
}
|
|
16913
|
-
// if clearTimeout wasn't available but was latter defined
|
|
16914
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
16915
|
-
cachedClearTimeout = clearTimeout;
|
|
16916
|
-
return clearTimeout(marker);
|
|
16917
|
-
}
|
|
16918
|
-
try {
|
|
16919
|
-
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
16920
|
-
return cachedClearTimeout(marker);
|
|
16921
|
-
} catch (e){
|
|
16922
|
-
try {
|
|
16923
|
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
16924
|
-
return cachedClearTimeout.call(null, marker);
|
|
16925
|
-
} catch (e){
|
|
16926
|
-
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
16927
|
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
16928
|
-
return cachedClearTimeout.call(this, marker);
|
|
16929
|
-
}
|
|
16930
|
-
}
|
|
16931
16692
|
|
|
16693
|
+
var browserWindow = typeof window !== 'undefined' ? window : undefined;
|
|
16694
|
+
var browserGlobal = browserWindow || {};
|
|
16695
|
+
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
|
|
16696
|
+
var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
|
|
16932
16697
|
|
|
16698
|
+
// test for web worker but not in IE10
|
|
16699
|
+
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
|
|
16933
16700
|
|
|
16701
|
+
// node
|
|
16702
|
+
function useNextTick() {
|
|
16703
|
+
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
|
|
16704
|
+
// see https://github.com/cujojs/when/issues/410 for details
|
|
16705
|
+
return function () {
|
|
16706
|
+
return process.nextTick(flush);
|
|
16707
|
+
};
|
|
16934
16708
|
}
|
|
16935
|
-
var queue = [];
|
|
16936
|
-
var draining = false;
|
|
16937
|
-
var currentQueue;
|
|
16938
|
-
var queueIndex = -1;
|
|
16939
16709
|
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
}
|
|
16950
|
-
if (queue.length) {
|
|
16951
|
-
drainQueue();
|
|
16952
|
-
}
|
|
16710
|
+
// vertx
|
|
16711
|
+
function useVertxTimer() {
|
|
16712
|
+
if (typeof vertxNext !== 'undefined') {
|
|
16713
|
+
return function () {
|
|
16714
|
+
vertxNext(flush);
|
|
16715
|
+
};
|
|
16716
|
+
}
|
|
16717
|
+
|
|
16718
|
+
return useSetTimeout();
|
|
16953
16719
|
}
|
|
16954
16720
|
|
|
16955
|
-
function
|
|
16956
|
-
|
|
16957
|
-
|
|
16958
|
-
|
|
16959
|
-
|
|
16960
|
-
draining = true;
|
|
16961
|
-
|
|
16962
|
-
var len = queue.length;
|
|
16963
|
-
while(len) {
|
|
16964
|
-
currentQueue = queue;
|
|
16965
|
-
queue = [];
|
|
16966
|
-
while (++queueIndex < len) {
|
|
16967
|
-
if (currentQueue) {
|
|
16968
|
-
currentQueue[queueIndex].run();
|
|
16969
|
-
}
|
|
16970
|
-
}
|
|
16971
|
-
queueIndex = -1;
|
|
16972
|
-
len = queue.length;
|
|
16973
|
-
}
|
|
16974
|
-
currentQueue = null;
|
|
16975
|
-
draining = false;
|
|
16976
|
-
runClearTimeout(timeout);
|
|
16977
|
-
}
|
|
16978
|
-
|
|
16979
|
-
process.nextTick = function (fun) {
|
|
16980
|
-
var args = new Array(arguments.length - 1);
|
|
16981
|
-
if (arguments.length > 1) {
|
|
16982
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
16983
|
-
args[i - 1] = arguments[i];
|
|
16984
|
-
}
|
|
16985
|
-
}
|
|
16986
|
-
queue.push(new Item(fun, args));
|
|
16987
|
-
if (queue.length === 1 && !draining) {
|
|
16988
|
-
runTimeout(drainQueue);
|
|
16989
|
-
}
|
|
16990
|
-
};
|
|
16991
|
-
|
|
16992
|
-
// v8 likes predictible objects
|
|
16993
|
-
function Item(fun, array) {
|
|
16994
|
-
this.fun = fun;
|
|
16995
|
-
this.array = array;
|
|
16996
|
-
}
|
|
16997
|
-
Item.prototype.run = function () {
|
|
16998
|
-
this.fun.apply(null, this.array);
|
|
16999
|
-
};
|
|
17000
|
-
process.title = 'browser';
|
|
17001
|
-
process.browser = true;
|
|
17002
|
-
process.env = {};
|
|
17003
|
-
process.argv = [];
|
|
17004
|
-
process.version = ''; // empty string to avoid regexp issues
|
|
17005
|
-
process.versions = {};
|
|
17006
|
-
|
|
17007
|
-
function noop() {}
|
|
17008
|
-
|
|
17009
|
-
process.on = noop;
|
|
17010
|
-
process.addListener = noop;
|
|
17011
|
-
process.once = noop;
|
|
17012
|
-
process.off = noop;
|
|
17013
|
-
process.removeListener = noop;
|
|
17014
|
-
process.removeAllListeners = noop;
|
|
17015
|
-
process.emit = noop;
|
|
17016
|
-
process.prependListener = noop;
|
|
17017
|
-
process.prependOnceListener = noop;
|
|
17018
|
-
|
|
17019
|
-
process.listeners = function (name) { return [] }
|
|
17020
|
-
|
|
17021
|
-
process.binding = function (name) {
|
|
17022
|
-
throw new Error('process.binding is not supported');
|
|
17023
|
-
};
|
|
17024
|
-
|
|
17025
|
-
process.cwd = function () { return '/' };
|
|
17026
|
-
process.chdir = function (dir) {
|
|
17027
|
-
throw new Error('process.chdir is not supported');
|
|
17028
|
-
};
|
|
17029
|
-
process.umask = function() { return 0; };
|
|
17030
|
-
|
|
17031
|
-
|
|
17032
|
-
/***/ }),
|
|
17033
|
-
/* 54 */
|
|
17034
|
-
/***/ (function(module, exports) {
|
|
17035
|
-
|
|
17036
|
-
var g;
|
|
17037
|
-
|
|
17038
|
-
// This works in non-strict mode
|
|
17039
|
-
g = (function() {
|
|
17040
|
-
return this;
|
|
17041
|
-
})();
|
|
17042
|
-
|
|
17043
|
-
try {
|
|
17044
|
-
// This works if eval is allowed (see CSP)
|
|
17045
|
-
g = g || new Function("return this")();
|
|
17046
|
-
} catch (e) {
|
|
17047
|
-
// This works if the window reference is available
|
|
17048
|
-
if (typeof window === "object") g = window;
|
|
17049
|
-
}
|
|
17050
|
-
|
|
17051
|
-
// g can still be undefined, but nothing to do about it...
|
|
17052
|
-
// We return undefined, instead of nothing here, so it's
|
|
17053
|
-
// easier to handle this case. if(!global) { ...}
|
|
17054
|
-
|
|
17055
|
-
module.exports = g;
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
/***/ }),
|
|
17059
|
-
/* 55 */
|
|
17060
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
17061
|
-
|
|
17062
|
-
/* WEBPACK VAR INJECTION */(function(process, global) {/*!
|
|
17063
|
-
* @overview es6-promise - a tiny implementation of Promises/A+.
|
|
17064
|
-
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
|
17065
|
-
* @license Licensed under MIT license
|
|
17066
|
-
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
|
17067
|
-
* @version v4.2.8+1e68dce6
|
|
17068
|
-
*/
|
|
17069
|
-
|
|
17070
|
-
(function (global, factory) {
|
|
17071
|
-
true ? module.exports = factory() :
|
|
17072
|
-
undefined;
|
|
17073
|
-
}(this, (function () { 'use strict';
|
|
17074
|
-
|
|
17075
|
-
function objectOrFunction(x) {
|
|
17076
|
-
var type = typeof x;
|
|
17077
|
-
return x !== null && (type === 'object' || type === 'function');
|
|
17078
|
-
}
|
|
17079
|
-
|
|
17080
|
-
function isFunction(x) {
|
|
17081
|
-
return typeof x === 'function';
|
|
17082
|
-
}
|
|
17083
|
-
|
|
17084
|
-
|
|
17085
|
-
|
|
17086
|
-
var _isArray = void 0;
|
|
17087
|
-
if (Array.isArray) {
|
|
17088
|
-
_isArray = Array.isArray;
|
|
17089
|
-
} else {
|
|
17090
|
-
_isArray = function (x) {
|
|
17091
|
-
return Object.prototype.toString.call(x) === '[object Array]';
|
|
17092
|
-
};
|
|
17093
|
-
}
|
|
17094
|
-
|
|
17095
|
-
var isArray = _isArray;
|
|
17096
|
-
|
|
17097
|
-
var len = 0;
|
|
17098
|
-
var vertxNext = void 0;
|
|
17099
|
-
var customSchedulerFn = void 0;
|
|
17100
|
-
|
|
17101
|
-
var asap = function asap(callback, arg) {
|
|
17102
|
-
queue[len] = callback;
|
|
17103
|
-
queue[len + 1] = arg;
|
|
17104
|
-
len += 2;
|
|
17105
|
-
if (len === 2) {
|
|
17106
|
-
// If len is 2, that means that we need to schedule an async flush.
|
|
17107
|
-
// If additional callbacks are queued before the queue is flushed, they
|
|
17108
|
-
// will be processed by this flush that we are scheduling.
|
|
17109
|
-
if (customSchedulerFn) {
|
|
17110
|
-
customSchedulerFn(flush);
|
|
17111
|
-
} else {
|
|
17112
|
-
scheduleFlush();
|
|
17113
|
-
}
|
|
17114
|
-
}
|
|
17115
|
-
};
|
|
17116
|
-
|
|
17117
|
-
function setScheduler(scheduleFn) {
|
|
17118
|
-
customSchedulerFn = scheduleFn;
|
|
17119
|
-
}
|
|
17120
|
-
|
|
17121
|
-
function setAsap(asapFn) {
|
|
17122
|
-
asap = asapFn;
|
|
17123
|
-
}
|
|
17124
|
-
|
|
17125
|
-
var browserWindow = typeof window !== 'undefined' ? window : undefined;
|
|
17126
|
-
var browserGlobal = browserWindow || {};
|
|
17127
|
-
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
|
|
17128
|
-
var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
|
|
17129
|
-
|
|
17130
|
-
// test for web worker but not in IE10
|
|
17131
|
-
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
|
|
17132
|
-
|
|
17133
|
-
// node
|
|
17134
|
-
function useNextTick() {
|
|
17135
|
-
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
|
|
17136
|
-
// see https://github.com/cujojs/when/issues/410 for details
|
|
17137
|
-
return function () {
|
|
17138
|
-
return process.nextTick(flush);
|
|
17139
|
-
};
|
|
17140
|
-
}
|
|
17141
|
-
|
|
17142
|
-
// vertx
|
|
17143
|
-
function useVertxTimer() {
|
|
17144
|
-
if (typeof vertxNext !== 'undefined') {
|
|
17145
|
-
return function () {
|
|
17146
|
-
vertxNext(flush);
|
|
17147
|
-
};
|
|
17148
|
-
}
|
|
17149
|
-
|
|
17150
|
-
return useSetTimeout();
|
|
17151
|
-
}
|
|
17152
|
-
|
|
17153
|
-
function useMutationObserver() {
|
|
17154
|
-
var iterations = 0;
|
|
17155
|
-
var observer = new BrowserMutationObserver(flush);
|
|
17156
|
-
var node = document.createTextNode('');
|
|
17157
|
-
observer.observe(node, { characterData: true });
|
|
16721
|
+
function useMutationObserver() {
|
|
16722
|
+
var iterations = 0;
|
|
16723
|
+
var observer = new BrowserMutationObserver(flush);
|
|
16724
|
+
var node = document.createTextNode('');
|
|
16725
|
+
observer.observe(node, { characterData: true });
|
|
17158
16726
|
|
|
17159
16727
|
return function () {
|
|
17160
16728
|
node.data = iterations = ++iterations % 2;
|
|
@@ -17883,357 +17451,830 @@ function needsNew() {
|
|
|
17883
17451
|
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
|
|
17884
17452
|
}
|
|
17885
17453
|
}
|
|
17886
|
-
};
|
|
17887
|
-
});
|
|
17888
|
-
}
|
|
17889
|
-
|
|
17890
|
-
getJSON('/posts.json').then(function(json) {
|
|
17891
|
-
// on fulfillment
|
|
17892
|
-
}, function(reason) {
|
|
17893
|
-
// on rejection
|
|
17894
|
-
});
|
|
17895
|
-
```
|
|
17454
|
+
};
|
|
17455
|
+
});
|
|
17456
|
+
}
|
|
17457
|
+
|
|
17458
|
+
getJSON('/posts.json').then(function(json) {
|
|
17459
|
+
// on fulfillment
|
|
17460
|
+
}, function(reason) {
|
|
17461
|
+
// on rejection
|
|
17462
|
+
});
|
|
17463
|
+
```
|
|
17464
|
+
|
|
17465
|
+
Unlike callbacks, promises are great composable primitives.
|
|
17466
|
+
|
|
17467
|
+
```js
|
|
17468
|
+
Promise.all([
|
|
17469
|
+
getJSON('/posts'),
|
|
17470
|
+
getJSON('/comments')
|
|
17471
|
+
]).then(function(values){
|
|
17472
|
+
values[0] // => postsJSON
|
|
17473
|
+
values[1] // => commentsJSON
|
|
17474
|
+
|
|
17475
|
+
return values;
|
|
17476
|
+
});
|
|
17477
|
+
```
|
|
17478
|
+
|
|
17479
|
+
@class Promise
|
|
17480
|
+
@param {Function} resolver
|
|
17481
|
+
Useful for tooling.
|
|
17482
|
+
@constructor
|
|
17483
|
+
*/
|
|
17484
|
+
|
|
17485
|
+
var Promise$1 = function () {
|
|
17486
|
+
function Promise(resolver) {
|
|
17487
|
+
this[PROMISE_ID] = nextId();
|
|
17488
|
+
this._result = this._state = undefined;
|
|
17489
|
+
this._subscribers = [];
|
|
17490
|
+
|
|
17491
|
+
if (noop !== resolver) {
|
|
17492
|
+
typeof resolver !== 'function' && needsResolver();
|
|
17493
|
+
this instanceof Promise ? initializePromise(this, resolver) : needsNew();
|
|
17494
|
+
}
|
|
17495
|
+
}
|
|
17496
|
+
|
|
17497
|
+
/**
|
|
17498
|
+
The primary way of interacting with a promise is through its `then` method,
|
|
17499
|
+
which registers callbacks to receive either a promise's eventual value or the
|
|
17500
|
+
reason why the promise cannot be fulfilled.
|
|
17501
|
+
```js
|
|
17502
|
+
findUser().then(function(user){
|
|
17503
|
+
// user is available
|
|
17504
|
+
}, function(reason){
|
|
17505
|
+
// user is unavailable, and you are given the reason why
|
|
17506
|
+
});
|
|
17507
|
+
```
|
|
17508
|
+
Chaining
|
|
17509
|
+
--------
|
|
17510
|
+
The return value of `then` is itself a promise. This second, 'downstream'
|
|
17511
|
+
promise is resolved with the return value of the first promise's fulfillment
|
|
17512
|
+
or rejection handler, or rejected if the handler throws an exception.
|
|
17513
|
+
```js
|
|
17514
|
+
findUser().then(function (user) {
|
|
17515
|
+
return user.name;
|
|
17516
|
+
}, function (reason) {
|
|
17517
|
+
return 'default name';
|
|
17518
|
+
}).then(function (userName) {
|
|
17519
|
+
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
|
17520
|
+
// will be `'default name'`
|
|
17521
|
+
});
|
|
17522
|
+
findUser().then(function (user) {
|
|
17523
|
+
throw new Error('Found user, but still unhappy');
|
|
17524
|
+
}, function (reason) {
|
|
17525
|
+
throw new Error('`findUser` rejected and we're unhappy');
|
|
17526
|
+
}).then(function (value) {
|
|
17527
|
+
// never reached
|
|
17528
|
+
}, function (reason) {
|
|
17529
|
+
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
|
17530
|
+
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
|
17531
|
+
});
|
|
17532
|
+
```
|
|
17533
|
+
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
|
17534
|
+
```js
|
|
17535
|
+
findUser().then(function (user) {
|
|
17536
|
+
throw new PedagogicalException('Upstream error');
|
|
17537
|
+
}).then(function (value) {
|
|
17538
|
+
// never reached
|
|
17539
|
+
}).then(function (value) {
|
|
17540
|
+
// never reached
|
|
17541
|
+
}, function (reason) {
|
|
17542
|
+
// The `PedgagocialException` is propagated all the way down to here
|
|
17543
|
+
});
|
|
17544
|
+
```
|
|
17545
|
+
Assimilation
|
|
17546
|
+
------------
|
|
17547
|
+
Sometimes the value you want to propagate to a downstream promise can only be
|
|
17548
|
+
retrieved asynchronously. This can be achieved by returning a promise in the
|
|
17549
|
+
fulfillment or rejection handler. The downstream promise will then be pending
|
|
17550
|
+
until the returned promise is settled. This is called *assimilation*.
|
|
17551
|
+
```js
|
|
17552
|
+
findUser().then(function (user) {
|
|
17553
|
+
return findCommentsByAuthor(user);
|
|
17554
|
+
}).then(function (comments) {
|
|
17555
|
+
// The user's comments are now available
|
|
17556
|
+
});
|
|
17557
|
+
```
|
|
17558
|
+
If the assimliated promise rejects, then the downstream promise will also reject.
|
|
17559
|
+
```js
|
|
17560
|
+
findUser().then(function (user) {
|
|
17561
|
+
return findCommentsByAuthor(user);
|
|
17562
|
+
}).then(function (comments) {
|
|
17563
|
+
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
|
17564
|
+
}, function (reason) {
|
|
17565
|
+
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
|
17566
|
+
});
|
|
17567
|
+
```
|
|
17568
|
+
Simple Example
|
|
17569
|
+
--------------
|
|
17570
|
+
Synchronous Example
|
|
17571
|
+
```javascript
|
|
17572
|
+
let result;
|
|
17573
|
+
try {
|
|
17574
|
+
result = findResult();
|
|
17575
|
+
// success
|
|
17576
|
+
} catch(reason) {
|
|
17577
|
+
// failure
|
|
17578
|
+
}
|
|
17579
|
+
```
|
|
17580
|
+
Errback Example
|
|
17581
|
+
```js
|
|
17582
|
+
findResult(function(result, err){
|
|
17583
|
+
if (err) {
|
|
17584
|
+
// failure
|
|
17585
|
+
} else {
|
|
17586
|
+
// success
|
|
17587
|
+
}
|
|
17588
|
+
});
|
|
17589
|
+
```
|
|
17590
|
+
Promise Example;
|
|
17591
|
+
```javascript
|
|
17592
|
+
findResult().then(function(result){
|
|
17593
|
+
// success
|
|
17594
|
+
}, function(reason){
|
|
17595
|
+
// failure
|
|
17596
|
+
});
|
|
17597
|
+
```
|
|
17598
|
+
Advanced Example
|
|
17599
|
+
--------------
|
|
17600
|
+
Synchronous Example
|
|
17601
|
+
```javascript
|
|
17602
|
+
let author, books;
|
|
17603
|
+
try {
|
|
17604
|
+
author = findAuthor();
|
|
17605
|
+
books = findBooksByAuthor(author);
|
|
17606
|
+
// success
|
|
17607
|
+
} catch(reason) {
|
|
17608
|
+
// failure
|
|
17609
|
+
}
|
|
17610
|
+
```
|
|
17611
|
+
Errback Example
|
|
17612
|
+
```js
|
|
17613
|
+
function foundBooks(books) {
|
|
17614
|
+
}
|
|
17615
|
+
function failure(reason) {
|
|
17616
|
+
}
|
|
17617
|
+
findAuthor(function(author, err){
|
|
17618
|
+
if (err) {
|
|
17619
|
+
failure(err);
|
|
17620
|
+
// failure
|
|
17621
|
+
} else {
|
|
17622
|
+
try {
|
|
17623
|
+
findBoooksByAuthor(author, function(books, err) {
|
|
17624
|
+
if (err) {
|
|
17625
|
+
failure(err);
|
|
17626
|
+
} else {
|
|
17627
|
+
try {
|
|
17628
|
+
foundBooks(books);
|
|
17629
|
+
} catch(reason) {
|
|
17630
|
+
failure(reason);
|
|
17631
|
+
}
|
|
17632
|
+
}
|
|
17633
|
+
});
|
|
17634
|
+
} catch(error) {
|
|
17635
|
+
failure(err);
|
|
17636
|
+
}
|
|
17637
|
+
// success
|
|
17638
|
+
}
|
|
17639
|
+
});
|
|
17640
|
+
```
|
|
17641
|
+
Promise Example;
|
|
17642
|
+
```javascript
|
|
17643
|
+
findAuthor().
|
|
17644
|
+
then(findBooksByAuthor).
|
|
17645
|
+
then(function(books){
|
|
17646
|
+
// found books
|
|
17647
|
+
}).catch(function(reason){
|
|
17648
|
+
// something went wrong
|
|
17649
|
+
});
|
|
17650
|
+
```
|
|
17651
|
+
@method then
|
|
17652
|
+
@param {Function} onFulfilled
|
|
17653
|
+
@param {Function} onRejected
|
|
17654
|
+
Useful for tooling.
|
|
17655
|
+
@return {Promise}
|
|
17656
|
+
*/
|
|
17657
|
+
|
|
17658
|
+
/**
|
|
17659
|
+
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
|
17660
|
+
as the catch block of a try/catch statement.
|
|
17661
|
+
```js
|
|
17662
|
+
function findAuthor(){
|
|
17663
|
+
throw new Error('couldn't find that author');
|
|
17664
|
+
}
|
|
17665
|
+
// synchronous
|
|
17666
|
+
try {
|
|
17667
|
+
findAuthor();
|
|
17668
|
+
} catch(reason) {
|
|
17669
|
+
// something went wrong
|
|
17670
|
+
}
|
|
17671
|
+
// async with promises
|
|
17672
|
+
findAuthor().catch(function(reason){
|
|
17673
|
+
// something went wrong
|
|
17674
|
+
});
|
|
17675
|
+
```
|
|
17676
|
+
@method catch
|
|
17677
|
+
@param {Function} onRejection
|
|
17678
|
+
Useful for tooling.
|
|
17679
|
+
@return {Promise}
|
|
17680
|
+
*/
|
|
17681
|
+
|
|
17682
|
+
|
|
17683
|
+
Promise.prototype.catch = function _catch(onRejection) {
|
|
17684
|
+
return this.then(null, onRejection);
|
|
17685
|
+
};
|
|
17686
|
+
|
|
17687
|
+
/**
|
|
17688
|
+
`finally` will be invoked regardless of the promise's fate just as native
|
|
17689
|
+
try/catch/finally behaves
|
|
17690
|
+
|
|
17691
|
+
Synchronous example:
|
|
17692
|
+
|
|
17693
|
+
```js
|
|
17694
|
+
findAuthor() {
|
|
17695
|
+
if (Math.random() > 0.5) {
|
|
17696
|
+
throw new Error();
|
|
17697
|
+
}
|
|
17698
|
+
return new Author();
|
|
17699
|
+
}
|
|
17700
|
+
|
|
17701
|
+
try {
|
|
17702
|
+
return findAuthor(); // succeed or fail
|
|
17703
|
+
} catch(error) {
|
|
17704
|
+
return findOtherAuther();
|
|
17705
|
+
} finally {
|
|
17706
|
+
// always runs
|
|
17707
|
+
// doesn't affect the return value
|
|
17708
|
+
}
|
|
17709
|
+
```
|
|
17710
|
+
|
|
17711
|
+
Asynchronous example:
|
|
17712
|
+
|
|
17713
|
+
```js
|
|
17714
|
+
findAuthor().catch(function(reason){
|
|
17715
|
+
return findOtherAuther();
|
|
17716
|
+
}).finally(function(){
|
|
17717
|
+
// author was either found, or not
|
|
17718
|
+
});
|
|
17719
|
+
```
|
|
17720
|
+
|
|
17721
|
+
@method finally
|
|
17722
|
+
@param {Function} callback
|
|
17723
|
+
@return {Promise}
|
|
17724
|
+
*/
|
|
17725
|
+
|
|
17726
|
+
|
|
17727
|
+
Promise.prototype.finally = function _finally(callback) {
|
|
17728
|
+
var promise = this;
|
|
17729
|
+
var constructor = promise.constructor;
|
|
17730
|
+
|
|
17731
|
+
if (isFunction(callback)) {
|
|
17732
|
+
return promise.then(function (value) {
|
|
17733
|
+
return constructor.resolve(callback()).then(function () {
|
|
17734
|
+
return value;
|
|
17735
|
+
});
|
|
17736
|
+
}, function (reason) {
|
|
17737
|
+
return constructor.resolve(callback()).then(function () {
|
|
17738
|
+
throw reason;
|
|
17739
|
+
});
|
|
17740
|
+
});
|
|
17741
|
+
}
|
|
17742
|
+
|
|
17743
|
+
return promise.then(callback, callback);
|
|
17744
|
+
};
|
|
17745
|
+
|
|
17746
|
+
return Promise;
|
|
17747
|
+
}();
|
|
17748
|
+
|
|
17749
|
+
Promise$1.prototype.then = then;
|
|
17750
|
+
Promise$1.all = all;
|
|
17751
|
+
Promise$1.race = race;
|
|
17752
|
+
Promise$1.resolve = resolve$1;
|
|
17753
|
+
Promise$1.reject = reject$1;
|
|
17754
|
+
Promise$1._setScheduler = setScheduler;
|
|
17755
|
+
Promise$1._setAsap = setAsap;
|
|
17756
|
+
Promise$1._asap = asap;
|
|
17757
|
+
|
|
17758
|
+
/*global self*/
|
|
17759
|
+
function polyfill() {
|
|
17760
|
+
var local = void 0;
|
|
17761
|
+
|
|
17762
|
+
if (typeof global !== 'undefined') {
|
|
17763
|
+
local = global;
|
|
17764
|
+
} else if (typeof self !== 'undefined') {
|
|
17765
|
+
local = self;
|
|
17766
|
+
} else {
|
|
17767
|
+
try {
|
|
17768
|
+
local = Function('return this')();
|
|
17769
|
+
} catch (e) {
|
|
17770
|
+
throw new Error('polyfill failed because global object is unavailable in this environment');
|
|
17771
|
+
}
|
|
17772
|
+
}
|
|
17773
|
+
|
|
17774
|
+
var P = local.Promise;
|
|
17775
|
+
|
|
17776
|
+
if (P) {
|
|
17777
|
+
var promiseToString = null;
|
|
17778
|
+
try {
|
|
17779
|
+
promiseToString = Object.prototype.toString.call(P.resolve());
|
|
17780
|
+
} catch (e) {
|
|
17781
|
+
// silently ignored
|
|
17782
|
+
}
|
|
17783
|
+
|
|
17784
|
+
if (promiseToString === '[object Promise]' && !P.cast) {
|
|
17785
|
+
return;
|
|
17786
|
+
}
|
|
17787
|
+
}
|
|
17788
|
+
|
|
17789
|
+
local.Promise = Promise$1;
|
|
17790
|
+
}
|
|
17791
|
+
|
|
17792
|
+
// Strange compat..
|
|
17793
|
+
Promise$1.polyfill = polyfill;
|
|
17794
|
+
Promise$1.Promise = Promise$1;
|
|
17795
|
+
|
|
17796
|
+
return Promise$1;
|
|
17797
|
+
|
|
17798
|
+
})));
|
|
17799
|
+
|
|
17800
|
+
|
|
17801
|
+
|
|
17802
|
+
//# sourceMappingURL=es6-promise.map
|
|
17803
|
+
|
|
17804
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(54), __webpack_require__(55)))
|
|
17805
|
+
|
|
17806
|
+
/***/ }),
|
|
17807
|
+
/* 52 */
|
|
17808
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
17809
|
+
|
|
17810
|
+
"use strict";
|
|
17811
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AttributeExpressionRenderer; });
|
|
17812
|
+
/* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
17813
|
+
/* harmony import */ var _easyquery_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
17814
|
+
/* harmony import */ var _easydata_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
17815
|
+
/* harmony import */ var _list_expression_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25);
|
|
17816
|
+
/* harmony import */ var _utils_browser_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
|
|
17817
|
+
/* harmony import */ var _types_qp_editable_part__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
|
|
17818
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
17819
|
+
var extendStatics = function (d, b) {
|
|
17820
|
+
extendStatics = Object.setPrototypeOf ||
|
|
17821
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
17822
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
17823
|
+
return extendStatics(d, b);
|
|
17824
|
+
};
|
|
17825
|
+
return function (d, b) {
|
|
17826
|
+
extendStatics(d, b);
|
|
17827
|
+
function __() { this.constructor = d; }
|
|
17828
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
17829
|
+
};
|
|
17830
|
+
})();
|
|
17831
|
+
|
|
17832
|
+
|
|
17833
|
+
|
|
17834
|
+
|
|
17835
|
+
|
|
17836
|
+
|
|
17837
|
+
var AttributeExpressionRenderer = /** @class */ (function (_super) {
|
|
17838
|
+
__extends(AttributeExpressionRenderer, _super);
|
|
17839
|
+
function AttributeExpressionRenderer(panel, expression, entitiesMenu, slot) {
|
|
17840
|
+
var _this = _super.call(this, panel, expression, null, slot) || this;
|
|
17841
|
+
_this.menu = entitiesMenu;
|
|
17842
|
+
return _this;
|
|
17843
|
+
}
|
|
17844
|
+
AttributeExpressionRenderer.prototype.renderEditor = function () {
|
|
17845
|
+
//create menu
|
|
17846
|
+
};
|
|
17847
|
+
AttributeExpressionRenderer.prototype.getLabelText = function () {
|
|
17848
|
+
var model = this.panel.getContext().getModel();
|
|
17849
|
+
var attrId = this.expression.value;
|
|
17850
|
+
var attrObj = attrId ? model.getAttributeByIdSafe(attrId) : null;
|
|
17851
|
+
var attrFormat = this.panel.options.attrElementFormat;
|
|
17852
|
+
return attrObj ? model.getAttributeText(attrObj, attrFormat) : this.getEmptyText();
|
|
17853
|
+
};
|
|
17854
|
+
AttributeExpressionRenderer.prototype.setValue = function (value, silent) {
|
|
17855
|
+
if (silent === void 0) { silent = false; }
|
|
17856
|
+
silent = silent && value !== this.expression.value;
|
|
17857
|
+
var result = _super.prototype.setValue.call(this, value, true);
|
|
17858
|
+
if (!silent) {
|
|
17859
|
+
this.expression.getParent().fireChangedEvent(_easyquery_core__WEBPACK_IMPORTED_MODULE_1__["ConditionPart"].EntityAttr | _easyquery_core__WEBPACK_IMPORTED_MODULE_1__["ConditionPart"].Operator);
|
|
17860
|
+
}
|
|
17861
|
+
return result;
|
|
17862
|
+
};
|
|
17863
|
+
AttributeExpressionRenderer.prototype.isEditable = function () {
|
|
17864
|
+
return !this.isReadOnly()
|
|
17865
|
+
&& ((this.panel.options.editableParts & _types_qp_editable_part__WEBPACK_IMPORTED_MODULE_5__[/* QPEditablePart */ "a"].Attribute) === _types_qp_editable_part__WEBPACK_IMPORTED_MODULE_5__[/* QPEditablePart */ "a"].Attribute);
|
|
17866
|
+
};
|
|
17867
|
+
AttributeExpressionRenderer.prototype.getEmptyText = function () {
|
|
17868
|
+
return this.panel.options.emptyTextAttribute || _easydata_core__WEBPACK_IMPORTED_MODULE_0__["i18n"].getText('MsgEmptyAttrValue');
|
|
17869
|
+
};
|
|
17870
|
+
AttributeExpressionRenderer.prototype.getClassesToAdd = function () {
|
|
17871
|
+
return this.cssPrefix + "-condelement " + this.cssPrefix + "-attrelement";
|
|
17872
|
+
};
|
|
17873
|
+
AttributeExpressionRenderer.prototype.adjustWidth = function () {
|
|
17874
|
+
if (_utils_browser_utils__WEBPACK_IMPORTED_MODULE_4__[/* browserUtils */ "a"].isMobileMode()) {
|
|
17875
|
+
return;
|
|
17876
|
+
}
|
|
17877
|
+
var elWidth = this.element.clientWidth;
|
|
17878
|
+
var parWidth = this.element.parentElement.clientWidth;
|
|
17879
|
+
if (elWidth > parWidth / 2) {
|
|
17880
|
+
Object(_easydata_ui__WEBPACK_IMPORTED_MODULE_2__["domel"])(this.element)
|
|
17881
|
+
.addClass(this.cssPrefix + "-attrelement-wide");
|
|
17882
|
+
}
|
|
17883
|
+
};
|
|
17884
|
+
return AttributeExpressionRenderer;
|
|
17885
|
+
}(_list_expression_renderer__WEBPACK_IMPORTED_MODULE_3__[/* ListExpressionRenderer */ "b"]));
|
|
17886
|
+
|
|
17887
|
+
//# sourceMappingURL=attribute_expression_renderer.js.map
|
|
17888
|
+
|
|
17889
|
+
/***/ }),
|
|
17890
|
+
/* 53 */
|
|
17891
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
17892
|
+
|
|
17893
|
+
"use strict";
|
|
17894
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return GoogleChartWidget; });
|
|
17895
|
+
/* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
17896
|
+
/* harmony import */ var _chart_widget__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(47);
|
|
17897
|
+
/* harmony import */ var _chart_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
|
|
17898
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
17899
|
+
var extendStatics = function (d, b) {
|
|
17900
|
+
extendStatics = Object.setPrototypeOf ||
|
|
17901
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
17902
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
17903
|
+
return extendStatics(d, b);
|
|
17904
|
+
};
|
|
17905
|
+
return function (d, b) {
|
|
17906
|
+
extendStatics(d, b);
|
|
17907
|
+
function __() { this.constructor = d; }
|
|
17908
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
17909
|
+
};
|
|
17910
|
+
})();
|
|
17911
|
+
|
|
17912
|
+
|
|
17913
|
+
|
|
17914
|
+
var GoogleChartWidget = /** @class */ (function (_super) {
|
|
17915
|
+
__extends(GoogleChartWidget, _super);
|
|
17916
|
+
/**
|
|
17917
|
+
* The default constructor.
|
|
17918
|
+
* @param slot The html element.
|
|
17919
|
+
* @param provider The provider.
|
|
17920
|
+
*/
|
|
17921
|
+
function GoogleChartWidget(slot) {
|
|
17922
|
+
var _this = _super.call(this, slot) || this;
|
|
17923
|
+
_this.hasChartTypes = [
|
|
17924
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Column,
|
|
17925
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Bar,
|
|
17926
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Histogram,
|
|
17927
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Combo,
|
|
17928
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Area,
|
|
17929
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Line,
|
|
17930
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].SteppedLine,
|
|
17931
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Pie,
|
|
17932
|
+
_chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Doughnut
|
|
17933
|
+
];
|
|
17934
|
+
_this.options.legend = {
|
|
17935
|
+
show: true,
|
|
17936
|
+
position: 'right'
|
|
17937
|
+
};
|
|
17938
|
+
return _this;
|
|
17939
|
+
}
|
|
17940
|
+
GoogleChartWidget.prototype.getWidgetType = function () {
|
|
17941
|
+
return 'chartGoogle';
|
|
17942
|
+
};
|
|
17943
|
+
GoogleChartWidget.prototype.canDraw = function () {
|
|
17944
|
+
return GoogleChartWidget.hasGoogleCharts();
|
|
17945
|
+
};
|
|
17946
|
+
GoogleChartWidget.hasGoogleCharts = function () {
|
|
17947
|
+
return typeof google !== 'undefined' && typeof google.charts !== 'undefined';
|
|
17948
|
+
};
|
|
17949
|
+
GoogleChartWidget.prototype.initChart = function () {
|
|
17950
|
+
if (GoogleChartWidget.hasGoogleCharts() && this.labelColumn >= 0
|
|
17951
|
+
&& this.dataColumns && this.dataColumns.length > 0) {
|
|
17952
|
+
this.googleDataView =
|
|
17953
|
+
new google.visualization.DataView(this.convertToGoogleFormat());
|
|
17954
|
+
this.updateChartColumns();
|
|
17955
|
+
}
|
|
17956
|
+
};
|
|
17957
|
+
GoogleChartWidget.prototype.convertToGoogleType = function (type) {
|
|
17958
|
+
switch (type) {
|
|
17959
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Date:
|
|
17960
|
+
return "date";
|
|
17961
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].DateTime:
|
|
17962
|
+
return "datetime";
|
|
17963
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Time:
|
|
17964
|
+
return "timeofday";
|
|
17965
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Byte:
|
|
17966
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Word:
|
|
17967
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Int32:
|
|
17968
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Int64:
|
|
17969
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Currency:
|
|
17970
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Float:
|
|
17971
|
+
return "number";
|
|
17972
|
+
default:
|
|
17973
|
+
return "string";
|
|
17974
|
+
}
|
|
17975
|
+
};
|
|
17976
|
+
GoogleChartWidget.prototype.convertToGoogleValue = function (value, type) {
|
|
17977
|
+
switch (type) {
|
|
17978
|
+
case _easydata_core__WEBPACK_IMPORTED_MODULE_0__["DataType"].Bool:
|
|
17979
|
+
return value.toString();
|
|
17980
|
+
default:
|
|
17981
|
+
return value;
|
|
17982
|
+
}
|
|
17983
|
+
};
|
|
17984
|
+
GoogleChartWidget.prototype.convertToGoogleFormat = function () {
|
|
17985
|
+
var googleTable = new google.visualization.DataTable();
|
|
17986
|
+
var columns = this.dataTable.columns;
|
|
17987
|
+
for (var i = 0; i < columns.count; i++) {
|
|
17988
|
+
var column = columns.get(i);
|
|
17989
|
+
googleTable.addColumn(this.convertToGoogleType(column.type), column.label, column.id);
|
|
17990
|
+
}
|
|
17991
|
+
var rows = this.dataTable.getCachedRows();
|
|
17992
|
+
googleTable.addRows(rows.length);
|
|
17993
|
+
for (var i = 0; i < rows.length; i++) {
|
|
17994
|
+
var row = rows[i];
|
|
17995
|
+
for (var j = 0; j < columns.count; j++) {
|
|
17996
|
+
googleTable.setCell(i, j, this.convertToGoogleValue(row.getValue(j), columns.get(j).type));
|
|
17997
|
+
}
|
|
17998
|
+
}
|
|
17999
|
+
return googleTable;
|
|
18000
|
+
};
|
|
18001
|
+
GoogleChartWidget.prototype.drawCore = function () {
|
|
18002
|
+
if (this.googleDataView != null) {
|
|
18003
|
+
this.options.legend = this.options.legend || {};
|
|
18004
|
+
var chartOptions = {
|
|
18005
|
+
width: "100%",
|
|
18006
|
+
height: "100%",
|
|
18007
|
+
chartArea: { width: this.getChartAreaWidth }
|
|
18008
|
+
};
|
|
18009
|
+
if (this.chartType == _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Doughnut) {
|
|
18010
|
+
chartOptions.pieHole = 0.4;
|
|
18011
|
+
}
|
|
18012
|
+
if (!this.options.legend.show) {
|
|
18013
|
+
chartOptions.legend = 'none';
|
|
18014
|
+
}
|
|
18015
|
+
else {
|
|
18016
|
+
chartOptions.legend = { position: this.options.legend.position };
|
|
18017
|
+
}
|
|
18018
|
+
var chart = this.createChart(this.chartDiv);
|
|
18019
|
+
chart.draw(this.googleDataView, chartOptions);
|
|
18020
|
+
}
|
|
18021
|
+
};
|
|
18022
|
+
GoogleChartWidget.prototype.getChartAreaWidth = function (chartType) {
|
|
18023
|
+
if (chartType == _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Pie) {
|
|
18024
|
+
return "100%";
|
|
18025
|
+
}
|
|
18026
|
+
else {
|
|
18027
|
+
return "50%";
|
|
18028
|
+
}
|
|
18029
|
+
};
|
|
18030
|
+
GoogleChartWidget.prototype.updateChartColumns = function () {
|
|
18031
|
+
if (this.googleDataView) {
|
|
18032
|
+
this.googleDataView.setColumns([].concat(this.labelColumn).concat(this.dataColumns));
|
|
18033
|
+
}
|
|
18034
|
+
};
|
|
18035
|
+
GoogleChartWidget.prototype.createChart = function (slot) {
|
|
18036
|
+
switch (this.chartType) {
|
|
18037
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Column:
|
|
18038
|
+
return new google.visualization.ColumnChart(slot);
|
|
18039
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Histogram:
|
|
18040
|
+
return new google.visualization.Histogram(slot);
|
|
18041
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Bar:
|
|
18042
|
+
return new google.visualization.BarChart(slot);
|
|
18043
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Combo:
|
|
18044
|
+
return new google.visualization.ComboChart(slot);
|
|
18045
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Area:
|
|
18046
|
+
return new google.visualization.AreaChart(slot);
|
|
18047
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Line:
|
|
18048
|
+
return new google.visualization.LineChart(slot);
|
|
18049
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].SteppedLine:
|
|
18050
|
+
return new google.visualization.SteppedAreaChart(slot);
|
|
18051
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Pie:
|
|
18052
|
+
case _chart_type__WEBPACK_IMPORTED_MODULE_2__[/* ChartType */ "a"].Doughnut:
|
|
18053
|
+
return new google.visualization.PieChart(slot);
|
|
18054
|
+
default:
|
|
18055
|
+
return new google.visualization.PieChart(slot);
|
|
18056
|
+
}
|
|
18057
|
+
};
|
|
18058
|
+
return GoogleChartWidget;
|
|
18059
|
+
}(_chart_widget__WEBPACK_IMPORTED_MODULE_1__[/* ChartWidget */ "a"]));
|
|
18060
|
+
|
|
18061
|
+
//# sourceMappingURL=chart_widget_google.js.map
|
|
18062
|
+
|
|
18063
|
+
/***/ }),
|
|
18064
|
+
/* 54 */
|
|
18065
|
+
/***/ (function(module, exports) {
|
|
18066
|
+
|
|
18067
|
+
// shim for using process in browser
|
|
18068
|
+
var process = module.exports = {};
|
|
18069
|
+
|
|
18070
|
+
// cached from whatever global is present so that test runners that stub it
|
|
18071
|
+
// don't break things. But we need to wrap it in a try catch in case it is
|
|
18072
|
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
18073
|
+
// function because try/catches deoptimize in certain engines.
|
|
18074
|
+
|
|
18075
|
+
var cachedSetTimeout;
|
|
18076
|
+
var cachedClearTimeout;
|
|
18077
|
+
|
|
18078
|
+
function defaultSetTimout() {
|
|
18079
|
+
throw new Error('setTimeout has not been defined');
|
|
18080
|
+
}
|
|
18081
|
+
function defaultClearTimeout () {
|
|
18082
|
+
throw new Error('clearTimeout has not been defined');
|
|
18083
|
+
}
|
|
18084
|
+
(function () {
|
|
18085
|
+
try {
|
|
18086
|
+
if (typeof setTimeout === 'function') {
|
|
18087
|
+
cachedSetTimeout = setTimeout;
|
|
18088
|
+
} else {
|
|
18089
|
+
cachedSetTimeout = defaultSetTimout;
|
|
18090
|
+
}
|
|
18091
|
+
} catch (e) {
|
|
18092
|
+
cachedSetTimeout = defaultSetTimout;
|
|
18093
|
+
}
|
|
18094
|
+
try {
|
|
18095
|
+
if (typeof clearTimeout === 'function') {
|
|
18096
|
+
cachedClearTimeout = clearTimeout;
|
|
18097
|
+
} else {
|
|
18098
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
18099
|
+
}
|
|
18100
|
+
} catch (e) {
|
|
18101
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
18102
|
+
}
|
|
18103
|
+
} ())
|
|
18104
|
+
function runTimeout(fun) {
|
|
18105
|
+
if (cachedSetTimeout === setTimeout) {
|
|
18106
|
+
//normal enviroments in sane situations
|
|
18107
|
+
return setTimeout(fun, 0);
|
|
18108
|
+
}
|
|
18109
|
+
// if setTimeout wasn't available but was latter defined
|
|
18110
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
18111
|
+
cachedSetTimeout = setTimeout;
|
|
18112
|
+
return setTimeout(fun, 0);
|
|
18113
|
+
}
|
|
18114
|
+
try {
|
|
18115
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
18116
|
+
return cachedSetTimeout(fun, 0);
|
|
18117
|
+
} catch(e){
|
|
18118
|
+
try {
|
|
18119
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
18120
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
18121
|
+
} catch(e){
|
|
18122
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
18123
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
18124
|
+
}
|
|
18125
|
+
}
|
|
17896
18126
|
|
|
17897
|
-
Unlike callbacks, promises are great composable primitives.
|
|
17898
18127
|
|
|
17899
|
-
|
|
17900
|
-
|
|
17901
|
-
|
|
17902
|
-
|
|
17903
|
-
|
|
17904
|
-
|
|
17905
|
-
|
|
18128
|
+
}
|
|
18129
|
+
function runClearTimeout(marker) {
|
|
18130
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
18131
|
+
//normal enviroments in sane situations
|
|
18132
|
+
return clearTimeout(marker);
|
|
18133
|
+
}
|
|
18134
|
+
// if clearTimeout wasn't available but was latter defined
|
|
18135
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
18136
|
+
cachedClearTimeout = clearTimeout;
|
|
18137
|
+
return clearTimeout(marker);
|
|
18138
|
+
}
|
|
18139
|
+
try {
|
|
18140
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
18141
|
+
return cachedClearTimeout(marker);
|
|
18142
|
+
} catch (e){
|
|
18143
|
+
try {
|
|
18144
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
18145
|
+
return cachedClearTimeout.call(null, marker);
|
|
18146
|
+
} catch (e){
|
|
18147
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
18148
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
18149
|
+
return cachedClearTimeout.call(this, marker);
|
|
18150
|
+
}
|
|
18151
|
+
}
|
|
17906
18152
|
|
|
17907
|
-
return values;
|
|
17908
|
-
});
|
|
17909
|
-
```
|
|
17910
18153
|
|
|
17911
|
-
@class Promise
|
|
17912
|
-
@param {Function} resolver
|
|
17913
|
-
Useful for tooling.
|
|
17914
|
-
@constructor
|
|
17915
|
-
*/
|
|
17916
18154
|
|
|
17917
|
-
|
|
17918
|
-
|
|
17919
|
-
|
|
17920
|
-
|
|
17921
|
-
|
|
18155
|
+
}
|
|
18156
|
+
var queue = [];
|
|
18157
|
+
var draining = false;
|
|
18158
|
+
var currentQueue;
|
|
18159
|
+
var queueIndex = -1;
|
|
17922
18160
|
|
|
17923
|
-
|
|
17924
|
-
|
|
17925
|
-
|
|
18161
|
+
function cleanUpNextTick() {
|
|
18162
|
+
if (!draining || !currentQueue) {
|
|
18163
|
+
return;
|
|
17926
18164
|
}
|
|
17927
|
-
|
|
17928
|
-
|
|
17929
|
-
|
|
17930
|
-
The primary way of interacting with a promise is through its `then` method,
|
|
17931
|
-
which registers callbacks to receive either a promise's eventual value or the
|
|
17932
|
-
reason why the promise cannot be fulfilled.
|
|
17933
|
-
```js
|
|
17934
|
-
findUser().then(function(user){
|
|
17935
|
-
// user is available
|
|
17936
|
-
}, function(reason){
|
|
17937
|
-
// user is unavailable, and you are given the reason why
|
|
17938
|
-
});
|
|
17939
|
-
```
|
|
17940
|
-
Chaining
|
|
17941
|
-
--------
|
|
17942
|
-
The return value of `then` is itself a promise. This second, 'downstream'
|
|
17943
|
-
promise is resolved with the return value of the first promise's fulfillment
|
|
17944
|
-
or rejection handler, or rejected if the handler throws an exception.
|
|
17945
|
-
```js
|
|
17946
|
-
findUser().then(function (user) {
|
|
17947
|
-
return user.name;
|
|
17948
|
-
}, function (reason) {
|
|
17949
|
-
return 'default name';
|
|
17950
|
-
}).then(function (userName) {
|
|
17951
|
-
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
|
17952
|
-
// will be `'default name'`
|
|
17953
|
-
});
|
|
17954
|
-
findUser().then(function (user) {
|
|
17955
|
-
throw new Error('Found user, but still unhappy');
|
|
17956
|
-
}, function (reason) {
|
|
17957
|
-
throw new Error('`findUser` rejected and we're unhappy');
|
|
17958
|
-
}).then(function (value) {
|
|
17959
|
-
// never reached
|
|
17960
|
-
}, function (reason) {
|
|
17961
|
-
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
|
17962
|
-
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
|
17963
|
-
});
|
|
17964
|
-
```
|
|
17965
|
-
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
|
17966
|
-
```js
|
|
17967
|
-
findUser().then(function (user) {
|
|
17968
|
-
throw new PedagogicalException('Upstream error');
|
|
17969
|
-
}).then(function (value) {
|
|
17970
|
-
// never reached
|
|
17971
|
-
}).then(function (value) {
|
|
17972
|
-
// never reached
|
|
17973
|
-
}, function (reason) {
|
|
17974
|
-
// The `PedgagocialException` is propagated all the way down to here
|
|
17975
|
-
});
|
|
17976
|
-
```
|
|
17977
|
-
Assimilation
|
|
17978
|
-
------------
|
|
17979
|
-
Sometimes the value you want to propagate to a downstream promise can only be
|
|
17980
|
-
retrieved asynchronously. This can be achieved by returning a promise in the
|
|
17981
|
-
fulfillment or rejection handler. The downstream promise will then be pending
|
|
17982
|
-
until the returned promise is settled. This is called *assimilation*.
|
|
17983
|
-
```js
|
|
17984
|
-
findUser().then(function (user) {
|
|
17985
|
-
return findCommentsByAuthor(user);
|
|
17986
|
-
}).then(function (comments) {
|
|
17987
|
-
// The user's comments are now available
|
|
17988
|
-
});
|
|
17989
|
-
```
|
|
17990
|
-
If the assimliated promise rejects, then the downstream promise will also reject.
|
|
17991
|
-
```js
|
|
17992
|
-
findUser().then(function (user) {
|
|
17993
|
-
return findCommentsByAuthor(user);
|
|
17994
|
-
}).then(function (comments) {
|
|
17995
|
-
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
|
17996
|
-
}, function (reason) {
|
|
17997
|
-
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
|
17998
|
-
});
|
|
17999
|
-
```
|
|
18000
|
-
Simple Example
|
|
18001
|
-
--------------
|
|
18002
|
-
Synchronous Example
|
|
18003
|
-
```javascript
|
|
18004
|
-
let result;
|
|
18005
|
-
try {
|
|
18006
|
-
result = findResult();
|
|
18007
|
-
// success
|
|
18008
|
-
} catch(reason) {
|
|
18009
|
-
// failure
|
|
18010
|
-
}
|
|
18011
|
-
```
|
|
18012
|
-
Errback Example
|
|
18013
|
-
```js
|
|
18014
|
-
findResult(function(result, err){
|
|
18015
|
-
if (err) {
|
|
18016
|
-
// failure
|
|
18165
|
+
draining = false;
|
|
18166
|
+
if (currentQueue.length) {
|
|
18167
|
+
queue = currentQueue.concat(queue);
|
|
18017
18168
|
} else {
|
|
18018
|
-
|
|
18169
|
+
queueIndex = -1;
|
|
18019
18170
|
}
|
|
18020
|
-
|
|
18021
|
-
|
|
18022
|
-
Promise Example;
|
|
18023
|
-
```javascript
|
|
18024
|
-
findResult().then(function(result){
|
|
18025
|
-
// success
|
|
18026
|
-
}, function(reason){
|
|
18027
|
-
// failure
|
|
18028
|
-
});
|
|
18029
|
-
```
|
|
18030
|
-
Advanced Example
|
|
18031
|
-
--------------
|
|
18032
|
-
Synchronous Example
|
|
18033
|
-
```javascript
|
|
18034
|
-
let author, books;
|
|
18035
|
-
try {
|
|
18036
|
-
author = findAuthor();
|
|
18037
|
-
books = findBooksByAuthor(author);
|
|
18038
|
-
// success
|
|
18039
|
-
} catch(reason) {
|
|
18040
|
-
// failure
|
|
18041
|
-
}
|
|
18042
|
-
```
|
|
18043
|
-
Errback Example
|
|
18044
|
-
```js
|
|
18045
|
-
function foundBooks(books) {
|
|
18046
|
-
}
|
|
18047
|
-
function failure(reason) {
|
|
18048
|
-
}
|
|
18049
|
-
findAuthor(function(author, err){
|
|
18050
|
-
if (err) {
|
|
18051
|
-
failure(err);
|
|
18052
|
-
// failure
|
|
18053
|
-
} else {
|
|
18054
|
-
try {
|
|
18055
|
-
findBoooksByAuthor(author, function(books, err) {
|
|
18056
|
-
if (err) {
|
|
18057
|
-
failure(err);
|
|
18058
|
-
} else {
|
|
18059
|
-
try {
|
|
18060
|
-
foundBooks(books);
|
|
18061
|
-
} catch(reason) {
|
|
18062
|
-
failure(reason);
|
|
18063
|
-
}
|
|
18064
|
-
}
|
|
18065
|
-
});
|
|
18066
|
-
} catch(error) {
|
|
18067
|
-
failure(err);
|
|
18068
|
-
}
|
|
18069
|
-
// success
|
|
18171
|
+
if (queue.length) {
|
|
18172
|
+
drainQueue();
|
|
18070
18173
|
}
|
|
18071
|
-
|
|
18072
|
-
```
|
|
18073
|
-
Promise Example;
|
|
18074
|
-
```javascript
|
|
18075
|
-
findAuthor().
|
|
18076
|
-
then(findBooksByAuthor).
|
|
18077
|
-
then(function(books){
|
|
18078
|
-
// found books
|
|
18079
|
-
}).catch(function(reason){
|
|
18080
|
-
// something went wrong
|
|
18081
|
-
});
|
|
18082
|
-
```
|
|
18083
|
-
@method then
|
|
18084
|
-
@param {Function} onFulfilled
|
|
18085
|
-
@param {Function} onRejected
|
|
18086
|
-
Useful for tooling.
|
|
18087
|
-
@return {Promise}
|
|
18088
|
-
*/
|
|
18089
|
-
|
|
18090
|
-
/**
|
|
18091
|
-
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
|
|
18092
|
-
as the catch block of a try/catch statement.
|
|
18093
|
-
```js
|
|
18094
|
-
function findAuthor(){
|
|
18095
|
-
throw new Error('couldn't find that author');
|
|
18096
|
-
}
|
|
18097
|
-
// synchronous
|
|
18098
|
-
try {
|
|
18099
|
-
findAuthor();
|
|
18100
|
-
} catch(reason) {
|
|
18101
|
-
// something went wrong
|
|
18102
|
-
}
|
|
18103
|
-
// async with promises
|
|
18104
|
-
findAuthor().catch(function(reason){
|
|
18105
|
-
// something went wrong
|
|
18106
|
-
});
|
|
18107
|
-
```
|
|
18108
|
-
@method catch
|
|
18109
|
-
@param {Function} onRejection
|
|
18110
|
-
Useful for tooling.
|
|
18111
|
-
@return {Promise}
|
|
18112
|
-
*/
|
|
18174
|
+
}
|
|
18113
18175
|
|
|
18176
|
+
function drainQueue() {
|
|
18177
|
+
if (draining) {
|
|
18178
|
+
return;
|
|
18179
|
+
}
|
|
18180
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
18181
|
+
draining = true;
|
|
18114
18182
|
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
|
|
18183
|
+
var len = queue.length;
|
|
18184
|
+
while(len) {
|
|
18185
|
+
currentQueue = queue;
|
|
18186
|
+
queue = [];
|
|
18187
|
+
while (++queueIndex < len) {
|
|
18188
|
+
if (currentQueue) {
|
|
18189
|
+
currentQueue[queueIndex].run();
|
|
18190
|
+
}
|
|
18191
|
+
}
|
|
18192
|
+
queueIndex = -1;
|
|
18193
|
+
len = queue.length;
|
|
18194
|
+
}
|
|
18195
|
+
currentQueue = null;
|
|
18196
|
+
draining = false;
|
|
18197
|
+
runClearTimeout(timeout);
|
|
18198
|
+
}
|
|
18118
18199
|
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
|
|
18122
|
-
|
|
18123
|
-
|
|
18124
|
-
|
|
18125
|
-
```js
|
|
18126
|
-
findAuthor() {
|
|
18127
|
-
if (Math.random() > 0.5) {
|
|
18128
|
-
throw new Error();
|
|
18129
|
-
}
|
|
18130
|
-
return new Author();
|
|
18200
|
+
process.nextTick = function (fun) {
|
|
18201
|
+
var args = new Array(arguments.length - 1);
|
|
18202
|
+
if (arguments.length > 1) {
|
|
18203
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
18204
|
+
args[i - 1] = arguments[i];
|
|
18205
|
+
}
|
|
18131
18206
|
}
|
|
18132
|
-
|
|
18133
|
-
|
|
18134
|
-
|
|
18135
|
-
} catch(error) {
|
|
18136
|
-
return findOtherAuther();
|
|
18137
|
-
} finally {
|
|
18138
|
-
// always runs
|
|
18139
|
-
// doesn't affect the return value
|
|
18207
|
+
queue.push(new Item(fun, args));
|
|
18208
|
+
if (queue.length === 1 && !draining) {
|
|
18209
|
+
runTimeout(drainQueue);
|
|
18140
18210
|
}
|
|
18141
|
-
|
|
18142
|
-
|
|
18143
|
-
Asynchronous example:
|
|
18144
|
-
|
|
18145
|
-
```js
|
|
18146
|
-
findAuthor().catch(function(reason){
|
|
18147
|
-
return findOtherAuther();
|
|
18148
|
-
}).finally(function(){
|
|
18149
|
-
// author was either found, or not
|
|
18150
|
-
});
|
|
18151
|
-
```
|
|
18152
|
-
|
|
18153
|
-
@method finally
|
|
18154
|
-
@param {Function} callback
|
|
18155
|
-
@return {Promise}
|
|
18156
|
-
*/
|
|
18157
|
-
|
|
18211
|
+
};
|
|
18158
18212
|
|
|
18159
|
-
|
|
18160
|
-
|
|
18161
|
-
|
|
18213
|
+
// v8 likes predictible objects
|
|
18214
|
+
function Item(fun, array) {
|
|
18215
|
+
this.fun = fun;
|
|
18216
|
+
this.array = array;
|
|
18217
|
+
}
|
|
18218
|
+
Item.prototype.run = function () {
|
|
18219
|
+
this.fun.apply(null, this.array);
|
|
18220
|
+
};
|
|
18221
|
+
process.title = 'browser';
|
|
18222
|
+
process.browser = true;
|
|
18223
|
+
process.env = {};
|
|
18224
|
+
process.argv = [];
|
|
18225
|
+
process.version = ''; // empty string to avoid regexp issues
|
|
18226
|
+
process.versions = {};
|
|
18162
18227
|
|
|
18163
|
-
|
|
18164
|
-
return promise.then(function (value) {
|
|
18165
|
-
return constructor.resolve(callback()).then(function () {
|
|
18166
|
-
return value;
|
|
18167
|
-
});
|
|
18168
|
-
}, function (reason) {
|
|
18169
|
-
return constructor.resolve(callback()).then(function () {
|
|
18170
|
-
throw reason;
|
|
18171
|
-
});
|
|
18172
|
-
});
|
|
18173
|
-
}
|
|
18228
|
+
function noop() {}
|
|
18174
18229
|
|
|
18175
|
-
|
|
18176
|
-
|
|
18230
|
+
process.on = noop;
|
|
18231
|
+
process.addListener = noop;
|
|
18232
|
+
process.once = noop;
|
|
18233
|
+
process.off = noop;
|
|
18234
|
+
process.removeListener = noop;
|
|
18235
|
+
process.removeAllListeners = noop;
|
|
18236
|
+
process.emit = noop;
|
|
18237
|
+
process.prependListener = noop;
|
|
18238
|
+
process.prependOnceListener = noop;
|
|
18177
18239
|
|
|
18178
|
-
|
|
18179
|
-
}();
|
|
18240
|
+
process.listeners = function (name) { return [] }
|
|
18180
18241
|
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
Promise$1.resolve = resolve$1;
|
|
18185
|
-
Promise$1.reject = reject$1;
|
|
18186
|
-
Promise$1._setScheduler = setScheduler;
|
|
18187
|
-
Promise$1._setAsap = setAsap;
|
|
18188
|
-
Promise$1._asap = asap;
|
|
18242
|
+
process.binding = function (name) {
|
|
18243
|
+
throw new Error('process.binding is not supported');
|
|
18244
|
+
};
|
|
18189
18245
|
|
|
18190
|
-
|
|
18191
|
-
function
|
|
18192
|
-
|
|
18246
|
+
process.cwd = function () { return '/' };
|
|
18247
|
+
process.chdir = function (dir) {
|
|
18248
|
+
throw new Error('process.chdir is not supported');
|
|
18249
|
+
};
|
|
18250
|
+
process.umask = function() { return 0; };
|
|
18193
18251
|
|
|
18194
|
-
if (typeof global !== 'undefined') {
|
|
18195
|
-
local = global;
|
|
18196
|
-
} else if (typeof self !== 'undefined') {
|
|
18197
|
-
local = self;
|
|
18198
|
-
} else {
|
|
18199
|
-
try {
|
|
18200
|
-
local = Function('return this')();
|
|
18201
|
-
} catch (e) {
|
|
18202
|
-
throw new Error('polyfill failed because global object is unavailable in this environment');
|
|
18203
|
-
}
|
|
18204
|
-
}
|
|
18205
18252
|
|
|
18206
|
-
|
|
18253
|
+
/***/ }),
|
|
18254
|
+
/* 55 */
|
|
18255
|
+
/***/ (function(module, exports) {
|
|
18207
18256
|
|
|
18208
|
-
|
|
18209
|
-
var promiseToString = null;
|
|
18210
|
-
try {
|
|
18211
|
-
promiseToString = Object.prototype.toString.call(P.resolve());
|
|
18212
|
-
} catch (e) {
|
|
18213
|
-
// silently ignored
|
|
18214
|
-
}
|
|
18257
|
+
var g;
|
|
18215
18258
|
|
|
18216
|
-
|
|
18217
|
-
|
|
18218
|
-
|
|
18219
|
-
|
|
18259
|
+
// This works in non-strict mode
|
|
18260
|
+
g = (function() {
|
|
18261
|
+
return this;
|
|
18262
|
+
})();
|
|
18220
18263
|
|
|
18221
|
-
|
|
18264
|
+
try {
|
|
18265
|
+
// This works if eval is allowed (see CSP)
|
|
18266
|
+
g = g || new Function("return this")();
|
|
18267
|
+
} catch (e) {
|
|
18268
|
+
// This works if the window reference is available
|
|
18269
|
+
if (typeof window === "object") g = window;
|
|
18222
18270
|
}
|
|
18223
18271
|
|
|
18224
|
-
//
|
|
18225
|
-
|
|
18226
|
-
|
|
18227
|
-
|
|
18228
|
-
return Promise$1;
|
|
18229
|
-
|
|
18230
|
-
})));
|
|
18231
|
-
|
|
18232
|
-
|
|
18272
|
+
// g can still be undefined, but nothing to do about it...
|
|
18273
|
+
// We return undefined, instead of nothing here, so it's
|
|
18274
|
+
// easier to handle this case. if(!global) { ...}
|
|
18233
18275
|
|
|
18234
|
-
|
|
18276
|
+
module.exports = g;
|
|
18235
18277
|
|
|
18236
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(53), __webpack_require__(54)))
|
|
18237
18278
|
|
|
18238
18279
|
/***/ }),
|
|
18239
18280
|
/* 56 */
|
|
@@ -19413,7 +19454,7 @@ return Promise$1;
|
|
|
19413
19454
|
|
|
19414
19455
|
//# sourceMappingURL=es6-promise.map
|
|
19415
19456
|
|
|
19416
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
19457
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(54), __webpack_require__(55)))
|
|
19417
19458
|
|
|
19418
19459
|
/***/ }),
|
|
19419
19460
|
/* 57 */
|
|
@@ -19963,7 +20004,7 @@ var BrowserQueryStorage = /** @class */ (function () {
|
|
|
19963
20004
|
}());
|
|
19964
20005
|
|
|
19965
20006
|
//# sourceMappingURL=query_storage.js.map
|
|
19966
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
20007
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(51)))
|
|
19967
20008
|
|
|
19968
20009
|
/***/ }),
|
|
19969
20010
|
/* 64 */
|
|
@@ -20004,7 +20045,7 @@ var EqModelLoader = /** @class */ (function () {
|
|
|
20004
20045
|
}());
|
|
20005
20046
|
|
|
20006
20047
|
//# sourceMappingURL=model_loader.js.map
|
|
20007
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
20048
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(51)))
|
|
20008
20049
|
|
|
20009
20050
|
/***/ }),
|
|
20010
20051
|
/* 65 */
|
|
@@ -20122,7 +20163,7 @@ var DefaultAggregatesCalculator = /** @class */ (function () {
|
|
|
20122
20163
|
}());
|
|
20123
20164
|
|
|
20124
20165
|
//# sourceMappingURL=eq_aggr_container.js.map
|
|
20125
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
20166
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(51)))
|
|
20126
20167
|
|
|
20127
20168
|
/***/ }),
|
|
20128
20169
|
/* 66 */
|
|
@@ -20181,7 +20222,7 @@ var EasyQueryDataLoader = /** @class */ (function () {
|
|
|
20181
20222
|
}());
|
|
20182
20223
|
|
|
20183
20224
|
//# sourceMappingURL=eq_data_loader.js.map
|
|
20184
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
20225
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(51)))
|
|
20185
20226
|
|
|
20186
20227
|
/***/ }),
|
|
20187
20228
|
/* 67 */
|
|
@@ -21523,7 +21564,7 @@ var DefaultDialogSet = /** @class */ (function () {
|
|
|
21523
21564
|
}());
|
|
21524
21565
|
|
|
21525
21566
|
//# sourceMappingURL=default_dialog_service.js.map
|
|
21526
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
21567
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(107)))
|
|
21527
21568
|
|
|
21528
21569
|
/***/ }),
|
|
21529
21570
|
/* 71 */
|
|
@@ -23376,7 +23417,6 @@ var AggrFuncColumnRendererCB = /** @class */ (function (_super) {
|
|
|
23376
23417
|
.getAttributeByIdSafe(this.column.expr.args[0].value);
|
|
23377
23418
|
};
|
|
23378
23419
|
AggrFuncColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
23379
|
-
console.log('Calling getDefaultCaption() AGGR');
|
|
23380
23420
|
return this.getDefaultTitleText(this.baseAttr) + ' '
|
|
23381
23421
|
+ this.bar.getContext().getModel().getAggrFunctionCaption(this.column.expr.func);
|
|
23382
23422
|
};
|
|
@@ -23726,7 +23766,6 @@ var ColumnRendererCB = /** @class */ (function () {
|
|
|
23726
23766
|
.toDOM();
|
|
23727
23767
|
};
|
|
23728
23768
|
ColumnRendererCB.prototype.getDefaultCaption = function () {
|
|
23729
|
-
console.log('Calling getDefaultCaption() BASE');
|
|
23730
23769
|
return this.getDefaultTitleText(this.baseAttr);
|
|
23731
23770
|
};
|
|
23732
23771
|
ColumnRendererCB.prototype.getDefaultTitleText = function (attr) {
|
|
@@ -24029,7 +24068,7 @@ var TextRenderer = /** @class */ (function () {
|
|
|
24029
24068
|
/* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
24030
24069
|
/* harmony import */ var _easyquery_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
|
24031
24070
|
/* harmony import */ var _easydata_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
|
|
24032
|
-
/* harmony import */ var _condition_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
24071
|
+
/* harmony import */ var _condition_renderer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35);
|
|
24033
24072
|
/* harmony import */ var _utils_browser_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
|
|
24034
24073
|
/* harmony import */ var _utils_dropdown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79);
|
|
24035
24074
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
@@ -25569,7 +25608,7 @@ var ProcessWidget = /** @class */ (function (_super) {
|
|
|
25569
25608
|
/* harmony import */ var _types_facet_type__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
|
|
25570
25609
|
/* harmony import */ var _result_facet__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31);
|
|
25571
25610
|
/* harmony import */ var _widgets_charts_chart_widget_chartjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46);
|
|
25572
|
-
/* harmony import */ var _widgets_charts_chart_widget_google__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
25611
|
+
/* harmony import */ var _widgets_charts_chart_widget_google__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(53);
|
|
25573
25612
|
/* harmony import */ var _utils_browser_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
|
|
25574
25613
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
25575
25614
|
var extendStatics = function (d, b) {
|
|
@@ -25843,6 +25882,12 @@ var AggrFunc;
|
|
|
25843
25882
|
AggrFunc["Max"] = "MAX";
|
|
25844
25883
|
AggrFunc["Count"] = "COUNT";
|
|
25845
25884
|
})(AggrFunc || (AggrFunc = {}));
|
|
25885
|
+
var FormFieldType;
|
|
25886
|
+
(function (FormFieldType) {
|
|
25887
|
+
FormFieldType[FormFieldType["ColumnField"] = 0] = "ColumnField";
|
|
25888
|
+
FormFieldType[FormFieldType["RowField"] = 1] = "RowField";
|
|
25889
|
+
FormFieldType[FormFieldType["CellData"] = 2] = "CellData";
|
|
25890
|
+
})(FormFieldType || (FormFieldType = {}));
|
|
25846
25891
|
var DFMT_REGEX = /{0:(.*?)}/g;
|
|
25847
25892
|
var PivotTableFacet = /** @class */ (function (_super) {
|
|
25848
25893
|
__extends(PivotTableFacet, _super);
|
|
@@ -25931,9 +25976,10 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
25931
25976
|
}
|
|
25932
25977
|
return csb;
|
|
25933
25978
|
};
|
|
25934
|
-
PivotTableFacet.prototype.createColumnsSelectBuilder = function (allowedTypes, colName) {
|
|
25979
|
+
PivotTableFacet.prototype.createColumnsSelectBuilder = function (allowedTypes, colName, formFieldType) {
|
|
25935
25980
|
var dataTable = this.getContextDataTable();
|
|
25936
25981
|
var csb = Object(_easydata_ui__WEBPACK_IMPORTED_MODULE_0__["domel"])('select');
|
|
25982
|
+
var firstNumericColIndex = null;
|
|
25937
25983
|
var _loop_2 = function (i) {
|
|
25938
25984
|
var column = dataTable.columns.get(i);
|
|
25939
25985
|
var colLabel = column.label;
|
|
@@ -25941,6 +25987,9 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
25941
25987
|
var colId = column.id;
|
|
25942
25988
|
if (allowedTypes && allowedTypes.indexOf(colType) < 0)
|
|
25943
25989
|
return "continue";
|
|
25990
|
+
if (firstNumericColIndex === null && _easydata_core__WEBPACK_IMPORTED_MODULE_1__["utils"].isNumericType(colType)) {
|
|
25991
|
+
firstNumericColIndex = i;
|
|
25992
|
+
}
|
|
25944
25993
|
csb.addChild('option', function (b) {
|
|
25945
25994
|
b
|
|
25946
25995
|
.attr('value', colId)
|
|
@@ -25962,7 +26011,20 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
25962
26011
|
}
|
|
25963
26012
|
}
|
|
25964
26013
|
else {
|
|
25965
|
-
|
|
26014
|
+
switch (formFieldType) {
|
|
26015
|
+
case FormFieldType.ColumnField: {
|
|
26016
|
+
csb.toDOM().value = options[0].value;
|
|
26017
|
+
break;
|
|
26018
|
+
}
|
|
26019
|
+
case FormFieldType.RowField: {
|
|
26020
|
+
csb.toDOM().value = options.length > 1 ? options[1].value : options[0].value;
|
|
26021
|
+
break;
|
|
26022
|
+
}
|
|
26023
|
+
case FormFieldType.CellData: {
|
|
26024
|
+
csb.toDOM().value = firstNumericColIndex === null ? options[0].value : options[firstNumericColIndex].value;
|
|
26025
|
+
break;
|
|
26026
|
+
}
|
|
26027
|
+
}
|
|
25966
26028
|
}
|
|
25967
26029
|
}
|
|
25968
26030
|
return csb;
|
|
@@ -26007,7 +26069,7 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
26007
26069
|
.addChild('div', function (b) { return b
|
|
26008
26070
|
.addClass('kfrm-select')
|
|
26009
26071
|
.attr('name', 'column_field')
|
|
26010
|
-
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.colName)
|
|
26072
|
+
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.colName, FormFieldType.ColumnField)
|
|
26011
26073
|
.id('pivotTableColFieldSelector')
|
|
26012
26074
|
.toDOM()); })
|
|
26013
26075
|
.addChild('button', function (b) { return b
|
|
@@ -26029,7 +26091,7 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
26029
26091
|
.addChild('div', function (b) { return b
|
|
26030
26092
|
.addClass('kfrm-select')
|
|
26031
26093
|
.attr('name', 'row_field')
|
|
26032
|
-
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.rowName)
|
|
26094
|
+
.addChildElement(_this.createColumnsSelectBuilder(colTypes, settings.rowName, FormFieldType.RowField)
|
|
26033
26095
|
.id('pivotTableRowFieldSelector')
|
|
26034
26096
|
.toDOM()); });
|
|
26035
26097
|
current = getCurrent();
|
|
@@ -26049,7 +26111,7 @@ var PivotTableFacet = /** @class */ (function (_super) {
|
|
|
26049
26111
|
.addChild('div', function (b) { return b
|
|
26050
26112
|
.addClass('kfrm-select')
|
|
26051
26113
|
.attr('name', 'data_column')
|
|
26052
|
-
.addChildElement(_this.createColumnsSelectBuilder(fieldTypes, settings.fieldName)
|
|
26114
|
+
.addChildElement(_this.createColumnsSelectBuilder(fieldTypes, settings.fieldName, FormFieldType.CellData)
|
|
26053
26115
|
.on('change', function (ev) {
|
|
26054
26116
|
var colId = ev.target.value;
|
|
26055
26117
|
_this.validateSelectedField(colId);
|
|
@@ -26816,7 +26878,7 @@ var AggrSettingsDialog = /** @class */ (function () {
|
|
|
26816
26878
|
var ds = _this.context.getServices().getDialogService();
|
|
26817
26879
|
_this.body = _this.renderBody();
|
|
26818
26880
|
var dlg = ds.open({
|
|
26819
|
-
title: '
|
|
26881
|
+
title: _easyquery_core__WEBPACK_IMPORTED_MODULE_1__["i18n"].getText('AggrSettings', 'AggrDialogTitle'),
|
|
26820
26882
|
body: _this.body,
|
|
26821
26883
|
onSubmit: function () {
|
|
26822
26884
|
if (_this.query.enableAggregation && !_this.renderer.isValid())
|
|
@@ -26877,10 +26939,10 @@ var AggrSettingsDialog = /** @class */ (function () {
|
|
|
26877
26939
|
b.on('change', _this.enableAggrCheckBoxChangeHandler.bind(_this));
|
|
26878
26940
|
})
|
|
26879
26941
|
.addChild('span', function (b) { return b
|
|
26880
|
-
.addClass('slider round'); })
|
|
26942
|
+
.addClass('slider round'); })
|
|
26881
26943
|
.addChild('span', function (b) { return b
|
|
26882
26944
|
.addClass('switch-text')
|
|
26883
|
-
.addText(_easyquery_core__WEBPACK_IMPORTED_MODULE_1__["i18n"].getText('AggrSettings', 'EnableAggrLabel')); }); })
|
|
26945
|
+
.addText(_easyquery_core__WEBPACK_IMPORTED_MODULE_1__["i18n"].getText('AggrSettings', 'EnableAggrLabel')); }); }); })
|
|
26884
26946
|
.addChild('div', function (b) { return b
|
|
26885
26947
|
.id('AggrSettingsComponent'); });
|
|
26886
26948
|
return b.toDOM();
|
|
@@ -27059,10 +27121,10 @@ var AggrSettingsRenderer = /** @class */ (function () {
|
|
|
27059
27121
|
b.on('change', _this.countsCheckboxChangeHandler.bind(_this));
|
|
27060
27122
|
})
|
|
27061
27123
|
.addChild('span', function (b) { return b
|
|
27062
|
-
.addClass('slider round'); })
|
|
27124
|
+
.addClass('slider round'); })
|
|
27063
27125
|
.addChild('span', function (b) { return b
|
|
27064
27126
|
.addClass('switch-text')
|
|
27065
|
-
.addText(_easyquery_core__WEBPACK_IMPORTED_MODULE_3__["i18n"].getText('AggrSettings', 'GroupCountsLabel')); }); })
|
|
27127
|
+
.addText(_easyquery_core__WEBPACK_IMPORTED_MODULE_3__["i18n"].getText('AggrSettings', 'GroupCountsLabel')); }); }); })
|
|
27066
27128
|
.addChild('div', function (b) { return b
|
|
27067
27129
|
.addClass(_this.cssPrefix + "-grandtotals")
|
|
27068
27130
|
.addChild('label', function (b) { return b
|
|
@@ -27075,10 +27137,10 @@ var AggrSettingsRenderer = /** @class */ (function () {
|
|
|
27075
27137
|
b.on('change', _this.grandCheckboxChangeHandler.bind(_this));
|
|
27076
27138
|
})
|
|
27077
27139
|
.addChild('span', function (b) { return b
|
|
27078
|
-
.addClass('slider round'); })
|
|
27140
|
+
.addClass('slider round'); })
|
|
27079
27141
|
.addChild('span', function (b) { return b
|
|
27080
27142
|
.addClass('switch-text')
|
|
27081
|
-
.addText(_easyquery_core__WEBPACK_IMPORTED_MODULE_3__["i18n"].getText('AggrSettings', 'GrandTotalsLabel')); }); });
|
|
27143
|
+
.addText(_easyquery_core__WEBPACK_IMPORTED_MODULE_3__["i18n"].getText('AggrSettings', 'GrandTotalsLabel')); }); }); });
|
|
27082
27144
|
var groups = this.slot.querySelectorAll("." + this.cssPrefix + "-group");
|
|
27083
27145
|
groups.forEach(function (el) {
|
|
27084
27146
|
Object(_easydata_ui__WEBPACK_IMPORTED_MODULE_1__["domel"])(el)
|
|
@@ -28436,6 +28498,9 @@ var result_facets_panel_ResultFacetsPanel = /** @class */ (function (_super) {
|
|
|
28436
28498
|
ResultFacetsPanel.prototype.attachQueryObserver = function () {
|
|
28437
28499
|
var _this = this;
|
|
28438
28500
|
var query = this.getQuery();
|
|
28501
|
+
if (this.queryEventCallbackId) {
|
|
28502
|
+
query.removeChangedCallback(this.queryEventCallbackId);
|
|
28503
|
+
}
|
|
28439
28504
|
this.queryEventCallbackId = query.addChangedCallback(function (event) {
|
|
28440
28505
|
//if something has changed, and that change is related to columns
|
|
28441
28506
|
var edata = event.data;
|
|
@@ -30035,7 +30100,7 @@ return Promise$1;
|
|
|
30035
30100
|
|
|
30036
30101
|
//# sourceMappingURL=es6-promise.map
|
|
30037
30102
|
|
|
30038
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
30103
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(113), __webpack_require__(114)))
|
|
30039
30104
|
|
|
30040
30105
|
/***/ }),
|
|
30041
30106
|
/* 101 */
|
|
@@ -30045,8 +30110,8 @@ return Promise$1;
|
|
|
30045
30110
|
/* WEBPACK VAR INJECTION */(function(Promise) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return HttpResponseError; });
|
|
30046
30111
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HttpClient; });
|
|
30047
30112
|
/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
30048
|
-
/* harmony import */ var _http_action_result__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
30049
|
-
/* harmony import */ var _http_method__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
30113
|
+
/* harmony import */ var _http_action_result__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(110);
|
|
30114
|
+
/* harmony import */ var _http_method__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36);
|
|
30050
30115
|
/* harmony import */ var _http_request__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57);
|
|
30051
30116
|
var __extends = (undefined && undefined.__extends) || (function () {
|
|
30052
30117
|
var extendStatics = function (d, b) {
|
|
@@ -31369,7 +31434,7 @@ return Promise$1;
|
|
|
31369
31434
|
|
|
31370
31435
|
//# sourceMappingURL=es6-promise.map
|
|
31371
31436
|
|
|
31372
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
31437
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(54), __webpack_require__(55)))
|
|
31373
31438
|
|
|
31374
31439
|
/***/ }),
|
|
31375
31440
|
/* 103 */
|
|
@@ -31541,6 +31606,7 @@ var EasyDataTable = /** @class */ (function () {
|
|
|
31541
31606
|
this.cachedRows = [];
|
|
31542
31607
|
this.total = 0;
|
|
31543
31608
|
this.needTotal = !this._elasticChunks;
|
|
31609
|
+
this.fireUpdated();
|
|
31544
31610
|
};
|
|
31545
31611
|
EasyDataTable.prototype.createRow = function (dataOrRow) {
|
|
31546
31612
|
var _this = this;
|
|
@@ -31803,13 +31869,40 @@ var GoogleDataConverter = /** @class */ (function () {
|
|
|
31803
31869
|
/* 105 */
|
|
31804
31870
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
31805
31871
|
|
|
31872
|
+
"use strict";
|
|
31873
|
+
/* WEBPACK VAR INJECTION */(function(Promise) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return InMemoryModelStorage; });
|
|
31874
|
+
/* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
31875
|
+
|
|
31876
|
+
var InMemoryModelStorage = /** @class */ (function () {
|
|
31877
|
+
function InMemoryModelStorage(models) {
|
|
31878
|
+
this.models = [];
|
|
31879
|
+
if (models) {
|
|
31880
|
+
_easydata_core__WEBPACK_IMPORTED_MODULE_0__["utils"].assign(this.models, [], models);
|
|
31881
|
+
}
|
|
31882
|
+
}
|
|
31883
|
+
InMemoryModelStorage.prototype.getModels = function () {
|
|
31884
|
+
var _this = this;
|
|
31885
|
+
return new Promise(function (resolve, reject) {
|
|
31886
|
+
resolve(_this.models);
|
|
31887
|
+
});
|
|
31888
|
+
};
|
|
31889
|
+
return InMemoryModelStorage;
|
|
31890
|
+
}());
|
|
31891
|
+
|
|
31892
|
+
//# sourceMappingURL=model_storage.js.map
|
|
31893
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(51)))
|
|
31894
|
+
|
|
31895
|
+
/***/ }),
|
|
31896
|
+
/* 106 */
|
|
31897
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
31898
|
+
|
|
31806
31899
|
"use strict";
|
|
31807
31900
|
/* WEBPACK VAR INJECTION */(function(Promise) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return EasyGrid; });
|
|
31808
31901
|
/* harmony import */ var _easydata_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
31809
|
-
/* harmony import */ var _utils_drag_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
31902
|
+
/* harmony import */ var _utils_drag_manager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37);
|
|
31810
31903
|
/* harmony import */ var _utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6);
|
|
31811
31904
|
/* harmony import */ var _utils_ui_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
|
|
31812
|
-
/* harmony import */ var _easy_grid_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
31905
|
+
/* harmony import */ var _easy_grid_options__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(34);
|
|
31813
31906
|
/* harmony import */ var _easy_grid_columns__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(21);
|
|
31814
31907
|
/* harmony import */ var _easy_grid_cell_renderer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(39);
|
|
31815
31908
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
@@ -31864,7 +31957,7 @@ var EasyGrid = /** @class */ (function () {
|
|
|
31864
31957
|
pageSizeItems: [20, 30, 50, 100, 200]
|
|
31865
31958
|
},
|
|
31866
31959
|
columnWidths: {
|
|
31867
|
-
autoResize: _easy_grid_options__WEBPACK_IMPORTED_MODULE_4__[/* AutoResizeColumns */ "a"].
|
|
31960
|
+
autoResize: _easy_grid_options__WEBPACK_IMPORTED_MODULE_4__[/* AutoResizeColumns */ "a"].Always,
|
|
31868
31961
|
stringColumns: {
|
|
31869
31962
|
min: 100,
|
|
31870
31963
|
max: 500,
|
|
@@ -32102,9 +32195,6 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32102
32195
|
.then(function () {
|
|
32103
32196
|
_this.firstRender = false;
|
|
32104
32197
|
_this.rowsOnPagePromise = null;
|
|
32105
|
-
if (needAutoResize) {
|
|
32106
|
-
_this.resizeColumns();
|
|
32107
|
-
}
|
|
32108
32198
|
});
|
|
32109
32199
|
}
|
|
32110
32200
|
else {
|
|
@@ -32277,9 +32367,15 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32277
32367
|
_this.updateTotalsState(groups_1, row, true);
|
|
32278
32368
|
}
|
|
32279
32369
|
}
|
|
32280
|
-
var
|
|
32281
|
-
|
|
32282
|
-
.
|
|
32370
|
+
var needAutoResize = _this.options.columnWidths.autoResize !== _easy_grid_options__WEBPACK_IMPORTED_MODULE_4__[/* AutoResizeColumns */ "a"].Never;
|
|
32371
|
+
if (needAutoResize) {
|
|
32372
|
+
_this.resizeColumns();
|
|
32373
|
+
}
|
|
32374
|
+
else {
|
|
32375
|
+
var containerWidth = _this.getContainerWidth();
|
|
32376
|
+
Object(_utils_dom_elem_builder__WEBPACK_IMPORTED_MODULE_2__[/* domel */ "e"])(_this.bodyCellContainerDiv)
|
|
32377
|
+
.setStyle('width', containerWidth + "px");
|
|
32378
|
+
}
|
|
32283
32379
|
return rowsToRender;
|
|
32284
32380
|
})
|
|
32285
32381
|
.catch(function (error) { console.error(error); return 0; });
|
|
@@ -32967,10 +33063,10 @@ var EasyGrid = /** @class */ (function () {
|
|
|
32967
33063
|
}());
|
|
32968
33064
|
|
|
32969
33065
|
//# sourceMappingURL=easy_grid.js.map
|
|
32970
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
33066
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(107)))
|
|
32971
33067
|
|
|
32972
33068
|
/***/ }),
|
|
32973
|
-
/*
|
|
33069
|
+
/* 107 */
|
|
32974
33070
|
/***/ (function(module, exports, __webpack_require__) {
|
|
32975
33071
|
|
|
32976
33072
|
/* WEBPACK VAR INJECTION */(function(process, global) {/*!
|
|
@@ -34147,10 +34243,10 @@ return Promise$1;
|
|
|
34147
34243
|
|
|
34148
34244
|
//# sourceMappingURL=es6-promise.map
|
|
34149
34245
|
|
|
34150
|
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(
|
|
34246
|
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(54), __webpack_require__(55)))
|
|
34151
34247
|
|
|
34152
34248
|
/***/ }),
|
|
34153
|
-
/*
|
|
34249
|
+
/* 108 */
|
|
34154
34250
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
34155
34251
|
|
|
34156
34252
|
"use strict";
|
|
@@ -34879,7 +34975,7 @@ var AdvancedSearchView = /** @class */ (function (_super) {
|
|
|
34879
34975
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(56)))
|
|
34880
34976
|
|
|
34881
34977
|
/***/ }),
|
|
34882
|
-
/*
|
|
34978
|
+
/* 109 */
|
|
34883
34979
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
34884
34980
|
|
|
34885
34981
|
"use strict";
|
|
@@ -35004,7 +35100,6 @@ var EqServerAggregatesCalculator = /** @class */ (function () {
|
|
|
35004
35100
|
dataTable.addRow(row);
|
|
35005
35101
|
}
|
|
35006
35102
|
var levelData = _this.buildLevelData(options.level, dataTable);
|
|
35007
|
-
console.log('Level', options.level, levelData);
|
|
35008
35103
|
_this.aggrContainer.setAggregateData(options.level, levelData);
|
|
35009
35104
|
if (options.resultObtainedCallback) {
|
|
35010
35105
|
options.resultObtainedCallback(result, options.level);
|
|
@@ -35063,7 +35158,7 @@ var EqServerAggregatesCalculator = /** @class */ (function () {
|
|
|
35063
35158
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(100)))
|
|
35064
35159
|
|
|
35065
35160
|
/***/ }),
|
|
35066
|
-
/*
|
|
35161
|
+
/* 110 */
|
|
35067
35162
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35068
35163
|
|
|
35069
35164
|
"use strict";
|
|
@@ -35094,7 +35189,7 @@ var HttpActionResult = /** @class */ (function () {
|
|
|
35094
35189
|
//# sourceMappingURL=http_action_result.js.map
|
|
35095
35190
|
|
|
35096
35191
|
/***/ }),
|
|
35097
|
-
/*
|
|
35192
|
+
/* 111 */
|
|
35098
35193
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35099
35194
|
|
|
35100
35195
|
"use strict";
|
|
@@ -35143,17 +35238,19 @@ var DataTableAggregatesCalculator = /** @class */ (function () {
|
|
|
35143
35238
|
this.levelsTotals.push(levelTotals);
|
|
35144
35239
|
}
|
|
35145
35240
|
var allRows = this.context.resultTable.getCachedRows();
|
|
35146
|
-
|
|
35147
|
-
var
|
|
35148
|
-
|
|
35149
|
-
|
|
35150
|
-
|
|
35151
|
-
|
|
35152
|
-
|
|
35153
|
-
|
|
35154
|
-
|
|
35155
|
-
|
|
35156
|
-
this.
|
|
35241
|
+
if (allRows.length > 0) {
|
|
35242
|
+
for (var _i = 0, allRows_1 = allRows; _i < allRows_1.length; _i++) {
|
|
35243
|
+
var row = allRows_1[_i];
|
|
35244
|
+
this.processDataRow(row);
|
|
35245
|
+
}
|
|
35246
|
+
//flusing the totals for all group levels
|
|
35247
|
+
for (var levelIndex = 1; levelIndex < levelNumber; levelIndex++) {
|
|
35248
|
+
this.flushLevelTotals(levelIndex);
|
|
35249
|
+
}
|
|
35250
|
+
//flusing the grand totals (if they are turned on)
|
|
35251
|
+
if (this.aggrSettings.hasGrandTotals()) {
|
|
35252
|
+
this.flushLevelTotals(0);
|
|
35253
|
+
}
|
|
35157
35254
|
}
|
|
35158
35255
|
return Promise.resolve();
|
|
35159
35256
|
};
|
|
@@ -35267,14 +35364,14 @@ var DataTableAggregatesCalculator = /** @class */ (function () {
|
|
|
35267
35364
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(100)))
|
|
35268
35365
|
|
|
35269
35366
|
/***/ }),
|
|
35270
|
-
/*
|
|
35367
|
+
/* 112 */
|
|
35271
35368
|
/***/ (function(module, exports, __webpack_require__) {
|
|
35272
35369
|
|
|
35273
|
-
module.exports = __webpack_require__(
|
|
35370
|
+
module.exports = __webpack_require__(115);
|
|
35274
35371
|
|
|
35275
35372
|
|
|
35276
35373
|
/***/ }),
|
|
35277
|
-
/*
|
|
35374
|
+
/* 113 */
|
|
35278
35375
|
/***/ (function(module, exports) {
|
|
35279
35376
|
|
|
35280
35377
|
// shim for using process in browser
|
|
@@ -35464,7 +35561,7 @@ process.umask = function() { return 0; };
|
|
|
35464
35561
|
|
|
35465
35562
|
|
|
35466
35563
|
/***/ }),
|
|
35467
|
-
/*
|
|
35564
|
+
/* 114 */
|
|
35468
35565
|
/***/ (function(module, exports) {
|
|
35469
35566
|
|
|
35470
35567
|
var g;
|
|
@@ -35490,7 +35587,7 @@ module.exports = g;
|
|
|
35490
35587
|
|
|
35491
35588
|
|
|
35492
35589
|
/***/ }),
|
|
35493
|
-
/*
|
|
35590
|
+
/* 115 */
|
|
35494
35591
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35495
35592
|
|
|
35496
35593
|
"use strict";
|
|
@@ -36047,7 +36144,7 @@ var chart_type = __webpack_require__(5);
|
|
|
36047
36144
|
var chart_widget = __webpack_require__(47);
|
|
36048
36145
|
|
|
36049
36146
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/charts/chart_widget_google.js
|
|
36050
|
-
var chart_widget_google = __webpack_require__(
|
|
36147
|
+
var chart_widget_google = __webpack_require__(53);
|
|
36051
36148
|
|
|
36052
36149
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/charts/chart_widget_chartjs.js
|
|
36053
36150
|
var chart_widget_chartjs = __webpack_require__(46);
|
|
@@ -36089,13 +36186,13 @@ var input_expression_renderer = __webpack_require__(80);
|
|
|
36089
36186
|
var datetime_expression_render = __webpack_require__(83);
|
|
36090
36187
|
|
|
36091
36188
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/condition_renderer.js
|
|
36092
|
-
var condition_renderer = __webpack_require__(
|
|
36189
|
+
var condition_renderer = __webpack_require__(35);
|
|
36093
36190
|
|
|
36094
36191
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/condition_group_renderer.js
|
|
36095
36192
|
var condition_group_renderer = __webpack_require__(78);
|
|
36096
36193
|
|
|
36097
36194
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/attribute_expression_renderer.js
|
|
36098
|
-
var attribute_expression_renderer = __webpack_require__(
|
|
36195
|
+
var attribute_expression_renderer = __webpack_require__(52);
|
|
36099
36196
|
|
|
36100
36197
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/widgets/renderers/querypanel/expression_renderer.js
|
|
36101
36198
|
var expression_renderer = __webpack_require__(23);
|
|
@@ -36131,7 +36228,7 @@ var pivot_table_facet = __webpack_require__(90);
|
|
|
36131
36228
|
var view = __webpack_require__(32);
|
|
36132
36229
|
|
|
36133
36230
|
// EXTERNAL MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/views/adv_search_view.js
|
|
36134
|
-
var adv_search_view = __webpack_require__(
|
|
36231
|
+
var adv_search_view = __webpack_require__(108);
|
|
36135
36232
|
|
|
36136
36233
|
// CONCATENATED MODULE: c:/azuredevops-agents/korzhdev/_work/1/s/packs/ui/dist/lib/views/data_filter_view.js
|
|
36137
36234
|
var data_filter_view_extends = (undefined && undefined.__extends) || (function () {
|
|
@@ -36155,7 +36252,9 @@ var data_filter_view_extends = (undefined && undefined.__extends) || (function (
|
|
|
36155
36252
|
var data_filter_view_DataFilterView = /** @class */ (function (_super) {
|
|
36156
36253
|
data_filter_view_extends(DataFilterView, _super);
|
|
36157
36254
|
function DataFilterView() {
|
|
36158
|
-
|
|
36255
|
+
var _this = _super.call(this) || this;
|
|
36256
|
+
_this.resultOptions.fetchEmptyQueries = true;
|
|
36257
|
+
return _this;
|
|
36159
36258
|
}
|
|
36160
36259
|
DataFilterView.prototype.initOptions = function (options) {
|
|
36161
36260
|
var _this = this;
|
|
@@ -36233,7 +36332,9 @@ var html_data_filter_view_extends = (undefined && undefined.__extends) || (funct
|
|
|
36233
36332
|
var html_data_filter_view_HtmlDataFilterView = /** @class */ (function (_super) {
|
|
36234
36333
|
html_data_filter_view_extends(HtmlDataFilterView, _super);
|
|
36235
36334
|
function HtmlDataFilterView() {
|
|
36236
|
-
|
|
36335
|
+
var _this = _super.call(this) || this;
|
|
36336
|
+
_this.resultOptions.fetchEmptyQueries = true;
|
|
36337
|
+
return _this;
|
|
36237
36338
|
}
|
|
36238
36339
|
/**
|
|
36239
36340
|
* Creates the widget that represents Grid Widget.
|
|
@@ -36306,7 +36407,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
36306
36407
|
_this.loadReportButtonClickHandler = _this.loadReportButtonClick.bind(_this);
|
|
36307
36408
|
_this.saveReportButtonClickHandler = _this.saveReportButtonClick.bind(_this);
|
|
36308
36409
|
_this.removeReportButtonClickHandler = _this.removeReportButtonClick.bind(_this);
|
|
36309
|
-
_this.
|
|
36410
|
+
_this.reloadReportDataButtonClickHandler = _this.reloadReportDataButtonClick.bind(_this);
|
|
36310
36411
|
browser_utils["a" /* browserUtils */].onMobileModeChanged(function (_) {
|
|
36311
36412
|
document.location.reload();
|
|
36312
36413
|
});
|
|
@@ -36393,7 +36494,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
36393
36494
|
var loadReportButton = "LoadReportButton";
|
|
36394
36495
|
var saveReportButton = "SaveReportButton";
|
|
36395
36496
|
var removeReportButton = "RemoveReportButton";
|
|
36396
|
-
var
|
|
36497
|
+
var reloadReportDataButton = "ReloadReportDataButton";
|
|
36397
36498
|
var resultCountSpan = "ResultCount";
|
|
36398
36499
|
var exportButtons = "ResultExportButtons";
|
|
36399
36500
|
var exportClass = this.exportClass;
|
|
@@ -36405,7 +36506,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
36405
36506
|
loadReportButton = options.slots.loadReportButton || loadReportButton;
|
|
36406
36507
|
saveReportButton = options.slots.saveReportButton || saveReportButton;
|
|
36407
36508
|
removeReportButton = options.slots.removeReportButton || removeReportButton;
|
|
36408
|
-
|
|
36509
|
+
reloadReportDataButton = options.slots.reloadReportDataButton || reloadReportDataButton;
|
|
36409
36510
|
exportClass = options.slots.exportClass || exportClass;
|
|
36410
36511
|
}
|
|
36411
36512
|
this.exportButtons = this.domRoots.reduce(function (elems, root) {
|
|
@@ -36452,10 +36553,14 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
36452
36553
|
this.removeReportButton.addEventListener('click', this.removeReportButtonClickHandler);
|
|
36453
36554
|
}
|
|
36454
36555
|
}
|
|
36455
|
-
if (!this.
|
|
36456
|
-
this.
|
|
36457
|
-
|
|
36458
|
-
|
|
36556
|
+
if (!this.reloadReportDataButton) {
|
|
36557
|
+
this.reloadReportDataButton = this.resolveElement(reloadReportDataButton);
|
|
36558
|
+
//OBSOLETE: remove the next 3 lines. We just support the old default button ID here
|
|
36559
|
+
if (!this.reloadReportDataButton) {
|
|
36560
|
+
this.reloadReportDataButton = this.resolveElement('UpdateReportButton');
|
|
36561
|
+
}
|
|
36562
|
+
if (this.reloadReportDataButton) {
|
|
36563
|
+
this.reloadReportDataButton.addEventListener('click', this.reloadReportDataButtonClickHandler);
|
|
36459
36564
|
}
|
|
36460
36565
|
}
|
|
36461
36566
|
this.reportListSlot = document.getElementById('ReportList');
|
|
@@ -36533,6 +36638,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
36533
36638
|
var query = self.context.getQuery();
|
|
36534
36639
|
var reportLoaded = function () {
|
|
36535
36640
|
_this.renderReportProps();
|
|
36641
|
+
_this.context.resultTable.clear();
|
|
36536
36642
|
query.fireChangedEvent({
|
|
36537
36643
|
part: public_api["QueryChangePart"].All,
|
|
36538
36644
|
noSync: true,
|
|
@@ -36759,8 +36865,8 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
36759
36865
|
this.removeReportButton.removeEventListener('click', this.removeReportButtonClickHandler);
|
|
36760
36866
|
this.removeReportButton = null;
|
|
36761
36867
|
}
|
|
36762
|
-
if (this.
|
|
36763
|
-
this.
|
|
36868
|
+
if (this.reloadReportDataButton) {
|
|
36869
|
+
this.reloadReportDataButton.removeEventListener('click', this.reloadReportDataButtonClickHandler);
|
|
36764
36870
|
this.removeReportButton = null;
|
|
36765
36871
|
}
|
|
36766
36872
|
if (this.reportListSlot) {
|
|
@@ -36861,7 +36967,7 @@ var report_view_ReportView = /** @class */ (function (_super) {
|
|
|
36861
36967
|
/**
|
|
36862
36968
|
* The handler of the "Update" button click.
|
|
36863
36969
|
*/
|
|
36864
|
-
ReportView.prototype.
|
|
36970
|
+
ReportView.prototype.reloadReportDataButtonClick = function () {
|
|
36865
36971
|
this.fetchData();
|
|
36866
36972
|
};
|
|
36867
36973
|
/**
|
|
@@ -37226,6 +37332,7 @@ function addEasyQueryUITexts() {
|
|
|
37226
37332
|
UnaggrBtn: 'Remove column aggregation',
|
|
37227
37333
|
GrandTotalsLabel: 'Show grand totals',
|
|
37228
37334
|
GroupCountsLabel: 'Show record count for groups',
|
|
37335
|
+
AggrDialogTitle: 'Aggregation/grouping',
|
|
37229
37336
|
EnableAggrLabel: 'Enable aggregation',
|
|
37230
37337
|
SelectedError: 'Complete the action with selected column(s)',
|
|
37231
37338
|
NoGroupsOrAggrError: 'Add at least one group or aggregation',
|
|
@@ -37846,7 +37953,7 @@ var model_ex_DataModelEx = /** @class */ (function (_super) {
|
|
|
37846
37953
|
|
|
37847
37954
|
//# sourceMappingURL=model_ex.js.map
|
|
37848
37955
|
// EXTERNAL MODULE: ./dist/lib/data/data_table_aggr_calculator.js
|
|
37849
|
-
var data_table_aggr_calculator = __webpack_require__(
|
|
37956
|
+
var data_table_aggr_calculator = __webpack_require__(111);
|
|
37850
37957
|
|
|
37851
37958
|
// CONCATENATED MODULE: ./dist/lib/extensions.js
|
|
37852
37959
|
|
|
@@ -38000,7 +38107,7 @@ function hideTrialWM() {
|
|
|
38000
38107
|
}
|
|
38001
38108
|
//# sourceMappingURL=extensions.js.map
|
|
38002
38109
|
// EXTERNAL MODULE: ./dist/lib/data/eqs_aggr_calculator.js
|
|
38003
|
-
var eqs_aggr_calculator = __webpack_require__(
|
|
38110
|
+
var eqs_aggr_calculator = __webpack_require__(109);
|
|
38004
38111
|
|
|
38005
38112
|
// CONCATENATED MODULE: ./dist/lib/public_api.js
|
|
38006
38113
|
|