@wgalleti/primevue-components 1.19.1 → 2.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/dist/components/crud/WCrudView.vue.d.ts +57 -39
- package/dist/components/index.d.ts +2 -0
- package/dist/components/ui/WAvatar.vue.d.ts +1 -1
- package/dist/components/ui/WCommandPalette.vue.d.ts +36 -0
- package/dist/components/ui/WSkeleton.vue.d.ts +16 -0
- package/dist/components/ui/WTabBar.vue.d.ts +4 -0
- package/dist/components-BnqaILkB.cjs +25 -0
- package/dist/components-BnqaILkB.cjs.map +1 -0
- package/dist/{components-Dc6g4rkE.js → components-_MpGQJOo.js} +2801 -2450
- package/dist/components-_MpGQJOo.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/useDelayedLoading.d.ts +12 -0
- package/dist/composables/useUrlState.d.ts +16 -0
- package/dist/{composables-D95O8LxH.js → composables-B2_3FVLB.js} +2 -2
- package/dist/{composables-D95O8LxH.js.map → composables-B2_3FVLB.js.map} +1 -1
- package/dist/{composables-xxBuXJHV.cjs → composables-qoAinVWS.cjs} +2 -2
- package/dist/{composables-xxBuXJHV.cjs.map → composables-qoAinVWS.cjs.map} +1 -1
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +27 -27
- package/dist/index.js.map +1 -1
- package/dist/primevue-components.css +1 -1
- package/dist/types/commandPalette.d.ts +10 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/useFormKeyboardNav-BDnTzUm9.cjs +3 -0
- package/dist/useFormKeyboardNav-BDnTzUm9.cjs.map +1 -0
- package/dist/{useFormKeyboardNav-DmDF7T3r.js → useFormKeyboardNav-CeR3k4bn.js} +120 -109
- package/dist/useFormKeyboardNav-CeR3k4bn.js.map +1 -0
- package/dist/utils/paletteFilter.d.ts +5 -0
- package/package.json +1 -1
- package/dist/components-D02Pr8Bt.cjs +0 -25
- package/dist/components-D02Pr8Bt.cjs.map +0 -1
- package/dist/components-Dc6g4rkE.js.map +0 -1
- package/dist/useFormKeyboardNav-BCb28hdV.cjs +0 -3
- package/dist/useFormKeyboardNav-BCb28hdV.cjs.map +0 -1
- package/dist/useFormKeyboardNav-DmDF7T3r.js.map +0 -1
|
@@ -55,6 +55,16 @@ type __VLS_Props = {
|
|
|
55
55
|
/** Chave de persistência do estado de coluna (visibilidade) em localStorage.
|
|
56
56
|
* Opt-in: quando definida, exibe o seletor de colunas e persiste o que foi ocultado. */
|
|
57
57
|
persistState?: string;
|
|
58
|
+
/** Guarda o estado da lista na query da URL (`router.replace`, nunca push): sobrevive ao F5
|
|
59
|
+
* e às abas de rota. LIGADO por padrão; `false` desliga — obrigatório em lista embutida
|
|
60
|
+
* (diálogo, aba de detalhe), que não pode escrever na URL da página. `true` ou prefixo (`string`, p.ex. `'orc'` → `orc_page`) para duas
|
|
61
|
+
* listas na mesma tela. Chaves: `search`, `page`, `sort` (`campo` / `-campo`), `f_<param>`
|
|
62
|
+
* (filtro de coluna; lista em CSV) e `id` (linha selecionada, só com `v-model:selected-row`).
|
|
63
|
+
* Valor padrão fica fora da URL. Filtros só os declarados em `ColumnDef.filter`; os de
|
|
64
|
+
* `toolbar-filters` e os não serializáveis (objeto, data) ficam fora. Restaura antes do
|
|
65
|
+
* primeiro fetch (uma só chamada). Com `persistState`, a URL ganha quando traz busca ou
|
|
66
|
+
* filtro; senão vale o localStorage. Exige `vue-router`; sem ele ignora (avisa em dev só se a prop foi passada). */
|
|
67
|
+
urlState?: boolean | string;
|
|
58
68
|
/** Agrupa as linhas sob cabeçalhos recolhíveis, na tabela e nos cards: nome do campo ou
|
|
59
69
|
* função que dá a chave do grupo. Os grupos seguem a ordem da primeira aparição em
|
|
60
70
|
* `crud.items`; para ordenar, use `transformItems` ou a ordenação da API. A lista é lazy:
|
|
@@ -62,6 +72,11 @@ type __VLS_Props = {
|
|
|
62
72
|
groupBy?: string | ((item: Record<string, unknown>) => string);
|
|
63
73
|
/** Rótulo do grupo; default a própria chave ("Sem grupo" quando vazia). */
|
|
64
74
|
groupLabel?: (groupKey: string, items: Record<string, unknown>[]) => string;
|
|
75
|
+
/** Carregamento suave: esqueleto só depois de `loadingDelay` ms, no lugar do spinner seco.
|
|
76
|
+
* `false` volta ao loading imediato do DataTable / spinner dos cards. */
|
|
77
|
+
skeleton?: boolean;
|
|
78
|
+
/** Atraso (ms) antes de o esqueleto aparecer. */
|
|
79
|
+
loadingDelay?: number;
|
|
65
80
|
};
|
|
66
81
|
/**
|
|
67
82
|
* Rola a tabela até a linha cujo pk é `value` — o par do `v-model:selectedRow`
|
|
@@ -80,81 +95,81 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
|
80
95
|
declare var __VLS_1: {}, __VLS_10: {}, __VLS_12: {
|
|
81
96
|
selected: any[];
|
|
82
97
|
crud: CrudManagerReturn<any>;
|
|
83
|
-
}, __VLS_66: {}, __VLS_96: {}, __VLS_105: {},
|
|
98
|
+
}, __VLS_66: {}, __VLS_96: {}, __VLS_105: {}, __VLS_177: {}, __VLS_180: {
|
|
84
99
|
groupKey: string;
|
|
85
100
|
label: string;
|
|
86
101
|
items: Record<string, unknown>[];
|
|
87
102
|
count: number;
|
|
88
103
|
collapsed: boolean;
|
|
89
|
-
},
|
|
104
|
+
}, __VLS_182: {
|
|
90
105
|
groupKey: string;
|
|
91
106
|
label: string;
|
|
92
107
|
items: Record<string, unknown>[];
|
|
93
108
|
count: number;
|
|
94
109
|
collapsed: boolean;
|
|
95
|
-
},
|
|
110
|
+
}, __VLS_207: `column-${string}`, __VLS_208: {
|
|
96
111
|
data: any;
|
|
97
112
|
value: any;
|
|
98
|
-
},
|
|
113
|
+
}, __VLS_244: {
|
|
99
114
|
data: any;
|
|
100
115
|
crud: CrudManagerReturn<any>;
|
|
101
|
-
},
|
|
116
|
+
}, __VLS_247: {
|
|
102
117
|
data: any;
|
|
103
|
-
},
|
|
118
|
+
}, __VLS_267: {}, __VLS_297: {}, __VLS_306: {}, __VLS_355: {}, __VLS_357: {
|
|
104
119
|
groupKey: string;
|
|
105
120
|
label: string;
|
|
106
121
|
items: Record<string, unknown>[];
|
|
107
122
|
count: number;
|
|
108
123
|
collapsed: boolean;
|
|
109
|
-
},
|
|
124
|
+
}, __VLS_359: {
|
|
110
125
|
groupKey: string;
|
|
111
126
|
label: string;
|
|
112
127
|
items: Record<string, unknown>[];
|
|
113
128
|
count: number;
|
|
114
129
|
collapsed: boolean;
|
|
115
|
-
},
|
|
130
|
+
}, __VLS_366: {
|
|
116
131
|
data: Record<string, unknown>;
|
|
117
132
|
crud: CrudManagerReturn<any>;
|
|
118
133
|
columns: ColumnDef[];
|
|
119
134
|
index: number;
|
|
120
|
-
},
|
|
135
|
+
}, __VLS_369: `column-${string}`, __VLS_370: {
|
|
121
136
|
data: Record<string, unknown>;
|
|
122
137
|
value: unknown;
|
|
123
|
-
},
|
|
138
|
+
}, __VLS_384: {
|
|
124
139
|
data: Record<string, unknown>;
|
|
125
140
|
crud: CrudManagerReturn<any>;
|
|
126
|
-
},
|
|
141
|
+
}, __VLS_407: {
|
|
127
142
|
selected: Record<string, unknown> | null;
|
|
128
143
|
crud: CrudManagerReturn<any>;
|
|
129
|
-
},
|
|
144
|
+
}, __VLS_430: {
|
|
130
145
|
crud: CrudManagerReturn<any>;
|
|
131
146
|
dialogWidth: string;
|
|
132
|
-
},
|
|
147
|
+
}, __VLS_444: `field-${string}`, __VLS_445: {
|
|
133
148
|
field: FieldDef;
|
|
134
149
|
formData: Record<string, unknown>;
|
|
135
150
|
isEditing: boolean;
|
|
136
151
|
fieldId: string;
|
|
137
152
|
setFormField: (f: string, v: unknown) => void;
|
|
138
|
-
},
|
|
153
|
+
}, __VLS_449: `image-${string}`, __VLS_450: {
|
|
139
154
|
field: FieldDef;
|
|
140
155
|
formData: Record<string, unknown>;
|
|
141
|
-
},
|
|
156
|
+
}, __VLS_453: {
|
|
142
157
|
formData: Record<string, unknown>;
|
|
143
158
|
isEditing: boolean;
|
|
144
|
-
},
|
|
159
|
+
}, __VLS_456: {
|
|
145
160
|
formData: Record<string, unknown>;
|
|
146
161
|
isEditing: boolean;
|
|
147
|
-
},
|
|
162
|
+
}, __VLS_464: {
|
|
148
163
|
item: Record<string, unknown> | null;
|
|
149
164
|
};
|
|
150
165
|
type __VLS_Slots = {} & {
|
|
151
|
-
[K in NonNullable<typeof
|
|
166
|
+
[K in NonNullable<typeof __VLS_207>]?: (props: typeof __VLS_208) => any;
|
|
152
167
|
} & {
|
|
153
|
-
[K in NonNullable<typeof
|
|
168
|
+
[K in NonNullable<typeof __VLS_369>]?: (props: typeof __VLS_370) => any;
|
|
154
169
|
} & {
|
|
155
|
-
[K in NonNullable<typeof
|
|
170
|
+
[K in NonNullable<typeof __VLS_444>]?: (props: typeof __VLS_445) => any;
|
|
156
171
|
} & {
|
|
157
|
-
[K in NonNullable<typeof
|
|
172
|
+
[K in NonNullable<typeof __VLS_449>]?: (props: typeof __VLS_450) => any;
|
|
158
173
|
} & {
|
|
159
174
|
'header-actions'?: (props: typeof __VLS_1) => any;
|
|
160
175
|
} & {
|
|
@@ -168,41 +183,41 @@ type __VLS_Slots = {} & {
|
|
|
168
183
|
} & {
|
|
169
184
|
'toolbar-actions'?: (props: typeof __VLS_105) => any;
|
|
170
185
|
} & {
|
|
171
|
-
empty?: (props: typeof
|
|
186
|
+
empty?: (props: typeof __VLS_177) => any;
|
|
172
187
|
} & {
|
|
173
|
-
'group-header'?: (props: typeof
|
|
188
|
+
'group-header'?: (props: typeof __VLS_180) => any;
|
|
174
189
|
} & {
|
|
175
|
-
'group-meta'?: (props: typeof
|
|
190
|
+
'group-meta'?: (props: typeof __VLS_182) => any;
|
|
176
191
|
} & {
|
|
177
|
-
'row-actions'?: (props: typeof
|
|
192
|
+
'row-actions'?: (props: typeof __VLS_244) => any;
|
|
178
193
|
} & {
|
|
179
|
-
expansion?: (props: typeof
|
|
194
|
+
expansion?: (props: typeof __VLS_247) => any;
|
|
180
195
|
} & {
|
|
181
|
-
'toolbar-start'?: (props: typeof
|
|
196
|
+
'toolbar-start'?: (props: typeof __VLS_267) => any;
|
|
182
197
|
} & {
|
|
183
|
-
'toolbar-filters'?: (props: typeof
|
|
198
|
+
'toolbar-filters'?: (props: typeof __VLS_297) => any;
|
|
184
199
|
} & {
|
|
185
|
-
'toolbar-actions'?: (props: typeof
|
|
200
|
+
'toolbar-actions'?: (props: typeof __VLS_306) => any;
|
|
186
201
|
} & {
|
|
187
|
-
empty?: (props: typeof
|
|
202
|
+
empty?: (props: typeof __VLS_355) => any;
|
|
188
203
|
} & {
|
|
189
|
-
'group-header'?: (props: typeof
|
|
204
|
+
'group-header'?: (props: typeof __VLS_357) => any;
|
|
190
205
|
} & {
|
|
191
|
-
'group-meta'?: (props: typeof
|
|
206
|
+
'group-meta'?: (props: typeof __VLS_359) => any;
|
|
192
207
|
} & {
|
|
193
|
-
card?: (props: typeof
|
|
208
|
+
card?: (props: typeof __VLS_366) => any;
|
|
194
209
|
} & {
|
|
195
|
-
'row-actions'?: (props: typeof
|
|
210
|
+
'row-actions'?: (props: typeof __VLS_384) => any;
|
|
196
211
|
} & {
|
|
197
|
-
'rail-actions'?: (props: typeof
|
|
212
|
+
'rail-actions'?: (props: typeof __VLS_407) => any;
|
|
198
213
|
} & {
|
|
199
|
-
'form-dialog'?: (props: typeof
|
|
214
|
+
'form-dialog'?: (props: typeof __VLS_430) => any;
|
|
200
215
|
} & {
|
|
201
|
-
'after-fields'?: (props: typeof
|
|
216
|
+
'after-fields'?: (props: typeof __VLS_453) => any;
|
|
202
217
|
} & {
|
|
203
|
-
aside?: (props: typeof
|
|
218
|
+
aside?: (props: typeof __VLS_456) => any;
|
|
204
219
|
} & {
|
|
205
|
-
'delete-message'?: (props: typeof
|
|
220
|
+
'delete-message'?: (props: typeof __VLS_464) => any;
|
|
206
221
|
};
|
|
207
222
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
208
223
|
scrollToRow: typeof scrollToRow;
|
|
@@ -243,8 +258,11 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
|
243
258
|
csvFilename: string;
|
|
244
259
|
csvScope: "all" | "page";
|
|
245
260
|
csvPageSize: number;
|
|
261
|
+
urlState: boolean | string;
|
|
246
262
|
groupBy: string | ((item: Record<string, unknown>) => string);
|
|
247
263
|
groupLabel: (groupKey: string, items: Record<string, unknown>[]) => string;
|
|
264
|
+
skeleton: boolean;
|
|
265
|
+
loadingDelay: number;
|
|
248
266
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
249
267
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
250
268
|
declare const _default: typeof __VLS_export;
|
|
@@ -40,6 +40,8 @@ export { default as WMarkdownEditor } from './form/WMarkdownEditor.vue';
|
|
|
40
40
|
export { default as WMarkdownToc } from './ui/WMarkdownToc.vue';
|
|
41
41
|
export { default as WDialog } from './ui/WDialog.vue';
|
|
42
42
|
export { default as WFlipCard } from './ui/WFlipCard.vue';
|
|
43
|
+
export { default as WCommandPalette } from './ui/WCommandPalette.vue';
|
|
44
|
+
export { default as WSkeleton } from './ui/WSkeleton.vue';
|
|
43
45
|
export { default as WTabBar } from './ui/WTabBar.vue';
|
|
44
46
|
export { default as WTabNav } from './ui/WTabNav.vue';
|
|
45
47
|
export { default as WTabViewport } from './ui/WTabViewport.vue';
|
|
@@ -11,8 +11,8 @@ type __VLS_Props = {
|
|
|
11
11
|
};
|
|
12
12
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
13
|
size: "sm" | "md";
|
|
14
|
-
src: string | null;
|
|
15
14
|
name: string | null;
|
|
15
|
+
src: string | null;
|
|
16
16
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
declare const _default: typeof __VLS_export;
|
|
18
18
|
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PaletteItem } from '../../types/commandPalette';
|
|
2
|
+
/**
|
|
3
|
+
* Paleta de comandos (Ctrl/⌘+K). Genérica: não conhece router nem permissão — o app entrega
|
|
4
|
+
* `items` já filtrados e navega no `@select`. Sem termo: recentes e depois o resto por grupo;
|
|
5
|
+
* com termo: lista única filtrada (sem acento, cada palavra no rótulo ou no grupo).
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
items: PaletteItem[];
|
|
9
|
+
/** Ids usados recentemente, do mais novo ao mais antigo. */
|
|
10
|
+
recent?: string[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Liga os atalhos globais: Ctrl/⌘+K alterna e `/` abre. Ambos só valem fora de campos de
|
|
13
|
+
* texto (input, textarea, contenteditable) e sem outro modal aberto; `visible` não muda
|
|
14
|
+
* durante repetição de tecla nem composição (IME). Dentro da paleta, Ctrl/⌘+K fecha. */
|
|
15
|
+
shortcut?: boolean;
|
|
16
|
+
/** Nome acessível da janela. */
|
|
17
|
+
label?: string;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_ModelProps = {
|
|
20
|
+
'visible'?: boolean;
|
|
21
|
+
};
|
|
22
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
23
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
select: (item: PaletteItem) => any;
|
|
25
|
+
"update:visible": (value: boolean) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
27
|
+
onSelect?: ((item: PaletteItem) => any) | undefined;
|
|
28
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
label: string;
|
|
31
|
+
placeholder: string;
|
|
32
|
+
recent: string[];
|
|
33
|
+
shortcut: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const _default: typeof __VLS_export;
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Esqueleto de chegada de dados, fino sobre o `Skeleton` do PrimeVue. Pareie com
|
|
3
|
+
* `useDelayedLoading` para só aparecer em carregamento lento. Tamanhos por token `--w-skeleton-*`.
|
|
4
|
+
*/
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
/** `rows`: n linhas de tabela; `card`: bloco de card; `text`: n linhas de parágrafo. */
|
|
7
|
+
variant?: 'rows' | 'card' | 'text';
|
|
8
|
+
/** Quantidade de linhas (`rows` e `text`). */
|
|
9
|
+
count?: number;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
12
|
+
variant: "rows" | "card" | "text";
|
|
13
|
+
count: number;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -11,6 +11,10 @@ type __VLS_Props = {
|
|
|
11
11
|
items: TabItem[];
|
|
12
12
|
/** Rótulo do grupo para leitores de tela. */
|
|
13
13
|
ariaLabel?: string;
|
|
14
|
+
/** Liga o `v-model` à query `?<urlKey>=` (`router.replace`): a aba sobrevive ao F5 e às abas
|
|
15
|
+
* de rota. Valor fora dos `items` (ou de aba desabilitada) cai na aba inicial; essa aba (o
|
|
16
|
+
* `modelValue` da montagem) fica fora da URL. Exige `vue-router`; sem ele, avisa em dev. */
|
|
17
|
+
urlKey?: string;
|
|
14
18
|
};
|
|
15
19
|
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
20
|
"update:modelValue": (value: string) => any;
|