@wgalleti/primevue-components 0.29.0 → 0.31.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 (40) hide show
  1. package/README.md +5 -5
  2. package/dist/components/crud/WCrudFormDialog.vue.d.ts +1 -0
  3. package/dist/components/crud/WCrudView.vue.d.ts +5 -0
  4. package/dist/components/form/WAutoCompleteFK.vue.d.ts +10 -0
  5. package/dist/components/form/WDatePicker.vue.d.ts +3 -0
  6. package/dist/components/form/WFormRenderer.vue.d.ts +1 -0
  7. package/dist/components/form/WMoneyInput.vue.d.ts +5 -0
  8. package/dist/components/form/WTreeSelect.vue.d.ts +1 -1
  9. package/dist/components/index.d.ts +2 -0
  10. package/dist/components/ui/WSectionAccordion.vue.d.ts +36 -0
  11. package/dist/components/ui/WSectionPanel.vue.d.ts +40 -0
  12. package/dist/components-BK9LPrAs.cjs +25 -0
  13. package/dist/components-BK9LPrAs.cjs.map +1 -0
  14. package/dist/{components-DokVE_Ug.js → components-BNyzL6pd.js} +2178 -1655
  15. package/dist/components-BNyzL6pd.js.map +1 -0
  16. package/dist/components.cjs +1 -1
  17. package/dist/components.js +2 -2
  18. package/dist/{composables-LdwFk9Ri.js → composables-CTH72sG4.js} +2 -2
  19. package/dist/{composables-LdwFk9Ri.js.map → composables-CTH72sG4.js.map} +1 -1
  20. package/dist/{composables-DPnCytUq.cjs → composables-DxLadKgY.cjs} +2 -2
  21. package/dist/{composables-DPnCytUq.cjs.map → composables-DxLadKgY.cjs.map} +1 -1
  22. package/dist/composables.cjs +1 -1
  23. package/dist/composables.js +2 -2
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.js +39 -39
  27. package/dist/index.js.map +1 -1
  28. package/dist/primevue-components.css +1 -1
  29. package/dist/types/column.d.ts +12 -0
  30. package/dist/types/field.d.ts +6 -0
  31. package/dist/{useFormKeyboardNav-BDVRfk3k.cjs → useFormKeyboardNav-DAtl5tBF.cjs} +2 -2
  32. package/dist/{useFormKeyboardNav-BDVRfk3k.cjs.map → useFormKeyboardNav-DAtl5tBF.cjs.map} +1 -1
  33. package/dist/{useFormKeyboardNav-DQW9gHzu.js → useFormKeyboardNav-Yj2HeWy5.js} +2 -2
  34. package/dist/{useFormKeyboardNav-DQW9gHzu.js.map → useFormKeyboardNav-Yj2HeWy5.js.map} +1 -1
  35. package/dist/utils/sectionAccordion.d.ts +15 -0
  36. package/package.json +1 -1
  37. package/skill/references/setup.md +3 -3
  38. package/dist/components-2IJ-Jyne.cjs +0 -25
  39. package/dist/components-2IJ-Jyne.cjs.map +0 -1
  40. package/dist/components-DokVE_Ug.js.map +0 -1
package/README.md CHANGED
@@ -5,10 +5,10 @@ Biblioteca de componentes Vue 3 + PrimeVue 4 para padronizar componentes reutili
5
5
  ## Instalação
6
6
 
7
7
  ```bash
8
- # Via git (recomendado para projetos internos)
9
- yarn add git+https://github.com/wgalleti/wPrimeVueComponents.git
8
+ # Pacote público no npm — fixe versão exata (sem ^), o mesmo número em todos os projetos
9
+ yarn add @wgalleti/primevue-components@<versão> --exact
10
10
 
11
- # Ou npm link para desenvolvimento local
11
+ # Desenvolvimento local da própria suíte
12
12
  cd wPrimeVueComponents && yarn link
13
13
  cd seu-projeto && yarn link @wgalleti/primevue-components
14
14
  ```
@@ -18,10 +18,10 @@ cd seu-projeto && yarn link @wgalleti/primevue-components
18
18
  Certifique-se de ter instalado no seu projeto:
19
19
 
20
20
  ```bash
21
- yarn add vue@^3.4 primevue@^4.0 dayjs@^1.11
21
+ yarn add vue@^3.4 primevue@^4.2 dayjs@^1.11 vue-router
22
22
  ```
23
23
 
24
- Se o projeto usar a camada Axios padrao, instale tambem `axios@^1.0`.
24
+ Se o projeto usar a camada Axios padrão (o data provider default), instale também `axios@^1.0`.
25
25
 
