@visactor/vtable 0.10.2-alpha.3 → 0.10.2

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 (103) hide show
  1. package/cjs/ListTable.d.ts +2 -1
  2. package/cjs/ListTable.js +6 -0
  3. package/cjs/ListTable.js.map +1 -1
  4. package/cjs/PivotChart.d.ts +1 -0
  5. package/cjs/PivotChart.js +3 -2
  6. package/cjs/PivotChart.js.map +1 -1
  7. package/cjs/PivotTable.d.ts +2 -1
  8. package/cjs/PivotTable.js +8 -2
  9. package/cjs/PivotTable.js.map +1 -1
  10. package/cjs/components/axis/axis.js +4 -0
  11. package/cjs/components/axis/axis.js.map +1 -1
  12. package/cjs/components/legend/continue-legend/continue-legend.d.ts +24 -0
  13. package/cjs/components/legend/continue-legend/continue-legend.js +93 -0
  14. package/cjs/components/legend/continue-legend/continue-legend.js.map +1 -0
  15. package/cjs/components/legend/continue-legend/get-continue-legend-attributes.d.ts +5 -0
  16. package/cjs/components/legend/continue-legend/get-continue-legend-attributes.js +139 -0
  17. package/cjs/components/legend/continue-legend/get-continue-legend-attributes.js.map +1 -0
  18. package/cjs/components/legend/create-legend.d.ts +5 -0
  19. package/cjs/components/legend/create-legend.js +14 -0
  20. package/cjs/components/legend/create-legend.js.map +1 -0
  21. package/{es/components/legend/legend.d.ts → cjs/components/legend/discrete-legend/discrete-legend.d.ts} +6 -6
  22. package/cjs/components/legend/{legend.js → discrete-legend/discrete-legend.js} +6 -6
  23. package/cjs/components/legend/discrete-legend/discrete-legend.js.map +1 -0
  24. package/cjs/components/legend/discrete-legend/get-discrete-legend-attributes.d.ts +5 -0
  25. package/cjs/components/legend/{get-legend-attributes.js → discrete-legend/get-discrete-legend-attributes.js} +2 -2
  26. package/cjs/components/legend/discrete-legend/get-discrete-legend-attributes.js.map +1 -0
  27. package/cjs/core/BaseTable.d.ts +1 -1
  28. package/cjs/core/BaseTable.js +4 -10
  29. package/cjs/core/BaseTable.js.map +1 -1
  30. package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
  31. package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
  32. package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
  33. package/cjs/dataset/dataset.d.ts +11 -8
  34. package/cjs/dataset/dataset.js +14 -3
  35. package/cjs/dataset/dataset.js.map +1 -1
  36. package/cjs/event/listener/table-group.js +42 -49
  37. package/cjs/event/listener/table-group.js.map +1 -1
  38. package/cjs/index.d.ts +1 -1
  39. package/cjs/index.js +1 -1
  40. package/cjs/index.js.map +1 -1
  41. package/cjs/ts-types/base-table.d.ts +3 -2
  42. package/cjs/ts-types/base-table.js.map +1 -1
  43. package/cjs/ts-types/component/legend.d.ts +15 -2
  44. package/cjs/ts-types/component/legend.js.map +1 -1
  45. package/cjs/ts-types/events.d.ts +6 -0
  46. package/cjs/ts-types/events.js.map +1 -1
  47. package/cjs/ts-types/table-engine.js.map +1 -1
  48. package/dist/vtable.js +1118 -26
  49. package/dist/vtable.min.js +3 -3
  50. package/es/ListTable.d.ts +2 -1
  51. package/es/ListTable.js +6 -0
  52. package/es/ListTable.js.map +1 -1
  53. package/es/PivotChart.d.ts +1 -0
  54. package/es/PivotChart.js +3 -2
  55. package/es/PivotChart.js.map +1 -1
  56. package/es/PivotTable.d.ts +2 -1
  57. package/es/PivotTable.js +8 -2
  58. package/es/PivotTable.js.map +1 -1
  59. package/es/components/axis/axis.js +4 -0
  60. package/es/components/axis/axis.js.map +1 -1
  61. package/es/components/legend/continue-legend/continue-legend.d.ts +24 -0
  62. package/es/components/legend/continue-legend/continue-legend.js +91 -0
  63. package/es/components/legend/continue-legend/continue-legend.js.map +1 -0
  64. package/es/components/legend/continue-legend/get-continue-legend-attributes.d.ts +5 -0
  65. package/es/components/legend/continue-legend/get-continue-legend-attributes.js +132 -0
  66. package/es/components/legend/continue-legend/get-continue-legend-attributes.js.map +1 -0
  67. package/es/components/legend/create-legend.d.ts +5 -0
  68. package/es/components/legend/create-legend.js +8 -0
  69. package/es/components/legend/create-legend.js.map +1 -0
  70. package/{cjs/components/legend/legend.d.ts → es/components/legend/discrete-legend/discrete-legend.d.ts} +6 -6
  71. package/es/components/legend/{legend.js → discrete-legend/discrete-legend.js} +5 -5
  72. package/es/components/legend/discrete-legend/discrete-legend.js.map +1 -0
  73. package/es/components/legend/discrete-legend/get-discrete-legend-attributes.d.ts +5 -0
  74. package/es/components/legend/{get-legend-attributes.js → discrete-legend/get-discrete-legend-attributes.js} +3 -3
  75. package/es/components/legend/discrete-legend/get-discrete-legend-attributes.js.map +1 -0
  76. package/es/core/BaseTable.d.ts +1 -1
  77. package/es/core/BaseTable.js +4 -10
  78. package/es/core/BaseTable.js.map +1 -1
  79. package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
  80. package/es/core/TABLE_EVENT_TYPE.js +1 -0
  81. package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
  82. package/es/dataset/dataset.d.ts +11 -8
  83. package/es/dataset/dataset.js +13 -3
  84. package/es/dataset/dataset.js.map +1 -1
  85. package/es/event/listener/table-group.js +41 -48
  86. package/es/event/listener/table-group.js.map +1 -1
  87. package/es/index.d.ts +1 -1
  88. package/es/index.js +1 -1
  89. package/es/index.js.map +1 -1
  90. package/es/ts-types/base-table.d.ts +3 -2
  91. package/es/ts-types/base-table.js.map +1 -1
  92. package/es/ts-types/component/legend.d.ts +15 -2
  93. package/es/ts-types/component/legend.js.map +1 -1
  94. package/es/ts-types/events.d.ts +6 -0
  95. package/es/ts-types/events.js.map +1 -1
  96. package/es/ts-types/table-engine.js.map +1 -1
  97. package/package.json +1 -1
  98. package/cjs/components/legend/get-legend-attributes.d.ts +0 -5
  99. package/cjs/components/legend/get-legend-attributes.js.map +0 -1
  100. package/cjs/components/legend/legend.js.map +0 -1
  101. package/es/components/legend/get-legend-attributes.d.ts +0 -5
  102. package/es/components/legend/get-legend-attributes.js.map +0 -1
  103. package/es/components/legend/legend.js.map +0 -1
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+
3
+ var __rest = this && this.__rest || function(s, e) {
4
+ var t = {};
5
+ for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
6
+ if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
7
+ var i = 0;
8
+ for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
9
+ }
10
+ return t;
11
+ };
12
+
13
+ Object.defineProperty(exports, "__esModule", {
14
+ value: !0
15
+ }), exports.getContinuousLegendAttributes = void 0;
16
+
17
+ const vutils_1 = require("@visactor/vutils"), transform_1 = require("../../util/transform"), defaultContinueLegendSpec = {
18
+ orient: "right",
19
+ position: "middle",
20
+ padding: 30,
21
+ title: {
22
+ visible: !1,
23
+ padding: 0,
24
+ textStyle: {
25
+ fontSize: 14,
26
+ fontWeight: "normal",
27
+ fill: {
28
+ type: "palette",
29
+ key: "titleFontColor"
30
+ }
31
+ },
32
+ space: 12
33
+ },
34
+ handler: {
35
+ visible: !0
36
+ },
37
+ startText: {
38
+ style: {
39
+ fontSize: 14,
40
+ fontWeight: "normal",
41
+ fill: {
42
+ type: "palette",
43
+ key: "labelFontColor"
44
+ }
45
+ }
46
+ },
47
+ endText: {
48
+ style: {
49
+ fontSize: 14,
50
+ fontWeight: "normal",
51
+ fill: {
52
+ type: "palette",
53
+ key: "labelFontColor"
54
+ }
55
+ }
56
+ },
57
+ handlerText: {
58
+ style: {
59
+ fontSize: 14,
60
+ fontWeight: "normal",
61
+ fill: {
62
+ type: "palette",
63
+ key: "labelFontColor"
64
+ }
65
+ }
66
+ }
67
+ }, defaultColorLegendSpec = {
68
+ horizontal: Object.assign(Object.assign({}, defaultContinueLegendSpec), {
69
+ rail: {
70
+ width: 200,
71
+ height: 8,
72
+ style: {
73
+ fill: "rgba(0,0,0,0.04)"
74
+ }
75
+ }
76
+ }),
77
+ vertical: Object.assign(Object.assign({}, defaultContinueLegendSpec), {
78
+ rail: {
79
+ width: 8,
80
+ height: 200,
81
+ style: {
82
+ fill: "rgba(0,0,0,0.04)"
83
+ }
84
+ }
85
+ })
86
+ }, defaultSizeLegendSpec = {
87
+ horizontal: Object.assign({
88
+ sizeBackground: {
89
+ fill: "#cdcdcd"
90
+ },
91
+ track: {
92
+ style: {
93
+ fill: "rgba(20,20,20,0.1)"
94
+ }
95
+ },
96
+ rail: {
97
+ width: 200,
98
+ height: 4,
99
+ style: {
100
+ fill: "rgba(0,0,0,0.04)"
101
+ }
102
+ }
103
+ }, defaultContinueLegendSpec),
104
+ vertical: Object.assign({
105
+ sizeBackground: {
106
+ fill: "#cdcdcd"
107
+ },
108
+ track: {
109
+ style: {
110
+ fill: "rgba(20,20,20,0.1)"
111
+ }
112
+ },
113
+ rail: {
114
+ width: 4,
115
+ height: 200,
116
+ style: {
117
+ fill: "rgba(0,0,0,0.04)"
118
+ }
119
+ }
120
+ }, defaultContinueLegendSpec)
121
+ };
122
+
123
+ function getContinuousLegendAttributes(spec, rect) {
124
+ const _a = (0, vutils_1.merge)({}, ("color" === spec.type ? defaultColorLegendSpec : defaultSizeLegendSpec)["bottom" === spec.orient || "top" === spec.orient ? "horizontal" : "vertical"], spec), {title: title = {}, handler: handler = {}, rail: rail = {}, track: track = {}, startText: startText, endText: endText, handlerText: handlerText, sizeBackground: sizeBackground, background: background = {}, type: type, id: id, visible: visible, orient: orient, position: position, data: data, defaultSelected: defaultSelected, field: field, filter: filter, regionId: regionId, regionIndex: regionIndex, seriesIndex: seriesIndex, seriesId: seriesId, padding: padding} = _a, attrs = __rest(_a, [ "title", "handler", "rail", "track", "startText", "endText", "handlerText", "sizeBackground", "background", "type", "id", "visible", "orient", "position", "data", "defaultSelected", "field", "filter", "regionId", "regionIndex", "seriesIndex", "seriesId", "padding" ]);
125
+ return title.visible && (attrs.title = (0, transform_1.transformLegendTitleAttributes)(title)),
126
+ attrs.showHandler = !1 !== handler.visible, (0, vutils_1.isEmpty)(handler.style) || (attrs.handlerStyle = (0,
127
+ transform_1.transformToGraphic)(handler.style)), (0, vutils_1.isValid)(rail.width) && (attrs.railWidth = rail.width),
128
+ (0, vutils_1.isValid)(rail.height) && (attrs.railHeight = rail.height), (0, vutils_1.isEmpty)(rail.style) || (attrs.railStyle = (0,
129
+ transform_1.transformToGraphic)(rail.style)), (0, vutils_1.isEmpty)(track.style) || (attrs.trackStyle = (0,
130
+ transform_1.transformToGraphic)(track.style)), attrs.startText = (0, transform_1.transformComponentStyle)(startText),
131
+ attrs.endText = (0, transform_1.transformComponentStyle)(endText), attrs.handlerText = (0,
132
+ transform_1.transformComponentStyle)(handlerText), (0, vutils_1.isEmpty)(sizeBackground) || (attrs.sizeBackground = (0,
133
+ transform_1.transformToGraphic)(sizeBackground)), background.visible && !(0, vutils_1.isEmpty)(background.style) && ((0,
134
+ vutils_1.merge)(attrs, background.style), (0, vutils_1.isValid)(background.padding) && (attrs.padding = background.padding)),
135
+ attrs;
136
+ }
137
+
138
+ exports.getContinuousLegendAttributes = getContinuousLegendAttributes;
139
+ //# sourceMappingURL=get-continue-legend-attributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/legend/continue-legend/get-continue-legend-attributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAA2D;AAE3D,oDAAmH;AAEnH,MAAM,yBAAyB,GAAG;IAChC,MAAM,EAAE,OAAO;IACf,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,EAAE;IACX,KAAK,EAAE;QACL,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,UAAU,EAAE,QAAQ;YACpB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,gBAAgB,EAAE;SACjD;QACD,KAAK,EAAE,EAAE;KACV;IACD,OAAO,EAAE;QACP,OAAO,EAAE,IAAI;KACd;IACD,S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K,CAAC;AACf,CAAC;AAlFD,sEAkFC","file":"get-continue-legend-attributes.js","sourcesContent":["import { isEmpty, isValid, merge } from '@visactor/vutils';\nimport type { IColorTableLegendOption, ISizeTableLegendOption } from '../../../ts-types/component/legend';\nimport { transformComponentStyle, transformLegendTitleAttributes, transformToGraphic } from '../../util/transform';\n\nconst defaultContinueLegendSpec = {\n orient: 'right',\n position: 'middle',\n padding: 30,\n title: {\n visible: false,\n padding: 0,\n textStyle: {\n fontSize: 14,\n fontWeight: 'normal',\n fill: { type: 'palette', key: 'titleFontColor' }\n },\n space: 12\n },\n handler: {\n visible: true\n },\n startText: {\n style: {\n fontSize: 14,\n fontWeight: 'normal',\n fill: { type: 'palette', key: 'labelFontColor' }\n }\n },\n endText: {\n style: {\n fontSize: 14,\n fontWeight: 'normal',\n fill: { type: 'palette', key: 'labelFontColor' }\n }\n },\n handlerText: {\n style: {\n fontSize: 14,\n fontWeight: 'normal',\n fill: { type: 'palette', key: 'labelFontColor' }\n }\n }\n};\n\nconst defaultColorLegendSpec = {\n horizontal: {\n ...defaultContinueLegendSpec,\n rail: {\n width: 200,\n height: 8,\n style: {\n fill: 'rgba(0,0,0,0.04)'\n }\n }\n },\n vertical: {\n ...defaultContinueLegendSpec,\n rail: {\n width: 8,\n height: 200,\n style: {\n fill: 'rgba(0,0,0,0.04)'\n }\n }\n }\n};\n\nconst defaultSizeLegendSpec = {\n horizontal: {\n sizeBackground: {\n fill: '#cdcdcd'\n },\n track: {\n style: {\n fill: 'rgba(20,20,20,0.1)'\n }\n },\n rail: {\n width: 200,\n height: 4,\n style: {\n fill: 'rgba(0,0,0,0.04)'\n }\n },\n ...defaultContinueLegendSpec\n },\n vertical: {\n sizeBackground: {\n fill: '#cdcdcd'\n },\n track: {\n style: {\n fill: 'rgba(20,20,20,0.1)'\n }\n },\n rail: {\n width: 4,\n height: 200,\n style: {\n fill: 'rgba(0,0,0,0.04)'\n }\n },\n ...defaultContinueLegendSpec\n }\n};\n\nexport function getContinuousLegendAttributes(\n spec: IColorTableLegendOption | ISizeTableLegendOption,\n rect: { width: number; height: number }\n) {\n const {\n // 需要进行样式转换的属性\n title = {},\n handler = {},\n rail = {},\n track = {},\n startText,\n endText,\n handlerText,\n sizeBackground,\n background = {},\n\n // 以下不属于 legend 需要的属性,单独拿出来以免污染传递给组件的属性\n type,\n id,\n visible,\n orient,\n position,\n data,\n defaultSelected,\n field,\n filter,\n regionId,\n regionIndex,\n seriesIndex,\n seriesId,\n padding, // vchart 布局模块已经处理了\n\n ...restSpec\n } = merge(\n {},\n (spec.type === 'color' ? defaultColorLegendSpec : defaultSizeLegendSpec)[\n spec.orient === 'bottom' || spec.orient === 'top' ? 'horizontal' : 'vertical'\n ],\n spec\n );\n\n const attrs = restSpec;\n\n // transform title\n if (title.visible) {\n attrs.title = transformLegendTitleAttributes(title);\n }\n\n // handlerStyle\n attrs.showHandler = handler.visible !== false;\n if (!isEmpty(handler.style)) {\n attrs.handlerStyle = transformToGraphic(handler.style);\n }\n if (isValid(rail.width)) {\n attrs.railWidth = rail.width;\n }\n if (isValid(rail.height)) {\n attrs.railHeight = rail.height;\n }\n if (!isEmpty(rail.style)) {\n attrs.railStyle = transformToGraphic(rail.style);\n }\n if (!isEmpty(track.style)) {\n attrs.trackStyle = transformToGraphic(track.style);\n }\n\n attrs.startText = transformComponentStyle(startText);\n attrs.endText = transformComponentStyle(endText);\n attrs.handlerText = transformComponentStyle(handlerText);\n\n if (!isEmpty(sizeBackground)) {\n attrs.sizeBackground = transformToGraphic(sizeBackground);\n }\n\n if (background.visible && !isEmpty(background.style)) {\n merge(attrs, background.style);\n if (isValid(background.padding)) {\n attrs.padding = background.padding;\n }\n }\n\n return attrs;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { ITableLegendOption } from '../../ts-types/component/legend';
2
+ import { DiscreteTableLegend } from './discrete-legend/discrete-legend';
3
+ import type { BaseTableAPI } from '../../ts-types/base-table';
4
+ import { ContinueTableLegend } from './continue-legend/continue-legend';
5
+ export declare function createLegend(option: ITableLegendOption, table: BaseTableAPI): DiscreteTableLegend | ContinueTableLegend;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.createLegend = void 0;
6
+
7
+ const discrete_legend_1 = require("./discrete-legend/discrete-legend"), continue_legend_1 = require("./continue-legend/continue-legend");
8
+
9
+ function createLegend(option, table) {
10
+ return "color" === option.type || "size" === option.type ? new continue_legend_1.ContinueTableLegend(option, table) : new discrete_legend_1.DiscreteTableLegend(option, table);
11
+ }
12
+
13
+ exports.createLegend = createLegend;
14
+ //# sourceMappingURL=create-legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/legend/create-legend.ts"],"names":[],"mappings":";;;AACA,uEAAwE;AAExE,uEAAwE;AAExE,SAAgB,YAAY,CAAC,MAA0B,EAAE,KAAmB;IAC1E,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,EAAE;QACrD,OAAO,IAAI,qCAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KAC/C;IACD,OAAO,IAAI,qCAAmB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAChD,CAAC;AALD,oCAKC","file":"create-legend.js","sourcesContent":["import type { ITableLegendOption } from '../../ts-types/component/legend';\nimport { DiscreteTableLegend } from './discrete-legend/discrete-legend';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { ContinueTableLegend } from './continue-legend/continue-legend';\n\nexport function createLegend(option: ITableLegendOption, table: BaseTableAPI) {\n if (option.type === 'color' || option.type === 'size') {\n return new ContinueTableLegend(option, table);\n }\n return new DiscreteTableLegend(option, table);\n}\n"]}
@@ -1,16 +1,16 @@
1
- import type { ITableLegendOption } from '../../ts-types/component/legend';
2
- import type { BaseTableAPI } from '../../ts-types/base-table';
1
+ import type { IDiscreteTableLegendOption } from '../../../ts-types/component/legend';
2
+ import type { BaseTableAPI } from '../../../ts-types/base-table';
3
3
  import { DiscreteLegend } from '@visactor/vrender-components';
