@simai-studio/view 0.0.0-stage → 1.1.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.
Files changed (127) hide show
  1. package/LICENSE.md +183 -0
  2. package/README.md +75 -2
  3. package/dist/package-receipt.json +972 -0
  4. package/dist/set.json +141 -0
  5. package/dist/smart/rule.js +278 -0
  6. package/dist/smart/rule.js.gz +0 -0
  7. package/dist/smart/view/aliases.json +129 -0
  8. package/dist/smart/view/aliases.json.gz +0 -0
  9. package/dist/smart/view/component.json +1628 -0
  10. package/dist/smart/view/component.json.gz +0 -0
  11. package/dist/smart/view/css/view.css +208 -0
  12. package/dist/smart/view/css/view.css.gz +0 -0
  13. package/dist/smart/view/css/view.min.css +2 -0
  14. package/dist/smart/view/css/view.min.css.gz +0 -0
  15. package/dist/smart/view/examples.json +668 -0
  16. package/dist/smart/view/examples.json.gz +0 -0
  17. package/dist/smart/view/js/view.js +3955 -0
  18. package/dist/smart/view/js/view.js.gz +0 -0
  19. package/dist/smart/view/js/view.min.js +1 -0
  20. package/dist/smart/view/js/view.min.js.gz +0 -0
  21. package/dist/smart/view/lang/en.json +61 -0
  22. package/dist/smart/view/lang/en.json.gz +0 -0
  23. package/dist/smart/view/lang/ru.json +61 -0
  24. package/dist/smart/view/lang/ru.json.gz +0 -0
  25. package/dist/smart/view/probe.json +165 -0
  26. package/dist/smart/view/probe.json.gz +0 -0
  27. package/dist/smart/view/smart.manifest.json +1577 -0
  28. package/dist/smart/view/smart.manifest.json.gz +0 -0
  29. package/dist/smart/view/static/default/embedded.html +96 -0
  30. package/dist/smart/view/static/default/embedded.html.gz +0 -0
  31. package/dist/smart/view/static/default/open-record.html +242 -0
  32. package/dist/smart/view/static/default/open-record.html.gz +0 -0
  33. package/dist/smart/view/static/default/reference.html +242 -0
  34. package/dist/smart/view/static/default/reference.html.gz +0 -0
  35. package/dist/smart/view/static/sheets.json +282 -0
  36. package/dist/smart/view/static/sheets.json.gz +0 -0
  37. package/dist/smart/view-properties/aliases.json +174 -0
  38. package/dist/smart/view-properties/aliases.json.gz +0 -0
  39. package/dist/smart/view-properties/component.json +1906 -0
  40. package/dist/smart/view-properties/component.json.gz +0 -0
  41. package/dist/smart/view-properties/css/view-properties.css +1158 -0
  42. package/dist/smart/view-properties/css/view-properties.css.gz +0 -0
  43. package/dist/smart/view-properties/css/view-properties.min.css +2 -0
  44. package/dist/smart/view-properties/css/view-properties.min.css.gz +0 -0
  45. package/dist/smart/view-properties/examples.json +841 -0
  46. package/dist/smart/view-properties/examples.json.gz +0 -0
  47. package/dist/smart/view-properties/js/view-properties.js +10551 -0
  48. package/dist/smart/view-properties/js/view-properties.js.gz +0 -0
  49. package/dist/smart/view-properties/js/view-properties.min.js +1392 -0
  50. package/dist/smart/view-properties/js/view-properties.min.js.gz +0 -0
  51. package/dist/smart/view-properties/lang/en.json +89 -0
  52. package/dist/smart/view-properties/lang/en.json.gz +0 -0
  53. package/dist/smart/view-properties/lang/ru.json +89 -0
  54. package/dist/smart/view-properties/lang/ru.json.gz +0 -0
  55. package/dist/smart/view-properties/probe.json +188 -0
  56. package/dist/smart/view-properties/probe.json.gz +0 -0
  57. package/dist/smart/view-properties/skeleton.html +13 -0
  58. package/dist/smart/view-properties/skeleton.html.gz +0 -0
  59. package/dist/smart/view-properties/smart.manifest.json +1593 -0
  60. package/dist/smart/view-properties/smart.manifest.json.gz +0 -0
  61. package/dist/smart/view-properties/static/default/full.html +2 -0
  62. package/dist/smart/view-properties/static/default/full.html.gz +0 -0
  63. package/dist/smart/view-properties/static/default/panel-closed.html +4 -0
  64. package/dist/smart/view-properties/static/default/panel-closed.html.gz +0 -0
  65. package/dist/smart/view-properties/static/default/panel.html +4 -0
  66. package/dist/smart/view-properties/static/default/panel.html.gz +0 -0
  67. package/dist/smart/view-properties/static/default/reference.html +2 -0
  68. package/dist/smart/view-properties/static/default/reference.html.gz +0 -0
  69. package/dist/smart/view-properties/static/sheets.json +426 -0
  70. package/dist/smart/view-properties/static/sheets.json.gz +0 -0
  71. package/dist/smart/view-properties/template/default.css +992 -0
  72. package/dist/smart/view-properties/template/default.css.gz +0 -0
  73. package/dist/smart/view-properties/template/default.js +1658 -0
  74. package/dist/smart/view-properties/template/default.js.gz +0 -0
  75. package/dist/smart/view-table/aliases.json +448 -0
  76. package/dist/smart/view-table/aliases.json.gz +0 -0
  77. package/dist/smart/view-table/component.json +2746 -0
  78. package/dist/smart/view-table/component.json.gz +0 -0
  79. package/dist/smart/view-table/css/view-table.css +3658 -0
  80. package/dist/smart/view-table/css/view-table.css.gz +0 -0
  81. package/dist/smart/view-table/css/view-table.min.css +2 -0
  82. package/dist/smart/view-table/css/view-table.min.css.gz +0 -0
  83. package/dist/smart/view-table/examples.json +499 -0
  84. package/dist/smart/view-table/examples.json.gz +0 -0
  85. package/dist/smart/view-table/js/view-table.js +14166 -0
  86. package/dist/smart/view-table/js/view-table.js.gz +0 -0
  87. package/dist/smart/view-table/js/view-table.min.js +1440 -0
  88. package/dist/smart/view-table/js/view-table.min.js.gz +0 -0
  89. package/dist/smart/view-table/lang/en.json +132 -0
  90. package/dist/smart/view-table/lang/en.json.gz +0 -0
  91. package/dist/smart/view-table/lang/ru.json +132 -0
  92. package/dist/smart/view-table/lang/ru.json.gz +0 -0
  93. package/dist/smart/view-table/probe.json +275 -0
  94. package/dist/smart/view-table/probe.json.gz +0 -0
  95. package/dist/smart/view-table/smart.manifest.json +2531 -0
  96. package/dist/smart/view-table/smart.manifest.json.gz +0 -0
  97. package/dist/smart/view-table/static/default/current.html +141 -0
  98. package/dist/smart/view-table/static/default/current.html.gz +0 -0
  99. package/dist/smart/view-table/static/default/current.skeleton.html +141 -0
  100. package/dist/smart/view-table/static/default/current.skeleton.html.gz +0 -0
  101. package/dist/smart/view-table/static/default/empty.html +149 -0
  102. package/dist/smart/view-table/static/default/empty.html.gz +0 -0
  103. package/dist/smart/view-table/static/default/loading.html +180 -0
  104. package/dist/smart/view-table/static/default/loading.html.gz +0 -0
  105. package/dist/smart/view-table/static/default/many.html +180 -0
  106. package/dist/smart/view-table/static/default/many.html.gz +0 -0
  107. package/dist/smart/view-table/static/default/reference.html +136 -0
  108. package/dist/smart/view-table/static/default/reference.html.gz +0 -0
  109. package/dist/smart/view-table/static/default/reference.skeleton.html +136 -0
  110. package/dist/smart/view-table/static/default/reference.skeleton.html.gz +0 -0
  111. package/dist/smart/view-table/static/default/typed-cells.html +229 -0
  112. package/dist/smart/view-table/static/default/typed-cells.html.gz +0 -0
  113. package/dist/smart/view-table/static/default/typed-cells.skeleton.html +229 -0
  114. package/dist/smart/view-table/static/default/typed-cells.skeleton.html.gz +0 -0
  115. package/dist/smart/view-table/static/sheets.json +480 -0
  116. package/dist/smart/view-table/static/sheets.json.gz +0 -0
  117. package/dist/smart/view-table/studio.fixture.json +17 -0
  118. package/dist/smart/view-table/studio.fixture.json.gz +0 -0
  119. package/dist/smart/view-table/studio.scenario.json +30 -0
  120. package/dist/smart/view-table/studio.scenario.json.gz +0 -0
  121. package/dist/smart/view-table/template/default.css +1301 -0
  122. package/dist/smart/view-table/template/default.css.gz +0 -0
  123. package/dist/smart/view-table/template/default.js +1215 -0
  124. package/dist/smart/view-table/template/default.js.gz +0 -0
  125. package/dist/smart/view-table/template/link-cell-contract.js +48 -0
  126. package/dist/smart/view-table/template/link-cell-contract.js.gz +0 -0
  127. package/package.json +29 -4
