@wgalleti/primevue-components 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/components/crud/WCrudView.vue.d.ts +46 -39
  2. package/dist/components/index.d.ts +2 -0
  3. package/dist/components/ui/WCommandPalette.vue.d.ts +36 -0
  4. package/dist/components/ui/WSkeleton.vue.d.ts +16 -0
  5. package/dist/components-DpDL1WdX.cjs +25 -0
  6. package/dist/components-DpDL1WdX.cjs.map +1 -0
  7. package/dist/{components-DDidEKfp.js → components-Y-GKJzoh.js} +2552 -2311
  8. package/dist/components-Y-GKJzoh.js.map +1 -0
  9. package/dist/components.cjs +1 -1
  10. package/dist/components.js +1 -1
  11. package/dist/composables/index.d.ts +2 -0
  12. package/dist/composables/useDelayedLoading.d.ts +12 -0
  13. package/dist/{composables-BEcmxiCQ.js → composables-B2_3FVLB.js} +2 -2
  14. package/dist/{composables-BEcmxiCQ.js.map → composables-B2_3FVLB.js.map} +1 -1
  15. package/dist/{composables-D013e6u-.cjs → composables-qoAinVWS.cjs} +2 -2
  16. package/dist/{composables-D013e6u-.cjs.map → composables-qoAinVWS.cjs.map} +1 -1
  17. package/dist/composables.cjs +1 -1
  18. package/dist/composables.js +3 -3
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.ts +5 -4
  22. package/dist/index.js +27 -27
  23. package/dist/index.js.map +1 -1
  24. package/dist/primevue-components.css +1 -1
  25. package/dist/types/commandPalette.d.ts +10 -0
  26. package/dist/types/index.d.ts +1 -0
  27. package/dist/useFormKeyboardNav-BDnTzUm9.cjs +3 -0
  28. package/dist/useFormKeyboardNav-BDnTzUm9.cjs.map +1 -0
  29. package/dist/{useFormKeyboardNav-Dzczvgce.js → useFormKeyboardNav-CeR3k4bn.js} +121 -109
  30. package/dist/useFormKeyboardNav-CeR3k4bn.js.map +1 -0
  31. package/dist/utils/paletteFilter.d.ts +5 -0
  32. package/package.json +1 -1
  33. package/dist/components-BG5SUm-f.cjs +0 -25
  34. package/dist/components-BG5SUm-f.cjs.map +0 -1
  35. package/dist/components-DDidEKfp.js.map +0 -1
  36. package/dist/useFormKeyboardNav-Dzczvgce.js.map +0 -1
  37. package/dist/useFormKeyboardNav-wNRvUJ1H.cjs +0 -3
  38. package/dist/useFormKeyboardNav-wNRvUJ1H.cjs.map +0 -1
@@ -62,6 +62,11 @@ type __VLS_Props = {
62
62
  groupBy?: string | ((item: Record<string, unknown>) => string);
63
63
  /** Rótulo do grupo; default a própria chave ("Sem grupo" quando vazia). */
64
64
  groupLabel?: (groupKey: string, items: Record<string, unknown>[]) => string;
65
+ /** Carregamento suave: esqueleto só depois de `loadingDelay` ms, no lugar do spinner seco.
66
+ * `false` volta ao loading imediato do DataTable / spinner dos cards. */
67
+ skeleton?: boolean;
68
+ /** Atraso (ms) antes de o esqueleto aparecer. */
69
+ loadingDelay?: number;
65
70
  };
