@hpcc-js/dgrid 3.3.2 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +574 -655
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -3
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,322 +1,297 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import { HTMLWidget, Palette, PropertyExt, format, select } from "@hpcc-js/common";
|
|
4
2
|
import { hashSum } from "@hpcc-js/util";
|
|
3
|
+
|
|
4
|
+
//#region src/__package__.ts
|
|
5
5
|
const PKG_NAME = "@hpcc-js/dgrid";
|
|
6
6
|
const PKG_VERSION = "3.1.0";
|
|
7
7
|
const BUILD_VERSION = "3.2.1";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/dgrid-shim.ts
|
|
11
|
+
if (!globalThis["@hpcc-js/dgrid-shim"]) console.error("dgrid-shim not loaded, please add `<script src=\"https://cdn.jsdelivr.net/npm/@hpcc-js/dgrid-shim/dist/index.min.js\"><\/script>` or similar to your HTML file");
|
|
11
12
|
const Deferred = globalThis["@hpcc-js/dgrid-shim"].Deferred;
|
|
12
13
|
const Memory = globalThis["@hpcc-js/dgrid-shim"].Memory;
|
|
13
14
|
const QueryResults = globalThis["@hpcc-js/dgrid-shim"].QueryResults;
|
|
14
15
|
const Grid = globalThis["@hpcc-js/dgrid-shim"].Grid;
|
|
15
16
|
const PagingGrid = globalThis["@hpcc-js/dgrid-shim"].PagingGrid;
|
|
16
17
|
const domConstruct = globalThis["@hpcc-js/dgrid-shim"].domConstruct;
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/RowFormatter.ts
|
|
17
21
|
function entitiesEncode(str) {
|
|
18
|
-
|
|
22
|
+
return String(str).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
19
23
|
}
|
|
20
|
-
__name(entitiesEncode, "entitiesEncode");
|
|
21
24
|
function safeEncode(item) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
console.warn("Unknown cell type: " + Object.prototype.toString.call(item));
|
|
31
|
-
}
|
|
32
|
-
return item;
|
|
25
|
+
switch (Object.prototype.toString.call(item)) {
|
|
26
|
+
case "[object Undefined]":
|
|
27
|
+
case "[object Boolean]":
|
|
28
|
+
case "[object Number]": return item;
|
|
29
|
+
case "[object String]": return entitiesEncode(item);
|
|
30
|
+
default: console.warn("Unknown cell type: " + Object.prototype.toString.call(item));
|
|
31
|
+
}
|
|
32
|
+
return item;
|
|
33
33
|
}
|
|
34
|
-
__name(safeEncode, "safeEncode");
|
|
35
34
|
function isArray(obj) {
|
|
36
|
-
|
|
35
|
+
return obj instanceof Array;
|
|
37
36
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this._formattedRow[column.field] += LINE_SPLITTER;
|
|
109
|
-
this._formattedRow[column.field] += "" + (cell === void 0 ? "" : this._renderHtml ? cell : safeEncode(cell));
|
|
110
|
-
}
|
|
111
|
-
if (maxChildDepth > 1) {
|
|
112
|
-
const paddingArr = [];
|
|
113
|
-
paddingArr.length = maxChildDepth;
|
|
114
|
-
const padding = paddingArr.join(LINE_SPLITTER2);
|
|
115
|
-
this._formattedRow[column.field] += padding;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
formatRow(columns, row = [], rowIdx = 0) {
|
|
120
|
-
const maxChildDepth = this.calcDepth(columns, row);
|
|
121
|
-
for (const column of columns) {
|
|
122
|
-
this.formatCell(column, row[column.leafID], maxChildDepth);
|
|
123
|
-
}
|
|
124
|
-
return maxChildDepth;
|
|
125
|
-
}
|
|
126
|
-
row() {
|
|
127
|
-
const retVal = {};
|
|
128
|
-
for (const column of this._flattenedColumns) {
|
|
129
|
-
retVal[column] = this._formattedRow[column];
|
|
130
|
-
}
|
|
131
|
-
return retVal;
|
|
132
|
-
}
|
|
37
|
+
var LINE_SPLITTER = "<br><hr class='dgrid-fakeline'>";
|
|
38
|
+
var LINE_SPLITTER2 = "<br><hr class='dgrid-fakeline' style='visibility: hidden'>";
|
|
39
|
+
var RowFormatter = class {
|
|
40
|
+
_columns;
|
|
41
|
+
_flattenedColumns = [];
|
|
42
|
+
_columnIdx = {};
|
|
43
|
+
_formattedRow = {};
|
|
44
|
+
constructor(columns, _renderHtml) {
|
|
45
|
+
this._renderHtml = _renderHtml;
|
|
46
|
+
this._columns = columns;
|
|
47
|
+
this.flattenColumns(columns);
|
|
48
|
+
}
|
|
49
|
+
flattenColumns(columns) {
|
|
50
|
+
for (const column of columns) this.flattenColumn(column);
|
|
51
|
+
}
|
|
52
|
+
flattenColumn(column) {
|
|
53
|
+
if (column.children) for (const childColumn of column.children) this.flattenColumn(childColumn);
|
|
54
|
+
else {
|
|
55
|
+
this._columnIdx[column.field] = this._flattenedColumns.length;
|
|
56
|
+
this._flattenedColumns.push(column.field);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
format(row) {
|
|
60
|
+
this._formattedRow = {};
|
|
61
|
+
this.formatRow(this._columns, row);
|
|
62
|
+
return this.row();
|
|
63
|
+
}
|
|
64
|
+
calcDepth(columns, row) {
|
|
65
|
+
let maxChildDepth = 1;
|
|
66
|
+
for (const column of columns) if (column.children && row[column.leafID]) {
|
|
67
|
+
let childDepth = 0;
|
|
68
|
+
let childRows = [];
|
|
69
|
+
if (isArray(row[column.leafID])) childRows = row[column.leafID];
|
|
70
|
+
else if (isArray(row[column.leafID].Row)) childRows = row[column.leafID].Row;
|
|
71
|
+
for (const childRow of childRows) childDepth += this.calcDepth(column.children, childRow);
|
|
72
|
+
maxChildDepth = Math.max(maxChildDepth, childDepth);
|
|
73
|
+
}
|
|
74
|
+
return maxChildDepth;
|
|
75
|
+
}
|
|
76
|
+
formatCell(column, cell, maxChildDepth) {
|
|
77
|
+
if (column.children) {
|
|
78
|
+
let childDepth = 0;
|
|
79
|
+
if (!isArray(cell)) if (isArray(cell.Row)) cell = cell.Row;
|
|
80
|
+
else cell = [cell];
|
|
81
|
+
for (const row of cell) childDepth = Math.max(childDepth, this.formatRow(column.children, row));
|
|
82
|
+
} else {
|
|
83
|
+
if (column.isSet) cell = JSON.stringify(cell.Item);
|
|
84
|
+
if (this._formattedRow[column.field] === void 0) this._formattedRow[column.field] = "" + (cell === void 0 ? "" : this._renderHtml ? cell : safeEncode(cell));
|
|
85
|
+
else {
|
|
86
|
+
this._formattedRow[column.field] += LINE_SPLITTER;
|
|
87
|
+
this._formattedRow[column.field] += "" + (cell === void 0 ? "" : this._renderHtml ? cell : safeEncode(cell));
|
|
88
|
+
}
|
|
89
|
+
if (maxChildDepth > 1) {
|
|
90
|
+
const paddingArr = [];
|
|
91
|
+
paddingArr.length = maxChildDepth;
|
|
92
|
+
const padding = paddingArr.join(LINE_SPLITTER2);
|
|
93
|
+
this._formattedRow[column.field] += padding;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
formatRow(columns, row = [], rowIdx = 0) {
|
|
98
|
+
const maxChildDepth = this.calcDepth(columns, row);
|
|
99
|
+
for (const column of columns) this.formatCell(column, row[column.leafID], maxChildDepth);
|
|
100
|
+
return maxChildDepth;
|
|
101
|
+
}
|
|
102
|
+
row() {
|
|
103
|
+
const retVal = {};
|
|
104
|
+
for (const column of this._flattenedColumns) retVal[column] = this._formattedRow[column];
|
|
105
|
+
return retVal;
|
|
106
|
+
}
|
|
133
107
|
};
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/DBStore.ts
|
|
111
|
+
var DBStore = class {
|
|
112
|
+
_db;
|
|
113
|
+
Model;
|
|
114
|
+
idProperty;
|
|
115
|
+
constructor(db) {
|
|
116
|
+
this._db = db;
|
|
117
|
+
}
|
|
118
|
+
_renderHtml = true;
|
|
119
|
+
renderHtml(_) {
|
|
120
|
+
this._renderHtml = _;
|
|
121
|
+
}
|
|
122
|
+
db2Columns(sortable, fields, prefix = "", formatter, renderCell) {
|
|
123
|
+
if (!fields) return [];
|
|
124
|
+
return fields.map((field, idx) => {
|
|
125
|
+
const column = {
|
|
126
|
+
label: field.label(),
|
|
127
|
+
leafID: "" + idx,
|
|
128
|
+
field: prefix + idx,
|
|
129
|
+
idx,
|
|
130
|
+
className: "resultGridCell",
|
|
131
|
+
sortable,
|
|
132
|
+
isSet: false
|
|
133
|
+
};
|
|
134
|
+
switch (field.type()) {
|
|
135
|
+
case "nested":
|
|
136
|
+
column.children = this.db2Columns(false, field.children(), prefix + idx + "_", formatter);
|
|
137
|
+
column.sortable = false;
|
|
138
|
+
break;
|
|
139
|
+
default:
|
|
140
|
+
column.formatter = formatter;
|
|
141
|
+
column.renderCell = renderCell;
|
|
142
|
+
}
|
|
143
|
+
return column;
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
columns(sortable, formatter, renderCell) {
|
|
147
|
+
return this.db2Columns(sortable, this._db.fields(), "", formatter, renderCell);
|
|
148
|
+
}
|
|
149
|
+
getIdentity(object) {
|
|
150
|
+
return object.__hpcc_id;
|
|
151
|
+
}
|
|
152
|
+
get(row) {
|
|
153
|
+
return this._db.row(row + 1);
|
|
154
|
+
}
|
|
155
|
+
_fetchRange(opts) {
|
|
156
|
+
const rowFormatter = new RowFormatter(this.columns(false), this._renderHtml);
|
|
157
|
+
return this._db.data().slice(opts.start, opts.end).map((row, idx) => {
|
|
158
|
+
return {
|
|
159
|
+
...rowFormatter.format(row),
|
|
160
|
+
__hpcc_id: opts.start + idx,
|
|
161
|
+
__origRow: row
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
fetchRange(opts) {
|
|
166
|
+
const data = this._fetchRange(opts);
|
|
167
|
+
const retVal = new Deferred();
|
|
168
|
+
retVal.totalLength = new Deferred();
|
|
169
|
+
retVal.resolve(data);
|
|
170
|
+
retVal.totalLength.resolve(this._db.length() - 1);
|
|
171
|
+
return retVal;
|
|
172
|
+
}
|
|
173
|
+
sort(opts) {
|
|
174
|
+
this._db.data().sort((l, r) => {
|
|
175
|
+
for (const item of opts) {
|
|
176
|
+
const idx = item.property;
|
|
177
|
+
if (l[idx] === void 0 && r[idx] !== void 0 || l[idx] < r[idx]) return item.descending ? 1 : -1;
|
|
178
|
+
if (l[idx] !== void 0 && r[idx] === void 0 || l[idx] > r[idx]) return item.descending ? -1 : 1;
|
|
179
|
+
}
|
|
180
|
+
return 0;
|
|
181
|
+
});
|
|
182
|
+
return this;
|
|
183
|
+
}
|
|
211
184
|
};
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
185
|
+
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/Common.ts
|
|
188
|
+
var Common = class extends HTMLWidget {
|
|
189
|
+
_columns = [];
|
|
190
|
+
_store = new DBStore(this._db);
|
|
191
|
+
_dgridDiv;
|
|
192
|
+
_dgrid;
|
|
193
|
+
_prevPaging;
|
|
194
|
+
_prevSortBy;
|
|
195
|
+
_prevSortByDescending;
|
|
196
|
+
_prevMultiSelect;
|
|
197
|
+
constructor() {
|
|
198
|
+
super();
|
|
199
|
+
this._tag = "div";
|
|
200
|
+
}
|
|
201
|
+
formatSortBy() {
|
|
202
|
+
const idx = this.columns().indexOf(this.sortBy());
|
|
203
|
+
return idx >= 0 ? [{
|
|
204
|
+
property: idx.toString(),
|
|
205
|
+
descending: this.sortByDescending()
|
|
206
|
+
}] : void 0;
|
|
207
|
+
}
|
|
208
|
+
_supressEvents;
|
|
209
|
+
selection(_) {
|
|
210
|
+
if (!arguments.length) {
|
|
211
|
+
const retVal = [];
|
|
212
|
+
for (const id in this._dgrid.selection) if (this._dgrid.selection[id]) {
|
|
213
|
+
const storeItem = this._store.get(+id);
|
|
214
|
+
retVal.push(this.rowToObj(storeItem));
|
|
215
|
+
}
|
|
216
|
+
return retVal;
|
|
217
|
+
}
|
|
218
|
+
this._supressEvents = true;
|
|
219
|
+
this._dgrid?.clearSelection();
|
|
220
|
+
let first = true;
|
|
221
|
+
this.data().forEach((row, idx) => {
|
|
222
|
+
if (_.indexOf(row) >= 0) {
|
|
223
|
+
const row$1 = this._dgrid?.row(idx);
|
|
224
|
+
if (row$1.element && first) {
|
|
225
|
+
first = false;
|
|
226
|
+
row$1.element.scrollIntoView();
|
|
227
|
+
}
|
|
228
|
+
this._dgrid?.select(idx);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
this._supressEvents = false;
|
|
232
|
+
}
|
|
233
|
+
enter(domNode, element) {
|
|
234
|
+
super.enter(domNode, element);
|
|
235
|
+
this._dgridDiv = element.append("div").attr("class", "flat");
|
|
236
|
+
}
|
|
237
|
+
update(domNode, element) {
|
|
238
|
+
super.update(domNode, element);
|
|
239
|
+
this._store.renderHtml(this.renderHtml());
|
|
240
|
+
if (!this._dgrid || this._prevPaging !== this.pagination() || this._prevSortBy !== this.sortBy() || this._prevSortByDescending !== this.sortByDescending() || this._prevMultiSelect !== this.multiSelect()) {
|
|
241
|
+
this._prevPaging = this.pagination();
|
|
242
|
+
this._prevSortBy = this.sortBy();
|
|
243
|
+
this._prevSortByDescending = this.sortByDescending();
|
|
244
|
+
this._prevMultiSelect = this.multiSelect();
|
|
245
|
+
if (this._dgrid) {
|
|
246
|
+
this._dgrid.destroy();
|
|
247
|
+
this._dgridDiv = element.append("div").attr("class", "flat");
|
|
248
|
+
}
|
|
249
|
+
this._dgrid = new (this._prevPaging ? PagingGrid : Grid)({
|
|
250
|
+
columns: this._columns,
|
|
251
|
+
collection: this._store,
|
|
252
|
+
sort: this.formatSortBy(),
|
|
253
|
+
selectionMode: this.multiSelect() ? "extended" : "single",
|
|
254
|
+
deselectOnRefresh: true,
|
|
255
|
+
cellNavigation: false,
|
|
256
|
+
pagingLinks: 1,
|
|
257
|
+
pagingTextBox: true,
|
|
258
|
+
previousNextArrows: true,
|
|
259
|
+
firstLastArrows: true,
|
|
260
|
+
rowsPerPage: this.pageSize(),
|
|
261
|
+
pageSizeOptions: [
|
|
262
|
+
1,
|
|
263
|
+
10,
|
|
264
|
+
25,
|
|
265
|
+
50,
|
|
266
|
+
100,
|
|
267
|
+
1e3
|
|
268
|
+
]
|
|
269
|
+
}, this._dgridDiv.node());
|
|
270
|
+
this._dgrid.on("dgrid-select", (evt) => {
|
|
271
|
+
if (this._supressEvents) return;
|
|
272
|
+
if (evt.rows && evt.rows.length && evt.rows[0].data) this.click(this.rowToObj(evt.rows[0].data.__origRow), "", true, { selection: this.selection() });
|
|
273
|
+
});
|
|
274
|
+
this._dgrid.on("dgrid-deselect", (evt) => {
|
|
275
|
+
if (this._supressEvents) return;
|
|
276
|
+
if (evt.rows && evt.rows.length && evt.rows[0].data) this.click(this.rowToObj(evt.rows[0].data.__origRow), "", false, { selection: this.selection() });
|
|
277
|
+
});
|
|
278
|
+
this._dgrid.refresh({});
|
|
279
|
+
}
|
|
280
|
+
this._dgrid.noDataMessage = `<span class='dojoxGridNoData'>${this.noDataMessage()}</span>`;
|
|
281
|
+
this._dgrid.loadingMessage = `<span class='dojoxGridNoData'>${this.loadingMessage()}</span>`;
|
|
282
|
+
this._dgridDiv.style("width", this.width() + "px").style("height", this.height() - 2 + "px");
|
|
283
|
+
this._dgrid.resize();
|
|
284
|
+
}
|
|
285
|
+
exit(domNode, element) {
|
|
286
|
+
delete this._prevPaging;
|
|
287
|
+
if (this._dgrid) {
|
|
288
|
+
this._dgrid.destroy();
|
|
289
|
+
delete this._dgrid;
|
|
290
|
+
}
|
|
291
|
+
super.exit(domNode, element);
|
|
292
|
+
}
|
|
293
|
+
click(row, col, sel, more) {}
|
|
317
294
|
};
|
|
318
|
-
__name(_Common, "Common");
|
|
319
|
-
let Common = _Common;
|
|
320
295
|
Common.prototype._class += " dgrid_Common";
|
|
321
296
|
Common.prototype.publish("noDataMessage", "...empty...", "string", "No Data Message");
|
|
322
297
|
Common.prototype.publish("loadingMessage", "loading...", "string", "Loading Message");
|
|
@@ -324,379 +299,323 @@ Common.prototype.publish("pagination", false, "boolean", "Enable paging");
|
|
|
324
299
|
Common.prototype.publish("pageSize", 25, "number", "Page size");
|
|
325
300
|
Common.prototype.publish("sortable", false, "boolean", "Enable sorting by column");
|
|
326
301
|
Common.prototype.publish("sortBy", null, "set", "Default 'sort by' Column ID", function() {
|
|
327
|
-
|
|
302
|
+
return this.columns();
|
|
328
303
|
}, { optional: true });
|
|
329
|
-
Common.prototype.publish("sortByDescending", false, "boolean", "Default 'sort by' descending", void 0, { disable:
|
|
304
|
+
Common.prototype.publish("sortByDescending", false, "boolean", "Default 'sort by' descending", void 0, { disable: (self) => !self.sortBy() });
|
|
330
305
|
Common.prototype.publish("multiSelect", false, "boolean", "Multiple Selection");
|
|
331
306
|
Common.prototype.publish("renderHtml", true, "boolean", "Render HTML");
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
307
|
+
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/DatasourceStore.ts
|
|
310
|
+
var DatasourceCache = class {
|
|
311
|
+
_datasource;
|
|
312
|
+
_prevHash;
|
|
313
|
+
_fetchCache = {};
|
|
314
|
+
constructor(datasource) {
|
|
315
|
+
this._datasource = datasource;
|
|
316
|
+
}
|
|
317
|
+
validateCache() {
|
|
318
|
+
const hash = this.hash();
|
|
319
|
+
if (this._prevHash !== hash) {
|
|
320
|
+
this._prevHash = hash;
|
|
321
|
+
this._fetchCache = {};
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
id() {
|
|
325
|
+
return this._datasource.id();
|
|
326
|
+
}
|
|
327
|
+
hash() {
|
|
328
|
+
return this._datasource.hash();
|
|
329
|
+
}
|
|
330
|
+
label() {
|
|
331
|
+
return this._datasource.label();
|
|
332
|
+
}
|
|
333
|
+
outFields() {
|
|
334
|
+
return this._datasource.outFields();
|
|
335
|
+
}
|
|
336
|
+
total() {
|
|
337
|
+
return this._datasource.total();
|
|
338
|
+
}
|
|
339
|
+
fetch(from, count) {
|
|
340
|
+
this.validateCache();
|
|
341
|
+
const cacheID = `${from}->${count}`;
|
|
342
|
+
let retVal = this._fetchCache[cacheID];
|
|
343
|
+
if (!retVal) {
|
|
344
|
+
retVal = this._datasource.fetch(from, count);
|
|
345
|
+
this._fetchCache[cacheID] = retVal;
|
|
346
|
+
}
|
|
347
|
+
return retVal;
|
|
348
|
+
}
|
|
371
349
|
};
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
const retVal = new Deferred();
|
|
437
|
-
this._request(options.start, options.end).then((response) => retVal.resolve(response));
|
|
438
|
-
return new QueryResults(retVal.then((response) => response.data), {
|
|
439
|
-
totalLength: retVal.then((response) => response.totalLength)
|
|
440
|
-
});
|
|
441
|
-
}
|
|
350
|
+
var DatasourceStore = class {
|
|
351
|
+
_datasource;
|
|
352
|
+
_columnsIdx = {};
|
|
353
|
+
_columns;
|
|
354
|
+
rowFormatter;
|
|
355
|
+
constructor(datasource, renderHtml) {
|
|
356
|
+
this._datasource = new DatasourceCache(datasource);
|
|
357
|
+
this._columnsIdx = {};
|
|
358
|
+
this._columns = this.db2Columns(this._datasource.outFields()).map((column, idx) => {
|
|
359
|
+
this._columnsIdx[column.field] = idx;
|
|
360
|
+
return column;
|
|
361
|
+
});
|
|
362
|
+
this.rowFormatter = new RowFormatter(this._columns, renderHtml);
|
|
363
|
+
}
|
|
364
|
+
columns() {
|
|
365
|
+
return this._columns;
|
|
366
|
+
}
|
|
367
|
+
db2Columns(fields, prefix = "") {
|
|
368
|
+
if (!fields) return [];
|
|
369
|
+
return fields.map((field, idx) => {
|
|
370
|
+
const column = {
|
|
371
|
+
field: prefix + field.id,
|
|
372
|
+
leafID: field.id,
|
|
373
|
+
label: field.id,
|
|
374
|
+
idx,
|
|
375
|
+
className: "resultGridCell",
|
|
376
|
+
sortable: true,
|
|
377
|
+
isSet: false
|
|
378
|
+
};
|
|
379
|
+
if (field.type === "dataset") column.children = this.db2Columns(field.children, prefix + field.id + "_");
|
|
380
|
+
else column.formatter = (cell, row) => {
|
|
381
|
+
switch (typeof cell) {
|
|
382
|
+
case "string": return cell.replace(/\t/g, " ");
|
|
383
|
+
}
|
|
384
|
+
return cell;
|
|
385
|
+
};
|
|
386
|
+
return column;
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
getIdentity(row) {
|
|
390
|
+
return row.__hpcc_id;
|
|
391
|
+
}
|
|
392
|
+
_request(start, end) {
|
|
393
|
+
if (!this._datasource) return Promise.resolve({
|
|
394
|
+
totalLength: 0,
|
|
395
|
+
data: []
|
|
396
|
+
});
|
|
397
|
+
return this._datasource.fetch(start, end - start).then((response) => {
|
|
398
|
+
return {
|
|
399
|
+
totalLength: this._datasource.total(),
|
|
400
|
+
data: response.map((row, idx) => {
|
|
401
|
+
const formattedRow = this.rowFormatter.format(row);
|
|
402
|
+
formattedRow.__hpcc_id = start + idx;
|
|
403
|
+
formattedRow.__origRow = row;
|
|
404
|
+
return formattedRow;
|
|
405
|
+
})
|
|
406
|
+
};
|
|
407
|
+
});
|
|
408
|
+
}
|
|
409
|
+
fetchRange(options) {
|
|
410
|
+
const retVal = new Deferred();
|
|
411
|
+
this._request(options.start, options.end).then((response) => retVal.resolve(response));
|
|
412
|
+
return new QueryResults(retVal.then((response) => response.data), { totalLength: retVal.then((response) => response.totalLength) });
|
|
413
|
+
}
|
|
442
414
|
};
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
}
|
|
478
|
-
} else {
|
|
479
|
-
if (callback) {
|
|
480
|
-
callback(w);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
click(row, col, sel) {
|
|
486
|
-
}
|
|
415
|
+
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/DatasourceTable.ts
|
|
418
|
+
var DatasourceTable = class extends Common {
|
|
419
|
+
_prevDatasource;
|
|
420
|
+
constructor() {
|
|
421
|
+
super();
|
|
422
|
+
}
|
|
423
|
+
invalidate() {
|
|
424
|
+
delete this._prevDatasource;
|
|
425
|
+
return this;
|
|
426
|
+
}
|
|
427
|
+
enter(domNode, element) {
|
|
428
|
+
super.enter(domNode, element);
|
|
429
|
+
}
|
|
430
|
+
update(domNode, element) {
|
|
431
|
+
super.update(domNode, element);
|
|
432
|
+
}
|
|
433
|
+
render(callback) {
|
|
434
|
+
return super.render((w) => {
|
|
435
|
+
if (this._prevDatasource !== this.datasource()) {
|
|
436
|
+
this._dgrid.set("collection", new Memory());
|
|
437
|
+
this._dgrid.set("columns", []);
|
|
438
|
+
this._prevDatasource = this.datasource();
|
|
439
|
+
if (this._prevDatasource) {
|
|
440
|
+
const store = new DatasourceStore(this._prevDatasource, this.renderHtml());
|
|
441
|
+
this._dgrid.set("columns", store.columns());
|
|
442
|
+
this._dgrid.set("collection", store);
|
|
443
|
+
if (callback) callback(w);
|
|
444
|
+
} else if (callback) callback(w);
|
|
445
|
+
} else if (callback) callback(w);
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
click(row, col, sel) {}
|
|
487
449
|
};
|
|
488
|
-
__name(_DatasourceTable, "DatasourceTable");
|
|
489
|
-
let DatasourceTable = _DatasourceTable;
|
|
490
450
|
DatasourceTable.prototype._class += " dgrid_DatasourceTable";
|
|
491
451
|
DatasourceTable.prototype.publish("datasource", null, "object", "Datasource");
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
}
|
|
452
|
+
|
|
453
|
+
//#endregion
|
|
454
|
+
//#region src/Table.ts
|
|
455
|
+
var ColumnFormat = class extends PropertyExt {
|
|
456
|
+
_owner;
|
|
457
|
+
constructor() {
|
|
458
|
+
super();
|
|
459
|
+
}
|
|
460
|
+
owner(_) {
|
|
461
|
+
if (!arguments.length) return this._owner;
|
|
462
|
+
this._owner = _;
|
|
463
|
+
return this;
|
|
464
|
+
}
|
|
465
|
+
valid() {
|
|
466
|
+
return !!this.column();
|
|
467
|
+
}
|
|
468
|
+
formatterFunc() {
|
|
469
|
+
const defaultFormatter = this._owner.formatterFunc();
|
|
470
|
+
if (this.valid() && this.format()) {
|
|
471
|
+
const numberFormatter = format(this.format());
|
|
472
|
+
return function(cell, row) {
|
|
473
|
+
if (typeof cell === "number") return numberFormatter(cell);
|
|
474
|
+
return defaultFormatter.call(this, cell, row);
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
return defaultFormatter;
|
|
478
|
+
}
|
|
479
|
+
renderCellFunc() {
|
|
480
|
+
const defaultRenderCell = this._owner.renderCellFunc();
|
|
481
|
+
const defaultFormatter = this.formatterFunc();
|
|
482
|
+
if (this.valid() && this.paletteID()) {
|
|
483
|
+
const columns = this._owner.columns();
|
|
484
|
+
const palette = Palette.rainbow(this.paletteID());
|
|
485
|
+
const min = this.min();
|
|
486
|
+
const max = this.max();
|
|
487
|
+
const valueColIdx = this.valueColumn() ? columns.indexOf(this.valueColumn()) : void 0;
|
|
488
|
+
return function(row, cell, cellElement) {
|
|
489
|
+
if (defaultRenderCell) defaultRenderCell.call(this, row, cell, cellElement);
|
|
490
|
+
const background = palette(valueColIdx ? row.__origRow[valueColIdx] : cell, min, max);
|
|
491
|
+
const cellText = defaultFormatter.call(this, cell, row);
|
|
492
|
+
select(cellElement).style("background", background).style("color", background && Palette.textColor(background)).text(cellText?.html ?? cellText ?? cell);
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
return defaultRenderCell;
|
|
496
|
+
}
|
|
538
497
|
};
|
|
539
|
-
__name(_ColumnFormat, "ColumnFormat");
|
|
540
|
-
let ColumnFormat = _ColumnFormat;
|
|
541
498
|
ColumnFormat.prototype._class += " dgrid_Table.ColumnFormat";
|
|
542
499
|
ColumnFormat.prototype.publish("column", null, "set", "Column", function() {
|
|
543
|
-
|
|
500
|
+
return this._owner.columns();
|
|
544
501
|
}, { optional: true });
|
|
545
502
|
ColumnFormat.prototype.publish("width", null, "number", "Width", null, { optional: true });
|
|
546
503
|
ColumnFormat.prototype.publish("format", null, "string", "Format (d3-format)", null, { optional: true });
|
|
547
504
|
ColumnFormat.prototype.publish("paletteID", null, "set", "Color palette for this widget", ["", ...Palette.rainbow("default").switch()], { optional: true });
|
|
548
|
-
ColumnFormat.prototype.publish("min", 0, "number", "Min Value", null, { disable:
|
|
549
|
-
ColumnFormat.prototype.publish("max", 100, "number", "Max Value", null, { disable:
|
|
505
|
+
ColumnFormat.prototype.publish("min", 0, "number", "Min Value", null, { disable: (cf) => !cf.paletteID() });
|
|
506
|
+
ColumnFormat.prototype.publish("max", 100, "number", "Max Value", null, { disable: (cf) => !cf.paletteID() });
|
|
550
507
|
ColumnFormat.prototype.publish("valueColumn", null, "set", "Column", function() {
|
|
551
|
-
|
|
552
|
-
}, {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
formatterFunc() {
|
|
658
|
-
return function(cell, row) {
|
|
659
|
-
switch (typeof cell) {
|
|
660
|
-
case "string":
|
|
661
|
-
return {
|
|
662
|
-
html: cell.replace(/\t/g, " ").trim()
|
|
663
|
-
};
|
|
664
|
-
case "undefined":
|
|
665
|
-
return "";
|
|
666
|
-
}
|
|
667
|
-
return cell;
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
renderCellFunc() {
|
|
671
|
-
return void 0;
|
|
672
|
-
}
|
|
673
|
-
// Events ---
|
|
674
|
-
click(row, col, sel) {
|
|
675
|
-
}
|
|
508
|
+
return this._owner.columns();
|
|
509
|
+
}, {
|
|
510
|
+
optional: true,
|
|
511
|
+
disable: (cf) => !cf.paletteID()
|
|
512
|
+
});
|
|
513
|
+
var Table = class extends Common {
|
|
514
|
+
_prevColsHash;
|
|
515
|
+
_prevFieldsHash;
|
|
516
|
+
_colsRefresh = false;
|
|
517
|
+
_dataRefresh = false;
|
|
518
|
+
constructor() {
|
|
519
|
+
super();
|
|
520
|
+
}
|
|
521
|
+
fields(_) {
|
|
522
|
+
const retVal = super.fields.apply(this, arguments);
|
|
523
|
+
if (arguments.length) {
|
|
524
|
+
const hash = hashSum({ _ });
|
|
525
|
+
if (this._prevFieldsHash !== hash) {
|
|
526
|
+
this._prevFieldsHash = hash;
|
|
527
|
+
this._colsRefresh = true;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
return retVal;
|
|
531
|
+
}
|
|
532
|
+
columns(_, asDefault) {
|
|
533
|
+
const retVal = super.columns.apply(this, arguments);
|
|
534
|
+
if (arguments.length) {
|
|
535
|
+
const hash = hashSum({ _ });
|
|
536
|
+
if (this._prevColsHash !== hash) {
|
|
537
|
+
this._prevColsHash = hash;
|
|
538
|
+
this._colsRefresh = true;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
return retVal;
|
|
542
|
+
}
|
|
543
|
+
data(_) {
|
|
544
|
+
const retVal = super.data.apply(this, arguments);
|
|
545
|
+
if (arguments.length) this._dataRefresh = true;
|
|
546
|
+
return retVal;
|
|
547
|
+
}
|
|
548
|
+
enter(domNode, element) {
|
|
549
|
+
super.enter(domNode, element);
|
|
550
|
+
}
|
|
551
|
+
guessWidth(columns, data) {
|
|
552
|
+
const sortablePadding = this.sortable() ? 12 : 0;
|
|
553
|
+
for (const column of columns) if (column.children) {
|
|
554
|
+
let sampleData = [];
|
|
555
|
+
for (let i = 0; i < Math.min(3, data.length); ++i) sampleData = sampleData.concat(data[i][column.idx]);
|
|
556
|
+
this.guessWidth(column.children, sampleData);
|
|
557
|
+
} else column.width = data.reduce((prevVal, row) => {
|
|
558
|
+
const cell = ("" + row[column.idx]).trim();
|
|
559
|
+
return Math.max(prevVal, this.textSize(cell).width);
|
|
560
|
+
}, this.textSize("" + column.label, void 0, void 0, true).width + sortablePadding) + 8;
|
|
561
|
+
}
|
|
562
|
+
_prevHash;
|
|
563
|
+
update(domNode, element) {
|
|
564
|
+
super.update(domNode, element);
|
|
565
|
+
const hash = this.hashSum();
|
|
566
|
+
if (this._prevHash !== hash) {
|
|
567
|
+
this._prevHash = hash;
|
|
568
|
+
this._colsRefresh = true;
|
|
569
|
+
}
|
|
570
|
+
if (this._colsRefresh) {
|
|
571
|
+
this._columns = this._store.columns(this.sortable(), this.formatterFunc(), this.renderCellFunc());
|
|
572
|
+
switch (this.columnWidth()) {
|
|
573
|
+
case "auto":
|
|
574
|
+
const tenRows = this.data().filter((row, idx) => idx < 10);
|
|
575
|
+
this.guessWidth(this._columns, tenRows);
|
|
576
|
+
break;
|
|
577
|
+
}
|
|
578
|
+
const columns = this.columns();
|
|
579
|
+
for (const columnFormat of this.columnFormats()) if (columnFormat.valid()) {
|
|
580
|
+
const colIdx = columns.indexOf(columnFormat.column());
|
|
581
|
+
if (this._columns[colIdx]) {
|
|
582
|
+
this._columns[colIdx].hidden = columnFormat.width() === 0;
|
|
583
|
+
this._columns[colIdx].width = columnFormat.width() || this._columns[colIdx].width;
|
|
584
|
+
this._columns[colIdx].formatter = columnFormat.formatterFunc();
|
|
585
|
+
this._columns[colIdx].renderCell = columnFormat.renderCellFunc();
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
this._dgrid.set("columns", this._columns.filter((col) => !col.hidden));
|
|
589
|
+
this._colsRefresh = false;
|
|
590
|
+
}
|
|
591
|
+
if (this._colsRefresh || this._dataRefresh) {
|
|
592
|
+
if (this._colsRefresh) this._dgrid.refresh({});
|
|
593
|
+
else this._dgrid.refresh();
|
|
594
|
+
this._colsRefresh = false;
|
|
595
|
+
this._dataRefresh = false;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
exit(domNode, element) {
|
|
599
|
+
delete this._prevColsHash;
|
|
600
|
+
delete this._prevFieldsHash;
|
|
601
|
+
super.exit(domNode, element);
|
|
602
|
+
}
|
|
603
|
+
formatterFunc() {
|
|
604
|
+
return function(cell, row) {
|
|
605
|
+
switch (typeof cell) {
|
|
606
|
+
case "string": return { html: cell.replace(/\t/g, " ").trim() };
|
|
607
|
+
case "undefined": return "";
|
|
608
|
+
}
|
|
609
|
+
return cell;
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
renderCellFunc() {}
|
|
613
|
+
click(row, col, sel) {}
|
|
676
614
|
};
|
|
677
|
-
__name(_Table, "Table");
|
|
678
|
-
let Table = _Table;
|
|
679
615
|
Table.prototype._class += " dgrid_Table";
|
|
680
616
|
Table.prototype.publish("columnWidth", "auto", "set", "Default column width", ["auto", "none"]);
|
|
681
617
|
Table.prototype.publish("columnFormats", [], "propertyArray", "Source Columns", null, { autoExpand: ColumnFormat });
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
Common,
|
|
686
|
-
DBStore,
|
|
687
|
-
DatasourceCache,
|
|
688
|
-
DatasourceStore,
|
|
689
|
-
DatasourceTable,
|
|
690
|
-
Deferred,
|
|
691
|
-
Grid,
|
|
692
|
-
Memory,
|
|
693
|
-
PKG_NAME,
|
|
694
|
-
PKG_VERSION,
|
|
695
|
-
PagingGrid,
|
|
696
|
-
QueryResults,
|
|
697
|
-
RowFormatter,
|
|
698
|
-
Table,
|
|
699
|
-
domConstruct
|
|
700
|
-
};
|
|
701
|
-
//# sourceMappingURL=index.js.map
|
|
702
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var i=document.createElement("style");i.appendChild(document.createTextNode(".dijitTooltip{position:absolute;z-index:2000;display:block;left:0;top:-10000px;overflow:visible;font-family:Verdana,Geneva,sans-serif;font-size:12px}.dijitTooltipContainer{border:solid black 2px;background:#b8b5b5;color:#000;font-size:small}.dijitTooltipFocusNode{padding:2px}.dijitTooltipConnector{position:absolute}.dj_a11y .dijitTooltipConnector,.dijitTooltipData{display:none}.dijitTooltip{background:transparent}.dijitTooltipContainer{background-color:#424242;opacity:1;-ms-filter:none;filter:none;padding:4px 8px;border-radius:3px}.dijitTooltip .dijitTooltipContainer{color:#fff;border:0 none}.dijitTooltipConnector{z-index:2;width:auto;height:auto;opacity:1;-ms-filter:none;filter:none}.dijitTooltipABRight .dijitTooltipConnector{left:auto!important;right:8px}.dijitTooltipBelow{padding-top:4px}.dijitTooltipBelow .dijitTooltipConnector{top:0;left:8px;border-bottom:4px solid #424242;border-left:4px solid transparent;border-right:4px solid transparent;border-top:0}.dijitTooltipAbove{padding-bottom:4px}.dijitTooltipAbove .dijitTooltipConnector{bottom:0;left:8px;border-top:4px solid #424242;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:0}.dijitTooltipLeft{padding-right:4px}.dijitTooltipLeft .dijitTooltipConnector{right:0;border-left:4px solid #424242;border-bottom:4px solid transparent;border-top:4px solid transparent;border-right:0}.dijitTooltipRight{padding-left:4px}.dijitTooltipRight .dijitTooltipConnector{left:0;border-bottom:4px solid transparent;border-top:4px solid transparent;border-right:4px solid #424242}.dgrid{position:relative;overflow:hidden;border:1px solid #ddd;height:30em;display:block}.dgrid-header{background-color:#eee}.dgrid-header-row{position:absolute;right:17px;left:0}.dgrid-header-scroll{position:absolute;top:0;right:0}.dgrid-footer{position:absolute;bottom:0;width:100%}.dgrid-header-hidden{font-size:0;height:0!important;border-top:none!important;border-bottom:none!important;margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important}.dgrid-footer-hidden{display:none}.dgrid-sortable{cursor:pointer}.dgrid-header,.dgrid-header-row,.dgrid-footer{overflow:hidden;background-color:#eee}.dgrid-row-table{border-collapse:collapse;border:none;table-layout:fixed;empty-cells:show;width:100%;height:100%}.dgrid-cell{padding:3px;text-align:left;overflow:hidden;vertical-align:top;border:1px solid #ddd;border-top-style:none;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;text-overflow:ellipsis;white-space:nowrap}.dgrid-content{position:relative;height:99%}.dgrid-scroller{overflow-x:auto;overflow-y:scroll;position:absolute;top:0;margin-top:25px;bottom:0;width:100%}.dgrid-preload{font-size:0;line-height:0}.dgrid-loading{position:relative;height:100%}.dgrid-above{position:absolute;bottom:0}.ui-icon{width:12px;height:16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAMAAADYSUr5AAAA7VBMVEUkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiTww4gUAAAATnRSTlMAGBAyBAhQv4OZLiJUcEBmYBoSzQwgPBZCSEoeWiYwUiyFNIeBw2rJz8c4RBy9uXyrtaWNqa2zKP2fJO8KBgKPo2KVoa9s351GPm5+kWho0kj9AAAPhUlEQVR4nO1djWLbthEGyUiq5YSSLXtp7FpLOmfzkmxr126tmi2p03RJ1/Xe/3EGgARxPyAgRbIk2/hkSz4CJO4+HsE7AJSVysjI2AMUUOxahZ2iANhzBtZWr4BoIRSYAVN5u4QwDwQDRbcwfUi5KS3wFuDmFnQLa4Dtb//cqktwD5QEFFwfUs7PoCCA7y4bEJVFizcIob8KmhAplwwqVjt+9FBl3uINQniwEiryEyw9JHqGpQdEFNi+B4QQ7QOiHhysIPoAxUqxvdvvA9K42bsAv4S2fxfYOe57IJSRkZGRkZGxx7jxSHDHcRBXQMTyIjInBgHwBJ/bEx8PEANC+uhbpSSggCBAVODVabpI1S/k4WLZpTn6NpMhoX9Y40hxYERFpMcqUs4AloCtDQdID1YhnyXZ2hLjAYWiO9Dy1PDB7tPhIqLx+uMB8grZaR+Qxl2/C2RkZGRkZGRk7A7rBf7J0DR5/LUTjzUPIPS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5hD+eYcYwDcAnewOotrZ4OtrPDucqi/LRX0/RR4qx7Nn4U8g+qjffvuN6Gf+nC85vwauHjaYyubqvWYKY4VEfSUMitdnBCT1Ue63R5439m+OgCn6DroAAaHPVQxKth/wkJgHmG8bmQMsT0D6EjDfvhVRKO3ywOQUgRA7nmL1uawZmHf1k+DPBwQ6NdcJ+k6Md1LA5f5ONdhJ8vZ5J0vLHT99srkGOjmJbd/G1r2Nriqnse1AZt1AalU5jW2HsuuG0qvKGRkZGRkZGRG0gcONyXsP9v8D0/IdJADiBNiXl3327WRGgOL/9HC/0XwlIURkRhC4tz6Z/fu7fUf2gHvfB9z3u0BGRkZGRkbGplHcnkgguQoSqtUXuhbs/wPtMwqV0HUJAvj5vk32b8IDuL23yn7qAXZ5u32hbRX7d3o82Df1FZXvbh9QOfhyxldr/+3xgXU9oKmvsHyr7F/XA269/eveBXrsv7N9QALe/tvjA0kPWAXGbvebkbHn+D/J5nMcHzx1UAAAAABJRU5ErkJggg==)}.dgrid-sort-arrow{background-position:-64px -16px;display:block;float:right;margin:0 4px 0 5px;height:12px}.dgrid-sort-up .dgrid-sort-arrow{background-position:0px -16px}.dgrid-selected{background-color:#bbb}.dgrid-input{width:99%}html.has-mozilla .dgrid .dgrid-row:focus,html.has-mozilla .dgrid .dgrid-cell:focus{outline:1px dotted}html.has-mozilla .dgrid-focus{outline-offset:-1px}.dgrid-scrollbar-measure{width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px}.dgrid-autoheight{height:auto}.dgrid-autoheight .dgrid-scroller{position:relative;overflow-y:hidden}.dgrid-autoheight .dgrid-header-scroll{display:none}.dgrid-autoheight .dgrid-header{right:0}.dgrid-column-set{overflow:hidden;width:100%;position:relative;height:100%;-ms-touch-action:pan-y;touch-action:pan-y}.dgrid-column-set-cell{vertical-align:top;height:100%}.dgrid-column-set-scroller-container{font-size:0;position:absolute;bottom:0}.dgrid-autoheight .dgrid-column-set-scroller-container{position:relative}.dgrid-column-set-scroller{display:inline-block;overflow-x:auto;overflow-y:hidden}.dgrid-column-set-scroller-content{height:1px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.dgrid-expando-icon{width:16px;height:16px}.dgrid-tree-container{-webkit-transition-duration:.3s;-moz-transition-duration:.3s;-o-transition-duration:.3s;-ms-transition-duration:.3s;transition-duration:.3s;overflow:hidden}.dgrid-tree-container.dgrid-tree-resetting{-webkit-transition-duration:0;-moz-transition-duration:0;-o-transition-duration:0;-ms-transition-duration:0;transition-duration:0}.dgrid-hider-toggle{background-position:0 -192px;background-color:transparent;border:none;cursor:pointer;position:absolute;right:0;top:0}.dgrid-rtl-swap .dgrid-hider-toggle{right:auto;left:0}.dgrid-hider-menu{position:absolute;top:0;right:17px;width:184px;background-color:#fff;border:1px solid #000;z-index:99999;padding:4px;overflow-x:hidden;overflow-y:auto}.dgrid-rtl-swap .dgrid-hider-menu{right:auto;left:17px}.dgrid-hider-menu-row{position:relative;padding:2px}.dgrid-hider-menu-check{position:absolute;top:2px;left:2px;padding:0}.dgrid-hider-menu-label{display:block;padding-left:20px}.dgrid-header .dojoDndTarget .dgrid-cell{display:table-cell}.dgrid-header .dojoDndItemBefore{border-left:2px dotted #000!important}.dgrid-header .dojoDndItemAfter{border-right:2px dotted #000!important}.dgrid-column-resizer{cursor:col-resize;position:absolute;width:2px;background-color:#666;z-index:1000}.dgrid-resize-handle{height:100px;width:0;position:absolute;right:-4px;top:-4px;cursor:col-resize;z-index:999;border-left:5px solid transparent;outline:none}.dgrid-resize-header-container{height:100%}.dgrid-resize-guard{cursor:col-resize;position:absolute;inset:0}html.has-touch .dgrid-resize-handle{border-left:20px solid transparent}html.has-touch .dgrid-column-resizer{width:2px}.dgrid-resize-header-container{position:relative}.dgrid-header .dgrid-cell{overflow:hidden}.dgrid-spacer-row{height:0}.dgrid-spacer-row th{padding-top:0;padding-bottom:0;border-top:none;border-bottom:none}.dgrid-status{padding:2px}.dgrid-pagination .dgrid-status{float:left}.dgrid-pagination .dgrid-navigation,.dgrid-pagination .dgrid-page-size{float:right}.dgrid-navigation .dgrid-page-link{cursor:pointer;font-weight:700;text-decoration:none;color:inherit;padding:0 4px}.dgrid-first,.dgrid-last,.dgrid-next,.dgrid-previous{font-size:130%}.dgrid-pagination .dgrid-page-disabled{color:#aaa;cursor:default}.dgrid-page-input{margin-top:1px;width:2em;text-align:center}.dgrid-page-size{margin:1px 4px 0}.dgrid-rtl-swap .dgrid-header-row{right:0;left:17px}.dgrid-rtl-swap .dgrid-header-scroll{left:0;right:auto}.dgrid-rtl .dgrid-cell{text-align:right}.dgrid-rtl .dgrid-sort-arrow{float:left;margin:0 5px 0 4px}.dgrid-rtl .ui-icon-triangle-1-e{background-position:-96px -16px}.dgrid-rtl .ui-icon-triangle-1-se{background-position:-80px -16px}.dgrid-rtl .dgrid-pagination .dgrid-status,.dgrid-rtl .dgrid-pagination .dgrid-page-size{float:right}.dgrid-rtl .dgrid-pagination .dgrid-navigation{float:left}.dgrid-rtl.dgrid-autoheight .dgrid-header{left:0}.dgrid_Table .placeholder{border:none;padding:0;overflow:hidden}.dgrid_Table .dgrid-fakeline{border:0px;border-bottom:1px solid rgb(221,221,221);margin:2px -3px}.dgrid_Table .dgrid-sortable .dgrid-sort-arrow.ui-icon{margin:0}")),document.head.appendChild(i)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|
|
618
|
+
|
|
619
|
+
//#endregion
|
|
620
|
+
export { BUILD_VERSION, ColumnFormat, Common, DBStore, DatasourceCache, DatasourceStore, DatasourceTable, Deferred, Grid, Memory, PKG_NAME, PKG_VERSION, PagingGrid, QueryResults, RowFormatter, Table, domConstruct };
|
|
621
|
+
//# sourceMappingURL=index.js.map!function(){try{if("undefined"!=typeof document){var i=document.createElement("style");i.appendChild(document.createTextNode(".dijitTooltip{z-index:2000;font-family:Verdana,Geneva,sans-serif;font-size:12px;display:block;position:absolute;top:-10000px;left:0;overflow:visible}.dijitTooltipContainer{color:#000;background:#b8b5b5;border:2px solid #000;font-size:small}.dijitTooltipFocusNode{padding:2px}.dijitTooltipConnector{position:absolute}.dj_a11y .dijitTooltipConnector,.dijitTooltipData{display:none}.dijitTooltip{background:0 0}.dijitTooltipContainer{opacity:1;-ms-filter:none;filter:none;background-color:#424242;border-radius:3px;padding:4px 8px}.dijitTooltip .dijitTooltipContainer{color:#fff;border:0}.dijitTooltipConnector{z-index:2;opacity:1;-ms-filter:none;filter:none;width:auto;height:auto}.dijitTooltipABRight .dijitTooltipConnector{right:8px;left:auto!important}.dijitTooltipBelow{padding-top:4px}.dijitTooltipBelow .dijitTooltipConnector{border:4px solid #0000;border-top:0;border-bottom-color:#424242;top:0;left:8px}.dijitTooltipAbove{padding-bottom:4px}.dijitTooltipAbove .dijitTooltipConnector{border:4px solid #0000;border-top-color:#424242;border-bottom:0;bottom:0;left:8px}.dijitTooltipLeft{padding-right:4px}.dijitTooltipLeft .dijitTooltipConnector{border:4px solid #0000;border-left-color:#424242;border-right:0;right:0}.dijitTooltipRight{padding-left:4px}.dijitTooltipRight .dijitTooltipConnector{border-top:4px solid #0000;border-bottom:4px solid #0000;border-right:4px solid #424242;left:0}.dgrid{border:1px solid #ddd;height:30em;display:block;position:relative;overflow:hidden}.dgrid-header{background-color:#eee}.dgrid-header-row{position:absolute;left:0;right:17px}.dgrid-header-scroll{position:absolute;top:0;right:0}.dgrid-footer{width:100%;position:absolute;bottom:0}.dgrid-header-hidden{font-size:0;border-top:none!important;border-bottom:none!important;height:0!important;margin-top:0!important;margin-bottom:0!important;padding-top:0!important;padding-bottom:0!important}.dgrid-footer-hidden{display:none}.dgrid-sortable{cursor:pointer}.dgrid-header,.dgrid-header-row,.dgrid-footer{background-color:#eee;overflow:hidden}.dgrid-row-table{border-collapse:collapse;table-layout:fixed;empty-cells:show;border:none;width:100%;height:100%}.dgrid-cell{text-align:left;vertical-align:top;box-sizing:border-box;text-overflow:ellipsis;white-space:nowrap;border:1px solid #ddd;border-top-style:none;padding:3px;overflow:hidden}.dgrid-content{height:99%;position:relative}.dgrid-scroller{width:100%;margin-top:25px;position:absolute;top:0;bottom:0;overflow:auto scroll}.dgrid-preload{font-size:0;line-height:0}.dgrid-loading{height:100%;position:relative}.dgrid-above{position:absolute;bottom:0}.ui-icon{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAADwCAMAAADYSUr5AAAA7VBMVEUkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiQkIiTww4gUAAAATnRSTlMAGBAyBAhQv4OZLiJUcEBmYBoSzQwgPBZCSEoeWiYwUiyFNIeBw2rJz8c4RBy9uXyrtaWNqa2zKP2fJO8KBgKPo2KVoa9s351GPm5+kWho0kj9AAAPhUlEQVR4nO1djWLbthEGyUiq5YSSLXtp7FpLOmfzkmxr126tmi2p03RJ1/Xe/3EGgARxPyAgRbIk2/hkSz4CJO4+HsE7AJSVysjI2AMUUOxahZ2iANhzBtZWr4BoIRSYAVN5u4QwDwQDRbcwfUi5KS3wFuDmFnQLa4Dtb//cqktwD5QEFFwfUs7PoCCA7y4bEJVFizcIob8KmhAplwwqVjt+9FBl3uINQniwEiryEyw9JHqGpQdEFNi+B4QQ7QOiHhysIPoAxUqxvdvvA9K42bsAv4S2fxfYOe57IJSRkZGRkZGxx7jxSHDHcRBXQMTyIjInBgHwBJ/bEx8PEANC+uhbpSSggCBAVODVabpI1S/k4WLZpTn6NpMhoX9Y40hxYERFpMcqUs4AloCtDQdID1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9GtKq/a3rpyCmfQ4WwZmS+kXFVetb115ST48wEf/AGcfG1iw+tWbpbS2vJ3nQxcVr3lH3z5h972FUTLzYpOVk7l5hD+eYcYwDcAnewOotrZ4OtrPDucqi/LRX0/RR4qx7Nn4U8g+qjffvuN6Gf+nC85vwauHjaYyubqvWYKY4VEfSUMitdnBCT1Ue63R5439m+OgCn6DroAAaHPVQxKth/wkJgHmG8bmQMsT0D6EjDfvhVRKO3ywOQUgRA7nmL1uawZmHf1k+DPBwQ6NdcJ+k6Md1LA5f5ONdhJ8vZ5J0vLHT99srkGOjmJbd/G1r2Nriqnse1AZt1AalU5jW2HsuuG0qvKGRkZGRkZGRG0gcONyXsP9v8D0/IdJADiBNiXl3327WRGgOL/9HC/0XwlIURkRhC4tz6Z/fu7fUf2gHvfB9z3u0BGRkZGRkbGplHcnkgguQoSqtUXuhbs/wPtMwqV0HUJAvj5vk32b8IDuL23yn7qAXZ5u32hbRX7d3o82Df1FZXvbh9QOfhyxldr/+3xgXU9oKmvsHyr7F/XA269/eveBXrsv7N9QALe/tvjA0kPWAXGbvebkbHn+D/J5nMcHzx1UAAAAABJRU5ErkJggg==);width:12px;height:16px}.dgrid-sort-arrow{float:right;background-position:-64px -16px;height:12px;margin:0 4px 0 5px;display:block}.dgrid-sort-up .dgrid-sort-arrow{background-position:0 -16px}.dgrid-selected{background-color:#bbb}.dgrid-input{width:99%}html.has-mozilla .dgrid .dgrid-row:focus,html.has-mozilla .dgrid .dgrid-cell:focus{outline:1px dotted}html.has-mozilla .dgrid-focus{outline-offset:-1px}.dgrid-scrollbar-measure{width:100px;height:100px;position:absolute;top:-9999px;overflow:scroll}.dgrid-autoheight{height:auto}.dgrid-autoheight .dgrid-scroller{position:relative;overflow-y:hidden}.dgrid-autoheight .dgrid-header-scroll{display:none}.dgrid-autoheight .dgrid-header{right:0}.dgrid-column-set{-ms-touch-action:pan-y;touch-action:pan-y;width:100%;height:100%;position:relative;overflow:hidden}.dgrid-column-set-cell{vertical-align:top;height:100%}.dgrid-column-set-scroller-container{font-size:0;position:absolute;bottom:0}.dgrid-autoheight .dgrid-column-set-scroller-container{position:relative}.dgrid-column-set-scroller{display:inline-block;overflow:auto hidden}.dgrid-column-set-scroller-content{height:1px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.dgrid-expando-icon{width:16px;height:16px}.dgrid-tree-container{-o-transition-duration:.3s;transition-duration:.3s;overflow:hidden}.dgrid-tree-container.dgrid-tree-resetting{-webkit-transition-duration:0;-moz-transition-duration:0;-o-transition-duration:0;-ms-transition-duration:0;transition-duration:0}.dgrid-hider-toggle{cursor:pointer;background-color:#0000;background-position:0 -192px;border:none;position:absolute;top:0;right:0}.dgrid-rtl-swap .dgrid-hider-toggle{left:0;right:auto}.dgrid-hider-menu{z-index:99999;background-color:#fff;border:1px solid #000;width:184px;padding:4px;position:absolute;top:0;right:17px;overflow:hidden auto}.dgrid-rtl-swap .dgrid-hider-menu{left:17px;right:auto}.dgrid-hider-menu-row{padding:2px;position:relative}.dgrid-hider-menu-check{padding:0;position:absolute;top:2px;left:2px}.dgrid-hider-menu-label{padding-left:20px;display:block}.dgrid-header .dojoDndTarget .dgrid-cell{display:table-cell}.dgrid-header .dojoDndItemBefore{border-left:2px dotted #000!important}.dgrid-header .dojoDndItemAfter{border-right:2px dotted #000!important}.dgrid-column-resizer{cursor:col-resize;z-index:1000;background-color:#666;width:2px;position:absolute}.dgrid-resize-handle{cursor:col-resize;z-index:999;border-left:5px solid #0000;outline:none;width:0;height:100px;position:absolute;top:-4px;right:-4px}.dgrid-resize-header-container{height:100%}.dgrid-resize-guard{cursor:col-resize;position:absolute;inset:0}html.has-touch .dgrid-resize-handle{border-left:20px solid #0000}html.has-touch .dgrid-column-resizer{width:2px}.dgrid-resize-header-container{position:relative}.dgrid-header .dgrid-cell{overflow:hidden}.dgrid-spacer-row{height:0}.dgrid-spacer-row th{border-top:none;border-bottom:none;padding-top:0;padding-bottom:0}.dgrid-status{padding:2px}.dgrid-pagination .dgrid-status{float:left}.dgrid-pagination .dgrid-navigation,.dgrid-pagination .dgrid-page-size{float:right}.dgrid-navigation .dgrid-page-link{cursor:pointer;color:inherit;padding:0 4px;font-weight:700;text-decoration:none}.dgrid-first,.dgrid-last,.dgrid-next,.dgrid-previous{font-size:130%}.dgrid-pagination .dgrid-page-disabled{color:#aaa;cursor:default}.dgrid-page-input{text-align:center;width:2em;margin-top:1px}.dgrid-page-size{margin:1px 4px 0}.dgrid-rtl-swap .dgrid-header-row{left:17px;right:0}.dgrid-rtl-swap .dgrid-header-scroll{left:0;right:auto}.dgrid-rtl .dgrid-cell{text-align:right}.dgrid-rtl .dgrid-sort-arrow{float:left;margin:0 5px 0 4px}.dgrid-rtl .ui-icon-triangle-1-e{background-position:-96px -16px}.dgrid-rtl .ui-icon-triangle-1-se{background-position:-80px -16px}.dgrid-rtl .dgrid-pagination .dgrid-status,.dgrid-rtl .dgrid-pagination .dgrid-page-size{float:right}.dgrid-rtl .dgrid-pagination .dgrid-navigation{float:left}.dgrid-rtl.dgrid-autoheight .dgrid-header{left:0}.dgrid_Table .placeholder{border:none;padding:0;overflow:hidden}.dgrid_Table .dgrid-fakeline{border:0;border-bottom:1px solid #ddd;margin:2px -3px}.dgrid_Table .dgrid-sortable .dgrid-sort-arrow.ui-icon{margin:0}\n/*$vite$:1*/")),document.head.appendChild(i)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}}();
|