@revolist/revogrid 3.1.6 → 3.2.4

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 (213) hide show
  1. package/dist/revo-grid/_baseIteratee-af30b221.js +2070 -0
  2. package/dist/{collection/global/global.js → revo-grid/app-globals-7e6866ba.js} +11 -2
  3. package/dist/{collection/components/data/columnService.js → revo-grid/columnService-91e552ba.js} +11 -6
  4. package/dist/revo-grid/consts-ef824e6f.js +46 -0
  5. package/dist/revo-grid/css-shim-5387c708.js +7 -0
  6. package/dist/revo-grid/data.store-3263fff9.js +557 -0
  7. package/dist/revo-grid/debounce-aaa4b4da.js +217 -0
  8. package/dist/revo-grid/dimension.helpers-a7944fc4.js +340 -0
  9. package/dist/revo-grid/dispatcher-891af82e.js +24 -0
  10. package/dist/{cjs/dom-c8b6d1a7.js → revo-grid/dom-21bd1807.js} +4 -3
  11. package/dist/revo-grid/each-0378e5a3.js +180 -0
  12. package/dist/{collection/plugins/filter/filter.button.js → revo-grid/filter.button-74c1cd9c.js} +16 -10
  13. package/dist/revo-grid/identity-c8c7d3d8.js +26 -0
  14. package/dist/revo-grid/index-8a604c17.js +3067 -0
  15. package/dist/revo-grid/index.esm.js +3 -0
  16. package/dist/revo-grid/isString-a51066b5.js +34 -0
  17. package/dist/revo-grid/isSymbol-e4b5dafe.js +247 -0
  18. package/dist/revo-grid/keyCodes.utils-bd06e3ba.js +299 -0
  19. package/dist/revo-grid/keys-70b7c240.js +561 -0
  20. package/dist/{collection/services/localScrollService.js → revo-grid/localScrollService-e9b73323.js} +8 -2
  21. package/dist/{esm/revo-grid_11.entry.js → revo-grid/lodash-a0ab4cdd.js} +13773 -24597
  22. package/dist/{cjs/resize-observer-8dc80084.js → revo-grid/resize-observer-00c48d78.js} +25 -14
  23. package/dist/revo-grid/revo-grid.entry.js +3484 -0
  24. package/dist/revo-grid/revo-grid.esm.js +133 -1
  25. package/dist/revo-grid/revogr-clipboard.entry.js +52 -1
  26. package/dist/revo-grid/revogr-data.entry.js +152 -0
  27. package/dist/revo-grid/revogr-edit.entry.js +105 -0
  28. package/dist/revo-grid/revogr-filter-panel.entry.js +277 -1
  29. package/dist/revo-grid/revogr-focus.entry.js +41 -0
  30. package/dist/revo-grid/revogr-header.entry.js +560 -0
  31. package/dist/revo-grid/revogr-order-editor.entry.js +175 -0
  32. package/dist/revo-grid/revogr-overlay-selection.entry.js +711 -0
  33. package/dist/revo-grid/revogr-row-headers.entry.js +73 -0
  34. package/dist/revo-grid/revogr-scroll-virtual.entry.js +114 -0
  35. package/dist/revo-grid/revogr-temp-range.entry.js +73 -0
  36. package/dist/revo-grid/revogr-viewport-scroll.entry.js +340 -0
  37. package/dist/revo-grid/selection.store.connector-2b613fd0.js +503 -0
  38. package/dist/{collection/components/overlay/selection.utils.js → revo-grid/selection.utils-a9932db6.js} +15 -9
  39. package/dist/revo-grid/shadow-css-602a09db.js +390 -0
  40. package/dist/{collection/themeManager/themeService.js → revo-grid/themeService-ddaaa364.js} +26 -6
  41. package/dist/revo-grid/toInteger-9e6cbfd2.js +107 -0
  42. package/dist/revo-grid/toNumber-913b0b72.js +105 -0
  43. package/dist/{collection/utils/utils.js → revo-grid/utils-2c3b3857.js} +13 -8
  44. package/dist/revo-grid/viewport.helpers-49d3f031.js +16 -0
  45. package/dist/{collection/store/viewPort/viewport.helpers.js → revo-grid/viewport.store-ffaaab6d.js} +135 -9
  46. package/dist/types/components/revo-grid/revo-grid.d.ts +6 -0
  47. package/dist/types/components.d.ts +110 -58
  48. package/dist/types/plugins/dispatcher.d.ts +10 -0
  49. package/dist/types/plugins/moveColumn/columnDragPlugin.d.ts +66 -0
  50. package/dist/types/plugins/moveColumn/columnOrderHandler.d.ts +12 -0
  51. package/dist/types/services/resizable.directive.d.ts +1 -1
  52. package/dist/types/stencil-public-runtime.d.ts +189 -186
  53. package/package.json +22 -20
  54. package/custom-element/index.js +0 -28972
  55. package/custom-element/resize-observer.js +0 -489
  56. package/dist/cjs/css-shim-e33df79c.js +0 -6
  57. package/dist/cjs/debounce-e9b040d9.js +0 -575
  58. package/dist/cjs/index-d3f67f2e.js +0 -1729
  59. package/dist/cjs/index.cjs.js +0 -2
  60. package/dist/cjs/loader.cjs.js +0 -35
  61. package/dist/cjs/revo-grid.cjs.js +0 -73
  62. package/dist/cjs/revo-grid_11.cjs.entry.js +0 -28056
  63. package/dist/cjs/revogr-clipboard.cjs.entry.js +0 -53
  64. package/dist/cjs/revogr-filter-panel.cjs.entry.js +0 -275
  65. package/dist/collection/collection-manifest.json +0 -25
  66. package/dist/collection/components/button/button.js +0 -4
  67. package/dist/collection/components/clipboard/revogr-clipboard.js +0 -121
  68. package/dist/collection/components/data/cellRenderer.js +0 -24
  69. package/dist/collection/components/data/revogr-data-style.css +0 -135
  70. package/dist/collection/components/data/revogr-data.js +0 -322
  71. package/dist/collection/components/data/rowRenderer.js +0 -6
  72. package/dist/collection/components/header/headerCellRenderer.js +0 -19
  73. package/dist/collection/components/header/headerRenderer.js +0 -45
  74. package/dist/collection/components/header/revogr-header-style.css +0 -198
  75. package/dist/collection/components/header/revogr-header.js +0 -297
  76. package/dist/collection/components/order/orderRenderer.js +0 -50
  77. package/dist/collection/components/order/revogr-order-editor.js +0 -358
  78. package/dist/collection/components/order/rowOrderService.js +0 -68
  79. package/dist/collection/components/overlay/autofill.service.js +0 -182
  80. package/dist/collection/components/overlay/clipboard.service.js +0 -39
  81. package/dist/collection/components/overlay/editors/edit.utils.js +0 -5
  82. package/dist/collection/components/overlay/editors/text.js +0 -35
  83. package/dist/collection/components/overlay/keyboard.service.js +0 -128
  84. package/dist/collection/components/overlay/revogr-edit-style.css +0 -86
  85. package/dist/collection/components/overlay/revogr-edit.js +0 -159
  86. package/dist/collection/components/overlay/revogr-overlay-selection.js +0 -726
  87. package/dist/collection/components/overlay/revogr-overlay-style.css +0 -98
  88. package/dist/collection/components/revo-grid/revo-grid-style.css +0 -527
  89. package/dist/collection/components/revo-grid/revo-grid.js +0 -2186
  90. package/dist/collection/components/revo-grid/viewport.helpers.js +0 -11
  91. package/dist/collection/components/revo-grid/viewport.interfaces.js +0 -1
  92. package/dist/collection/components/revo-grid/viewport.js +0 -18
  93. package/dist/collection/components/revo-grid/viewport.resize.service.js +0 -21
  94. package/dist/collection/components/revo-grid/viewport.scrolling.service.js +0 -60
  95. package/dist/collection/components/revo-grid/viewport.section.js +0 -28
  96. package/dist/collection/components/revo-grid/viewport.service.js +0 -209
  97. package/dist/collection/components/rowHeaders/revogr-row-headers.js +0 -210
  98. package/dist/collection/components/rowHeaders/row-header-render.js +0 -1
  99. package/dist/collection/components/scroll/revogr-viewport-scroll-style.css +0 -137
  100. package/dist/collection/components/scroll/revogr-viewport-scroll.js +0 -399
  101. package/dist/collection/components/scrollable/revogr-scroll-style.css +0 -104
  102. package/dist/collection/components/scrollable/revogr-scroll-virtual.js +0 -253
  103. package/dist/collection/components/selection-focus/revogr-focus-style.css +0 -77
  104. package/dist/collection/components/selection-focus/revogr-focus.js +0 -103
  105. package/dist/collection/components/selection-temp-range/revogr-temp-range-style.css +0 -98
  106. package/dist/collection/components/selection-temp-range/revogr-temp-range.js +0 -138
  107. package/dist/collection/index.js +0 -1
  108. package/dist/collection/plugins/autoSizeColumn.js +0 -230
  109. package/dist/collection/plugins/basePlugin.js +0 -27
  110. package/dist/collection/plugins/export/csv.js +0 -68
  111. package/dist/collection/plugins/export/export.plugin.js +0 -165
  112. package/dist/collection/plugins/export/types.js +0 -1
  113. package/dist/collection/plugins/filter/conditions/equal.js +0 -17
  114. package/dist/collection/plugins/filter/conditions/number/greaterThan.js +0 -10
  115. package/dist/collection/plugins/filter/conditions/number/greaterThanOrEqual.js +0 -7
  116. package/dist/collection/plugins/filter/conditions/number/lessThan.js +0 -12
  117. package/dist/collection/plugins/filter/conditions/number/lessThanOrEqual.js +0 -7
  118. package/dist/collection/plugins/filter/conditions/set.js +0 -3
  119. package/dist/collection/plugins/filter/conditions/string/beginswith.js +0 -17
  120. package/dist/collection/plugins/filter/conditions/string/contains.js +0 -18
  121. package/dist/collection/plugins/filter/filter.plugin.js +0 -256
  122. package/dist/collection/plugins/filter/filter.pop.js +0 -485
  123. package/dist/collection/plugins/filter/filter.service.js +0 -44
  124. package/dist/collection/plugins/filter/filter.style.css +0 -239
  125. package/dist/collection/plugins/filter/filter.types.js +0 -1
  126. package/dist/collection/plugins/groupingColumn/columnGroupsRenderer.js +0 -30
  127. package/dist/collection/plugins/groupingColumn/grouping.col.plugin.js +0 -36
  128. package/dist/collection/plugins/groupingColumn/headerGroupRenderer.js +0 -21
  129. package/dist/collection/plugins/groupingRow/grouping.const.js +0 -10
  130. package/dist/collection/plugins/groupingRow/grouping.row.expand.service.js +0 -76
  131. package/dist/collection/plugins/groupingRow/grouping.row.plugin.js +0 -258
  132. package/dist/collection/plugins/groupingRow/grouping.row.renderer.js +0 -29
  133. package/dist/collection/plugins/groupingRow/grouping.row.types.js +0 -1
  134. package/dist/collection/plugins/groupingRow/grouping.service.js +0 -155
  135. package/dist/collection/plugins/groupingRow/grouping.trimmed.service.js +0 -57
  136. package/dist/collection/plugins/sorting/sorting.plugin.js +0 -181
  137. package/dist/collection/plugins/sorting/sorting.sign.js +0 -6
  138. package/dist/collection/plugins/stretchPlugin.js +0 -68
  139. package/dist/collection/plugins/trimmed/trimmed.plugin.js +0 -32
  140. package/dist/collection/services/cell.helpers.js +0 -7
  141. package/dist/collection/services/column.data.provider.js +0 -188
  142. package/dist/collection/services/data.provider.js +0 -47
  143. package/dist/collection/services/dimension.provider.js +0 -78
  144. package/dist/collection/services/resizable.directive.js +0 -250
  145. package/dist/collection/services/selection.store.connector.js +0 -213
  146. package/dist/collection/services/viewport.provider.js +0 -14
  147. package/dist/collection/store/dataSource/data.proxy.js +0 -34
  148. package/dist/collection/store/dataSource/data.store.js +0 -127
  149. package/dist/collection/store/dimension/dimension.helpers.js +0 -107
  150. package/dist/collection/store/dimension/dimension.store.js +0 -59
  151. package/dist/collection/store/selection/selection.helpers.js +0 -53
  152. package/dist/collection/store/selection/selection.store.js +0 -68
  153. package/dist/collection/store/selection/selection.store.service.js +0 -35
  154. package/dist/collection/store/storeTypes.js +0 -5
  155. package/dist/collection/store/viewPort/viewport.store.js +0 -121
  156. package/dist/collection/themeManager/theme.compact.js +0 -5
  157. package/dist/collection/themeManager/theme.default.js +0 -5
  158. package/dist/collection/themeManager/theme.material.js +0 -5
  159. package/dist/collection/utils/closestPolifill.js +0 -18
  160. package/dist/collection/utils/consts.js +0 -19
  161. package/dist/collection/utils/generateAlphabetHeader.js +0 -20
  162. package/dist/collection/utils/keyCodes.js +0 -70
  163. package/dist/collection/utils/keyCodes.utils.js +0 -64
  164. package/dist/collection/utils/platform.js +0 -5
  165. package/dist/collection/utils/resizeObserver.js +0 -6
  166. package/dist/collection/utils/store.utils.js +0 -7
  167. package/dist/collection/utilsExternal/generate-data.js +0 -132
  168. package/dist/esm/css-shim-8d75038b.js +0 -4
  169. package/dist/esm/debounce-8dadcda7.js +0 -558
  170. package/dist/esm/dom-1b195079.js +0 -73
  171. package/dist/esm/index-42c84e7c.js +0 -1694
  172. package/dist/esm/index.js +0 -1
  173. package/dist/esm/loader.js +0 -31
  174. package/dist/esm/polyfills/core-js.js +0 -11
  175. package/dist/esm/polyfills/css-shim.js +0 -1
  176. package/dist/esm/polyfills/dom.js +0 -79
  177. package/dist/esm/polyfills/es5-html-element.js +0 -1
  178. package/dist/esm/polyfills/index.js +0 -34
  179. package/dist/esm/polyfills/system.js +0 -6
  180. package/dist/esm/resize-observer-56b7b34f.js +0 -489
  181. package/dist/esm/revo-grid.js +0 -71
  182. package/dist/esm/revogr-clipboard.entry.js +0 -49
  183. package/dist/esm/revogr-filter-panel.entry.js +0 -271
  184. package/dist/esm-es5/css-shim-8d75038b.js +0 -1
  185. package/dist/esm-es5/debounce-8dadcda7.js +0 -1
  186. package/dist/esm-es5/dom-1b195079.js +0 -21
  187. package/dist/esm-es5/index-42c84e7c.js +0 -1
  188. package/dist/esm-es5/index.js +0 -0
  189. package/dist/esm-es5/loader.js +0 -1
  190. package/dist/esm-es5/resize-observer-56b7b34f.js +0 -1
  191. package/dist/esm-es5/revo-grid.js +0 -1
  192. package/dist/esm-es5/revo-grid_11.entry.js +0 -1
  193. package/dist/esm-es5/revogr-clipboard.entry.js +0 -1
  194. package/dist/esm-es5/revogr-filter-panel.entry.js +0 -1
  195. package/dist/index.cjs.js +0 -1
  196. package/dist/index.js +0 -1
  197. package/dist/revo-grid/css-shim-88bfb262.system.js +0 -1
  198. package/dist/revo-grid/css-shim-8d75038b.js +0 -1
  199. package/dist/revo-grid/debounce-d097578d.js +0 -1
  200. package/dist/revo-grid/debounce-f40a88f6.system.js +0 -1
  201. package/dist/revo-grid/dom-1b195079.js +0 -19
  202. package/dist/revo-grid/dom-ee2dd1b3.system.js +0 -21
  203. package/dist/revo-grid/index-a15e7527.system.js +0 -1
  204. package/dist/revo-grid/index-a7f99799.js +0 -1
  205. package/dist/revo-grid/index.system.js +0 -1
  206. package/dist/revo-grid/resize-observer-56b7b34f.js +0 -1
  207. package/dist/revo-grid/resize-observer-7a7b9757.system.js +0 -1
  208. package/dist/revo-grid/revo-grid.js +0 -132
  209. package/dist/revo-grid/revo-grid.system.js +0 -1
  210. package/dist/revo-grid/revo-grid_11.entry.js +0 -1
  211. package/dist/revo-grid/revo-grid_11.system.entry.js +0 -1
  212. package/dist/revo-grid/revogr-clipboard.system.entry.js +0 -1
  213. package/dist/revo-grid/revogr-filter-panel.system.entry.js +0 -1