66
71
  /**
67
72
  * Rola a tabela até a linha cujo pk é `value` — o par do `v-model:selectedRow`
@@ -80,81 +85,81 @@ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
80
85
  declare var __VLS_1: {}, __VLS_10: {}, __VLS_12: {
81
86
  selected: any[];
82
87
  crud: CrudManagerReturn<any>;
83
- }, __VLS_66: {}, __VLS_96: {}, __VLS_105: {}, __VLS_172: {}, __VLS_175: {
88
+ }, __VLS_66: {}, __VLS_96: {}, __VLS_105: {}, __VLS_177: {}, __VLS_180: {
84
89
  groupKey: string;
85
90
  label: string;
86
91
  items: Record<string, unknown>[];
87
92
  count: number;
88
93
  collapsed: boolean;
89
- }, __VLS_177: {
94
+ }, __VLS_182: {
90
95
  groupKey: string;
91
96
  label: string;
92
97
  items: Record<string, unknown>[];
93
98
  count: number;
94
99
  collapsed: boolean;
95
- }, __VLS_202: `column-${string}`, __VLS_203: {
100
+ }, __VLS_207: `column-${string}`, __VLS_208: {
96
101
  data: any;
97
102
  value: any;
98
- }, __VLS_239: {
103
+ }, __VLS_244: {
99
104
  data: any;
100
105
  crud: CrudManagerReturn<any>;
101
- }, __VLS_242: {
106
+ }, __VLS_247: {
102
107
  data: any;
103
- }, __VLS_262: {}, __VLS_292: {}, __VLS_301: {}, __VLS_345: {}, __VLS_347: {
108
+ }, __VLS_267: {}, __VLS_297: {}, __VLS_306: {}, __VLS_355: {}, __VLS_357: {
104
109
  groupKey: string;
105
110
  label: string;
106
111
  items: Record<string, unknown>[];
107
112
  count: number;
108
113
  collapsed: boolean;
109
- }, __VLS_349: {
114
+ }, __VLS_359: {
110
115
  groupKey: string;
111
116
  label: string;
112
117
  items: Record<string, unknown>[];
113
118
  count: number;
114
119
  collapsed: boolean;
115
- }, __VLS_356: {
120
+ }, __VLS_366: {
116
121
  data: Record<string, unknown>;
117
122
  crud: CrudManagerReturn<any>;
118
123
  columns: ColumnDef[];
119
124
  index: number;
120
- }, __VLS_359: `column-${string}`, __VLS_360: {
125
+ }, __VLS_369: `column-${string}`, __VLS_370: {
121
126
  data: Record<string, unknown>;
122
127
  value: unknown;
123
- }, __VLS_374: {
128
+ }, __VLS_384: {
124
129
  data: Record<string, unknown>;
125
130
  crud: CrudManagerReturn<any>;
126
- }, __VLS_397: {
131
+ }, __VLS_407: {
127
132
  selected: Record<string, unknown> | null;
128
133
  crud: CrudManagerReturn<any>;
129
- }, __VLS_420: {
134
+ }, __VLS_430: {
130
135
  crud: CrudManagerReturn<any>;
131
136
  dialogWidth: string;
132
- }, __VLS_434: `field-${string}`, __VLS_435: {
137
+ }, __VLS_444: `field-${string}`, __VLS_445: {
133
138
  field: FieldDef;
134
139
  formData: Record<string, unknown>;
135
140
  isEditing: boolean;
136
141
  fieldId: string;
137
142
  setFormField: (f: string, v: unknown) => void;
138
- }, __VLS_439: `image-${string}`, __VLS_440: {
143
+ }, __VLS_449: `image-${string}`, __VLS_450: {
139
144
  field: FieldDef;
140
145
  formData: Record<string, unknown>;
141
- }, __VLS_443: {
146
+ }, __VLS_453: {
142
147
  formData: Record<string, unknown>;
143
148
  isEditing: boolean;
144
- }, __VLS_446: {
149
+ }, __VLS_456: {
145
150
  formData: Record<string, unknown>;
146
151
  isEditing: boolean;
147
- }, __VLS_454: {
152
+ }, __VLS_464: {
148
153
  item: Record<string, unknown> | null;
149
154
  };
150
155
  type __VLS_Slots = {} & {
151
- [K in NonNullable<typeof __VLS_202>]?: (props: typeof __VLS_203) => any;
156
+ [K in NonNullable<typeof __VLS_207>]?: (props: typeof __VLS_208) => any;
152
157
  } & {
153
- [K in NonNullable<typeof __VLS_359>]?: (props: typeof __VLS_360) => any;
158
+ [K in NonNullable<typeof __VLS_369>]?: (props: typeof __VLS_370) => any;
154
159
  } & {
155
- [K in NonNullable<typeof __VLS_434>]?: (props: typeof __VLS_435) => any;
160
+ [K in NonNullable<typeof __VLS_444>]?: (props: typeof __VLS_445) => any;
156
161
  } & {
157
- [K in NonNullable<typeof __VLS_439>]?: (props: typeof __VLS_440) => any;
162
+ [K in NonNullable<typeof __VLS_449>]?: (props: typeof __VLS_450) => any;
158
163
  } & {
159
164
  'header-actions'?: (props: typeof __VLS_1) => any;
160
165
  } & {
@@ -168,41 +173,41 @@ type __VLS_Slots = {} & {
168
173
  } & {
169
174
  'toolbar-actions'?: (props: typeof __VLS_105) => any;
170
175
  } & {
171
- empty?: (props: typeof __VLS_172) => any;
176
+ empty?: (props: typeof __VLS_177) => any;
172
177
  } & {
173
- 'group-header'?: (props: typeof __VLS_175) => any;
178
+ 'group-header'?: (props: typeof __VLS_180) => any;
174
179
  } & {
175
- 'group-meta'?: (props: typeof __VLS_177) => any;
180
+ 'group-meta'?: (props: typeof __VLS_182) => any;
176
181
  } & {
177
- 'row-actions'?: (props: typeof __VLS_239) => any;
182
+ 'row-actions'?: (props: typeof __VLS_244) => any;
178
183
  } & {
179
- expansion?: (props: typeof __VLS_242) => any;
184
+ expansion?: (props: typeof __VLS_247) => any;
180
185
  } & {
181
- 'toolbar-start'?: (props: typeof __VLS_262) => any;
186
+ 'toolbar-start'?: (props: typeof __VLS_267) => any;
182
187
  } & {
183
- 'toolbar-filters'?: (props: typeof __VLS_292) => any;
188
+ 'toolbar-filters'?: (props: typeof __VLS_297) => any;
184
189
  } & {
185
- 'toolbar-actions'?: (props: typeof __VLS_301) => any;
190
+ 'toolbar-actions'?: (props: typeof __VLS_306) => any;
186
191
  } & {
187
- empty?: (props: typeof __VLS_345) => any;
192
+ empty?: (props: typeof __VLS_355) => any;
188
193
  } & {
189
- 'group-header'?: (props: typeof __VLS_347) => any;
194
+ 'group-header'?: (props: typeof __VLS_357) => any;
190
195
  } & {
191
- 'group-meta'?: (props: typeof __VLS_349) => any;
196
+ 'group-meta'?: (props: typeof __VLS_359) => any;
192
197
  } & {
193
- card?: (props: typeof __VLS_356) => any;
198
+ card?: (props: typeof __VLS_366) => any;
194
199
  } & {
195
- 'row-actions'?: (props: typeof __VLS_374) => any;
200
+ 'row-actions'?: (props: typeof __VLS_384) => any;
196
201
  } & {
197
- 'rail-actions'?: (props: typeof __VLS_397) => any;
202
+ 'rail-actions'?: (props: typeof __VLS_407) => any;
198
203
  } & {
199
- 'form-dialog'?: (props: typeof __VLS_420) => any;
204
+ 'form-dialog'?: (props: typeof __VLS_430) => any;
200
205
  } & {
201
- 'after-fields'?: (props: typeof __VLS_443) => any;
206
+ 'after-fields'?: (props: typeof __VLS_453) => any;
202
207
  } & {
203
- aside?: (props: typeof __VLS_446) => any;
208
+ aside?: (props: typeof __VLS_456) => any;
204
209
  } & {
205
- 'delete-message'?: (props: typeof __VLS_454) => any;
210
+ 'delete-message'?: (props: typeof __VLS_464) => any;
206
211
  };
207
212
  declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
208
213
  scrollToRow: typeof scrollToRow;
@@ -245,6 +250,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
245
250
  csvPageSize: number;
246
251
  groupBy: string | ((item: Record<string, unknown>) => string);
247
252
  groupLabel: (groupKey: string, items: Record<string, unknown>[]) => string;
253
+ skeleton: boolean;
254
+ loadingDelay: number;
248
255
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
249
256
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
250
257
  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';
@@ -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;