@platforma-sdk/ui-vue 1.20.9 → 1.20.11
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 +15 -0
- package/dist/lib.js +6083 -6060
- package/dist/lib.js.map +1 -1
- package/dist/lib.umd.cjs +22 -22
- package/dist/lib.umd.cjs.map +1 -1
- 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/src/internal/createApp.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/PlAgDataTable/PlAgDataTable.vue +8 -1
- package/src/components/PlAgDataTable/sources/table-source.ts +12 -12
- package/src/internal/createApp.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/ui-vue",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/lib.umd.cjs",
|
|
6
6
|
"module": "dist/lib.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@ag-grid-enterprise/side-bar": "^32.3.3",
|
|
39
39
|
"@ag-grid-enterprise/column-tool-panel": "^32.3.3",
|
|
40
40
|
"@milaboratories/uikit": "^2.2.34",
|
|
41
|
-
"@platforma-sdk/model": "^1.20.
|
|
41
|
+
"@platforma-sdk/model": "^1.20.11"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@faker-js/faker": "^9.2.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"yarpm": "^1.2.0",
|
|
59
59
|
"semver": "^7.6.3",
|
|
60
60
|
"@types/semver": "^7.5.8",
|
|
61
|
-
"@milaboratories/helpers": "^1.6.
|
|
61
|
+
"@milaboratories/helpers": "^1.6.11",
|
|
62
62
|
"@milaboratories/eslint-config": "^1.0.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
@@ -40,6 +40,7 @@ import { PlAgGridColumnManager } from '../PlAgGridColumnManager';
|
|
|
40
40
|
import { autoSizeRowNumberColumn, PlAgDataTableRowNumberColId } from './sources/row-number';
|
|
41
41
|
import { focusRow, makeOnceTracker, trackFirstDataRendered } from './sources/focus-row';
|
|
42
42
|
import PlAgCsvExporter from '../PlAgCsvExporter/PlAgCsvExporter.vue';
|
|
43
|
+
import { isJsonEqual } from '@milaboratories/helpers';
|
|
43
44
|
|
|
44
45
|
ModuleRegistry.registerModules([
|
|
45
46
|
ClientSideRowModelModule,
|
|
@@ -113,11 +114,17 @@ const gridState = computed({
|
|
|
113
114
|
= settings.value?.sourceType !== 'ptable' || gridOptions.value.rowModelType === 'clientSide' ? undefined : makeSorting(gridState.sort);
|
|
114
115
|
|
|
115
116
|
const oldState = tableState.value;
|
|
116
|
-
|
|
117
|
+
|
|
118
|
+
const newState = {
|
|
117
119
|
...oldState,
|
|
118
120
|
gridState: { ...oldState.gridState, ...gridState },
|
|
119
121
|
pTableParams: { ...oldState.pTableParams, sorting },
|
|
120
122
|
};
|
|
123
|
+
|
|
124
|
+
// Note: the table constantly emits an unchanged state, so I added this
|
|
125
|
+
if (!isJsonEqual(oldState, newState)) {
|
|
126
|
+
tableState.value = newState;
|
|
127
|
+
}
|
|
121
128
|
},
|
|
122
129
|
});
|
|
123
130
|
|
|
@@ -45,9 +45,9 @@ export const defaultValueFormatter = (value: ValueFormatterParams<PlAgDataTableR
|
|
|
45
45
|
if (value.value === undefined) {
|
|
46
46
|
return 'undefined';
|
|
47
47
|
} else if (isPTableAbsent(value.value)) {
|
|
48
|
-
return ''; //'NULL';
|
|
48
|
+
return ''; // 'NULL';
|
|
49
49
|
} else if (value.value === null) {
|
|
50
|
-
return ''; //'NA';
|
|
50
|
+
return ''; // 'NA';
|
|
51
51
|
} else {
|
|
52
52
|
return value.value.toString();
|
|
53
53
|
}
|
|
@@ -147,11 +147,11 @@ export async function updatePFrameGridOptions(
|
|
|
147
147
|
hiddenColIds?: string[],
|
|
148
148
|
showCellButtonForAxisId?: AxisId,
|
|
149
149
|
): Promise<{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
}> {
|
|
150
|
+
columnDefs: ColDef[];
|
|
151
|
+
serverSideDatasource?: IServerSideDatasource;
|
|
152
|
+
rowModelType: RowModelType;
|
|
153
|
+
rowData?: unknown[];
|
|
154
|
+
}> {
|
|
155
155
|
const specs = await pfDriver.getSpec(pt);
|
|
156
156
|
|
|
157
157
|
let numberOfAxes = specs.findIndex((s) => s.type === 'column');
|
|
@@ -164,11 +164,11 @@ export async function updatePFrameGridOptions(
|
|
|
164
164
|
!lodash.some(
|
|
165
165
|
sheets,
|
|
166
166
|
(sheet) =>
|
|
167
|
-
lodash.isEqual(getAxisId(sheet.axis), specs[i].id)
|
|
168
|
-
(specs[i].type === 'column'
|
|
169
|
-
specs[i].spec.name === 'pl7.app/label'
|
|
170
|
-
specs[i].spec.axesSpec.length === 1
|
|
171
|
-
lodash.isEqual(getAxisId(sheet.axis), getAxisId(specs[i].spec.axesSpec[0]))),
|
|
167
|
+
lodash.isEqual(getAxisId(sheet.axis), specs[i].id)
|
|
168
|
+
|| (specs[i].type === 'column'
|
|
169
|
+
&& specs[i].spec.name === 'pl7.app/label'
|
|
170
|
+
&& specs[i].spec.axesSpec.length === 1
|
|
171
|
+
&& lodash.isEqual(getAxisId(sheet.axis), getAxisId(specs[i].spec.axesSpec[0]))),
|
|
172
172
|
),
|
|
173
173
|
)
|
|
174
174
|
.sort((a, b) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { deepClone, throttle } from '@milaboratories/helpers';
|
|
1
|
+
import { deepClone, isJsonEqual, throttle } from '@milaboratories/helpers';
|
|
2
2
|
import type { Mutable } from '@milaboratories/helpers';
|
|
3
3
|
import type { NavigationState, BlockOutputsBase, BlockState, Platforma } from '@platforma-sdk/model';
|
|
4
4
|
import { reactive, nextTick, computed, watch } from 'vue';
|
|
@@ -242,7 +242,9 @@ export function createApp<
|
|
|
242
242
|
},
|
|
243
243
|
autoSave: true,
|
|
244
244
|
onSave(newData: AppModel) {
|
|
245
|
-
|
|
245
|
+
if (!isJsonEqual(newData.args, snapshot.args) || !isJsonEqual(newData.ui, snapshot.ui)) {
|
|
246
|
+
setBlockArgsAndUiState(newData.args, newData.ui);
|
|
247
|
+
}
|
|
246
248
|
},
|
|
247
249
|
},
|
|
248
250
|
{
|