@wgalleti/primevue-components 1.7.2 → 1.8.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.
@@ -33,6 +33,7 @@ export { default as WAvatar } from './ui/WAvatar.vue';
33
33
  export { default as WCheckList } from './ui/WCheckList.vue';
34
34
  export { default as WInlineCell } from './ui/WInlineCell.vue';
35
35
  export { default as WAttentionList } from './ui/WAttentionList.vue';
36
+ export { default as WGroupedSelectList } from './ui/WGroupedSelectList.vue';
36
37
  export { default as WMapSelect } from './ui/WMapSelect.vue';
37
38
  export { default as WMarkdownView } from './ui/WMarkdownView.vue';
38
39
  export { default as WMarkdownEditor } from './form/WMarkdownEditor.vue';
@@ -0,0 +1,100 @@
1
+ import { ColumnDef } from '../../types/column';
2
+ import { GroupedSelectKey } from '../../types/groupedSelectList';
3
+ /**
4
+ * Tabela agrupada com seleção múltipla: grupos recolhíveis, checkbox de grupo em três estados,
5
+ * linhas que podem não ser selecionáveis (com o motivo num badge) e a ação "selecionar todos os
6
+ * resultados". O componente nunca filtra: `items` já é o resultado. As chaves de `selection` que
7
+ * não estão em `items` ficam intactas e não são contadas — podá-las é papel de quem chama.
8
+ * `selection` e `collapsed` são `defineModel`: seguem sempre o pai e funcionam sem v-model.
9
+ */
10
+ type __VLS_Props = {
11
+ /** Linhas já filtradas; a ordem dos grupos é a da primeira aparição. */
12
+ items: Record<string, unknown>[];
13
+ columns: ColumnDef[];
14
+ /** Campo que identifica a linha (o valor entra em `selection`). */
15
+ dataKey?: string;
16
+ /** Campo (ou função) que dá a chave do grupo da linha. */
17
+ groupBy: string | ((item: Record<string, unknown>) => string);
18
+ /** Rótulo do grupo; default a própria chave. */
19
+ groupLabel?: (groupKey: string, items: Record<string, unknown>[]) => string;
20
+ /** Trava global: false desabilita todo checkbox, sem badge, e esconde "selecionar todos". */
21
+ selectable?: boolean;
22
+ /** Diz se a linha pode ser selecionada; default todas. Linha travada já selecionada pode ser desmarcada. */
23
+ isSelectable?: (item: Record<string, unknown>) => boolean;
24
+ /** Texto do badge nas linhas não selecionáveis. */
25
+ disabledReason?: (item: Record<string, unknown>) => string | null | undefined;
26
+ /** Com linhas já na tela elas continuam visíveis, com uma barra de carregamento; o placeholder só aparece sem linhas. */
27
+ loading?: boolean;
28
+ emptyMessage?: string;
29
+ selectAllLabel?: string;
30
+ clearSelectionLabel?: string;
31
+ /** false remove o botão de recolher dos grupos. */
32
+ collapsible?: boolean;
33
+ };
34
+ type __VLS_ModelProps = {
35
+ /** Chaves das linhas selecionadas (v-model:selection). Sem v-model do pai o estado é local. */
36
+ 'selection'?: GroupedSelectKey[];
37
+ /** Chaves dos grupos recolhidos (v-model:collapsed). */
38
+ 'collapsed'?: string[];
39
+ };
40
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
41
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_12: {
42
+ groupKey: string;
43
+ label: string;
44
+ items: Record<string, unknown>[];
45
+ selectedCount: number;
46
+ selectableCount: number;
47
+ collapsed: boolean;
48
+ }, __VLS_14: {
49
+ groupKey: string;
50
+ label: string;
51
+ items: Record<string, unknown>[];
52
+ selectedCount: number;
53
+ selectableCount: number;
54
+ collapsed: boolean;
55
+ }, __VLS_24: `column-${string}`, __VLS_25: {
56
+ data: Record<string, unknown>;
57
+ column: ColumnDef;
58
+ value: unknown;
59
+ }, __VLS_37: {
60
+ data: Record<string, unknown>;
61
+ };
62
+ type __VLS_Slots = {} & {
63
+ [K in NonNullable<typeof __VLS_24>]?: (props: typeof __VLS_25) => any;
64
+ } & {
65
+ summary?: (props: typeof __VLS_1) => any;
66
+ } & {
67
+ empty?: (props: typeof __VLS_3) => any;
68
+ } & {
69
+ 'group-header'?: (props: typeof __VLS_12) => any;
70
+ } & {
71
+ 'group-meta'?: (props: typeof __VLS_14) => any;
72
+ } & {
73
+ 'row-actions'?: (props: typeof __VLS_37) => any;
74
+ };
75
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
76
+ "update:selection": (value: GroupedSelectKey[]) => any;
77
+ "update:collapsed": (value: string[]) => any;
78
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
79
+ "onUpdate:selection"?: ((value: GroupedSelectKey[]) => any) | undefined;
80
+ "onUpdate:collapsed"?: ((value: string[]) => any) | undefined;
81
+ }>, {
82
+ emptyMessage: string;
83
+ loading: boolean;
84
+ dataKey: string;
85
+ groupLabel: (groupKey: string, items: Record<string, unknown>[]) => string;
86
+ selectable: boolean;
87
+ isSelectable: (item: Record<string, unknown>) => boolean;
88
+ disabledReason: (item: Record<string, unknown>) => string | null | undefined;
89
+ selectAllLabel: string;
90
+ clearSelectionLabel: string;
91
+ collapsible: boolean;
92
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
93
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
94
+ declare const _default: typeof __VLS_export;
95
+ export default _default;
96
+ type __VLS_WithSlots<T, S> = T & {
97
+ new (): {
98
+ $slots: S;
99
+ };
100
+ };
@@ -219,16 +219,16 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
219
219
  fecharDetalhe: typeof fecharDetalhe;
220
220
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
221
221
  "update:modelValue": (ids: MapSelectId[]) => any;
222
+ "update:collapsed": (collapsed: boolean) => any;
222
223
  "feature-click": (feature: MapSelectFeature) => any;
223
224
  "feature-enter": (feature: MapSelectFeature) => any;
224
225
  "feature-leave": () => any;
225
- "update:collapsed": (collapsed: boolean) => any;
226
226
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
227
227
  "onUpdate:modelValue"?: ((ids: MapSelectId[]) => any) | undefined;
228
+ "onUpdate:collapsed"?: ((collapsed: boolean) => any) | undefined;
228
229
  "onFeature-click"?: ((feature: MapSelectFeature) => any) | undefined;
229
230
  "onFeature-enter"?: ((feature: MapSelectFeature) => any) | undefined;
230
231
  "onFeature-leave"?: (() => any) | undefined;
231
- "onUpdate:collapsed"?: ((collapsed: boolean) => any) | undefined;
232
232
  }>, {
233
233
  searchPlaceholder: string;
234
234
  emptyMessage: string;
@@ -238,6 +238,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
238
238
  readonly: boolean;
239
239
  selectionMode: MapSelectSelectionMode;
240
240
  features: MapSelectFeature[];
241
+ collapsed: boolean;
241
242
  scopeGeometry: MapSelectGeometry | null;
242
243
  tileUrl: string;
243
244
  tileAttribution: string;
@@ -250,7 +251,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
250
251
  clearLabel: string;
251
252
  collapseLabel: string;
252
253
  expandLabel: string;
253
- collapsed: boolean;
254
254
  badgeLabel: string;
255
255
  mapErrorMessage: string;
256
256
  tooltips: MapSelectTooltips;