@@ -1,2186 +0,0 @@
1
- import { Component, Prop, h, Watch, Element, Listen, Event, Method, State, Host } from '@stencil/core';
2
- import reduce from 'lodash/reduce';
3
- import each from 'lodash/each';
4
- import ColumnDataProvider from '../../services/column.data.provider';
5
- import { DataProvider } from '../../services/data.provider';
6
- import { getVisibleSourceItem } from '../../store/dataSource/data.store';
7
- import DimensionProvider from '../../services/dimension.provider';
8
- import ViewportProvider from '../../services/viewport.provider';
9
- import ThemeService from '../../themeManager/themeService';
10
- import { timeout } from '../../utils/utils';
11
- import AutoSize from '../../plugins/autoSizeColumn';
12
- import { columnTypes } from '../../store/storeTypes';
13
- import FilterPlugin from '../../plugins/filter/filter.plugin';
14
- import SortingPlugin from '../../plugins/sorting/sorting.plugin';
15
- import ExportFilePlugin from '../../plugins/export/export.plugin';
16
- import GroupingRowPlugin from '../../plugins/groupingRow/grouping.row.plugin';
17
- import { RevoViewPort } from './viewport';
18
- import ViewportService from './viewport.service';
19
- import { ViewPortSections } from './viewport.section';
20
- import GridScrollingService from './viewport.scrolling.service';
21
- import { UUID } from '../../utils/consts';
22
- import SelectionStoreConnector from '../../services/selection.store.connector';
23
- import StretchColumn, { isStretchPlugin } from '../../plugins/stretchPlugin';
24
- export class RevoGridComponent {
25
- constructor() {
26
- /**
27
- * Defines how many rows/columns should be rendered outside visible area.
28
- */
29
- this.frameSize = 1;
30
- /**
31
- * Indicates default rgRow size.
32
- * By default 0, means theme package size will be applied
33
- */
34
- this.rowSize = 0;
35
- /** Indicates default column size. */
36
- this.colSize = 100;
37
- /** When true, user can range selection. */
38
- this.range = false;
39
- /** When true, grid in read only mode. */
40
- this.readonly = false;
41
- /** When true, columns are resizable. */
42
- this.resize = false;
43
- /** When true cell focus appear. */
44
- this.canFocus = true;
45
- /** When true enable clipboard. */
46
- this.useClipboard = true;
47
- /**
48
- * Columns - defines an array of grid columns.
49
- * Can be column or grouped column.
50
- */
51
- this.columns = [];
52
- /**
53
- * Source - defines main data source.
54
- * Can be an Object or 2 dimensional array([][]);
55
- * Keys/indexes referenced from columns Prop
56
- */
57
- this.source = [];
58
- /** Pinned top Source: {[T in ColumnProp]: any} - defines pinned top rows data source. */
59
- this.pinnedTopSource = [];
60
- /** Pinned bottom Source: {[T in ColumnProp]: any} - defines pinned bottom rows data source. */
61
- this.pinnedBottomSource = [];
62
- /** Row properies applied */
63
- this.rowDefinitions = [];
64
- /** Custom editors register */
65
- this.editors = {};
66
- /** Types
67
- * Every type represent multiple column properties
68
- * Types will be merged but can be replaced with column properties
69
- */
70
- this.columnTypes = {};
71
- /** Theme name */
72
- this.theme = 'default';
73
- /**
74
- * Row class property
75
- * Define this property in rgRow object and this will be mapped as rgRow class
76
- */
77
- this.rowClass = '';
78
- /**
79
- * Autosize config
80
- * Enable columns autoSize, for more details check @autoSizeColumn plugin
81
- * By default disabled, hence operation is not resource efficient
82
- * true to enable with default params (double header separator click for autosize)
83
- * or provide config
84
- */
85
- this.autoSizeColumn = false;
86
- /**
87
- * Enables filter plugin
88
- * Can be boolean
89
- * Can be filter collection
90
- */
91
- this.filter = false;
92
- /**
93
- * Trimmed rows
94
- * Functionality which allows to hide rows from main data set
95
- * @trimmedRows are physical rgRow indexes to hide
96
- */
97
- this.trimmedRows = {};
98
- /**
99
- * Enables export plugin
100
- * Can be boolean
101
- * Can be export options
102
- */
103
- this.exporting = false;
104
- /**
105
- * Defines stretch strategy for columns with @StretchColumn plugin
106
- * if there are more space on the right last column size would be increased
107
- */
108
- this.stretch = true;
109
- // --------------------------------------------------------------------------
110
- //
111
- // Private Properties
112
- //
113
- // --------------------------------------------------------------------------
114
- // for internal plugin usage
115
- this.extraElements = [];
116
- this.uuid = null;
117
- this.viewport = null;
118
- /**
119
- * Plugins
120
- * Define plugins collection
121
- */
122
- this.internalPlugins = [];
123
- this.subscribers = {};
124
- }
125
- // --------------------------------------------------------------------------
126
- //
127
- // Methods
128
- //
129
- // --------------------------------------------------------------------------
130
- /**
131
- * Refreshes data viewport.
132
- * Can be specific part as rgRow or pinned rgRow or 'all' by default.
133
- */
134
- async refresh(type = 'all') {
135
- this.dataProvider.refresh(type);
136
- }
137
- /** Scrolls view port to specified rgRow index */
138
- async scrollToRow(coordinate = 0) {
139
- const y = this.dimensionProvider.getViewPortPos({
140
- coordinate,
141
- dimension: 'rgRow',
142
- });
143
- await this.scrollToCoordinate({ y });
144
- }
145
- /** Scrolls view port to specified column index */
146
- async scrollToColumnIndex(coordinate = 0) {
147
- const x = this.dimensionProvider.getViewPortPos({
148
- coordinate,
149
- dimension: 'rgCol',
150
- });
151
- await this.scrollToCoordinate({ x });
152
- }
153
- /** Scrolls view port to specified column prop */
154
- async scrollToColumnProp(prop) {
155
- const coordinate = this.columnProvider.getColumnIndexByProp(prop, 'rgCol');
156
- if (coordinate < 0) {
157
- // already on the screen
158
- return;
159
- }
160
- const x = this.dimensionProvider.getViewPortPos({
161
- coordinate,
162
- dimension: 'rgCol',
163
- });
164
- await this.scrollToCoordinate({ x });
165
- }
166
- /** Update columns */
167
- async updateColumns(cols) {
168
- this.columnProvider.updateColumns(cols);
169
- }
170
- /** Add trimmed by type */
171
- async addTrimmed(trimmed, trimmedType = 'external', type = 'rgRow') {
172
- const event = this.beforetrimmed.emit({
173
- trimmed,
174
- trimmedType,
175
- type,
176
- });
177
- if (event.defaultPrevented) {
178
- return event;
179
- }
180
- this.dataProvider.setTrimmed({ [trimmedType]: event.detail.trimmed }, type);
181
- this.aftertrimmed.emit();
182
- return event;
183
- }
184
- /** Scrolls view port to coordinate */
185
- async scrollToCoordinate(cell) {
186
- var _a;
187
- (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.scrollToCell(cell);
188
- }
189
- /** Bring cell to edit mode */
190
- async setCellEdit(rgRow, prop, rowSource = 'rgRow') {
191
- var _a;
192
- const rgCol = ColumnDataProvider.getColumnByProp(this.columns, prop);
193
- if (!rgCol) {
194
- return;
195
- }
196
- await timeout();
197
- (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.setEdit(rgRow, this.columnProvider.getColumnIndexByProp(prop, 'rgCol'), rgCol.pin || 'rgCol', rowSource);
198
- }
199
- /**
200
- * Register new virtual node inside of grid
201
- * Used for additional items creation such as plugin elements
202
- */
203
- async registerVNode(elements) {
204
- this.extraElements.push(...elements);
205
- this.extraElements = [...this.extraElements];
206
- }
207
- /** Get data from source */
208
- async getSource(type = 'rgRow') {
209
- return this.dataProvider.stores[type].store.get('source');
210
- }
211
- /**
212
- * Get data from visible part of source
213
- * Trimmed/filtered rows will be excluded
214
- * @param type - type of source
215
- */
216
- async getVisibleSource(type = 'rgRow') {
217
- return getVisibleSourceItem(this.dataProvider.stores[type].store);
218
- }
219
- /**
220
- * Provides access to rows internal store observer
221
- * Can be used for plugin support
222
- * @param type - type of source
223
- */
224
- async getSourceStore(type = 'rgRow') {
225
- return this.dataProvider.stores[type].store;
226
- }
227
- /**
228
- * Provides access to column internal store observer
229
- * Can be used for plugin support
230
- * @param type - type of column
231
- */
232
- async getColumnStore(type = 'rgCol') {
233
- return this.columnProvider.stores[type].store;
234
- }
235
- /**
236
- * Update column sorting
237
- * @param column - full column details to update
238
- * @param index - virtual column index
239
- * @param order - order to apply
240
- */
241
- async updateColumnSorting(column, index, order, additive) {
242
- return this.columnProvider.updateColumnSorting(column, index, order, additive);
243
- }
244
- /**
245
- * Clears column sorting
246
- */
247
- async clearSorting() {
248
- this.columnProvider.clearSorting();
249
- }
250
- /**
251
- * Receive all columns in data source
252
- */
253
- async getColumns() {
254
- return this.columnProvider.getColumns();
255
- }
256
- /**
257
- * Clear current grid focus
258
- */
259
- async clearFocus() {
260
- var _a;
261
- const focused = await this.getFocused();
262
- const event = this.beforefocuslost.emit(focused);
263
- if (event.defaultPrevented) {
264
- return;
265
- }
266
- this.selectionStoreConnector.clearAll();
267
- (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.clearFocused();
268
- }
269
- /**
270
- * Get all active plugins instances
271
- */
272
- async getPlugins() {
273
- return [...this.internalPlugins];
274
- }
275
- /**
276
- * Get the currently focused cell.
277
- */
278
- async getFocused() {
279
- var _a;
280
- return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getFocused();
281
- }
282
- /**
283
- * Get the currently selected Range.
284
- */
285
- async getSelectedRange() {
286
- var _a;
287
- return (_a = this.viewport) === null || _a === void 0 ? void 0 : _a.getSelectedRange();
288
- }
289
- // --------------------------------------------------------------------------
290
- //
291
- // Listeners outside scope
292
- //
293
- // --------------------------------------------------------------------------
294
- /** Clear data which is outside of grid container */
295
- handleOutsideClick({ target }) {
296
- if (!(target === null || target === void 0 ? void 0 : target.closest(`[${UUID}="${this.uuid}"]`))) {
297
- this.clearFocus();
298
- }
299
- }
300
- // --------------------------------------------------------------------------
301
- //
302
- // Listeners
303
- //
304
- // --------------------------------------------------------------------------
305
- /** DRAG AND DROP */
306
- onRowDragStarted(e) {
307
- var _a;
308
- e.cancelBubble = true;
309
- const dragStart = this.rowdragstart.emit(e.detail);
310
- if (dragStart.defaultPrevented) {
311
- e.preventDefault();
312
- return;
313
- }
314
- (_a = this.orderService) === null || _a === void 0 ? void 0 : _a.start(this.element, Object.assign(Object.assign({}, e.detail), dragStart.detail));
315
- }
316
- onRowDragEnd() {
317
- var _a;
318
- (_a = this.orderService) === null || _a === void 0 ? void 0 : _a.end();
319
- }
320
- onRowDrag({ detail }) {
321
- var _a;
322
- (_a = this.orderService) === null || _a === void 0 ? void 0 : _a.move(detail);
323
- }
324
- onRowMouseMove(e) {
325
- var _a;
326
- e.cancelBubble = true;
327
- (_a = this.orderService) === null || _a === void 0 ? void 0 : _a.moveTip(e.detail);
328
- }
329
- async onBeforeEdit(e) {
330
- e.cancelBubble = true;
331
- const { defaultPrevented, detail } = this.beforeedit.emit(e.detail);
332
- await timeout();
333
- // apply data
334
- if (!defaultPrevented) {
335
- this.dataProvider.setCellData(detail);
336
- this.afteredit.emit(detail);
337
- }
338
- }
339
- onBeforeRangeEdit(e) {
340
- e.cancelBubble = true;
341
- const { defaultPrevented } = this.beforerangeedit.emit(e.detail);
342
- if (defaultPrevented) {
343
- e.preventDefault();
344
- return;
345
- }
346
- this.afteredit.emit(e.detail);
347
- }
348
- onRangeChanged(e) {
349
- e.cancelBubble = true;
350
- const beforeaange = this.beforeaange.emit(e.detail);
351
- if (beforeaange.defaultPrevented) {
352
- e.preventDefault();
353
- }
354
- const beforeFill = this.beforeautofill.emit(e.detail);
355
- if (beforeFill.defaultPrevented) {
356
- return;
357
- }
358
- }
359
- onRowDropped(e) {
360
- e.cancelBubble = true;
361
- const { defaultPrevented } = this.roworderchanged.emit(e.detail);
362
- if (defaultPrevented) {
363
- e.preventDefault();
364
- }
365
- }
366
- onHeaderClick(e) {
367
- const { defaultPrevented } = this.headerclick.emit(Object.assign(Object.assign({}, e.detail.column), { originalEvent: e.detail.originalEvent }));
368
- if (defaultPrevented) {
369
- e.preventDefault();
370
- }
371
- }
372
- onCellFocus(e) {
373
- e.cancelBubble = true;
374
- const { defaultPrevented } = this.beforecellfocus.emit(e.detail);
375
- if (!this.canFocus || defaultPrevented) {
376
- e.preventDefault();
377
- }
378
- }
379
- columnChanged(newVal = []) {
380
- this.dimensionProvider.drop();
381
- const columnGather = ColumnDataProvider.getColumns(newVal, 0, this.columnTypes);
382
- this.beforecolumnsset.emit(columnGather);
383
- for (let type of columnTypes) {
384
- const items = columnGather.columns[type];
385
- this.dimensionProvider.setRealSize(items.length, type);
386
- this.dimensionProvider.setColumns(type, ColumnDataProvider.getSizes(items), type !== 'rgCol');
387
- }
388
- this.beforecolumnapplied.emit(columnGather);
389
- const columns = this.columnProvider.setColumns(columnGather);
390
- this.aftercolumnsset.emit({
391
- columns,
392
- order: this.columnProvider.order,
393
- });
394
- }
395
- themeChanged(t) {
396
- this.themeService.register(t);
397
- this.dimensionProvider.setSettings({ originItemSize: this.themeService.rowSize, frameOffset: this.frameSize || 0 }, 'rgRow');
398
- this.dimensionProvider.setSettings({ originItemSize: this.colSize, frameOffset: this.frameSize || 0 }, 'rgCol');
399
- }
400
- dataChanged(source = []) {
401
- let newSource = [...source];
402
- const beforesourceset = this.beforesourceset.emit({
403
- type: 'rgRow',
404
- source: newSource,
405
- });
406
- newSource = beforesourceset.detail.source;
407
- newSource = this.dataProvider.setData(newSource, 'rgRow');
408
- this.aftersourceset.emit({
409
- type: 'rgRow',
410
- source: newSource,
411
- });
412
- }
413
- dataBottomChanged(newVal = []) {
414
- this.dataProvider.setData(newVal, 'rowPinEnd');
415
- }
416
- dataTopChanged(newVal = []) {
417
- this.dataProvider.setData(newVal, 'rowPinStart');
418
- }
419
- rowDefChanged(newVal = []) {
420
- if (!newVal.length) {
421
- return;
422
- }
423
- const rows = reduce(newVal, (r, v) => {
424
- if (!r[v.type]) {
425
- r[v.type] = {};
426
- }
427
- if (v.size) {
428
- if (!r[v.type].sizes) {
429
- r[v.type].sizes = {};
430
- }
431
- r[v.type].sizes[v.index] = v.size;
432
- }
433
- return r;
434
- }, {});
435
- each(rows, (r, k) => {
436
- if (r.sizes) {
437
- this.dimensionProvider.setDimensionSize(k, r.sizes);
438
- }
439
- });
440
- }
441
- trimmedRowsChanged(newVal = {}) {
442
- this.addTrimmed(newVal);
443
- }
444
- groupingChanged(newVal = {}) {
445
- let grPlugin;
446
- for (let p of this.internalPlugins) {
447
- const isGrouping = p;
448
- if (isGrouping.setGrouping) {
449
- grPlugin = isGrouping;
450
- break;
451
- }
452
- }
453
- if (!grPlugin) {
454
- return;
455
- }
456
- grPlugin.setGrouping(newVal || {});
457
- }
458
- applyStretch(isStretch) {
459
- let stretch = this.internalPlugins.filter(p => isStretchPlugin(p))[0];
460
- if (isStretch) {
461
- if (!stretch) {
462
- this.internalPlugins.push(new StretchColumn(this.element, this.dimensionProvider));
463
- }
464
- else {
465
- stretch.applyStretch(this.columnProvider.getRawColumns());
466
- }
467
- }
468
- else if (stretch) {
469
- const index = this.internalPlugins.indexOf(stretch);
470
- this.internalPlugins.splice(index, 1);
471
- }
472
- }
473
- connectedCallback() {
474
- this.viewportProvider = new ViewportProvider();
475
- this.themeService = new ThemeService({
476
- rowSize: this.rowSize,
477
- });
478
- this.dimensionProvider = new DimensionProvider(this.viewportProvider);
479
- this.columnProvider = new ColumnDataProvider();
480
- this.dataProvider = new DataProvider(this.dimensionProvider);
481
- this.uuid = `${new Date().getTime()}-rvgrid`;
482
- if (this.autoSizeColumn) {
483
- this.internalPlugins.push(new AutoSize(this.element, {
484
- dataProvider: this.dataProvider,
485
- columnProvider: this.columnProvider,
486
- dimensionProvider: this.dimensionProvider,
487
- }, typeof this.autoSizeColumn === 'object' ? this.autoSizeColumn : undefined));
488
- }
489
- if (this.filter) {
490
- this.internalPlugins.push(new FilterPlugin(this.element, this.uuid, typeof this.filter === 'object' ? this.filter : undefined));
491
- }
492
- if (this.exporting) {
493
- this.internalPlugins.push(new ExportFilePlugin(this.element));
494
- }
495
- this.internalPlugins.push(new SortingPlugin(this.element));
496
- if (this.plugins) {
497
- this.plugins.forEach(p => {
498
- this.internalPlugins.push(new p(this.element));
499
- });
500
- }
501
- this.internalPlugins.push(new GroupingRowPlugin(this.element, {
502
- dataProvider: this.dataProvider,
503
- columnProvider: this.columnProvider,
504
- }));
505
- this.applyStretch(this.stretch);
506
- this.themeChanged(this.theme);
507
- this.columnChanged(this.columns);
508
- this.dataChanged(this.source);
509
- this.dataTopChanged(this.pinnedTopSource);
510
- this.dataBottomChanged(this.pinnedBottomSource);
511
- this.trimmedRowsChanged(this.trimmedRows);
512
- this.rowDefChanged(this.rowDefinitions);
513
- this.groupingChanged(this.grouping);
514
- this.selectionStoreConnector = new SelectionStoreConnector();
515
- this.scrollingService = new GridScrollingService((e) => {
516
- this.dimensionProvider.setViewPortCoordinate({
517
- coordinate: e.coordinate,
518
- type: e.dimension,
519
- });
520
- this.viewportscroll.emit(e);
521
- });
522
- this.subscribers = { 'click': this.handleOutsideClick.bind(this) };
523
- for (let type in this.subscribers) {
524
- document.addEventListener(type, this.subscribers[type]);
525
- }
526
- }
527
- disconnectedCallback() {
528
- // destroy plugins on element disconnect
529
- each(this.internalPlugins, p => p.destroy());
530
- this.internalPlugins = [];
531
- // clear events
532
- for (let type in this.subscribers) {
533
- document.removeEventListener(type, this.subscribers[type]);
534
- delete this.subscribers[type];
535
- }
536
- }
537
- render() {
538
- const contentHeight = this.dimensionProvider.stores['rgRow'].store.get('realSize');
539
- this.viewport = new ViewportService({
540
- columnProvider: this.columnProvider,
541
- dataProvider: this.dataProvider,
542
- dimensionProvider: this.dimensionProvider,
543
- viewportProvider: this.viewportProvider,
544
- uuid: this.uuid,
545
- scrollingService: this.scrollingService,
546
- orderService: this.orderService,
547
- selectionStoreConnector: this.selectionStoreConnector,
548
- resize: c => this.aftercolumnresize.emit(c)
549
- }, contentHeight);
550
- const views = [];
551
- if (this.rowHeaders) {
552
- const anyView = this.viewport.columns[0];
553
- views.push(h("revogr-row-headers", { height: contentHeight, resize: this.resize, dataPorts: anyView.dataPorts, headerProp: anyView.headerProp, uiid: anyView.prop[UUID], rowHeaderColumn: typeof this.rowHeaders === 'object' ? this.rowHeaders : undefined, onScrollViewport: ({ detail: e }) => this.scrollingService.onScroll(e, 'headerRow'), onElementToScroll: ({ detail: e }) => this.scrollingService.registerElement(e, 'headerRow') }));
554
- }
555
- views.push(h(ViewPortSections, { columnFilter: !!this.filter, resize: this.resize, readonly: this.readonly, range: this.range, rowClass: this.rowClass, editors: this.editors, useClipboard: this.useClipboard, columns: this.viewport.columns, onEdit: detail => {
556
- const event = this.beforeeditstart.emit(detail);
557
- if (!event.defaultPrevented) {
558
- this.selectionStoreConnector.setEdit(detail.isCancel ? false : detail.val);
559
- }
560
- }, registerElement: (e, k) => this.scrollingService.registerElement(e, k), onScroll: details => this.scrollingService.onScroll(details) }));
561
- return (h(Host, Object.assign({}, { [`${UUID}`]: this.uuid }),
562
- h(RevoViewPort, { viewports: this.viewportProvider.stores, dimensions: this.dimensionProvider.stores, orderRef: e => (this.orderService = e), registerElement: (e, k) => this.scrollingService.registerElement(e, k), nakedClick: () => this.viewport.clearEdit(), onScroll: details => this.scrollingService.onScroll(details) }, views),
563
- this.extraElements));
564
- }
565
- static get is() { return "revo-grid"; }
566
- static get originalStyleUrls() { return {
567
- "$": ["revo-grid-style.scss"]
568
- }; }
569
- static get styleUrls() { return {
570
- "$": ["revo-grid-style.css"]
571
- }; }
572
- static get properties() { return {
573
- "rowHeaders": {
574
- "type": "boolean",
575
- "mutable": false,
576
- "complexType": {
577
- "original": "RevoGrid.RowHeaders | boolean",
578
- "resolved": "RowHeaders | boolean",
579
- "references": {
580
- "RevoGrid": {
581
- "location": "import",
582
- "path": "../../interfaces"
583
- }
584
- }
585
- },
586
- "required": false,
587
- "optional": false,
588
- "docs": {
589
- "tags": [],
590
- "text": "Excel like show rgRow indexe per rgRow"
591
- },
592
- "attribute": "row-headers",
593
- "reflect": false
594
- },
595
- "frameSize": {
596
- "type": "number",
597
- "mutable": false,
598
- "complexType": {
599
- "original": "number",
600
- "resolved": "number",
601
- "references": {}
602
- },
603
- "required": false,
604
- "optional": false,
605
- "docs": {
606
- "tags": [],
607
- "text": "Defines how many rows/columns should be rendered outside visible area."
608
- },
609
- "attribute": "frame-size",
610
- "reflect": false,
611
- "defaultValue": "1"
612
- },
613
- "rowSize": {
614
- "type": "number",
615
- "mutable": false,
616
- "complexType": {
617
- "original": "number",
618
- "resolved": "number",
619
- "references": {}
620
- },
621
- "required": false,
622
- "optional": false,
623
- "docs": {
624
- "tags": [],
625
- "text": "Indicates default rgRow size.\nBy default 0, means theme package size will be applied"
626
- },
627
- "attribute": "row-size",
628
- "reflect": false,
629
- "defaultValue": "0"
630
- },
631
- "colSize": {
632
- "type": "number",
633
- "mutable": false,
634
- "complexType": {
635
- "original": "number",
636
- "resolved": "number",
637
- "references": {}
638
- },
639
- "required": false,
640
- "optional": false,
641
- "docs": {
642
- "tags": [],
643
- "text": "Indicates default column size."
644
- },
645
- "attribute": "col-size",
646
- "reflect": false,
647
- "defaultValue": "100"
648
- },
649
- "range": {
650
- "type": "boolean",
651
- "mutable": false,
652
- "complexType": {
653
- "original": "boolean",
654
- "resolved": "boolean",
655
- "references": {}
656
- },
657
- "required": false,
658
- "optional": false,
659
- "docs": {
660
- "tags": [],
661
- "text": "When true, user can range selection."
662
- },
663
- "attribute": "range",
664
- "reflect": false,
665
- "defaultValue": "false"
666
- },
667
- "readonly": {
668
- "type": "boolean",
669
- "mutable": false,
670
- "complexType": {
671
- "original": "boolean",
672
- "resolved": "boolean",
673
- "references": {}
674
- },
675
- "required": false,
676
- "optional": false,
677
- "docs": {
678
- "tags": [],
679
- "text": "When true, grid in read only mode."
680
- },
681
- "attribute": "readonly",
682
- "reflect": false,
683
- "defaultValue": "false"
684
- },
685
- "resize": {
686
- "type": "boolean",
687
- "mutable": false,
688
- "complexType": {
689
- "original": "boolean",
690
- "resolved": "boolean",
691
- "references": {}
692
- },
693
- "required": false,
694
- "optional": false,
695
- "docs": {
696
- "tags": [],
697
- "text": "When true, columns are resizable."
698
- },
699
- "attribute": "resize",
700
- "reflect": false,
701
- "defaultValue": "false"
702
- },
703
- "canFocus": {
704
- "type": "boolean",
705
- "mutable": false,
706
- "complexType": {
707
- "original": "boolean",
708
- "resolved": "boolean",
709
- "references": {}
710
- },
711
- "required": false,
712
- "optional": false,
713
- "docs": {
714
- "tags": [],
715
- "text": "When true cell focus appear."
716
- },
717
- "attribute": "can-focus",
718
- "reflect": false,
719
- "defaultValue": "true"
720
- },
721
- "useClipboard": {
722
- "type": "boolean",
723
- "mutable": false,
724
- "complexType": {
725
- "original": "boolean",
726
- "resolved": "boolean",
727
- "references": {}
728
- },
729
- "required": false,
730
- "optional": false,
731
- "docs": {
732
- "tags": [],
733
- "text": "When true enable clipboard."
734
- },
735
- "attribute": "use-clipboard",
736
- "reflect": false,
737
- "defaultValue": "true"
738
- },
739
- "columns": {
740
- "type": "unknown",
741
- "mutable": false,
742
- "complexType": {
743
- "original": "(RevoGrid.ColumnRegular | RevoGrid.ColumnGrouping)[]",
744
- "resolved": "(ColumnRegular | ColumnGrouping)[]",
745
- "references": {
746
- "RevoGrid": {
747
- "location": "import",
748
- "path": "../../interfaces"
749
- }
750
- }
751
- },
752
- "required": false,
753
- "optional": false,
754
- "docs": {
755
- "tags": [],
756
- "text": "Columns - defines an array of grid columns.\nCan be column or grouped column."
757
- },
758
- "defaultValue": "[]"
759
- },
760
- "source": {
761
- "type": "unknown",
762
- "mutable": false,
763
- "complexType": {
764
- "original": "RevoGrid.DataType[]",
765
- "resolved": "DataType[]",
766
- "references": {
767
- "RevoGrid": {
768
- "location": "import",
769
- "path": "../../interfaces"
770
- }
771
- }
772
- },
773
- "required": false,
774
- "optional": false,
775
- "docs": {
776
- "tags": [],
777
- "text": "Source - defines main data source.\nCan be an Object or 2 dimensional array([][]);\nKeys/indexes referenced from columns Prop"
778
- },
779
- "defaultValue": "[]"
780
- },
781
- "pinnedTopSource": {
782
- "type": "unknown",
783
- "mutable": false,
784
- "complexType": {
785
- "original": "RevoGrid.DataType[]",
786
- "resolved": "DataType[]",
787
- "references": {
788
- "RevoGrid": {
789
- "location": "import",
790
- "path": "../../interfaces"
791
- }
792
- }
793
- },
794
- "required": false,
795
- "optional": false,
796
- "docs": {
797
- "tags": [],
798
- "text": "Pinned top Source: {[T in ColumnProp]: any} - defines pinned top rows data source."
799
- },
800
- "defaultValue": "[]"
801
- },
802
- "pinnedBottomSource": {
803
- "type": "unknown",
804
- "mutable": false,
805
- "complexType": {
806
- "original": "RevoGrid.DataType[]",
807
- "resolved": "DataType[]",
808
- "references": {
809
- "RevoGrid": {
810
- "location": "import",
811
- "path": "../../interfaces"
812
- }
813
- }
814
- },
815
- "required": false,
816
- "optional": false,
817
- "docs": {
818
- "tags": [],
819
- "text": "Pinned bottom Source: {[T in ColumnProp]: any} - defines pinned bottom rows data source."
820
- },
821
- "defaultValue": "[]"
822
- },
823
- "rowDefinitions": {
824
- "type": "unknown",
825
- "mutable": false,
826
- "complexType": {
827
- "original": "RevoGrid.RowDefinition[]",
828
- "resolved": "RowDefinition[]",
829
- "references": {
830
- "RevoGrid": {
831
- "location": "import",
832
- "path": "../../interfaces"
833
- }
834
- }
835
- },
836
- "required": false,
837
- "optional": false,
838
- "docs": {
839
- "tags": [],
840
- "text": "Row properies applied"
841
- },
842
- "defaultValue": "[]"
843
- },
844
- "editors": {
845
- "type": "unknown",
846
- "mutable": false,
847
- "complexType": {
848
- "original": "Edition.Editors",
849
- "resolved": "{ [name: string]: EditorCtr; }",
850
- "references": {
851
- "Edition": {
852
- "location": "import",
853
- "path": "../../interfaces"
854
- }
855
- }
856
- },
857
- "required": false,
858
- "optional": false,
859
- "docs": {
860
- "tags": [],
861
- "text": "Custom editors register"
862
- },
863
- "defaultValue": "{}"
864
- },
865
- "plugins": {
866
- "type": "unknown",
867
- "mutable": false,
868
- "complexType": {
869
- "original": "RevoPlugin.PluginClass[]",
870
- "resolved": "(typeof Plugin)[]",
871
- "references": {
872
- "RevoPlugin": {
873
- "location": "import",
874
- "path": "../../interfaces"
875
- }
876
- }
877
- },
878
- "required": false,
879
- "optional": false,
880
- "docs": {
881
- "tags": [],
882
- "text": "Custom grid plugins\nHas to be predefined during first grid init\nEvery plugin should be inherited from BasePlugin"
883
- }
884
- },
885
- "columnTypes": {
886
- "type": "unknown",
887
- "mutable": false,
888
- "complexType": {
889
- "original": "{ [name: string]: RevoGrid.ColumnType }",
890
- "resolved": "{ [name: string]: ColumnType; }",
891
- "references": {
892
- "RevoGrid": {
893
- "location": "import",
894
- "path": "../../interfaces"
895
- }
896
- }
897
- },
898
- "required": false,
899
- "optional": false,
900
- "docs": {
901
- "tags": [],
902
- "text": "Types\nEvery type represent multiple column properties\nTypes will be merged but can be replaced with column properties"
903
- },
904
- "defaultValue": "{}"
905
- },
906
- "theme": {
907
- "type": "string",
908
- "mutable": true,
909
- "complexType": {
910
- "original": "ThemeSpace.Theme",
911
- "resolved": "\"compact\" | \"darkCompact\" | \"darkMaterial\" | \"default\" | \"material\"",
912
- "references": {
913
- "ThemeSpace": {
914
- "location": "import",
915
- "path": "../../interfaces"
916
- }
917
- }
918
- },
919
- "required": false,
920
- "optional": false,
921
- "docs": {
922
- "tags": [],
923
- "text": "Theme name"
924
- },
925
- "attribute": "theme",
926
- "reflect": true,
927
- "defaultValue": "'default'"
928
- },
929
- "rowClass": {
930
- "type": "string",
931
- "mutable": false,
932
- "complexType": {
933
- "original": "string",
934
- "resolved": "string",
935
- "references": {}
936
- },
937
- "required": false,
938
- "optional": false,
939
- "docs": {
940
- "tags": [],
941
- "text": "Row class property\nDefine this property in rgRow object and this will be mapped as rgRow class"
942
- },
943
- "attribute": "row-class",
944
- "reflect": true,
945
- "defaultValue": "''"
946
- },
947
- "autoSizeColumn": {
948
- "type": "boolean",
949
- "mutable": false,
950
- "complexType": {
951
- "original": "boolean | AutoSizeColumnConfig",
952
- "resolved": "boolean | { mode?: ColumnAutoSizeMode; allColumns?: boolean; letterBlockSize?: number; preciseSize?: boolean; }",
953
- "references": {
954
- "AutoSizeColumnConfig": {
955
- "location": "import",
956
- "path": "../../plugins/autoSizeColumn"
957
- }
958
- }
959
- },
960
- "required": false,
961
- "optional": false,
962
- "docs": {
963
- "tags": [],
964
- "text": "Autosize config\nEnable columns autoSize, for more details check @autoSizeColumn plugin\nBy default disabled, hence operation is not resource efficient\ntrue to enable with default params (double header separator click for autosize)\nor provide config"
965
- },
966
- "attribute": "auto-size-column",
967
- "reflect": false,
968
- "defaultValue": "false"
969
- },
970
- "filter": {
971
- "type": "boolean",
972
- "mutable": false,
973
- "complexType": {
974
- "original": "boolean | ColumnFilterConfig",
975
- "resolved": "boolean | { collection?: FilterCollection; include?: string[]; customFilters?: Record<string, CustomFilter>; localization?: FilterLocalization; multiFilterItems?: MultiFilterItem; disableDynamicFiltering?: boolean; }",
976
- "references": {
977
- "ColumnFilterConfig": {
978
- "location": "import",
979
- "path": "../../plugins/filter/filter.plugin"
980
- }
981
- }
982
- },
983
- "required": false,
984
- "optional": false,
985
- "docs": {
986
- "tags": [],
987
- "text": "Enables filter plugin\nCan be boolean\nCan be filter collection"
988
- },
989
- "attribute": "filter",
990
- "reflect": false,
991
- "defaultValue": "false"
992
- },
993
- "trimmedRows": {
994
- "type": "unknown",
995
- "mutable": false,
996
- "complexType": {
997
- "original": "Record<number, boolean>",
998
- "resolved": "{ [x: number]: boolean; }",
999
- "references": {
1000
- "Record": {
1001
- "location": "global"
1002
- }
1003
- }
1004
- },
1005
- "required": false,
1006
- "optional": false,
1007
- "docs": {
1008
- "tags": [{
1009
- "text": "are physical rgRow indexes to hide",
1010
- "name": "trimmedRows"
1011
- }],
1012
- "text": "Trimmed rows\nFunctionality which allows to hide rows from main data set"
1013
- },
1014
- "defaultValue": "{}"
1015
- },
1016
- "exporting": {
1017
- "type": "boolean",
1018
- "mutable": false,
1019
- "complexType": {
1020
- "original": "boolean",
1021
- "resolved": "boolean",
1022
- "references": {}
1023
- },
1024
- "required": false,
1025
- "optional": false,
1026
- "docs": {
1027
- "tags": [],
1028
- "text": "Enables export plugin\nCan be boolean\nCan be export options"
1029
- },
1030
- "attribute": "exporting",
1031
- "reflect": false,
1032
- "defaultValue": "false"
1033
- },
1034
- "grouping": {
1035
- "type": "unknown",
1036
- "mutable": false,
1037
- "complexType": {
1038
- "original": "GroupingOptions",
1039
- "resolved": "{ props?: ColumnProp[]; expandedAll?: boolean; }",
1040
- "references": {
1041
- "GroupingOptions": {
1042
- "location": "import",
1043
- "path": "../../plugins/groupingRow/grouping.row.types"
1044
- }
1045
- }
1046
- },
1047
- "required": false,
1048
- "optional": false,
1049
- "docs": {
1050
- "tags": [],
1051
- "text": "Group models by provided properties\nDefine properties to be groped by"
1052
- }
1053
- },
1054
- "stretch": {
1055
- "type": "any",
1056
- "mutable": false,
1057
- "complexType": {
1058
- "original": "boolean|string",
1059
- "resolved": "boolean | string",
1060
- "references": {}
1061
- },
1062
- "required": false,
1063
- "optional": false,
1064
- "docs": {
1065
- "tags": [],
1066
- "text": "Defines stretch strategy for columns with @StretchColumn plugin\nif there are more space on the right last column size would be increased"
1067
- },
1068
- "attribute": "stretch",
1069
- "reflect": false,
1070
- "defaultValue": "true"
1071
- }
1072
- }; }
1073
- static get states() { return {
1074
- "extraElements": {}
1075
- }; }
1076
- static get events() { return [{
1077
- "method": "beforeedit",
1078
- "name": "beforeedit",
1079
- "bubbles": true,
1080
- "cancelable": true,
1081
- "composed": true,
1082
- "docs": {
1083
- "tags": [],
1084
- "text": "Before edit event.\nTriggered before edit data applied.\nUse e.preventDefault() to prevent edit data set and use you own.\nUse e.val = {your value} to replace edit result with your own."
1085
- },
1086
- "complexType": {
1087
- "original": "Edition.BeforeSaveDataDetails",
1088
- "resolved": "{ prop: ColumnProp; model: DataType; val?: string; rowIndex: number; type: DimensionRows; }",
1089
- "references": {
1090
- "Edition": {
1091
- "location": "import",
1092
- "path": "../../interfaces"
1093
- }
1094
- }
1095
- }
1096
- }, {
1097
- "method": "beforerangeedit",
1098
- "name": "beforerangeedit",
1099
- "bubbles": true,
1100
- "cancelable": true,
1101
- "composed": true,
1102
- "docs": {
1103
- "tags": [],
1104
- "text": "Before range edit event.\nTriggered before range data applied, when range selection happened.\nUse e.preventDefault() to prevent edit data set and use you own."
1105
- },
1106
- "complexType": {
1107
- "original": "Edition.BeforeRangeSaveDataDetails",
1108
- "resolved": "{ data: DataLookup; models: { [rowIndex: number]: DataType; }; type: DimensionRows; }",
1109
- "references": {
1110
- "Edition": {
1111
- "location": "import",
1112
- "path": "../../interfaces"
1113
- }
1114
- }
1115
- }
1116
- }, {
1117
- "method": "afteredit",
1118
- "name": "afteredit",
1119
- "bubbles": true,
1120
- "cancelable": true,
1121
- "composed": true,
1122
- "docs": {
1123
- "tags": [],
1124
- "text": "After edit.\nTriggered when after data applied or Range changeged."
1125
- },
1126
- "complexType": {
1127
- "original": "Edition.BeforeSaveDataDetails | Edition.BeforeRangeSaveDataDetails",
1128
- "resolved": "{ data: DataLookup; models: { [rowIndex: number]: DataType; }; type: DimensionRows; } | { prop: ColumnProp; model: DataType; val?: string; rowIndex: number; type: DimensionRows; }",
1129
- "references": {
1130
- "Edition": {
1131
- "location": "import",
1132
- "path": "../../interfaces"
1133
- }
1134
- }
1135
- }
1136
- }, {
1137
- "method": "beforeautofill",
1138
- "name": "beforeautofill",
1139
- "bubbles": true,
1140
- "cancelable": true,
1141
- "composed": true,
1142
- "docs": {
1143
- "tags": [],
1144
- "text": "Before autofill.\nTriggered before autofill applied.\nUse e.preventDefault() to prevent edit data apply."
1145
- },
1146
- "complexType": {
1147
- "original": "Selection.ChangedRange",
1148
- "resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; }",
1149
- "references": {
1150
- "Selection": {
1151
- "location": "import",
1152
- "path": "../../interfaces"
1153
- }
1154
- }
1155
- }
1156
- }, {
1157
- "method": "beforeaange",
1158
- "name": "beforeaange",
1159
- "bubbles": true,
1160
- "cancelable": true,
1161
- "composed": true,
1162
- "docs": {
1163
- "tags": [],
1164
- "text": "Before range apply.\nTriggered before range applied.\nUse e.preventDefault() to prevent range."
1165
- },
1166
- "complexType": {
1167
- "original": "Selection.ChangedRange",
1168
- "resolved": "{ type: DimensionRows; newRange: RangeArea; oldRange: RangeArea; newProps: ColumnProp[]; oldProps: ColumnProp[]; newData: { [key: number]: DataType; }; }",
1169
- "references": {
1170
- "Selection": {
1171
- "location": "import",
1172
- "path": "../../interfaces"
1173
- }
1174
- }
1175
- }
1176
- }, {
1177
- "method": "roworderchanged",
1178
- "name": "roworderchanged",
1179
- "bubbles": true,
1180
- "cancelable": true,
1181
- "composed": true,
1182
- "docs": {
1183
- "tags": [],
1184
- "text": "Before rgRow order apply.\nUse e.preventDefault() to prevent rgRow order change."
1185
- },
1186
- "complexType": {
1187
- "original": "{ from: number; to: number }",
1188
- "resolved": "{ from: number; to: number; }",
1189
- "references": {}
1190
- }
1191
- }, {
1192
- "method": "beforesourcesortingapply",
1193
- "name": "beforesourcesortingapply",
1194
- "bubbles": true,
1195
- "cancelable": true,
1196
- "composed": true,
1197
- "docs": {
1198
- "tags": [],
1199
- "text": "Before source update sorting apply.\nUse this event if you intended to prevent sorting on data update.\nUse e.preventDefault() to prevent sorting data change during rows source update."
1200
- },
1201
- "complexType": {
1202
- "original": "any",
1203
- "resolved": "any",
1204
- "references": {}
1205
- }
1206
- }, {
1207
- "method": "beforesortingapply",
1208
- "name": "beforesortingapply",
1209
- "bubbles": true,
1210
- "cancelable": true,
1211
- "composed": true,
1212
- "docs": {
1213
- "tags": [],
1214
- "text": "Before sorting apply.\nUse e.preventDefault() to prevent sorting data change."
1215
- },
1216
- "complexType": {
1217
- "original": "{\n column: RevoGrid.ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }",
1218
- "resolved": "{ column: ColumnRegular; order: \"desc\" | \"asc\"; additive: boolean; }",
1219
- "references": {
1220
- "RevoGrid": {
1221
- "location": "import",
1222
- "path": "../../interfaces"
1223
- }
1224
- }
1225
- }
1226
- }, {
1227
- "method": "beforesorting",
1228
- "name": "beforesorting",
1229
- "bubbles": true,
1230
- "cancelable": true,
1231
- "composed": true,
1232
- "docs": {
1233
- "tags": [],
1234
- "text": "Before sorting event.\nInitial sorting triggered, if this event stops no other event called.\nUse e.preventDefault() to prevent sorting."
1235
- },
1236
- "complexType": {
1237
- "original": "{\n column: RevoGrid.ColumnRegular;\n order: 'desc' | 'asc';\n additive: boolean;\n }",
1238
- "resolved": "{ column: ColumnRegular; order: \"desc\" | \"asc\"; additive: boolean; }",
1239
- "references": {
1240
- "RevoGrid": {
1241
- "location": "import",
1242
- "path": "../../interfaces"
1243
- }
1244
- }
1245
- }
1246
- }, {
1247
- "method": "rowdragstart",
1248
- "name": "rowdragstart",
1249
- "bubbles": true,
1250
- "cancelable": true,
1251
- "composed": true,
1252
- "docs": {
1253
- "tags": [],
1254
- "text": "Row order change started.\nUse e.preventDefault() to prevent rgRow order change.\nUse e.text = 'new name' to change item name on start."
1255
- },
1256
- "complexType": {
1257
- "original": "{ pos: RevoGrid.PositionItem; text: string }",
1258
- "resolved": "{ pos: PositionItem; text: string; }",
1259
- "references": {
1260
- "RevoGrid": {
1261
- "location": "import",
1262
- "path": "../../interfaces"
1263
- }
1264
- }
1265
- }
1266
- }, {
1267
- "method": "headerclick",
1268
- "name": "headerclick",
1269
- "bubbles": true,
1270
- "cancelable": true,
1271
- "composed": true,
1272
- "docs": {
1273
- "tags": [],
1274
- "text": "On header click."
1275
- },
1276
- "complexType": {
1277
- "original": "RevoGrid.ColumnRegular",
1278
- "resolved": "ColumnRegular",
1279
- "references": {
1280
- "RevoGrid": {
1281
- "location": "import",
1282
- "path": "../../interfaces"
1283
- }
1284
- }
1285
- }
1286
- }, {
1287
- "method": "beforecellfocus",
1288
- "name": "beforecellfocus",
1289
- "bubbles": true,
1290
- "cancelable": true,
1291
- "composed": true,
1292
- "docs": {
1293
- "tags": [],
1294
- "text": "Before cell focus changed.\nUse e.preventDefault() to prevent cell focus change."
1295
- },
1296
- "complexType": {
1297
- "original": "Edition.BeforeSaveDataDetails",
1298
- "resolved": "{ prop: ColumnProp; model: DataType; val?: string; rowIndex: number; type: DimensionRows; }",
1299
- "references": {
1300
- "Edition": {
1301
- "location": "import",
1302
- "path": "../../interfaces"
1303
- }
1304
- }
1305
- }
1306
- }, {
1307
- "method": "beforefocuslost",
1308
- "name": "beforefocuslost",
1309
- "bubbles": true,
1310
- "cancelable": true,
1311
- "composed": true,
1312
- "docs": {
1313
- "tags": [],
1314
- "text": "Before grid focus lost happened.\nUse e.preventDefault() to prevent cell focus change."
1315
- },
1316
- "complexType": {
1317
- "original": "FocusedData|null",
1318
- "resolved": "{ model: any; cell: Cell; colType: DimensionCols; rowType: DimensionRows; column?: ColumnRegular; }",
1319
- "references": {
1320
- "FocusedData": {
1321
- "location": "import",
1322
- "path": "./viewport.service"
1323
- }
1324
- }
1325
- }
1326
- }, {
1327
- "method": "beforesourceset",
1328
- "name": "beforesourceset",
1329
- "bubbles": true,
1330
- "cancelable": true,
1331
- "composed": true,
1332
- "docs": {
1333
- "tags": [],
1334
- "text": "Before data apply.\nYou can override data source here"
1335
- },
1336
- "complexType": {
1337
- "original": "{\n type: RevoGrid.DimensionRows;\n source: RevoGrid.DataType[];\n }",
1338
- "resolved": "{ type: DimensionRows; source: DataType[]; }",
1339
- "references": {
1340
- "RevoGrid": {
1341
- "location": "import",
1342
- "path": "../../interfaces"
1343
- }
1344
- }
1345
- }
1346
- }, {
1347
- "method": "aftersourceset",
1348
- "name": "aftersourceset",
1349
- "bubbles": true,
1350
- "cancelable": true,
1351
- "composed": true,
1352
- "docs": {
1353
- "tags": [],
1354
- "text": "After rows updated"
1355
- },
1356
- "complexType": {
1357
- "original": "{\n type: RevoGrid.DimensionRows;\n source: RevoGrid.DataType[];\n }",
1358
- "resolved": "{ type: DimensionRows; source: DataType[]; }",
1359
- "references": {
1360
- "RevoGrid": {
1361
- "location": "import",
1362
- "path": "../../interfaces"
1363
- }
1364
- }
1365
- }
1366
- }, {
1367
- "method": "beforecolumnsset",
1368
- "name": "beforecolumnsset",
1369
- "bubbles": true,
1370
- "cancelable": true,
1371
- "composed": true,
1372
- "docs": {
1373
- "tags": [],
1374
- "text": "Before column update"
1375
- },
1376
- "complexType": {
1377
- "original": "ColumnCollection",
1378
- "resolved": "{ columns: ColumnItems; columnGrouping: ColumnGrouping; maxLevel: number; sort: Record<ColumnProp, ColumnRegular>; }",
1379
- "references": {
1380
- "ColumnCollection": {
1381
- "location": "import",
1382
- "path": "../../services/column.data.provider"
1383
- }
1384
- }
1385
- }
1386
- }, {
1387
- "method": "beforecolumnapplied",
1388
- "name": "beforecolumnapplied",
1389
- "bubbles": true,
1390
- "cancelable": true,
1391
- "composed": true,
1392
- "docs": {
1393
- "tags": [],
1394
- "text": "Before column applied but after column set gathered and viewport updated"
1395
- },
1396
- "complexType": {
1397
- "original": "ColumnCollection",
1398
- "resolved": "{ columns: ColumnItems; columnGrouping: ColumnGrouping; maxLevel: number; sort: Record<ColumnProp, ColumnRegular>; }",
1399
- "references": {
1400
- "ColumnCollection": {
1401
- "location": "import",
1402
- "path": "../../services/column.data.provider"
1403
- }
1404
- }
1405
- }
1406
- }, {
1407
- "method": "aftercolumnsset",
1408
- "name": "aftercolumnsset",
1409
- "bubbles": true,
1410
- "cancelable": true,
1411
- "composed": true,
1412
- "docs": {
1413
- "tags": [],
1414
- "text": "Column updated"
1415
- },
1416
- "complexType": {
1417
- "original": "{\n columns: ColumnCollection;\n order: Record<RevoGrid.ColumnProp, 'asc' | 'desc'>;\n }",
1418
- "resolved": "{ columns: ColumnCollection; order: Record<ColumnProp, \"desc\" | \"asc\">; }",
1419
- "references": {
1420
- "ColumnCollection": {
1421
- "location": "import",
1422
- "path": "../../services/column.data.provider"
1423
- },
1424
- "Record": {
1425
- "location": "global"
1426
- },
1427
- "RevoGrid": {
1428
- "location": "import",
1429
- "path": "../../interfaces"
1430
- }
1431
- }
1432
- }
1433
- }, {
1434
- "method": "beforefilterapply",
1435
- "name": "beforefilterapply",
1436
- "bubbles": true,
1437
- "cancelable": true,
1438
- "composed": true,
1439
- "docs": {
1440
- "tags": [],
1441
- "text": "Before filter applied to data source\nUse e.preventDefault() to prevent cell focus change\nUpdate @collection if you wish to change filters"
1442
- },
1443
- "complexType": {
1444
- "original": "{ collection: FilterCollection }",
1445
- "resolved": "{ collection: FilterCollection; }",
1446
- "references": {
1447
- "FilterCollection": {
1448
- "location": "import",
1449
- "path": "../../plugins/filter/filter.plugin"
1450
- }
1451
- }
1452
- }
1453
- }, {
1454
- "method": "beforefiltertrimmed",
1455
- "name": "beforefiltertrimmed",
1456
- "bubbles": true,
1457
- "cancelable": true,
1458
- "composed": true,
1459
- "docs": {
1460
- "tags": [],
1461
- "text": "Before filter trimmed values\nUse e.preventDefault() to prevent value trimming and filter apply\nUpdate @collection if you wish to change filters\nUpdate @itemsToFilter if you wish to filter indexes of trimming"
1462
- },
1463
- "complexType": {
1464
- "original": "{ collection: FilterCollection; itemsToFilter: Record<number, boolean> }",
1465
- "resolved": "{ collection: FilterCollection; itemsToFilter: Record<number, boolean>; }",
1466
- "references": {
1467
- "FilterCollection": {
1468
- "location": "import",
1469
- "path": "../../plugins/filter/filter.plugin"
1470
- },
1471
- "Record": {
1472
- "location": "global"
1473
- }
1474
- }
1475
- }
1476
- }, {
1477
- "method": "beforetrimmed",
1478
- "name": "beforetrimmed",
1479
- "bubbles": true,
1480
- "cancelable": true,
1481
- "composed": true,
1482
- "docs": {
1483
- "tags": [],
1484
- "text": "Before trimmed values\nUse e.preventDefault() to prevent value trimming\nUpdate @trimmed if you wish to filter indexes of trimming"
1485
- },
1486
- "complexType": {
1487
- "original": "{ trimmed: Record<number, boolean>; trimmedType: string; type: string }",
1488
- "resolved": "{ trimmed: Record<number, boolean>; trimmedType: string; type: string; }",
1489
- "references": {
1490
- "Record": {
1491
- "location": "global"
1492
- }
1493
- }
1494
- }
1495
- }, {
1496
- "method": "aftertrimmed",
1497
- "name": "aftertrimmed",
1498
- "bubbles": true,
1499
- "cancelable": true,
1500
- "composed": true,
1501
- "docs": {
1502
- "tags": [],
1503
- "text": "Notify trimmed applied"
1504
- },
1505
- "complexType": {
1506
- "original": "any",
1507
- "resolved": "any",
1508
- "references": {}
1509
- }
1510
- }, {
1511
- "method": "viewportscroll",
1512
- "name": "viewportscroll",
1513
- "bubbles": true,
1514
- "cancelable": true,
1515
- "composed": true,
1516
- "docs": {
1517
- "tags": [],
1518
- "text": "Triggered when view port scrolled"
1519
- },
1520
- "complexType": {
1521
- "original": "RevoGrid.ViewPortScrollEvent",
1522
- "resolved": "{ dimension: DimensionType; coordinate: number; delta?: number; }",
1523
- "references": {
1524
- "RevoGrid": {
1525
- "location": "import",
1526
- "path": "../../interfaces"
1527
- }
1528
- }
1529
- }
1530
- }, {
1531
- "method": "beforeexport",
1532
- "name": "beforeexport",
1533
- "bubbles": true,
1534
- "cancelable": true,
1535
- "composed": true,
1536
- "docs": {
1537
- "tags": [],
1538
- "text": "Before export\nUse e.preventDefault() to prevent export\nReplace data in Event in case you want to modify it in export"
1539
- },
1540
- "complexType": {
1541
- "original": "DataInput",
1542
- "resolved": "{ data: DataType[]; } & ColSource",
1543
- "references": {
1544
- "DataInput": {
1545
- "location": "import",
1546
- "path": "../../plugins/export/types"
1547
- }
1548
- }
1549
- }
1550
- }, {
1551
- "method": "beforeeditstart",
1552
- "name": "beforeeditstart",
1553
- "bubbles": true,
1554
- "cancelable": true,
1555
- "composed": true,
1556
- "docs": {
1557
- "tags": [],
1558
- "text": "Before edit started\nUse e.preventDefault() to prevent edit"
1559
- },
1560
- "complexType": {
1561
- "original": "Edition.BeforeSaveDataDetails",
1562
- "resolved": "{ prop: ColumnProp; model: DataType; val?: string; rowIndex: number; type: DimensionRows; }",
1563
- "references": {
1564
- "Edition": {
1565
- "location": "import",
1566
- "path": "../../interfaces"
1567
- }
1568
- }
1569
- }
1570
- }, {
1571
- "method": "aftercolumnresize",
1572
- "name": "aftercolumnresize",
1573
- "bubbles": true,
1574
- "cancelable": true,
1575
- "composed": true,
1576
- "docs": {
1577
- "tags": [],
1578
- "text": "After column resize\nGet resized columns"
1579
- },
1580
- "complexType": {
1581
- "original": "Record<RevoGrid.ColumnProp, RevoGrid.ColumnRegular>",
1582
- "resolved": "{ [x: string]: ColumnRegular; [x: number]: ColumnRegular; }",
1583
- "references": {
1584
- "Record": {
1585
- "location": "global"
1586
- },
1587
- "RevoGrid": {
1588
- "location": "import",
1589
- "path": "../../interfaces"
1590
- }
1591
- }
1592
- }
1593
- }]; }
1594
- static get methods() { return {
1595
- "refresh": {
1596
- "complexType": {
1597
- "signature": "(type?: RevoGrid.DimensionRows | 'all') => Promise<void>",
1598
- "parameters": [{
1599
- "tags": [],
1600
- "text": ""
1601
- }],
1602
- "references": {
1603
- "Promise": {
1604
- "location": "global"
1605
- },
1606
- "RevoGrid": {
1607
- "location": "import",
1608
- "path": "../../interfaces"
1609
- }
1610
- },
1611
- "return": "Promise<void>"
1612
- },
1613
- "docs": {
1614
- "text": "Refreshes data viewport.\nCan be specific part as rgRow or pinned rgRow or 'all' by default.",
1615
- "tags": []
1616
- }
1617
- },
1618
- "scrollToRow": {
1619
- "complexType": {
1620
- "signature": "(coordinate?: number) => Promise<void>",
1621
- "parameters": [{
1622
- "tags": [],
1623
- "text": ""
1624
- }],
1625
- "references": {
1626
- "Promise": {
1627
- "location": "global"
1628
- }
1629
- },
1630
- "return": "Promise<void>"
1631
- },
1632
- "docs": {
1633
- "text": "Scrolls view port to specified rgRow index",
1634
- "tags": []
1635
- }
1636
- },
1637
- "scrollToColumnIndex": {
1638
- "complexType": {
1639
- "signature": "(coordinate?: number) => Promise<void>",
1640
- "parameters": [{
1641
- "tags": [],
1642
- "text": ""
1643
- }],
1644
- "references": {
1645
- "Promise": {
1646
- "location": "global"
1647
- }
1648
- },
1649
- "return": "Promise<void>"
1650
- },
1651
- "docs": {
1652
- "text": "Scrolls view port to specified column index",
1653
- "tags": []
1654
- }
1655
- },
1656
- "scrollToColumnProp": {
1657
- "complexType": {
1658
- "signature": "(prop: RevoGrid.ColumnProp) => Promise<void>",
1659
- "parameters": [{
1660
- "tags": [],
1661
- "text": ""
1662
- }],
1663
- "references": {
1664
- "Promise": {
1665
- "location": "global"
1666
- },
1667
- "RevoGrid": {
1668
- "location": "import",
1669
- "path": "../../interfaces"
1670
- }
1671
- },
1672
- "return": "Promise<void>"
1673
- },
1674
- "docs": {
1675
- "text": "Scrolls view port to specified column prop",
1676
- "tags": []
1677
- }
1678
- },
1679
- "updateColumns": {
1680
- "complexType": {
1681
- "signature": "(cols: RevoGrid.ColumnRegular[]) => Promise<void>",
1682
- "parameters": [{
1683
- "tags": [],
1684
- "text": ""
1685
- }],
1686
- "references": {
1687
- "Promise": {
1688
- "location": "global"
1689
- },
1690
- "RevoGrid": {
1691
- "location": "import",
1692
- "path": "../../interfaces"
1693
- }
1694
- },
1695
- "return": "Promise<void>"
1696
- },
1697
- "docs": {
1698
- "text": "Update columns",
1699
- "tags": []
1700
- }
1701
- },
1702
- "addTrimmed": {
1703
- "complexType": {
1704
- "signature": "(trimmed: Record<number, boolean>, trimmedType?: string, type?: RevoGrid.DimensionRows) => Promise<CustomEvent<{ trimmed: Record<number, boolean>; trimmedType: string; type: string; }>>",
1705
- "parameters": [{
1706
- "tags": [],
1707
- "text": ""
1708
- }, {
1709
- "tags": [],
1710
- "text": ""
1711
- }, {
1712
- "tags": [],
1713
- "text": ""
1714
- }],
1715
- "references": {
1716
- "Promise": {
1717
- "location": "global"
1718
- },
1719
- "CustomEvent": {
1720
- "location": "global"
1721
- },
1722
- "Record": {
1723
- "location": "global"
1724
- },
1725
- "RevoGrid": {
1726
- "location": "import",
1727
- "path": "../../interfaces"
1728
- }
1729
- },
1730
- "return": "Promise<CustomEvent<{ trimmed: Record<number, boolean>; trimmedType: string; type: string; }>>"
1731
- },
1732
- "docs": {
1733
- "text": "Add trimmed by type",
1734
- "tags": []
1735
- }
1736
- },
1737
- "scrollToCoordinate": {
1738
- "complexType": {
1739
- "signature": "(cell: Partial<Selection.Cell>) => Promise<void>",
1740
- "parameters": [{
1741
- "tags": [],
1742
- "text": ""
1743
- }],
1744
- "references": {
1745
- "Promise": {
1746
- "location": "global"
1747
- },
1748
- "Partial": {
1749
- "location": "global"
1750
- },
1751
- "Selection": {
1752
- "location": "import",
1753
- "path": "../../interfaces"
1754
- }
1755
- },
1756
- "return": "Promise<void>"
1757
- },
1758
- "docs": {
1759
- "text": "Scrolls view port to coordinate",
1760
- "tags": []
1761
- }
1762
- },
1763
- "setCellEdit": {
1764
- "complexType": {
1765
- "signature": "(rgRow: number, prop: RevoGrid.ColumnProp, rowSource?: RevoGrid.DimensionRows) => Promise<void>",
1766
- "parameters": [{
1767
- "tags": [],
1768
- "text": ""
1769
- }, {
1770
- "tags": [],
1771
- "text": ""
1772
- }, {
1773
- "tags": [],
1774
- "text": ""
1775
- }],
1776
- "references": {
1777
- "Promise": {
1778
- "location": "global"
1779
- },
1780
- "RevoGrid": {
1781
- "location": "import",
1782
- "path": "../../interfaces"
1783
- }
1784
- },
1785
- "return": "Promise<void>"
1786
- },
1787
- "docs": {
1788
- "text": "Bring cell to edit mode",
1789
- "tags": []
1790
- }
1791
- },
1792
- "registerVNode": {
1793
- "complexType": {
1794
- "signature": "(elements: VNode[]) => Promise<void>",
1795
- "parameters": [{
1796
- "tags": [],
1797
- "text": ""
1798
- }],
1799
- "references": {
1800
- "Promise": {
1801
- "location": "global"
1802
- },
1803
- "VNode": {
1804
- "location": "import",
1805
- "path": "@stencil/core"
1806
- }
1807
- },
1808
- "return": "Promise<void>"
1809
- },
1810
- "docs": {
1811
- "text": "Register new virtual node inside of grid\nUsed for additional items creation such as plugin elements",
1812
- "tags": []
1813
- }
1814
- },
1815
- "getSource": {
1816
- "complexType": {
1817
- "signature": "(type?: RevoGrid.DimensionRows) => Promise<RevoGrid.DataType[]>",
1818
- "parameters": [{
1819
- "tags": [],
1820
- "text": ""
1821
- }],
1822
- "references": {
1823
- "Promise": {
1824
- "location": "global"
1825
- },
1826
- "RevoGrid": {
1827
- "location": "import",
1828
- "path": "../../interfaces"
1829
- }
1830
- },
1831
- "return": "Promise<DataType[]>"
1832
- },
1833
- "docs": {
1834
- "text": "Get data from source",
1835
- "tags": []
1836
- }
1837
- },
1838
- "getVisibleSource": {
1839
- "complexType": {
1840
- "signature": "(type?: RevoGrid.DimensionRows) => Promise<any[]>",
1841
- "parameters": [{
1842
- "tags": [{
1843
- "text": "type - type of source",
1844
- "name": "param"
1845
- }],
1846
- "text": "- type of source"
1847
- }],
1848
- "references": {
1849
- "Promise": {
1850
- "location": "global"
1851
- },
1852
- "RevoGrid": {
1853
- "location": "import",
1854
- "path": "../../interfaces"
1855
- }
1856
- },
1857
- "return": "Promise<any[]>"
1858
- },
1859
- "docs": {
1860
- "text": "Get data from visible part of source\nTrimmed/filtered rows will be excluded",
1861
- "tags": [{
1862
- "name": "param",
1863
- "text": "type - type of source"
1864
- }]
1865
- }
1866
- },
1867
- "getSourceStore": {
1868
- "complexType": {
1869
- "signature": "(type?: RevoGrid.DimensionRows) => Promise<RowSource>",
1870
- "parameters": [{
1871
- "tags": [{
1872
- "text": "type - type of source",
1873
- "name": "param"
1874
- }],
1875
- "text": "- type of source"
1876
- }],
1877
- "references": {
1878
- "Promise": {
1879
- "location": "global"
1880
- },
1881
- "RowSource": {
1882
- "location": "import",
1883
- "path": "../data/columnService"
1884
- },
1885
- "RevoGrid": {
1886
- "location": "import",
1887
- "path": "../../interfaces"
1888
- }
1889
- },
1890
- "return": "Promise<RowSource>"
1891
- },
1892
- "docs": {
1893
- "text": "Provides access to rows internal store observer\nCan be used for plugin support",
1894
- "tags": [{
1895
- "name": "param",
1896
- "text": "type - type of source"
1897
- }]
1898
- }
1899
- },
1900
- "getColumnStore": {
1901
- "complexType": {
1902
- "signature": "(type?: RevoGrid.DimensionCols) => Promise<ColumnSource>",
1903
- "parameters": [{
1904
- "tags": [{
1905
- "text": "type - type of column",
1906
- "name": "param"
1907
- }],
1908
- "text": "- type of column"
1909
- }],
1910
- "references": {
1911
- "Promise": {
1912
- "location": "global"
1913
- },
1914
- "ColumnSource": {
1915
- "location": "import",
1916
- "path": "../data/columnService"
1917
- },
1918
- "RevoGrid": {
1919
- "location": "import",
1920
- "path": "../../interfaces"
1921
- }
1922
- },
1923
- "return": "Promise<ColumnSource>"
1924
- },
1925
- "docs": {
1926
- "text": "Provides access to column internal store observer\nCan be used for plugin support",
1927
- "tags": [{
1928
- "name": "param",
1929
- "text": "type - type of column"
1930
- }]
1931
- }
1932
- },
1933
- "updateColumnSorting": {
1934
- "complexType": {
1935
- "signature": "(column: RevoGrid.ColumnRegular, index: number, order: 'asc' | 'desc', additive: boolean) => Promise<RevoGrid.ColumnRegular>",
1936
- "parameters": [{
1937
- "tags": [{
1938
- "text": "column - full column details to update",
1939
- "name": "param"
1940
- }],
1941
- "text": "- full column details to update"
1942
- }, {
1943
- "tags": [{
1944
- "text": "index - virtual column index",
1945
- "name": "param"
1946
- }],
1947
- "text": "- virtual column index"
1948
- }, {
1949
- "tags": [{
1950
- "text": "order - order to apply",
1951
- "name": "param"
1952
- }],
1953
- "text": "- order to apply"
1954
- }, {
1955
- "tags": [],
1956
- "text": ""
1957
- }],
1958
- "references": {
1959
- "Promise": {
1960
- "location": "global"
1961
- },
1962
- "RevoGrid": {
1963
- "location": "import",
1964
- "path": "../../interfaces"
1965
- }
1966
- },
1967
- "return": "Promise<ColumnRegular>"
1968
- },
1969
- "docs": {
1970
- "text": "Update column sorting",
1971
- "tags": [{
1972
- "name": "param",
1973
- "text": "column - full column details to update"
1974
- }, {
1975
- "name": "param",
1976
- "text": "index - virtual column index"
1977
- }, {
1978
- "name": "param",
1979
- "text": "order - order to apply"
1980
- }]
1981
- }
1982
- },
1983
- "clearSorting": {
1984
- "complexType": {
1985
- "signature": "() => Promise<void>",
1986
- "parameters": [],
1987
- "references": {
1988
- "Promise": {
1989
- "location": "global"
1990
- }
1991
- },
1992
- "return": "Promise<void>"
1993
- },
1994
- "docs": {
1995
- "text": "Clears column sorting",
1996
- "tags": []
1997
- }
1998
- },
1999
- "getColumns": {
2000
- "complexType": {
2001
- "signature": "() => Promise<RevoGrid.ColumnRegular[]>",
2002
- "parameters": [],
2003
- "references": {
2004
- "Promise": {
2005
- "location": "global"
2006
- },
2007
- "RevoGrid": {
2008
- "location": "import",
2009
- "path": "../../interfaces"
2010
- }
2011
- },
2012
- "return": "Promise<ColumnRegular[]>"
2013
- },
2014
- "docs": {
2015
- "text": "Receive all columns in data source",
2016
- "tags": []
2017
- }
2018
- },
2019
- "clearFocus": {
2020
- "complexType": {
2021
- "signature": "() => Promise<void>",
2022
- "parameters": [],
2023
- "references": {
2024
- "Promise": {
2025
- "location": "global"
2026
- }
2027
- },
2028
- "return": "Promise<void>"
2029
- },
2030
- "docs": {
2031
- "text": "Clear current grid focus",
2032
- "tags": []
2033
- }
2034
- },
2035
- "getPlugins": {
2036
- "complexType": {
2037
- "signature": "() => Promise<RevoPlugin.Plugin[]>",
2038
- "parameters": [],
2039
- "references": {
2040
- "Promise": {
2041
- "location": "global"
2042
- },
2043
- "RevoPlugin": {
2044
- "location": "import",
2045
- "path": "../../interfaces"
2046
- }
2047
- },
2048
- "return": "Promise<Plugin[]>"
2049
- },
2050
- "docs": {
2051
- "text": "Get all active plugins instances",
2052
- "tags": []
2053
- }
2054
- },
2055
- "getFocused": {
2056
- "complexType": {
2057
- "signature": "() => Promise<FocusedData | null>",
2058
- "parameters": [],
2059
- "references": {
2060
- "Promise": {
2061
- "location": "global"
2062
- },
2063
- "FocusedData": {
2064
- "location": "import",
2065
- "path": "./viewport.service"
2066
- }
2067
- },
2068
- "return": "Promise<FocusedData>"
2069
- },
2070
- "docs": {
2071
- "text": "Get the currently focused cell.",
2072
- "tags": []
2073
- }
2074
- },
2075
- "getSelectedRange": {
2076
- "complexType": {
2077
- "signature": "() => Promise<Selection.RangeArea | null>",
2078
- "parameters": [],
2079
- "references": {
2080
- "Promise": {
2081
- "location": "global"
2082
- },
2083
- "Selection": {
2084
- "location": "import",
2085
- "path": "../../interfaces"
2086
- }
2087
- },
2088
- "return": "Promise<RangeArea>"
2089
- },
2090
- "docs": {
2091
- "text": "Get the currently selected Range.",
2092
- "tags": []
2093
- }
2094
- }
2095
- }; }
2096
- static get elementRef() { return "element"; }
2097
- static get watchers() { return [{
2098
- "propName": "columns",
2099
- "methodName": "columnChanged"
2100
- }, {
2101
- "propName": "theme",
2102
- "methodName": "themeChanged"
2103
- }, {
2104
- "propName": "source",
2105
- "methodName": "dataChanged"
2106
- }, {
2107
- "propName": "pinnedBottomSource",
2108
- "methodName": "dataBottomChanged"
2109
- }, {
2110
- "propName": "pinnedTopSource",
2111
- "methodName": "dataTopChanged"
2112
- }, {
2113
- "propName": "rowDefinitions",
2114
- "methodName": "rowDefChanged"
2115
- }, {
2116
- "propName": "trimmedRows",
2117
- "methodName": "trimmedRowsChanged"
2118
- }, {
2119
- "propName": "grouping",
2120
- "methodName": "groupingChanged"
2121
- }, {
2122
- "propName": "stretch",
2123
- "methodName": "applyStretch"
2124
- }]; }
2125
- static get listeners() { return [{
2126
- "name": "internalRowDragStart",
2127
- "method": "onRowDragStarted",
2128
- "target": undefined,
2129
- "capture": false,
2130
- "passive": false
2131
- }, {
2132
- "name": "internalRowDragEnd",
2133
- "method": "onRowDragEnd",
2134
- "target": undefined,
2135
- "capture": false,
2136
- "passive": false
2137
- }, {
2138
- "name": "internalRowDrag",
2139
- "method": "onRowDrag",
2140
- "target": undefined,
2141
- "capture": false,
2142
- "passive": false
2143
- }, {
2144
- "name": "internalRowMouseMove",
2145
- "method": "onRowMouseMove",
2146
- "target": undefined,
2147
- "capture": false,
2148
- "passive": false
2149
- }, {
2150
- "name": "internalCellEdit",
2151
- "method": "onBeforeEdit",
2152
- "target": undefined,
2153
- "capture": false,
2154
- "passive": false
2155
- }, {
2156
- "name": "internalRangeDataApply",
2157
- "method": "onBeforeRangeEdit",
2158
- "target": undefined,
2159
- "capture": false,
2160
- "passive": false
2161
- }, {
2162
- "name": "internalSelectionChanged",
2163
- "method": "onRangeChanged",
2164
- "target": undefined,
2165
- "capture": false,
2166
- "passive": false
2167
- }, {
2168
- "name": "initialRowDropped",
2169
- "method": "onRowDropped",
2170
- "target": undefined,
2171
- "capture": false,
2172
- "passive": false
2173
- }, {
2174
- "name": "initialHeaderClick",
2175
- "method": "onHeaderClick",
2176
- "target": undefined,
2177
- "capture": false,
2178
- "passive": false
2179
- }, {
2180
- "name": "internalFocusCell",
2181
- "method": "onCellFocus",
2182
- "target": undefined,
2183
- "capture": false,
2184
- "passive": false
2185
- }]; }
2186
- }