@wgalleti/primevue-components 0.30.0 → 0.32.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/README.md +5 -5
- package/dist/components/charts/WChart.vue.d.ts +1 -1
- package/dist/components/crud/WEditableTable.vue.d.ts +1 -1
- package/dist/components/form/WAutoCompleteFK.vue.d.ts +3 -1
- package/dist/components/form/WTreeSelect.vue.d.ts +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/ui/WMapSelect.vue.d.ts +2 -2
- package/dist/components/ui/WSectionAccordion.vue.d.ts +36 -0
- package/dist/components/ui/WSectionPanel.vue.d.ts +40 -0
- package/dist/components-Cfs09gwi.cjs +25 -0
- package/dist/components-Cfs09gwi.cjs.map +1 -0
- package/dist/{components-B5nXaYtT.js → components-hJpNDGMG.js} +1571 -1434
- package/dist/components-hJpNDGMG.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +2 -2
- package/dist/{composables-DxLadKgY.cjs → composables-B3Czzje1.cjs} +2 -2
- package/dist/{composables-DxLadKgY.cjs.map → composables-B3Czzje1.cjs.map} +1 -1
- package/dist/{composables-CTH72sG4.js → composables-wG25Sz-z.js} +2 -2
- package/dist/{composables-CTH72sG4.js.map → composables-wG25Sz-z.js.map} +1 -1
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +39 -39
- package/dist/index.js.map +1 -1
- package/dist/primevue-components.css +1 -1
- package/dist/types/field.d.ts +31 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{useFormKeyboardNav-DAtl5tBF.cjs → useFormKeyboardNav-CzKY9ZV2.cjs} +2 -2
- package/dist/useFormKeyboardNav-CzKY9ZV2.cjs.map +1 -0
- package/dist/{useFormKeyboardNav-Yj2HeWy5.js → useFormKeyboardNav-DuxPdAeK.js} +5 -2
- package/dist/useFormKeyboardNav-DuxPdAeK.js.map +1 -0
- package/dist/utils/sectionAccordion.d.ts +15 -0
- package/package.json +1 -1
- package/skill/references/crud.md +5 -2
- package/skill/references/setup.md +3 -3
- package/dist/components-B5nXaYtT.js.map +0 -1
- package/dist/components-BQLHmQIB.cjs +0 -25
- package/dist/components-BQLHmQIB.cjs.map +0 -1
- package/dist/useFormKeyboardNav-DAtl5tBF.cjs.map +0 -1
- package/dist/useFormKeyboardNav-Yj2HeWy5.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
|
-
#
|
|
9
|
-
yarn add
|
|
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
|
-
#
|
|
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.
|
|
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
|
|
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,10 +21,10 @@ type __VLS_Slots = {} & {
|
|
|
21
21
|
unavailable?: (props: typeof __VLS_3) => any;
|
|
22
22
|
};
|
|
23
23
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
emptyMessage: string;
|
|
24
25
|
loading: boolean;
|
|
25
26
|
height: string;
|
|
26
27
|
empty: boolean;
|
|
27
|
-
emptyMessage: string;
|
|
28
28
|
print: boolean;
|
|
29
29
|
renderer: "canvas" | "svg";
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -86,11 +86,11 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
86
86
|
"onUpdate:modelValue"?: ((rows: EditableRow[]) => any) | undefined;
|
|
87
87
|
onRemove?: ((row: EditableRow, index: number) => any) | undefined;
|
|
88
88
|
}>, {
|
|
89
|
+
emptyMessage: string;
|
|
89
90
|
modelValue: EditableRow[];
|
|
90
91
|
disabled: boolean;
|
|
91
92
|
columns: EditableColumnDef[];
|
|
92
93
|
removable: boolean;
|
|
93
|
-
emptyMessage: string;
|
|
94
94
|
expandable: boolean;
|
|
95
95
|
footerLabel: string;
|
|
96
96
|
cardMode: "auto" | "never" | "always";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldDef, FieldSubRowsFetch } from '../../types/field';
|
|
1
|
+
import { FieldDef, FieldSubRowsFetch, FkCrudConfig } from '../../types/field';
|
|
2
2
|
import { ColumnDef } from '../../types/column';
|
|
3
3
|
interface ColumnMeta {
|
|
4
4
|
field: string;
|
|
@@ -49,6 +49,8 @@ type __VLS_Props = {
|
|
|
49
49
|
autoSelectSingle?: boolean;
|
|
50
50
|
crudFields?: FieldDef[];
|
|
51
51
|
crudColumns?: ColumnDef[];
|
|
52
|
+
/** A configuração de CRUD da entidade (a mesma da tela dela) — ver `FieldDef.crud`. */
|
|
53
|
+
crud?: FkCrudConfig;
|
|
52
54
|
/** Sub-linhas do grid do modal: recebe as linhas da página e devolve o mapa
|
|
53
55
|
* `id → sub-linhas` + as colunas (dinâmicas) do mini-grid. Linha com entrada
|
|
54
56
|
* no mapa abre expandida — ex.: lote (linha) com suas análises (sub-linhas). */
|
|
@@ -98,6 +98,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
98
98
|
"onUpdate:modelValue"?: ((ids: TreeSelectId[]) => any) | undefined;
|
|
99
99
|
}>, {
|
|
100
100
|
filter: boolean;
|
|
101
|
+
emptyMessage: string;
|
|
101
102
|
modelValue: TreeSelectId[];
|
|
102
103
|
optionLabel: string;
|
|
103
104
|
optionValue: string;
|
|
@@ -106,7 +107,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
106
107
|
options: TreeSelectOption[];
|
|
107
108
|
filterPlaceholder: string;
|
|
108
109
|
filterFields: string[];
|
|
109
|
-
emptyMessage: string;
|
|
110
110
|
showCount: boolean;
|
|
111
111
|
filterEmptyMessage: string;
|
|
112
112
|
showToggleAll: boolean;
|
|
@@ -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';
|
|
@@ -230,18 +230,18 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
|
|
|
230
230
|
"onFeature-leave"?: (() => any) | undefined;
|
|
231
231
|
"onUpdate:collapsed"?: ((collapsed: boolean) => any) | undefined;
|
|
232
232
|
}>, {
|
|
233
|
+
searchPlaceholder: string;
|
|
234
|
+
emptyMessage: string;
|
|
233
235
|
modelValue: MapSelectId[];
|
|
234
236
|
disabled: boolean;
|
|
235
237
|
height: string;
|
|
236
238
|
readonly: boolean;
|
|
237
239
|
selectionMode: MapSelectSelectionMode;
|
|
238
|
-
emptyMessage: string;
|
|
239
240
|
features: MapSelectFeature[];
|
|
240
241
|
scopeGeometry: MapSelectGeometry | null;
|
|
241
242
|
tileUrl: string;
|
|
242
243
|
tileAttribution: string;
|
|
243
244
|
maxZoom: number;
|
|
244
|
-
searchPlaceholder: string;
|
|
245
245
|
areaLabel: string;
|
|
246
246
|
areaSuffix: string;
|
|
247
247
|
areaDecimals: number;
|
|
@@ -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
|
+
};
|