4
- import type { IOrientType } from '../../ts-types/component/util';
5
- export declare class TableLegend {
4
+ import type { IOrientType } from '../../../ts-types/component/util';
5
+ export declare class DiscreteTableLegend {
6
6
  table: BaseTableAPI;
7
- option: ITableLegendOption;
7
+ option: IDiscreteTableLegendOption;
8
8
  orient: IOrientType;
9
9
  visible: boolean;
10
10
  position: 'start' | 'middle' | 'end';
11
11
  selectedData: (string | number)[];
12
12
  legendComponent: DiscreteLegend;
13
- constructor(option: ITableLegendOption, table: BaseTableAPI);
13
+ constructor(option: IDiscreteTableLegendOption, table: BaseTableAPI);
14
14
  createComponent(): void;
15
15
  resize(): void;
16
16
  adjustTableSize(attrs: any): void;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- }), exports.TableLegend = void 0;
5
+ }), exports.DiscreteTableLegend = void 0;
6
6
 
7
- const vutils_1 = require("@visactor/vutils"), vrender_components_1 = require("@visactor/vrender-components"), get_legend_attributes_1 = require("./get-legend-attributes"), TABLE_EVENT_TYPE_1 = require("../../core/TABLE_EVENT_TYPE"), padding_1 = require("../../scenegraph/utils/padding");
7
+ const vutils_1 = require("@visactor/vutils"), vrender_components_1 = require("@visactor/vrender-components"), get_discrete_legend_attributes_1 = require("./get-discrete-legend-attributes"), TABLE_EVENT_TYPE_1 = require("../../../core/TABLE_EVENT_TYPE"), padding_1 = require("../../../scenegraph/utils/padding");
8
8
 
