@platforma-sdk/ui-vue 1.42.2 → 1.42.4
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 +15 -15
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +15 -0
- package/dist/aggrid.js +4 -4
- package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js +7 -7
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +13 -13
- package/dist/components/PlAgDataTable/sources/table-source-v2.d.ts.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-source-v2.js +88 -85
- package/dist/components/PlAgDataTable/sources/table-source-v2.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-state-v2.js +6 -6
- package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +10 -10
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +2 -2
- package/dist/components/PlMultiSequenceAlignment/data.js +26 -26
- package/dist/components/PlTableFilters/filters-state.js +2 -2
- package/dist/defineApp.js +16 -16
- package/dist/internal/createAppV2.d.ts.map +1 -1
- package/dist/internal/createAppV2.js +61 -52
- package/dist/internal/createAppV2.js.map +1 -1
- package/dist/lib/model/common/dist/index.js +329 -317
- package/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAccordion/{ExpandTransition.vue2.js → ExpandTransition.vue.js} +1 -1
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue.js.map +1 -0
- package/dist/lib/ui/uikit/dist/components/PlAccordion/PlAccordionSection.vue2.js +1 -1
- package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js +16 -16
- package/dist/lib/ui/uikit/dist/components/PlFileInput/PlFileInput.vue.js.map +1 -1
- package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js +8 -8
- package/dist/lib/ui/uikit/dist/lib/model/common/dist/index.js.map +1 -1
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js +18 -18
- package/dist/lib/ui/uikit/dist/sdk/model/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@vueuse_core@13.3.0_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/core/index.js +44 -41
- package/dist/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/shared/index.js +122 -67
- package/dist/node_modules/.pnpm/@vueuse_shared@13.3.0_vue@3.5.13_typescript@5.6.3_/node_modules/@vueuse/shared/index.js.map +1 -1
- package/dist/sdk/model/dist/index.js +198 -206
- package/dist/sdk/model/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/components/PlAgDataTable/sources/table-source-v2.ts +9 -6
- package/src/internal/createAppV2.ts +22 -13
- package/dist/lib/ui/uikit/dist/components/PlAccordion/ExpandTransition.vue2.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/ui-vue",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/lib.js",
|
|
6
6
|
"styles": "dist/lib.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@vueuse/integrations": "^13.3.0",
|
|
26
26
|
"d3-format": "^3.1.0",
|
|
27
27
|
"zod": "~3.23.8",
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@milaboratories/
|
|
28
|
+
"@milaboratories/biowasm-tools": "^1.1.0",
|
|
29
|
+
"@platforma-sdk/model": "~1.42.4",
|
|
30
|
+
"@milaboratories/uikit": "2.3.27"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"happy-dom": "^15.11.7",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"yarpm": "^1.2.0",
|
|
44
44
|
"fast-json-patch": "^3.1.1",
|
|
45
45
|
"@faker-js/faker": "^9.2.0",
|
|
46
|
-
"@milaboratories/ts-configs": "1.0.5",
|
|
47
|
-
"@milaboratories/eslint-config": "^1.0.4",
|
|
48
46
|
"@milaboratories/build-configs": "1.0.5",
|
|
49
|
-
"@milaboratories/helpers": "^1.6.19"
|
|
47
|
+
"@milaboratories/helpers": "^1.6.19",
|
|
48
|
+
"@milaboratories/ts-configs": "1.0.5",
|
|
49
|
+
"@milaboratories/eslint-config": "^1.0.4"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"test": "vitest run --passWithNoTests",
|
|
@@ -3,12 +3,12 @@ import type {
|
|
|
3
3
|
PTableColumnId,
|
|
4
4
|
PTableColumnSpecColumn,
|
|
5
5
|
PTableValue,
|
|
6
|
+
PTableValueAxis,
|
|
6
7
|
} from '@platforma-sdk/model';
|
|
7
8
|
import {
|
|
8
9
|
canonicalizeJson,
|
|
9
10
|
getAxisId,
|
|
10
11
|
isColumnOptional,
|
|
11
|
-
mapPTableValueToAxisKey,
|
|
12
12
|
pTableValue,
|
|
13
13
|
type PFrameDriver,
|
|
14
14
|
type PlDataTableSheet,
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
isLabelColumn as isLabelColumnSpec,
|
|
23
23
|
isColumnHidden,
|
|
24
24
|
matchAxisId,
|
|
25
|
+
isPTableValueAxis,
|
|
25
26
|
} from '@platforma-sdk/model';
|
|
26
27
|
import type {
|
|
27
28
|
CellStyle,
|
|
@@ -74,11 +75,13 @@ function columns2rows(
|
|
|
74
75
|
): PlAgDataTableV2Row[] {
|
|
75
76
|
const rowData: PlAgDataTableV2Row[] = [];
|
|
76
77
|
for (let iRow = 0; iRow < columns[0].data.length; ++iRow) {
|
|
77
|
-
const axesKey = axes
|
|
78
|
-
|
|
79
|
-
pTableValue(columns[resultMapping[iAxis]], iRow)
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
const axesKey: PTableValueAxis[] = axes
|
|
79
|
+
.map((iAxis) => {
|
|
80
|
+
const value = pTableValue(columns[resultMapping[iAxis]], iRow);
|
|
81
|
+
if (!isPTableValueAxis(value))
|
|
82
|
+
throw new Error(`axis value is not a PTableValueAxis: ${JSON.stringify(value)}`);
|
|
83
|
+
return value;
|
|
84
|
+
});
|
|
82
85
|
const id = canonicalizeJson<PlTableRowId>(axesKey);
|
|
83
86
|
const row: PlAgDataTableV2Row = { id, axesKey };
|
|
84
87
|
fields.forEach((field, iCol) => {
|
|
@@ -3,13 +3,14 @@ import type { Mutable } from '@milaboratories/helpers';
|
|
|
3
3
|
import type { NavigationState, BlockOutputsBase, BlockState, PlatformaV2, ValueWithUTag, AuthorMarker } from '@platforma-sdk/model';
|
|
4
4
|
import { hasAbortError, unwrapResult } from '@platforma-sdk/model';
|
|
5
5
|
import type { Ref } from 'vue';
|
|
6
|
-
import { reactive, computed, ref
|
|
6
|
+
import { reactive, computed, ref } from 'vue';
|
|
7
7
|
import type { StateModelOptions, UnwrapOutputs, OutputValues, OutputErrors, AppSettings } from '../types';
|
|
8
8
|
import { createModel } from '../createModel';
|
|
9
9
|
import { parseQuery } from '../urls';
|
|
10
10
|
import { MultiError, unwrapValueOrErrors } from '../utils';
|
|
11
11
|
import { applyPatch } from 'fast-json-patch';
|
|
12
12
|
import { UpdateSerializer } from './UpdateSerializer';
|
|
13
|
+
import { watchIgnorable } from '@vueuse/core';
|
|
13
14
|
|
|
14
15
|
export const patchPoolingDelay = 100;
|
|
15
16
|
|
|
@@ -18,6 +19,14 @@ export const createNextAuthorMarker = (marker: AuthorMarker | undefined): Author
|
|
|
18
19
|
localVersion: (marker?.localVersion ?? 0) + 1,
|
|
19
20
|
});
|
|
20
21
|
|
|
22
|
+
const stringifyForDebug = (v: unknown) => {
|
|
23
|
+
try {
|
|
24
|
+
return JSON.stringify(v, null, 2);
|
|
25
|
+
} catch (err) {
|
|
26
|
+
return err instanceof Error ? err.message : String(err);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
21
30
|
/**
|
|
22
31
|
* Creates an application instance with reactive state management, outputs, and methods for state updates and navigation.
|
|
23
32
|
*
|
|
@@ -44,12 +53,12 @@ export function createAppV2<
|
|
|
44
53
|
) {
|
|
45
54
|
const debug = (msg: string, ...rest: unknown[]) => {
|
|
46
55
|
if (settings.debug) {
|
|
47
|
-
console.log(`%c>>> %c${msg}`, 'color: orange; font-weight: bold', 'color: orange',
|
|
56
|
+
console.log(`%c>>> %c${msg}`, 'color: orange; font-weight: bold', 'color: orange', ...rest.map((r) => stringifyForDebug(r)));
|
|
48
57
|
}
|
|
49
58
|
};
|
|
50
59
|
|
|
51
60
|
const error = (msg: string, ...rest: unknown[]) => {
|
|
52
|
-
console.error(`%c>>> %c${msg}`, 'color: red; font-weight: bold', 'color: red',
|
|
61
|
+
console.error(`%c>>> %c${msg}`, 'color: red; font-weight: bold', 'color: red', ...rest.map((r) => stringifyForDebug(r)));
|
|
53
62
|
};
|
|
54
63
|
|
|
55
64
|
const data = {
|
|
@@ -135,25 +144,23 @@ export function createAppV2<
|
|
|
135
144
|
};
|
|
136
145
|
};
|
|
137
146
|
|
|
138
|
-
const
|
|
147
|
+
const { ignoreUpdates } = watchIgnorable(
|
|
139
148
|
() => appModel.model,
|
|
140
149
|
(_newData) => {
|
|
141
150
|
const newData = deepClone(_newData);
|
|
142
|
-
debug('appModel.model', newData);
|
|
151
|
+
debug('setArgsAndUiStateQueue appModel.model', newData);
|
|
143
152
|
setArgsAndUiStateQueue.run(() => setBlockArgsAndUiState(newData.args, newData.ui).then(unwrapResult));
|
|
144
153
|
},
|
|
145
154
|
{ deep: true },
|
|
146
155
|
);
|
|
147
156
|
|
|
148
|
-
const
|
|
157
|
+
const updateAppModel = (newData: {
|
|
149
158
|
args: Args;
|
|
150
159
|
ui: UiState;
|
|
151
160
|
}) => {
|
|
152
|
-
debug('
|
|
153
|
-
appModelWatch.pause();
|
|
161
|
+
debug('updateAppModel', newData);
|
|
154
162
|
appModel.model.args = deepClone(newData.args) as Args;
|
|
155
163
|
appModel.model.ui = deepClone(newData.ui) as UiState;
|
|
156
|
-
appModelWatch.resume();
|
|
157
164
|
};
|
|
158
165
|
|
|
159
166
|
(async () => {
|
|
@@ -185,10 +192,12 @@ export function createAppV2<
|
|
|
185
192
|
|
|
186
193
|
// Immutable behavior, apply external changes to the snapshot
|
|
187
194
|
if (isAuthorChanged || data.isExternalSnapshot) {
|
|
188
|
-
debug('got external changes, applying them to the snapshot',
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
195
|
+
debug('got external changes, applying them to the snapshot', snapshot.value);
|
|
196
|
+
ignoreUpdates(() => {
|
|
197
|
+
snapshot.value = applyPatch(snapshot.value, patches.value, false, false).newDocument;
|
|
198
|
+
updateAppModel({ args: snapshot.value.args, ui: snapshot.value.ui });
|
|
199
|
+
data.isExternalSnapshot = isAuthorChanged;
|
|
200
|
+
});
|
|
192
201
|
} else {
|
|
193
202
|
// Mutable behavior
|
|
194
203
|
snapshot.value = applyPatch(snapshot.value, patches.value).newDocument;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandTransition.vue2.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;;;;;;;;;;;;;;;"}
|