@milaboratories/milaboratories.ui-examples.ui 1.5.10 → 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/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-Bc8FSKwj.js"></script>
8
- <link rel="stylesheet" crossorigin href="./assets/index-DVTP_zd1.css">
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>
@@ -1 +1 @@
1
- {"version":3,"file":"PlAgDataTableV2Page.vue.d.ts","sourceRoot":"","sources":["../../src/pages/PlAgDataTableV2Page.vue"],"names":[],"mappings":";AAofA,wBAKG"}
1
+ {"version":3,"file":"PlAgDataTableV2Page.vue.d.ts","sourceRoot":"","sources":["../../src/pages/PlAgDataTableV2Page.vue"],"names":[],"mappings":";AA4dA,wBAKG"}
@@ -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.10",
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.9",
8
- "@platforma-sdk/model": "^1.40.5"
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",
@@ -18,11 +18,11 @@
18
18
  "ag-grid-enterprise": "^33.3.2",
19
19
  "ag-grid-vue3": "^33.3.2",
20
20
  "rollup-plugin-sourcemaps2": "^0.5.2",
21
- "@milaboratories/ts-configs": "1.0.4",
22
21
  "@milaboratories/build-configs": "1.0.4",
23
- "@platforma-sdk/ui-vue": "^1.40.5",
22
+ "@platforma-sdk/ui-vue": "^1.41.0",
23
+ "@milaboratories/ts-configs": "1.0.4",
24
24
  "@milaboratories/helpers": "^1.6.18",
25
- "@milaboratories/uikit": "^2.3.14"
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;
@@ -10,7 +10,6 @@ import {
10
10
  PlBtnGhost,
11
11
  PlSlideModal,
12
12
  usePlDataTableSettingsV2,
13
- type PlTableLabeledSelectionModel,
14
13
  type PlAgDataTableV2Controller,
15
14
  } from '@platforma-sdk/ui-vue';
16
15
  import type { ICellRendererParams } from 'ag-grid-enterprise';
@@ -92,15 +91,6 @@ watch(
92
91
  (selection) => console.log(`selection changed`, toValue(selection)),
93
92
  );
94
93
 
95
- const selectionLabeled = ref<PlTableLabeledSelectionModel>({
96
- spec: [],
97
- selectedLabeledKeys: [],
98
- });
99
- watch(
100
- () => selectionLabeled.value,
101
- (selection) => console.log(`selectionLabeled changed`, toValue(selection)),
102
- );
103
-
104
94
  const reactiveText = ref(false);
105
95
 
106
96
  const now = ref(new Date());
@@ -154,7 +144,6 @@ watch(
154
144
  ref="tableRef"
155
145
  v-model="app.model.ui.dataTableV2.state"
156
146
  v-model:selection="selection"
157
- v-model:selection-labeled="selectionLabeled"
158
147
  :settings="tableSettings"
159
148
  :cell-renderer-selector="cellRendererSelector"
160
149
  v-bind="reactiveTextProps"
@@ -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>