9
- class TableLegend {
9
+ class DiscreteTableLegend {
10
10
  constructor(option, table) {
11
11
  var _a, _b, _c, _d;
12
12
  this.table = table, this.option = (0, vutils_1.cloneDeep)(option), this.orient = null !== (_a = option.orient) && void 0 !== _a ? _a : "left",
@@ -59,7 +59,7 @@ class TableLegend {
59
59
  items: this.getLegendItems(),
60
60
  maxWidth: rect.width,
61
61
  maxHeight: rect.height
62
- }, (0, get_legend_attributes_1.getLegendAttributes)(this.option, rect));
62
+ }, (0, get_discrete_legend_attributes_1.getLegendAttributes)(this.option, rect));
63
63
  }
64
64
  getLegendItems() {
65
65
  return this.option.data;
@@ -102,5 +102,5 @@ class TableLegend {
102
102
  }
103
103
  }
104
104
 
105
- exports.TableLegend = TableLegend;
106
- //# sourceMappingURL=legend.js.map
105
+ exports.DiscreteTableLegend = DiscreteTableLegend;
106
+ //# sourceMappingURL=discrete-legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/legend/discrete-legend/discrete-legend.ts"],"names":[],"mappings":";;;AAAA,6CAAyD;AAGzD,qEAA2E;AAC3E,qFAAuE;AACvE,qEAAkE;AAClE,+DAAiE;AAGjE,MAAa,mBAAmB;IAS9B,YAAY,MAAkC,EAAE,KAAmB;;QACjE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,IAAA,kBAAS,EAAC,MAAM,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM,GAAG,MAAA,MAAM,CAAC,MAAM,mCAAI,MAAM,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,MAAA,MAAM,CAAC,OAAO,mCAAI,IAAI,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,MAAA,MAAM,CAAC,QAAQ,mCAAI,QAAQ,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,MAAA,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC;QAEjD,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IAED,eAAe;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC;YACrC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,iBAAiB;YACnC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,kBAAkB;SACtC,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,mCAAc,CAC/B,IAAA,cAAK,EAAC,EAAE,EAAE,KAAK,EAAE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CAAC,CAAC,CAAC;QAC9G,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAEjH,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM;SACf,CAAC;IACJ,CAAC;IACD,OAAO;QACL,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACnG,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC9B,CAAC;CACF;AAjLD,kDAiLC","file":"discrete-legend.js","sourcesContent":["import { cloneDeep, get, merge } from '@visactor/vutils';\nimport type { IDiscreteTableLegendOption } from '../../../ts-types/component/legend';\nimport type { BaseTableAPI } from '../../../ts-types/base-table';\nimport { DiscreteLegend, LegendEvent } from '@visactor/vrender-components';\nimport { getLegendAttributes } from './get-discrete-legend-attributes';\nimport { TABLE_EVENT_TYPE } from '../../../core/TABLE_EVENT_TYPE';\nimport { getQuadProps } from '../../../scenegraph/utils/padding';\nimport type { IOrientType } from '../../../ts-types/component/util';\n\nexport class DiscreteTableLegend {\n table: BaseTableAPI;\n option: IDiscreteTableLegendOption;\n orient: IOrientType;\n visible: boolean;\n position: 'start' | 'middle' | 'end';\n selectedData: (string | number)[];\n legendComponent: DiscreteLegend;\n\n constructor(option: IDiscreteTableLegendOption, table: BaseTableAPI) {\n this.table = table;\n this.option = cloneDeep(option);\n this.orient = option.orient ?? 'left';\n this.visible = option.visible ?? true;\n this.position = option.position ?? 'middle';\n this.selectedData = option.defaultSelected ?? [];\n\n this.createComponent();\n this.initEvent();\n }\n\n createComponent() {\n const attrs = this.getLegendAttributes({\n width: this.table.tableNoFrameWidth,\n height: this.table.tableNoFrameHeight\n });\n const legend = new DiscreteLegend(\n merge({}, attrs, {\n defaultSelected: this.selectedData\n })\n );\n legend.name = 'legend';\n this.legendComponent = legend;\n this.table.scenegraph.stage.defaultLayer.appendChild(legend);\n\n this.adjustTableSize(attrs);\n }\n\n resize() {\n if (!this.legendComponent) {\n return;\n }\n\n this.legendComponent.setAttributes({\n width: this.table.tableNoFrameWidth,\n height: this.table.tableNoFrameHeight\n });\n\n this.adjustTableSize(this.legendComponent.attribute);\n }\n\n adjustTableSize(attrs: any) {\n // 调整位置\n let width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0;\n let height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;\n const rectWidth = this.table.tableNoFrameWidth;\n const rectHeight = this.table.tableNoFrameHeight;\n const padding = getQuadProps(attrs.padding ?? this.option.padding ?? 10);\n\n let x = 0;\n let y = 0;\n if (this.orient === 'left') {\n x = padding[3];\n y = 0;\n width += padding[1] + padding[3];\n } else if (this.orient === 'top') {\n x = 0;\n y = padding[0];\n height += padding[0] + padding[2];\n } else if (this.orient === 'right') {\n x = rectWidth - width - padding[1];\n y = 0;\n width += padding[1] + padding[3];\n } else if (this.orient === 'bottom') {\n x = 0;\n y = rectHeight - height - padding[2];\n height += padding[0] + padding[2];\n }\n\n const layout = this.orient === 'bottom' || this.orient === 'top' ? 'horizontal' : 'vertical';\n const position = this.position;\n // const { width: rectWidth, height: rectHeight } = fullSpace;\n let offsetX = 0;\n let offsetY = 0;\n if (layout === 'horizontal') {\n if (position === 'middle') {\n offsetX = (rectWidth - width) / 2;\n } else if (position === 'end') {\n offsetX = rectWidth - width - padding[1];\n } else {\n offsetX = padding[3];\n }\n } else {\n if (position === 'middle') {\n offsetY = (rectHeight - height) / 2;\n } else if (position === 'end') {\n offsetY = rectHeight - height - padding[2];\n } else {\n offsetY = padding[0];\n }\n }\n\n this.legendComponent.setAttributes({\n dx: offsetX,\n dy: offsetY,\n x,\n y\n });\n\n // update table size\n if (this.orient === 'left') {\n this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);\n this.table.tableX += Math.ceil(width);\n } else if (this.orient === 'top') {\n this.table.tableNoFrameHeight = this.table.tableNoFrameHeight - Math.ceil(height);\n this.table.tableY += Math.ceil(height);\n } else if (this.orient === 'right') {\n this.table.tableNoFrameWidth = this.table.tableNoFrameWidth - Math.ceil(width);\n } else if (this.orient === 'bottom') {\n this.table.tableNoFrameHeight = this.table.tableNoFrameHeight - Math.ceil(height);\n }\n }\n\n getLegendAttributes(rect: any) {\n const layout = this.orient === 'bottom' || this.orient === 'top' ? 'horizontal' : 'vertical';\n const attrs = {\n layout,\n items: this.getLegendItems(),\n // zIndex: this.layoutZIndex,\n maxWidth: rect.width,\n maxHeight: rect.height,\n ...getLegendAttributes(this.option, rect)\n };\n return attrs;\n }\n\n getLegendItems() {\n return this.option.data;\n }\n\n initEvent() {\n if (this.legendComponent) {\n this.legendComponent.addEventListener(LegendEvent.legendItemClick, (e: any) => {\n const selectedData = get(e, 'detail.currentSelected');\n this.table.fireListeners(TABLE_EVENT_TYPE.LEGEND_ITEM_CLICK, { model: this, value: selectedData, event: e });\n });\n\n this.legendComponent.addEventListener(LegendEvent.legendItemHover, (e: any) => {\n const detail = get(e, 'detail');\n this.table.fireListeners(TABLE_EVENT_TYPE.LEGEND_ITEM_HOVER, { model: this, value: detail, event: e });\n });\n\n this.legendComponent.addEventListener(LegendEvent.legendItemUnHover, (e: any) => {\n const detail = get(e, 'detail');\n this.table.fireListeners(TABLE_EVENT_TYPE.LEGEND_ITEM_UNHOVER, { model: this, value: detail, event: e });\n });\n\n // wait for vrender-vcomponent version update\n this.legendComponent.addEventListener('legendItemAttributeUpdate', (e: any) => {\n this.table.scenegraph.updateNextFrame();\n });\n }\n }\n\n getLegendBounds() {\n const width = isFinite(this.legendComponent.AABBBounds.width()) ? this.legendComponent.AABBBounds.width() : 0;\n const height = isFinite(this.legendComponent.AABBBounds.height()) ? this.legendComponent.AABBBounds.height() : 0;\n\n return {\n width: width,\n height: height\n };\n }\n release() {\n this.legendComponent && this.table.scenegraph.stage.defaultLayer.removeChild(this.legendComponent);\n this.legendComponent = null;\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import type { IDiscreteTableLegendOption } from '../../../ts-types/component/legend';
2
+ export declare function getLegendAttributes(spec: IDiscreteTableLegendOption, rect: {
3
+ width: number;
4
+ height: number;
5
+ }): any;
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", {
14
14
  value: !0
