@refinitiv-ui/efx-grid 6.0.32 → 6.0.34

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.
Files changed (70) hide show
  1. package/lib/core/dist/core.js +197 -46
  2. package/lib/core/dist/core.min.js +1 -1
  3. package/lib/core/es6/data/DataTable.d.ts +1 -1
  4. package/lib/core/es6/data/DataTable.js +9 -8
  5. package/lib/core/es6/data/DataView.js +1 -1
  6. package/lib/core/es6/data/Segment.d.ts +2 -0
  7. package/lib/core/es6/data/Segment.js +16 -0
  8. package/lib/core/es6/data/SegmentCollection.d.ts +1 -3
  9. package/lib/core/es6/data/SegmentCollection.js +25 -18
  10. package/lib/core/es6/grid/Core.d.ts +4 -0
  11. package/lib/core/es6/grid/Core.js +27 -6
  12. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +1 -0
  13. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +36 -12
  14. package/lib/grid/index.js +1 -1
  15. package/lib/grid/themes/halo/dark/efx-grid.js +1 -1
  16. package/lib/grid/themes/halo/dark/es5/all-elements.js +1 -1
  17. package/lib/grid/themes/halo/efx-grid.less +2 -0
  18. package/lib/grid/themes/halo/light/efx-grid.js +1 -1
  19. package/lib/grid/themes/halo/light/es5/all-elements.js +1 -1
  20. package/lib/rt-grid/dist/rt-grid.js +945 -331
  21. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  22. package/lib/rt-grid/es6/ColumnDefinition.js +13 -8
  23. package/lib/rt-grid/es6/DataConnector.js +3 -2
  24. package/lib/rt-grid/es6/Grid.d.ts +3 -1
  25. package/lib/rt-grid/es6/Grid.js +130 -28
  26. package/lib/rt-grid/es6/RowDefinition.d.ts +7 -2
  27. package/lib/rt-grid/es6/RowDefinition.js +49 -11
  28. package/lib/rt-grid/es6/SnapshotFiller.d.ts +1 -0
  29. package/lib/rt-grid/es6/SnapshotFiller.js +1 -11
  30. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +4 -0
  31. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +58 -30
  32. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +2 -0
  33. package/lib/tr-grid-column-stack/es6/ColumnStack.js +56 -22
  34. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +12 -5
  35. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +128 -42
  36. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +3 -3
  37. package/lib/tr-grid-heat-map/es6/HeatMap.js +13 -2
  38. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +2 -1
  39. package/lib/tr-grid-row-dragging/es6/RowDragging.js +142 -17
  40. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +20 -20
  41. package/lib/tr-grid-textformatting/es6/TextFormatting.js +37 -138
  42. package/lib/tr-grid-util/es6/CellPainter.d.ts +1 -1
  43. package/lib/tr-grid-util/es6/CellPainter.js +56 -55
  44. package/lib/tr-grid-util/es6/FieldFormatter.js +6 -2
  45. package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +2 -0
  46. package/lib/tr-grid-util/es6/GroupDefinitions.js +15 -0
  47. package/lib/tr-grid-util/es6/NumberFormatter.js +23 -11
  48. package/lib/tr-grid-util/es6/Util.d.ts +6 -0
  49. package/lib/tr-grid-util/es6/Util.js +68 -0
  50. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +1 -1
  51. package/lib/tr-grid-util/es6/jet/CollectionDict.js +12 -2
  52. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +170 -47
  53. package/lib/types/es6/ColumnGrouping.d.ts +4 -0
  54. package/lib/types/es6/ColumnSelection.d.ts +2 -0
  55. package/lib/types/es6/ColumnStack.d.ts +2 -0
  56. package/lib/types/es6/ConditionalColoring.d.ts +12 -5
  57. package/lib/types/es6/Core/data/Segment.d.ts +2 -0
  58. package/lib/types/es6/Core/data/SegmentCollection.d.ts +1 -3
  59. package/lib/types/es6/Core/grid/Core.d.ts +4 -0
  60. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +1 -0
  61. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +6 -2
  62. package/lib/types/es6/HeatMap.d.ts +3 -3
  63. package/lib/types/es6/RealtimeGrid/Grid.d.ts +3 -1
  64. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +7 -2
  65. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +1 -0
  66. package/lib/types/es6/RowDragging.d.ts +25 -2
  67. package/lib/types/es6/StatisticsRow.d.ts +25 -25
  68. package/lib/types/es6/TextFormatting.d.ts +20 -20
  69. package/lib/versions.json +7 -7
  70. package/package.json +1 -1
