@milaboratories/milaboratories.ui-examples.ui 1.2.67 → 1.3.0

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,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta http-equiv="Content-Security-Policy" content="script-src 'self' blob:">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <script type="module" crossorigin src="./assets/index-CepiE1JP.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-D1v-HV97.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-DDxyQA7N.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@milaboratories/milaboratories.ui-examples.ui",
3
- "version": "1.2.67",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "vue": "^3.5.13",
7
- "@milaboratories/milaboratories.ui-examples.model": "1.0.50",
8
- "@platforma-sdk/model": "^1.18.0"
7
+ "@platforma-sdk/model": "^1.19.0",
8
+ "@milaboratories/milaboratories.ui-examples.model": "1.1.0"
9
9
  },
10
10
  "devDependencies": {
11
11
  "@vitejs/plugin-vue": "^5.2.1",
@@ -18,8 +18,8 @@
18
18
  "@ag-grid-community/client-side-row-model": "^32.3.3",
19
19
  "@ag-grid-community/core": "^32.3.3",
20
20
  "@ag-grid-community/theming": "^32.3.3",
21
- "@milaboratories/helpers": "^1.6.9",
22
- "@platforma-sdk/ui-vue": "^1.18.6"
21
+ "@platforma-sdk/ui-vue": "^1.19.0",
22
+ "@milaboratories/helpers": "^1.6.9"
23
23
  },
24
24
  "scripts": {
25
25
  "dev": "vite",
@@ -8,8 +8,9 @@ import {
8
8
  PlCloseModalBtn,
9
9
  PlDropdownLine,
10
10
  PlTextField,
11
+ PlBtnGhost,
11
12
  } from '@platforma-sdk/ui-vue';
12
- import { computed, reactive } from 'vue';
13
+ import { computed, reactive, ref } from 'vue';
13
14
 
14
15
  const data = reactive({
15
16
  title: 'Title example',
@@ -50,6 +51,12 @@ const currentLabel = computed({
50
51
  },
51
52
  });
52
53
 
54
+ const loading = ref(false);
55
+
56
+ const onClickSettings = () => {
57
+ loading.value = true;
58
+ setTimeout(() => loading.value = false, 2000);
59
+ };
53
60
  </script>
54
61
 
55
62
  <template>
@@ -64,6 +71,7 @@ const currentLabel = computed({
64
71
  />
65
72
  </template>
66
73
  <template #append>
74
+ <PlBtnGhost icon="settings" :loading="loading" @click="onClickSettings">Settings</PlBtnGhost>
67
75
  <PlBtnPrimary> Just a button</PlBtnPrimary>
68
76
  </template>
69
77
  <PlRow>
@@ -1,16 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, ref } from 'vue';
3
3
  import {
4
- type PlAgDataTableController,
5
4
  type PlDataTableSettings,
6
5
  PlAgDataTableToolsPanel,
7
6
  PlTableFilters,
8
- PlBtnGhost,
9
- PlMaskIcon24,
10
7
  PlBlockPage,
11
8
  PlAgDataTable,
12
- PlDropdownRef,
13
- PlSlideModal,
14
9
  } from '@platforma-sdk/ui-vue';
15
10
  import { useApp } from '../app';
16
11
  import type { PTableColumnSpec } from '@platforma-sdk/model';
@@ -28,19 +23,14 @@ if (!app.model.ui?.dataTableState) {
28
23
  };
29
24
  }
30
25
 
31
- const settingsOpen = ref<boolean>(false);
32
-
33
- const tableSettings = computed<PlDataTableSettings | undefined>(() =>
34
- app.model.ui.dataTableState!.anchorColumn
35
- ? {
36
- sourceType: 'ptable',
37
- pTable: app.model.outputs.pt,
38
- sheets: app.model.outputs.sheets,
39
- }
40
- : undefined,
41
- );
26
+ const tableSettings = computed<PlDataTableSettings | undefined>(() => (
27
+ {
28
+ sourceType: 'ptable',
29
+ pTable: app.model.outputs.pt,
30
+ sheets: [],
31
+ }
32
+ ));
42
33
  const columns = ref<PTableColumnSpec[]>([]);
43
- // const tableInstance = ref<PlAgDataTableController>();
44
34
  </script>
45
35
 
46
36
  <template>
@@ -50,12 +40,6 @@ const columns = ref<PTableColumnSpec[]>([]);
50
40
  <PlAgDataTableToolsPanel>
51
41
  <PlTableFilters v-model="app.model.ui.dataTableState!.filterModel" :columns="columns" />
52
42
  </PlAgDataTableToolsPanel>
53
- <PlBtnGhost @click.stop="() => (settingsOpen = true)">
54
- Settings
55
- <template #append>
56
- <PlMaskIcon24 name="settings" />
57
- </template>
58
- </PlBtnGhost>
59
43
  </template>
60
44
  <PlAgDataTable
61
45
  ref="tableInstance"
@@ -65,14 +49,5 @@ const columns = ref<PTableColumnSpec[]>([]);
65
49
  show-export-button
66
50
  @columns-changed="(newColumns) => (columns = newColumns)"
67
51
  />
68
- <PlSlideModal v-model="settingsOpen" :close-on-outside-click="true">
69
- <template #title>Settings</template>
70
- <PlDropdownRef
71
- v-model="app.model.ui.dataTableState!.anchorColumn"
72
- label="Select column"
73
- :options="app.model.outputs.inputOptions"
74
- clearable
75
- />
76
- </PlSlideModal>
77
52
  </PlBlockPage>
78
53
  </template>