@milaboratories/milaboratories.ui-examples.model 1.2.23 → 1.2.25
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 +13 -13
- package/CHANGELOG.md +13 -0
- package/dist/bundle.js +781 -685
- package/dist/bundle.js.map +1 -1
- package/dist/index.cjs +44 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +45 -44
- package/dist/index.js.map +1 -1
- package/dist/model.json +1 -1
- package/package.json +3 -3
- package/src/index.ts +62 -57
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/milaboratories.ui-examples.model",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.25",
|
|
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.42.
|
|
11
|
+
"@platforma-sdk/model": "1.42.16"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"typescript": "~5.6.3",
|
|
15
15
|
"vite": "^6.3.5",
|
|
16
16
|
"tsup": "~8.3.5",
|
|
17
|
-
"@platforma-sdk/block-tools": "2.5.
|
|
17
|
+
"@platforma-sdk/block-tools": "2.5.82"
|
|
18
18
|
},
|
|
19
19
|
"tsup": {
|
|
20
20
|
"entry": [
|
package/src/index.ts
CHANGED
|
@@ -9,9 +9,13 @@ import type {
|
|
|
9
9
|
PlDataTableSheet,
|
|
10
10
|
} from '@platforma-sdk/model';
|
|
11
11
|
import {
|
|
12
|
+
Annotation,
|
|
12
13
|
BlockModel,
|
|
13
14
|
createPlDataTableStateV2,
|
|
14
15
|
createPlDataTableV2,
|
|
16
|
+
PColumnName,
|
|
17
|
+
stringifyJson,
|
|
18
|
+
ValueType,
|
|
15
19
|
} from '@platforma-sdk/model';
|
|
16
20
|
import { z } from 'zod';
|
|
17
21
|
|
|
@@ -99,12 +103,12 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
99
103
|
const sheets = [
|
|
100
104
|
{
|
|
101
105
|
axis: {
|
|
102
|
-
type:
|
|
106
|
+
type: ValueType.Int,
|
|
103
107
|
name: 'part',
|
|
104
108
|
annotations: {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
},
|
|
109
|
+
[Annotation.Label]: 'Partitioned axis',
|
|
110
|
+
[Annotation.DiscreteValues]: stringifyJson([0, 1]),
|
|
111
|
+
} satisfies Annotation,
|
|
108
112
|
},
|
|
109
113
|
options: [
|
|
110
114
|
{ value: 0, label: 'Partition 1' },
|
|
@@ -123,28 +127,28 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
123
127
|
id: 'column1' as PObjectId,
|
|
124
128
|
spec: {
|
|
125
129
|
kind: 'PColumn',
|
|
126
|
-
valueType:
|
|
130
|
+
valueType: ValueType.String,
|
|
127
131
|
name: 'example',
|
|
128
132
|
annotations: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
},
|
|
133
|
+
[Annotation.Label]: 'String column',
|
|
134
|
+
[Annotation.DiscreteValues]: stringifyJson(['up', 'down']),
|
|
135
|
+
[Annotation.Table.OrderPriority]: stringifyJson(101),
|
|
136
|
+
} satisfies Annotation,
|
|
133
137
|
axesSpec: [
|
|
134
138
|
{
|
|
135
|
-
type:
|
|
139
|
+
type: ValueType.Int,
|
|
136
140
|
name: 'part',
|
|
137
141
|
annotations: {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
},
|
|
142
|
+
[Annotation.Label]: 'Partitioned axis',
|
|
143
|
+
[Annotation.DiscreteValues]: stringifyJson([0, 1]),
|
|
144
|
+
} satisfies Annotation,
|
|
141
145
|
},
|
|
142
146
|
{
|
|
143
|
-
type:
|
|
147
|
+
type: ValueType.Int,
|
|
144
148
|
name: 'index',
|
|
145
149
|
annotations: {
|
|
146
|
-
|
|
147
|
-
},
|
|
150
|
+
[Annotation.Label]: 'Int axis',
|
|
151
|
+
} satisfies Annotation,
|
|
148
152
|
},
|
|
149
153
|
],
|
|
150
154
|
},
|
|
@@ -160,28 +164,28 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
160
164
|
id: 'column2' as PObjectId,
|
|
161
165
|
spec: {
|
|
162
166
|
kind: 'PColumn',
|
|
163
|
-
valueType:
|
|
167
|
+
valueType: ValueType.Float,
|
|
164
168
|
name: 'value',
|
|
165
169
|
annotations: {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
+
[Annotation.Label]: 'Float column',
|
|
171
|
+
[Annotation.Table.Visibility]: 'optional',
|
|
172
|
+
[Annotation.Table.OrderPriority]: stringifyJson(100),
|
|
173
|
+
} satisfies Annotation,
|
|
170
174
|
axesSpec: [
|
|
171
175
|
{
|
|
172
|
-
type:
|
|
176
|
+
type: ValueType.Int,
|
|
173
177
|
name: 'part',
|
|
174
178
|
annotations: {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
},
|
|
179
|
+
[Annotation.Label]: 'Partitioned axis',
|
|
180
|
+
[Annotation.DiscreteValues]: stringifyJson([0, 1]),
|
|
181
|
+
} satisfies Annotation,
|
|
178
182
|
},
|
|
179
183
|
{
|
|
180
|
-
type:
|
|
184
|
+
type: ValueType.Int,
|
|
181
185
|
name: 'index',
|
|
182
186
|
annotations: {
|
|
183
|
-
|
|
184
|
-
},
|
|
187
|
+
[Annotation.Label]: 'Int axis',
|
|
188
|
+
} satisfies Annotation,
|
|
185
189
|
},
|
|
186
190
|
],
|
|
187
191
|
},
|
|
@@ -197,18 +201,18 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
197
201
|
id: 'labelColumn' as PObjectId,
|
|
198
202
|
spec: {
|
|
199
203
|
kind: 'PColumn',
|
|
200
|
-
valueType:
|
|
201
|
-
name:
|
|
204
|
+
valueType: ValueType.Int,
|
|
205
|
+
name: PColumnName.Label,
|
|
202
206
|
annotations: {
|
|
203
|
-
|
|
204
|
-
},
|
|
207
|
+
[Annotation.Label]: 'Int axis labels',
|
|
208
|
+
} satisfies Annotation,
|
|
205
209
|
axesSpec: [
|
|
206
210
|
{
|
|
207
|
-
type:
|
|
211
|
+
type: ValueType.Int,
|
|
208
212
|
name: 'index',
|
|
209
213
|
annotations: {
|
|
210
|
-
|
|
211
|
-
},
|
|
214
|
+
[Annotation.Label]: 'Int axis',
|
|
215
|
+
} satisfies Annotation,
|
|
212
216
|
},
|
|
213
217
|
],
|
|
214
218
|
},
|
|
@@ -224,27 +228,27 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
224
228
|
id: 'linkerColumn' as PObjectId,
|
|
225
229
|
spec: {
|
|
226
230
|
kind: 'PColumn',
|
|
227
|
-
valueType:
|
|
231
|
+
valueType: ValueType.Int,
|
|
228
232
|
name: 'linker',
|
|
229
233
|
annotations: {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
+
[Annotation.Label]: 'Index axis linker',
|
|
235
|
+
[Annotation.IsLinkerColumn]: stringifyJson(true),
|
|
236
|
+
[Annotation.Table.Visibility]: 'hidden',
|
|
237
|
+
} satisfies Annotation,
|
|
234
238
|
axesSpec: [
|
|
235
239
|
{
|
|
236
|
-
type:
|
|
240
|
+
type: ValueType.Int,
|
|
237
241
|
name: 'index',
|
|
238
242
|
annotations: {
|
|
239
|
-
|
|
240
|
-
},
|
|
243
|
+
[Annotation.Label]: 'Int axis',
|
|
244
|
+
} satisfies Annotation,
|
|
241
245
|
},
|
|
242
246
|
{
|
|
243
|
-
type:
|
|
247
|
+
type: ValueType.Int,
|
|
244
248
|
name: 'linkedIndex',
|
|
245
249
|
annotations: {
|
|
246
|
-
|
|
247
|
-
},
|
|
250
|
+
[Annotation.Label]: 'Linked int axis',
|
|
251
|
+
} satisfies Annotation,
|
|
248
252
|
},
|
|
249
253
|
],
|
|
250
254
|
},
|
|
@@ -262,20 +266,20 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
262
266
|
id: `alphabeticalColumn${j}` as PObjectId,
|
|
263
267
|
spec: {
|
|
264
268
|
kind: 'PColumn',
|
|
265
|
-
valueType:
|
|
269
|
+
valueType: ValueType.String,
|
|
266
270
|
name: 'value',
|
|
267
271
|
annotations: {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
},
|
|
272
|
+
[Annotation.Label]: `Alphabetical column ${j}`,
|
|
273
|
+
[Annotation.Table.Visibility]: 'optional',
|
|
274
|
+
[Annotation.Table.OrderPriority]: stringifyJson(10 - j),
|
|
275
|
+
} satisfies Annotation,
|
|
272
276
|
axesSpec: [
|
|
273
277
|
{
|
|
274
|
-
type:
|
|
278
|
+
type: ValueType.Int,
|
|
275
279
|
name: 'linkedIndex',
|
|
276
280
|
annotations: {
|
|
277
|
-
|
|
278
|
-
},
|
|
281
|
+
[Annotation.Label]: 'Linked int axis',
|
|
282
|
+
} satisfies Annotation,
|
|
279
283
|
},
|
|
280
284
|
],
|
|
281
285
|
},
|
|
@@ -334,16 +338,17 @@ export const platforma = BlockModel.create('Heavy')
|
|
|
334
338
|
{ type: 'link', href: '/pl-number-field-page', label: 'PlNumberFieldPage' },
|
|
335
339
|
{ type: 'link', href: '/pl-error-boundary-page', label: 'PlErrorBoundaryPage' },
|
|
336
340
|
{ type: 'link', href: '/pl-element-list-page', label: 'PlElementList' },
|
|
337
|
-
{ type: 'link', href: '/errors', label: 'Errors' },
|
|
338
341
|
{ type: 'link', href: '/text-fields', label: 'PlTextField' },
|
|
339
342
|
{ type: 'link', href: '/tabs', label: 'PlTabs' },
|
|
343
|
+
{ type: 'link', href: '/pl-autocomplete', label: 'PlAutocomplete' },
|
|
344
|
+
{ type: 'link', href: '/radio', label: 'PlRadio' },
|
|
340
345
|
{ type: 'link', href: '/stacked-bar', label: 'PlChartStackedBar' },
|
|
341
346
|
{ type: 'link', href: '/histogram', label: 'PlChartHistogram' },
|
|
342
347
|
{ type: 'link', href: '/buttons', label: 'ButtonsPage' },
|
|
348
|
+
{ type: 'link', href: '/errors', label: 'Errors' },
|
|
349
|
+
{ type: 'link', href: '/downloads', label: 'Downloads' },
|
|
343
350
|
{ type: 'link', href: '/notifications', label: 'Notifications' },
|
|
344
351
|
{ type: 'link', href: '/drafts', label: 'Drafts' },
|
|
345
|
-
{ type: 'link', href: '/pl-autocomplete', label: 'PlAutocomplete' },
|
|
346
|
-
{ type: 'link', href: '/radio', label: 'PlRadio' },
|
|
347
352
|
...(dynamicSections.length
|
|
348
353
|
? [
|
|
349
354
|
{ type: 'delimiter' },
|