@platforma-sdk/ui-vue 1.41.3 → 1.41.6
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/.turbo/turbo-build.log +21 -31
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +18 -0
- package/dist/aggrid.js +4 -4
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts +14 -3
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +252 -179
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +1 -1
- package/dist/components/PlAgDataTable/sources/focus-row.d.ts +8 -7
- package/dist/components/PlAgDataTable/sources/focus-row.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/focus-row.js +46 -31
- package/dist/components/PlAgDataTable/sources/focus-row.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-source-v2.d.ts +10 -5
- package/dist/components/PlAgDataTable/sources/table-source-v2.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-source-v2.js +144 -141
- package/dist/components/PlAgDataTable/sources/table-source-v2.js.map +1 -1
- package/dist/components/PlAgDataTable/types.d.ts +27 -1
- package/dist/components/PlAgDataTable/types.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/types.js.map +1 -1
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +1 -1
- package/dist/components/PlAgRowNumHeader.vue.js +1 -1
- package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +24 -24
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +2 -2
- package/dist/internal/test-helpers/BlockMock.d.ts +1 -0
- package/dist/internal/test-helpers/BlockMock.d.ts.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAccordion/{ExpandTransition.vue.js → ExpandTransition.vue2.js} +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js.map +1 -0
- package/dist/lib/ui/uikit/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAutocomplete/PlAutocomplete.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdown/PlDropdown.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdownLegacy/PlDropdownLegacy.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlDropdownMulti/PlDropdownMulti.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlTextArea/PlTextArea.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlTextField/PlTextField.vue.js +1 -1
- package/dist/lib/ui/uikit/dist/generated/components/svg/images/{SvgRequired.vue.js → SvgRequired.vue2.js} +1 -1
- package/dist/lib/ui/uikit/dist/generated/components/svg/images/SvgRequired.vue2.js.map +1 -0
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +1 -1
- package/dist/lib/util/helpers/dist/index.js +88 -73
- package/dist/lib/util/helpers/dist/index.js.map +1 -1
- package/dist/lib.js +73 -73
- package/dist/sdk/model/dist/index.js +82 -75
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/components/PlAgDataTable/PlAgDataTableV2.vue +172 -45
- package/src/components/PlAgDataTable/sources/focus-row.ts +38 -37
- package/src/components/PlAgDataTable/sources/table-source-v2.ts +113 -110
- package/src/components/PlAgDataTable/types.ts +30 -1
- package/src/internal/test-helpers/BlockMock.ts +5 -0
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue.js.map +0 -1
- package/dist/lib/ui/uikit/dist/generated/components/svg/images/SvgRequired.vue.js.map +0 -1
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
|
|
2
|
+
AxesSpec,
|
|
3
|
+
PTableColumnId,
|
|
4
|
+
PTableColumnSpecColumn,
|
|
5
|
+
PTableValue,
|
|
6
|
+
} from '@platforma-sdk/model';
|
|
3
7
|
import {
|
|
4
8
|
canonicalizeJson,
|
|
5
9
|
getAxisId,
|
|
6
10
|
isColumnOptional,
|
|
7
11
|
mapPTableValueToAxisKey,
|
|
8
12
|
pTableValue,
|
|
9
|
-
type PColumnSpec,
|
|
10
13
|
type PFrameDriver,
|
|
11
14
|
type PlDataTableSheet,
|
|
12
15
|
type PTableVector,
|
|
@@ -18,6 +21,7 @@ import {
|
|
|
18
21
|
type PlTableColumnIdJson,
|
|
19
22
|
isLabelColumn as isLabelColumnSpec,
|
|
20
23
|
isColumnHidden,
|
|
24
|
+
matchAxisId,
|
|
21
25
|
} from '@platforma-sdk/model';
|
|
22
26
|
import type {
|
|
23
27
|
CellStyle,
|
|
@@ -28,7 +32,6 @@ import type {
|
|
|
28
32
|
IServerSideGetRowsParams,
|
|
29
33
|
ManagedGridOptions,
|
|
30
34
|
} from 'ag-grid-enterprise';
|
|
31
|
-
import canonicalize from 'canonicalize';
|
|
32
35
|
import type { PlAgHeaderComponentParams, PlAgHeaderComponentType } from '../../PlAgColumnHeader';
|
|
33
36
|
import { PlAgColumnHeader } from '../../PlAgColumnHeader';
|
|
34
37
|
import { PlAgTextAndButtonCell } from '../../PlAgTextAndButtonCell';
|
|
@@ -41,11 +44,27 @@ import { makeRowNumberColDef, PlAgDataTableRowNumberColId } from './row-number';
|
|
|
41
44
|
import { getColumnRenderingSpec } from './value-rendering';
|
|
42
45
|
import type { Ref } from 'vue';
|
|
43
46
|
import { isJsonEqual } from '@milaboratories/helpers';
|
|
47
|
+
import type { DeferredCircular } from './focus-row';
|
|
44
48
|
|
|
45
49
|
export function isLabelColumn(column: PTableColumnSpec): column is PTableColumnSpecColumn {
|
|
46
50
|
return column.type === 'column' && isLabelColumnSpec(column.spec);
|
|
47
51
|
}
|
|
48
52
|
|
|
53
|
+
export function getPTableColumnId(spec: PTableColumnSpec): PTableColumnId {
|
|
54
|
+
switch (spec.type) {
|
|
55
|
+
case 'axis':
|
|
56
|
+
return {
|
|
57
|
+
type: 'axis',
|
|
58
|
+
id: getAxisId(spec.spec),
|
|
59
|
+
};
|
|
60
|
+
case 'column':
|
|
61
|
+
return {
|
|
62
|
+
type: 'column',
|
|
63
|
+
id: spec.id,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
49
68
|
/** Convert columnar data from the driver to rows, used by ag-grid */
|
|
50
69
|
function columns2rows(
|
|
51
70
|
fields: number[],
|
|
@@ -78,7 +97,7 @@ export async function calculateGridOptions({
|
|
|
78
97
|
pfDriver,
|
|
79
98
|
model,
|
|
80
99
|
sheets,
|
|
81
|
-
|
|
100
|
+
dataRenderedTracker,
|
|
82
101
|
hiddenColIds,
|
|
83
102
|
cellButtonAxisParams,
|
|
84
103
|
}: {
|
|
@@ -86,133 +105,120 @@ export async function calculateGridOptions({
|
|
|
86
105
|
pfDriver: PFrameDriver;
|
|
87
106
|
model: PlDataTableModel;
|
|
88
107
|
sheets: PlDataTableSheet[];
|
|
89
|
-
|
|
108
|
+
dataRenderedTracker: DeferredCircular<GridApi<PlAgDataTableV2Row>>;
|
|
90
109
|
hiddenColIds?: PlTableColumnIdJson[];
|
|
91
110
|
cellButtonAxisParams?: PlAgCellButtonAxisParams;
|
|
92
|
-
}): Promise<Pick<ManagedGridOptions<PlAgDataTableV2Row>, 'columnDefs' | 'serverSideDatasource'
|
|
93
|
-
const
|
|
111
|
+
}): Promise<Pick<ManagedGridOptions<PlAgDataTableV2Row>, 'columnDefs' | 'serverSideDatasource'> & { axesSpec: AxesSpec }> {
|
|
112
|
+
const stateGeneration = generation.value;
|
|
113
|
+
const stateChangedError = new Error('table state generation changed');
|
|
114
|
+
|
|
115
|
+
// get specs of the full table
|
|
94
116
|
const specs = await pfDriver.getSpec(model.fullTableHandle);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
if (stateGeneration !== generation.value) throw stateChangedError;
|
|
118
|
+
|
|
119
|
+
// get specs of the visible table (with hidden columns omitted)
|
|
120
|
+
const pt = model.visibleTableHandle;
|
|
98
121
|
const dataSpecs = await pfDriver.getSpec(pt);
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
122
|
+
if (stateGeneration !== generation.value) throw stateChangedError;
|
|
123
|
+
|
|
124
|
+
// create index mapping from full specs to visible subset (hidden columns would have -1)
|
|
125
|
+
const specId = (spec: PTableColumnSpec) => canonicalizeJson<PTableColumnId>(getPTableColumnId(spec));
|
|
126
|
+
const dataSpecsMap = new Map(
|
|
127
|
+
dataSpecs.entries().map(([i, spec]) => [specId(spec), i]),
|
|
128
|
+
);
|
|
129
|
+
const specsToDataSpecsMapping = new Map(
|
|
130
|
+
specs.entries().map(([i, spec]) => {
|
|
131
|
+
const dataSpecIdx = dataSpecsMap.get(specId(spec)) ?? -1;
|
|
132
|
+
if (dataSpecIdx === -1 && spec.type === 'axis')
|
|
133
|
+
throw new Error(`axis ${JSON.stringify(spec.spec)} not present in join result`);
|
|
134
|
+
return [i, dataSpecIdx];
|
|
135
|
+
}),
|
|
136
|
+
);
|
|
110
137
|
|
|
111
|
-
|
|
112
|
-
if (numberOfAxes === -1) numberOfAxes = specs.length;
|
|
138
|
+
// gether indices of columns that would be displayed in the table
|
|
113
139
|
|
|
114
|
-
|
|
115
|
-
const
|
|
140
|
+
const sheetAxesIds = sheets.map((sheet) => getAxisId(sheet.axis));
|
|
141
|
+
const isPartitionedAxis = (axisId: AxisId) => sheetAxesIds.some((id) => matchAxisId(id, axisId));
|
|
142
|
+
|
|
143
|
+
const labelColumns: { axisId: AxisId; labelColumnIdx: number }[] = [];
|
|
144
|
+
const setLabelColumnIndex = (axisId: AxisId, labelColumnIdx: number) => {
|
|
145
|
+
if (!labelColumns.some((info) => matchAxisId(info.axisId, axisId))) {
|
|
146
|
+
labelColumns.push({ axisId, labelColumnIdx });
|
|
147
|
+
} else {
|
|
148
|
+
console.warn(`multiple label columns match axisId: ${JSON.stringify(axisId)}`);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
const getLabelColumnIndex = (axisId: AxisId) => {
|
|
152
|
+
return labelColumns.find((info) => matchAxisId(info.axisId, axisId))?.labelColumnIdx ?? -1;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
// filter out partitioned axes, label columns and hidden columns
|
|
156
|
+
let indices = specs.entries()
|
|
116
157
|
.filter(
|
|
117
|
-
(i) => {
|
|
118
|
-
const spec = specs[i];
|
|
158
|
+
([i, spec]) => {
|
|
119
159
|
switch (spec.type) {
|
|
120
|
-
case 'axis':
|
|
121
|
-
{
|
|
122
|
-
return !sheets.some(
|
|
123
|
-
(sheet) => isJsonEqual(getAxisId(sheet.axis), spec.id),
|
|
124
|
-
);
|
|
125
|
-
}
|
|
160
|
+
case 'axis': return !isPartitionedAxis(spec.id);
|
|
126
161
|
case 'column':
|
|
127
|
-
{
|
|
128
162
|
if (isLabelColumnSpec(spec.spec)) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return
|
|
163
|
+
const labeledAxisId = getAxisId(spec.spec.axesSpec[0]);
|
|
164
|
+
if (!isPartitionedAxis(labeledAxisId)) {
|
|
165
|
+
setLabelColumnIndex(labeledAxisId, i);
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
134
168
|
}
|
|
135
|
-
|
|
169
|
+
return !isColumnHidden(spec.spec);
|
|
136
170
|
}
|
|
137
171
|
},
|
|
138
172
|
)
|
|
139
|
-
.
|
|
140
|
-
.
|
|
141
|
-
if (specs[a].type !== specs[b].type) return specs[a].type === 'axis' ? -1 : 1;
|
|
173
|
+
.map(([i]) => i)
|
|
174
|
+
.toArray();
|
|
142
175
|
|
|
143
|
-
|
|
144
|
-
|
|
176
|
+
// order columns by priority
|
|
177
|
+
indices.sort((a, b) => {
|
|
178
|
+
if (specs[a].type !== specs[b].type) return specs[a].type === 'axis' ? -1 : 1;
|
|
145
179
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return Number(bPriority) - Number(aPriority);
|
|
149
|
-
});
|
|
180
|
+
const aPriority = specs[a].spec.annotations?.['pl7.app/table/orderPriority'];
|
|
181
|
+
const bPriority = specs[b].spec.annotations?.['pl7.app/table/orderPriority'];
|
|
150
182
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
for (let i = indices.length - 1; i >= firstColumnIdx; --i) {
|
|
156
|
-
const idx = indices[i];
|
|
157
|
-
if (!isLabelColumn(specs[idx])) continue;
|
|
183
|
+
if (aPriority === undefined) return bPriority === undefined ? 0 : 1;
|
|
184
|
+
if (bPriority === undefined) return -1;
|
|
185
|
+
return Number(bPriority) - Number(aPriority);
|
|
186
|
+
});
|
|
158
187
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
188
|
+
// fields are indices of columns that would go to columnDefs
|
|
189
|
+
const fields = [...indices];
|
|
190
|
+
// replace axes with label columns
|
|
191
|
+
indices = indices.map((i) => {
|
|
192
|
+
const spec = specs[i];
|
|
193
|
+
if (spec.type === 'axis') {
|
|
194
|
+
const labelColumnIdx = getLabelColumnIndex(spec.id);
|
|
195
|
+
if (labelColumnIdx !== -1) {
|
|
196
|
+
return labelColumnIdx;
|
|
197
|
+
}
|
|
166
198
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
fields.splice(i, 1);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const columnDefs: ColDef<PlAgDataTableV2Row>[] = [
|
|
199
|
+
return i;
|
|
200
|
+
});
|
|
201
|
+
const columnDefs: ColDef<PlAgDataTableV2Row, PTableValue | PTableHidden>[] = [
|
|
174
202
|
makeRowNumberColDef(),
|
|
175
203
|
...fields.map((field, index) => makeColDef(field, specs[field], specs[indices[index]], hiddenColIds, cellButtonAxisParams)),
|
|
176
204
|
];
|
|
177
205
|
|
|
178
|
-
//
|
|
179
|
-
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
const axisToFieldIdx = new Map<number, number>();
|
|
184
|
-
for (let i = 0; i < numberOfAxes; ++i) axisToFieldIdx.set(i, -1);
|
|
185
|
-
|
|
186
|
-
allIndices.forEach((idx, i) => {
|
|
187
|
-
if (axisToFieldIdx.has(idx)) axisToFieldIdx.set(idx, i);
|
|
188
|
-
});
|
|
189
|
-
// at this point we have axis indices that are not listed in indices set to -1 in axisToFieldIdx
|
|
190
|
-
|
|
191
|
-
// adding those indices at the end of allIndices array, to make sure we have all the axes in our response
|
|
192
|
-
for (const [key, value] of axisToFieldIdx) {
|
|
193
|
-
if (value === -1) {
|
|
194
|
-
axisToFieldIdx.set(key, allIndices.length /* at this index value will be inserted in the next line */);
|
|
195
|
-
allIndices.push(key);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// Construct the `axes` array for key generation in `columns2rows`.
|
|
200
|
-
// The key components should be ordered according to the display order of axis columns from the `fields` array.
|
|
201
|
-
const axes: number[] = fields
|
|
202
|
-
.filter((field) => specs[field].type === 'axis')
|
|
203
|
-
.map((field) => {
|
|
204
|
-
const r = allIndices.indexOf(field);
|
|
206
|
+
// mix in indices of skipped axes (axes that were partitioned or replaced with label columns)
|
|
207
|
+
const axesSpec = specs.values().filter((spec) => spec.type === 'axis').map((spec) => spec.spec).toArray();
|
|
208
|
+
const axes = axesSpec.keys()
|
|
209
|
+
.map((i) => {
|
|
210
|
+
let r = indices.indexOf(i);
|
|
205
211
|
if (r === -1) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
);
|
|
212
|
+
r = indices.length;
|
|
213
|
+
indices.push(i);
|
|
209
214
|
}
|
|
210
215
|
return r;
|
|
211
|
-
})
|
|
216
|
+
})
|
|
217
|
+
.toArray();
|
|
212
218
|
|
|
213
219
|
const requestIndices: number[] = [];
|
|
214
220
|
const resultMapping: number[] = [];
|
|
215
|
-
|
|
221
|
+
indices.forEach((idx) => {
|
|
216
222
|
const dataSpecIdx = specsToDataSpecsMapping.get(idx)!;
|
|
217
223
|
if (dataSpecIdx !== -1) {
|
|
218
224
|
resultMapping.push(requestIndices.length);
|
|
@@ -222,7 +228,6 @@ export async function calculateGridOptions({
|
|
|
222
228
|
}
|
|
223
229
|
});
|
|
224
230
|
|
|
225
|
-
const stateGeneration = generation.value;
|
|
226
231
|
let rowCount = -1;
|
|
227
232
|
let lastParams: IServerSideGetRowsParams | undefined = undefined;
|
|
228
233
|
const serverSideDatasource: IServerSideDatasource<PlAgDataTableV2Row> = {
|
|
@@ -270,20 +275,18 @@ export async function calculateGridOptions({
|
|
|
270
275
|
.filter((column) => column.getColId() !== PlAgDataTableRowNumberColId),
|
|
271
276
|
);
|
|
272
277
|
params.api.setGridOption('loading', false);
|
|
278
|
+
dataRenderedTracker.resolve(params.api);
|
|
273
279
|
} catch (error: unknown) {
|
|
274
280
|
if (stateGeneration !== generation.value || params.api.isDestroyed()) return params.fail();
|
|
275
281
|
params.api.setGridOption('loading', true);
|
|
276
282
|
params.fail();
|
|
277
283
|
console.trace(error);
|
|
278
|
-
} finally {
|
|
279
|
-
if (!params.api.isDestroyed()) {
|
|
280
|
-
track(params.api);
|
|
281
|
-
}
|
|
282
284
|
}
|
|
283
285
|
},
|
|
284
286
|
};
|
|
285
287
|
|
|
286
288
|
return {
|
|
289
|
+
axesSpec,
|
|
287
290
|
columnDefs,
|
|
288
291
|
serverSideDatasource,
|
|
289
292
|
};
|
|
@@ -304,7 +307,7 @@ export function makeColDef(
|
|
|
304
307
|
labeledSpec: PTableColumnSpec,
|
|
305
308
|
hiddenColIds: PlTableColumnIdJson[] | undefined,
|
|
306
309
|
cellButtonAxisParams?: PlAgCellButtonAxisParams,
|
|
307
|
-
): ColDef {
|
|
310
|
+
): ColDef<PlAgDataTableV2Row, PTableValue | PTableHidden> {
|
|
308
311
|
const colId = canonicalizeJson<PlTableColumnId>({
|
|
309
312
|
source: spec,
|
|
310
313
|
labeled: labeledSpec,
|
|
@@ -324,8 +327,8 @@ export function makeColDef(
|
|
|
324
327
|
colId,
|
|
325
328
|
mainMenuItems: defaultMainMenuItems,
|
|
326
329
|
context: spec,
|
|
327
|
-
field: iCol
|
|
328
|
-
headerName: labeledSpec.spec.annotations?.['pl7.app/label']?.trim() ??
|
|
330
|
+
field: `${iCol}`,
|
|
331
|
+
headerName: labeledSpec.spec.annotations?.['pl7.app/label']?.trim() ?? `Unlabeled ${spec.type} ${iCol}`,
|
|
329
332
|
lockPosition: spec.type === 'axis',
|
|
330
333
|
hide: hiddenColIds?.includes(colId) ?? isColumnOptional(spec.spec),
|
|
331
334
|
valueFormatter: columnRenderingSpec.valueFormatter,
|
|
@@ -174,8 +174,37 @@ export type PlAgDataTableV2Controller = {
|
|
|
174
174
|
/**
|
|
175
175
|
* Scroll table to make row with provided key visible
|
|
176
176
|
* Warning: works reliably only in client side mode.
|
|
177
|
+
* @returns `true` if row was found and focused, `false` otherwise
|
|
177
178
|
*/
|
|
178
|
-
focusRow: (rowKey: PTableKey) => Promise<
|
|
179
|
+
focusRow: (rowKey: PTableKey) => Promise<boolean>;
|
|
180
|
+
/**
|
|
181
|
+
* Update selection in the table.
|
|
182
|
+
* @param axesIds - axes ids identifying axes key values in `selectedKeys`
|
|
183
|
+
* @param selectedKeys - axes keys of the rows to select
|
|
184
|
+
* Warning: update will be ignored if axes ids cannot be correctly resolved
|
|
185
|
+
* @returns `true` if selection was updated, `false` otherwise
|
|
186
|
+
*/
|
|
187
|
+
updateSelection: ({
|
|
188
|
+
axesSpec,
|
|
189
|
+
selectedKeys,
|
|
190
|
+
}: {
|
|
191
|
+
axesSpec: AxisId[];
|
|
192
|
+
selectedKeys: PTableKey[];
|
|
193
|
+
}) => Promise<boolean>;
|
|
194
|
+
/**
|
|
195
|
+
* Get number of rows in the table.
|
|
196
|
+
* @returns number of rows
|
|
197
|
+
*/
|
|
198
|
+
getRowCount: () => Promise<undefined | number>;
|
|
199
|
+
/**
|
|
200
|
+
* Get row by index or axes key.
|
|
201
|
+
* @param index - row index or axes key
|
|
202
|
+
* @returns row spec and data, `undefined` if row was not loaded
|
|
203
|
+
*/
|
|
204
|
+
getRow: (index: number | PlTableRowId) => Promise<undefined | {
|
|
205
|
+
spec: PTableColumnSpec[];
|
|
206
|
+
data: PTableValue[];
|
|
207
|
+
}>;
|
|
179
208
|
};
|
|
180
209
|
|
|
181
210
|
export type PlTableRowId = PTableKey;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandTransition.vue.js","sources":["../../../../../../../../../lib/ui/uikit/src/components/PlAccordion/ExpandTransition.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nconst onStart = (el: Element) => {\n el.classList.add('expand-collapse-fix');\n (el as HTMLElement).style.setProperty('--component-height', el.scrollHeight + 'px');\n};\n\nconst onAfter = (el: Element) => {\n (el as HTMLElement).style.removeProperty('--component-height');\n el.classList.remove('expand-collapse-fix');\n};\n</script>\n\n<template>\n <Transition name=\"expand-collapse\" @enter=\"onStart\" @leave=\"onStart\" @after-enter=\"onAfter\" @after-leave=\"onAfter\">\n <slot/>\n </Transition>\n</template>\n\n<style>\n.expand-collapse-fix {\n overflow: hidden;\n}\n\n.expand-collapse-enter-active,\n.expand-collapse-leave-active {\n transition:\n height 0.2s ease-in-out,\n opacity 0.2s ease-in-out;\n height: var(--component-height);\n}\n\n.expand-collapse-enter-from,\n.expand-collapse-leave-to {\n opacity: 0.5;\n height: 0;\n}\n</style>\n"],"names":["onStart","el","onAfter"],"mappings":";;;;AACMA,UAAAA,IAAU,CAACC,MAAgB;AAC5BA,QAAA,UAAU,IAAI,qBAAqB,GACrCA,EAAmB,MAAM,YAAY,sBAAsBA,EAAG,eAAe,IAAI;AAAA,IAAA,GAG9EC,IAAU,CAACD,MAAgB;AAC9BA,QAAmB,MAAM,eAAe,oBAAoB,GAC1DA,EAAA,UAAU,OAAO,qBAAqB;AAAA,IAC3C;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SvgRequired.vue.js","sources":["../../../../../../../../../../../lib/ui/uikit/src/generated/components/svg/images/SvgRequired.vue"],"sourcesContent":["<!-- ⚠️ AUTOGENERATED. DO NOT EDIT. -->\n<script lang=\"ts\">\nimport '../svg-styles.css';\nexport default { name: 'SvgRequired' };\n</script>\n\n<template>\n <div class=\"svg-icon SvgRequired\" style=\"width: 5px; height: 12px\" />\n</template>\n\n<style>\n .SvgRequired { background-image: url(\"data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%225%22%20height%3D%2212%22%20viewBox%3D%220%200%205%2012%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M1.51685%204.8L2.5%203.34159L3.47612%204.8L4.39607%204.12743L3.31461%202.7469L5%202.25133L4.64888%201.16106L3.00562%201.77699L3.06882%200H1.93118L1.99438%201.77699L0.351124%201.16106L0%202.25133L1.68539%202.7469L0.59691%204.12743L1.51685%204.8Z%22%20fill%3D%22%23F1222F%22%2F%3E%3C%2Fsvg%3E\"); }\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAOoC,MAAA,IAAA;AAAA,EAAA,OAAA;AAAA;;;;;;"}
|