@azrico/reactgrid 1.2.35 → 1.2.37

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.
@@ -1,300 +1,286 @@
1
- import BoolEditor from '@inovua/reactdatagrid-community/BoolEditor';
2
- import NumericEditor from '@inovua/reactdatagrid-community/NumericEditor';
3
- import SelectEditor from '@inovua/reactdatagrid-community/SelectEditor';
4
- import { fix_parent_child_relations } from './func_child';
5
- import { object_equals } from '@azrico/object';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ApplyColumnData = ApplyColumnData;
7
+ exports.ApplyDataSource = ApplyDataSource;
8
+ exports.get_col_header = get_col_header;
9
+ exports.get_col_name = get_col_name;
10
+ exports.get_default_key = get_default_key;
11
+ exports.get_row_id = get_row_id;
12
+ exports.set_row_id = set_row_id;
13
+ exports.to_datasource = to_datasource;
14
+ exports.validateCache = validateCache;
15
+ var _BoolEditor = _interopRequireDefault(require("@inovua/reactdatagrid-community/BoolEditor"));
16
+ var _NumericEditor = _interopRequireDefault(require("@inovua/reactdatagrid-community/NumericEditor"));
17
+ var _SelectEditor = _interopRequireDefault(require("@inovua/reactdatagrid-community/SelectEditor"));
18
+ var _func_child = require("./func_child");
19
+ var _object = require("@azrico/object");
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
21
  const defaultColumnOptions = {
7
- draggable: false,
8
- lockable: false,
9
- editable: false,
22
+ draggable: false,
23
+ lockable: false,
24
+ editable: false
10
25
  };
