@milaboratories/milaboratories.ui-examples.ui 1.5.11 → 1.5.12
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 +6 -6
- package/CHANGELOG.md +8 -0
- package/dist/app.d.ts +5 -3
- package/dist/app.d.ts.map +1 -1
- package/dist/assets/{index-DVTP_zd1.css → index-B0kMAAC0.css} +1 -1
- package/dist/assets/{index-B325ak5O.js → index-BPgGDwkq.js} +112 -102
- package/dist/assets/{index-B325ak5O.js.map → index-BPgGDwkq.js.map} +1 -1
- package/dist/index.html +2 -2
- package/dist/pages/StatePage.vue.d.ts +3 -0
- package/dist/pages/StatePage.vue.d.ts.map +1 -0
- package/package.json +5 -5
- package/src/app.ts +2 -1
- package/src/pages/StatePage.vue +56 -0
package/dist/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta http-equiv="Content-Security-Policy" content="script-src 'self' blob: data: 'unsafe-eval';">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-BPgGDwkq.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./assets/index-B0kMAAC0.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="app"></div>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=StatePage.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatePage.vue.d.ts","sourceRoot":"","sources":["../../src/pages/StatePage.vue"],"names":[],"mappings":";AAwOA,wBAKG"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/milaboratories.ui-examples.ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"vue": "^3.5.13",
|
|
7
|
-
"@milaboratories/milaboratories.ui-examples.model": "1.2.
|
|
8
|
-
"@platforma-sdk/model": "^1.
|
|
7
|
+
"@milaboratories/milaboratories.ui-examples.model": "1.2.11",
|
|
8
|
+
"@platforma-sdk/model": "^1.41.0"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@vitejs/plugin-vue": "^5.2.3",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"ag-grid-vue3": "^33.3.2",
|
|
20
20
|
"rollup-plugin-sourcemaps2": "^0.5.2",
|
|
21
21
|
"@milaboratories/build-configs": "1.0.4",
|
|
22
|
+
"@platforma-sdk/ui-vue": "^1.41.0",
|
|
22
23
|
"@milaboratories/ts-configs": "1.0.4",
|
|
23
|
-
"@platforma-sdk/ui-vue": "^1.40.6",
|
|
24
24
|
"@milaboratories/helpers": "^1.6.18",
|
|
25
|
-
"@milaboratories/uikit": "^2.3.
|
|
25
|
+
"@milaboratories/uikit": "^2.3.16"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"dev": "vite",
|
package/src/app.ts
CHANGED
|
@@ -30,6 +30,7 @@ import RadioPage from './pages/RadioPage.vue';
|
|
|
30
30
|
import PlFileInputPage from './pages/PlFileInputPage.vue';
|
|
31
31
|
import PlErrorBoundaryPage from './pages/PlErrorBoundaryPage.vue';
|
|
32
32
|
import PlElementListPage from './pages/PlElementListPage.vue';
|
|
33
|
+
import StatePage from './pages/StatePage.vue';
|
|
33
34
|
|
|
34
35
|
export const sdkPlugin = defineApp(platforma, (app) => {
|
|
35
36
|
// Additional data
|
|
@@ -82,6 +83,7 @@ export const sdkPlugin = defineApp(platforma, (app) => {
|
|
|
82
83
|
},
|
|
83
84
|
routes: {
|
|
84
85
|
'/': () => IconsPage,
|
|
86
|
+
'/state': () => StatePage,
|
|
85
87
|
'/layout': () => LayoutPage,
|
|
86
88
|
'/log-view': () => LogViewPage,
|
|
87
89
|
'/modals': () => ModalsPage,
|
|
@@ -114,7 +116,6 @@ export const sdkPlugin = defineApp(platforma, (app) => {
|
|
|
114
116
|
};
|
|
115
117
|
}, {
|
|
116
118
|
debug: true,
|
|
117
|
-
deepPatchModel: true,
|
|
118
119
|
});
|
|
119
120
|
|
|
120
121
|
export const useApp = sdkPlugin.useApp;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { PlBlockPage, PlTextField, PlBtnPrimary, PlRow, PlIcon16 } from '@platforma-sdk/ui-vue';
|
|
3
|
+
import { useApp } from '../app';
|
|
4
|
+
import { onMounted, watch, ref } from 'vue';
|
|
5
|
+
import { isJsonEqual, uniqueId } from '@milaboratories/helpers';
|
|
6
|
+
|
|
7
|
+
const app = useApp();
|
|
8
|
+
|
|
9
|
+
onMounted(() => {
|
|
10
|
+
if (app.model.ui.datasets === undefined) {
|
|
11
|
+
app.model.ui.datasets = [];
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const addDataset = () => {
|
|
16
|
+
app.model.ui.datasets.push({ id: uniqueId(), label: 'New' });
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const removeDataset = (id: string) => {
|
|
20
|
+
app.model.ui.datasets = app.model.ui.datasets.filter((d) => d.id !== id);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const datasetsChangesCount = ref(0);
|
|
24
|
+
|
|
25
|
+
const isDatasetsEqual = ref(true);
|
|
26
|
+
|
|
27
|
+
watch(app.model.ui.datasets, (datasets, oldDatasets) => {
|
|
28
|
+
datasetsChangesCount.value++;
|
|
29
|
+
console.log(datasets, oldDatasets);
|
|
30
|
+
isDatasetsEqual.value = isJsonEqual(datasets, oldDatasets);
|
|
31
|
+
});
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<PlBlockPage style="max-width: 100%">
|
|
36
|
+
<template #title>State page</template>
|
|
37
|
+
<PlRow>{{ datasetsChangesCount }} {{ isDatasetsEqual }}</PlRow>
|
|
38
|
+
<PlRow wrap>
|
|
39
|
+
<div v-for="dataset in app.model.ui.datasets" :key="dataset.id" :class="$style.dataset">
|
|
40
|
+
<PlTextField v-model="dataset.label" label="Label" />
|
|
41
|
+
<PlIcon16 name="close" @click="removeDataset(dataset.id)" />
|
|
42
|
+
</div>
|
|
43
|
+
</PlRow>
|
|
44
|
+
<PlRow>
|
|
45
|
+
<PlBtnPrimary @click="addDataset">Add</PlBtnPrimary>
|
|
46
|
+
</PlRow>
|
|
47
|
+
</PlBlockPage>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style module>
|
|
51
|
+
.dataset {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 10px;
|
|
55
|
+
}
|
|
56
|
+
</style>
|