@simai-studio/view 0.0.0-stage → 1.0.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/LICENSE.md +183 -0
- package/README.md +75 -2
- package/dist/package-receipt.json +971 -0
- package/dist/set.json +141 -0
- package/dist/smart/rule.js +278 -0
- package/dist/smart/rule.js.gz +0 -0
- package/dist/smart/view/aliases.json +129 -0
- package/dist/smart/view/aliases.json.gz +0 -0
- package/dist/smart/view/component.json +1620 -0
- package/dist/smart/view/component.json.gz +0 -0
- package/dist/smart/view/css/view.css +208 -0
- package/dist/smart/view/css/view.css.gz +0 -0
- package/dist/smart/view/css/view.min.css +2 -0
- package/dist/smart/view/css/view.min.css.gz +0 -0
- package/dist/smart/view/examples.json +668 -0
- package/dist/smart/view/examples.json.gz +0 -0
- package/dist/smart/view/js/view.js +3938 -0
- package/dist/smart/view/js/view.js.gz +0 -0
- package/dist/smart/view/js/view.min.js +1 -0
- package/dist/smart/view/js/view.min.js.gz +0 -0
- package/dist/smart/view/lang/en.json +61 -0
- package/dist/smart/view/lang/en.json.gz +0 -0
- package/dist/smart/view/lang/ru.json +61 -0
- package/dist/smart/view/lang/ru.json.gz +0 -0
- package/dist/smart/view/probe.json +165 -0
- package/dist/smart/view/probe.json.gz +0 -0
- package/dist/smart/view/smart.manifest.json +1570 -0
- package/dist/smart/view/smart.manifest.json.gz +0 -0
- package/dist/smart/view/static/default/embedded.html +96 -0
- package/dist/smart/view/static/default/embedded.html.gz +0 -0
- package/dist/smart/view/static/default/open-record.html +247 -0
- package/dist/smart/view/static/default/open-record.html.gz +0 -0
- package/dist/smart/view/static/default/reference.html +247 -0
- package/dist/smart/view/static/default/reference.html.gz +0 -0
- package/dist/smart/view/static/sheets.json +282 -0
- package/dist/smart/view/static/sheets.json.gz +0 -0
- package/dist/smart/view-properties/aliases.json +174 -0
- package/dist/smart/view-properties/aliases.json.gz +0 -0
- package/dist/smart/view-properties/component.json +1898 -0
- package/dist/smart/view-properties/component.json.gz +0 -0
- package/dist/smart/view-properties/css/view-properties.css +1153 -0
- package/dist/smart/view-properties/css/view-properties.css.gz +0 -0
- package/dist/smart/view-properties/css/view-properties.min.css +2 -0
- package/dist/smart/view-properties/css/view-properties.min.css.gz +0 -0
- package/dist/smart/view-properties/examples.json +841 -0
- package/dist/smart/view-properties/examples.json.gz +0 -0
- package/dist/smart/view-properties/js/view-properties.js +10416 -0
- package/dist/smart/view-properties/js/view-properties.js.gz +0 -0
- package/dist/smart/view-properties/js/view-properties.min.js +1421 -0
- package/dist/smart/view-properties/js/view-properties.min.js.gz +0 -0
- package/dist/smart/view-properties/lang/en.json +96 -0
- package/dist/smart/view-properties/lang/en.json.gz +0 -0
- package/dist/smart/view-properties/lang/ru.json +96 -0
- package/dist/smart/view-properties/lang/ru.json.gz +0 -0
- package/dist/smart/view-properties/probe.json +188 -0
- package/dist/smart/view-properties/probe.json.gz +0 -0
- package/dist/smart/view-properties/skeleton.html +13 -0
- package/dist/smart/view-properties/skeleton.html.gz +0 -0
- package/dist/smart/view-properties/smart.manifest.json +1590 -0
- package/dist/smart/view-properties/smart.manifest.json.gz +0 -0
- package/dist/smart/view-properties/static/default/full.html +2 -0
- package/dist/smart/view-properties/static/default/full.html.gz +0 -0
- package/dist/smart/view-properties/static/default/panel-closed.html +4 -0
- package/dist/smart/view-properties/static/default/panel-closed.html.gz +0 -0
- package/dist/smart/view-properties/static/default/panel.html +4 -0
- package/dist/smart/view-properties/static/default/panel.html.gz +0 -0
- package/dist/smart/view-properties/static/default/reference.html +2 -0
- package/dist/smart/view-properties/static/default/reference.html.gz +0 -0
- package/dist/smart/view-properties/static/sheets.json +426 -0
- package/dist/smart/view-properties/static/sheets.json.gz +0 -0
- package/dist/smart/view-properties/template/default.css +989 -0
- package/dist/smart/view-properties/template/default.css.gz +0 -0
- package/dist/smart/view-properties/template/default.js +1660 -0
- package/dist/smart/view-properties/template/default.js.gz +0 -0
- package/dist/smart/view-table/aliases.json +448 -0
- package/dist/smart/view-table/aliases.json.gz +0 -0
- package/dist/smart/view-table/component.json +2738 -0
- package/dist/smart/view-table/component.json.gz +0 -0
- package/dist/smart/view-table/css/view-table.css +3658 -0
- package/dist/smart/view-table/css/view-table.css.gz +0 -0
- package/dist/smart/view-table/css/view-table.min.css +2 -0
- package/dist/smart/view-table/css/view-table.min.css.gz +0 -0
- package/dist/smart/view-table/examples.json +499 -0
- package/dist/smart/view-table/examples.json.gz +0 -0
- package/dist/smart/view-table/js/view-table.js +13879 -0
- package/dist/smart/view-table/js/view-table.js.gz +0 -0
- package/dist/smart/view-table/js/view-table.min.js +1440 -0
- package/dist/smart/view-table/js/view-table.min.js.gz +0 -0
- package/dist/smart/view-table/lang/en.json +132 -0
- package/dist/smart/view-table/lang/en.json.gz +0 -0
- package/dist/smart/view-table/lang/ru.json +132 -0
- package/dist/smart/view-table/lang/ru.json.gz +0 -0
- package/dist/smart/view-table/probe.json +275 -0
- package/dist/smart/view-table/probe.json.gz +0 -0
- package/dist/smart/view-table/smart.manifest.json +2524 -0
- package/dist/smart/view-table/smart.manifest.json.gz +0 -0
- package/dist/smart/view-table/static/default/current.html +141 -0
- package/dist/smart/view-table/static/default/current.html.gz +0 -0
- package/dist/smart/view-table/static/default/current.skeleton.html +141 -0
- package/dist/smart/view-table/static/default/current.skeleton.html.gz +0 -0
- package/dist/smart/view-table/static/default/empty.html +149 -0
- package/dist/smart/view-table/static/default/empty.html.gz +0 -0
- package/dist/smart/view-table/static/default/loading.html +180 -0
- package/dist/smart/view-table/static/default/loading.html.gz +0 -0
- package/dist/smart/view-table/static/default/many.html +180 -0
- package/dist/smart/view-table/static/default/many.html.gz +0 -0
- package/dist/smart/view-table/static/default/reference.html +136 -0
- package/dist/smart/view-table/static/default/reference.html.gz +0 -0
- package/dist/smart/view-table/static/default/reference.skeleton.html +136 -0
- package/dist/smart/view-table/static/default/reference.skeleton.html.gz +0 -0
- package/dist/smart/view-table/static/default/typed-cells.html +229 -0
- package/dist/smart/view-table/static/default/typed-cells.html.gz +0 -0
- package/dist/smart/view-table/static/default/typed-cells.skeleton.html +229 -0
- package/dist/smart/view-table/static/default/typed-cells.skeleton.html.gz +0 -0
- package/dist/smart/view-table/static/sheets.json +480 -0
- package/dist/smart/view-table/static/sheets.json.gz +0 -0
- package/dist/smart/view-table/studio.fixture.json +17 -0
- package/dist/smart/view-table/studio.fixture.json.gz +0 -0
- package/dist/smart/view-table/studio.scenario.json +30 -0
- package/dist/smart/view-table/studio.scenario.json.gz +0 -0
- package/dist/smart/view-table/template/default.css +1301 -0
- package/dist/smart/view-table/template/default.css.gz +0 -0
- package/dist/smart/view-table/template/default.js +1215 -0
- package/dist/smart/view-table/template/default.js.gz +0 -0
- package/dist/smart/view-table/template/link-cell-contract.js +48 -0
- package/dist/smart/view-table/template/link-cell-contract.js.gz +0 -0
- package/package.json +29 -4
|
Binary file
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Table",
|
|
3
|
+
"events": {
|
|
4
|
+
"column-settings-reset": {
|
|
5
|
+
"label": "Column settings reset"
|
|
6
|
+
},
|
|
7
|
+
"filter-change": {
|
|
8
|
+
"label": "Filter changed"
|
|
9
|
+
},
|
|
10
|
+
"search-change": {
|
|
11
|
+
"label": "Search changed"
|
|
12
|
+
},
|
|
13
|
+
"sort-change": {
|
|
14
|
+
"label": "Order changed"
|
|
15
|
+
},
|
|
16
|
+
"template-delete": {
|
|
17
|
+
"label": "Template deleted"
|
|
18
|
+
},
|
|
19
|
+
"template-save": {
|
|
20
|
+
"label": "Template saved"
|
|
21
|
+
},
|
|
22
|
+
"template-select": {
|
|
23
|
+
"label": "Template chosen"
|
|
24
|
+
},
|
|
25
|
+
"toolbar-action": {
|
|
26
|
+
"label": "Toolbar action"
|
|
27
|
+
},
|
|
28
|
+
"reference-open": {
|
|
29
|
+
"label": "Open the linked record"
|
|
30
|
+
},
|
|
31
|
+
"rows-drag": {
|
|
32
|
+
"label": "Rows dragged"
|
|
33
|
+
},
|
|
34
|
+
"cell-set": {
|
|
35
|
+
"label": "Cell value changed"
|
|
36
|
+
},
|
|
37
|
+
"view-change": {
|
|
38
|
+
"label": "Table view changed"
|
|
39
|
+
},
|
|
40
|
+
"window": {
|
|
41
|
+
"label": "Rows shown"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"runtime": {
|
|
45
|
+
"actions-column-label": "Actions",
|
|
46
|
+
"apply-text": "Apply",
|
|
47
|
+
"clear-text": "Clear",
|
|
48
|
+
"close-text": "Close",
|
|
49
|
+
"column-move-label": "Move the column",
|
|
50
|
+
"column-search-empty-text": "No field matches",
|
|
51
|
+
"column-search-placeholder": "Search the fields",
|
|
52
|
+
"context-create-options-label": "Ways to create",
|
|
53
|
+
"context-field-filter-label": "Filtering by",
|
|
54
|
+
"context-filter-settings-label": "Filter settings",
|
|
55
|
+
"context-row-actions-label": "Row actions",
|
|
56
|
+
"context-save-template-label": "Saving the filter as a template",
|
|
57
|
+
"context-table-settings-label": "Table settings",
|
|
58
|
+
"context-template-actions-label": "Template actions",
|
|
59
|
+
"context-view-actions-label": "View actions",
|
|
60
|
+
"create-options-label": "Ways to create",
|
|
61
|
+
"create-text": "Create",
|
|
62
|
+
"default-template-text": "Default",
|
|
63
|
+
"delete-action-text": "Delete",
|
|
64
|
+
"edit-action-text": "Edit",
|
|
65
|
+
"empty-text": "No data",
|
|
66
|
+
"error-text": "The data could not be loaded",
|
|
67
|
+
"field-word-text": "field",
|
|
68
|
+
"fields-tab-text": "Fields",
|
|
69
|
+
"filter-apply-text": "Apply",
|
|
70
|
+
"filter-settings-label": "Filter settings",
|
|
71
|
+
"filter-text": "Filter",
|
|
72
|
+
"list-filter-label": "Filter, {count} active",
|
|
73
|
+
"loading-text": "Loading",
|
|
74
|
+
"make-default-label": "Make it the default",
|
|
75
|
+
"menu-label": "Menu",
|
|
76
|
+
"operator-any": "Any date",
|
|
77
|
+
"operator-between": "Range",
|
|
78
|
+
"operator-contains": "Contains",
|
|
79
|
+
"operator-eq": "Exactly",
|
|
80
|
+
"operator-gt": "Greater than",
|
|
81
|
+
"operator-gte": "Greater or equal",
|
|
82
|
+
"operator-in": "In the list",
|
|
83
|
+
"operator-lt": "Less than",
|
|
84
|
+
"operator-lte": "Less or equal",
|
|
85
|
+
"operator-month": "This month",
|
|
86
|
+
"operator-starts-with": "Starts with",
|
|
87
|
+
"operator-today": "Today",
|
|
88
|
+
"operator-week": "This week",
|
|
89
|
+
"pin-column-label": "Pin the column",
|
|
90
|
+
"rename-text": "Rename",
|
|
91
|
+
"reset-both-text": "Reset the search and filters",
|
|
92
|
+
"reset-filters-text": "Reset the filters",
|
|
93
|
+
"reset-search-text": "Clear the search",
|
|
94
|
+
"reset-text": "Reset",
|
|
95
|
+
"restore-text": "Restore",
|
|
96
|
+
"retry-text": "Try again",
|
|
97
|
+
"row-actions-label": "Row actions",
|
|
98
|
+
"save-for-everyone-label": "Save for everyone",
|
|
99
|
+
"save-template-label": "Save the filter as a template",
|
|
100
|
+
"search-placeholder": "Search",
|
|
101
|
+
"select-all-label": "Select every row",
|
|
102
|
+
"select-row-label": "Select the row",
|
|
103
|
+
"settings-column-label": "Settings",
|
|
104
|
+
"settings-fields-tab": "Fields",
|
|
105
|
+
"settings-view-tab": "View",
|
|
106
|
+
"sort-ascending": "ascending",
|
|
107
|
+
"sort-descending": "descending",
|
|
108
|
+
"sort-label": "Sort",
|
|
109
|
+
"sort-none": "As the host orders it",
|
|
110
|
+
"template-actions-label": "Template actions",
|
|
111
|
+
"template-move-label": "Move the template",
|
|
112
|
+
"template-name-placeholder": "Name",
|
|
113
|
+
"template-pin-label": "Keep the template at the top",
|
|
114
|
+
"templates-tab-text": "Templates",
|
|
115
|
+
"tree-collapse": "Collapse",
|
|
116
|
+
"tree-expand": "Expand",
|
|
117
|
+
"tree-more": "Show more",
|
|
118
|
+
"unpin-column-label": "Unpin the column",
|
|
119
|
+
"untitled-template-text": "All records",
|
|
120
|
+
"view-action-text": "View",
|
|
121
|
+
"view-density": "Rows",
|
|
122
|
+
"view-density-compact": "Compact",
|
|
123
|
+
"view-density-normal": "Normal",
|
|
124
|
+
"view-density-spacious": "Spacious",
|
|
125
|
+
"view-everywhere": "For all my tables",
|
|
126
|
+
"view-lines": "Lines between columns",
|
|
127
|
+
"view-reset": "Reset the view",
|
|
128
|
+
"view-single-line": "Text on one line",
|
|
129
|
+
"view-sticky-head": "Keep the filter and the head in view",
|
|
130
|
+
"view-stripes": "Alternate rows"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Таблица",
|
|
3
|
+
"events": {
|
|
4
|
+
"column-settings-reset": {
|
|
5
|
+
"label": "Настройки столбцов сброшены"
|
|
6
|
+
},
|
|
7
|
+
"filter-change": {
|
|
8
|
+
"label": "Фильтр изменён"
|
|
9
|
+
},
|
|
10
|
+
"search-change": {
|
|
11
|
+
"label": "Поиск изменён"
|
|
12
|
+
},
|
|
13
|
+
"sort-change": {
|
|
14
|
+
"label": "Порядок изменён"
|
|
15
|
+
},
|
|
16
|
+
"template-delete": {
|
|
17
|
+
"label": "Шаблон удалён"
|
|
18
|
+
},
|
|
19
|
+
"template-save": {
|
|
20
|
+
"label": "Шаблон сохранён"
|
|
21
|
+
},
|
|
22
|
+
"template-select": {
|
|
23
|
+
"label": "Шаблон выбран"
|
|
24
|
+
},
|
|
25
|
+
"toolbar-action": {
|
|
26
|
+
"label": "Действие панели"
|
|
27
|
+
},
|
|
28
|
+
"reference-open": {
|
|
29
|
+
"label": "Открыть связанную запись"
|
|
30
|
+
},
|
|
31
|
+
"rows-drag": {
|
|
32
|
+
"label": "Строки перетащены"
|
|
33
|
+
},
|
|
34
|
+
"cell-set": {
|
|
35
|
+
"label": "Значение в ячейке изменено"
|
|
36
|
+
},
|
|
37
|
+
"view-change": {
|
|
38
|
+
"label": "Вид таблицы изменён"
|
|
39
|
+
},
|
|
40
|
+
"window": {
|
|
41
|
+
"label": "Показаны строки"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"runtime": {
|
|
45
|
+
"actions-column-label": "Действия",
|
|
46
|
+
"apply-text": "Применить",
|
|
47
|
+
"clear-text": "Очистить",
|
|
48
|
+
"close-text": "Закрыть",
|
|
49
|
+
"column-move-label": "Переместить столбец",
|
|
50
|
+
"column-search-empty-text": "Поля не найдены",
|
|
51
|
+
"column-search-placeholder": "Поиск по полям",
|
|
52
|
+
"context-create-options-label": "Варианты создания",
|
|
53
|
+
"context-field-filter-label": "Настройка фильтра",
|
|
54
|
+
"context-filter-settings-label": "Настройки фильтра",
|
|
55
|
+
"context-row-actions-label": "Действия со строкой",
|
|
56
|
+
"context-save-template-label": "Сохранение шаблона фильтра",
|
|
57
|
+
"context-table-settings-label": "Настройки таблицы",
|
|
58
|
+
"context-template-actions-label": "Действия с шаблоном",
|
|
59
|
+
"context-view-actions-label": "Действия с представлением",
|
|
60
|
+
"create-options-label": "Варианты создания",
|
|
61
|
+
"create-text": "Создать",
|
|
62
|
+
"default-template-text": "По умолчанию",
|
|
63
|
+
"delete-action-text": "Удалить",
|
|
64
|
+
"edit-action-text": "Редактировать",
|
|
65
|
+
"empty-text": "Нет данных",
|
|
66
|
+
"error-text": "Не удалось загрузить данные",
|
|
67
|
+
"field-word-text": "поле",
|
|
68
|
+
"fields-tab-text": "Поля",
|
|
69
|
+
"filter-apply-text": "Применить",
|
|
70
|
+
"filter-settings-label": "Настройки фильтра",
|
|
71
|
+
"filter-text": "Фильтр",
|
|
72
|
+
"list-filter-label": "Фильтр, активных условий: {count}",
|
|
73
|
+
"loading-text": "Загрузка данных",
|
|
74
|
+
"make-default-label": "Сделать по умолчанию",
|
|
75
|
+
"menu-label": "Меню",
|
|
76
|
+
"operator-any": "Любая дата",
|
|
77
|
+
"operator-between": "Диапазон",
|
|
78
|
+
"operator-contains": "Содержит",
|
|
79
|
+
"operator-eq": "Точно",
|
|
80
|
+
"operator-gt": "Больше чем",
|
|
81
|
+
"operator-gte": "Больше или равно",
|
|
82
|
+
"operator-in": "В списке",
|
|
83
|
+
"operator-lt": "Меньше чем",
|
|
84
|
+
"operator-lte": "Меньше или равно",
|
|
85
|
+
"operator-month": "Месяц",
|
|
86
|
+
"operator-starts-with": "Начинается с",
|
|
87
|
+
"operator-today": "Сегодня",
|
|
88
|
+
"operator-week": "Неделя",
|
|
89
|
+
"pin-column-label": "Закрепить столбец",
|
|
90
|
+
"rename-text": "Переименовать",
|
|
91
|
+
"reset-both-text": "Сбросить поиск и фильтры",
|
|
92
|
+
"reset-filters-text": "Сбросить фильтры",
|
|
93
|
+
"reset-search-text": "Очистить поиск",
|
|
94
|
+
"reset-text": "Сбросить",
|
|
95
|
+
"restore-text": "Восстановить",
|
|
96
|
+
"retry-text": "Повторить",
|
|
97
|
+
"row-actions-label": "Действия со строкой",
|
|
98
|
+
"save-for-everyone-label": "Сохранить для всех",
|
|
99
|
+
"save-template-label": "Сохранение шаблона фильтра",
|
|
100
|
+
"search-placeholder": "Поиск",
|
|
101
|
+
"select-all-label": "Выбрать все строки",
|
|
102
|
+
"select-row-label": "Выбрать строку",
|
|
103
|
+
"settings-column-label": "Настройки",
|
|
104
|
+
"settings-fields-tab": "Поля",
|
|
105
|
+
"settings-view-tab": "Вид",
|
|
106
|
+
"sort-ascending": "по возрастанию",
|
|
107
|
+
"sort-descending": "по убыванию",
|
|
108
|
+
"sort-label": "Сортировка",
|
|
109
|
+
"sort-none": "Как задано источником",
|
|
110
|
+
"template-actions-label": "Действия с шаблоном",
|
|
111
|
+
"template-move-label": "Переместить шаблон",
|
|
112
|
+
"template-name-placeholder": "Название",
|
|
113
|
+
"template-pin-label": "Закрепить шаблон сверху",
|
|
114
|
+
"templates-tab-text": "Шаблоны",
|
|
115
|
+
"tree-collapse": "Свернуть",
|
|
116
|
+
"tree-expand": "Развернуть",
|
|
117
|
+
"tree-more": "Показать ещё",
|
|
118
|
+
"unpin-column-label": "Открепить столбец",
|
|
119
|
+
"untitled-template-text": "Все записи",
|
|
120
|
+
"view-action-text": "Посмотреть",
|
|
121
|
+
"view-density": "Строки",
|
|
122
|
+
"view-density-compact": "Компактно",
|
|
123
|
+
"view-density-normal": "Обычно",
|
|
124
|
+
"view-density-spacious": "Просторно",
|
|
125
|
+
"view-everywhere": "Для всех моих таблиц",
|
|
126
|
+
"view-lines": "Линии между столбцами",
|
|
127
|
+
"view-reset": "Сбросить вид",
|
|
128
|
+
"view-single-line": "Текст в одну строку",
|
|
129
|
+
"view-sticky-head": "Закреплять фильтр и шапку",
|
|
130
|
+
"view-stripes": "Чередовать строки"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
{
|
|
2
|
+
"component": "sf-view-table",
|
|
3
|
+
"probe": "sf-table against component.json (standard simai.smart-component 1.3.8 §12, gate 20; §18.4 many entries)",
|
|
4
|
+
"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",
|
|
5
|
+
"page": {
|
|
6
|
+
"lang": "ru",
|
|
7
|
+
"body": [
|
|
8
|
+
"<main style=\"width: 1100px\">",
|
|
9
|
+
" <sf-view-table id=\"t\" aria-label=\"Записи\" table-settings-key=\"probe.table\"></sf-view-table>",
|
|
10
|
+
"</main>"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
"probes": [
|
|
14
|
+
{
|
|
15
|
+
"id": "p1-window",
|
|
16
|
+
"title": "1 000 rows: only the rows in view and a margin are drawn, at most thirty nodes a row; a scroll moves the window and sf-table-window reports it",
|
|
17
|
+
"covers": "§18.4 window, gate 17 nodes per entry, events.window",
|
|
18
|
+
"steps": [
|
|
19
|
+
{
|
|
20
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', sortable: true}, {key: 'status', label: 'Статус'}, {key: 'amount', label: 'Сумма', type: 'number'}]); t.setRows(Array.from({length: 1000}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: ['active', 'done'][i % 2], amount: i * 3, revision: 'r1', actions: ['view', 'publish']}))); return true; })()",
|
|
21
|
+
"wait": 900,
|
|
22
|
+
"check": "(() => { const t = document.getElementById('t'); const drawn = t.querySelectorAll('tbody tr[data-row-id]').length; const body = t.querySelector('tbody'); let nodes = 0; const w = document.createTreeWalker(body, NodeFilter.SHOW_ALL); while (w.nextNode()) nodes++; return drawn > 10 && drawn <= 100 && t.querySelector('table').getAttribute('aria-rowcount') === '1001' && nodes / drawn <= 30; })()"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"script": "(() => { const t = document.getElementById('t'); window.__windows = []; t.addEventListener('sf-view-table-window', (event) => window.__windows.push(event.detail)); const row = t.querySelector('tbody tr[data-row-id]').getBoundingClientRect().height; window.scrollTo({top: t.querySelector('tbody').getBoundingClientRect().top + window.scrollY + row * 500, behavior: 'instant'}); return true; })()",
|
|
26
|
+
"wait": 800,
|
|
27
|
+
"check": "(() => { const t = document.getElementById('t'); const seen = [...t.querySelectorAll('tbody tr[data-row-id]')].map((row) => Number(row.dataset.rowId)); const last = window.__windows.at(-1); return window.__windows.length >= 1 && last.first > 300 && !seen.includes(1) && seen.length <= 100 && seen.every((id) => id - 1 >= last.first && id - 1 <= last.last); })()"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "p2-select",
|
|
33
|
+
"title": "a row's box: sf-table-select {ids} once, the composition port's sf-port-output once after it with its old detail, noted with its dates",
|
|
34
|
+
"covers": "events.select, values.selection, aliases sf-port-output, §18.4 a box is class markup",
|
|
35
|
+
"steps": [
|
|
36
|
+
{
|
|
37
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', sortable: true}, {key: 'status', label: 'Статус'}, {key: 'amount', label: 'Сумма', type: 'number'}]); t.setRows(Array.from({length: 3}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: ['active', 'done'][i % 2], amount: i * 3, revision: 'r1', actions: ['view', 'publish']}))); return true; })()",
|
|
38
|
+
"wait": 700,
|
|
39
|
+
"check": "!document.querySelector('#t tbody sf-checkbox') && Boolean(document.querySelector('#t tbody tr[data-row-id=\"2\"] input[data-sf-row-box]'))"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"user": "click:#t tbody tr[data-row-id=\"2\"] input[data-sf-row-box]",
|
|
43
|
+
"expect": {
|
|
44
|
+
"events": [
|
|
45
|
+
{
|
|
46
|
+
"name": "sf-view-table-select",
|
|
47
|
+
"count": 1,
|
|
48
|
+
"detail": {
|
|
49
|
+
"ids": [
|
|
50
|
+
"2"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "sf-port-output",
|
|
56
|
+
"count": 1,
|
|
57
|
+
"detail": {
|
|
58
|
+
"port": "selection",
|
|
59
|
+
"value": [
|
|
60
|
+
"2"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"values": {
|
|
66
|
+
"#t.selection": [
|
|
67
|
+
"2"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
"journal": [
|
|
71
|
+
{
|
|
72
|
+
"from": "sf-port-output",
|
|
73
|
+
"to": "sf-table-select",
|
|
74
|
+
"since": "2026-10-27",
|
|
75
|
+
"remove_after": "2026-12-01"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"check": "document.querySelector('#t tbody tr[data-row-id=\"2\"]').hasAttribute('data-selected')"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "p3-apply",
|
|
85
|
+
"title": "request-action-intent answers applied and sends sf-table-apply {action, scope: entry, ids, revisions}; sf-table-action-intent follows with {action_id, record_ids}",
|
|
86
|
+
"covers": "actions.request-action-intent emits apply, aliases sf-table-action-intent",
|
|
87
|
+
"steps": [
|
|
88
|
+
{
|
|
89
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', sortable: true}, {key: 'status', label: 'Статус'}, {key: 'amount', label: 'Сумма', type: 'number'}]); t.setRows(Array.from({length: 3}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: ['active', 'done'][i % 2], amount: i * 3, revision: 'r1', actions: ['view', 'publish']}))); return true; })()",
|
|
90
|
+
"wait": 700
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"action": {
|
|
94
|
+
"name": "request-action-intent",
|
|
95
|
+
"with": {
|
|
96
|
+
"action-id": "publish",
|
|
97
|
+
"record-ids": [
|
|
98
|
+
"3"
|
|
99
|
+
]
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"target": "#t",
|
|
103
|
+
"expect": {
|
|
104
|
+
"returns": {
|
|
105
|
+
"outcome": "applied"
|
|
106
|
+
},
|
|
107
|
+
"events": [
|
|
108
|
+
{
|
|
109
|
+
"name": "sf-view-table-apply",
|
|
110
|
+
"count": 1,
|
|
111
|
+
"detail": {
|
|
112
|
+
"action": "publish",
|
|
113
|
+
"scope": "entry",
|
|
114
|
+
"ids": [
|
|
115
|
+
"3"
|
|
116
|
+
],
|
|
117
|
+
"revisions": {
|
|
118
|
+
"3": "r1"
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "sf-table-action-intent",
|
|
124
|
+
"count": 1,
|
|
125
|
+
"detail": {
|
|
126
|
+
"action_id": "publish",
|
|
127
|
+
"record_ids": [
|
|
128
|
+
"3"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"journal": [
|
|
134
|
+
{
|
|
135
|
+
"from": "sf-table-action-intent",
|
|
136
|
+
"to": "sf-table-apply"
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "p4-keys",
|
|
145
|
+
"title": "the arrows, Home and End move between rows; End reaches the last of 1 000 rows, which is drawn first",
|
|
146
|
+
"covers": "keyboard.row ArrowDown focus:next, ArrowUp focus:prev, Home focus:first, End focus:last",
|
|
147
|
+
"steps": [
|
|
148
|
+
{
|
|
149
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', sortable: true}, {key: 'status', label: 'Статус'}, {key: 'amount', label: 'Сумма', type: 'number'}]); t.setRows(Array.from({length: 1000}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: ['active', 'done'][i % 2], amount: i * 3, revision: 'r1', actions: ['view', 'publish']}))); return true; })()",
|
|
150
|
+
"wait": 900
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"script": "(document.querySelector('#t tbody tr[data-row-id=\"1\"]').focus(), true)",
|
|
154
|
+
"wait": 100
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"user": "keyboard:ArrowDown",
|
|
158
|
+
"wait": 200,
|
|
159
|
+
"check": "document.activeElement?.dataset?.rowId === '2'"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"user": "keyboard:ArrowUp",
|
|
163
|
+
"wait": 200,
|
|
164
|
+
"check": "document.activeElement?.dataset?.rowId === '1'"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"user": "keyboard:End",
|
|
168
|
+
"wait": 900,
|
|
169
|
+
"check": "document.activeElement?.dataset?.rowId === '1000' && document.activeElement.getAttribute('aria-rowindex') === '1001'"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"user": "keyboard:Home",
|
|
173
|
+
"wait": 900,
|
|
174
|
+
"check": "document.activeElement?.dataset?.rowId === '1'"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "p5-search",
|
|
180
|
+
"title": "a cleared search is sf-table-search-change {search}; onSearchEnd follows once with the text as its detail, noted",
|
|
181
|
+
"covers": "events.search-change, aliases onSearchEnd (simai/ui-pro#1)",
|
|
182
|
+
"steps": [
|
|
183
|
+
{
|
|
184
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', sortable: true}, {key: 'status', label: 'Статус'}, {key: 'amount', label: 'Сумма', type: 'number'}]); t.setRows(Array.from({length: 3}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: ['active', 'done'][i % 2], amount: i * 3, revision: 'r1', actions: ['view', 'publish']}))); return true; })()",
|
|
185
|
+
"wait": 700
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"script": "(document.getElementById('t').resetQuery('search'), true)",
|
|
189
|
+
"expect": {
|
|
190
|
+
"events": [
|
|
191
|
+
{
|
|
192
|
+
"name": "sf-view-table-search-change",
|
|
193
|
+
"count": 1,
|
|
194
|
+
"detail": {
|
|
195
|
+
"search": ""
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "onSearchEnd",
|
|
200
|
+
"count": 1
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"journal": [
|
|
204
|
+
{
|
|
205
|
+
"from": "onSearchEnd",
|
|
206
|
+
"to": "sf-table-search-change"
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"check": "window.__heard.find((one) => one.name === 'onSearchEnd')?.detail === ''"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "p6-current",
|
|
216
|
+
"title": "current marks the open row with aria-current, sends nothing and moves no focus",
|
|
217
|
+
"covers": "settings.current",
|
|
218
|
+
"steps": [
|
|
219
|
+
{
|
|
220
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', sortable: true}, {key: 'status', label: 'Статус'}, {key: 'amount', label: 'Сумма', type: 'number'}]); t.setRows(Array.from({length: 3}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: ['active', 'done'][i % 2], amount: i * 3, revision: 'r1', actions: ['view', 'publish']}))); return true; })()",
|
|
221
|
+
"wait": 700
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"script": "(document.getElementById('t').current = '2', true)",
|
|
225
|
+
"wait": 300,
|
|
226
|
+
"expect": {
|
|
227
|
+
"events": [
|
|
228
|
+
{
|
|
229
|
+
"name": "sf-view-table-select",
|
|
230
|
+
"count": 0
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "sf-view-table-apply",
|
|
234
|
+
"count": 0
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
"check": "document.querySelector('#t tbody tr[data-row-id=\"2\"]').getAttribute('aria-current') === 'true' && document.getElementById('t').getAttribute('current') === '2' && !document.querySelector('#t tbody tr[data-row-id=\"1\"]').hasAttribute('aria-current')"
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"id": "p7-one-row",
|
|
244
|
+
"title": "one row changed is drawn again in place: the same element, the new text",
|
|
245
|
+
"covers": "§18.4 one entry redrawn in place, gate 17",
|
|
246
|
+
"steps": [
|
|
247
|
+
{
|
|
248
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', sortable: true}, {key: 'status', label: 'Статус'}, {key: 'amount', label: 'Сумма', type: 'number'}]); t.setRows(Array.from({length: 1000}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: ['active', 'done'][i % 2], amount: i * 3, revision: 'r1', actions: ['view', 'publish']}))); return true; })()",
|
|
249
|
+
"wait": 900
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"script": "(() => { window.__row = document.querySelector('#t tbody tr[data-row-id=\"3\"]'); document.getElementById('t').updateRowByKey('id', '3', {title: 'Изменено', revision: 'r2'}); return true; })()",
|
|
253
|
+
"wait": 300,
|
|
254
|
+
"check": "document.querySelector('#t tbody tr[data-row-id=\"3\"]') === window.__row && window.__row.textContent.includes('Изменено')"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "p8-template-name",
|
|
260
|
+
"title": "the filter window's template row says its name: sf-radio is fetched when the window opens, so the row is not a handle and a menu with nothing between them",
|
|
261
|
+
"covers": "relations cl-radio (lazy), §18.4 portal",
|
|
262
|
+
"steps": [
|
|
263
|
+
{
|
|
264
|
+
"script": "(() => { const t = document.getElementById('t'); t.setColumns([{key: 'title', label: 'Название', filter: {enabled: true}}, {key: 'status', label: 'Статус'}]); t.setRows(Array.from({length: 12}, (_, i) => ({id: String(i + 1), title: 'Запись ' + (i + 1), status: 'active'}))); t.templates = [{key: 'default', label: 'Все записи', default: true}]; return true; })()",
|
|
265
|
+
"wait": 700
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"script": "(() => { const t = document.getElementById('t'); const anchor = t.querySelector('button, [role=\"button\"]') || t; t.openContextMenu({currentTarget: anchor, target: anchor, composedPath: () => [anchor], preventDefault() {}, stopPropagation() {}}, {menu: 'filter-settings'}); return true; })()",
|
|
269
|
+
"wait": 1500,
|
|
270
|
+
"check": "(() => { const row = document.querySelector('[data-filter-template-key]'); if (!row) return false; const radio = row.querySelector('sf-radio'); if (!radio || !customElements.get('sf-radio')) return false; const drawn = radio.querySelector('.sf-radio-button, label'); const box = drawn?.getBoundingClientRect(); return Boolean(box) && box.width > 24 && box.height > 8 && row.textContent.includes('Все записи'); })()"
|
|
271
|
+
}
|
|
272
|
+
]
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
}
|
|
Binary file
|