@milaboratories/milaboratories.ui-examples.model 1.1.18 → 1.1.20
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 +11 -11
- package/CHANGELOG.md +12 -0
- package/dist/bundle.js +42 -26
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +41 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +41 -25
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
- package/src/index.ts +42 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/milaboratories.ui-examples.model",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"description": "Block model",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"zod": "~3.23.8",
|
|
11
|
-
"@platforma-sdk/model": "1.22.
|
|
11
|
+
"@platforma-sdk/model": "1.22.59"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"typescript": "~5.5.4",
|
|
15
15
|
"vite": "^5.4.11",
|
|
16
16
|
"tsup": "~8.3.5",
|
|
17
|
-
"@platforma-sdk/block-tools": "2.5.
|
|
17
|
+
"@platforma-sdk/block-tools": "2.5.14"
|
|
18
18
|
},
|
|
19
19
|
"tsup": {
|
|
20
20
|
"entry": [
|
package/src/index.ts
CHANGED
|
@@ -41,35 +41,51 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
41
41
|
|
|
42
42
|
.output('pt', (ctx) => {
|
|
43
43
|
if (!ctx.uiState?.dataTableState?.tableState.pTableParams?.filters) return undefined;
|
|
44
|
-
return createPlDataTable(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
type: 'Int',
|
|
57
|
-
name: 'index',
|
|
58
|
-
annotations: {
|
|
59
|
-
'pl7.app/label': 'Int axis',
|
|
60
|
-
},
|
|
44
|
+
return createPlDataTable(
|
|
45
|
+
ctx,
|
|
46
|
+
[
|
|
47
|
+
{
|
|
48
|
+
id: 'example' as PObjectId,
|
|
49
|
+
spec: {
|
|
50
|
+
kind: 'PColumn',
|
|
51
|
+
valueType: 'String',
|
|
52
|
+
name: 'example',
|
|
53
|
+
annotations: {
|
|
54
|
+
'pl7.app/label': 'String column',
|
|
55
|
+
'pl7.app/discreteValues': '["up","down"]',
|
|
61
56
|
},
|
|
57
|
+
axesSpec: [
|
|
58
|
+
{
|
|
59
|
+
type: 'Int',
|
|
60
|
+
name: 'index',
|
|
61
|
+
annotations: {
|
|
62
|
+
'pl7.app/label': 'Int axis',
|
|
63
|
+
'pl7.app/discreteValues': '[1,2]',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'Float',
|
|
68
|
+
name: 'value',
|
|
69
|
+
annotations: {
|
|
70
|
+
'pl7.app/label': 'Float axis',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
data: [
|
|
76
|
+
{ key: [1, 1.1], val: '1' },
|
|
77
|
+
{ key: [2, 2.2], val: '2' },
|
|
62
78
|
],
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
} satisfies PColumn<PColumnValues>,
|
|
80
|
+
],
|
|
81
|
+
ctx.uiState.dataTableState.tableState,
|
|
82
|
+
{
|
|
83
|
+
filters: [
|
|
84
|
+
...(ctx.uiState.dataTableState.tableState.pTableParams?.filters ?? []),
|
|
85
|
+
...(ctx.uiState.dataTableState.filterModel?.filters ?? []),
|
|
67
86
|
],
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
...(ctx.uiState.dataTableState.tableState.pTableParams?.filters ?? []),
|
|
71
|
-
...(ctx.uiState.dataTableState.filterModel?.filters ?? []),
|
|
72
|
-
]);
|
|
87
|
+
},
|
|
88
|
+
);
|
|
73
89
|
})
|
|
74
90
|
|
|
75
91
|
.sections((ctx) => {
|