@platforma-sdk/ui-vue 1.30.3 → 1.30.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/ui-vue",
3
- "version": "1.30.3",
3
+ "version": "1.30.5",
4
4
  "type": "module",
5
5
  "main": "dist/lib.umd.cjs",
6
6
  "module": "dist/lib.js",
@@ -23,8 +23,8 @@
23
23
  "canonicalize": "~2.1.0",
24
24
  "ag-grid-enterprise": "^33.0.4",
25
25
  "ag-grid-vue3": "^33.0.4",
26
- "@milaboratories/uikit": "^2.2.71",
27
- "@platforma-sdk/model": "^1.30.3"
26
+ "@platforma-sdk/model": "^1.30.3",
27
+ "@milaboratories/uikit": "^2.2.71"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@faker-js/faker": "^9.2.0",
@@ -45,8 +45,8 @@
45
45
  "semver": "^7.6.3",
46
46
  "@types/semver": "^7.5.8",
47
47
  "rollup-plugin-sourcemaps2": "^0.5.0",
48
- "@milaboratories/eslint-config": "^1.0.4",
49
- "@milaboratories/helpers": "^1.6.11"
48
+ "@milaboratories/helpers": "^1.6.11",
49
+ "@milaboratories/eslint-config": "^1.0.4"
50
50
  },
51
51
  "scripts": {
52
52
  "test": "vitest run --passWithNoTests",
@@ -79,11 +79,9 @@ export async function updatePFrameGridOptions(
79
79
  dataSpecsMap.set(specId(spec), i);
80
80
  });
81
81
  const specsToDataSpecsMapping = new Map<number, number>();
82
- const dataSpecsToSpecsMapping = new Map<number, number>();
83
82
  specs.forEach((spec, i) => {
84
83
  const dataSpecIdx = dataSpecsMap.get(specId(spec));
85
84
  specsToDataSpecsMapping.set(i, dataSpecIdx ?? -1);
86
- if (dataSpecIdx !== undefined) dataSpecsToSpecsMapping.set(dataSpecIdx, i);
87
85
  });
88
86
 
89
87
  const oldSourceId = gridState.value.sourceId;
@@ -131,21 +129,21 @@ export async function updatePFrameGridOptions(
131
129
 
132
130
  const fields = [...indices];
133
131
 
132
+ const firstColumnIdx = indices.findIndex((i) => specs[i].type === 'column');
134
133
  // process label columns
135
- for (let i = indices.length - 1; i >= 0; --i) {
134
+ for (let i = indices.length - 1; i >= firstColumnIdx; --i) {
136
135
  const idx = indices[i];
137
136
  if (!isLabelColumn(specs[idx])) continue;
138
137
 
139
138
  // axis of labels
140
139
  const axisId = getAxisId((specs[idx].spec as PColumnSpec).axesSpec[0]);
141
140
  const axisIdx = indices.findIndex((idx) => lodash.isEqual(specs[idx].id, axisId));
142
- if (axisIdx === -1) {
143
- // no axis, it was already processed
144
- continue;
141
+ if (axisIdx !== -1) {
142
+ indices[axisIdx] = idx;
143
+ } else {
144
+ console.warn(`multiple label columns match axisId: ${JSON.stringify(axisId)}`);
145
145
  }
146
146
 
147
- indices[axisIdx] = idx;
148
-
149
147
  // remove original axis
150
148
  indices.splice(i, 1);
151
149
  fields.splice(i, 1);