11
- export async function ApplyDataSource(datasource, props) {
12
- let result_data = undefined;
13
- let isUsingCache = false;
14
- const cacheInfo = { ds: datasource, skip: props.skip, limit: props.limit };
15
- //check if we can used cached data
16
- //if the datasource is changed since last render, we should invalidate cache
17
- if (!validateCache(props.last_cache_info.current, cacheInfo, props.looseCacheCheck)) {
18
- props.cached_data.current = undefined;
19
- props.last_cache_info.current = cacheInfo;
26
+ async function ApplyDataSource(datasource, props) {
27
+ let result_data = undefined;
28
+ let isUsingCache = false;
29
+ const cacheInfo = {
30
+ ds: datasource,
31
+ skip: props.skip,
32
+ limit: props.limit
33
+ };
34
+ //check if we can used cached data
35
+ //if the datasource is changed since last render, we should invalidate cache
36
+ if (!validateCache(props.last_cache_info.current, cacheInfo, props.looseCacheCheck)) {
37
+ props.cached_data.current = undefined;
38
+ props.last_cache_info.current = cacheInfo;
39
+ }
40
+ if (props.cached_data.current) {
41
+ //cache is valid, use the cache
42
+ isUsingCache = true;
43
+ result_data = props.cached_data.current;
44
+ } else {
45
+ //cache is invalid, use the datasource again
46
+ isUsingCache = false;
47
+ if (typeof datasource === 'function') {
48
+ result_data = await datasource(props);
49
+ } else result_data = datasource;
50
+ }
51
+ //making sure the datasource is a valid object :
52
+ if (!result_data) result_data = [];
53
+ if (Array.isArray(result_data) || typeof result_data !== 'object') result_data = {
54
+ data: result_data
55
+ };
56
+ if (!Array.isArray(result_data.data)) result_data.data = [result_data.data];
57
+ //no need to fix parent/child when using cache (it should be already fixed)
58
+ if (!isUsingCache && props.allowChildRows) {
59
+ result_data.data = (0, _func_child.fix_parent_child_relations)(result_data.data);
60
+ }
61
+ if (!result_data.count) {
62
+ result_data.count = result_data.data.length;
63
+ }
64
+ //update cache
65
+ props.cached_data.current = result_data;
66
+ return result_data;
67
+ }
68
+ /**
69
+ * merges together all different props for columns
70
+ * to build a single final column data array
71
+ * @param column_data
72
+ * @returns
73
+ */
74
+ function ApplyColumnData(column_data) {
75
+ const final_columns = [];
76
+ if (!column_data) column_data = {};
77
+ if (Array.isArray(column_data)) column_data = {
78
+ columns: column_data
79
+ };
80
+ let mcols = column_data.columns || [];
81
+ let mcolExts = column_data.columnExtensions || [];
82
+ let rightColumns = column_data.rightColumns || [];
83
+ let leftColumns = column_data.leftColumns || [];
84
+ let editableColumns = column_data.editableColumns || [];
85
+ let customColumns = column_data.customColumns || [];
86
+ if (!Array.isArray(mcols)) return [];
87
+ /* ------------------------------- fix columns ------------------------------ */
88
+ mcols.map(r => {
89
+ if (r == null) return null;
90
+ if (typeof r === 'string') return {
91
+ field: r,
92
+ header: r
93
+ };
94
+ if (typeof r === 'object') {
95
+ let final_cl = {
96
+ name: get_col_name(r),
97
+ header: get_col_header(r),
98
+ width: r.width || undefined
99
+ };
100
+ final_cl = {
101
+ ...defaultColumnOptions,
102
+ ...r,
103
+ ...final_cl
104
+ };
105
+ return final_cl;
20
106
  }
21
- if (props.cached_data.current) {
22
- //cache is valid, use the cache
23
- isUsingCache = true;
24
- result_data = props.cached_data.current;
107
+ return null;
108
+ }).forEach(r => {
109
+ if (r != null) final_columns.push(r);
110
+ });
111
+ /* ---------------------------- apply extensions ---------------------------- */
112
+ if (mcolExts && Array.isArray(mcolExts)) for (let index = 0; index < mcolExts.length; index++) {
113
+ const ext = mcolExts[index];
114
+ const ext_cl = get_col_name(ext);
115
+ if (!ext_cl) {
116
+ console.warn('ColumnExtension must have a name');
117
+ continue;
25
118
  }
26
- else {
27
- //cache is invalid, use the datasource again
28
- isUsingCache = false;
29
- if (typeof datasource === 'function') {
30
- result_data = await datasource(props);
31
- }
32
- else
33
- result_data = datasource;
119
+ const mcol = final_columns.find(s => get_col_name(s) === ext_cl);
120
+ if (mcol) {
121
+ for (const key in ext) {
122
+ if (!mcol[key] && key != 'name') mcol[key] = ext[key];
123
+ }
34
124
  }
35
- //making sure the datasource is a valid object :
36
- if (!result_data)
37
- result_data = [];
38
- if (Array.isArray(result_data) || typeof result_data !== 'object')
39
- result_data = { data: result_data };
40
- if (!Array.isArray(result_data.data))
41
- result_data.data = [result_data.data];
42
- //no need to fix parent/child when using cache (it should be already fixed)
43
- if (!isUsingCache && props.allowChildRows) {
44
- result_data.data = fix_parent_child_relations(result_data.data);
125
+ // if (ext.widthGrow) mcol.widthGrow = ext.widthGrow;
126
+ }
127
+ /* ------------------------------- frozen cols ------------------------------ */
128
+ if (Array.isArray(leftColumns)) {
129
+ for (let index = 0; index < leftColumns.length; index++) {
130
+ const r = get_col_name(leftColumns[index]);
131
+ const mcol = final_columns.find(s => get_col_name(s) === r);
132
+ if (mcol) {
133
+ mcol.locked = 'start';
134
+ }
45
135
  }
46
- if (!result_data.count) {
47
- result_data.count = result_data.data.length;
136
+ }
137
+ if (Array.isArray(rightColumns)) {
138
+ for (let index = 0; index < rightColumns.length; index++) {
139
+ const r = get_col_name(rightColumns[index]);
140
+ const mcol = final_columns.find(s => get_col_name(s) === r);
141
+ if (mcol) {
142
+ mcol.locked = 'end';
143
+ }
48
144
  }
49
- //update cache
50
- props.cached_data.current = result_data;
51
- return result_data;
52
- }
53
- /**
54
- * merges together all different props for columns
55
- * to build a single final column data array
56
- * @param column_data
57
- * @returns
58
- */
59
- export function ApplyColumnData(column_data) {
60
- const final_columns = [];
61
- if (!column_data)
62
- column_data = {};
63
- if (Array.isArray(column_data))
64
- column_data = { columns: column_data };
65
- let mcols = column_data.columns || [];
66
- let mcolExts = column_data.columnExtensions || [];
67
- let rightColumns = column_data.rightColumns || [];
68
- let leftColumns = column_data.leftColumns || [];
69
- let editableColumns = column_data.editableColumns || [];
70
- let customColumns = column_data.customColumns || [];
71
- if (!Array.isArray(mcols))
72
- return [];
73
- /* ------------------------------- fix columns ------------------------------ */
74
- mcols
75
- .map((r) => {
76
- if (r == null)
77
- return null;
78
- if (typeof r === 'string')
79
- return { field: r, header: r };
80
- if (typeof r === 'object') {
81
- let final_cl = {
82
- name: get_col_name(r),
83
- header: get_col_header(r),
84
- width: r.width || undefined,
85
- };
86
- final_cl = {
87
- ...defaultColumnOptions,
88
- ...r,
89
- ...final_cl,
90
- };
91
- return final_cl;
92
- }
93
- return null;
94
- })
95
- .forEach((r) => {
96
- if (r != null)
97
- final_columns.push(r);
98
- });
99
- /* ---------------------------- apply extensions ---------------------------- */
100
- if (mcolExts && Array.isArray(mcolExts))
101
- for (let index = 0; index < mcolExts.length; index++) {
102
- const ext = mcolExts[index];
103
- const ext_cl = get_col_name(ext);
104
- if (!ext_cl) {
105
- console.warn('ColumnExtension must have a name');
106
- continue;
107
- }
108
- const mcol = final_columns.find((s) => get_col_name(s) === ext_cl);
109
- if (mcol) {
110
- for (const key in ext) {
111
- if (!mcol[key] && key != 'name')
112
- mcol[key] = ext[key];
113
- }
114
- }
115
- // if (ext.widthGrow) mcol.widthGrow = ext.widthGrow;
116
- }
117
- /* ------------------------------- frozen cols ------------------------------ */
118
- if (Array.isArray(leftColumns)) {
119
- for (let index = 0; index < leftColumns.length; index++) {
120
- const r = get_col_name(leftColumns[index]);
121
- const mcol = final_columns.find((s) => get_col_name(s) === r);
122
- if (mcol) {
123
- mcol.locked = 'start';
124
- }
125
- }
145
+ }
146
+ /* -------------------------------- ediatable ------------------------------- */
147
+ if (Array.isArray(editableColumns)) {
148
+ for (let index = 0; index < editableColumns.length; index++) {
149
+ const r = get_col_name(editableColumns[index]);
150
+ const mcol = final_columns.find(s => get_col_name(s) === r);
151
+ if (mcol) {
152
+ mcol.editable = true;
153
+ }
126
154
  }
127
- if (Array.isArray(rightColumns)) {
128
- for (let index = 0; index < rightColumns.length; index++) {
129
- const r = get_col_name(rightColumns[index]);
130
- const mcol = final_columns.find((s) => get_col_name(s) === r);
131
- if (mcol) {
132
- mcol.locked = 'end';
133
- }
134
- }
155
+ }
156
+ for (let index = 0; index < final_columns.length; index++) {
157
+ const col = final_columns[index];
158
+ if (col.type) {
159
+ switch (col.type) {
160
+ case 'combo':
161
+ case 'select':
162
+ //@ts-ignore
163
+ col.editor = _SelectEditor.default;
164
+ break;
165
+ case 'number':
166
+ case 'numberic':
167
+ //@ts-ignore
168
+ col.editor = _NumericEditor.default;
169
+ break;
170
+ case 'truefalse':
171
+ case 'bool':
172
+ //@ts-ignore
173
+ col.editor = _BoolEditor.default;
174
+ break;
175
+ }
176
+ if (col.editable != false) col.editable = true;
177
+ delete col.type;
135
178
  }
136
- /* -------------------------------- ediatable ------------------------------- */
137
- if (Array.isArray(editableColumns)) {
138
- for (let index = 0; index < editableColumns.length; index++) {
139
- const r = get_col_name(editableColumns[index]);
140
- const mcol = final_columns.find((s) => get_col_name(s) === r);
141
- if (mcol) {
142
- mcol.editable = true;
143
- }
144
- }
179
+ //@ts-ignore
180
+ if (!col.editorProps) col.editorProps = {};
181
+ if (col.items) {
182
+ //@ts-ignore
183
+ if (!col.editorProps.idProperty) col.editorProps.idProperty = 'id';
184
+ //@ts-ignore
185
+ if (!col.editorProps.collapseOnSelect) col.editorProps.collapseOnSelect = true;
186
+ //@ts-ignore
187
+ col.editorProps.dataSource = to_datasource(col.items, col.editorProps.idProperty);
188
+ delete col.items;
145
189
  }
146
- for (let index = 0; index < final_columns.length; index++) {
147
- const col = final_columns[index];
148
- if (col.type) {
149
- switch (col.type) {
150
- case 'combo':
151
- case 'select':
152
- //@ts-ignore
153
- col.editor = SelectEditor;
154
- break;
155
- case 'number':
156
- case 'numberic':
157
- //@ts-ignore
158
- col.editor = NumericEditor;
159
- break;
160
- case 'truefalse':
161
- case 'bool':
162
- //@ts-ignore
163
- col.editor = BoolEditor;
164
- break;
165
- }
166
- if (col.editable != false)
167
- col.editable = true;
168
- delete col.type;
169
- }
190
+ }
191
+ /* -------------------------------------------------------------------------- */
192
+ if (Array.isArray(customColumns)) {
193
+ for (let index = 0; index < customColumns.length; index++) {
194
+ const r = customColumns[index];
195
+ const rn = get_col_name(r);
196
+ const mcol = final_columns.find(s => get_col_name(s) === rn);
197
+ if (mcol) {
170
198
  //@ts-ignore
171
- if (!col.editorProps)
172
- col.editorProps = {};
173
- if (col.items) {
174
- //@ts-ignore
175
- if (!col.editorProps.idProperty)
176
- col.editorProps.idProperty = 'id';
177
- //@ts-ignore
178
- if (!col.editorProps.collapseOnSelect)
179
- col.editorProps.collapseOnSelect = true;
180
- //@ts-ignore
181
- col.editorProps.dataSource = to_datasource(col.items, col.editorProps.idProperty);
182
- delete col.items;
183
- }
199
+ mcol.render = r.render;
200
+ }
184
201
  }
185
- /* -------------------------------------------------------------------------- */
186
- if (Array.isArray(customColumns)) {
187
- for (let index = 0; index < customColumns.length; index++) {
188
- const r = customColumns[index];
189
- const rn = get_col_name(r);
190
- const mcol = final_columns.find((s) => get_col_name(s) === rn);
191
- if (mcol) {
192
- //@ts-ignore
193
- mcol.render = r.render;
194
- }
195
- }
202
+ }
203
+ /* ------------------------------ apply renames ----------------------------- */
204
+ for (let index = 0; index < final_columns.length; index++) {
205
+ const col = final_columns[index];
206
+ if (!col.name) {
207
+ col.name = get_col_name(col);
208
+ delete col.field;
209
+ delete col.key;
210
+ delete col.columnName;
211
+ if (col.flex && !col.defaultFlex) col.defaultFlex = col.flex;
196
212
  }
197
- /* ------------------------------ apply renames ----------------------------- */
198
- for (let index = 0; index < final_columns.length; index++) {
199
- const col = final_columns[index];
200
- if (!col.name) {
201
- col.name = get_col_name(col);
202
- delete col.field;
203
- delete col.key;
204
- delete col.columnName;
205
- if (col.flex && !col.defaultFlex)
206
- col.defaultFlex = col.flex;
207
- }
208
- }
209
- /* -------------------------------------------------------------------------- */
210
- //console.log(final_columns);
211
- return final_columns;
213
+ }
214
+ /* -------------------------------------------------------------------------- */
215
+ //console.log(final_columns);
216
+ return final_columns;
212
217
  }
213
- export function to_datasource(arr, idProperty, valueAsID = true) {
214
- const res = [];
215
- let index = 0;
216
- if (Array.isArray(arr)) {
217
- arr.map((s) => {
218
- let elem = {};
219
- if (valueAsID)
220
- elem[idProperty] = String(s).toLowerCase();
221
- else
222
- elem[idProperty] = '_cid_' + index;
223
- if (typeof s === 'object')
224
- elem = { ...elem, ...s };
225
- else
226
- elem['label'] = s;
227
- res.push(elem);
228
- index++;
229
- });
230
- }
231
- return res;
218
+ function to_datasource(arr, idProperty, valueAsID = true) {
219
+ const res = [];
220
+ let index = 0;
221
+ if (Array.isArray(arr)) {
222
+ arr.map(s => {
223
+ let elem = {};
224
+ if (valueAsID) elem[idProperty] = String(s).toLowerCase();else elem[idProperty] = '_cid_' + index;
225
+ if (typeof s === 'object') elem = {
226
+ ...elem,
227
+ ...s
228
+ };else elem['label'] = s;
229
+ res.push(elem);
230
+ index++;
231
+ });
232
+ }
233
+ return res;
232
234
  }
233
- /**
234
- * Gets name of a column from its column object
235
- * @param obj
236
- * @returns
235
+ /**
236
+ * Gets name of a column from its column object
237
+ * @param obj
238
+ * @returns
237
239
  */
238
- export function get_col_name(obj) {
239
- if (!obj)
240
- return '';
241
- if (typeof obj == 'string')
242
- return obj;
243
- if (typeof obj != 'object')
244
- return '';
245
- return obj.name || obj.field || obj.key || obj.columnName || '';
240
+ function get_col_name(obj) {
241
+ if (!obj) return '';
242
+ if (typeof obj == 'string') return obj;
243
+ if (typeof obj != 'object') return '';
244
+ return obj.name || obj.field || obj.key || obj.columnName || '';
246
245
  }
247
- /**
248
- * Gets header of a column
249
- * @param obj
250
- * @returns
246
+ /**
247
+ * Gets header of a column
248
+ * @param obj
249
+ * @returns
251
250
  */
252
- export function get_col_header(obj) {
253
- if (!obj)
254
- return '';
255
- if (typeof obj == 'string')
256
- return obj;
257
- if (typeof obj != 'object')
258
- return '';
259
- return obj.header || obj.title || get_col_name(obj);
251
+ function get_col_header(obj) {
252
+ if (!obj) return '';
253
+ if (typeof obj == 'string') return obj;
254
+ if (typeof obj != 'object') return '';
255
+ return obj.header || obj.title || get_col_name(obj);
260
256
  }
261
- /**
262
- * Gets name of a column from its column object
263
- * @param obj
264
- * @returns
257
+ /**
258
+ * Gets name of a column from its column object
259
+ * @param obj
260
+ * @returns
265
261
  */
266
- export function get_row_id(obj) {
267
- if (!obj)
268
- return undefined;
269
- if (typeof obj == 'string')
270
- return obj;
271
- if (typeof obj != 'object')
272
- return undefined;
273
- return obj.__table_id || obj.id || undefined;
262
+ function get_row_id(obj) {
263
+ if (!obj) return undefined;
264
+ if (typeof obj == 'string') return obj;
265
+ if (typeof obj != 'object') return undefined;
266
+ return obj.__table_id || obj.id || undefined;
274
267
  }
275
- export function set_row_id(obj, val) {
276
- if (typeof obj != 'object')
277
- return false;
278
- if (val === undefined)
279
- delete obj.__table_id;
280
- else
281
- obj.__table_id = val;
282
- return obj.__table_id;
268
+ function set_row_id(obj, val) {
269
+ if (typeof obj != 'object') return false;
270
+ if (val === undefined) delete obj.__table_id;else obj.__table_id = val;
271
+ return obj.__table_id;
283
272
  }
284
- /**
285
- * Gets default activation key for grid plugin
286
- * @returns
273
+ /**
274
+ * Gets default activation key for grid plugin
275
+ * @returns
287
276
  */
288
- export function get_default_key() {
289
- return 'ExpiryDate=2999-01-01,Z=1040577552';
277
+ function get_default_key() {
278
+ return 'ExpiryDate=2999-01-01,Z=1040577552';
290
279
  }
291
280
  //check if two cache objects are the same
292
- export function validateCache(current, old, looseCheck = false) {
293
- if (!old || !object_equals(current, old))
294
- return false;
295
- if (looseCheck)
296
- return true;
297
- if (current.ds != old.ds)
298
- return false;
299
- return true;
300
- }
281
+ function validateCache(current, old, looseCheck = false) {
282
+ if (!old || !(0, _object.object_equals)(current, old)) return false;
283
+ if (looseCheck) return true;
284
+ if (current.ds != old.ds) return false;
285
+ return true;
286
+ }
@@ -1,4 +1,4 @@
1
- export * from './views/DataGrid';
2
- export { get_row_id, set_row_id, get_col_name, get_col_header } from './func/func_grid';
3
- import AzGrid from './views/DataGrid';
4
- export default AzGrid;
1
+ export * from './views/DataGrid';
2
+ export { get_row_id, set_row_id, get_col_name, get_col_header } from './func/func_grid';
3
+ import AzGrid from './views/DataGrid';
4
+ export default AzGrid;
package/dist/src/index.js CHANGED
@@ -1,14 +1,64 @@
1
- export * from './views/DataGrid';
2
- export { get_row_id, set_row_id, get_col_name, get_col_header } from './func/func_grid';
3
- import AzGrid from './views/DataGrid';
4
- import ExampleGrid from './example';
5
- import React from 'react';
6
- import ReactDOM from 'react-dom/client';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ get_row_id: true,
8
+ set_row_id: true,
9
+ get_col_name: true,
10
+ get_col_header: true
11
+ };
12
+ exports.default = void 0;
13
+ Object.defineProperty(exports, "get_col_header", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _func_grid.get_col_header;
17
+ }
18
+ });
19
+ Object.defineProperty(exports, "get_col_name", {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _func_grid.get_col_name;
23
+ }
24
+ });
25
+ Object.defineProperty(exports, "get_row_id", {
26
+ enumerable: true,
27
+ get: function () {
28
+ return _func_grid.get_row_id;
29
+ }
30
+ });
31
+ Object.defineProperty(exports, "set_row_id", {
32
+ enumerable: true,
33
+ get: function () {
34
+ return _func_grid.set_row_id;
35
+ }
36
+ });
37
+ var _DataGrid = _interopRequireWildcard(require("./views/DataGrid"));
38
+ Object.keys(_DataGrid).forEach(function (key) {
39
+ if (key === "default" || key === "__esModule") return;
40
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
41
+ if (key in exports && exports[key] === _DataGrid[key]) return;
42
+ Object.defineProperty(exports, key, {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _DataGrid[key];
46
+ }
47
+ });
48
+ });
49
+ var _func_grid = require("./func/func_grid");
50
+ var _example = _interopRequireDefault(require("./example"));
51
+ var _react = _interopRequireDefault(require("react"));
52
+ var _client = _interopRequireDefault(require("react-dom/client"));
53
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
54
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
55
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
7
56
  /* -------------------------------------------------------------------------- */
8
57
  //
9
- export default AzGrid;
58
+ var _default = _DataGrid.default;
59
+ exports.default = _default;
10
60
  const testroot = document.getElementById('testroot');
11
61
  if (testroot) {
12
- const root = ReactDOM.createRoot(document.getElementById('testroot'));
13
- root.render(React.createElement(ExampleGrid, null));
14
- }
62
+ const root = _client.default.createRoot(document.getElementById('testroot'));
63
+ root.render(_react.default.createElement(_example.default, null));
64
+ }