@wgalleti/primevue-components 0.14.0 → 0.15.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/dist/{WKanbanBoard.vue_vue_type_script_setup_true_lang-D30LZLT8.js → WKanbanBoard.vue_vue_type_script_setup_true_lang-Cx3AJma_.js} +2653 -2581
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-Cx3AJma_.js.map +1 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-DX-6iLgb.cjs +36 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-DX-6iLgb.cjs.map +1 -0
- package/dist/components/crud/WCrudView.vue.d.ts +27 -2
- package/dist/components/ui/WMapSelect.vue.d.ts +26 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/composables.cjs +1 -1
- package/dist/composables.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/primevue-components.css +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/manager.d.ts +11 -3
- package/dist/types/mapSelect.d.ts +11 -0
- package/dist/useApi-BM5JpPDe.js +539 -0
- package/dist/useApi-BM5JpPDe.js.map +1 -0
- package/dist/useApi-CPt3Tj4n.cjs +2 -0
- package/dist/useApi-CPt3Tj4n.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-D30LZLT8.js.map +0 -1
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-x3RaoczK.cjs +0 -36
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-x3RaoczK.cjs.map +0 -1
- package/dist/useApi-BQJ_C2Yt.js +0 -519
- package/dist/useApi-BQJ_C2Yt.js.map +0 -1
- package/dist/useApi-DpkKD_bN.cjs +0 -2
- package/dist/useApi-DpkKD_bN.cjs.map +0 -1
|
@@ -35,6 +35,17 @@ type __VLS_Props = {
|
|
|
35
35
|
* Opt-in: quando definida, exibe o seletor de colunas e persiste o que foi ocultado. */
|
|
36
36
|
persistState?: string;
|
|
37
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* Rola a tabela até a linha cujo pk é `value` — o par do `v-model:selectedRow`
|
|
40
|
+
* para o sentido "de fora para dentro" (selecionou no mapa/gráfico, a linha
|
|
41
|
+
* aparece). Só alcança a página atual: linha em outra página não é buscada — é
|
|
42
|
+
* do consumidor decidir o que fazer nesse caso (a lista é lazy). Com linhas de
|
|
43
|
+
* expansão abertas o índice DOM diverge do índice do item; aí não rola.
|
|
44
|
+
*/
|
|
45
|
+
declare function scrollToRow(value: unknown): void;
|
|
46
|
+
type __VLS_PublicProps = {
|
|
47
|
+
'selectedRow'?: Record<string, unknown> | null;
|
|
48
|
+
} & __VLS_Props;
|
|
38
49
|
declare function __VLS_template(): {
|
|
39
50
|
attrs: Partial<{}>;
|
|
40
51
|
slots: Partial<Record<`column-${string}`, (_: {
|
|
@@ -88,6 +99,11 @@ declare function __VLS_template(): {
|
|
|
88
99
|
}): any;
|
|
89
100
|
};
|
|
90
101
|
refs: {
|
|
102
|
+
tableRef: ({
|
|
103
|
+
$props: import('primevue/datatable').DataTableProps<any> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
104
|
+
$slots: import('primevue/datatable').DataTableSlots<any>;
|
|
105
|
+
$emit: ((e: "page", event: import('primevue/datatable').DataTablePageEvent) => void) & ((e: "sort", event: import('primevue/datatable').DataTableSortEvent) => void) & ((e: "filter", event: import('primevue/datatable').DataTableFilterEvent) => void) & ((e: "value-change", value: any[]) => void) & ((e: "update:first", value: number) => void) & ((e: "update:rows", value: number) => void) & ((e: "update:sortField", value: string) => void) & ((e: "update:sortOrder", value: number | undefined) => void) & ((e: "update:multiSortMeta", value: import('primevue/datatable').DataTableSortMeta[] | null | undefined) => void) & ((e: "update:selection", value: any) => void) & ((e: "update:contextMenuSelection", value: any) => void) & ((e: "update:expandedRows", value: any[] | import('primevue/datatable').DataTableExpandedRows) => void) & ((e: "update:expandedRowGroups", value: any[] | import('primevue/datatable').DataTableExpandedRows) => void) & ((e: "update:filters", value: import('primevue/datatable').DataTableFilterMeta) => void) & ((e: "update:editingRows", value: any[] | import('primevue/datatable').DataTableEditingRows) => void) & ((e: "row-click", event: import('primevue/datatable').DataTableRowClickEvent<any>) => void) & ((e: "row-dblclick", event: import('primevue/datatable').DataTableRowDoubleClickEvent) => void) & ((e: "row-contextmenu", event: import('primevue/datatable').DataTableRowContextMenuEvent) => void) & ((e: "row-select", event: import('primevue/datatable').DataTableRowSelectEvent<any>) => void) & ((e: "row-select-all", event: import('primevue/datatable').DataTableRowSelectAllEvent<any>) => void) & ((e: "row-unselect-all", event: import('primevue/datatable').DataTableRowUnselectAllEvent) => void) & ((e: "row-unselect", event: import('primevue/datatable').DataTableRowUnselectEvent) => void) & ((e: "select-all-change", event: import('primevue/datatable').DataTableSelectAllChangeEvent) => void) & ((e: "column-resize-end", event: import('primevue/datatable').DataTableColumnResizeEndEvent) => void) & ((e: "column-reorder", event: import('primevue/datatable').DataTableColumnReorderEvent) => void) & ((e: "row-reorder", event: import('primevue/datatable').DataTableRowReorderEvent) => void) & ((e: "row-expand", event: import('primevue/datatable').DataTableRowExpandEvent<any>) => void) & ((e: "row-collapse", event: import('primevue/datatable').DataTableRowCollapseEvent) => void) & ((e: "rowgroup-expand", event: import('primevue/datatable').DataTableRowExpandEvent<any>) => void) & ((e: "rowgroup-collapse", event: import('primevue/datatable').DataTableRowCollapseEvent) => void) & ((e: "cell-edit-init", event: import('primevue/datatable').DataTableCellEditInitEvent<any>) => void) & ((e: "cell-edit-complete", event: import('primevue/datatable').DataTableCellEditCompleteEvent<any>) => void) & ((e: "cell-edit-cancel", event: import('primevue/datatable').DataTableCellEditCancelEvent) => void) & ((e: "row-edit-init", event: import('primevue/datatable').DataTableRowEditInitEvent<any>) => void) & ((e: "row-edit-save", event: import('primevue/datatable').DataTableRowEditSaveEvent<any>) => void) & ((e: "row-edit-cancel", event: import('primevue/datatable').DataTableRowEditCancelEvent<any>) => void) & ((e: "state-restore", event: import('primevue/datatable').DataTableStateEvent<any>) => void) & ((e: "state-save", event: import('primevue/datatable').DataTableStateEvent<any>) => void);
|
|
106
|
+
} & import('primevue/datatable').DataTableMethods) | null;
|
|
91
107
|
chooser: ({
|
|
92
108
|
$props: import('primevue/popover').PopoverProps & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
93
109
|
$slots: import('primevue/popover').PopoverSlots;
|
|
@@ -102,14 +118,18 @@ declare function __VLS_template(): {
|
|
|
102
118
|
rootEl: HTMLDivElement;
|
|
103
119
|
};
|
|
104
120
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
105
|
-
declare const __VLS_component: import('vue').DefineComponent<
|
|
121
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
122
|
+
scrollToRow: typeof scrollToRow;
|
|
123
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
106
124
|
"row-expand": (data: unknown) => any;
|
|
107
125
|
"row-collapse": (data: unknown) => any;
|
|
108
126
|
print: (data: Record<string, unknown>) => any;
|
|
109
|
-
|
|
127
|
+
"update:selectedRow": (value: Record<string, unknown> | null) => any;
|
|
128
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
110
129
|
"onRow-expand"?: ((data: unknown) => any) | undefined;
|
|
111
130
|
"onRow-collapse"?: ((data: unknown) => any) | undefined;
|
|
112
131
|
onPrint?: ((data: Record<string, unknown>) => any) | undefined;
|
|
132
|
+
"onUpdate:selectedRow"?: ((value: Record<string, unknown> | null) => any) | undefined;
|
|
113
133
|
}>, {
|
|
114
134
|
dialogWidth: string;
|
|
115
135
|
showSearch: boolean;
|
|
@@ -131,6 +151,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
131
151
|
csvScope: "all" | "page";
|
|
132
152
|
csvPageSize: number;
|
|
133
153
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
154
|
+
tableRef: ({
|
|
155
|
+
$props: import('primevue/datatable').DataTableProps<any> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
156
|
+
$slots: import('primevue/datatable').DataTableSlots<any>;
|
|
157
|
+
$emit: ((e: "page", event: import('primevue/datatable').DataTablePageEvent) => void) & ((e: "sort", event: import('primevue/datatable').DataTableSortEvent) => void) & ((e: "filter", event: import('primevue/datatable').DataTableFilterEvent) => void) & ((e: "value-change", value: any[]) => void) & ((e: "update:first", value: number) => void) & ((e: "update:rows", value: number) => void) & ((e: "update:sortField", value: string) => void) & ((e: "update:sortOrder", value: number | undefined) => void) & ((e: "update:multiSortMeta", value: import('primevue/datatable').DataTableSortMeta[] | null | undefined) => void) & ((e: "update:selection", value: any) => void) & ((e: "update:contextMenuSelection", value: any) => void) & ((e: "update:expandedRows", value: any[] | import('primevue/datatable').DataTableExpandedRows) => void) & ((e: "update:expandedRowGroups", value: any[] | import('primevue/datatable').DataTableExpandedRows) => void) & ((e: "update:filters", value: import('primevue/datatable').DataTableFilterMeta) => void) & ((e: "update:editingRows", value: any[] | import('primevue/datatable').DataTableEditingRows) => void) & ((e: "row-click", event: import('primevue/datatable').DataTableRowClickEvent<any>) => void) & ((e: "row-dblclick", event: import('primevue/datatable').DataTableRowDoubleClickEvent) => void) & ((e: "row-contextmenu", event: import('primevue/datatable').DataTableRowContextMenuEvent) => void) & ((e: "row-select", event: import('primevue/datatable').DataTableRowSelectEvent<any>) => void) & ((e: "row-select-all", event: import('primevue/datatable').DataTableRowSelectAllEvent<any>) => void) & ((e: "row-unselect-all", event: import('primevue/datatable').DataTableRowUnselectAllEvent) => void) & ((e: "row-unselect", event: import('primevue/datatable').DataTableRowUnselectEvent) => void) & ((e: "select-all-change", event: import('primevue/datatable').DataTableSelectAllChangeEvent) => void) & ((e: "column-resize-end", event: import('primevue/datatable').DataTableColumnResizeEndEvent) => void) & ((e: "column-reorder", event: import('primevue/datatable').DataTableColumnReorderEvent) => void) & ((e: "row-reorder", event: import('primevue/datatable').DataTableRowReorderEvent) => void) & ((e: "row-expand", event: import('primevue/datatable').DataTableRowExpandEvent<any>) => void) & ((e: "row-collapse", event: import('primevue/datatable').DataTableRowCollapseEvent) => void) & ((e: "rowgroup-expand", event: import('primevue/datatable').DataTableRowExpandEvent<any>) => void) & ((e: "rowgroup-collapse", event: import('primevue/datatable').DataTableRowCollapseEvent) => void) & ((e: "cell-edit-init", event: import('primevue/datatable').DataTableCellEditInitEvent<any>) => void) & ((e: "cell-edit-complete", event: import('primevue/datatable').DataTableCellEditCompleteEvent<any>) => void) & ((e: "cell-edit-cancel", event: import('primevue/datatable').DataTableCellEditCancelEvent) => void) & ((e: "row-edit-init", event: import('primevue/datatable').DataTableRowEditInitEvent<any>) => void) & ((e: "row-edit-save", event: import('primevue/datatable').DataTableRowEditSaveEvent<any>) => void) & ((e: "row-edit-cancel", event: import('primevue/datatable').DataTableRowEditCancelEvent<any>) => void) & ((e: "state-restore", event: import('primevue/datatable').DataTableStateEvent<any>) => void) & ((e: "state-save", event: import('primevue/datatable').DataTableStateEvent<any>) => void);
|
|
158
|
+
} & import('primevue/datatable').DataTableMethods) | null;
|
|
134
159
|
chooser: ({
|
|
135
160
|
$props: import('primevue/popover').PopoverProps & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
|
|
136
161
|
$slots: import('primevue/popover').PopoverSlots;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MapSelectFeature, MapSelectGeometry, MapSelectId, MapSelectPolygonStyle } from '../../types/mapSelect';
|
|
1
|
+
import { MapSelectFeature, MapSelectGeometry, MapSelectId, MapSelectPolygonStyle, MapSelectSelectionMode, MapSelectTooltips } from '../../types/mapSelect';
|
|
2
2
|
/**
|
|
3
3
|
* Seleção múltipla de polígonos num mapa de satélite, com painel lateral de busca.
|
|
4
4
|
*
|
|
@@ -66,12 +66,30 @@ type __VLS_Props = {
|
|
|
66
66
|
* duplica a busca da própria tela e a área somada não tem o que somar.
|
|
67
67
|
* `modelValue` continua valendo: dá para destacar um polígono de fora. */
|
|
68
68
|
readonly?: boolean;
|
|
69
|
+
/** Tooltip dos polígonos. `'permanent'` (default) mantém o rótulo sempre
|
|
70
|
+
* visível; `'hover'` só o mostra sob o cursor — com muitos polígonos
|
|
71
|
+
* (100+), o permanente vira um nó DOM por talhão reposicionado a cada
|
|
72
|
+
* pan/zoom, e o `'hover'` devolve a fluidez. */
|
|
73
|
+
tooltips?: MapSelectTooltips;
|
|
74
|
+
/** Modo de seleção por clique. Sem valor, o default preserva o comportamento
|
|
75
|
+
* de sempre: interativo → `'multiple'`, `readonly` → `'none'`. Definido
|
|
76
|
+
* explicitamente, vale MESMO com `readonly` (que segue escondendo painel e
|
|
77
|
+
* rodapé): o clique no polígono emite `update:modelValue`. Em `'single'` o
|
|
78
|
+
* clique substitui a seleção (`[id]`) e clicar no selecionado desmarca. */
|
|
79
|
+
selectionMode?: MapSelectSelectionMode;
|
|
69
80
|
/** Estilo do polígono não selecionado. */
|
|
70
81
|
polygonStyle?: MapSelectPolygonStyle;
|
|
71
82
|
/** Estilo do polígono selecionado. */
|
|
72
83
|
polygonSelectedStyle?: MapSelectPolygonStyle;
|
|
73
84
|
};
|
|
74
85
|
declare function setCollapsed(value: boolean): void;
|
|
86
|
+
declare function fitToScope(): void;
|
|
87
|
+
/** Enquadra a layer de um id, com o mesmo padding do escopo. No-op se o id não
|
|
88
|
+
* tem layer (sem geometria, ainda não chegou, mapa fora do ar). */
|
|
89
|
+
declare function fitToFeature(id: MapSelectId, options?: {
|
|
90
|
+
padding?: [number, number];
|
|
91
|
+
maxZoom?: number;
|
|
92
|
+
}): void;
|
|
75
93
|
/** O mapa costuma nascer escondido (dentro de um Dialog): sem isto o Leaflet
|
|
76
94
|
* calcula 0×0 e desenha só um pedaço quando o container aparece. */
|
|
77
95
|
declare function refreshSize(): void;
|
|
@@ -101,6 +119,11 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
101
119
|
/** Painel flutuante recolhido? (só faz sentido no `layout="sobreposto"`.) */
|
|
102
120
|
collapsed: Readonly<import('vue').Ref<boolean, boolean>>;
|
|
103
121
|
setCollapsed: typeof setCollapsed;
|
|
122
|
+
/** Reenquadra no escopo (ou na união das features) — o fit automático só
|
|
123
|
+
* acontece uma vez; páginas novas de `features` não movem o mapa. */
|
|
124
|
+
fitToScope: typeof fitToScope;
|
|
125
|
+
/** Enquadra o polígono de um id (padding igual ao do escopo). No-op sem layer. */
|
|
126
|
+
fitToFeature: typeof fitToFeature;
|
|
104
127
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
105
128
|
"update:modelValue": (ids: MapSelectId[]) => any;
|
|
106
129
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
@@ -110,6 +133,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
110
133
|
disabled: boolean;
|
|
111
134
|
height: string;
|
|
112
135
|
readonly: boolean;
|
|
136
|
+
selectionMode: MapSelectSelectionMode;
|
|
113
137
|
emptyMessage: string;
|
|
114
138
|
features: MapSelectFeature[];
|
|
115
139
|
scopeGeometry: MapSelectGeometry | null;
|
|
@@ -127,6 +151,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
|
127
151
|
expandLabel: string;
|
|
128
152
|
badgeLabel: string;
|
|
129
153
|
mapErrorMessage: string;
|
|
154
|
+
tooltips: MapSelectTooltips;
|
|
130
155
|
polygonStyle: MapSelectPolygonStyle;
|
|
131
156
|
polygonSelectedStyle: MapSelectPolygonStyle;
|
|
132
157
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
package/dist/components.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./WKanbanBoard.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./WKanbanBoard.vue_vue_type_script_setup_true_lang-DX-6iLgb.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.WCrudSubview=_._sfc_main$5;exports.WCrudView=_._sfc_main$6;exports.WDatePicker=_._sfc_main$7;exports.WDateRange=_._sfc_main$8;exports.WDetailHeader=_._sfc_main$9;exports.WEditableTable=_._sfc_main$10;exports.WEmptyState=_._sfc_main$11;exports.WFileUpload=_._sfc_main$12;exports.WFormRenderer=_._sfc_main$13;exports.WFormSection=_._sfc_main$14;exports.WImageCropper=_.WImageCropper;exports.WInfoCard=_._sfc_main$15;exports.WKanbanBoard=_._sfc_main$16;exports.WKpiCard=_._sfc_main$17;exports.WKpiGrid=_._sfc_main$18;exports.WMapSelect=_._sfc_main$19;exports.WMarkdownEditor=_._sfc_main$20;exports.WMarkdownToc=_._sfc_main$21;exports.WMarkdownView=_._sfc_main$22;exports.WMoneyInput=_._sfc_main$23;exports.WPageHeader=_._sfc_main$24;exports.WProgressFlow=_._sfc_main$25;exports.WSectionHeader=_._sfc_main$26;exports.WStatusTag=_._sfc_main$27;exports.WStepFlow=_._sfc_main$28;exports.WStepSection=_._sfc_main$29;exports.WTabBar=_._sfc_main$30;exports.WTransferList=_._sfc_main$31;exports.WTreeSelect=_._sfc_main$32;
|
|
2
2
|
//# sourceMappingURL=components.cjs.map
|
package/dist/components.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as s, a as r, b as W, c as o, d as t, e as d, f as i, g as n, h as l, i as p, j as C, k as c, l as u, m as S, n as m, W as w, o as F, p as g, q as b, r as k, s as T, t as D, u as M, v as f, w as B, x as E, y as K, z as y, A, B as H, C as I, D as P, E as R, F as h } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as s, a as r, b as W, c as o, d as t, e as d, f as i, g as n, h as l, i as p, j as C, k as c, l as u, m as S, n as m, W as w, o as F, p as g, q as b, r as k, s as T, t as D, u as M, v as f, w as B, x as E, y as K, z as y, A, B as H, C as I, D as P, E as R, F as h } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-Cx3AJma_.js";
|
|
2
2
|
export {
|
|
3
3
|
s as WActionBar,
|
|
4
4
|
r as WAutoCompleteFK,
|
package/dist/composables.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./useApi-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./useApi-CPt3Tj4n.cjs"),e=require("./useFormKeyboardNav-D4Ow3k4Y.cjs");function s(u){return u}exports.useApi=r.useApi;exports.useCrudManager=r.useCrudManager;exports.useSubviewCrud=r.useSubviewCrud;exports.extractApiError=e.extractApiError;exports.useApiError=e.useApiError;exports.useAppConfirm=e.useAppConfirm;exports.useAppToast=e.useAppToast;exports.useDateInput=e.useDateInput;exports.useFormKeyboardNav=e.useFormKeyboardNav;exports.useFormatters=e.useFormatters;exports.defineCrudConfig=s;
|
|
2
2
|
//# sourceMappingURL=composables.cjs.map
|
package/dist/composables.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./plugin-D1YvyKXX.cjs"),t=require("./WKanbanBoard.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./plugin-D1YvyKXX.cjs"),t=require("./WKanbanBoard.vue_vue_type_script_setup_true_lang-DX-6iLgb.cjs"),W=require("./useApi-CPt3Tj4n.cjs"),m=require("./useFormKeyboardNav-D4Ow3k4Y.cjs"),w=require("./types.cjs");function D(e,a,r){const n=e;return Array.isArray(n.results)?{data:n.results,page:n.page??a,page_size:n.page_size??r,rows:n.count??0,extras:n.extras??{}}:Array.isArray(n.data)?{data:n.data,page:n.page??a,page_size:n.page_size??r,rows:n.rows??0,extras:n.extras??{}}:{data:Array.isArray(e)?e:[],page:a,page_size:r,rows:Array.isArray(e)?e.length:0,extras:{}}}function y(e){return{async list(a,r={}){const n=await e.get(a,{params:r});return D(n.data,Number(r.page??1),Number(r.page_size??20))},async get(a,r,n){return{data:(await e.get(`${a}${r}/`,n)).data}},async create(a,r,n){return{data:(await e.post(a,r,n)).data}},async update(a,r,n,i){return{data:(await e.patch(`${a}${r}/`,n,i)).data}},async delete(a,r){await e.delete(`${a}${r}/`)}}}const F={install(e,a){if(!(a!=null&&a.axios)&&!(a!=null&&a.dataProvider))throw new Error('[wPrimeVueComponents] Informe "axios" ou "dataProvider" ao registrar o WPrimeVuePlugin.');const r=a.dataProvider??y(a.axios),n={axios:a.axios,dataProvider:r,defaultPageSize:a.defaultPageSize??20,dateFormat:a.dateFormat??"DD/MM/YYYY",dateTimeFormat:a.dateTimeFormat??"DD/MM/YYYY HH:mm",locale:a.locale??"pt-BR",currency:a.currency??"BRL"};a.axios&&e.provide(_.W_AXIOS_KEY,a.axios),e.provide(_.W_DATA_PROVIDER_KEY,r),e.provide(_.W_CONFIG_KEY,n),a.registerComponents!==!1&&(e.component("WCrudView",t._sfc_main$6),e.component("WCrudFormDialog",t._sfc_main$4),e.component("WCrudColumnRenderer",t._sfc_main$3),e.component("WAutoCompleteFK",t._sfc_main$1),e.component("WMoneyInput",t._sfc_main$23),e.component("WTransferList",t._sfc_main$31),e.component("WTreeSelect",t._sfc_main$32))}};function S(e){return e.split("?")[0].replace(/^\/+|\/+$/g,"").replace(/^api\/v\d+\//,"")}function P(e){return typeof e=="string"?{table:e}:e}function C(e,a=400){return{response:{status:a,data:{detail:e}},message:e}}function A(e){if(e instanceof FormData)throw C("SupabaseDataProvider nao envia FormData diretamente. Faça upload do arquivo no Storage e envie a URL/caminho no payload.");return e}function p(e){throw{response:{data:{detail:(e==null?void 0:e.message)??"Erro ao consultar Supabase",code:e==null?void 0:e.code,details:e==null?void 0:e.details,hint:e==null?void 0:e.hint}},message:(e==null?void 0:e.message)??"Erro ao consultar Supabase"}}function g(e,a){var i,s;const r=S(e),n=(i=a.resources)==null?void 0:i[r];if(n)return P(n);if((s=a.allowedTables)!=null&&s.includes(r))return{table:r};throw C(`Recurso Supabase nao registrado para o endpoint "${e}".`,404)}function v(e,a,r){const n=new Set(["page","page_size","search","ordering"]),i={...r.defaultFilters,...a};for(const[s,o]of Object.entries(i))n.has(s)||o===null||o===void 0||o===""||(e=e.eq(s,o));return e}function E(e,a,r){if(typeof a!="string"||!a.trim()||!(r!=null&&r.length))return e;const n=a.trim().replace(/,/g,"\\,"),i=r.map(s=>`${s}.ilike.%${n}%`).join(",");return e.or(i)}function b(e,a){const r=typeof e=="string"&&e?e:a;return r?{field:r.startsWith("-")?r.slice(1):r,ascending:!r.startsWith("-")}:null}function T(e,a){return e?a.mapListItem?e.map(r=>{var n;return(n=a.mapListItem)==null?void 0:n.call(a,r)}):e:[]}function R(e){const a=e.defaultSelect??"*";return{async list(r,n={}){var $;const i=g(r,e),s=Math.max(Number(n.page??1),1),o=Math.max(Number(n.page_size??20),1),c=(s-1)*o,d=c+o-1;let u=e.client.from(i.table).select(i.select??a,{count:"exact"});u=v(u,n,i),u=E(u,n.search,i.searchFields);const l=b(n.ordering,i.defaultOrdering);l&&(u=u.order(l.field,{ascending:l.ascending}));const f=await u.range(c,d);return f.error&&p(f.error),{data:T(f.data,i),page:s,page_size:o,rows:f.count??(($=f.data)==null?void 0:$.length)??0,extras:{}}},async get(r,n,i){const s=g(r,e),o=s.pk??"id",c=await e.client.from(s.table).select(s.select??a).eq(o,n).single();return c.error&&p(c.error),{data:c.data}},async create(r,n,i){const s=g(r,e),o=A(n),c=s.mapPayload?s.mapPayload(o,"create"):o,d=await e.client.from(s.table).insert(c).select(s.select??a).single();return d.error&&p(d.error),{data:d.data}},async update(r,n,i,s){const o=g(r,e),c=o.pk??"id",d=A(i),u=o.mapPayload?o.mapPayload(d,"update"):d,l=await e.client.from(o.table).update(u).eq(c,n).select(o.select??a).single();return l.error&&p(l.error),{data:l.data}},async delete(r,n){const i=g(r,e),s=i.pk??"id",o=i.softDelete===!0?{is_active:!1}:typeof i.softDelete=="object"?i.softDelete:null,c=o?await e.client.from(i.table).update(o).eq(s,n):await e.client.from(i.table).delete().eq(s,n);c.error&&p(c.error)}}}exports.W_AXIOS_KEY=_.W_AXIOS_KEY;exports.W_CONFIG_KEY=_.W_CONFIG_KEY;exports.W_DATA_PROVIDER_KEY=_.W_DATA_PROVIDER_KEY;exports.WActionBar=t._sfc_main;exports.WAutoCompleteFK=t._sfc_main$1;exports.WCheckList=t._sfc_main$2;exports.WCrudColumnRenderer=t._sfc_main$3;exports.WCrudFormDialog=t._sfc_main$4;exports.WCrudSubview=t._sfc_main$5;exports.WCrudView=t._sfc_main$6;exports.WDatePicker=t._sfc_main$7;exports.WDateRange=t._sfc_main$8;exports.WDetailHeader=t._sfc_main$9;exports.WEditableTable=t._sfc_main$10;exports.WEmptyState=t._sfc_main$11;exports.WFileUpload=t._sfc_main$12;exports.WFormRenderer=t._sfc_main$13;exports.WFormSection=t._sfc_main$14;exports.WImageCropper=t.WImageCropper;exports.WInfoCard=t._sfc_main$15;exports.WKanbanBoard=t._sfc_main$16;exports.WKpiCard=t._sfc_main$17;exports.WKpiGrid=t._sfc_main$18;exports.WMapSelect=t._sfc_main$19;exports.WMarkdownEditor=t._sfc_main$20;exports.WMarkdownToc=t._sfc_main$21;exports.WMarkdownView=t._sfc_main$22;exports.WMoneyInput=t._sfc_main$23;exports.WPageHeader=t._sfc_main$24;exports.WProgressFlow=t._sfc_main$25;exports.WSectionHeader=t._sfc_main$26;exports.WStatusTag=t._sfc_main$27;exports.WStepFlow=t._sfc_main$28;exports.WStepSection=t._sfc_main$29;exports.WTabBar=t._sfc_main$30;exports.WTransferList=t._sfc_main$31;exports.WTreeSelect=t._sfc_main$32;exports.W_STEP_FLOW_KEY=t.W_STEP_FLOW_KEY;exports.downloadCsv=t.downloadCsv;exports.mapApiFieldToColumnDef=t.mapApiFieldToColumnDef;exports.mapApiFieldToFieldDef=t.mapApiFieldToFieldDef;exports.mapApiFieldsToColumnDefs=t.mapApiFieldsToColumnDefs;exports.mapApiFieldsToFieldDefs=t.mapApiFieldsToFieldDefs;exports.toCsv=t.toCsv;exports.useApi=W.useApi;exports.useCrudManager=W.useCrudManager;exports.useSubviewCrud=W.useSubviewCrud;exports.extractApiError=m.extractApiError;exports.useApiError=m.useApiError;exports.useAppConfirm=m.useAppConfirm;exports.useAppToast=m.useAppToast;exports.useDateInput=m.useDateInput;exports.useFormatters=m.useFormatters;exports.DEFAULT_CRUD_LABELS=w.DEFAULT_CRUD_LABELS;exports.WPrimeVuePlugin=F;exports.createAxiosDataProvider=y;exports.createSupabaseDataProvider=R;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as y, W as _, a as w } from "./plugin-BKa0eSEM.js";
|
|
2
|
-
import { f as C, d as S, c as b, a as A, w as P, E as v, F } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { _ as B, b as O, e as V, g as H, h as N, i as q, j, k as U, l as G, m as J, n as X, W as Q, o as Z, p as ee, q as ae, r as te, s as re, t as se, u as ne, v as oe, x as ie, y as ce, z as de, A as le, B as ue, C as fe, D as me, G as pe, H as ge, I as We, J as ye, K as _e, L as we, M as Ce } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { u as be, a as Ae, b as Pe } from "./useApi-
|
|
2
|
+
import { f as C, d as S, c as b, a as A, w as P, E as v, F } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-Cx3AJma_.js";
|
|
3
|
+
import { _ as B, b as O, e as V, g as H, h as N, i as q, j, k as U, l as G, m as J, n as X, W as Q, o as Z, p as ee, q as ae, r as te, s as re, t as se, u as ne, v as oe, x as ie, y as ce, z as de, A as le, B as ue, C as fe, D as me, G as pe, H as ge, I as We, J as ye, K as _e, L as we, M as Ce } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-Cx3AJma_.js";
|
|
4
|
+
import { u as be, a as Ae, b as Pe } from "./useApi-BM5JpPDe.js";
|
|
5
5
|
import { e as Fe, u as De, a as xe, b as Ee, c as Te, f as he } from "./useFormKeyboardNav-D4Irq5RE.js";
|
|
6
6
|
import { DEFAULT_CRUD_LABELS as Re } from "./types.js";
|
|
7
7
|
function D(e, a, t) {
|