@kinetis/vector-ui 0.9.3 → 0.10.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/CHANGELOG.md +49 -0
- package/app/components/Vx/Action/Dialog.vue +5 -2
- package/app/components/Vx/List/BulkBar.vue +8 -4
- package/app/components/Vx/List/BulkEdit.vue +6 -3
- package/app/components/Vx/List/Pager.vue +49 -0
- package/app/components/Vx/Resource/Form.vue +2 -1
- package/app/components/Vx/Resource/RelationPanel.vue +28 -7
- package/app/components/Vx/Resource/Table.vue +105 -18
- package/app/composables/useVectorCursorPager.ts +49 -0
- package/app/composables/useVectorNotifications.ts +3 -3
- package/app/composables/useVectorResource.ts +7 -2
- package/app/i18n/ar/actions.ts +1 -0
- package/app/i18n/ar/list.ts +10 -0
- package/app/i18n/de/actions.ts +1 -0
- package/app/i18n/de/list.ts +10 -0
- package/app/i18n/en/actions.ts +1 -0
- package/app/i18n/en/list.ts +10 -0
- package/app/i18n/es/actions.ts +1 -0
- package/app/i18n/es/list.ts +10 -0
- package/app/i18n/fr/actions.ts +1 -0
- package/app/i18n/fr/list.ts +10 -0
- package/app/i18n/he/actions.ts +1 -0
- package/app/i18n/he/list.ts +10 -0
- package/app/i18n/it/actions.ts +1 -0
- package/app/i18n/it/list.ts +10 -0
- package/app/i18n/ja/actions.ts +1 -0
- package/app/i18n/ja/list.ts +10 -0
- package/app/i18n/ko/actions.ts +1 -0
- package/app/i18n/ko/list.ts +10 -0
- package/app/i18n/nl/actions.ts +1 -0
- package/app/i18n/nl/list.ts +10 -0
- package/app/i18n/pl/actions.ts +1 -0
- package/app/i18n/pl/list.ts +10 -0
- package/app/i18n/pt/actions.ts +1 -0
- package/app/i18n/pt/list.ts +10 -0
- package/app/i18n/pt-BR/actions.ts +1 -0
- package/app/i18n/pt-BR/list.ts +10 -0
- package/app/i18n/ru/actions.ts +1 -0
- package/app/i18n/ru/list.ts +10 -0
- package/app/i18n/tr/actions.ts +1 -0
- package/app/i18n/tr/list.ts +10 -0
- package/app/i18n/uk/actions.ts +1 -0
- package/app/i18n/uk/list.ts +10 -0
- package/app/i18n/zh-Hans/actions.ts +1 -0
- package/app/i18n/zh-Hans/list.ts +10 -0
- package/app/types/vector.ts +16 -2
- package/app/utils/richtext.ts +6 -2
- package/package.json +1 -1
package/app/i18n/pt-BR/list.ts
CHANGED
|
@@ -36,6 +36,9 @@ export default {
|
|
|
36
36
|
deleteTitle: 'Excluir {count} {noun}?',
|
|
37
37
|
restoreTitle: 'Restaurar {count} {noun}?',
|
|
38
38
|
forceDeleteTitle: 'Excluir permanentemente {count} {noun}?',
|
|
39
|
+
deleteAllTitle: 'Excluir todos os {noun} correspondentes?',
|
|
40
|
+
restoreAllTitle: 'Restaurar todos os {noun} correspondentes?',
|
|
41
|
+
forceDeleteAllTitle: 'Excluir permanentemente todos os {noun} correspondentes?',
|
|
39
42
|
toTrash: 'Eles vão para a lixeira e podem ser restaurados.',
|
|
40
43
|
irreversible: 'Esta ação não pode ser desfeita.',
|
|
41
44
|
restored: '{count} {noun} restaurados.',
|
|
@@ -43,18 +46,22 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
bulk: {
|
|
45
48
|
allMatching: 'Todos os {total} correspondentes',
|
|
49
|
+
allMatchingUncounted: 'Todos os registros correspondentes',
|
|
46
50
|
selected: '{count} selecionados',
|
|
47
51
|
selectAllMatching: 'Selecionar todos os {total} correspondentes',
|
|
52
|
+
selectAllMatchingUncounted: 'Selecionar todos os registros correspondentes',
|
|
48
53
|
onlyChecked: 'Somente as linhas marcadas',
|
|
49
54
|
clearSelection: 'Limpar seleção',
|
|
50
55
|
},
|
|
51
56
|
bulkEdit: {
|
|
52
57
|
everyMatching: 'todos os {noun} correspondentes ({count})',
|
|
58
|
+
everyMatchingUncounted: 'todos os {noun} correspondentes',
|
|
53
59
|
some: '{count} {noun}',
|
|
54
60
|
title: 'Editar {subject}',
|
|
55
61
|
fieldsToChange: 'Campos a alterar',
|
|
56
62
|
fieldsHint: 'Somente os campos que você escolher são gravados; todos os outros valores permanecem como estão.',
|
|
57
63
|
applyTo: 'Aplicar a {count}',
|
|
64
|
+
applyToAll: 'Aplicar a todos os correspondentes',
|
|
58
65
|
updated: '{count} {noun} atualizados.',
|
|
59
66
|
},
|
|
60
67
|
columns: {
|
|
@@ -142,6 +149,9 @@ export default {
|
|
|
142
149
|
upsert: 'Cada linha atualiza o registro cujo valor corresponde, ou cria um quando não há nenhum.',
|
|
143
150
|
},
|
|
144
151
|
},
|
|
152
|
+
pager: {
|
|
153
|
+
page: 'Página {page}',
|
|
154
|
+
},
|
|
145
155
|
page: {
|
|
146
156
|
create: 'Novo {noun}',
|
|
147
157
|
unknown: 'Recurso desconhecido',
|
package/app/i18n/ru/actions.ts
CHANGED
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
// "Run {action} on {subject}?", with the action's label in bold.
|
|
4
4
|
runOn: 'Выполнить {action}: {subject}?',
|
|
5
5
|
subjectAll: 'все подходящие {label} ({count})',
|
|
6
|
+
subjectAllUncounted: 'все подходящие {label}',
|
|
6
7
|
subjectCount: '{label} ({count})',
|
|
7
8
|
done: '{label}: выполнено.',
|
|
8
9
|
declined: 'Действие отклонено.',
|
package/app/i18n/ru/list.ts
CHANGED
|
@@ -36,6 +36,9 @@ export default {
|
|
|
36
36
|
deleteTitle: 'Удалить {noun} ({count})?',
|
|
37
37
|
restoreTitle: 'Восстановить {noun} ({count})?',
|
|
38
38
|
forceDeleteTitle: 'Удалить {noun} ({count}) навсегда?',
|
|
39
|
+
deleteAllTitle: 'Удалить все подходящие {noun}?',
|
|
40
|
+
restoreAllTitle: 'Восстановить все подходящие {noun}?',
|
|
41
|
+
forceDeleteAllTitle: 'Удалить все подходящие {noun} навсегда?',
|
|
39
42
|
toTrash: 'Записи будут перемещены в корзину и могут быть восстановлены.',
|
|
40
43
|
irreversible: 'Это действие нельзя отменить.',
|
|
41
44
|
restored: '{noun}: восстановлено {count}.',
|
|
@@ -43,18 +46,22 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
bulk: {
|
|
45
48
|
allMatching: 'Все подходящие ({total})',
|
|
49
|
+
allMatchingUncounted: 'Все подходящие записи',
|
|
46
50
|
selected: 'Выбрано: {count}',
|
|
47
51
|
selectAllMatching: 'Выбрать все подходящие ({total})',
|
|
52
|
+
selectAllMatchingUncounted: 'Выбрать все подходящие записи',
|
|
48
53
|
onlyChecked: 'Только отмеченные строки',
|
|
49
54
|
clearSelection: 'Снять выделение',
|
|
50
55
|
},
|
|
51
56
|
bulkEdit: {
|
|
52
57
|
everyMatching: 'все подходящие {noun} ({count})',
|
|
58
|
+
everyMatchingUncounted: 'все подходящие {noun}',
|
|
53
59
|
some: '{noun} ({count})',
|
|
54
60
|
title: 'Изменить: {subject}',
|
|
55
61
|
fieldsToChange: 'Изменяемые поля',
|
|
56
62
|
fieldsHint: 'Записываются только выбранные поля; все остальные значения остаются без изменений.',
|
|
57
63
|
applyTo: 'Применить к {count}',
|
|
64
|
+
applyToAll: 'Применить ко всем подходящим',
|
|
58
65
|
updated: '{noun}: обновлено {count}.',
|
|
59
66
|
},
|
|
60
67
|
columns: {
|
|
@@ -142,6 +149,9 @@ export default {
|
|
|
142
149
|
upsert: 'Каждая строка обновляет запись с совпадающим значением или создаёт новую, если совпадений нет.',
|
|
143
150
|
},
|
|
144
151
|
},
|
|
152
|
+
pager: {
|
|
153
|
+
page: 'Страница {page}',
|
|
154
|
+
},
|
|
145
155
|
page: {
|
|
146
156
|
create: 'Создать: {noun}',
|
|
147
157
|
unknown: 'Неизвестный ресурс',
|
package/app/i18n/tr/actions.ts
CHANGED
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
// "Run {action} on {subject}?", with the action's label in bold.
|
|
4
4
|
runOn: '{subject} için {action} çalıştırılsın mı?',
|
|
5
5
|
subjectAll: 'eşleşen her {label} ({count})',
|
|
6
|
+
subjectAllUncounted: 'eşleşen her {label}',
|
|
6
7
|
subjectCount: '{count} {label}',
|
|
7
8
|
done: '{label} tamamlandı.',
|
|
8
9
|
declined: 'Eylem reddedildi.',
|
package/app/i18n/tr/list.ts
CHANGED
|
@@ -36,6 +36,9 @@ export default {
|
|
|
36
36
|
deleteTitle: '{count} {noun} silinsin mi?',
|
|
37
37
|
restoreTitle: '{count} {noun} geri yüklensin mi?',
|
|
38
38
|
forceDeleteTitle: '{count} {noun} kalıcı olarak silinsin mi?',
|
|
39
|
+
deleteAllTitle: 'Eşleşen tüm {noun} silinsin mi?',
|
|
40
|
+
restoreAllTitle: 'Eşleşen tüm {noun} geri yüklensin mi?',
|
|
41
|
+
forceDeleteAllTitle: 'Eşleşen tüm {noun} kalıcı olarak silinsin mi?',
|
|
39
42
|
toTrash: 'Çöp kutusuna taşınırlar ve geri yüklenebilirler.',
|
|
40
43
|
irreversible: 'Bu işlem geri alınamaz.',
|
|
41
44
|
restored: '{count} {noun} geri yüklendi.',
|
|
@@ -43,18 +46,22 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
bulk: {
|
|
45
48
|
allMatching: 'Eşleşen tüm kayıtlar: {total}',
|
|
49
|
+
allMatchingUncounted: 'Eşleşen tüm kayıtlar',
|
|
46
50
|
selected: '{count} seçili',
|
|
47
51
|
selectAllMatching: 'Eşleşen tüm kayıtları seç: {total}',
|
|
52
|
+
selectAllMatchingUncounted: 'Eşleşen tüm kayıtları seç',
|
|
48
53
|
onlyChecked: 'Yalnızca işaretli satırlar',
|
|
49
54
|
clearSelection: 'Seçimi temizle',
|
|
50
55
|
},
|
|
51
56
|
bulkEdit: {
|
|
52
57
|
everyMatching: 'eşleşen her {noun} ({count})',
|
|
58
|
+
everyMatchingUncounted: 'eşleşen her {noun}',
|
|
53
59
|
some: '{count} {noun}',
|
|
54
60
|
title: 'Düzenle: {subject}',
|
|
55
61
|
fieldsToChange: 'Değiştirilecek alanlar',
|
|
56
62
|
fieldsHint: 'Yalnızca seçtiğiniz alanlar yazılır; diğer tüm değerler olduğu gibi kalır.',
|
|
57
63
|
applyTo: 'Uygula ({count})',
|
|
64
|
+
applyToAll: 'Eşleşen tümüne uygula',
|
|
58
65
|
updated: '{count} {noun} güncellendi.',
|
|
59
66
|
},
|
|
60
67
|
columns: {
|
|
@@ -142,6 +149,9 @@ export default {
|
|
|
142
149
|
upsert: 'Her satır, değeri eşleşen kaydı günceller ya da eşleşen yoksa yeni bir kayıt oluşturur.',
|
|
143
150
|
},
|
|
144
151
|
},
|
|
152
|
+
pager: {
|
|
153
|
+
page: 'Sayfa {page}',
|
|
154
|
+
},
|
|
145
155
|
page: {
|
|
146
156
|
create: 'Yeni {noun}',
|
|
147
157
|
unknown: 'Bilinmeyen kaynak',
|
package/app/i18n/uk/actions.ts
CHANGED
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
// "Run {action} on {subject}?", with the action's label in bold.
|
|
4
4
|
runOn: 'Виконати {action} для {subject}?',
|
|
5
5
|
subjectAll: 'усіх відповідних записів ({label}: {count})',
|
|
6
|
+
subjectAllUncounted: 'усіх відповідних записів ({label})',
|
|
6
7
|
subjectCount: '{count} {label}',
|
|
7
8
|
done: '{label}: виконано.',
|
|
8
9
|
declined: 'Дію відхилено.',
|
package/app/i18n/uk/list.ts
CHANGED
|
@@ -36,6 +36,9 @@ export default {
|
|
|
36
36
|
deleteTitle: 'Видалити {noun} ({count})?',
|
|
37
37
|
restoreTitle: 'Відновити {noun} ({count})?',
|
|
38
38
|
forceDeleteTitle: 'Видалити {noun} ({count}) назавжди?',
|
|
39
|
+
deleteAllTitle: 'Видалити всі відповідні {noun}?',
|
|
40
|
+
restoreAllTitle: 'Відновити всі відповідні {noun}?',
|
|
41
|
+
forceDeleteAllTitle: 'Видалити всі відповідні {noun} назавжди?',
|
|
39
42
|
toTrash: 'Їх буде переміщено до кошика, звідки їх можна відновити.',
|
|
40
43
|
irreversible: 'Цю дію неможливо скасувати.',
|
|
41
44
|
restored: '{noun}: відновлено {count}.',
|
|
@@ -43,18 +46,22 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
bulk: {
|
|
45
48
|
allMatching: 'Усі відповідні: {total}',
|
|
49
|
+
allMatchingUncounted: 'Усі відповідні записи',
|
|
46
50
|
selected: 'Вибрано: {count}',
|
|
47
51
|
selectAllMatching: 'Вибрати всі відповідні ({total})',
|
|
52
|
+
selectAllMatchingUncounted: 'Вибрати всі відповідні записи',
|
|
48
53
|
onlyChecked: 'Лише позначені рядки',
|
|
49
54
|
clearSelection: 'Скасувати вибір',
|
|
50
55
|
},
|
|
51
56
|
bulkEdit: {
|
|
52
57
|
everyMatching: 'усі відповідні {noun} ({count})',
|
|
58
|
+
everyMatchingUncounted: 'усі відповідні {noun}',
|
|
53
59
|
some: '{noun} ({count})',
|
|
54
60
|
title: 'Редагувати {subject}',
|
|
55
61
|
fieldsToChange: 'Поля для зміни',
|
|
56
62
|
fieldsHint: 'Записуються лише вибрані поля; усі інші значення залишаються без змін.',
|
|
57
63
|
applyTo: 'Застосувати до {count}',
|
|
64
|
+
applyToAll: 'Застосувати до всіх відповідних',
|
|
58
65
|
updated: '{noun}: оновлено {count}.',
|
|
59
66
|
},
|
|
60
67
|
columns: {
|
|
@@ -142,6 +149,9 @@ export default {
|
|
|
142
149
|
upsert: 'Кожен рядок оновлює запис із відповідним значенням або створює новий, якщо такого немає.',
|
|
143
150
|
},
|
|
144
151
|
},
|
|
152
|
+
pager: {
|
|
153
|
+
page: 'Сторінка {page}',
|
|
154
|
+
},
|
|
145
155
|
page: {
|
|
146
156
|
create: 'Створити: {noun}',
|
|
147
157
|
unknown: 'Невідомий ресурс',
|
|
@@ -3,6 +3,7 @@ export default {
|
|
|
3
3
|
// "Run {action} on {subject}?", with the action's label in bold.
|
|
4
4
|
runOn: '对{subject}执行{action}?',
|
|
5
5
|
subjectAll: '所有匹配的{label}({count})',
|
|
6
|
+
subjectAllUncounted: '所有匹配的{label}',
|
|
6
7
|
subjectCount: '{count} 个{label}',
|
|
7
8
|
done: '{label}已完成。',
|
|
8
9
|
declined: '该操作已被拒绝。',
|
package/app/i18n/zh-Hans/list.ts
CHANGED
|
@@ -36,6 +36,9 @@ export default {
|
|
|
36
36
|
deleteTitle: '删除 {count} 个{noun}?',
|
|
37
37
|
restoreTitle: '恢复 {count} 个{noun}?',
|
|
38
38
|
forceDeleteTitle: '永久删除 {count} 个{noun}?',
|
|
39
|
+
deleteAllTitle: '删除所有匹配的{noun}?',
|
|
40
|
+
restoreAllTitle: '恢复所有匹配的{noun}?',
|
|
41
|
+
forceDeleteAllTitle: '永久删除所有匹配的{noun}?',
|
|
39
42
|
toTrash: '它们将移至回收站,可以恢复。',
|
|
40
43
|
irreversible: '此操作无法撤销。',
|
|
41
44
|
restored: '已恢复 {count} 个{noun}。',
|
|
@@ -43,18 +46,22 @@ export default {
|
|
|
43
46
|
},
|
|
44
47
|
bulk: {
|
|
45
48
|
allMatching: '全部 {total} 个匹配项',
|
|
49
|
+
allMatchingUncounted: '所有匹配的记录',
|
|
46
50
|
selected: '已选择 {count} 个',
|
|
47
51
|
selectAllMatching: '选择全部 {total} 个匹配项',
|
|
52
|
+
selectAllMatchingUncounted: '选择所有匹配的记录',
|
|
48
53
|
onlyChecked: '仅勾选的行',
|
|
49
54
|
clearSelection: '清除选择',
|
|
50
55
|
},
|
|
51
56
|
bulkEdit: {
|
|
52
57
|
everyMatching: '所有匹配的{noun}({count})',
|
|
58
|
+
everyMatchingUncounted: '所有匹配的{noun}',
|
|
53
59
|
some: '{count} 个{noun}',
|
|
54
60
|
title: '编辑{subject}',
|
|
55
61
|
fieldsToChange: '要更改的字段',
|
|
56
62
|
fieldsHint: '只写入你选择的字段;其他值保持不变。',
|
|
57
63
|
applyTo: '应用到 {count} 个',
|
|
64
|
+
applyToAll: '应用到所有匹配项',
|
|
58
65
|
updated: '已更新 {count} 个{noun}。',
|
|
59
66
|
},
|
|
60
67
|
columns: {
|
|
@@ -142,6 +149,9 @@ export default {
|
|
|
142
149
|
upsert: '每一行更新值匹配的记录;没有匹配时则新建一条记录。',
|
|
143
150
|
},
|
|
144
151
|
},
|
|
152
|
+
pager: {
|
|
153
|
+
page: '第 {page} 页',
|
|
154
|
+
},
|
|
145
155
|
page: {
|
|
146
156
|
create: '新建{noun}',
|
|
147
157
|
unknown: '未知资源',
|
package/app/types/vector.ts
CHANGED
|
@@ -350,6 +350,10 @@ export interface VectorResource {
|
|
|
350
350
|
summaries: string[]
|
|
351
351
|
exportLimit: number
|
|
352
352
|
bulkLimit: number
|
|
353
|
+
/** The list's offset pages carry no total: previous and next only. Optional for a descriptor from before it existed. */
|
|
354
|
+
withoutCount?: boolean
|
|
355
|
+
/** The list pages by cursor: no sort, grouping, page numbers, total or summaries. Optional for a descriptor from before it existed. */
|
|
356
|
+
cursorPaging?: boolean
|
|
353
357
|
}
|
|
354
358
|
show: { fields: string[] }
|
|
355
359
|
/** Whether a record may be duplicated into a new one's form. */
|
|
@@ -424,15 +428,25 @@ export interface VectorCountValue {
|
|
|
424
428
|
|
|
425
429
|
export type VectorRecord = Record<string, unknown> & { id: number | string }
|
|
426
430
|
|
|
431
|
+
/** An offset page. A withoutCount resource's has `total` and `lastPage` null and says whether another page follows. */
|
|
427
432
|
export interface VectorPage {
|
|
428
433
|
data: VectorRecord[]
|
|
429
434
|
currentPage: number
|
|
430
435
|
perPage: number
|
|
431
|
-
total: number
|
|
432
|
-
lastPage: number
|
|
436
|
+
total: number | null
|
|
437
|
+
lastPage: number | null
|
|
438
|
+
hasMore?: boolean
|
|
433
439
|
summaries?: Record<string, number | null>
|
|
434
440
|
}
|
|
435
441
|
|
|
442
|
+
/** A keyset page: the cursor of the next one, null after the last. */
|
|
443
|
+
export interface VectorCursorPage {
|
|
444
|
+
data: VectorRecord[]
|
|
445
|
+
nextCursor: string | null
|
|
446
|
+
hasMore: boolean
|
|
447
|
+
perPage: number
|
|
448
|
+
}
|
|
449
|
+
|
|
436
450
|
export function fieldProps(field: VectorField): Record<string, unknown> {
|
|
437
451
|
return Array.isArray(field.props) ? {} : field.props
|
|
438
452
|
}
|
package/app/utils/richtext.ts
CHANGED
|
@@ -252,8 +252,12 @@ export function sanitizeHtml(html: string): string {
|
|
|
252
252
|
|
|
253
253
|
// Fail closed: a sanitizer that does not clean a known-bad canary exactly
|
|
254
254
|
// (a DOM that iterates wrongly, a patched library) is not trusted, and
|
|
255
|
-
// everything is shown as text instead.
|
|
256
|
-
|
|
255
|
+
// everything is shown as text instead. Its on-attributes name no event,
|
|
256
|
+
// and it has no style: the browser checks a real handler or style against
|
|
257
|
+
// the CSP even in the inert document DOMPurify parses into, and reports a
|
|
258
|
+
// violation for each, while the allow-list strips any attribute it does
|
|
259
|
+
// not name all the same.
|
|
260
|
+
purifierWorks ??= purifier.sanitize('<p onvector="x">a<script>b</script><img src="x" onvectorerror="y"><a href="javascript:z">c</a></p>', SANITIZE_CONFIG)
|
|
257
261
|
=== '<p>a<img><a target="_blank" rel="noopener noreferrer nofollow">c</a></p>'
|
|
258
262
|
|
|
259
263
|
return purifierWorks ? purifier.sanitize(html, SANITIZE_CONFIG) : escapeHtml(html)
|