@@ -0,0 +1,841 @@
1
+ {
2
+ "examples": [
3
+ {
4
+ "name": "reference",
5
+ "title": "Запись",
6
+ "settings": {
7
+ "aria-label": "Запись",
8
+ "record-id": "r-001",
9
+ "collection": "workbench.solutions",
10
+ "sections-as": "tabs"
11
+ },
12
+ "expect": {
13
+ "name": "Запись",
14
+ "values": {
15
+ "section": "main"
16
+ }
17
+ },
18
+ "x-port": "the reference host of ui-admin (src/ports/polygon-host.mjs)",
19
+ "port": {
20
+ "answers": {
21
+ "record.load": {
22
+ "answer": "applied",
23
+ "record": {
24
+ "record_id": "r-001",
25
+ "revision": "1",
26
+ "title": "Портал клиента",
27
+ "sections": [
28
+ {
29
+ "key": "main",
30
+ "label": "Основное",
31
+ "groups": [
32
+ {
33
+ "key": "main",
34
+ "label": "Карточка",
35
+ "fields": [
36
+ {
37
+ "key": "title",
38
+ "label": "Название",
39
+ "propertyType": "string",
40
+ "value": "Портал клиента"
41
+ },
42
+ {
43
+ "key": "owner",
44
+ "label": "Ответственный",
45
+ "propertyType": "record",
46
+ "value": {
47
+ "value": "u-1",
48
+ "label": "Анна Захарова",
49
+ "href": "#u-1"
50
+ }
51
+ },
52
+ {
53
+ "key": "accent",
54
+ "label": "Цвет",
55
+ "propertyType": "color",
56
+ "value": "#2f6feb"
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "key": "files",
62
+ "label": "Документы",
63
+ "fields": [
64
+ {
65
+ "key": "contract",
66
+ "label": "Договор",
67
+ "propertyType": "file",
68
+ "value": {
69
+ "value": "f-1",
70
+ "label": "договор.pdf",
71
+ "mime": "application/pdf",
72
+ "href": "#f-1"
73
+ }
74
+ },
75
+ {
76
+ "key": "scheme",
77
+ "label": "Схема",
78
+ "propertyType": "file",
79
+ "value": {
80
+ "value": "f-2",
81
+ "label": "схема.png",
82
+ "mime": "image/png",
83
+ "href": "#f-2"
84
+ }
85
+ },
86
+ {
87
+ "key": "note",
88
+ "label": "Заметка",
89
+ "propertyType": "string",
90
+ "value": "Подписан в сентябре"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "key": "dates",
96
+ "label": "Сроки",
97
+ "fields": [
98
+ {
99
+ "key": "start",
100
+ "label": "Начало",
101
+ "propertyType": "string",
102
+ "value": "1 сентября"
103
+ },
104
+ {
105
+ "key": "end",
106
+ "label": "Окончание",
107
+ "propertyType": "string",
108
+ "value": "31 декабря"
109
+ },
110
+ {
111
+ "key": "stage",
112
+ "label": "Этап",
113
+ "propertyType": "string",
114
+ "value": "Внедрение"
115
+ }
116
+ ]
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "key": "access",
122
+ "label": "Доступ",
123
+ "groups": [
124
+ {
125
+ "key": "roles",
126
+ "label": "Роли",
127
+ "fields": [
128
+ {
129
+ "key": "role",
130
+ "label": "Роль",
131
+ "propertyType": "string",
132
+ "value": "Редактор"
133
+ }
134
+ ]
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "key": "history",
140
+ "label": "История",
141
+ "groups": [
142
+ {
143
+ "key": "log",
144
+ "label": "Журнал",
145
+ "fields": [
146
+ {
147
+ "key": "changed",
148
+ "label": "Изменено",
149
+ "propertyType": "string",
150
+ "value": "вчера"
151
+ }
152
+ ]
153
+ }
154
+ ]
155
+ }
156
+ ]
157
+ }
158
+ },
159
+ "*": {
160
+ "answer": "unavailable",
161
+ "reason": "unknown-intent"
162
+ }
163
+ },
164
+ "$comment": "A fake host (ui-source first-paint-lib.mjs portOf): gate 24 hands it over as phase 3. The record has the shape the skeleton stands for -- three sections, three groups of three fields -- so the gate measures the skeleton's geometry against real groups."
165
+ },
166
+ "parent": "<div class=\"flex flex-col\" style=\"block-size: 40rem\"></div>",
167
+ "x-first-paint": "The page's content region: the record fills it before and after the host answers, and its groups scroll inside."
168
+ },
169
+ {
170
+ "name": "panel",
171
+ "title": "Запись в панели",
172
+ "settings": {
173
+ "panel": true,
174
+ "panel-label": "Запись",
175
+ "record-id": "r-001"
176
+ },
177
+ "expect": {
178
+ "name": "Запись"
179
+ },
180
+ "port": {
181
+ "answers": {
182
+ "record.load": {
183
+ "answer": "applied",
184
+ "record": {
185
+ "record_id": "r-001",
186
+ "revision": "1",
187
+ "title": "Портал клиента",
188
+ "sections": [
189
+ {
190
+ "key": "main",
191
+ "label": "Основное",
192
+ "groups": [
193
+ {
194
+ "key": "main",
195
+ "label": "Карточка",
196
+ "fields": [
197
+ {
198
+ "key": "title",
199
+ "label": "Название",
200
+ "propertyType": "string",
201
+ "value": "Портал клиента"
202
+ },
203
+ {
204
+ "key": "owner",
205
+ "label": "Ответственный",
206
+ "propertyType": "record",
207
+ "value": {
208
+ "value": "u-1",
209
+ "label": "Анна Захарова",
210
+ "href": "#u-1"
211
+ }
212
+ },
213
+ {
214
+ "key": "accent",
215
+ "label": "Цвет",
216
+ "propertyType": "color",
217
+ "value": "#2f6feb"
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "key": "files",
223
+ "label": "Документы",
224
+ "fields": [
225
+ {
226
+ "key": "contract",
227
+ "label": "Договор",
228
+ "propertyType": "file",
229
+ "value": {
230
+ "value": "f-1",
231
+ "label": "договор.pdf",
232
+ "mime": "application/pdf",
233
+ "href": "#f-1"
234
+ }
235
+ },
236
+ {
237
+ "key": "scheme",
238
+ "label": "Схема",
239
+ "propertyType": "file",
240
+ "value": {
241
+ "value": "f-2",
242
+ "label": "схема.png",
243
+ "mime": "image/png",
244
+ "href": "#f-2"
245
+ }
246
+ },
247
+ {
248
+ "key": "note",
249
+ "label": "Заметка",
250
+ "propertyType": "string",
251
+ "value": "Подписан в сентябре"
252
+ }
253
+ ]
254
+ },
255
+ {
256
+ "key": "dates",
257
+ "label": "Сроки",
258
+ "fields": [
259
+ {
260
+ "key": "start",
261
+ "label": "Начало",
262
+ "propertyType": "string",
263
+ "value": "1 сентября"
264
+ },
265
+ {
266
+ "key": "end",
267
+ "label": "Окончание",
268
+ "propertyType": "string",
269
+ "value": "31 декабря"
270
+ },
271
+ {
272
+ "key": "stage",
273
+ "label": "Этап",
274
+ "propertyType": "string",
275
+ "value": "Внедрение"
276
+ }
277
+ ]
278
+ }
279
+ ]
280
+ },
281
+ {
282
+ "key": "access",
283
+ "label": "Доступ",
284
+ "groups": [
285
+ {
286
+ "key": "roles",
287
+ "label": "Роли",
288
+ "fields": [
289
+ {
290
+ "key": "role",
291
+ "label": "Роль",
292
+ "propertyType": "string",
293
+ "value": "Редактор"
294
+ }
295
+ ]
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "key": "history",
301
+ "label": "История",
302
+ "groups": [
303
+ {
304
+ "key": "log",
305
+ "label": "Журнал",
306
+ "fields": [
307
+ {
308
+ "key": "changed",
309
+ "label": "Изменено",
310
+ "propertyType": "string",
311
+ "value": "вчера"
312
+ }
313
+ ]
314
+ }
315
+ ]
316
+ }
317
+ ]
318
+ }
319
+ },
320
+ "*": {
321
+ "answer": "unavailable",
322
+ "reason": "unknown-intent"
323
+ }
324
+ },
325
+ "$comment": "A fake host (ui-source first-paint-lib.mjs portOf): gate 24 hands it over as phase 3. The record has the shape the skeleton stands for -- three sections, three groups of three fields -- so the gate measures the skeleton's geometry against real groups."
326
+ }
327
+ },
328
+ {
329
+ "name": "panel-closed",
330
+ "title": "Панель закрыта",
331
+ "settings": {
332
+ "panel": true,
333
+ "panel-label": "Запись",
334
+ "record-id": "r-001",
335
+ "open": false
336
+ },
337
+ "expect": {
338
+ "name": "Запись"
339
+ },
340
+ "port": {
341
+ "answers": {
342
+ "record.load": {
343
+ "answer": "applied",
344
+ "record": {
345
+ "record_id": "r-001",
346
+ "revision": "1",
347
+ "title": "Портал клиента",
348
+ "sections": [
349
+ {
350
+ "key": "main",
351
+ "label": "Основное",
352
+ "groups": [
353
+ {
354
+ "key": "main",
355
+ "label": "Карточка",
356
+ "fields": [
357
+ {
358
+ "key": "title",
359
+ "label": "Название",
360
+ "propertyType": "string",
361
+ "value": "Портал клиента"
362
+ },
363
+ {
364
+ "key": "owner",
365
+ "label": "Ответственный",
366
+ "propertyType": "record",
367
+ "value": {
368
+ "value": "u-1",
369
+ "label": "Анна Захарова",
370
+ "href": "#u-1"
371
+ }
372
+ },
373
+ {
374
+ "key": "accent",
375
+ "label": "Цвет",
376
+ "propertyType": "color",
377
+ "value": "#2f6feb"
378
+ }
379
+ ]
380
+ },
381
+ {
382
+ "key": "files",
383
+ "label": "Документы",
384
+ "fields": [
385
+ {
386
+ "key": "contract",
387
+ "label": "Договор",
388
+ "propertyType": "file",
389
+ "value": {
390
+ "value": "f-1",
391
+ "label": "договор.pdf",
392
+ "mime": "application/pdf",
393
+ "href": "#f-1"
394
+ }
395
+ },
396
+ {
397
+ "key": "scheme",
398
+ "label": "Схема",
399
+ "propertyType": "file",
400
+ "value": {
401
+ "value": "f-2",
402
+ "label": "схема.png",
403
+ "mime": "image/png",
404
+ "href": "#f-2"
405
+ }
406
+ },
407
+ {
408
+ "key": "note",
409
+ "label": "Заметка",
410
+ "propertyType": "string",
411
+ "value": "Подписан в сентябре"
412
+ }
413
+ ]
414
+ },
415
+ {
416
+ "key": "dates",
417
+ "label": "Сроки",
418
+ "fields": [
419
+ {
420
+ "key": "start",
421
+ "label": "Начало",
422
+ "propertyType": "string",
423
+ "value": "1 сентября"
424
+ },
425
+ {
426
+ "key": "end",
427
+ "label": "Окончание",
428
+ "propertyType": "string",
429
+ "value": "31 декабря"
430
+ },
431
+ {
432
+ "key": "stage",
433
+ "label": "Этап",
434
+ "propertyType": "string",
435
+ "value": "Внедрение"
436
+ }
437
+ ]
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ "key": "access",
443
+ "label": "Доступ",
444
+ "groups": [
445
+ {
446
+ "key": "roles",
447
+ "label": "Роли",
448
+ "fields": [
449
+ {
450
+ "key": "role",
451
+ "label": "Роль",
452
+ "propertyType": "string",
453
+ "value": "Редактор"
454
+ }
455
+ ]
456
+ }
457
+ ]
458
+ },
459
+ {
460
+ "key": "history",
461
+ "label": "История",
462
+ "groups": [
463
+ {
464
+ "key": "log",
465
+ "label": "Журнал",
466
+ "fields": [
467
+ {
468
+ "key": "changed",
469
+ "label": "Изменено",
470
+ "propertyType": "string",
471
+ "value": "вчера"
472
+ }
473
+ ]
474
+ }
475
+ ]
476
+ }
477
+ ]
478
+ }
479
+ },
480
+ "*": {
481
+ "answer": "unavailable",
482
+ "reason": "unknown-intent"
483
+ }
484
+ },
485
+ "$comment": "A fake host (ui-source first-paint-lib.mjs portOf): gate 24 hands it over as phase 3. The record has the shape the skeleton stands for -- three sections, three groups of three fields -- so the gate measures the skeleton's geometry against real groups."
486
+ }
487
+ },
488
+ {
489
+ "name": "full",
490
+ "title": "Запись целиком",
491
+ "settings": {
492
+ "panel": true,
493
+ "full": true,
494
+ "panel-label": "Запись",
495
+ "record-id": "r-001"
496
+ },
497
+ "expect": {
498
+ "name": "Запись"
499
+ },
500
+ "port": {
501
+ "answers": {
502
+ "record.load": {
503
+ "answer": "applied",
504
+ "record": {
505
+ "record_id": "r-001",
506
+ "revision": "1",
507
+ "title": "Портал клиента",
508
+ "sections": [
509
+ {
510
+ "key": "main",
511
+ "label": "Основное",
512
+ "groups": [
513
+ {
514
+ "key": "main",
515
+ "label": "Карточка",
516
+ "fields": [
517
+ {
518
+ "key": "title",
519
+ "label": "Название",
520
+ "propertyType": "string",
521
+ "value": "Портал клиента"
522
+ },
523
+ {
524
+ "key": "owner",
525
+ "label": "Ответственный",
526
+ "propertyType": "record",
527
+ "value": {
528
+ "value": "u-1",
529
+ "label": "Анна Захарова",
530
+ "href": "#u-1"
531
+ }
532
+ },
533
+ {
534
+ "key": "accent",
535
+ "label": "Цвет",
536
+ "propertyType": "color",
537
+ "value": "#2f6feb"
538
+ }
539
+ ]
540
+ },
541
+ {
542
+ "key": "files",
543
+ "label": "Документы",
544
+ "fields": [
545
+ {
546
+ "key": "contract",
547
+ "label": "Договор",
548
+ "propertyType": "file",
549
+ "value": {
550
+ "value": "f-1",
551
+ "label": "договор.pdf",
552
+ "mime": "application/pdf",
553
+ "href": "#f-1"
554
+ }
555
+ },
556
+ {
557
+ "key": "scheme",
558
+ "label": "Схема",
559
+ "propertyType": "file",
560
+ "value": {
561
+ "value": "f-2",
562
+ "label": "схема.png",
563
+ "mime": "image/png",
564
+ "href": "#f-2"
565
+ }
566
+ },
567
+ {
568
+ "key": "note",
569
+ "label": "Заметка",
570
+ "propertyType": "string",
571
+ "value": "Подписан в сентябре"
572
+ }
573
+ ]
574
+ },
575
+ {
576
+ "key": "dates",
577
+ "label": "Сроки",
578
+ "fields": [
579
+ {
580
+ "key": "start",
581
+ "label": "Начало",
582
+ "propertyType": "string",
583
+ "value": "1 сентября"
584
+ },
585
+ {
586
+ "key": "end",
587
+ "label": "Окончание",
588
+ "propertyType": "string",
589
+ "value": "31 декабря"
590
+ },
591
+ {
592
+ "key": "stage",
593
+ "label": "Этап",
594
+ "propertyType": "string",
595
+ "value": "Внедрение"
596
+ }
597
+ ]
598
+ }
599
+ ]
600
+ },
601
+ {
602
+ "key": "access",
603
+ "label": "Доступ",
604
+ "groups": [
605
+ {
606
+ "key": "roles",
607
+ "label": "Роли",
608
+ "fields": [
609
+ {
610
+ "key": "role",
611
+ "label": "Роль",
612
+ "propertyType": "string",
613
+ "value": "Редактор"
614
+ }
615
+ ]
616
+ }
617
+ ]
618
+ },
619
+ {
620
+ "key": "history",
621
+ "label": "История",
622
+ "groups": [
623
+ {
624
+ "key": "log",
625
+ "label": "Журнал",
626
+ "fields": [
627
+ {
628
+ "key": "changed",
629
+ "label": "Изменено",
630
+ "propertyType": "string",
631
+ "value": "вчера"
632
+ }
633
+ ]
634
+ }
635
+ ]
636
+ }
637
+ ]
638
+ }
639
+ },
640
+ "*": {
641
+ "answer": "unavailable",
642
+ "reason": "unknown-intent"
643
+ }
644
+ },
645
+ "$comment": "A fake host (ui-source first-paint-lib.mjs portOf): gate 24 hands it over as phase 3. The record has the shape the skeleton stands for -- three sections, three groups of three fields -- so the gate measures the skeleton's geometry against real groups."
646
+ },
647
+ "parent": "<div class=\"flex flex-col\" style=\"block-size: 40rem\"></div>",
648
+ "x-first-paint": "The page's content region: the record fills it before and after the host answers, and its groups scroll inside."
649
+ }
650
+ ],
651
+ "pages": [
652
+ {
653
+ "name": "conformance",
654
+ "title": "sf-property-view against component.json (standard simai.smart-component 1.3.8 §12, gate 20; simai/ui-pro#3, #4)",
655
+ "format": "stands/15-scenarios (A4 modal: a page, probes in steps); the runner is the SIMAI Framework's tests/browser/manifest-probes.browser.mjs through tests/browser/package-manifest-probes.browser.mjs",
656
+ "page": {
657
+ "lang": "ru",
658
+ "body": [
659
+ "<main style=\"width: 1100px\">",
660
+ " <sf-view-properties id=\"p\" record-id=\"r1\" collection=\"workbench.solutions\" sections-as=\"tabs\" aria-label=\"Запись\"></sf-view-properties>",
661
+ " <sf-view-properties id=\"missing\" record-id=\"r-999\" aria-label=\"Запись\"></sf-view-properties>",
662
+ " <sf-view-properties id=\"panel\" panel record-id=\"r1\" panel-label=\"Запись\"></sf-view-properties>",
663
+ "</main>"
664
+ ]
665
+ },
666
+ "checks": [
667
+ {
668
+ "id": "p1-saved",
669
+ "title": "an applied group save is the fact sf-property-view-saved {id, revision}, once",
670
+ "covers": "events.saved (simai/ui-pro#4 item 1), actions.edit-group, actions.save-group, values.revision",
671
+ "steps": [
672
+ {
673
+ "script": "(() => { window.__calls = []; let revision = 1; const record = (id) => ({record_id: id, collection: 'workbench.solutions', revision: String(revision), label: 'Портал клиента', editable: true, actions: ['record.edit'], address: '/admin/r1', sections: [{key: 'main', label: 'Основное', groups: [{key: 'g', label: 'Главное', columns: 1, fields: [{key: 'title', label: 'Название', propertyType: 'string', width: 'full', value: 'Портал клиента'}]}]}, {key: 'links', label: 'Связи', groups: [{key: 'l', label: 'Ссылки', columns: 1, fields: [{key: 'site', label: 'Сайт', propertyType: 'string', width: 'full', value: 'simai.io'}]}]}]}); const port = {id: 'simai.property-view-port', version: '1.14.0', capabilities: [], raise: async (intent, payload) => { window.__calls.push(intent); if (window.__never) return new Promise(() => {}); if (intent === 'record.load') return payload.record_id === 'r1' ? {answer: 'applied', record: record('r1')} : {answer: 'refused', reason: 'record-unknown', message: 'Запись не найдена'}; if (intent === 'group.save') { revision += 1; return {answer: 'applied', revision: String(revision), record: record('r1')}; } return {answer: 'unavailable', reason: 'capability-not-provided'}; } }; document.querySelectorAll('sf-view-properties').forEach((one) => one.setHostPort(port)); return true; })()",
674
+ "wait": 900,
675
+ "expect": {
676
+ "values": {
677
+ "#p.revision": "1",
678
+ "#p.section": "main"
679
+ }
680
+ }
681
+ },
682
+ {
683
+ "action": {
684
+ "name": "edit-group",
685
+ "with": {
686
+ "section": "main",
687
+ "group": "g"
688
+ }
689
+ },
690
+ "target": "#p",
691
+ "wait": 300
692
+ },
693
+ {
694
+ "script": "(() => { const el = document.getElementById('p'); const field = el.sections[0].groups[0].fields[0]; el.changeField(field, 'Портал клиента 2'); return true; })()",
695
+ "wait": 200
696
+ },
697
+ {
698
+ "action": {
699
+ "name": "save-group"
700
+ },
701
+ "target": "#p",
702
+ "wait": 600,
703
+ "expect": {
704
+ "returns": {
705
+ "outcome": "applied"
706
+ },
707
+ "events": [
708
+ {
709
+ "name": "sf-view-properties-saved",
710
+ "count": 1,
711
+ "detail": {
712
+ "id": "r1",
713
+ "revision": "2"
714
+ }
715
+ }
716
+ ],
717
+ "values": {
718
+ "#p.revision": "2"
719
+ }
720
+ }
721
+ }
722
+ ]
723
+ },
724
+ {
725
+ "id": "p2-failed",
726
+ "title": "a record the host does not know is the fact sf-property-view-failed {reason: record-unknown}",
727
+ "covers": "events.failed",
728
+ "steps": [
729
+ {
730
+ "script": "(() => { window.__failed = []; document.getElementById('missing').addEventListener('sf-view-properties-failed', (event) => window.__failed.push(event.detail)); return true; })()",
731
+ "wait": 10
732
+ },
733
+ {
734
+ "script": "(() => { window.__calls = []; let revision = 1; const record = (id) => ({record_id: id, collection: 'workbench.solutions', revision: String(revision), label: 'Портал клиента', editable: true, actions: ['record.edit'], address: '/admin/r1', sections: [{key: 'main', label: 'Основное', groups: [{key: 'g', label: 'Главное', columns: 1, fields: [{key: 'title', label: 'Название', propertyType: 'string', width: 'full', value: 'Портал клиента'}]}]}, {key: 'links', label: 'Связи', groups: [{key: 'l', label: 'Ссылки', columns: 1, fields: [{key: 'site', label: 'Сайт', propertyType: 'string', width: 'full', value: 'simai.io'}]}]}]}); const port = {id: 'simai.property-view-port', version: '1.14.0', capabilities: [], raise: async (intent, payload) => { window.__calls.push(intent); if (window.__never) return new Promise(() => {}); if (intent === 'record.load') return payload.record_id === 'r1' ? {answer: 'applied', record: record('r1')} : {answer: 'refused', reason: 'record-unknown', message: 'Запись не найдена'}; if (intent === 'group.save') { revision += 1; return {answer: 'applied', revision: String(revision), record: record('r1')}; } return {answer: 'unavailable', reason: 'capability-not-provided'}; } }; document.querySelectorAll('sf-view-properties').forEach((one) => one.setHostPort(port)); return true; })()",
735
+ "wait": 900,
736
+ "check": "window.__failed.length === 1 && window.__failed[0].reason === 'record-unknown' && window.__failed[0].message === 'Запись не найдена'"
737
+ }
738
+ ]
739
+ },
740
+ {
741
+ "id": "p3-panel-hidden",
742
+ "title": "a panel shows while it is not hidden: hidden closes its drawer, removing hidden opens it again (one element)",
743
+ "covers": "settings.open, hidden (simai/ui-pro#4 item 2, §7.2.2)",
744
+ "steps": [
745
+ {
746
+ "script": "(() => { window.__calls = []; let revision = 1; const record = (id) => ({record_id: id, collection: 'workbench.solutions', revision: String(revision), label: 'Портал клиента', editable: true, actions: ['record.edit'], address: '/admin/r1', sections: [{key: 'main', label: 'Основное', groups: [{key: 'g', label: 'Главное', columns: 1, fields: [{key: 'title', label: 'Название', propertyType: 'string', width: 'full', value: 'Портал клиента'}]}]}, {key: 'links', label: 'Связи', groups: [{key: 'l', label: 'Ссылки', columns: 1, fields: [{key: 'site', label: 'Сайт', propertyType: 'string', width: 'full', value: 'simai.io'}]}]}]}); const port = {id: 'simai.property-view-port', version: '1.14.0', capabilities: [], raise: async (intent, payload) => { window.__calls.push(intent); if (window.__never) return new Promise(() => {}); if (intent === 'record.load') return payload.record_id === 'r1' ? {answer: 'applied', record: record('r1')} : {answer: 'refused', reason: 'record-unknown', message: 'Запись не найдена'}; if (intent === 'group.save') { revision += 1; return {answer: 'applied', revision: String(revision), record: record('r1')}; } return {answer: 'unavailable', reason: 'capability-not-provided'}; } }; document.querySelectorAll('sf-view-properties').forEach((one) => one.setHostPort(port)); return true; })()",
747
+ "wait": 1000,
748
+ "check": "document.querySelector('#panel sf-drawer')?.hasAttribute('open') === true"
749
+ },
750
+ {
751
+ "script": "(document.getElementById('panel').hidden = true, true)",
752
+ "wait": 600,
753
+ "check": "document.querySelector('#panel sf-drawer')?.hasAttribute('open') === false"
754
+ },
755
+ {
756
+ "script": "(document.getElementById('panel').hidden = false, true)",
757
+ "wait": 600,
758
+ "check": "document.querySelector('#panel sf-drawer')?.hasAttribute('open') === true"
759
+ },
760
+ {
761
+ "script": "(document.getElementById('panel').setAttribute('open', 'false'), true)",
762
+ "wait": 600,
763
+ "check": "document.querySelector('#panel sf-drawer')?.hasAttribute('open') === false"
764
+ }
765
+ ]
766
+ },
767
+ {
768
+ "id": "p4-close-refused",
769
+ "title": "close is a cancelable request: a listener refuses it and close-panel answers refused",
770
+ "covers": "events.close cancelable (vocabulary §5 close, §19.3), actions.close-panel",
771
+ "steps": [
772
+ {
773
+ "script": "(() => { window.__calls = []; let revision = 1; const record = (id) => ({record_id: id, collection: 'workbench.solutions', revision: String(revision), label: 'Портал клиента', editable: true, actions: ['record.edit'], address: '/admin/r1', sections: [{key: 'main', label: 'Основное', groups: [{key: 'g', label: 'Главное', columns: 1, fields: [{key: 'title', label: 'Название', propertyType: 'string', width: 'full', value: 'Портал клиента'}]}]}, {key: 'links', label: 'Связи', groups: [{key: 'l', label: 'Ссылки', columns: 1, fields: [{key: 'site', label: 'Сайт', propertyType: 'string', width: 'full', value: 'simai.io'}]}]}]}); const port = {id: 'simai.property-view-port', version: '1.14.0', capabilities: [], raise: async (intent, payload) => { window.__calls.push(intent); if (window.__never) return new Promise(() => {}); if (intent === 'record.load') return payload.record_id === 'r1' ? {answer: 'applied', record: record('r1')} : {answer: 'refused', reason: 'record-unknown', message: 'Запись не найдена'}; if (intent === 'group.save') { revision += 1; return {answer: 'applied', revision: String(revision), record: record('r1')}; } return {answer: 'unavailable', reason: 'capability-not-provided'}; } }; document.querySelectorAll('sf-view-properties').forEach((one) => one.setHostPort(port)); return true; })()",
774
+ "wait": 900
775
+ },
776
+ {
777
+ "script": "(document.getElementById('p').addEventListener('sf-view-properties-close', (event) => event.preventDefault()), true)",
778
+ "wait": 10
779
+ },
780
+ {
781
+ "action": {
782
+ "name": "close-panel",
783
+ "with": {
784
+ "reason": "close"
785
+ }
786
+ },
787
+ "target": "#p",
788
+ "wait": 200,
789
+ "expect": {
790
+ "returns": {
791
+ "outcome": "refused"
792
+ },
793
+ "events": [
794
+ {
795
+ "name": "sf-view-properties-close",
796
+ "count": 1,
797
+ "detail": {
798
+ "reason": "close"
799
+ }
800
+ }
801
+ ]
802
+ }
803
+ }
804
+ ]
805
+ },
806
+ {
807
+ "id": "p5-skeleton-tabs",
808
+ "title": "while the record is on its way the section tabs' strip is drawn with the skeleton",
809
+ "covers": "simai/ui-pro#3 items 2-3, presentation.skeleton",
810
+ "steps": [
811
+ {
812
+ "script": "(() => { window.__never = true; return true; })()",
813
+ "wait": 10
814
+ },
815
+ {
816
+ "script": "(() => { window.__calls = []; let revision = 1; const record = (id) => ({record_id: id, collection: 'workbench.solutions', revision: String(revision), label: 'Портал клиента', editable: true, actions: ['record.edit'], address: '/admin/r1', sections: [{key: 'main', label: 'Основное', groups: [{key: 'g', label: 'Главное', columns: 1, fields: [{key: 'title', label: 'Название', propertyType: 'string', width: 'full', value: 'Портал клиента'}]}]}, {key: 'links', label: 'Связи', groups: [{key: 'l', label: 'Ссылки', columns: 1, fields: [{key: 'site', label: 'Сайт', propertyType: 'string', width: 'full', value: 'simai.io'}]}]}]}); const port = {id: 'simai.property-view-port', version: '1.14.0', capabilities: [], raise: async (intent, payload) => { window.__calls.push(intent); if (window.__never) return new Promise(() => {}); if (intent === 'record.load') return payload.record_id === 'r1' ? {answer: 'applied', record: record('r1')} : {answer: 'refused', reason: 'record-unknown', message: 'Запись не найдена'}; if (intent === 'group.save') { revision += 1; return {answer: 'applied', revision: String(revision), record: record('r1')}; } return {answer: 'unavailable', reason: 'capability-not-provided'}; } }; document.querySelectorAll('sf-view-properties').forEach((one) => one.setHostPort(port)); return true; })()",
817
+ "wait": 600,
818
+ "check": "Boolean(document.querySelector('#p [data-sf-skeleton=\"tabs\"]')) && document.getElementById('p').getAttribute('data-state') === 'loading'"
819
+ }
820
+ ]
821
+ },
822
+ {
823
+ "id": "p6-full",
824
+ "title": "full draws a panel in place: no drawer while full",
825
+ "covers": "settings.full",
826
+ "steps": [
827
+ {
828
+ "script": "(() => { window.__calls = []; let revision = 1; const record = (id) => ({record_id: id, collection: 'workbench.solutions', revision: String(revision), label: 'Портал клиента', editable: true, actions: ['record.edit'], address: '/admin/r1', sections: [{key: 'main', label: 'Основное', groups: [{key: 'g', label: 'Главное', columns: 1, fields: [{key: 'title', label: 'Название', propertyType: 'string', width: 'full', value: 'Портал клиента'}]}]}, {key: 'links', label: 'Связи', groups: [{key: 'l', label: 'Ссылки', columns: 1, fields: [{key: 'site', label: 'Сайт', propertyType: 'string', width: 'full', value: 'simai.io'}]}]}]}); const port = {id: 'simai.property-view-port', version: '1.14.0', capabilities: [], raise: async (intent, payload) => { window.__calls.push(intent); if (window.__never) return new Promise(() => {}); if (intent === 'record.load') return payload.record_id === 'r1' ? {answer: 'applied', record: record('r1')} : {answer: 'refused', reason: 'record-unknown', message: 'Запись не найдена'}; if (intent === 'group.save') { revision += 1; return {answer: 'applied', revision: String(revision), record: record('r1')}; } return {answer: 'unavailable', reason: 'capability-not-provided'}; } }; document.querySelectorAll('sf-view-properties').forEach((one) => one.setHostPort(port)); return true; })()",
829
+ "wait": 1000
830
+ },
831
+ {
832
+ "script": "(document.getElementById('panel').full = true, true)",
833
+ "wait": 600,
834
+ "check": "!document.querySelector('#panel sf-drawer[open]') && Boolean(document.querySelector('#panel .sf-property-view-layout'))"
835
+ }
836
+ ]
837
+ }
838
+ ]
839
+ }
840
+ ]
841
+ }