@refinitiv-ui/efx-grid 6.0.91 → 6.0.93
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/column-dragging/es6/ColumnDragging.d.ts +1 -1
- package/lib/column-dragging/es6/ColumnDragging.js +144 -34
- package/lib/core/dist/core.js +2410 -2621
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/ColumnStats.js +14 -14
- package/lib/core/es6/data/DataCache.js +118 -118
- package/lib/core/es6/data/DataTable.d.ts +3 -1
- package/lib/core/es6/data/DataTable.js +208 -190
- package/lib/core/es6/data/DataView.d.ts +1 -1
- package/lib/core/es6/data/DataView.js +291 -291
- package/lib/core/es6/data/Segment.js +79 -79
- package/lib/core/es6/data/SegmentCollection.js +81 -81
- package/lib/core/es6/data/WrappedView.js +41 -41
- package/lib/core/es6/grid/Core.js +635 -635
- package/lib/core/es6/grid/ILayoutGrid.js +1 -1
- package/lib/core/es6/grid/LayoutGrid.js +183 -183
- package/lib/core/es6/grid/VirtualizedLayoutGrid.js +91 -91
- package/lib/core/es6/grid/components/Cell.js +29 -29
- package/lib/core/es6/grid/components/CellFloatingPanel.js +11 -11
- package/lib/core/es6/grid/components/CellSpan.js +7 -7
- package/lib/core/es6/grid/components/CellSpans.js +36 -34
- package/lib/core/es6/grid/components/Column.js +40 -40
- package/lib/core/es6/grid/components/ElementWrapper.js +17 -17
- package/lib/core/es6/grid/components/HScrollbar.js +31 -31
- package/lib/core/es6/grid/components/Scrollbar.js +77 -77
- package/lib/core/es6/grid/components/StretchedCells.js +49 -49
- package/lib/core/es6/grid/components/VScrollbar.js +11 -11
- package/lib/core/es6/grid/components/VirtualItems.js +3 -3
- package/lib/core/es6/grid/event/EventDispatcher.js +9 -9
- package/lib/core/es6/grid/event/EventListeners.js +4 -4
- package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +186 -186
- package/lib/core/es6/grid/util/Conflator.js +4 -4
- package/lib/core/es6/grid/util/Reverter.js +1 -1
- package/lib/core/es6/grid/util/SectionSettings.js +20 -20
- package/lib/core/es6/grid/util/SelectionList.js +23 -23
- package/lib/core/es6/grid/util/TrackLayout.js +74 -74
- package/lib/core/es6/grid/util/Virtualizer.js +15 -15
- package/lib/core/es6/grid/util/util.js +20 -20
- package/lib/core/es6/index.d.ts +0 -2
- package/lib/core/es6/index.js +0 -3
- package/lib/filter-dialog/lib/filter-dialog.js +1 -0
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +193 -70
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +46 -30
- package/lib/rt-grid/es6/RowDefinition.d.ts +2 -1
- package/lib/rt-grid/es6/RowDefinition.js +74 -16
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +56 -1
- package/lib/tr-grid-checkbox/es6/Checkbox.js +268 -268
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +3 -2
- package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +60 -32
- package/lib/tr-grid-column-stack/es6/ColumnStack.js +279 -279
- package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +227 -207
- package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +11 -11
- package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +1 -2
- package/lib/tr-grid-row-dragging/es6/RowDragging.js +120 -121
- package/lib/tr-grid-util/es6/CellPainter.js +94 -104
- package/lib/tr-grid-util/es6/Conflator.js +4 -4
- package/lib/tr-grid-util/es6/CoralItems.js +6 -6
- package/lib/tr-grid-util/es6/DateTime.js +41 -41
- package/lib/tr-grid-util/es6/Deferred.js +5 -5
- package/lib/tr-grid-util/es6/Delay.d.ts +3 -3
- package/lib/tr-grid-util/es6/Delay.js +14 -3
- package/lib/tr-grid-util/es6/Dom.js +26 -26
- package/lib/tr-grid-util/es6/DragUI.js +17 -17
- package/lib/tr-grid-util/es6/ElementObserver.js +12 -12
- package/lib/tr-grid-util/es6/ElementWrapper.js +2 -2
- package/lib/tr-grid-util/es6/ElfDate.js +4 -4
- package/lib/tr-grid-util/es6/ElfUtil.js +37 -37
- package/lib/tr-grid-util/es6/EventDispatcher.js +12 -12
- package/lib/tr-grid-util/es6/ExpanderIcon.js +6 -6
- package/lib/tr-grid-util/es6/ExpressionParser.js +43 -43
- package/lib/tr-grid-util/es6/Ext.js +6 -6
- package/lib/tr-grid-util/es6/FieldFormatter.js +17 -17
- package/lib/tr-grid-util/es6/FilterBuilder.js +57 -58
- package/lib/tr-grid-util/es6/FilterOperators.d.ts +12 -1
- package/lib/tr-grid-util/es6/FilterOperators.js +13 -2
- package/lib/tr-grid-util/es6/GridPlugin.js +86 -87
- package/lib/tr-grid-util/es6/GroupDefinitions.js +90 -90
- package/lib/tr-grid-util/es6/Icon.js +4 -4
- package/lib/tr-grid-util/es6/MouseDownTrait.js +6 -6
- package/lib/tr-grid-util/es6/MultiTableManager.js +71 -80
- package/lib/tr-grid-util/es6/NumberFormatter.js +23 -23
- package/lib/tr-grid-util/es6/PercentBar.js +17 -17
- package/lib/tr-grid-util/es6/Perf.js +5 -5
- package/lib/tr-grid-util/es6/Popup.js +42 -42
- package/lib/tr-grid-util/es6/RangeBar.js +5 -5
- package/lib/tr-grid-util/es6/RequestQueue.js +5 -5
- package/lib/tr-grid-util/es6/RowPainter.js +23 -23
- package/lib/tr-grid-util/es6/SubTable.js +94 -94
- package/lib/tr-grid-util/es6/Table.js +51 -51
- package/lib/tr-grid-util/es6/TextHighlighter.js +52 -52
- package/lib/tr-grid-util/es6/TickCodes.js +2 -2
- package/lib/tr-grid-util/es6/Timer.js +2 -2
- package/lib/tr-grid-util/es6/TouchProxy.js +7 -7
- package/lib/tr-grid-util/es6/Util.js +50 -50
- package/lib/tr-grid-util/es6/formula/ADCService.js +2 -2
- package/lib/tr-grid-util/es6/formula/ADCSubscription.js +19 -19
- package/lib/tr-grid-util/es6/formula/AdFinService.js +2 -2
- package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +19 -19
- package/lib/tr-grid-util/es6/formula/Engine.js +56 -56
- package/lib/tr-grid-util/es6/formula/Formula.js +62 -62
- package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +3 -3
- package/lib/tr-grid-util/es6/formula/Realtime.js +15 -15
- package/lib/tr-grid-util/es6/formula/RealtimeService.js +15 -15
- package/lib/tr-grid-util/es6/formula/TSIService.js +2 -2
- package/lib/tr-grid-util/es6/formula/TSISubscription.js +104 -104
- package/lib/tr-grid-util/es6/formula/VariableToken.js +20 -20
- package/lib/tr-grid-util/es6/formula/functions/AdFin.js +10 -10
- package/lib/tr-grid-util/es6/formula/functions/Excel.js +1 -1
- package/lib/tr-grid-util/es6/formula/functions/Info.js +2 -2
- package/lib/tr-grid-util/es6/formula/functions/Internal.js +5 -5
- package/lib/tr-grid-util/es6/formula/functions/Logic.js +5 -5
- package/lib/tr-grid-util/es6/formula/functions/Math.js +46 -46
- package/lib/tr-grid-util/es6/formula/functions/Statistics.js +27 -27
- package/lib/tr-grid-util/es6/formula/functions/Text.js +19 -19
- package/lib/tr-grid-util/es6/index.js +1 -1
- package/lib/tr-grid-util/es6/jet/Adc.js +36 -36
- package/lib/tr-grid-util/es6/jet/CollectionDict.js +11 -11
- package/lib/tr-grid-util/es6/jet/DataGenerator.js +95 -95
- package/lib/tr-grid-util/es6/jet/DataSet.js +1 -1
- package/lib/tr-grid-util/es6/jet/MockArchive.js +5 -5
- package/lib/tr-grid-util/es6/jet/MockJET.js +1 -1
- package/lib/tr-grid-util/es6/jet/MockQuotes.js +13 -13
- package/lib/tr-grid-util/es6/jet/MockQuotes2.js +100 -100
- package/lib/tr-grid-util/es6/jet/MockRTK.js +4 -4
- package/lib/tr-grid-util/es6/jet/MockUtil.js +2 -2
- package/lib/tr-grid-util/es6/jet/index.js +1 -1
- package/lib/tr-grid-util/es6/jet/mockDataAPI.js +15 -15
- package/lib/tr-grid-util/es6/locale/translation-de.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-en.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-ja.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation-zh.js +1 -1
- package/lib/tr-grid-util/es6/locale/translation.js +1 -1
- package/lib/types/es6/ColumnDragging.d.ts +1 -1
- package/lib/types/es6/ColumnGrouping.d.ts +3 -1
- package/lib/types/es6/Core/data/DataTable.d.ts +4 -0
- package/lib/types/es6/Core/data/DataView.d.ts +2 -0
- package/lib/types/es6/Core/data/SegmentCollection.d.ts +2 -0
- package/lib/types/es6/Core/index.d.ts +0 -2
- package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +2 -1
- package/lib/types/es6/RowDragging.d.ts +1 -2
- package/lib/versions.json +12 -12
- package/package.json +1 -1
- package/lib/core/es6/grid/util/ElementFrameWork.d.ts +0 -18
- package/lib/core/es6/grid/util/ElementFrameWork.js +0 -227
- package/lib/core/es6/grid/util/HttpRequest.d.ts +0 -53
- package/lib/core/es6/grid/util/HttpRequest.js +0 -371
- package/lib/core/es6/grid/util/PercentBar.d.ts +0 -43
- package/lib/core/es6/grid/util/PercentBar.js +0 -390
- package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +0 -41
- package/lib/core/es6/grid/util/PercentBarRenderer.js +0 -316
- package/lib/core/es6/grid/util/RangeBar.d.ts +0 -25
- package/lib/core/es6/grid/util/RangeBar.js +0 -255
- package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +0 -18
- package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +0 -53
- package/lib/types/es6/Core/grid/util/PercentBar.d.ts +0 -43
- package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +0 -41
- package/lib/types/es6/Core/grid/util/RangeBar.d.ts +0 -25
@@ -10,7 +10,7 @@
|
|
10
10
|
* {lang=ru} Valid/Invalid value checking functions
|
11
11
|
* {lang=de} Prüffunktionen für gültige/ungültige Werte
|
12
12
|
*/
|
13
|
-
|
13
|
+
let Info = {};
|
14
14
|
|
15
15
|
/**
|
16
16
|
* @function ISEMPTY
|
@@ -177,7 +177,7 @@ Info["ISNASTRING"] = function(value) {
|
|
177
177
|
return 1; // []
|
178
178
|
}
|
179
179
|
if(value.constructor === Object) {
|
180
|
-
for(
|
180
|
+
for(let key in value) {
|
181
181
|
return 0; // {"a": 1}
|
182
182
|
}
|
183
183
|
return 1; // {}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* @namespace Internal
|
3
3
|
* @ignore
|
4
4
|
*/
|
5
|
-
|
5
|
+
let Internal = {};
|
6
6
|
|
7
7
|
/**
|
8
8
|
* @description This method calculates Restricted Indicator (RI) status from RI_FLAG, RI_CODE, STATUS and PRC_QL2 fields
|
@@ -14,9 +14,9 @@ var Internal = {};
|
|
14
14
|
* @ignore
|
15
15
|
*/
|
16
16
|
Internal["_RI_STATUS"] = function(riFlag, riCode, status, prcQl2) {
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
let val = "";
|
18
|
+
let isDelayed = false;
|
19
|
+
let delayedText;
|
20
20
|
|
21
21
|
if (riFlag) {
|
22
22
|
if (riFlag === "R" || riFlag === "E" || riFlag === "Q") {
|
@@ -76,7 +76,7 @@ Internal["_PERCENT"] = function (lowVal, lastVal, highVal) {
|
|
76
76
|
if (highVal === lowVal) {
|
77
77
|
return 50;
|
78
78
|
}
|
79
|
-
|
79
|
+
let percent = (lastVal - lowVal) / (highVal - lowVal);
|
80
80
|
if (percent < 0) {
|
81
81
|
return 0;
|
82
82
|
}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* {lang=ru} Functions that handle logical conditions of data
|
10
10
|
* {lang=de} Funktionen, die logische Bedingungen von Daten verarbeiten
|
11
11
|
*/
|
12
|
-
|
12
|
+
let Logic = {};
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @function AND
|
@@ -28,8 +28,8 @@ var Logic = {};
|
|
28
28
|
* =5>2 && 1+1=2
|
29
29
|
*/
|
30
30
|
Logic["AND"] = function(/* ... args*/) {
|
31
|
-
|
32
|
-
for(
|
31
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
32
|
+
for(let i = args.length; --i >= 0;) {
|
33
33
|
if(!args[i]) {
|
34
34
|
return 0;
|
35
35
|
}
|
@@ -144,8 +144,8 @@ Logic["NOT"] = function(a) {
|
|
144
144
|
* =5>10 || 4+2=8 || 10<1
|
145
145
|
*/
|
146
146
|
Logic["OR"] = function(/* ... args*/) {
|
147
|
-
|
148
|
-
for(
|
147
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
148
|
+
for(let i = args.length; --i >= 0;) {
|
149
149
|
if(args[i]) {
|
150
150
|
return 1;
|
151
151
|
}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* {lang=ru} Mathmatic functions
|
10
10
|
* {lang=de} Mathematische Funktionen
|
11
11
|
*/
|
12
|
-
|
12
|
+
let GridMath = {};
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @function ABS
|
@@ -335,7 +335,7 @@ GridMath["CEIL"] = GridMath["CEILING"];
|
|
335
335
|
* =COMBIN(10,3)
|
336
336
|
*/
|
337
337
|
GridMath["COMBIN"] = function(num, num_chosen) {
|
338
|
-
|
338
|
+
let fact = GridMath["FACT"];
|
339
339
|
return fact(num) / (fact(num_chosen) * fact(num - num_chosen));
|
340
340
|
};
|
341
341
|
|
@@ -388,7 +388,7 @@ GridMath["COS"] = Math.cos; //
|
|
388
388
|
* =COSH(3)
|
389
389
|
*/
|
390
390
|
GridMath["COSH"] = function(x) {
|
391
|
-
|
391
|
+
let y = Math.exp(x);
|
392
392
|
return (y + 1 / y) / 2;
|
393
393
|
};
|
394
394
|
|
@@ -501,7 +501,7 @@ GridMath["EXP"] = Math.exp; // Returns e raised to the power of a given number
|
|
501
501
|
GridMath["FACT"] = function(num) {
|
502
502
|
if(num < 0) { return NaN; }
|
503
503
|
num = Math.floor(num);
|
504
|
-
|
504
|
+
let ret = 1;
|
505
505
|
while(num > 1) {
|
506
506
|
ret *= num;
|
507
507
|
--num;
|
@@ -535,7 +535,7 @@ GridMath["FACT"] = function(num) {
|
|
535
535
|
GridMath["FACTDOUBLE"] = function(num) {
|
536
536
|
if(num < 0) { return NaN; }
|
537
537
|
num = Math.floor(num);
|
538
|
-
|
538
|
+
let ret = 1;
|
539
539
|
while(num > 1) {
|
540
540
|
ret *= num;
|
541
541
|
num -= 2;
|
@@ -616,7 +616,7 @@ GridMath["FLOOR"] = function(num, multiple) {
|
|
616
616
|
GridMath["GCD"] = function(a, b) {
|
617
617
|
if (a < 0) a = -a;
|
618
618
|
if (b < 0) b = -b;
|
619
|
-
if (b > a) {
|
619
|
+
if (b > a) { let temp = a; a = b; b = temp;}
|
620
620
|
while (b != 0) {
|
621
621
|
a %= b;
|
622
622
|
if (a == 0) return b;
|
@@ -666,12 +666,12 @@ GridMath["INT"] = Math.floor;
|
|
666
666
|
* =LCM(10,15)
|
667
667
|
*/
|
668
668
|
GridMath["LCM"] = function(/* ... args*/) {
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
for (
|
673
|
-
|
674
|
-
|
669
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
670
|
+
let argLen = args.length;
|
671
|
+
let a = Math.abs(args[0]);
|
672
|
+
for (let i = 1; i < argLen; i++) {
|
673
|
+
let b = Math.abs(args[i]);
|
674
|
+
let c = a;
|
675
675
|
while (a && b){
|
676
676
|
if(a > b) {
|
677
677
|
a %= b;
|
@@ -883,11 +883,11 @@ GridMath["POWER"] = Math.pow;
|
|
883
883
|
* =PRODUCT(1,-2,3)
|
884
884
|
*/
|
885
885
|
GridMath["PRODUCT"] = function(/* ... args*/) {
|
886
|
-
|
887
|
-
|
886
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
887
|
+
let prod = args[0];
|
888
888
|
if(prod == null || prod !== prod) { return NaN; }
|
889
889
|
|
890
|
-
for(
|
890
|
+
for(let i = args.length; --i >= 1;) {
|
891
891
|
prod *= args[i];
|
892
892
|
}
|
893
893
|
return prod;
|
@@ -1059,7 +1059,7 @@ GridMath["ROUND"] = function(num, num_digits) {
|
|
1059
1059
|
if(!num_digits) {
|
1060
1060
|
return Math.round(num);
|
1061
1061
|
}
|
1062
|
-
|
1062
|
+
let divisor = Math.pow(10, num_digits); // Slow!
|
1063
1063
|
return Math.round(num * divisor) / divisor;
|
1064
1064
|
};
|
1065
1065
|
|
@@ -1098,7 +1098,7 @@ GridMath["ROUNDDOWN"] = function(num, num_digits) {
|
|
1098
1098
|
if(!num_digits) {
|
1099
1099
|
return Math.floor(num);
|
1100
1100
|
}
|
1101
|
-
|
1101
|
+
let divisor = Math.pow(10, num_digits); // Slow!
|
1102
1102
|
return Math.floor(num * divisor) / divisor;
|
1103
1103
|
};
|
1104
1104
|
|
@@ -1137,7 +1137,7 @@ GridMath["ROUNDUP"] = function(num, num_digits) { //
|
|
1137
1137
|
if(!num_digits) {
|
1138
1138
|
return Math.ceil(num);
|
1139
1139
|
}
|
1140
|
-
|
1140
|
+
let divisor = Math.pow(10, num_digits); // Slow!
|
1141
1141
|
return Math.ceil(num * divisor) / divisor;
|
1142
1142
|
};
|
1143
1143
|
|
@@ -1191,8 +1191,8 @@ GridMath["ROUNDUP"] = function(num, num_digits) { //
|
|
1191
1191
|
*/
|
1192
1192
|
GridMath["SERIESSUM"] = function(x, n, m, coefficients) { //
|
1193
1193
|
// WARNING: coefficients variable is an Array in which user have no knowledge about how to create an Array in JavaScript syntax.
|
1194
|
-
|
1195
|
-
for(
|
1194
|
+
let sum = 0;
|
1195
|
+
for(let i = coefficients.length; --i >= 0;) {
|
1196
1196
|
sum += coefficients[i] * Math.pow(x, n + i * m);
|
1197
1197
|
}
|
1198
1198
|
return sum;
|
@@ -1275,7 +1275,7 @@ GridMath["SIN"] = Math.sin; //
|
|
1275
1275
|
* =SINH(4)
|
1276
1276
|
*/
|
1277
1277
|
GridMath["SINH"] = function(x) {
|
1278
|
-
|
1278
|
+
let y = Math.exp(x);
|
1279
1279
|
return (y - 1 / y) / 2;
|
1280
1280
|
};
|
1281
1281
|
|
@@ -1347,9 +1347,9 @@ GridMath["SQRTPI"] = function(multiple) {
|
|
1347
1347
|
* =SUM(4,-500)
|
1348
1348
|
*/
|
1349
1349
|
GridMath["SUM"] = function(/* ... args*/) {
|
1350
|
-
|
1351
|
-
|
1352
|
-
for(
|
1350
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
1351
|
+
let sum = 0;
|
1352
|
+
for(let i = args.length; --i >= 0;) {
|
1353
1353
|
sum += args[i];
|
1354
1354
|
}
|
1355
1355
|
return sum;
|
@@ -1374,19 +1374,19 @@ GridMath["SUM"] = function(/* ... args*/) {
|
|
1374
1374
|
* =SUMPRODUCT(2,3)
|
1375
1375
|
*/
|
1376
1376
|
GridMath["SUMPRODUCT"] = function(/* ... args*/) {
|
1377
|
-
|
1378
|
-
|
1377
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
1378
|
+
let argLen = args.length;
|
1379
1379
|
if(argLen === 0) { return 0; }
|
1380
1380
|
|
1381
|
-
|
1382
|
-
|
1381
|
+
let i;
|
1382
|
+
let products = [];
|
1383
1383
|
for(i = 0; i < argLen; ++i) {
|
1384
1384
|
products[i] = 1;
|
1385
1385
|
}
|
1386
1386
|
for(i = 0; i < argLen; ++i) {
|
1387
1387
|
products[i] *= args[i];
|
1388
1388
|
}
|
1389
|
-
|
1389
|
+
let sum = 0;
|
1390
1390
|
for(i = 0; i < argLen; ++i) {
|
1391
1391
|
sum += products[i];
|
1392
1392
|
}
|
@@ -1409,10 +1409,10 @@ GridMath["SUMPRODUCT"] = function(/* ... args*/) {
|
|
1409
1409
|
* =SUMSQ(3)
|
1410
1410
|
*/
|
1411
1411
|
GridMath["SUMSQ"] = function(/* ... args*/) {
|
1412
|
-
|
1413
|
-
|
1414
|
-
for(
|
1415
|
-
|
1412
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
1413
|
+
let sum = 0;
|
1414
|
+
for(let i = args.length; --i >= 0;) {
|
1415
|
+
let val = args[i];
|
1416
1416
|
sum += (val * val);
|
1417
1417
|
}
|
1418
1418
|
return sum;
|
@@ -1445,10 +1445,10 @@ GridMath["SUMSQ"] = function(/* ... args*/) {
|
|
1445
1445
|
// * <Example can be provided here>
|
1446
1446
|
// */
|
1447
1447
|
// GridMath["SUMX2MY2"] = function(aryX, aryY) {
|
1448
|
-
//
|
1449
|
-
// for(
|
1450
|
-
//
|
1451
|
-
//
|
1448
|
+
// let sum = 0;
|
1449
|
+
// for(let i = aryX.length; --i >= 0;) {
|
1450
|
+
// let valX = aryX[i];
|
1451
|
+
// let valY = aryY[i];
|
1452
1452
|
// sum += (valX * valX) - (valY * valY);
|
1453
1453
|
// }
|
1454
1454
|
// return sum;
|
@@ -1480,10 +1480,10 @@ GridMath["SUMSQ"] = function(/* ... args*/) {
|
|
1480
1480
|
// * <Example can be provided here>
|
1481
1481
|
|
1482
1482
|
// GridMath["SUMX2PY2"] = function(aryX, aryY) {
|
1483
|
-
//
|
1484
|
-
// for(
|
1485
|
-
//
|
1486
|
-
//
|
1483
|
+
// let sum = 0;
|
1484
|
+
// for(let i = aryX.length; --i >= 0;) {
|
1485
|
+
// let valX = aryX[i];
|
1486
|
+
// let valY = aryY[i];
|
1487
1487
|
// sum += (valX * valX) + (valY * valY);
|
1488
1488
|
// }
|
1489
1489
|
// return sum;
|
@@ -1515,9 +1515,9 @@ GridMath["SUMSQ"] = function(/* ... args*/) {
|
|
1515
1515
|
// * <Example can be provided here>
|
1516
1516
|
// */
|
1517
1517
|
// GridMath["SUMXMY2"] = function(aryX, aryY) {
|
1518
|
-
//
|
1519
|
-
// for(
|
1520
|
-
//
|
1518
|
+
// let sum = 0;
|
1519
|
+
// for(let i = aryX.length; --i >= 0;) {
|
1520
|
+
// let XMY = aryX[i] - aryY[i]; // X minus Y
|
1521
1521
|
// sum += (XMY * XMY);
|
1522
1522
|
// }
|
1523
1523
|
// return sum;
|
@@ -1577,7 +1577,7 @@ GridMath["TANH"] = function(x) {
|
|
1577
1577
|
} else if (x === -Infinity) {
|
1578
1578
|
return -1;
|
1579
1579
|
}
|
1580
|
-
|
1580
|
+
let y = Math.exp(2 * x);
|
1581
1581
|
return (y - 1) / (y + 1);
|
1582
1582
|
};
|
1583
1583
|
|
@@ -1616,7 +1616,7 @@ GridMath["TRUNC"] = function(num, num_digits) {
|
|
1616
1616
|
if(!num_digits) {
|
1617
1617
|
return Math.floor(num);
|
1618
1618
|
}
|
1619
|
-
|
1619
|
+
let divisor = Math.pow(10, num_digits);
|
1620
1620
|
return Math.floor(num * divisor) / divisor;
|
1621
1621
|
};
|
1622
1622
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* {lang=ru} Statistic functions
|
10
10
|
* {lang=de} Statistische Funktionen
|
11
11
|
*/
|
12
|
-
|
12
|
+
let Stat = {};
|
13
13
|
|
14
14
|
/**
|
15
15
|
* @function AVERAGE
|
@@ -27,12 +27,12 @@ var Stat = {};
|
|
27
27
|
* =AVERAGE(6.10,13.20,15.40)
|
28
28
|
*/
|
29
29
|
Stat["AVERAGE"] = function(/* ... args*/) {
|
30
|
-
|
31
|
-
|
30
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
31
|
+
let argLen = args.length;
|
32
32
|
if(argLen <= 0) { return NaN; }
|
33
33
|
|
34
|
-
|
35
|
-
for(
|
34
|
+
let sum = 0;
|
35
|
+
for(let i = argLen; --i >= 0;) {
|
36
36
|
sum += args[i];
|
37
37
|
}
|
38
38
|
return sum / argLen;
|
@@ -77,10 +77,10 @@ Stat["AVG"] = Stat["AVERAGE"];
|
|
77
77
|
* =COUNT(6.10,13.20,15.40)
|
78
78
|
*/
|
79
79
|
Stat["COUNT"] = function(/* ... args*/) {
|
80
|
-
|
81
|
-
|
82
|
-
for(
|
83
|
-
|
80
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
81
|
+
let count = 0;
|
82
|
+
for(let i = args.length; --i >= 0;) {
|
83
|
+
let arg = args[i];
|
84
84
|
if(arg != null && arg == arg) {
|
85
85
|
++count;
|
86
86
|
}
|
@@ -110,11 +110,11 @@ Stat["COUNT"] = function(/* ... args*/) {
|
|
110
110
|
* =MAX(6.10,13.20,15.40)
|
111
111
|
*/
|
112
112
|
Stat["MAX"] = function(/* ... args*/) {
|
113
|
-
|
113
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
114
114
|
if(args.length <= 0) { return NaN; }
|
115
115
|
|
116
|
-
|
117
|
-
for(
|
116
|
+
let max = args[0];
|
117
|
+
for(let i = args.length; --i >= 1;) {
|
118
118
|
if(args[i] > max) {
|
119
119
|
max = args[i];
|
120
120
|
}
|
@@ -144,11 +144,11 @@ Stat["MAX"] = function(/* ... args*/) {
|
|
144
144
|
* =MIN(6.10,13.20,15.40)
|
145
145
|
*/
|
146
146
|
Stat["MIN"] = function(/* ... args*/) {
|
147
|
-
|
147
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : arguments;
|
148
148
|
if(args.length <= 0) { return NaN; }
|
149
149
|
|
150
|
-
|
151
|
-
for(
|
150
|
+
let min = args[0];
|
151
|
+
for(let i = args.length; --i >= 1;) {
|
152
152
|
if(args[i] < min) {
|
153
153
|
min = args[i];
|
154
154
|
}
|
@@ -178,16 +178,16 @@ Stat["MIN"] = function(/* ... args*/) {
|
|
178
178
|
* =STDEV(6.10,13.20,15.40)
|
179
179
|
*/
|
180
180
|
Stat["STDEV"] = function(/* ... args*/) {
|
181
|
-
|
182
|
-
|
181
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : Array.prototype.slice.call(arguments);
|
182
|
+
let argLen = args.length;
|
183
183
|
if(argLen <= 0) { return NaN; }
|
184
184
|
if(argLen === 1) { return 0; }
|
185
185
|
|
186
|
-
|
186
|
+
let mean = Stat["AVERAGE"](args);
|
187
187
|
|
188
|
-
|
189
|
-
for(
|
190
|
-
|
188
|
+
let sum = 0;
|
189
|
+
for(let i = argLen; --i >= 0;) {
|
190
|
+
let diff = args[i] - mean;
|
191
191
|
sum += diff * diff;
|
192
192
|
}
|
193
193
|
return Math.sqrt(sum / (argLen - 1));
|
@@ -215,16 +215,16 @@ Stat["STDEV"] = function(/* ... args*/) {
|
|
215
215
|
* =STDEVP(6.10,13.20,15.40)
|
216
216
|
*/
|
217
217
|
Stat["STDEVP"] = function(/* ... args*/) {
|
218
|
-
|
219
|
-
|
218
|
+
let args = (arguments[0] instanceof Array) ? arguments[0] : Array.prototype.slice.call(arguments);
|
219
|
+
let argLen = args.length;
|
220
220
|
if(argLen <= 0) { return NaN; }
|
221
221
|
if(argLen === 1) { return 0; }
|
222
222
|
|
223
|
-
|
223
|
+
let mean = Stat["AVERAGE"](args);
|
224
224
|
|
225
|
-
|
226
|
-
for(
|
227
|
-
|
225
|
+
let sum = 0;
|
226
|
+
for(let i = argLen; --i >= 0;) {
|
227
|
+
let diff = args[i] - mean;
|
228
228
|
sum += diff * diff;
|
229
229
|
}
|
230
230
|
return Math.sqrt(sum / argLen);
|
@@ -7,9 +7,9 @@
|
|
7
7
|
* {lang=ko} 텍스트 조작 함수
|
8
8
|
* {lang=ru} Text manipulation functions
|
9
9
|
*/
|
10
|
-
|
10
|
+
let Text = {};
|
11
11
|
|
12
|
-
|
12
|
+
let _toString = function(text) {
|
13
13
|
if(!text && text !== 0) {
|
14
14
|
return "";
|
15
15
|
}
|
@@ -95,7 +95,7 @@ Text["FIND"] = function(findText, withinText, opt_startNum) {
|
|
95
95
|
if (!opt_startNum || opt_startNum < 0) {
|
96
96
|
opt_startNum = 0;
|
97
97
|
}
|
98
|
-
|
98
|
+
let pos = withinText.indexOf(findText, opt_startNum);
|
99
99
|
return pos;
|
100
100
|
};
|
101
101
|
/**
|
@@ -320,7 +320,7 @@ Text["MID"] = function(text, startNum, numChars) {
|
|
320
320
|
Text["REPLACE"] = function(oldText, numChars, startNum, newText) {
|
321
321
|
newText = newText + "";
|
322
322
|
oldText = _toString(oldText);
|
323
|
-
|
323
|
+
let arrOldText = oldText.split("");
|
324
324
|
arrOldText.splice(startNum, numChars, newText);
|
325
325
|
return arrOldText.join("");
|
326
326
|
};
|
@@ -364,7 +364,7 @@ Text["RIGHT"] = function(text, opt_numChars) {
|
|
364
364
|
if(opt_numChars < 0) {
|
365
365
|
opt_numChars = 1;
|
366
366
|
}
|
367
|
-
|
367
|
+
let startNum = text.length - opt_numChars;
|
368
368
|
return text.substr(startNum, opt_numChars);
|
369
369
|
};
|
370
370
|
/**
|
@@ -469,7 +469,7 @@ Text["VALUE"] = function(text) {
|
|
469
469
|
* =CHAR(1)
|
470
470
|
*/
|
471
471
|
Text["CHAR"] = function(code) {
|
472
|
-
|
472
|
+
let num = +code;
|
473
473
|
return String.fromCharCode(num);
|
474
474
|
};
|
475
475
|
/**
|
@@ -496,9 +496,9 @@ Text["CHAR"] = function(code) {
|
|
496
496
|
* =CLEAN("Kobérña")
|
497
497
|
*/
|
498
498
|
Text["CLEAN"] = function(text) {
|
499
|
-
|
500
|
-
for(
|
501
|
-
|
499
|
+
let arrText = _toString(text).split("");
|
500
|
+
for(let i = arrText.length; --i >= 0;) {
|
501
|
+
let ascii = arrText[i].charCodeAt(0);
|
502
502
|
if(ascii < 32 || ascii > 127) {
|
503
503
|
arrText[i] = "";
|
504
504
|
}
|
@@ -556,20 +556,20 @@ Text["CODE"] = function(text) {
|
|
556
556
|
*/
|
557
557
|
Text["PROPER"] = function(text) {
|
558
558
|
text = _toString(text);
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
for(
|
564
|
-
|
565
|
-
|
559
|
+
let arrTokens = text.split(/[\W_]/g);
|
560
|
+
let arrSyms = text.match(/[\W_]/g);
|
561
|
+
let arrLen = arrTokens.length;
|
562
|
+
let result = "";
|
563
|
+
for(let i = 0; i < arrLen; i++) {
|
564
|
+
let token = arrTokens[i];
|
565
|
+
let len = token.length;
|
566
566
|
if(len === 1) {
|
567
567
|
result += token.toUpperCase();
|
568
568
|
} else if(len !== 0) {
|
569
569
|
result += token.charAt(0).toUpperCase() + token.substr(1).toLowerCase();
|
570
570
|
}
|
571
571
|
|
572
|
-
|
572
|
+
let sym = arrSyms[i];
|
573
573
|
if(sym) {
|
574
574
|
result += sym;
|
575
575
|
}
|
@@ -618,8 +618,8 @@ Text["REPEAT"] = function(text, numRep) {
|
|
618
618
|
return "";
|
619
619
|
}
|
620
620
|
|
621
|
-
|
622
|
-
for(
|
621
|
+
let newText = text;
|
622
|
+
for(let i = 1; i < numRep; i++) {
|
623
623
|
newText += text;
|
624
624
|
}
|
625
625
|
return newText;
|
@@ -33,7 +33,7 @@ import ElementObserver from "./ElementObserver.js";
|
|
33
33
|
import MultiTableManager from "./MultiTableManager.js";
|
34
34
|
import GroupDefinitions from "./GroupDefinitions.js";
|
35
35
|
|
36
|
-
|
36
|
+
let tr = window["tr"];
|
37
37
|
if(!tr) {
|
38
38
|
tr = window["tr"] = {};
|
39
39
|
}
|