@nocopypaste/vue-grid 0.9.0 → 0.11.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/AGENTS.md +72 -34
- package/CHANGELOG.md +34 -0
- package/README.md +118 -26
- package/agent/api.json +67 -1
- package/agent/api.md +10 -1
- package/agent/grid-config.schema.json +16 -0
- package/dist/agent/api.js +65 -1
- package/dist/agent/requirements.js +7 -2
- package/dist/agent/requirements.js.map +1 -1
- package/dist/base.css +1 -1
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +102 -84
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js +78 -56
- package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridCellEditor.js +6 -0
- package/dist/components/VGridCellEditor.js.map +1 -0
- package/dist/components/VGridCellEditor.vue_vue_type_script_setup_true_lang.js +208 -0
- package/dist/components/VGridCellEditor.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridSortMarker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/VGridSortMarker.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/components/VGridStatusBar.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/dist/composables/useEditing.js +202 -0
- package/dist/composables/useEditing.js.map +1 -0
- package/dist/core/value.js +18 -2
- package/dist/core/value.js.map +1 -1
- package/dist/core.css +1 -1
- package/dist/features/editing.js +12 -0
- package/dist/features/editing.js.map +1 -0
- package/dist/features/index.js +30 -28
- package/dist/features/index.js.map +1 -1
- package/dist/index.js +63 -62
- package/dist/internal/context.js.map +1 -1
- package/dist/internal/features.js.map +1 -1
- package/dist/locales/de.js +133 -0
- package/dist/locales/de.js.map +1 -0
- package/dist/locales/en.js +133 -0
- package/dist/locales/en.js.map +1 -0
- package/dist/locales/es.js +151 -0
- package/dist/locales/es.js.map +1 -0
- package/dist/locales/fr.js +151 -0
- package/dist/locales/fr.js.map +1 -0
- package/dist/locales/plural.js +11 -0
- package/dist/locales/plural.js.map +1 -0
- package/dist/locales/sr-Latn.js +135 -0
- package/dist/locales/sr-Latn.js.map +1 -0
- package/dist/locales/sr.js +135 -0
- package/dist/locales/sr.js.map +1 -0
- package/dist/theme.css +1 -1
- package/dist/types/agent/requirements.d.ts +1 -1
- package/dist/types/components/VGrid.vue.d.ts +10 -3
- package/dist/types/components/VGridCellEditor.vue.d.ts +11 -0
- package/dist/types/composables/useEditing.d.ts +73 -0
- package/dist/types/core/value.d.ts +6 -0
- package/dist/types/features/editing.d.ts +2 -0
- package/dist/types/features/index.d.ts +2 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/internal/context.d.ts +4 -0
- package/dist/types/internal/features.d.ts +2 -1
- package/dist/types/locales/de.d.ts +124 -0
- package/dist/types/locales/en.d.ts +127 -0
- package/dist/types/locales/es.d.ts +124 -0
- package/dist/types/locales/fr.d.ts +124 -0
- package/dist/types/locales/plural.d.ts +11 -0
- package/dist/types/locales/sr-Latn.d.ts +124 -0
- package/dist/types/locales/sr.d.ts +124 -0
- package/dist/types/types.d.ts +113 -8
- package/dist/vue-grid.css +1 -1
- package/llms-full.txt +200 -61
- package/llms.txt +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/** Español. `messages: es` (per grid) or `createVueGrid({ messages: es })`. */
|
|
2
|
+
export declare const es: {
|
|
3
|
+
loading: string;
|
|
4
|
+
empty: string;
|
|
5
|
+
noMatch: string;
|
|
6
|
+
clearFilters: string;
|
|
7
|
+
loadError: string;
|
|
8
|
+
staleRows: string;
|
|
9
|
+
retry: string;
|
|
10
|
+
subRowsError: string;
|
|
11
|
+
total: string;
|
|
12
|
+
blank: string;
|
|
13
|
+
groupRowCount: (count: number) => string;
|
|
14
|
+
selectAllRows: string;
|
|
15
|
+
selectRow: string;
|
|
16
|
+
selectGroup: string;
|
|
17
|
+
pageSelected: (count: number) => string;
|
|
18
|
+
selectAllMatching: (total: number) => string;
|
|
19
|
+
allSelected: (total: number) => string;
|
|
20
|
+
clearSelection: string;
|
|
21
|
+
expandRow: string;
|
|
22
|
+
collapseRow: string;
|
|
23
|
+
expandGroup: string;
|
|
24
|
+
collapseGroup: string;
|
|
25
|
+
columnMenu: (column: string) => string;
|
|
26
|
+
rowActions: string;
|
|
27
|
+
sortAscending: string;
|
|
28
|
+
sortDescending: string;
|
|
29
|
+
clearSort: string;
|
|
30
|
+
thenSortAscending: string;
|
|
31
|
+
thenSortDescending: string;
|
|
32
|
+
sortPosition: (position: number, dir: "asc" | "desc", count: number) => string;
|
|
33
|
+
filterMenu: string;
|
|
34
|
+
clearFilter: string;
|
|
35
|
+
clearAllFilters: string;
|
|
36
|
+
groupBy: (column: string) => string;
|
|
37
|
+
ungroup: string;
|
|
38
|
+
ungroupAll: string;
|
|
39
|
+
pinLeft: string;
|
|
40
|
+
pinRight: string;
|
|
41
|
+
unpin: string;
|
|
42
|
+
moveLeft: string;
|
|
43
|
+
moveRight: string;
|
|
44
|
+
fitWidth: string;
|
|
45
|
+
resetWidth: string;
|
|
46
|
+
hideColumn: string;
|
|
47
|
+
resetColumns: string;
|
|
48
|
+
resizeColumn: (column: string) => string;
|
|
49
|
+
columns: string;
|
|
50
|
+
filterColumns: string;
|
|
51
|
+
noMatchingColumns: string;
|
|
52
|
+
menu: string;
|
|
53
|
+
filterColumn: (column: string) => string;
|
|
54
|
+
filterColumnActive: (column: string) => string;
|
|
55
|
+
filterPlaceholder: string;
|
|
56
|
+
filterSummary: (column: string, summary: string) => string;
|
|
57
|
+
customFilter: string;
|
|
58
|
+
valuesSelected: (count: number) => string;
|
|
59
|
+
filterCondition: (column: string) => string;
|
|
60
|
+
filterValue: string;
|
|
61
|
+
filterFrom: (column: string) => string;
|
|
62
|
+
filterTo: (column: string) => string;
|
|
63
|
+
opContains: string;
|
|
64
|
+
opNotContains: string;
|
|
65
|
+
opEquals: string;
|
|
66
|
+
opNotEquals: string;
|
|
67
|
+
opStartsWith: string;
|
|
68
|
+
opEndsWith: string;
|
|
69
|
+
opEmpty: string;
|
|
70
|
+
opNotEmpty: string;
|
|
71
|
+
opBetween: string;
|
|
72
|
+
opOn: string;
|
|
73
|
+
opBefore: string;
|
|
74
|
+
opAfter: string;
|
|
75
|
+
any: string;
|
|
76
|
+
yes: string;
|
|
77
|
+
no: string;
|
|
78
|
+
emptyValue: string;
|
|
79
|
+
blanks: string;
|
|
80
|
+
searchValues: string;
|
|
81
|
+
all: string;
|
|
82
|
+
allShown: string;
|
|
83
|
+
moreValues: (count: number) => string;
|
|
84
|
+
noMatchingValues: string;
|
|
85
|
+
searchPlaceholder: string;
|
|
86
|
+
searchLabel: string;
|
|
87
|
+
pagination: string;
|
|
88
|
+
rowsPerPage: string;
|
|
89
|
+
pageSize: (size: number) => string;
|
|
90
|
+
pageSummary: (from: string, to: string, total: string) => string;
|
|
91
|
+
firstPage: string;
|
|
92
|
+
previousPage: string;
|
|
93
|
+
nextPage: string;
|
|
94
|
+
lastPage: string;
|
|
95
|
+
page: (page: number) => string;
|
|
96
|
+
statusBar: string;
|
|
97
|
+
rowCount: (shown: string, total: string | undefined, count: number, totalCount: number | undefined) => string;
|
|
98
|
+
selectedCount: (count: string, all: boolean, amount: number) => string;
|
|
99
|
+
filterCount: (count: number) => string;
|
|
100
|
+
clear: string;
|
|
101
|
+
sum: string;
|
|
102
|
+
average: string;
|
|
103
|
+
min: string;
|
|
104
|
+
max: string;
|
|
105
|
+
editCell: (column: string) => string;
|
|
106
|
+
editNotANumber: string;
|
|
107
|
+
editOutOfRange: (min: number | undefined, max: number | undefined) => string;
|
|
108
|
+
editSaveFailed: string;
|
|
109
|
+
editSaving: string;
|
|
110
|
+
view: string;
|
|
111
|
+
close: string;
|
|
112
|
+
copy: string;
|
|
113
|
+
copied: string;
|
|
114
|
+
actions: string;
|
|
115
|
+
details: string;
|
|
116
|
+
moreInfo: string;
|
|
117
|
+
moreItems: (count: number) => string;
|
|
118
|
+
showLess: string;
|
|
119
|
+
increased: string;
|
|
120
|
+
decreased: string;
|
|
121
|
+
toggle: string;
|
|
122
|
+
edit: string;
|
|
123
|
+
};
|
|
124
|
+
export default es;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/** Français. `messages: fr` (per grid) or `createVueGrid({ messages: fr })`. */
|
|
2
|
+
export declare const fr: {
|
|
3
|
+
loading: string;
|
|
4
|
+
empty: string;
|
|
5
|
+
noMatch: string;
|
|
6
|
+
clearFilters: string;
|
|
7
|
+
loadError: string;
|
|
8
|
+
staleRows: string;
|
|
9
|
+
retry: string;
|
|
10
|
+
subRowsError: string;
|
|
11
|
+
total: string;
|
|
12
|
+
blank: string;
|
|
13
|
+
groupRowCount: (count: number) => string;
|
|
14
|
+
selectAllRows: string;
|
|
15
|
+
selectRow: string;
|
|
16
|
+
selectGroup: string;
|
|
17
|
+
pageSelected: (count: number) => string;
|
|
18
|
+
selectAllMatching: (total: number) => string;
|
|
19
|
+
allSelected: (total: number) => string;
|
|
20
|
+
clearSelection: string;
|
|
21
|
+
expandRow: string;
|
|
22
|
+
collapseRow: string;
|
|
23
|
+
expandGroup: string;
|
|
24
|
+
collapseGroup: string;
|
|
25
|
+
columnMenu: (column: string) => string;
|
|
26
|
+
rowActions: string;
|
|
27
|
+
sortAscending: string;
|
|
28
|
+
sortDescending: string;
|
|
29
|
+
clearSort: string;
|
|
30
|
+
thenSortAscending: string;
|
|
31
|
+
thenSortDescending: string;
|
|
32
|
+
sortPosition: (position: number, dir: "asc" | "desc", count: number) => string;
|
|
33
|
+
filterMenu: string;
|
|
34
|
+
clearFilter: string;
|
|
35
|
+
clearAllFilters: string;
|
|
36
|
+
groupBy: (column: string) => string;
|
|
37
|
+
ungroup: string;
|
|
38
|
+
ungroupAll: string;
|
|
39
|
+
pinLeft: string;
|
|
40
|
+
pinRight: string;
|
|
41
|
+
unpin: string;
|
|
42
|
+
moveLeft: string;
|
|
43
|
+
moveRight: string;
|
|
44
|
+
fitWidth: string;
|
|
45
|
+
resetWidth: string;
|
|
46
|
+
hideColumn: string;
|
|
47
|
+
resetColumns: string;
|
|
48
|
+
resizeColumn: (column: string) => string;
|
|
49
|
+
columns: string;
|
|
50
|
+
filterColumns: string;
|
|
51
|
+
noMatchingColumns: string;
|
|
52
|
+
menu: string;
|
|
53
|
+
filterColumn: (column: string) => string;
|
|
54
|
+
filterColumnActive: (column: string) => string;
|
|
55
|
+
filterPlaceholder: string;
|
|
56
|
+
filterSummary: (column: string, summary: string) => string;
|
|
57
|
+
customFilter: string;
|
|
58
|
+
valuesSelected: (count: number) => string;
|
|
59
|
+
filterCondition: (column: string) => string;
|
|
60
|
+
filterValue: string;
|
|
61
|
+
filterFrom: (column: string) => string;
|
|
62
|
+
filterTo: (column: string) => string;
|
|
63
|
+
opContains: string;
|
|
64
|
+
opNotContains: string;
|
|
65
|
+
opEquals: string;
|
|
66
|
+
opNotEquals: string;
|
|
67
|
+
opStartsWith: string;
|
|
68
|
+
opEndsWith: string;
|
|
69
|
+
opEmpty: string;
|
|
70
|
+
opNotEmpty: string;
|
|
71
|
+
opBetween: string;
|
|
72
|
+
opOn: string;
|
|
73
|
+
opBefore: string;
|
|
74
|
+
opAfter: string;
|
|
75
|
+
any: string;
|
|
76
|
+
yes: string;
|
|
77
|
+
no: string;
|
|
78
|
+
emptyValue: string;
|
|
79
|
+
blanks: string;
|
|
80
|
+
searchValues: string;
|
|
81
|
+
all: string;
|
|
82
|
+
allShown: string;
|
|
83
|
+
moreValues: (count: number) => string;
|
|
84
|
+
noMatchingValues: string;
|
|
85
|
+
searchPlaceholder: string;
|
|
86
|
+
searchLabel: string;
|
|
87
|
+
pagination: string;
|
|
88
|
+
rowsPerPage: string;
|
|
89
|
+
pageSize: (size: number) => string;
|
|
90
|
+
pageSummary: (from: string, to: string, total: string) => string;
|
|
91
|
+
firstPage: string;
|
|
92
|
+
previousPage: string;
|
|
93
|
+
nextPage: string;
|
|
94
|
+
lastPage: string;
|
|
95
|
+
page: (page: number) => string;
|
|
96
|
+
statusBar: string;
|
|
97
|
+
rowCount: (shown: string, total: string | undefined, count: number, totalCount: number | undefined) => string;
|
|
98
|
+
selectedCount: (count: string, all: boolean, amount: number) => string;
|
|
99
|
+
filterCount: (count: number) => string;
|
|
100
|
+
clear: string;
|
|
101
|
+
sum: string;
|
|
102
|
+
average: string;
|
|
103
|
+
min: string;
|
|
104
|
+
max: string;
|
|
105
|
+
editCell: (column: string) => string;
|
|
106
|
+
editNotANumber: string;
|
|
107
|
+
editOutOfRange: (min: number | undefined, max: number | undefined) => string;
|
|
108
|
+
editSaveFailed: string;
|
|
109
|
+
editSaving: string;
|
|
110
|
+
view: string;
|
|
111
|
+
close: string;
|
|
112
|
+
copy: string;
|
|
113
|
+
copied: string;
|
|
114
|
+
actions: string;
|
|
115
|
+
details: string;
|
|
116
|
+
moreInfo: string;
|
|
117
|
+
moreItems: (count: number) => string;
|
|
118
|
+
showLess: string;
|
|
119
|
+
increased: string;
|
|
120
|
+
decreased: string;
|
|
121
|
+
toggle: string;
|
|
122
|
+
edit: string;
|
|
123
|
+
};
|
|
124
|
+
export default fr;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helpers shared by the language packs: a number in the pack's language, and the plural form a
|
|
3
|
+
* count takes there (`Intl.PluralRules`: `one`, `few`, `many`, `other`…).
|
|
4
|
+
*/
|
|
5
|
+
export type PluralForms = Partial<Record<Intl.LDMLPluralRule, string>> & {
|
|
6
|
+
other: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function packHelpers(lang: string): {
|
|
9
|
+
num: (n: number) => string;
|
|
10
|
+
plural: (count: number, forms: PluralForms, shown?: string) => string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/** Srpski (latinica). `messages: srLatn` (per grid) or `createVueGrid({ messages: srLatn })`. */
|
|
2
|
+
export declare const srLatn: {
|
|
3
|
+
loading: string;
|
|
4
|
+
empty: string;
|
|
5
|
+
noMatch: string;
|
|
6
|
+
clearFilters: string;
|
|
7
|
+
loadError: string;
|
|
8
|
+
staleRows: string;
|
|
9
|
+
retry: string;
|
|
10
|
+
subRowsError: string;
|
|
11
|
+
total: string;
|
|
12
|
+
blank: string;
|
|
13
|
+
groupRowCount: (count: number) => string;
|
|
14
|
+
selectAllRows: string;
|
|
15
|
+
selectRow: string;
|
|
16
|
+
selectGroup: string;
|
|
17
|
+
pageSelected: (count: number) => string;
|
|
18
|
+
selectAllMatching: (total: number) => string;
|
|
19
|
+
allSelected: (total: number) => string;
|
|
20
|
+
clearSelection: string;
|
|
21
|
+
expandRow: string;
|
|
22
|
+
collapseRow: string;
|
|
23
|
+
expandGroup: string;
|
|
24
|
+
collapseGroup: string;
|
|
25
|
+
columnMenu: (column: string) => string;
|
|
26
|
+
rowActions: string;
|
|
27
|
+
sortAscending: string;
|
|
28
|
+
sortDescending: string;
|
|
29
|
+
clearSort: string;
|
|
30
|
+
thenSortAscending: string;
|
|
31
|
+
thenSortDescending: string;
|
|
32
|
+
sortPosition: (position: number, dir: "asc" | "desc", count: number) => string;
|
|
33
|
+
filterMenu: string;
|
|
34
|
+
clearFilter: string;
|
|
35
|
+
clearAllFilters: string;
|
|
36
|
+
groupBy: (column: string) => string;
|
|
37
|
+
ungroup: string;
|
|
38
|
+
ungroupAll: string;
|
|
39
|
+
pinLeft: string;
|
|
40
|
+
pinRight: string;
|
|
41
|
+
unpin: string;
|
|
42
|
+
moveLeft: string;
|
|
43
|
+
moveRight: string;
|
|
44
|
+
fitWidth: string;
|
|
45
|
+
resetWidth: string;
|
|
46
|
+
hideColumn: string;
|
|
47
|
+
resetColumns: string;
|
|
48
|
+
resizeColumn: (column: string) => string;
|
|
49
|
+
columns: string;
|
|
50
|
+
filterColumns: string;
|
|
51
|
+
noMatchingColumns: string;
|
|
52
|
+
menu: string;
|
|
53
|
+
filterColumn: (column: string) => string;
|
|
54
|
+
filterColumnActive: (column: string) => string;
|
|
55
|
+
filterPlaceholder: string;
|
|
56
|
+
filterSummary: (column: string, summary: string) => string;
|
|
57
|
+
customFilter: string;
|
|
58
|
+
valuesSelected: (count: number) => string;
|
|
59
|
+
filterCondition: (column: string) => string;
|
|
60
|
+
filterValue: string;
|
|
61
|
+
filterFrom: (column: string) => string;
|
|
62
|
+
filterTo: (column: string) => string;
|
|
63
|
+
opContains: string;
|
|
64
|
+
opNotContains: string;
|
|
65
|
+
opEquals: string;
|
|
66
|
+
opNotEquals: string;
|
|
67
|
+
opStartsWith: string;
|
|
68
|
+
opEndsWith: string;
|
|
69
|
+
opEmpty: string;
|
|
70
|
+
opNotEmpty: string;
|
|
71
|
+
opBetween: string;
|
|
72
|
+
opOn: string;
|
|
73
|
+
opBefore: string;
|
|
74
|
+
opAfter: string;
|
|
75
|
+
any: string;
|
|
76
|
+
yes: string;
|
|
77
|
+
no: string;
|
|
78
|
+
emptyValue: string;
|
|
79
|
+
blanks: string;
|
|
80
|
+
searchValues: string;
|
|
81
|
+
all: string;
|
|
82
|
+
allShown: string;
|
|
83
|
+
moreValues: (count: number) => string;
|
|
84
|
+
noMatchingValues: string;
|
|
85
|
+
searchPlaceholder: string;
|
|
86
|
+
searchLabel: string;
|
|
87
|
+
pagination: string;
|
|
88
|
+
rowsPerPage: string;
|
|
89
|
+
pageSize: (size: number) => string;
|
|
90
|
+
pageSummary: (from: string, to: string, total: string) => string;
|
|
91
|
+
firstPage: string;
|
|
92
|
+
previousPage: string;
|
|
93
|
+
nextPage: string;
|
|
94
|
+
lastPage: string;
|
|
95
|
+
page: (page: number) => string;
|
|
96
|
+
statusBar: string;
|
|
97
|
+
rowCount: (shown: string, total: string | undefined, count: number, totalCount: number | undefined) => string;
|
|
98
|
+
selectedCount: (count: string, all: boolean) => string;
|
|
99
|
+
filterCount: (count: number) => string;
|
|
100
|
+
clear: string;
|
|
101
|
+
sum: string;
|
|
102
|
+
average: string;
|
|
103
|
+
min: string;
|
|
104
|
+
max: string;
|
|
105
|
+
editCell: (column: string) => string;
|
|
106
|
+
editNotANumber: string;
|
|
107
|
+
editOutOfRange: (min: number | undefined, max: number | undefined) => string;
|
|
108
|
+
editSaveFailed: string;
|
|
109
|
+
editSaving: string;
|
|
110
|
+
view: string;
|
|
111
|
+
close: string;
|
|
112
|
+
copy: string;
|
|
113
|
+
copied: string;
|
|
114
|
+
actions: string;
|
|
115
|
+
details: string;
|
|
116
|
+
moreInfo: string;
|
|
117
|
+
moreItems: (count: number) => string;
|
|
118
|
+
showLess: string;
|
|
119
|
+
increased: string;
|
|
120
|
+
decreased: string;
|
|
121
|
+
toggle: string;
|
|
122
|
+
edit: string;
|
|
123
|
+
};
|
|
124
|
+
export default srLatn;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/** Српски (ћирилица). `messages: sr` (per grid) or `createVueGrid({ messages: sr })`; Latin script: `srLatn`. */
|
|
2
|
+
export declare const sr: {
|
|
3
|
+
loading: string;
|
|
4
|
+
empty: string;
|
|
5
|
+
noMatch: string;
|
|
6
|
+
clearFilters: string;
|
|
7
|
+
loadError: string;
|
|
8
|
+
staleRows: string;
|
|
9
|
+
retry: string;
|
|
10
|
+
subRowsError: string;
|
|
11
|
+
total: string;
|
|
12
|
+
blank: string;
|
|
13
|
+
groupRowCount: (count: number) => string;
|
|
14
|
+
selectAllRows: string;
|
|
15
|
+
selectRow: string;
|
|
16
|
+
selectGroup: string;
|
|
17
|
+
pageSelected: (count: number) => string;
|
|
18
|
+
selectAllMatching: (total: number) => string;
|
|
19
|
+
allSelected: (total: number) => string;
|
|
20
|
+
clearSelection: string;
|
|
21
|
+
expandRow: string;
|
|
22
|
+
collapseRow: string;
|
|
23
|
+
expandGroup: string;
|
|
24
|
+
collapseGroup: string;
|
|
25
|
+
columnMenu: (column: string) => string;
|
|
26
|
+
rowActions: string;
|
|
27
|
+
sortAscending: string;
|
|
28
|
+
sortDescending: string;
|
|
29
|
+
clearSort: string;
|
|
30
|
+
thenSortAscending: string;
|
|
31
|
+
thenSortDescending: string;
|
|
32
|
+
sortPosition: (position: number, dir: "asc" | "desc", count: number) => string;
|
|
33
|
+
filterMenu: string;
|
|
34
|
+
clearFilter: string;
|
|
35
|
+
clearAllFilters: string;
|
|
36
|
+
groupBy: (column: string) => string;
|
|
37
|
+
ungroup: string;
|
|
38
|
+
ungroupAll: string;
|
|
39
|
+
pinLeft: string;
|
|
40
|
+
pinRight: string;
|
|
41
|
+
unpin: string;
|
|
42
|
+
moveLeft: string;
|
|
43
|
+
moveRight: string;
|
|
44
|
+
fitWidth: string;
|
|
45
|
+
resetWidth: string;
|
|
46
|
+
hideColumn: string;
|
|
47
|
+
resetColumns: string;
|
|
48
|
+
resizeColumn: (column: string) => string;
|
|
49
|
+
columns: string;
|
|
50
|
+
filterColumns: string;
|
|
51
|
+
noMatchingColumns: string;
|
|
52
|
+
menu: string;
|
|
53
|
+
filterColumn: (column: string) => string;
|
|
54
|
+
filterColumnActive: (column: string) => string;
|
|
55
|
+
filterPlaceholder: string;
|
|
56
|
+
filterSummary: (column: string, summary: string) => string;
|
|
57
|
+
customFilter: string;
|
|
58
|
+
valuesSelected: (count: number) => string;
|
|
59
|
+
filterCondition: (column: string) => string;
|
|
60
|
+
filterValue: string;
|
|
61
|
+
filterFrom: (column: string) => string;
|
|
62
|
+
filterTo: (column: string) => string;
|
|
63
|
+
opContains: string;
|
|
64
|
+
opNotContains: string;
|
|
65
|
+
opEquals: string;
|
|
66
|
+
opNotEquals: string;
|
|
67
|
+
opStartsWith: string;
|
|
68
|
+
opEndsWith: string;
|
|
69
|
+
opEmpty: string;
|
|
70
|
+
opNotEmpty: string;
|
|
71
|
+
opBetween: string;
|
|
72
|
+
opOn: string;
|
|
73
|
+
opBefore: string;
|
|
74
|
+
opAfter: string;
|
|
75
|
+
any: string;
|
|
76
|
+
yes: string;
|
|
77
|
+
no: string;
|
|
78
|
+
emptyValue: string;
|
|
79
|
+
blanks: string;
|
|
80
|
+
searchValues: string;
|
|
81
|
+
all: string;
|
|
82
|
+
allShown: string;
|
|
83
|
+
moreValues: (count: number) => string;
|
|
84
|
+
noMatchingValues: string;
|
|
85
|
+
searchPlaceholder: string;
|
|
86
|
+
searchLabel: string;
|
|
87
|
+
pagination: string;
|
|
88
|
+
rowsPerPage: string;
|
|
89
|
+
pageSize: (size: number) => string;
|
|
90
|
+
pageSummary: (from: string, to: string, total: string) => string;
|
|
91
|
+
firstPage: string;
|
|
92
|
+
previousPage: string;
|
|
93
|
+
nextPage: string;
|
|
94
|
+
lastPage: string;
|
|
95
|
+
page: (page: number) => string;
|
|
96
|
+
statusBar: string;
|
|
97
|
+
rowCount: (shown: string, total: string | undefined, count: number, totalCount: number | undefined) => string;
|
|
98
|
+
selectedCount: (count: string, all: boolean) => string;
|
|
99
|
+
filterCount: (count: number) => string;
|
|
100
|
+
clear: string;
|
|
101
|
+
sum: string;
|
|
102
|
+
average: string;
|
|
103
|
+
min: string;
|
|
104
|
+
max: string;
|
|
105
|
+
editCell: (column: string) => string;
|
|
106
|
+
editNotANumber: string;
|
|
107
|
+
editOutOfRange: (min: number | undefined, max: number | undefined) => string;
|
|
108
|
+
editSaveFailed: string;
|
|
109
|
+
editSaving: string;
|
|
110
|
+
view: string;
|
|
111
|
+
close: string;
|
|
112
|
+
copy: string;
|
|
113
|
+
copied: string;
|
|
114
|
+
actions: string;
|
|
115
|
+
details: string;
|
|
116
|
+
moreInfo: string;
|
|
117
|
+
moreItems: (count: number) => string;
|
|
118
|
+
showLess: string;
|
|
119
|
+
increased: string;
|
|
120
|
+
decreased: string;
|
|
121
|
+
toggle: string;
|
|
122
|
+
edit: string;
|
|
123
|
+
};
|
|
124
|
+
export default sr;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -176,6 +176,25 @@ export interface ColumnDef<T = any, R extends RendererRef = RendererName> {
|
|
|
176
176
|
exportValue?: (row: T) => unknown;
|
|
177
177
|
/** Included in CSV exports and copied rows (export feature)? Default `true`; set `false` on action columns. */
|
|
178
178
|
exportable?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Cells can be edited in place (editing feature): `true`, or per row. Double-click, Enter or F2
|
|
181
|
+
* on a focused cell, or typing, opens the editor; the grid emits `cell-edit` and your handler
|
|
182
|
+
* updates the data (the grid never changes rows itself).
|
|
183
|
+
*/
|
|
184
|
+
editable?: boolean | ((row: T) => boolean);
|
|
185
|
+
/**
|
|
186
|
+
* The editor (editing feature): `text`, `number`, `date`, `datetime`, `select`,
|
|
187
|
+
* `checkbox`, or your own component (`CellEditorProps`). Default from the renderer: numbers
|
|
188
|
+
* and money → number, dates → date, booleans → checkbox, status / chip → select, else text.
|
|
189
|
+
*/
|
|
190
|
+
editor?: EditorName | Component;
|
|
191
|
+
/** Options of the editor: the choices of a select, a number's `min` / `max`, a `placeholder`. */
|
|
192
|
+
editorOptions?: EditorOptions;
|
|
193
|
+
/**
|
|
194
|
+
* Checks an edited value before it is saved (editing feature): return an error message to keep
|
|
195
|
+
* the editor open with it, or nothing to accept the value.
|
|
196
|
+
*/
|
|
197
|
+
validate?: (value: unknown, row: T) => string | null | undefined | void;
|
|
179
198
|
/** Extra classes for the column's body cells (or a function of the row). */
|
|
180
199
|
cellClass?: ClassValue | ((row: T) => ClassValue);
|
|
181
200
|
/** Extra classes for the column's header cell. */
|
|
@@ -238,6 +257,61 @@ export interface CellActionEvent<T = any> {
|
|
|
238
257
|
/** The cell’s column definition. */
|
|
239
258
|
column: ColumnDef<T>;
|
|
240
259
|
}
|
|
260
|
+
/** A built-in cell editor (editing feature). */
|
|
261
|
+
export type EditorName = 'text' | 'number' | 'date' | 'datetime' | 'select' | 'checkbox';
|
|
262
|
+
/** A choice of a select editor: a value, and the text shown for it (default: the value). */
|
|
263
|
+
export interface EditorOption {
|
|
264
|
+
value: unknown;
|
|
265
|
+
label?: string;
|
|
266
|
+
}
|
|
267
|
+
/** Options of a column's editor (`editorOptions`). */
|
|
268
|
+
export interface EditorOptions {
|
|
269
|
+
/** Select: the choices (default: the column's distinct values in the rows). */
|
|
270
|
+
options?: readonly (EditorOption | string | number | boolean)[];
|
|
271
|
+
/** Number: the smallest value. */
|
|
272
|
+
min?: number;
|
|
273
|
+
/** Number: the largest value. */
|
|
274
|
+
max?: number;
|
|
275
|
+
/** Text and number: shown while empty. */
|
|
276
|
+
placeholder?: string;
|
|
277
|
+
/** Text: the longest value. */
|
|
278
|
+
maxLength?: number;
|
|
279
|
+
/** Anything your own editor component needs. */
|
|
280
|
+
[option: string]: unknown;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Props of your own editor component (`editor: MyEditor`). Emit `update:modelValue` as the value
|
|
284
|
+
* changes; Enter, Tab and Esc are handled around it (commit, commit and move, cancel). Emit
|
|
285
|
+
* `commit` / `cancel` yourself where a key or a click should do that.
|
|
286
|
+
*/
|
|
287
|
+
export interface CellEditorProps<T = any> {
|
|
288
|
+
/** The value being edited (starts as the cell value). */
|
|
289
|
+
modelValue: unknown;
|
|
290
|
+
row: T;
|
|
291
|
+
column: ColumnDef<T>;
|
|
292
|
+
options: EditorOptions;
|
|
293
|
+
/** The validation or save error, if any. */
|
|
294
|
+
error?: string;
|
|
295
|
+
/** Saving: the value can't change. */
|
|
296
|
+
disabled?: boolean;
|
|
297
|
+
/** The accessible name for the control, e.g. "Edit Stake". */
|
|
298
|
+
label: string;
|
|
299
|
+
/** Editing started by typing a character: it replaces the value. */
|
|
300
|
+
initial?: string;
|
|
301
|
+
}
|
|
302
|
+
/** An edited cell value, committed (editing feature): `cell-edit` and `save-cell` get it. */
|
|
303
|
+
export interface CellEditEvent<T = any> {
|
|
304
|
+
/** The row the cell belongs to. */
|
|
305
|
+
row: T;
|
|
306
|
+
/** The row's key (`row-key`). */
|
|
307
|
+
rowKey: RowKey;
|
|
308
|
+
/** The edited column. */
|
|
309
|
+
column: ColumnDef<T>;
|
|
310
|
+
/** The new value, typed by the editor: a number, a string, a date, a boolean, a select's value. */
|
|
311
|
+
value: unknown;
|
|
312
|
+
/** The value before the edit. */
|
|
313
|
+
oldValue: unknown;
|
|
314
|
+
}
|
|
241
315
|
export interface CellClickEvent<T = any> {
|
|
242
316
|
/** The row the cell belongs to. */
|
|
243
317
|
row: T;
|
|
@@ -371,6 +445,13 @@ export interface VGridExposed {
|
|
|
371
445
|
* Export feature.
|
|
372
446
|
*/
|
|
373
447
|
copyRows(options?: ExportOptions): Promise<boolean>;
|
|
448
|
+
/**
|
|
449
|
+
* Opens the editor of a cell (editing feature), if the column is `editable` for that row and the
|
|
450
|
+
* row is on screen. Returns whether it opened.
|
|
451
|
+
*/
|
|
452
|
+
startEdit(rowKey: RowKey, columnKey: string): boolean;
|
|
453
|
+
/** Closes the open editor: saves its value, or with `cancel` drops it. Editing feature. */
|
|
454
|
+
stopEdit(cancel?: boolean): void;
|
|
374
455
|
}
|
|
375
456
|
/** Which rows, columns and values an export or copy takes (export feature). */
|
|
376
457
|
export interface ExportOptions {
|
|
@@ -577,11 +658,19 @@ export interface StatusBarFeature {
|
|
|
577
658
|
/** The status bar's default content. */
|
|
578
659
|
StatusBar: Component;
|
|
579
660
|
}
|
|
661
|
+
export interface EditingFeature {
|
|
662
|
+
readonly feature: 'editing';
|
|
663
|
+
useEditing: typeof import('./composables/useEditing').useEditing;
|
|
664
|
+
/** The cell editor (loads on demand). */
|
|
665
|
+
Editor: Component;
|
|
666
|
+
/** Loads the editor's chunk ahead of the first edit (when a grid has editable columns). */
|
|
667
|
+
preload: () => Promise<unknown>;
|
|
668
|
+
}
|
|
580
669
|
export interface ServerGroupingFeature {
|
|
581
670
|
readonly feature: 'serverGrouping';
|
|
582
671
|
useServerGroups: typeof import('./composables/useServerGroups').useServerGroups;
|
|
583
672
|
}
|
|
584
|
-
export type GridFeature = ServerGroupingFeature | StatusBarFeature | ExportFeature | RowGroupingFeature | AggregationFeature | RowPinningFeature | ColumnGroupsFeature | ColumnResizingFeature | KeyboardNavigationFeature | ColumnVisibilityFeature | VirtualScrollingFeature | ColumnReorderFeature | ColumnPinningFeature | SortingFeature | FilteringFeature | ServerDataFeature | PaginationFeature | SelectionFeature | SubGridsFeature | MenusFeature;
|
|
673
|
+
export type GridFeature = EditingFeature | ServerGroupingFeature | StatusBarFeature | ExportFeature | RowGroupingFeature | AggregationFeature | RowPinningFeature | ColumnGroupsFeature | ColumnResizingFeature | KeyboardNavigationFeature | ColumnVisibilityFeature | VirtualScrollingFeature | ColumnReorderFeature | ColumnPinningFeature | SortingFeature | FilteringFeature | ServerDataFeature | PaginationFeature | SelectionFeature | SubGridsFeature | MenusFeature;
|
|
585
674
|
export type GridFeatureName = GridFeature['feature'];
|
|
586
675
|
export interface VueGridConfig {
|
|
587
676
|
/** Renderers every grid can use by name (`renderer: 'currency'`); `allRenderers` for all of them. */
|
|
@@ -668,9 +757,9 @@ export interface GridMessages {
|
|
|
668
757
|
thenSortDescending?: string;
|
|
669
758
|
/**
|
|
670
759
|
* Multi-column sort, for screen readers on a sorted header. Default
|
|
671
|
-
* `` `, sorted ${position} of ${count}, ascending` `` (`count`: how many keys).
|
|
760
|
+
* `` `, sorted ${position} of ${count}, ascending` `` (`count`: how many keys; the third argument).
|
|
672
761
|
*/
|
|
673
|
-
sortPosition?: (position: number, dir: 'asc' | 'desc') => string;
|
|
762
|
+
sortPosition?: (position: number, dir: 'asc' | 'desc', count: number) => string;
|
|
674
763
|
/** The header menu item that opens the column's filter. Default `Filter…`. */
|
|
675
764
|
filterMenu?: string;
|
|
676
765
|
/** Default `Clear filter`. */
|
|
@@ -785,7 +874,7 @@ export interface GridMessages {
|
|
|
785
874
|
rowsPerPage?: string;
|
|
786
875
|
/** A page size option. Default `` `${size} / page` `` */
|
|
787
876
|
pageSize?: (size: number) => string;
|
|
788
|
-
/** Default `` `${from}–${to} of ${total}` `` (numbers
|
|
877
|
+
/** Default `` `${from}–${to} of ${total}` `` (the numbers as text). */
|
|
789
878
|
pageSummary?: (from: string, to: string, total: string) => string;
|
|
790
879
|
/** Default `First page`. */
|
|
791
880
|
firstPage?: string;
|
|
@@ -799,10 +888,16 @@ export interface GridMessages {
|
|
|
799
888
|
page?: (page: number) => string;
|
|
800
889
|
/** The status bar's name for screen readers. Default `Grid status`. */
|
|
801
890
|
statusBar?: string;
|
|
802
|
-
/**
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
891
|
+
/**
|
|
892
|
+
* Default `` `${shown} of ${total} rows` `` while filtered, else `` `${shown} rows` `` (`1 row`).
|
|
893
|
+
* `shown` and `total` are formatted; `count` and `totalCount` are the numbers, for plurals.
|
|
894
|
+
*/
|
|
895
|
+
rowCount?: (shown: string, total: string | undefined, count: number, totalCount: number | undefined) => string;
|
|
896
|
+
/**
|
|
897
|
+
* Default `` `${count} selected` `` (`All ${count} selected` with all matching rows). `count` is
|
|
898
|
+
* formatted; `amount` is the number, for plurals.
|
|
899
|
+
*/
|
|
900
|
+
selectedCount?: (count: string, all: boolean, amount: number) => string;
|
|
806
901
|
/** Default `` `${count} filters` `` (`1 filter`). */
|
|
807
902
|
filterCount?: (count: number) => string;
|
|
808
903
|
/** The status bar's button. Default `Clear`. */
|
|
@@ -815,6 +910,16 @@ export interface GridMessages {
|
|
|
815
910
|
min?: string;
|
|
816
911
|
/** Default `Max`. */
|
|
817
912
|
max?: string;
|
|
913
|
+
/** The editor's accessible name. Default `Edit ${column}`. */
|
|
914
|
+
editCell?: (column: string) => string;
|
|
915
|
+
/** A number editor holds something else. Default `Enter a number.` */
|
|
916
|
+
editNotANumber?: string;
|
|
917
|
+
/** A number editor's value is outside `min` / `max`. Default `Enter a number from ${min} to ${max}.` (or at least / at most). */
|
|
918
|
+
editOutOfRange?: (min: number | undefined, max: number | undefined) => string;
|
|
919
|
+
/** `save-cell` rejected without a message. Default `Couldn't save the change.` */
|
|
920
|
+
editSaveFailed?: string;
|
|
921
|
+
/** Default `Saving…` (for screen readers while `save-cell` runs). */
|
|
922
|
+
editSaving?: string;
|
|
818
923
|
/** `json`'s button. Default `View`. */
|
|
819
924
|
view?: string;
|
|
820
925
|
/** Dialogs and popovers. Default `Close`. */
|