@wgalleti/primevue-components 0.10.0 → 0.12.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 +4 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-BRhKuACi.js +6058 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-BRhKuACi.js.map +1 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-C2OIgPbM.cjs +36 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-C2OIgPbM.cjs.map +1 -0
- package/dist/components/crud/WEditableTable.vue.d.ts +78 -0
- package/dist/components/form/WAutoCompleteFK.vue.d.ts +9 -1
- package/dist/components/form/WMarkdownEditor.vue.d.ts +35 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/ui/WCheckList.vue.d.ts +36 -0
- package/dist/components/ui/WInfoCard.vue.d.ts +11 -1
- package/dist/components/ui/WKanbanBoard.vue.d.ts +85 -0
- package/dist/components/ui/WMapSelect.vue.d.ts +133 -0
- package/dist/components/ui/WMarkdownToc.vue.d.ts +29 -0
- package/dist/components/ui/WMarkdownView.vue.d.ts +27 -0
- package/dist/components/ui/WStepFlow.vue.d.ts +51 -0
- package/dist/components/ui/WStepSection.vue.d.ts +49 -0
- package/dist/components/ui/WTabBar.vue.d.ts +20 -0
- package/dist/components.cjs +1 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +34 -125
- package/dist/components.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +82 -69
- package/dist/primevue-components.css +1 -1
- package/dist/types/checkList.d.ts +7 -0
- package/dist/types/editableTable.d.ts +39 -0
- package/dist/types/field.d.ts +27 -1
- package/dist/types/index.d.ts +6 -0
- package/dist/types/kanban.d.ts +26 -0
- package/dist/types/mapSelect.d.ts +31 -0
- package/dist/types/markdown.d.ts +16 -0
- package/dist/types/tabs.d.ts +11 -0
- package/dist/utils/markdown.d.ts +17 -0
- package/dist/utils/markdownEnhance.d.ts +14 -0
- package/dist/utils/stepFlow.d.ts +27 -0
- package/package.json +17 -2
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-C-167GXT.cjs +0 -12
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-C-167GXT.cjs.map +0 -1
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-D9HgZsV9.js +0 -3886
- package/dist/WProgressFlow.vue_vue_type_script_setup_true_lang-D9HgZsV9.js.map +0 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { EditableColumnDef, EditableRow } from '../../types/editableTable';
|
|
2
|
+
/**
|
|
3
|
+
* Tabela editável sobre ESTADO LOCAL — o oposto do WCrudView, que conversa com a
|
|
4
|
+
* API a cada operação. Aqui nada é persistido: o consumidor mantém o array e
|
|
5
|
+
* salva em bloco quando quiser (o caso "documento com filhos", em que salvar
|
|
6
|
+
* linha a linha criaria registro órfão).
|
|
7
|
+
*
|
|
8
|
+
* As linhas nunca são mutadas no lugar: toda edição emite um array NOVO com a
|
|
9
|
+
* linha trocada (`update:modelValue`), então `v-model` funciona igual em `ref`,
|
|
10
|
+
* `reactive` ou prop vinda de cima.
|
|
11
|
+
*
|
|
12
|
+
* A subtabela de insumos do design é este mesmo componente dentro do slot
|
|
13
|
+
* `#expansion` — não existe componente separado para "tabela filha".
|
|
14
|
+
*/
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
/** Linhas (`v-model`). */
|
|
17
|
+
modelValue?: EditableRow[];
|
|
18
|
+
columns?: EditableColumnDef[];
|
|
19
|
+
/** Liga a coluna de expansão e o slot `#expansion`. */
|
|
20
|
+
expandable?: boolean;
|
|
21
|
+
/** Rótulo do botão de adicionar. Omitido = sem botão (só o slot `#toolbar`). */
|
|
22
|
+
addLabel?: string;
|
|
23
|
+
/** Liga a coluna da lixeira. */
|
|
24
|
+
removable?: boolean;
|
|
25
|
+
emptyMessage?: string;
|
|
26
|
+
/** Rótulo da primeira célula do rodapé de totais. */
|
|
27
|
+
footerLabel?: string;
|
|
28
|
+
/** Trava todos os editores (a tabela vira leitura). */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** Campo usado como `key` das linhas. Sem ele, a chave é o índice. */
|
|
31
|
+
rowKey?: string;
|
|
32
|
+
};
|
|
33
|
+
declare function __VLS_template(): {
|
|
34
|
+
attrs: Partial<{}>;
|
|
35
|
+
slots: Partial<Record<`cell-${string}`, (_: {
|
|
36
|
+
row: EditableRow;
|
|
37
|
+
index: number;
|
|
38
|
+
value: unknown;
|
|
39
|
+
column: EditableColumnDef;
|
|
40
|
+
}) => any>> & Partial<Record<`footer-${string}`, (_: {
|
|
41
|
+
rows: EditableRow[];
|
|
42
|
+
column: EditableColumnDef;
|
|
43
|
+
}) => any>> & {
|
|
44
|
+
toolbar?(_: {}): any;
|
|
45
|
+
empty?(_: {}): any;
|
|
46
|
+
expansion?(_: {
|
|
47
|
+
row: EditableRow;
|
|
48
|
+
index: number;
|
|
49
|
+
}): any;
|
|
50
|
+
};
|
|
51
|
+
refs: {};
|
|
52
|
+
rootEl: HTMLDivElement;
|
|
53
|
+
};
|
|
54
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
55
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
56
|
+
"update:modelValue": (rows: EditableRow[]) => any;
|
|
57
|
+
remove: (row: EditableRow, index: number) => any;
|
|
58
|
+
add: () => any;
|
|
59
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
60
|
+
"onUpdate:modelValue"?: ((rows: EditableRow[]) => any) | undefined;
|
|
61
|
+
onRemove?: ((row: EditableRow, index: number) => any) | undefined;
|
|
62
|
+
onAdd?: (() => any) | undefined;
|
|
63
|
+
}>, {
|
|
64
|
+
modelValue: EditableRow[];
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
columns: EditableColumnDef[];
|
|
67
|
+
expandable: boolean;
|
|
68
|
+
emptyMessage: string;
|
|
69
|
+
removable: boolean;
|
|
70
|
+
footerLabel: string;
|
|
71
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
72
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
73
|
+
export default _default;
|
|
74
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
75
|
+
new (): {
|
|
76
|
+
$slots: S;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FieldDef } from '../../types/field';
|
|
1
|
+
import { FieldDef, FieldSubRowsFetch } from '../../types/field';
|
|
2
2
|
import { ColumnDef } from '../../types/column';
|
|
3
3
|
interface ColumnMeta {
|
|
4
4
|
field: string;
|
|
@@ -26,6 +26,10 @@ type __VLS_Props = {
|
|
|
26
26
|
* (0 = mostrar todos). Útil em campo estreito, tipo filtro de painel. */
|
|
27
27
|
maxChips?: number;
|
|
28
28
|
optionLabel?: string;
|
|
29
|
+
/** Chave de uma segunda linha, em texto de apoio, dentro de cada sugestão — para
|
|
30
|
+
* o dado que **decide** a escolha aparecer antes dela (ex.: saldo em estoque).
|
|
31
|
+
* Vazia ou ausente na linha, a sugestão volta a ter uma linha só. */
|
|
32
|
+
optionDescription?: string;
|
|
29
33
|
optionValue?: string;
|
|
30
34
|
placeholder?: string;
|
|
31
35
|
/** Placeholder exibido enquanto uma cascata obrigatória não estiver preenchida. */
|
|
@@ -41,6 +45,10 @@ type __VLS_Props = {
|
|
|
41
45
|
canDelete?: boolean;
|
|
42
46
|
crudFields?: FieldDef[];
|
|
43
47
|
crudColumns?: ColumnDef[];
|
|
48
|
+
/** Sub-linhas do grid do modal: recebe as linhas da página e devolve o mapa
|
|
49
|
+
* `id → sub-linhas` + as colunas (dinâmicas) do mini-grid. Linha com entrada
|
|
50
|
+
* no mapa abre expandida — ex.: lote (linha) com suas análises (sub-linhas). */
|
|
51
|
+
subRows?: FieldSubRowsFetch;
|
|
44
52
|
dialogWidth?: string;
|
|
45
53
|
/** Foca o campo ao montar. Marca o input com o atributo nativo `autofocus`
|
|
46
54
|
* para que o `focus()` do PrimeVue Dialog (em onAfterEnter) o encontre e
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Editor de markdown com toolbar mínima e preview (reutiliza o WMarkdownView).
|
|
3
|
+
* A área de edição é um `<textarea>` monospace nativo — Tab mantém o
|
|
4
|
+
* comportamento de foco padrão (a11y). As ações da toolbar inserem a sintaxe
|
|
5
|
+
* na posição do cursor/seleção.
|
|
6
|
+
*/
|
|
7
|
+
type __VLS_Props = {
|
|
8
|
+
/** Markdown cru (v-model). */
|
|
9
|
+
modelValue: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Altura mínima da área de edição/preview. */
|
|
13
|
+
minHeight?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Altura máxima da área de edição/preview. Com valor, o editor vira moldura
|
|
16
|
+
* fixa e cada painel rola por dentro — as ações do formulário seguem
|
|
17
|
+
* visíveis por mais longo que fique o documento.
|
|
18
|
+
*/
|
|
19
|
+
maxHeight?: string;
|
|
20
|
+
/** 'tab' alterna escrever/visualizar; 'split' mostra lado a lado. */
|
|
21
|
+
previewMode?: 'tab' | 'split';
|
|
22
|
+
};
|
|
23
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
"update:modelValue": (value: string) => any;
|
|
25
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
27
|
+
}>, {
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
minHeight: string;
|
|
30
|
+
maxHeight: string;
|
|
31
|
+
previewMode: "tab" | "split";
|
|
32
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
33
|
+
textareaRef: HTMLTextAreaElement;
|
|
34
|
+
}, HTMLDivElement>;
|
|
35
|
+
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as WCrudView } from './crud/WCrudView.vue';
|
|
2
2
|
export { default as WCrudFormDialog } from './crud/WCrudFormDialog.vue';
|
|
3
3
|
export { default as WCrudColumnRenderer } from './crud/WCrudColumnRenderer.vue';
|
|
4
|
+
export { default as WEditableTable } from './crud/WEditableTable.vue';
|
|
4
5
|
export { default as WAutoCompleteFK } from './form/WAutoCompleteFK.vue';
|
|
5
6
|
export { default as WFormRenderer } from './form/WFormRenderer.vue';
|
|
6
7
|
export { default as WImageCropper } from './form/WImageCropper.vue';
|
|
@@ -21,3 +22,12 @@ export { default as WSectionHeader } from './ui/WSectionHeader.vue';
|
|
|
21
22
|
export { default as WFormSection } from './ui/WFormSection.vue';
|
|
22
23
|
export { default as WActionBar } from './ui/WActionBar.vue';
|
|
23
24
|
export { default as WProgressFlow } from './ui/WProgressFlow.vue';
|
|
25
|
+
export { default as WStepFlow } from './ui/WStepFlow.vue';
|
|
26
|
+
export { default as WStepSection } from './ui/WStepSection.vue';
|
|
27
|
+
export { default as WCheckList } from './ui/WCheckList.vue';
|
|
28
|
+
export { default as WMapSelect } from './ui/WMapSelect.vue';
|
|
29
|
+
export { default as WMarkdownView } from './ui/WMarkdownView.vue';
|
|
30
|
+
export { default as WMarkdownEditor } from './form/WMarkdownEditor.vue';
|
|
31
|
+
export { default as WMarkdownToc } from './ui/WMarkdownToc.vue';
|
|
32
|
+
export { default as WTabBar } from './ui/WTabBar.vue';
|
|
33
|
+
export { default as WKanbanBoard } from './ui/WKanbanBoard.vue';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CheckListItem } from '../../types/checkList';
|
|
2
|
+
/**
|
|
3
|
+
* Lista de verificações de um documento (o aside "Verificações"): um ícone por
|
|
4
|
+
* nível e o contador `N/M` de quantas passaram, no cabeçalho.
|
|
5
|
+
*
|
|
6
|
+
* A avaliação é sempre do backend/serviço — o componente só desenha o que
|
|
7
|
+
* recebe. Ele não conhece regra de negócio nenhuma.
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
title?: string;
|
|
11
|
+
items?: CheckListItem[];
|
|
12
|
+
/** Esconde o contador `N/M` do cabeçalho. */
|
|
13
|
+
showCount?: boolean;
|
|
14
|
+
emptyMessage?: string;
|
|
15
|
+
};
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
attrs: Partial<{}>;
|
|
18
|
+
slots: {
|
|
19
|
+
empty?(_: {}): any;
|
|
20
|
+
};
|
|
21
|
+
refs: {};
|
|
22
|
+
rootEl: HTMLDivElement;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
25
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
|
+
emptyMessage: string;
|
|
27
|
+
showCount: boolean;
|
|
28
|
+
items: CheckListItem[];
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
30
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -2,10 +2,20 @@ export interface InfoField {
|
|
|
2
2
|
label: string;
|
|
3
3
|
value: string | number | null | undefined;
|
|
4
4
|
format?: 'currency' | 'date' | 'datetime' | 'number' | 'text';
|
|
5
|
+
/** Unidade colada ao valor — usada na variante `metric` (ex.: `ha`, `kg`, `L`). */
|
|
6
|
+
suffix?: string;
|
|
7
|
+
/** Casas decimais do `format: 'number'` (default 2). */
|
|
8
|
+
decimals?: number;
|
|
5
9
|
}
|
|
6
10
|
type __VLS_Props = {
|
|
7
11
|
title?: string;
|
|
8
12
|
fields: InfoField[];
|
|
13
|
+
/** `default`: grade de rótulo em cima e valor embaixo.
|
|
14
|
+
* `metric`: uma linha por campo — rótulo à esquerda, número grande à
|
|
15
|
+
* direita, divisória entre as linhas (o aside "Resumo" de um documento). */
|
|
16
|
+
variant?: 'default' | 'metric';
|
|
9
17
|
};
|
|
10
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
19
|
+
variant: "default" | "metric";
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
21
|
export default _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { KanbanColumn, KanbanMoveEvent } from '../../types/kanban';
|
|
2
|
+
type Item = Record<string, unknown>;
|
|
3
|
+
/**
|
|
4
|
+
* Board kanban controlado: as colunas e seus itens vêm de fora e o board NUNCA
|
|
5
|
+
* muta os arrays — arrastar um card só emite `move`; o consumidor persiste e
|
|
6
|
+
* atualiza `columns`. Drag and drop com HTML5 nativo (sem dependência).
|
|
7
|
+
*
|
|
8
|
+
* Mover programaticamente (ex.: botão "mover para...") é responsabilidade do
|
|
9
|
+
* consumidor — basta aplicar a mesma mudança que faria ao receber um `move`.
|
|
10
|
+
*/
|
|
11
|
+
type __VLS_Props = {
|
|
12
|
+
/** Colunas na ordem de exibição. Itens pertencem ao consumidor. */
|
|
13
|
+
columns: KanbanColumn[];
|
|
14
|
+
/** Campo usado como key estável dos cards. */
|
|
15
|
+
itemKey?: string;
|
|
16
|
+
/** Permite bloquear o arrasto de itens específicos. */
|
|
17
|
+
canDrag?: (item: Item) => boolean;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** Altura máxima da lista de cards (a coluna rola por dentro). */
|
|
20
|
+
maxHeight?: string;
|
|
21
|
+
/** Altura mínima da lista — dá área de drop mesmo com a coluna vazia. */
|
|
22
|
+
minHeight?: string;
|
|
23
|
+
};
|
|
24
|
+
declare function __VLS_template(): {
|
|
25
|
+
attrs: Partial<{}>;
|
|
26
|
+
slots: Readonly<{
|
|
27
|
+
/** Conteúdo do card. Fallback: item.nome ?? item[itemKey]. */
|
|
28
|
+
card?(props: {
|
|
29
|
+
item: Item;
|
|
30
|
+
column: KanbanColumn;
|
|
31
|
+
}): unknown;
|
|
32
|
+
/** Cabeçalho da coluna. Fallback: label + contador. */
|
|
33
|
+
'column-header'?(props: {
|
|
34
|
+
column: KanbanColumn;
|
|
35
|
+
}): unknown;
|
|
36
|
+
/** Ação à direita do cabeçalho (ex.: criar nesta coluna). */
|
|
37
|
+
'column-action'?(props: {
|
|
38
|
+
column: KanbanColumn;
|
|
39
|
+
}): unknown;
|
|
40
|
+
/** Coluna sem itens. */
|
|
41
|
+
'empty-column'?(props: {
|
|
42
|
+
column: KanbanColumn;
|
|
43
|
+
}): unknown;
|
|
44
|
+
}> & {
|
|
45
|
+
/** Conteúdo do card. Fallback: item.nome ?? item[itemKey]. */
|
|
46
|
+
card?(props: {
|
|
47
|
+
item: Item;
|
|
48
|
+
column: KanbanColumn;
|
|
49
|
+
}): unknown;
|
|
50
|
+
/** Cabeçalho da coluna. Fallback: label + contador. */
|
|
51
|
+
'column-header'?(props: {
|
|
52
|
+
column: KanbanColumn;
|
|
53
|
+
}): unknown;
|
|
54
|
+
/** Ação à direita do cabeçalho (ex.: criar nesta coluna). */
|
|
55
|
+
'column-action'?(props: {
|
|
56
|
+
column: KanbanColumn;
|
|
57
|
+
}): unknown;
|
|
58
|
+
/** Coluna sem itens. */
|
|
59
|
+
'empty-column'?(props: {
|
|
60
|
+
column: KanbanColumn;
|
|
61
|
+
}): unknown;
|
|
62
|
+
};
|
|
63
|
+
refs: {};
|
|
64
|
+
rootEl: HTMLDivElement;
|
|
65
|
+
};
|
|
66
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
67
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
68
|
+
move: (event: KanbanMoveEvent<Record<string, unknown>>) => any;
|
|
69
|
+
"item-click": (item: Item) => any;
|
|
70
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
71
|
+
onMove?: ((event: KanbanMoveEvent<Record<string, unknown>>) => any) | undefined;
|
|
72
|
+
"onItem-click"?: ((item: Item) => any) | undefined;
|
|
73
|
+
}>, {
|
|
74
|
+
loading: boolean;
|
|
75
|
+
minHeight: string;
|
|
76
|
+
maxHeight: string;
|
|
77
|
+
itemKey: string;
|
|
78
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
79
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
80
|
+
export default _default;
|
|
81
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
82
|
+
new (): {
|
|
83
|
+
$slots: S;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { MapSelectFeature, MapSelectGeometry, MapSelectId, MapSelectPolygonStyle } from '../../types/mapSelect';
|
|
2
|
+
/**
|
|
3
|
+
* Seleção múltipla de polígonos num mapa de satélite, com painel lateral de busca.
|
|
4
|
+
*
|
|
5
|
+
* O componente NÃO é dono da seleção: `modelValue` é a fonte da verdade e todo
|
|
6
|
+
* clique (no polígono ou na lista) sai como `update:modelValue`. Isso mantém o
|
|
7
|
+
* mapa e a lista sempre coerentes — os dois leem o mesmo array.
|
|
8
|
+
*
|
|
9
|
+
* O Leaflet entra por `import()` dinâmico: o mapa costuma viver dentro de um
|
|
10
|
+
* Dialog, e carregar ~150 kB de biblioteca de mapa no bundle de quem só abre um
|
|
11
|
+
* CRUD é desperdício. Se o `import()` falhar (offline, CSP), o mapa é substituído
|
|
12
|
+
* por um aviso e o painel lateral continua funcionando — selecionar talhão pela
|
|
13
|
+
* lista nunca depende do mapa ter subido.
|
|
14
|
+
*
|
|
15
|
+
* `layout` só troca POSICIONAMENTO (CSS): a marcação é a mesma nos dois modos.
|
|
16
|
+
* No `'sobreposto'` o mapa ocupa tudo e o painel/rodapé flutuam por cima em
|
|
17
|
+
* vidro. Eles continuam FORA do container do Leaflet (irmãos, não filhos), então
|
|
18
|
+
* o mapa nunca vê os cliques do painel e o painel nunca precisa de
|
|
19
|
+
* `L.DomEvent.disableClickPropagation` — arrastar/zoom por baixo segue intacto.
|
|
20
|
+
*/
|
|
21
|
+
type __VLS_Props = {
|
|
22
|
+
/** Ids selecionados (`v-model`). */
|
|
23
|
+
modelValue?: MapSelectId[];
|
|
24
|
+
/** Itens selecionáveis. Sem `geometria` o item some do mapa, não da lista. */
|
|
25
|
+
features?: MapSelectFeature[];
|
|
26
|
+
/** Geometria do escopo (ex.: o setor) usada no `fitBounds` inicial.
|
|
27
|
+
* Sem ela, o enquadramento é a união das geometrias das `features`. */
|
|
28
|
+
scopeGeometry?: MapSelectGeometry | null;
|
|
29
|
+
/** Tiles. Default: satélite World_Imagery (ArcGIS/Esri). */
|
|
30
|
+
tileUrl?: string;
|
|
31
|
+
tileAttribution?: string;
|
|
32
|
+
/** Zoom máximo do tile layer (o World_Imagery vai até 19). */
|
|
33
|
+
maxZoom?: number;
|
|
34
|
+
searchPlaceholder?: string;
|
|
35
|
+
/** Rótulo do rodapé, à esquerda da área somada. */
|
|
36
|
+
areaLabel?: string;
|
|
37
|
+
/** Unidade da área, no rodapé e no tooltip do polígono. */
|
|
38
|
+
areaSuffix?: string;
|
|
39
|
+
/** Casas decimais da área. */
|
|
40
|
+
areaDecimals?: number;
|
|
41
|
+
/** Altura do mapa (qualquer unidade CSS). */
|
|
42
|
+
height?: string;
|
|
43
|
+
/** Arranjo do componente.
|
|
44
|
+
* - `'lado-a-lado'`: mapa à esquerda, painel de 300 px à direita, rodapé embaixo.
|
|
45
|
+
* - `'sobreposto'`: o mapa ocupa tudo; painel e rodapé flutuam sobre ele em vidro. */
|
|
46
|
+
layout?: 'lado-a-lado' | 'sobreposto';
|
|
47
|
+
/** Texto do contador. Default em pt-BR: "N talhões selecionados". */
|
|
48
|
+
selectionLabel?: (count: number) => string;
|
|
49
|
+
clearLabel?: string;
|
|
50
|
+
/** `layout="sobreposto"`: rótulo acessível do botão que recolhe o painel. */
|
|
51
|
+
collapseLabel?: string;
|
|
52
|
+
/** `layout="sobreposto"`: rótulo acessível do botão que reabre o painel. */
|
|
53
|
+
expandLabel?: string;
|
|
54
|
+
/** Selo sobre o mapa (canto superior direito). `''` esconde. */
|
|
55
|
+
badgeLabel?: string;
|
|
56
|
+
emptyMessage?: string;
|
|
57
|
+
/** Mensagem quando o Leaflet não carregou. */
|
|
58
|
+
mapErrorMessage?: string;
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
/** Estilo do polígono não selecionado. */
|
|
61
|
+
polygonStyle?: MapSelectPolygonStyle;
|
|
62
|
+
/** Estilo do polígono selecionado. */
|
|
63
|
+
polygonSelectedStyle?: MapSelectPolygonStyle;
|
|
64
|
+
};
|
|
65
|
+
declare function setCollapsed(value: boolean): void;
|
|
66
|
+
/** O mapa costuma nascer escondido (dentro de um Dialog): sem isto o Leaflet
|
|
67
|
+
* calcula 0×0 e desenha só um pedaço quando o container aparece. */
|
|
68
|
+
declare function refreshSize(): void;
|
|
69
|
+
declare function __VLS_template(): {
|
|
70
|
+
attrs: Partial<{}>;
|
|
71
|
+
slots: {
|
|
72
|
+
item?(_: {
|
|
73
|
+
feature: MapSelectFeature;
|
|
74
|
+
selected: boolean;
|
|
75
|
+
}): any;
|
|
76
|
+
empty?(_: {}): any;
|
|
77
|
+
footer?(_: {
|
|
78
|
+
area: number;
|
|
79
|
+
features: MapSelectFeature[];
|
|
80
|
+
}): any;
|
|
81
|
+
};
|
|
82
|
+
refs: {
|
|
83
|
+
root: HTMLDivElement;
|
|
84
|
+
container: HTMLDivElement;
|
|
85
|
+
footer: HTMLDivElement;
|
|
86
|
+
};
|
|
87
|
+
rootEl: HTMLDivElement;
|
|
88
|
+
};
|
|
89
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
90
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
91
|
+
refreshSize: typeof refreshSize;
|
|
92
|
+
/** Painel flutuante recolhido? (só faz sentido no `layout="sobreposto"`.) */
|
|
93
|
+
collapsed: Readonly<import('vue').Ref<boolean, boolean>>;
|
|
94
|
+
setCollapsed: typeof setCollapsed;
|
|
95
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
96
|
+
"update:modelValue": (ids: MapSelectId[]) => any;
|
|
97
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
98
|
+
"onUpdate:modelValue"?: ((ids: MapSelectId[]) => any) | undefined;
|
|
99
|
+
}>, {
|
|
100
|
+
modelValue: MapSelectId[];
|
|
101
|
+
disabled: boolean;
|
|
102
|
+
height: string;
|
|
103
|
+
emptyMessage: string;
|
|
104
|
+
features: MapSelectFeature[];
|
|
105
|
+
scopeGeometry: MapSelectGeometry | null;
|
|
106
|
+
tileUrl: string;
|
|
107
|
+
tileAttribution: string;
|
|
108
|
+
maxZoom: number;
|
|
109
|
+
searchPlaceholder: string;
|
|
110
|
+
areaLabel: string;
|
|
111
|
+
areaSuffix: string;
|
|
112
|
+
areaDecimals: number;
|
|
113
|
+
layout: "lado-a-lado" | "sobreposto";
|
|
114
|
+
selectionLabel: (count: number) => string;
|
|
115
|
+
clearLabel: string;
|
|
116
|
+
collapseLabel: string;
|
|
117
|
+
expandLabel: string;
|
|
118
|
+
badgeLabel: string;
|
|
119
|
+
mapErrorMessage: string;
|
|
120
|
+
polygonStyle: MapSelectPolygonStyle;
|
|
121
|
+
polygonSelectedStyle: MapSelectPolygonStyle;
|
|
122
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
123
|
+
root: HTMLDivElement;
|
|
124
|
+
container: HTMLDivElement;
|
|
125
|
+
footer: HTMLDivElement;
|
|
126
|
+
}, HTMLDivElement>;
|
|
127
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
128
|
+
export default _default;
|
|
129
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
130
|
+
new (): {
|
|
131
|
+
$slots: S;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MarkdownHeading } from '../../types/markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Índice do documento ("Nesta página") com marcação da seção em leitura.
|
|
4
|
+
*
|
|
5
|
+
* Os títulos vêm do evento `headings` do WMarkdownView. Cada `##` vira um grupo
|
|
6
|
+
* que **recolhe seus `###`** — assim o índice fica curto mesmo em documento
|
|
7
|
+
* longo — e o grupo da seção que está sendo lida abre sozinho.
|
|
8
|
+
*
|
|
9
|
+
* A altura é presa à do contexto e a rolagem, quando sobra conteúdo, acontece
|
|
10
|
+
* sem barra visível: o índice não pode competir com a rolagem da página.
|
|
11
|
+
*/
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
/** Títulos do documento (evento `headings` do WMarkdownView). */
|
|
14
|
+
headings: MarkdownHeading[];
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Abaixo disso o índice não aparece (documento curto não precisa). */
|
|
17
|
+
minHeadings?: number;
|
|
18
|
+
/** Mostra o campo que filtra os títulos. */
|
|
19
|
+
searchable?: boolean;
|
|
20
|
+
/** Teto da lista — o índice se ajusta à altura disponível. */
|
|
21
|
+
maxHeight?: string;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
24
|
+
title: string;
|
|
25
|
+
maxHeight: string;
|
|
26
|
+
minHeadings: number;
|
|
27
|
+
searchable: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MarkdownHeading } from '../../types/markdown';
|
|
2
|
+
/**
|
|
3
|
+
* Leitor de markdown rico — a tela de leitura do design system.
|
|
4
|
+
*
|
|
5
|
+
* Além do markdown padrão (títulos, listas, tabelas, citações), entende o
|
|
6
|
+
* vocabulário de documentação do produto: alertas (`> [!DICA]` ou `::: dica`),
|
|
7
|
+
* passos, cards, abas, blocos colapsáveis, notas de rodapé, código com realce e
|
|
8
|
+
* botão de copiar, e diagramas ```mermaid.
|
|
9
|
+
*
|
|
10
|
+
* Sempre sanitizado (DOMPurify) antes do `v-html` — o conteúdo vem de usuários.
|
|
11
|
+
*/
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
/** Markdown cru a renderizar. */
|
|
14
|
+
source: string;
|
|
15
|
+
/** Mensagem exibida quando `source` está vazio. */
|
|
16
|
+
emptyText?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
19
|
+
headings: (args_0: MarkdownHeading[]) => any;
|
|
20
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
+
onHeadings?: ((args_0: MarkdownHeading[]) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
emptyText: string;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
25
|
+
raiz: HTMLDivElement;
|
|
26
|
+
}, any>;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { StepFlowOrientation } from '../../utils/stepFlow';
|
|
2
|
+
/**
|
|
3
|
+
* Etapas numeradas e colapsáveis (a espinha do editor de documento).
|
|
4
|
+
* Diferente do WProgressFlow, que só ILUSTRA o progresso: aqui cada etapa é um
|
|
5
|
+
* bloco de conteúdo que abre e fecha, e o `v-model` diz qual está aberta.
|
|
6
|
+
*
|
|
7
|
+
* `0` = todas fechadas. É estado do consumidor de propósito: "continuar para a
|
|
8
|
+
* próxima etapa" é uma decisão da tela, não do componente.
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
/** Número da etapa aberta (`v-model`). `0` fecha todas. */
|
|
12
|
+
modelValue?: number;
|
|
13
|
+
/**
|
|
14
|
+
* `vertical` empilha as etapas numa coluna (cada uma é um card).
|
|
15
|
+
* `horizontal` põe os cabeçalhos lado a lado numa régua e abre só o corpo da
|
|
16
|
+
* etapa ativa embaixo, na largura inteira — abaixo de 768px cai sozinho
|
|
17
|
+
* para o empilhamento vertical (a régua não cabe).
|
|
18
|
+
*/
|
|
19
|
+
orientation?: StepFlowOrientation;
|
|
20
|
+
/** Trava o clique no cabeçalho de todas as etapas. */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
};
|
|
23
|
+
declare function __VLS_template(): {
|
|
24
|
+
attrs: Partial<{}>;
|
|
25
|
+
slots: {
|
|
26
|
+
default?(_: {}): any;
|
|
27
|
+
};
|
|
28
|
+
refs: {
|
|
29
|
+
root: HTMLDivElement;
|
|
30
|
+
};
|
|
31
|
+
rootEl: HTMLDivElement;
|
|
32
|
+
};
|
|
33
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
34
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
|
+
"update:modelValue": (step: number) => any;
|
|
36
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
37
|
+
"onUpdate:modelValue"?: ((step: number) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
modelValue: number;
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
orientation: StepFlowOrientation;
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
43
|
+
root: HTMLDivElement;
|
|
44
|
+
}, HTMLDivElement>;
|
|
45
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Uma etapa do WStepFlow: badge numerada + linha conectora, cabeçalho clicável
|
|
3
|
+
* (título, contador e resumo) e corpo colapsável com rodapé de ação.
|
|
4
|
+
*
|
|
5
|
+
* A orientação NÃO é prop daqui: vem do contexto do flow. Na vertical a etapa é
|
|
6
|
+
* um card na coluna; na horizontal o cabeçalho vira um trecho da régua e só o
|
|
7
|
+
* corpo da etapa ativa é desenhado, embaixo, na largura inteira.
|
|
8
|
+
*
|
|
9
|
+
* Fora de um WStepFlow o componente ainda funciona: ele cai num estado local
|
|
10
|
+
* aberto (e em vertical), para poder ser usado como card colapsável avulso.
|
|
11
|
+
*/
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
/** Número da etapa (1-based) — é o valor que o `v-model` do flow carrega. */
|
|
14
|
+
step: number;
|
|
15
|
+
title: string;
|
|
16
|
+
/** Texto à direita do título (o "resumo" da etapa fechada). */
|
|
17
|
+
summary?: string;
|
|
18
|
+
/** Badge de contagem entre o título e o resumo. */
|
|
19
|
+
count?: number | string;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare function __VLS_template(): {
|
|
23
|
+
attrs: Partial<{}>;
|
|
24
|
+
slots: {
|
|
25
|
+
actions?(_: {
|
|
26
|
+
open: boolean;
|
|
27
|
+
}): any;
|
|
28
|
+
actions?(_: {
|
|
29
|
+
open: boolean;
|
|
30
|
+
}): any;
|
|
31
|
+
default?(_: {}): any;
|
|
32
|
+
default?(_: {}): any;
|
|
33
|
+
footer?(_: {}): any;
|
|
34
|
+
footer?(_: {}): any;
|
|
35
|
+
};
|
|
36
|
+
refs: {};
|
|
37
|
+
rootEl: any;
|
|
38
|
+
};
|
|
39
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
40
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
43
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
44
|
+
export default _default;
|
|
45
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
46
|
+
new (): {
|
|
47
|
+
$slots: S;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TabItem } from '../../types/tabs';
|
|
2
|
+
/**
|
|
3
|
+
* Barra de abas de TELA (não confundir com as abas dentro de um markdown).
|
|
4
|
+
*
|
|
5
|
+
* Controlada: só emite `update:modelValue` — quem decide o que renderizar é a
|
|
6
|
+
* página. Navegação por teclado com ←/→ (padrão ARIA de tablist).
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
/** `value` da aba ativa. */
|
|
10
|
+
modelValue: string;
|
|
11
|
+
items: TabItem[];
|
|
12
|
+
/** Rótulo do grupo para leitores de tela. */
|
|
13
|
+
ariaLabel?: string;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: string) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
20
|
+
export default _default;
|
package/dist/components.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./WKanbanBoard.vue_vue_type_script_setup_true_lang-C2OIgPbM.cjs");exports.WActionBar=_._sfc_main;exports.WAutoCompleteFK=_._sfc_main$1;exports.WCheckList=_._sfc_main$2;exports.WCrudColumnRenderer=_._sfc_main$3;exports.WCrudFormDialog=_._sfc_main$4;exports.WCrudView=_._sfc_main$5;exports.WDatePicker=_._sfc_main$6;exports.WDateRange=_._sfc_main$7;exports.WDetailHeader=_._sfc_main$8;exports.WEditableTable=_._sfc_main$9;exports.WEmptyState=_._sfc_main$10;exports.WFileUpload=_._sfc_main$11;exports.WFormRenderer=_._sfc_main$12;exports.WFormSection=_._sfc_main$13;exports.WImageCropper=_.WImageCropper;exports.WInfoCard=_._sfc_main$14;exports.WKanbanBoard=_._sfc_main$15;exports.WKpiCard=_._sfc_main$16;exports.WKpiGrid=_._sfc_main$17;exports.WMapSelect=_._sfc_main$18;exports.WMarkdownEditor=_._sfc_main$19;exports.WMarkdownToc=_._sfc_main$20;exports.WMarkdownView=_._sfc_main$21;exports.WMoneyInput=_._sfc_main$22;exports.WPageHeader=_._sfc_main$23;exports.WProgressFlow=_._sfc_main$24;exports.WSectionHeader=_._sfc_main$25;exports.WStatusTag=_._sfc_main$26;exports.WStepFlow=_._sfc_main$27;exports.WStepSection=_._sfc_main$28;exports.WTabBar=_._sfc_main$29;exports.WTransferList=_._sfc_main$30;exports.WTreeSelect=_._sfc_main$31;
|
|
2
2
|
//# sourceMappingURL=components.cjs.map
|