@@ -237,25 +237,17 @@ CellPainter.prototype.clearHeatMap = function() {
237
237
  /** @public */
238
238
  CellPainter.prototype.applyThemeColor = function() {
239
239
  var colors = ElfUtil.getColors();
240
- var cond = this._conditions[0]; // Heatmap, color text condition must be the first
241
- if(cond) {
242
- if(this._coloringType === CellPainter.ColoringTypes.HEATMAP) { // Heatmap uses grid color to blend the result color
240
+ if(this._coloringType === CellPainter.ColoringTypes.HEATMAP) { // Heatmap uses grid color to blend the result color
241
+ var cond = this._conditions[0]; // Heatmap, color text condition must be the first
242
+ if(cond) {
243
243
  if(cond["textMode"]) {
244
244
  cond["baseColor"] = colors["baseText"];
245
245
  } else {
246
246
  cond["baseColor"] = colors["baseGrid"];
247
247
  }
248
- }
249
- if(cond["useThemeColor"]) { // Only heatmap and colorText painters use theme color
250
- if(this._coloringType === CellPainter.ColoringTypes.HEATMAP || this._coloringType === CellPainter.ColoringTypes.TEXT) {
251
- var up, down;
252
- if(this._coloringType === CellPainter.ColoringTypes.TEXT && cond["field"] === "CF_TICK") {
253
- up = colors["tickUp"];
254
- down = colors["tickDown"];
255
- } else {
256
- up = colors["up"];
257
- down = colors["down"];
258
- }
248
+ if(cond["useThemeColor"]) {
249
+ var up = colors["up"];
250
+ var down = colors["down"];
259
251
  var level = (colors["level"] === colors["baseText"]) ? "" : colors["level"];
260
252
  CellPainter._setUpDownColors(cond, up, down, level);
261
253
  }
@@ -374,34 +366,36 @@ CellPainter.prototype.addHeatmapWithTheme = function(field, midPoint, opt_textMo
374
366
  /** @private
375
367
  * @param {Function} expression
376
368
  * @param {string} field
377
- * @param {string} upColor
378
- * @param {string} downColor
379
- * @param {string} levelColor
369
+ * @param {string=} upClass CSS class name
370
+ * @param {string=} downClass CSS class name
371
+ * @param {string=} levelClass CSS class name
380
372
  * @return {!Object}
381
373
  */
382
- CellPainter.prototype._addColorText = function(expression, field, upColor, downColor, levelColor) {
374
+ CellPainter.prototype._addColorText = function(expression, field, upClass, downClass, levelClass) {
383
375
  this._setColoringType(CellPainter.ColoringTypes.TEXT);
384
376
 
385
377
  var condition = {};
386
378
  condition["field"] = field;
387
379
  condition["expression"] = expression.bind(null, field);
388
- CellPainter._setUpDownColors(condition, upColor, downColor, levelColor);
380
+ condition["upClass"] = upClass;
381
+ condition["downClass"] = downClass;
382
+ condition["levelClass"] = levelClass;
389
383
 
390
384
  this._addCondition(condition);
391
385
  return condition;
392
386
  };
393
387
  /** @public
394
388
  * @param {string} field
395
- * @param {string} upColor
396
- * @param {string} downColor
397
- * @param {string} levelColor
389
+ * @param {string=} upClass CSS class name
390
+ * @param {string=} downClass CSS class name
391
+ * @param {string=} levelClass CSS class name
398
392
  * @return {!Object}
399
393
  */
400
- CellPainter.prototype.addColorText = function(field, upColor, downColor, levelColor) {
394
+ CellPainter.prototype.addColorText = function(field, upClass, downClass, levelClass) {
401
395
  return this._addColorText(
402
396
  TickFields[field] ? CellPainter._tickColorTextCondition : CellPainter._colorTextCondition,
403
397
  field,
404
- upColor, downColor, levelColor
398
+ upClass, downClass, levelClass
405
399
  );
406
400
  };
407
401
  /** @public
@@ -409,14 +403,7 @@ CellPainter.prototype.addColorText = function(field, upColor, downColor, levelCo
409
403
  * @return {!Object}
410
404
  */
411
405
  CellPainter.prototype.addColorTextWithTheme = function(field) {
412
- var colors = ElfUtil.themeColors;
413
- var condition = this.addColorText(field,
414
- colors["up"],
415
- colors["down"],
416
- (colors["level"] === colors["baseText"]) ? "" : colors["level"]
417
- );
418
-
419
- condition["useThemeColor"] = true;
406
+ var condition = this.addColorText(field, "positive", "negative", "neutral");
420
407
  return condition;
421
408
  };
422
409
  /** @public
@@ -518,14 +505,16 @@ CellPainter.prototype.renderForPrinting = function(cell, rowData, min, max) {
518
505
  return;
519
506
  }
520
507
  var styles = this._getStyles(rowData, min, max);
521
- var cssClass = styles["cssClass"];
522
- if (cssClass) {
523
- if (cell._coloringCssClass !== cssClass) {
524
- cell.classList.remove(cell._coloringCssClass);
525
- cell._coloringCssClass = null;
508
+ var cssClass = styles["cssClass"]; // Can be an empty string
509
+ if (cssClass != null) { // Predefined colors mode
510
+ if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
511
+ elem.classList.remove(elem._coloringCssClass);
512
+ elem._coloringCssClass = null;
513
+ }
514
+ if (cssClass) {
515
+ elem.classList.add(cssClass);
516
+ elem._coloringCssClass = cssClass;
526
517
  }
527
- cell.classList.add(cssClass);
528
- cell._coloringCssClass = cssClass;
529
518
  } else {
530
519
  if (cell._coloringCssClass) {
531
520
  cell.classList.remove(cell._coloringCssClass);
@@ -658,14 +647,17 @@ CellPainter._cellRestorer = function(scope) {
658
647
  }
659
648
 
660
649
  var styles = this._getStyles(rowData, min, max);
661
- var cssClass = styles["cssClass"];
662
- if (cssClass) {
650
+ var cssClass = styles["cssClass"]; // Can be an empty string
651
+ if (cssClass != null) { // Predefined colors mode
663
652
  if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
664
653
  elem.classList.remove(elem._coloringCssClass);
665
654
  elem._coloringCssClass = null;
666
655
  }
667
- elem.classList.add(cssClass);
668
- elem._coloringCssClass = cssClass;
656
+ if (cssClass) {
657
+ elem.classList.add(cssClass);
658
+ elem._coloringCssClass = cssClass;
659
+ }
660
+ // Remove blinking color
669
661
  elem.style.backgroundColor = "";
670
662
  elem.style.color = "";
671
663
  } else {
@@ -720,13 +712,14 @@ CellPainter.prototype._getStyles = function(rowData, min, max) {
720
712
  }
721
713
  } else if(this._coloringType === CellPainter.ColoringTypes.TEXT) {
722
714
  if(ret > 0) {
723
- CellPainter._colorObj["color"] = curCond["upColor"];
715
+ curCond["cssClass"] = curCond["upClass"];
724
716
  } else if(ret < 0) {
725
- CellPainter._colorObj["color"] = curCond["downColor"];
717
+ curCond["cssClass"] = curCond["downClass"];
726
718
  } else {
727
- CellPainter._colorObj["color"] = this._levelColorDisabled ? "" : curCond["levelColor"];
719
+ curCond["cssClass"] = this._levelColorDisabled ? "" : curCond["levelClass"];
728
720
  }
729
- return CellPainter._colorObj;
721
+ curCond["cssClass"] = curCond["cssClass"] || "";
722
+ return curCond;
730
723
  }
731
724
 
732
725
  // Expected return value is {
@@ -902,6 +895,10 @@ CellPainter.clearCellStyle = function(cell, styles) {
902
895
  // WARNING: Scope is not removed from the this._scopes collection to speed things up
903
896
  }
904
897
 
898
+ if(elem._coloringCssClass) {
899
+ elem.classList.remove(elem._coloringCssClass);
900
+ }
901
+
905
902
  styles = styles || CellPainter.supportedStyles;
906
903
  for(var i = styles.length; --i >= 0;) {
907
904
  elem.style[styles[i]] = ""; // WARNING: Very slow
@@ -915,22 +912,24 @@ CellPainter.clearCellStyle = function(cell, styles) {
915
912
  * @param {boolean=} withContrast
916
913
  */
917
914
  CellPainter._setUpDownColors = function(scp, upColor, downColor, levelColor, withContrast) {
915
+ scp["upColor"] = upColor;
918
916
  if(upColor != null) {
919
- scp["upColor"] = upColor;
920
917
  if(withContrast) {
921
918
  scp["contrastUpColor"] = CellPainter.getOppositeColor(upColor);
922
919
  }
923
920
  //scp["rgbUp"] = CellPainter.hex2Rgb(upColor);
924
921
  }
922
+
923
+ scp["downColor"] = downColor;
925
924
  if(downColor != null) {
926
- scp["downColor"] = downColor;
927
925
  if(withContrast) {
928
926
  scp["contrastDownColor"] = CellPainter.getOppositeColor(downColor);
929
927
  }
930
928
  //scp["rgbDown"] = CellPainter.hex2Rgb(downColor);
931
929
  }
930
+
931
+ scp["levelColor"] = levelColor;
932
932
  if(levelColor != null) {
933
- scp["levelColor"] = levelColor;
934
933
  if(withContrast) {
935
934
  scp["contrastLevelColor"] = CellPainter.getOppositeColor(levelColor);
936
935
  }
@@ -1024,14 +1023,16 @@ CellPainter.prototype._paintCell = function(cell, rowData, min, max) {
1024
1023
  }
1025
1024
 
1026
1025
  var styles = this._getStyles(rowData, min, max);
1027
- var cssClass = styles["cssClass"];
1028
- if (cssClass) {
1029
- if (elem._coloringCssClass !== cssClass) {
1026
+ var cssClass = styles["cssClass"]; // Can be an empty string
1027
+ if (cssClass != null) { // Predefined colors mode
1028
+ if (elem._coloringCssClass && elem._coloringCssClass !== cssClass) {
1030
1029
  elem.classList.remove(elem._coloringCssClass);
1031
1030
  elem._coloringCssClass = null;
1032
1031
  }
1033
- elem.classList.add(cssClass);
1034
- elem._coloringCssClass = cssClass;
1032
+ if (cssClass) {
1033
+ elem.classList.add(cssClass);
1034
+ elem._coloringCssClass = cssClass;
1035
+ }
1035
1036
  } else {
1036
1037
  if (elem._coloringCssClass) {
1037
1038
  elem.classList.remove(elem._coloringCssClass);
@@ -189,8 +189,12 @@ FieldFormatter.prototype.getOptions = function(options) { // serialize
189
189
  options["field"] = this._field;
190
190
  options["formatType"] = this._userFormatType ? this._userFormatType : this._formatType; // WARNING: Beware of case sensitivity
191
191
  if(toDateTimeType(options["formatType"]) == DATE_TIME){
192
- options["dateTimeFormat"] = this._dateTimeFormat;
193
- options["useUTCTime"] = (this._timeZone == "GMT");
192
+ if(this._dateTimeFormat !== "") {
193
+ options["dateTimeFormat"] = this._dateTimeFormat;
194
+ }
195
+ if(this._timeZone !== "GMT") {
196
+ options["useUTCTime"] = false;
197
+ } // useUTCTime by default, otherwise is use local
194
198
  }
195
199
  return options;
196
200
  };
@@ -56,6 +56,8 @@ declare class GroupDefinitions {
56
56
 
57
57
  public setGroupChildren(groupId: string, newChildList: (string)[]|null): boolean;
58
58
 
59
+ public setGroupName(groupId: string, groupName: string): boolean;
60
+
59
61
  }
60
62
 
61
63
  export default GroupDefinitions;
@@ -562,6 +562,21 @@ GroupDefinitions.prototype.setGroupChildren = function (groupId, newChildList) {
562
562
  }
563
563
  return false;
564
564
  };
565
+ /** @public
566
+ * @param {string} groupId
567
+ * @param {string} groupName
568
+ * @return {boolean}
569
+ */
570
+ GroupDefinitions.prototype.setGroupName = function (groupId, groupName) {
571
+ var groupDef = this._groupMap[groupId];
572
+ if(groupDef) {
573
+ if(groupDef.name !== groupName) {
574
+ groupDef.name = groupName;
575
+ return true;
576
+ }
577
+ }
565
578
 
579
+ return false;
580
+ };
566
581
  export default GroupDefinitions;
567
582
  export { GroupDefinitions };
@@ -242,25 +242,37 @@ NumberFormatter.prototype.getOptions = function(options) { // serialize
242
242
 
243
243
  var formatType = options["formatType"];
244
244
 
245
- options["precisionEnabled"] = this._precisionEnabled;
246
- options["decimalPlaces"] = this._precision;
247
- options["plusSign"] = this._plusSignEnabled;
248
- options["separator"] = this._separatorEnabled;
245
+ if(this._precisionEnabled !== true) {
246
+ options["precisionEnabled"] = this._precisionEnabled; // Default in init
247
+ }
248
+
249
+ if(this._precision !== 2) {
250
+ options["decimalPlaces"] = this._precision;
251
+ }
252
+
253
+ if(this._plusSignEnabled !== false) {
254
+ options["plusSign"] = this._plusSignEnabled;
255
+ }
256
+
257
+ if(this._separatorEnabled !== false) {
258
+ options["separator"] = this._separatorEnabled;
259
+ }
249
260
 
250
261
  if(formatType === "scaled" || formatType === "scaledvalue") {
251
262
  var su = "";
252
263
  if(this._scaler == "b") {
253
264
  su = "billion";
254
- } else if(this._scaler == "m") {
255
- su = "million";
256
- }
257
- options["scalingUnit"] = su;
265
+ options["scalingUnit"] = su;
266
+ } // We didn't return default value (million) for clean up getConfigObject
258
267
  }
259
268
 
260
269
  if(formatType === "percent") {
261
- options["percentSign"] = this._percentSignEnabled;
262
- options["mutiplyBy100"] = this._multiplyBy100Enabled;
263
- options["multiplyBy100"] = this._multiplyBy100Enabled;
270
+ if(this._percentSignEnabled !== true) {
271
+ options["percentSign"] = this._percentSignEnabled;
272
+ }
273
+ if(this._multiplyBy100Enabled !== false) {
274
+ options["multiplyBy100"] = this._multiplyBy100Enabled;
275
+ }
264
276
  }
265
277
  return options;
266
278
  };
@@ -18,10 +18,14 @@ declare function extendObject(obj: any, extender?: any, limiters?: (string)[]|nu
18
18
 
19
19
  declare function cloneObject(obj: any, limiters?: (string)[]|null): any;
20
20
 
21
+ declare function isEmptyObject(obj: any): boolean;
22
+
21
23
  declare function arrayToObject(data?: any[]|null, fields?: (string)[]|null): any|null|null;
22
24
 
23
25
  declare function extendProperty(obj: any, extender: any, propName: string): void;
24
26
 
27
+ declare function deepEqual(obj1: any, obj2: any): boolean;
28
+
25
29
  declare function extendArrayProperty(obj: any, propName: string, ary: any): any[]|null;
26
30
 
27
31
  declare function parseCondition(expression: string|((...params: any[]) => any)|null): ((...params: any[]) => any)|null;
@@ -49,6 +53,8 @@ export {
49
53
  Util,
50
54
  extendObject,
51
55
  cloneObject,
56
+ isEmptyObject,
57
+ deepEqual,
52
58
  arrayToObject,
53
59
  extendProperty,
54
60
  extendArrayProperty,
@@ -138,6 +138,20 @@ var extendObject = function (obj, extender, limiters) {
138
138
  var cloneObject = function (obj, limiters) {
139
139
  return extendObject({}, obj, limiters);
140
140
  };
141
+
142
+ /** Check empty object
143
+ * @public
144
+ * @function
145
+ * @param {Object} obj
146
+ * @return {boolean}=true, if the obj is empty
147
+ */
148
+ var isEmptyObject = function (obj) {
149
+ for (var key in obj) {
150
+ return false;
151
+ }
152
+ return true;
153
+ };
154
+
141
155
  /** @public
142
156
  * @param {Array=} data
143
157
  * @param {Array.<string>=} fields In case of the given data is an array, this param will be used for mapping index to field
@@ -186,6 +200,58 @@ var extendProperty = function (obj, extender, propName) {
186
200
  }
187
201
  }
188
202
  };
203
+
204
+
205
+ /** Compare the values of obj1 and obj2. if they are the same object or have the same value, the result will be true. Otherwise, it will return false.
206
+ * @public
207
+ * @param {*} obj1
208
+ * @param {*} obj2
209
+ * @return {boolean}
210
+ */
211
+ var deepEqual = function (obj1, obj2) {
212
+
213
+ if(obj1 === obj2) {
214
+ return true;
215
+ }
216
+
217
+ if (typeof obj1 !== typeof obj2) {
218
+ return false;
219
+ }
220
+
221
+ if (typeof obj1 === "object") {
222
+
223
+ // We need to split array and object for performance reason
224
+ if(Array.isArray(obj1)) {
225
+ if(obj1.length !== obj2.length) {
226
+ return false;
227
+ }
228
+
229
+ for (var i = 0; i < obj1.length; i++) {
230
+ if (!deepEqual(obj1[i], obj2[i])) { // The array may not be a match if the elements are not sorted, so it will not be considered equal if there is a mismatch.
231
+ return false;
232
+ }
233
+ }
234
+
235
+ } else {
236
+
237
+ if (Object.keys(obj1).length !== Object.keys(obj2).length) {
238
+ return false;
239
+ }
240
+
241
+ for (var key in obj1) {
242
+ if (!deepEqual(obj1[key], obj2[key])) {
243
+ return false;
244
+ }
245
+ }
246
+ }
247
+
248
+
249
+ return true;
250
+ }
251
+
252
+ return false;
253
+
254
+ };
189
255
  /** Array.push() is much faster than Array.concat(). The downside is the parameters must be an array, whereas concat() has no such requirement. <br>
190
256
  * This method excels in extending known array property in an object.
191
257
  * @public
@@ -512,6 +578,8 @@ export {
512
578
  Util,
513
579
  extendObject,
514
580
  cloneObject,
581
+ isEmptyObject,
582
+ deepEqual,
515
583
  arrayToObject,
516
584
  extendProperty,
517
585
  extendArrayProperty,
@@ -18,7 +18,7 @@ declare class CollectionDict {
18
18
 
19
19
  public getAllItems(): any[]|null;
20
20
 
21
- public getItemCount(): number;
21
+ public getItemCount(key?: string|null): number;
22
22
 
23
23
  public getAllKeys(): (string)[];
24
24
 
@@ -1,4 +1,6 @@
1
- /** @constructor */
1
+ /** @description CollectionDict stores a collection (Array) of any value using a text (string) as a key for accessing the collection.
2
+ * @constructor
3
+ */
2
4
  var CollectionDict = function() {
3
5
  this._dict = {};
4
6
  };
@@ -125,9 +127,17 @@ CollectionDict.prototype.getAllItems = function() {
125
127
  return null;
126
128
  };
127
129
  /** @public
130
+ * @param {string=} key
128
131
  * @return {number}
129
132
  */
130
- CollectionDict.prototype.getItemCount = function() {
133
+ CollectionDict.prototype.getItemCount = function(key) {
134
+ if(key) {
135
+ var items = this._dict[key] || null;
136
+ if(items) {
137
+ return items.length;
138
+ }
139
+ return 0;
140
+ }
131
141
  return this._count;
132
142
  };
133
143
  /** @public