26
26
  ## Setup
27
27
 
@@ -21,6 +21,7 @@ declare var __VLS_23: `field-${string}`, __VLS_24: {
21
21
  field: FieldDef;
22
22
  formData: Record<string, unknown>;
23
23
  isEditing: boolean;
24
+ fieldId: string;
24
25
  setFormField: (f: string, v: unknown) => void;
25
26
  }, __VLS_28: `image-${string}`, __VLS_29: {
26
27
  field: FieldDef;
@@ -8,6 +8,9 @@ type __VLS_Props = {
8
8
  subtitle?: string;
9
9
  showSearch?: boolean;
10
10
  showHeader?: boolean;
11
+ /** Esconde a contagem total do filtro que acompanha o título ("32 registros").
12
+ * Com `showHeader: false` a contagem vai para a toolbar. */
13
+ hideCount?: boolean;
11
14
  dialogWidth?: string;
12
15
  /** Nº de colunas do grid do form dialog (default: `formColumns` da config
13
16
  * do useCrudManager, senão 2). */
@@ -80,6 +83,7 @@ declare var __VLS_1: {}, __VLS_10: {}, __VLS_47: {
80
83
  field: FieldDef;
81
84
  formData: Record<string, unknown>;
82
85
  isEditing: boolean;
86
+ fieldId: string;
83
87
  setFormField: (f: string, v: unknown) => void;
84
88
  }, __VLS_359: {
85
89
  item: Record<string, unknown> | null;
@@ -144,6 +148,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
144
148
  showHeader: boolean;
145
149
  contextMenu: boolean;
146
150
  showSearch: boolean;
151
+ hideCount: boolean;
147
152
  autoInit: boolean;
148
153
  showKpi: boolean;
149
154
  kpiIcon: string;
@@ -43,6 +43,10 @@ type __VLS_Props = {
43
43
  canCreate?: boolean;
44
44
  canEdit?: boolean;
45
45
  canDelete?: boolean;
46
+ /** Quando a lista (com os filtros/cascata atuais) tem **um** registro só, ele já
47
+ * entra selecionado — ao montar sem valor e ao preencher a cascata. Só no modo
48
+ * simples; limpar o campo não redispara. `false` desliga. */
49
+ autoSelectSingle?: boolean;
46
50
  crudFields?: FieldDef[];
47
51
  crudColumns?: ColumnDef[];
48
52
  /** Sub-linhas do grid do modal: recebe as linhas da página e devolve o mapa
@@ -54,6 +58,11 @@ type __VLS_Props = {
54
58
  * para que o `focus()` do PrimeVue Dialog (em onAfterEnter) o encontre e
55
59
  * não roube o foco para o botão de fechar. */
56
60
  autofocus?: boolean;
61
+ /** `id` do input de digitação — alvo do `<label for>` do formulário. */
62
+ inputId?: string;
63
+ /** Atributos extras no input de digitação (`aria-labelledby`, `aria-describedby`,
64
+ * `aria-required`, `aria-invalid`…). Vão direto no `<input>`, não no wrapper. */
65
+ inputAttrs?: Record<string, unknown>;
57
66
  };
58
67
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
59
68
  "update:modelValue": (value: Record<string, unknown> | Record<string, unknown>[] | null) => any;
@@ -72,6 +81,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
72
81
  canCreate: boolean;
73
82
  canEdit: boolean;
74
83
  canDelete: boolean;
84
+ autoSelectSingle: boolean;
75
85
  dialogWidth: string;
76
86
  autofocus: boolean;
77
87
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -21,6 +21,9 @@ type __VLS_Props = {
21
21
  placeholder?: string;
22
22
  invalid?: boolean;
23
23
  inputId?: string;
24
+ /** Atributos extras no `<input>` (`aria-labelledby`, `aria-describedby`,
25
+ * `aria-required`…). */
26
+ inputAttrs?: Record<string, unknown>;
24
27
  };
25
28
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
29
  "update:modelValue": (value: string | Date | null) => any;
@@ -23,6 +23,7 @@ declare var __VLS_2: `field-${string}`, __VLS_3: {
23
23
  field: FieldDef;
24
24
  formData: Record<string, unknown>;
25
25
  isEditing: boolean;
26
+ fieldId: string;
26
27
  setFormField: (f: string, v: unknown) => void;
27
28
  }, __VLS_27: `image-${string}`, __VLS_28: {
28
29
  field: FieldDef;
@@ -14,6 +14,11 @@ type __VLS_Props = {
14
14
  disabled?: boolean;
15
15
  placeholder?: string;
16
16
  invalid?: boolean;
17
+ /** `id` do `<input>` — alvo do `<label for>` do formulário. */
18
+ inputId?: string;
19
+ /** Atributos extras no `<input>` (`aria-labelledby`, `aria-describedby`,
20
+ * `aria-required`…). Sempre no input, mesmo quando há prefixo/sufixo. */
21
+ inputAttrs?: Record<string, unknown>;
17
22
  };
18
23
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
24
  "update:modelValue": (value: number | null) => any;
@@ -107,8 +107,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
107
107
  filterPlaceholder: string;
108
108
  filterFields: string[];
109
109
  emptyMessage: string;
110
- filterEmptyMessage: string;
111
110
  showCount: boolean;
111
+ filterEmptyMessage: string;
112
112
  showToggleAll: boolean;
113
113
  defaultExpanded: boolean;
114
114
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -20,7 +20,9 @@ export { default as WDetailHeader } from './ui/WDetailHeader.vue';
20
20
  export { default as WInfoCard } from './ui/WInfoCard.vue';
21
21
  export { default as WKpiCard } from './ui/WKpiCard.vue';
22
22
  export { default as WKpiGrid } from './ui/WKpiGrid.vue';
23
+ export { default as WSectionAccordion } from './ui/WSectionAccordion.vue';
23
24
  export { default as WSectionHeader } from './ui/WSectionHeader.vue';
25
+ export { default as WSectionPanel } from './ui/WSectionPanel.vue';
24
26
  export { default as WFormSection } from './ui/WFormSection.vue';
25
27
  export { default as WActionBar } from './ui/WActionBar.vue';
26
28
  export { default as WProgressFlow } from './ui/WProgressFlow.vue';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * As seções de um editor master-detail como painéis de um acordeão único: uma
3
+ * moldura só, sem blocos "flutuando". Diferente do WStepFlow, aqui não há ordem
4
+ * nem etapa ativa — cada seção abre e fecha por conta própria e várias ficam
5
+ * abertas ao mesmo tempo (o padrão é TODAS abertas; o usuário recolhe o que não
6
+ * interessa no momento).
7
+ *
8
+ * O `v-model` é a lista de `value` das seções abertas. Sem `v-model` o
9
+ * componente é dono do próprio estado, começando com tudo aberto.
10
+ */
11
+ type __VLS_Props = {
12
+ /** `value` das seções abertas (`v-model`). Omitido = estado interno, tudo aberto. */
13
+ modelValue?: string[];
14
+ /** Trava o clique no cabeçalho de todas as seções. */
15
+ disabled?: boolean;
16
+ };
17
+ declare var __VLS_1: {};
18
+ type __VLS_Slots = {} & {
19
+ default?: (props: typeof __VLS_1) => any;
20
+ };
21
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
22
+ "update:modelValue": (open: string[]) => any;
23
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
+ "onUpdate:modelValue"?: ((open: string[]) => any) | undefined;
25
+ }>, {
26
+ modelValue: string[];
27
+ disabled: boolean;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -0,0 +1,40 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<{
4
+ /** Identificador da seção — é o que o `v-model` do acordeão carrega. */
5
+ value: string;
6
+ title: string;
7
+ /** Frase abaixo do título: o que a seção é e o que acontece com ela. */
8
+ description?: string;
9
+ /** Ícone PrimeIcons do tile à esquerda (ex.: `pi pi-list`). */
10
+ icon?: string;
11
+ /** Badge de contagem à direita (registros da seção). */
12
+ count?: number | string;
13
+ disabled?: boolean;
14
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
15
+ /** Identificador da seção — é o que o `v-model` do acordeão carrega. */
16
+ value: string;
17
+ title: string;
18
+ /** Frase abaixo do título: o que a seção é e o que acontece com ela. */
19
+ description?: string;
20
+ /** Ícone PrimeIcons do tile à esquerda (ex.: `pi pi-list`). */
21
+ icon?: string;
22
+ /** Badge de contagem à direita (registros da seção). */
23
+ count?: number | string;
24
+ disabled?: boolean;
25
+ }> & Readonly<{}>, {
26
+ disabled: boolean;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
28
+ icon?: (props: {}) => any;
29
+ } & {
30
+ actions?: (props: {
31
+ open: boolean;
32
+ }) => any;
33
+ } & {
34
+ default?: (props: {}) => any;
35
+ }>;
36
+ type __VLS_WithSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };