@refinitiv-ui/efx-grid 6.0.103 → 6.0.104
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/lib/core/dist/core.js +14 -137
- package/lib/core/dist/core.min.js +1 -1
- package/lib/core/es6/data/DataCache.d.ts +0 -8
- package/lib/core/es6/data/DataCache.js +13 -136
- package/lib/core/es6/grid/Core.js +1 -1
- package/lib/grid/index.js +1 -1
- package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +1 -1
- package/package.json +3 -2
@@ -49,14 +49,6 @@ declare class DataCache extends EventDispatcher {
|
|
49
49
|
|
50
50
|
public cloneRowData(rid: string): any;
|
51
51
|
|
52
|
-
public addStaticFields(fields: (string)[]|null): void;
|
53
|
-
|
54
|
-
public removeStaticFields(fields: (string)[]|null): void;
|
55
|
-
|
56
|
-
public resetStaticFields(): void;
|
57
|
-
|
58
|
-
public getStaticFields(): { [key: string]: number }|null;
|
59
|
-
|
60
52
|
public dump(options?: any): (any)[];
|
61
53
|
|
62
54
|
public log(opt_options?: any): void;
|
@@ -24,7 +24,6 @@ let DataCache = function () {
|
|
24
24
|
|
25
25
|
_t._rows = {};
|
26
26
|
_t._subs = {};
|
27
|
-
_t._staticFields = {};
|
28
27
|
_t._onInsert = _t._onInsert.bind(_t);
|
29
28
|
_t._onUpdate = _t._onUpdate.bind(_t);
|
30
29
|
_t._onDelete = _t._onDelete.bind(_t);
|
@@ -460,64 +459,34 @@ DataCache.prototype.cloneRowData = function (rid) {
|
|
460
459
|
return values;
|
461
460
|
};
|
462
461
|
|
463
|
-
/**
|
464
|
-
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
462
|
+
/** Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
465
463
|
* @public
|
466
|
-
* @
|
464
|
+
* @ignore
|
467
465
|
* @suppress {checkTypes}
|
468
466
|
*/
|
469
|
-
DataCache.prototype.addStaticFields = function (
|
470
|
-
if (!Array.isArray(fields)) {
|
471
|
-
return;
|
472
|
-
}
|
473
|
-
|
474
|
-
for (let i in fields) {
|
475
|
-
if (!this._staticFields[fields[i]]) {
|
476
|
-
this._staticFields[fields[i]] = 1;
|
477
|
-
} else {
|
478
|
-
this._staticFields[fields[i]]++;
|
479
|
-
}
|
480
|
-
}
|
481
|
-
};
|
467
|
+
DataCache.prototype.addStaticFields = function () {};
|
482
468
|
|
483
469
|
/**
|
484
470
|
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
485
471
|
* @public
|
486
|
-
* @
|
472
|
+
* @ignore
|
487
473
|
* @suppress {checkTypes}
|
488
474
|
*/
|
489
|
-
DataCache.prototype.removeStaticFields = function (
|
490
|
-
if (!Array.isArray(fields)) {
|
491
|
-
return;
|
492
|
-
}
|
493
|
-
|
494
|
-
for (let i in fields) {
|
495
|
-
if (this._staticFields[fields[i]]) {
|
496
|
-
this._staticFields[fields[i]]--;
|
497
|
-
|
498
|
-
if (this._staticFields[fields[i]] === 0) {
|
499
|
-
delete this._staticFields[fields[i]];
|
500
|
-
}
|
501
|
-
}
|
502
|
-
}
|
503
|
-
};
|
475
|
+
DataCache.prototype.removeStaticFields = function () {};
|
504
476
|
|
505
477
|
/**
|
506
478
|
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
507
479
|
* @public
|
480
|
+
* @ignore
|
508
481
|
*/
|
509
|
-
DataCache.prototype.resetStaticFields = function () {
|
510
|
-
this._staticFields = {};
|
511
|
-
};
|
482
|
+
DataCache.prototype.resetStaticFields = function () {};
|
512
483
|
|
513
484
|
/**
|
514
485
|
* Deprecated. Built-in Data Service is deprecated due to the lack of flexibility.
|
515
486
|
* @public
|
516
|
-
* @
|
487
|
+
* @ignore
|
517
488
|
*/
|
518
|
-
DataCache.prototype.getStaticFields = function () {
|
519
|
-
return this._staticFields;
|
520
|
-
};
|
489
|
+
DataCache.prototype.getStaticFields = function () {};
|
521
490
|
|
522
491
|
/**
|
523
492
|
* Construct a JSON object that is compatible with console.table()
|
@@ -784,29 +753,15 @@ DataCache.prototype._onQ2DataChanged = function (e) {
|
|
784
753
|
*/
|
785
754
|
DataCache.prototype._onQ2SubAdded = function (e) {
|
786
755
|
let subs = e["subs"];
|
787
|
-
let duplicateSubIds = e["duplicateSubIds"];
|
788
756
|
let len = subs.length;
|
789
757
|
|
790
758
|
for (let i = 0; i < len; ++i) {
|
791
759
|
let sub = subs[i];
|
792
|
-
let ric = sub["ric"];
|
793
760
|
|
794
761
|
// chain subId fires twice, one with "_ci_" and one without "_ci_"
|
795
762
|
// the subId with "_ci_" should be ignore
|
796
|
-
if(sub["id"].indexOf("_ci_")
|
797
|
-
|
798
|
-
}
|
799
|
-
|
800
|
-
this.addSubscription(sub, ric);
|
801
|
-
|
802
|
-
if (duplicateSubIds) { // There will be no network request for duplicate subs, and hence we need to update the data from our cache
|
803
|
-
let dupSubId = duplicateSubIds[i];
|
804
|
-
|
805
|
-
if (dupSubId) {
|
806
|
-
window.setTimeout(
|
807
|
-
this._onDuplicateRic.bind(this, sub["id"], this.getRowData(dupSubId + ric)),
|
808
|
-
10);
|
809
|
-
}
|
763
|
+
if(sub["id"].indexOf("_ci_") < 0){
|
764
|
+
this.addSubscription(sub, sub["ric"]);
|
810
765
|
}
|
811
766
|
}
|
812
767
|
};
|
@@ -824,48 +779,8 @@ DataCache.prototype._onQ2SubRemoved = function (e) {
|
|
824
779
|
|
825
780
|
// chain subId fires twice, one with "_ci_" and one without "_ci_"
|
826
781
|
// the subId with "_ci_" should be ignore
|
827
|
-
if(sub["id"].indexOf("_ci_")
|
828
|
-
|
829
|
-
}
|
830
|
-
|
831
|
-
this.removeSubscription(sub);
|
832
|
-
}
|
833
|
-
};
|
834
|
-
|
835
|
-
/**
|
836
|
-
* @private
|
837
|
-
* @param {string} subId
|
838
|
-
* @param {Object.<string, *>} dupData
|
839
|
-
*/
|
840
|
-
DataCache.prototype._onDuplicateRic = function (subId, dupData) {
|
841
|
-
let sub = this._subs[subId];
|
842
|
-
|
843
|
-
if (!sub) {
|
844
|
-
return;
|
845
|
-
}
|
846
|
-
|
847
|
-
sub = sub["s"]; // Quotes2' subscription
|
848
|
-
|
849
|
-
let ric = sub["ric"];
|
850
|
-
let dupSubId = /** @type{string} */(dupData["SUB_ID"]);
|
851
|
-
let values = this._cloneRowData(dupData, ric, subId);
|
852
|
-
|
853
|
-
if (!values) {
|
854
|
-
return;
|
855
|
-
}
|
856
|
-
|
857
|
-
this._onInsert(sub, ric, values);
|
858
|
-
|
859
|
-
let children = sub["children"];
|
860
|
-
|
861
|
-
if (children) {
|
862
|
-
let childCount = children.length;
|
863
|
-
|
864
|
-
for (let i = 0; i < childCount; ++i) {
|
865
|
-
ric = children[i];
|
866
|
-
values = this._cloneRowData(dupSubId, ric, subId);
|
867
|
-
|
868
|
-
this._onInsert(sub, ric, values);
|
782
|
+
if(sub["id"].indexOf("_ci_") < 0){
|
783
|
+
this.removeSubscription(sub);
|
869
784
|
}
|
870
785
|
}
|
871
786
|
};
|
@@ -906,38 +821,6 @@ DataCache.prototype._onDelete = function (sub, ric, values/*, rowN*/) {
|
|
906
821
|
this.setRowData(sub["id"] + ric, null, {"subscription": sub, "ric": ric});
|
907
822
|
};
|
908
823
|
|
909
|
-
/**
|
910
|
-
* @private
|
911
|
-
* @param {string|Object.<string, *>} obj
|
912
|
-
* @param {string} ric
|
913
|
-
* @param {string} newSubId
|
914
|
-
* @return {Object}
|
915
|
-
*/
|
916
|
-
DataCache.prototype._cloneRowData = function (obj, ric, newSubId) {
|
917
|
-
let subId = (typeof obj === "string") ? obj : obj["SUB_ID"];
|
918
|
-
let fields = this._rows[subId + ric];
|
919
|
-
|
920
|
-
if (!fields) { // The specified row has been removed
|
921
|
-
if (typeof obj === "object") {
|
922
|
-
fields = obj;
|
923
|
-
} else {
|
924
|
-
return null;
|
925
|
-
}
|
926
|
-
}
|
927
|
-
|
928
|
-
let values = {};
|
929
|
-
|
930
|
-
for (let key in fields) {
|
931
|
-
if (this._staticFields[key] == null) { // Static field must not be cloned
|
932
|
-
values[key] = fields[key];
|
933
|
-
}
|
934
|
-
}
|
935
|
-
|
936
|
-
values["SUB_ID"] = newSubId;
|
937
|
-
|
938
|
-
return values;
|
939
|
-
};
|
940
|
-
|
941
824
|
/** @protected
|
942
825
|
* @ignore
|
943
826
|
* @type {!Object.<string, Object>}
|
@@ -956,12 +839,6 @@ DataCache.prototype._subs;
|
|
956
839
|
*/
|
957
840
|
DataCache.prototype._quotes2 = null;
|
958
841
|
|
959
|
-
/**
|
960
|
-
* @private
|
961
|
-
* @type {Object.<string, number>}
|
962
|
-
*/
|
963
|
-
DataCache.prototype._staticFields = null;
|
964
|
-
|
965
842
|
/** @protected
|
966
843
|
* @ignore
|
967
844
|
* @type {boolean}
|
package/lib/grid/index.js
CHANGED
@@ -12,7 +12,7 @@ declare namespace FieldDefinition {
|
|
12
12
|
|
13
13
|
function hasFieldInfo(field: string): boolean;
|
14
14
|
|
15
|
-
function getTimeSeriesChildren(field: string): any;
|
15
|
+
function getTimeSeriesChildren(field: string): any[]|null;
|
16
16
|
|
17
17
|
function addTimeSeriesChild(tsDef: string, childDef: any): void;
|
18
18
|
|
package/package.json
CHANGED
@@ -57,7 +57,8 @@
|
|
57
57
|
"./window-exporter": "./lib/window-exporter.js",
|
58
58
|
"./grid": "./lib/grid/lib/efx-grid.js",
|
59
59
|
"./formatters/*": "./lib/formatters/es6/*.js",
|
60
|
-
"./utils": "./lib/utils/index.js"
|
60
|
+
"./utils": "./lib/utils/index.js",
|
61
|
+
"./types": "./lib/types/index.d.ts"
|
61
62
|
},
|
62
63
|
"peerDependencies": {
|
63
64
|
"@refinitiv-ui/core": "^6.2.0 || ^7.0.0",
|
@@ -66,5 +67,5 @@
|
|
66
67
|
"publishConfig": {
|
67
68
|
"access": "public"
|
68
69
|
},
|
69
|
-
"version": "6.0.
|
70
|
+
"version": "6.0.104"
|
70
71
|
}
|