@platforma-sdk/ui-vue 1.7.21 → 1.7.25
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/CHANGELOG.md +20 -0
- package/dist/lib.js +893 -901
- package/dist/lib.umd.cjs +9 -9
- package/dist/src/components/PlAgDataTable/PlAgDataTable.vue.d.ts.map +1 -1
- package/dist/src/components/PlAgDataTable/sources/table-source.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/PlAgDataTable/PlAgDataTable.vue +6 -9
- package/src/components/PlAgDataTable/sources/table-source.ts +3 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/ui-vue",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/lib.umd.cjs",
|
|
6
6
|
"module": "dist/lib.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@ag-grid-enterprise/rich-select": "^32.3.0",
|
|
35
35
|
"@ag-grid-enterprise/menu": "^32.3.0",
|
|
36
36
|
"@ag-grid-enterprise/excel-export": "^32.3.0",
|
|
37
|
-
"@milaboratories/uikit": "^1.2.
|
|
37
|
+
"@milaboratories/uikit": "^1.2.29",
|
|
38
38
|
"@platforma-sdk/model": "^1.7.20"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -239,8 +239,9 @@ const gridOptions = ref<GridOptions>({
|
|
|
239
239
|
event.api.autoSizeAllColumns();
|
|
240
240
|
},
|
|
241
241
|
rowModelType: 'clientSide',
|
|
242
|
-
maxBlocksInCache:
|
|
242
|
+
maxBlocksInCache: 1000,
|
|
243
243
|
cacheBlockSize: 100,
|
|
244
|
+
blockLoadDebounceMillis: 500,
|
|
244
245
|
serverSideSortAllLevels: true,
|
|
245
246
|
suppressServerSideFullWidthLoadingRow: true,
|
|
246
247
|
getRowId: (params) => params.data.id,
|
|
@@ -308,14 +309,6 @@ watch(
|
|
|
308
309
|
};
|
|
309
310
|
if (lodash.isEqual(gridState, selfState)) return;
|
|
310
311
|
|
|
311
|
-
console.log(
|
|
312
|
-
'reloading; columnOrder changed',
|
|
313
|
-
!lodash.isEqual(gridState.columnOrder, selfState.columnOrder),
|
|
314
|
-
'saved',
|
|
315
|
-
gridState.columnOrder,
|
|
316
|
-
'current',
|
|
317
|
-
selfState.columnOrder,
|
|
318
|
-
);
|
|
319
312
|
gridOptions.value.initialState = gridState;
|
|
320
313
|
++reloadKey.value;
|
|
321
314
|
},
|
|
@@ -333,6 +326,10 @@ const onSheetChanged = (sheetId: string, newValue: string | number) => {
|
|
|
333
326
|
if (state[sheetId] === newValue) return;
|
|
334
327
|
state[sheetId] = newValue;
|
|
335
328
|
sheetsState.value = state;
|
|
329
|
+
gridApi.value?.updateGridOptions({
|
|
330
|
+
loading: true,
|
|
331
|
+
loadingOverlayComponentParams: { notReady: false },
|
|
332
|
+
});
|
|
336
333
|
};
|
|
337
334
|
|
|
338
335
|
watch(
|
|
@@ -236,13 +236,11 @@ export async function makeSheets(
|
|
|
236
236
|
* @param nRows number of rows
|
|
237
237
|
* @returns
|
|
238
238
|
*/
|
|
239
|
-
function columns2rows(fields: number[], columns: PTableVector[]): unknown[] {
|
|
239
|
+
function columns2rows(fields: number[], columns: PTableVector[], index: number): unknown[] {
|
|
240
240
|
const nCols = columns.length;
|
|
241
241
|
const rowData = [];
|
|
242
242
|
for (let iRow = 0; iRow < columns[0].data.length; ++iRow) {
|
|
243
243
|
const row: Record<string, unknown> = {};
|
|
244
|
-
|
|
245
|
-
const index = [];
|
|
246
244
|
for (let iCol = 0; iCol < nCols; ++iCol) {
|
|
247
245
|
const field = fields[iCol].toString();
|
|
248
246
|
const value = columns[iCol].data[iRow];
|
|
@@ -254,16 +252,10 @@ function columns2rows(fields: number[], columns: PTableVector[]): unknown[] {
|
|
|
254
252
|
} else {
|
|
255
253
|
row[field] = toDisplayValue(value, valueType);
|
|
256
254
|
}
|
|
257
|
-
|
|
258
|
-
index.push(valueType === 'Long' ? Number(value) : value);
|
|
259
255
|
}
|
|
260
|
-
|
|
261
|
-
// generate ID based on the axes information
|
|
262
|
-
row['id'] = iRow.toString();
|
|
263
|
-
|
|
256
|
+
row['id'] = index++;
|
|
264
257
|
rowData.push(row);
|
|
265
258
|
}
|
|
266
|
-
|
|
267
259
|
return rowData;
|
|
268
260
|
}
|
|
269
261
|
|
|
@@ -357,7 +349,7 @@ export async function updatePFrameGridOptions(
|
|
|
357
349
|
offset: params.request.startRow,
|
|
358
350
|
length,
|
|
359
351
|
});
|
|
360
|
-
rowData = columns2rows(fields, data);
|
|
352
|
+
rowData = columns2rows(fields, data, params.request.startRow);
|
|
361
353
|
}
|
|
362
354
|
}
|
|
363
355
|
|