15
15
  }), exports.getLegendAttributes = void 0;
16
16
 
17
- const vutils_1 = require("@visactor/vutils"), calc_1 = require("../../tools/calc"), transform_1 = require("../util/transform"), defaultLegendSpec = {
17
+ const vutils_1 = require("@visactor/vutils"), calc_1 = require("../../../tools/calc"), transform_1 = require("../../util/transform"), defaultLegendSpec = {
18
18
  orient: "bottom",
19
19
  position: "middle",
20
20
  padding: 30,
@@ -87,4 +87,4 @@ function getLegendAttributes(spec, rect) {
87
87
  }
88
88
 
89
89
  exports.getLegendAttributes = getLegendAttributes;
90
- //# sourceMappingURL=get-legend-attributes.js.map
90
+ //# sourceMappingURL=get-discrete-legend-attributes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["components/legend/discrete-legend/get-discrete-legend-attributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6CAA2D;AAE3D,8CAAgD;AAChD,oDAAmH;AAEnH,MAAM,iBAAiB,GAAG;IACxB,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,EAAE;IACX,KAAK,EAAE;QACL,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,QAAQ,EAAE,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,QAAQ;SACrB;QACD,KAAK,EAAE,EAAE;KACV;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,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AC7B,IAAA,8BAAkB,EAAC,KAAK,CAAC,SAAS,CAAC,CAAC;KACrC;IACD,IAAA,mCAAuB,EAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;IAEpB,IAAI,UAAU,CAAC,OAAO,IAAI,CAAC,IAAA,gBAAO,EAAC,UAAU,CAAC,KAAK,CAAC,EAAE;QACpD,IAAA,cAAK,EAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;QAC/B,IAAI,IAAA,gBAAO,EAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YAC/B,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;SACpC;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAnED,kDAmEC","file":"get-discrete-legend-attributes.js","sourcesContent":["import { isEmpty, isValid, merge } from '@visactor/vutils';\nimport type { IDiscreteTableLegendOption } from '../../../ts-types/component/legend';\nimport { isPercent } from '../../../tools/calc';\nimport { transformComponentStyle, transformLegendTitleAttributes, transformToGraphic } from '../../util/transform';\n\nconst defaultLegendSpec = {\n orient: 'bottom',\n position: 'middle',\n padding: 30,\n title: {\n visible: false,\n padding: 0,\n textStyle: {\n fontSize: 14,\n fill: '#000000',\n fontWeight: 'normal'\n },\n space: 12\n },\n item: {\n visible: true,\n spaceCol: 10,\n spaceRow: 10,\n padding: 2,\n background: {\n state: {\n selectedHover: {\n fill: 'gray',\n fillOpacity: 0.7\n },\n unSelectedHover: {\n fill: 'gray',\n fillOpacity: 0.2\n }\n }\n },\n shape: {\n space: 4,\n state: {\n unSelected: {\n fillOpacity: 0.5\n }\n }\n },\n label: {\n space: 4,\n style: {\n fill: '#89909D',\n fontSize: 14\n },\n state: {\n unSelected: {\n fillOpacity: 0.5\n }\n }\n }\n },\n allowAllCanceled: true,\n visible: true\n};\n\nexport function getLegendAttributes(spec: IDiscreteTableLegendOption, rect: { width: number; height: number }) {\n const {\n // 需要进行样式转换的属性\n title = {},\n item = {},\n pager = {},\n background = {},\n\n // 以下不属于 legend 需要的属性,单独拿出来以免污染传递给组件的属性\n type,\n id,\n visible,\n orient,\n position,\n data,\n filter,\n regionId,\n regionIndex,\n seriesIndex,\n seriesId,\n padding, // vchart 布局模块已经处理了\n\n ...restSpec\n } = merge({}, defaultLegendSpec, spec);\n\n const attrs: any = restSpec;\n\n // transform title\n if (title.visible) {\n attrs.title = transformLegendTitleAttributes(title);\n }\n\n // transform item\n if (!isEmpty(item.focusIconStyle)) {\n transformToGraphic(item.focusIconStyle);\n }\n transformComponentStyle(item.shape);\n transformComponentStyle(item.label);\n transformComponentStyle(item.value);\n transformComponentStyle(item.background);\n\n if (isPercent(item.maxWidth)) {\n item.maxWidth = (Number(item.maxWidth.substring(0, item.maxWidth.length - 1)) * rect.width) / 100;\n }\n if (isPercent(item.width)) {\n item.width = (Number(item.width.substring(0, item.width.length - 1)) * rect.width) / 100;\n }\n if (isPercent(item.height)) {\n item.height = (Number(item.height.substring(0, item.height.length - 1)) * rect.width) / 100;\n }\n attrs.item = item;\n\n // transform pager\n if (!isEmpty(pager.textStyle)) {\n transformToGraphic(pager.textStyle);\n }\n transformComponentStyle(pager.handler);\n attrs.pager = pager;\n\n if (background.visible && !isEmpty(background.style)) {\n merge(attrs, background.style);\n if (isValid(background.padding)) {\n attrs.padding = background.padding;\n }\n }\n\n return attrs;\n}\n"]}
@@ -225,7 +225,7 @@ export declare abstract class BaseTable extends EventTarget implements BaseTable
225
225
  abstract getCellOriginRecord(col: number, row: number): MaybePromiseOrUndefined;
226
226
  abstract getCellValue(col: number, row: number): FieldData;
227
227
  abstract getCellOriginValue(col: number, row: number): FieldData;
228
- updatePagination(cof: IPagination): void;
228
+ abstract updatePagination(pagination: IPagination): void;
229
229
  get allowFrozenColCount(): number;
230
230
  get rowHeaderLevelCount(): number;
231
231
  get columnHeaderLevelCount(): number;
@@ -33,7 +33,7 @@ Object.defineProperty(exports, "__esModule", {
33
33
  value: !0
34
34
  }), exports.BaseTable = void 0;
35
35
 
36
- const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), vutils_1 = require("@visactor/vutils"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"), vutils_2 = require("@visactor/vutils"), measure_text_1 = require("../scenegraph/utils/measure-text"), get_prop_1 = require("../scenegraph/utils/get-prop"), icons_1 = require("../plugins/icons"), tableHelper_1 = require("./tableHelper"), MenuHandler_1 = require("../components/menu/dom/MenuHandler"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), legend_1 = require("../components/legend/legend"), vdataset_1 = require("@visactor/vdataset"), title_1 = require("../components/title/title"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
36
+ const columnStyleContents = __importStar(require("../body-helper/style")), headerStyleContents = __importStar(require("../header-helper/style")), style_1 = require("./style"), style = __importStar(require("../tools/style")), vutils_1 = require("@visactor/vutils"), helper_1 = require("../tools/helper"), TABLE_EVENT_TYPE_1 = require("./TABLE_EVENT_TYPE"), EventHandler_1 = require("../event/EventHandler"), EventTarget_1 = require("../event/EventTarget"), NumberMap_1 = require("../tools/NumberMap"), Rect_1 = require("../tools/Rect"), util_1 = require("../tools/util"), themes_1 = __importDefault(require("../themes")), env_1 = require("../tools/env"), scenegraph_1 = require("../scenegraph/scenegraph"), state_1 = require("../state/state"), event_1 = require("../event/event"), body_helper_1 = require("../body-helper/body-helper"), header_helper_1 = require("../header-helper/header-helper"), TooltipHandler_1 = require("../components/tooltip/TooltipHandler"), vutils_2 = require("@visactor/vutils"), measure_text_1 = require("../scenegraph/utils/measure-text"), get_prop_1 = require("../scenegraph/utils/get-prop"), icons_1 = require("../plugins/icons"), tableHelper_1 = require("./tableHelper"), MenuHandler_1 = require("../components/menu/dom/MenuHandler"), FouseInput_1 = require("./FouseInput"), pixel_ratio_1 = require("../tools/pixel-ratio"), create_legend_1 = require("../components/legend/create-legend"), vdataset_1 = require("@visactor/vdataset"), title_1 = require("../components/title/title"), chart_render_helper_1 = require("../scenegraph/graphic/contributions/chart-render-helper"), {toBoxArray: toBoxArray} = helper_1.style, {isTouchEvent: isTouchEvent} = helper_1.event, rangeReg = /^\$(\d+)\$(\d+)$/;
37
37
 
38
38
  (0, style_1.importStyle)();
39
39
 
@@ -45,7 +45,7 @@ class BaseTable extends EventTarget_1.EventTarget {
45
45
  }
46
46
  constructor(container, options = {}) {
47
47
  var _a, _b, _c, _d, _e, _f, _g;
48
- if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.10.2-alpha.3",
48
+ if (super(), this.showFrozenIcon = !0, this.showSort = !0, this.version = "0.10.2",
49
49
  this.id = `VTable${Date.now()}`, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
50
50
  !container) throw new Error("vtable's container is undefined");
51
51
  const {frozenColCount: frozenColCount = 0, defaultRowHeight: defaultRowHeight = 40, defaultHeaderRowHeight: defaultHeaderRowHeight, defaultColWidth: defaultColWidth = 80, defaultHeaderColWidth: defaultHeaderColWidth, widthMode: widthMode = "standard", heightMode: heightMode = "standard", autoFillWidth: autoFillWidth = !1, keyboardOptions: keyboardOptions, columnResizeMode: columnResizeMode, dragHeaderMode: dragHeaderMode, showFrozenIcon: showFrozenIcon, allowFrozenColCount: allowFrozenColCount, padding: padding, hover: hover, menu: menu, select: click, customRender: customRender, pixelRatio: pixelRatio = pixel_ratio_1.defaultPixelRatio, renderChartAsync: renderChartAsync, renderChartAsyncBatchCount: renderChartAsyncBatchCount} = options;
@@ -90,7 +90,7 @@ class BaseTable extends EventTarget_1.EventTarget {
90
90
  internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450,
91
91
  this._vDataSet = new vdataset_1.DataSet, this.scenegraph = new scenegraph_1.Scenegraph(this),
92
92
  this.stateManeger = new state_1.StateManeger(this), this.eventManeger = new event_1.EventManeger(this),
93
- options.legends && (internalProps.legends = new legend_1.TableLegend(options.legends, this),
93
+ options.legends && (internalProps.legends = (0, create_legend_1.createLegend)(options.legends, this),
94
94
  this.scenegraph.tableGroup.setAttributes({
95
95
  x: this.tableX,
96
96
  y: this.tableY
@@ -667,7 +667,7 @@ class BaseTable extends EventTarget_1.EventTarget {
667
667
  this._vDataSet = new vdataset_1.DataSet, null === (_d = internalProps.legends) || void 0 === _d || _d.release(),
668
668
  null === (_e = internalProps.title) || void 0 === _e || _e.release(), internalProps.layoutMap.release(),
669
669
  this.scenegraph.clearCells(), this.stateManeger.initState(), this._updateSize(),
670
- options.legends && (internalProps.legends = new legend_1.TableLegend(options.legends, this),
670
+ options.legends && (internalProps.legends = (0, create_legend_1.createLegend)(options.legends, this),
671
671
  this.scenegraph.tableGroup.setAttributes({
672
672
  x: this.tableX,
673
673
  y: this.tableY
@@ -841,12 +841,6 @@ class BaseTable extends EventTarget_1.EventTarget {
841
841
  selectCell(col, row) {
842
842
  this.stateManeger.updateSelectPos(col, row), this.stateManeger.endSelectCells();
843
843
  }
844
- updatePagination(cof) {
845
- this.pagination && ("number" == typeof cof.currentPage && cof.currentPage >= 0 && (this.pagination.currentPage = cof.currentPage),
846
- cof.perPageCount && (this.pagination.perPageCount = cof.perPageCount || this.pagination.perPageCount),
847
- this.scenegraph.clearCells(), this.dataSource.updatePagination(this.pagination),
848
- this.refreshRowColCount(), this.scenegraph.createSceneGraph(), this.render());
849
- }
850
844
  get allowFrozenColCount() {
851
845
  return this.internalProps.allowFrozenColCount;
852
846
  }