@wgalleti/primevue-components 0.20.0 → 0.22.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-ByBa9LKO.cjs +28 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-ByBa9LKO.cjs.map +1 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-rd2SGufX.js +6873 -0
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-rd2SGufX.js.map +1 -0
- package/dist/components/charts/WChart.vue.d.ts +45 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +31 -30
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +82 -78
- package/dist/primevue-components.css +1 -1
- package/dist/types/editableTable.d.ts +4 -0
- package/dist/utils/chart.d.ts +41 -0
- package/package.json +2 -1
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-B5VP8lO5.cjs +0 -28
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-B5VP8lO5.cjs.map +0 -1
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-BZaHvyom.js +0 -6650
- package/dist/WKanbanBoard.vue_vue_type_script_setup_true_lang-BZaHvyom.js.map +0 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { WChartOption } from '../../utils/chart';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
/** Option do ECharts — série, eixos, tooltip etc. */
|
|
4
|
+
option: WChartOption;
|
|
5
|
+
/** Mostra o overlay de carregamento do ECharts (cores do DS). */
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
/** true quando a consulta voltou vazia — mostra o estado vazio no lugar do gráfico. */
|
|
8
|
+
empty?: boolean;
|
|
9
|
+
emptyMessage?: string;
|
|
10
|
+
/** svg para impressão/PDF; canvas no dia a dia. */
|
|
11
|
+
renderer?: 'canvas' | 'svg';
|
|
12
|
+
/** Modo impressão: tema monocromático + SVG + sem animação (PDF Gotenberg). */
|
|
13
|
+
print?: boolean;
|
|
14
|
+
/** Altura CSS do gráfico (default: token `--chart-h`, senão 18rem). */
|
|
15
|
+
height?: string;
|
|
16
|
+
};
|
|
17
|
+
declare function __VLS_template(): {
|
|
18
|
+
attrs: Partial<{}>;
|
|
19
|
+
slots: {
|
|
20
|
+
empty?(_: {}): any;
|
|
21
|
+
unavailable?(_: {}): any;
|
|
22
|
+
};
|
|
23
|
+
refs: {
|
|
24
|
+
container: HTMLDivElement;
|
|
25
|
+
};
|
|
26
|
+
rootEl: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
30
|
+
height: string;
|
|
31
|
+
empty: boolean;
|
|
32
|
+
loading: boolean;
|
|
33
|
+
print: boolean;
|
|
34
|
+
emptyMessage: string;
|
|
35
|
+
renderer: "canvas" | "svg";
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
37
|
+
container: HTMLDivElement;
|
|
38
|
+
}, HTMLDivElement>;
|
|
39
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
@@ -12,6 +12,7 @@ export { default as WFileUpload } from './form/WFileUpload.vue';
|
|
|
12
12
|
export { default as WMoneyInput } from './form/WMoneyInput.vue';
|
|
13
13
|
export { default as WTransferList } from './form/WTransferList.vue';
|
|
14
14
|
export { default as WTreeSelect } from './form/WTreeSelect.vue';
|
|
15
|
+
export { default as WChart } from './charts/WChart.vue';
|
|
15
16
|
export { default as WStatusTag } from './ui/WStatusTag.vue';
|
|
16
17
|
export { default as WPageHeader } from './ui/WPageHeader.vue';
|
|
17
18
|
export { default as WEmptyState } from './ui/WEmptyState.vue';
|
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-ByBa9LKO.cjs");exports.WActionBar=_._sfc_main;exports.WAutoCompleteFK=_._sfc_main$1;exports.WChart=_.WChart;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.WDialog=_._sfc_main$10;exports.WEditableTable=_._sfc_main$11;exports.WEmptyState=_._sfc_main$12;exports.WFileUpload=_._sfc_main$13;exports.WFormRenderer=_._sfc_main$14;exports.WFormSection=_._sfc_main$15;exports.WImageCropper=_.WImageCropper;exports.WInfoCard=_._sfc_main$16;exports.WKanbanBoard=_._sfc_main$17;exports.WKpiCard=_._sfc_main$18;exports.WKpiGrid=_._sfc_main$19;exports.WMapSelect=_._sfc_main$20;exports.WMarkdownEditor=_._sfc_main$21;exports.WMarkdownToc=_._sfc_main$22;exports.WMarkdownView=_._sfc_main$23;exports.WMoneyInput=_._sfc_main$24;exports.WPageHeader=_._sfc_main$25;exports.WProgressFlow=_._sfc_main$26;exports.WSectionHeader=_._sfc_main$27;exports.WStatusTag=_._sfc_main$28;exports.WStepFlow=_._sfc_main$29;exports.WStepSection=_._sfc_main$30;exports.WTabBar=_._sfc_main$31;exports.WTabNav=_._sfc_main$32;exports.WTabViewport=_._sfc_main$33;exports.WTransferList=_._sfc_main$34;exports.WTreeSelect=_._sfc_main$35;
|
|
2
2
|
//# sourceMappingURL=components.cjs.map
|
package/dist/components.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { _ as s, a as W,
|
|
1
|
+
import { _ as s, a as W, W as r, b as o, c as t, d as i, e as d, f as n, g as l, h as p, i as C, j as c, k as u, l as w, m as S, n as m, o as b, p as g, q as F, r as T, s as k, t as D, u as M, v as f, w as B, x as E, y as H, z as I, A as K, B as h, C as v, D as y, E as A, F as P, G as R, H as V, I as x, J as G } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-rd2SGufX.js";
|
|
2
2
|
export {
|
|
3
3
|
s as WActionBar,
|
|
4
4
|
W as WAutoCompleteFK,
|
|
5
|
-
r as
|
|
6
|
-
o as
|
|
7
|
-
t as
|
|
8
|
-
i as
|
|
9
|
-
d as
|
|
10
|
-
n as
|
|
11
|
-
l as
|
|
12
|
-
p as
|
|
13
|
-
C as
|
|
14
|
-
c as
|
|
15
|
-
u as
|
|
16
|
-
w as
|
|
17
|
-
S as
|
|
18
|
-
m as
|
|
19
|
-
b as
|
|
20
|
-
g as
|
|
21
|
-
F as
|
|
22
|
-
T as
|
|
23
|
-
k as
|
|
24
|
-
D as
|
|
25
|
-
M as
|
|
26
|
-
f as
|
|
27
|
-
B as
|
|
28
|
-
E as
|
|
29
|
-
H as
|
|
30
|
-
I as
|
|
31
|
-
K as
|
|
5
|
+
r as WChart,
|
|
6
|
+
o as WCheckList,
|
|
7
|
+
t as WCrudColumnRenderer,
|
|
8
|
+
i as WCrudFormDialog,
|
|
9
|
+
d as WCrudSubview,
|
|
10
|
+
n as WCrudView,
|
|
11
|
+
l as WDatePicker,
|
|
12
|
+
p as WDateRange,
|
|
13
|
+
C as WDetailHeader,
|
|
14
|
+
c as WDialog,
|
|
15
|
+
u as WEditableTable,
|
|
16
|
+
w as WEmptyState,
|
|
17
|
+
S as WFileUpload,
|
|
18
|
+
m as WFormRenderer,
|
|
19
|
+
b as WFormSection,
|
|
20
|
+
g as WImageCropper,
|
|
21
|
+
F as WInfoCard,
|
|
22
|
+
T as WKanbanBoard,
|
|
23
|
+
k as WKpiCard,
|
|
24
|
+
D as WKpiGrid,
|
|
25
|
+
M as WMapSelect,
|
|
26
|
+
f as WMarkdownEditor,
|
|
27
|
+
B as WMarkdownToc,
|
|
28
|
+
E as WMarkdownView,
|
|
29
|
+
H as WMoneyInput,
|
|
30
|
+
I as WPageHeader,
|
|
31
|
+
K as WProgressFlow,
|
|
32
|
+
h as WSectionHeader,
|
|
32
33
|
v as WStatusTag,
|
|
33
34
|
y as WStepFlow,
|
|
34
35
|
A as WStepSection,
|
|
35
36
|
P as WTabBar,
|
|
36
37
|
R as WTabNav,
|
|
37
38
|
V as WTabViewport,
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
x as WTransferList,
|
|
40
|
+
G as WTreeSelect
|
|
40
41
|
};
|
|
41
42
|
//# sourceMappingURL=components.js.map
|
package/dist/index.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 l=require("./plugin-D2IZHyBm.cjs"),a=require("./WKanbanBoard.vue_vue_type_script_setup_true_lang-ByBa9LKO.cjs"),W=require("./useRouteTabs-VGx93R83.cjs"),m=require("./useFormKeyboardNav-BgBAe0C7.cjs"),C=require("./labels-pNskxXcl.cjs");function b(e,t,n){const r=e;return Array.isArray(r.results)?{data:r.results,page:r.page??t,page_size:r.page_size??n,rows:r.count??0,extras:r.extras??{}}:Array.isArray(r.data)?{data:r.data,page:r.page??t,page_size:r.page_size??n,rows:r.rows??0,extras:r.extras??{}}:{data:Array.isArray(e)?e:[],page:t,page_size:n,rows:Array.isArray(e)?e.length:0,extras:{}}}function T(e){return{async list(t,n={}){const r=await e.get(t,{params:n});return b(r.data,Number(n.page??1),Number(n.page_size??20))},async get(t,n,r){return{data:(await e.get(`${t}${n}/`,r)).data}},async create(t,n,r){return{data:(await e.post(t,n,r)).data}},async update(t,n,r,i){return{data:(await e.patch(`${t}${n}/`,r,i)).data}},async delete(t,n){await e.delete(`${t}${n}/`)}}}const w={install(e,t){if(!(t!=null&&t.axios)&&!(t!=null&&t.dataProvider))throw new Error('[wPrimeVueComponents] Informe "axios" ou "dataProvider" ao registrar o WPrimeVuePlugin.');const n=t.dataProvider??T(t.axios),r={axios:t.axios,dataProvider:n,defaultPageSize:t.defaultPageSize??20,dateFormat:t.dateFormat??"DD/MM/YYYY",dateTimeFormat:t.dateTimeFormat??"DD/MM/YYYY HH:mm",locale:t.locale??"pt-BR",currency:t.currency??"BRL"};t.axios&&e.provide(l.W_AXIOS_KEY,t.axios),e.provide(l.W_DATA_PROVIDER_KEY,n),e.provide(l.W_CONFIG_KEY,r),t.registerComponents!==!1&&(e.component("WCrudView",a._sfc_main$6),e.component("WCrudFormDialog",a._sfc_main$4),e.component("WCrudColumnRenderer",a._sfc_main$3),e.component("WAutoCompleteFK",a._sfc_main$1),e.component("WMoneyInput",a._sfc_main$24),e.component("WTransferList",a._sfc_main$34),e.component("WTreeSelect",a._sfc_main$35))}};function S(e){return e.split("?")[0].replace(/^\/+|\/+$/g,"").replace(/^api\/v\d+\//,"")}function D(e){return typeof e=="string"?{table:e}:e}function y(e,t=400){return{response:{status:t,data:{detail:e}},message:e}}function A(e){if(e instanceof FormData)throw y("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,t){var i,s;const n=S(e),r=(i=t.resources)==null?void 0:i[n];if(r)return D(r);if((s=t.allowedTables)!=null&&s.includes(n))return{table:n};throw y(`Recurso Supabase nao registrado para o endpoint "${e}".`,404)}function P(e,t,n){const r=new Set(["page","page_size","search","ordering"]),i={...n.defaultFilters,...t};for(const[s,o]of Object.entries(i))r.has(s)||o===null||o===void 0||o===""||(e=e.eq(s,o));return e}function F(e,t,n){if(typeof t!="string"||!t.trim()||!(n!=null&&n.length))return e;const r=t.trim().replace(/,/g,"\\,"),i=n.map(s=>`${s}.ilike.%${r}%`).join(",");return e.or(i)}function v(e,t){const n=typeof e=="string"&&e?e:t;return n?{field:n.startsWith("-")?n.slice(1):n,ascending:!n.startsWith("-")}:null}function E(e,t){return e?t.mapListItem?e.map(n=>{var r;return(r=t.mapListItem)==null?void 0:r.call(t,n)}):e:[]}function h(e){const t=e.defaultSelect??"*";return{async list(n,r={}){var $;const i=g(n,e),s=Math.max(Number(r.page??1),1),o=Math.max(Number(r.page_size??20),1),c=(s-1)*o,d=c+o-1;let u=e.client.from(i.table).select(i.select??t,{count:"exact"});u=P(u,r,i),u=F(u,r.search,i.searchFields);const _=v(r.ordering,i.defaultOrdering);_&&(u=u.order(_.field,{ascending:_.ascending}));const f=await u.range(c,d);return f.error&&p(f.error),{data:E(f.data,i),page:s,page_size:o,rows:f.count??(($=f.data)==null?void 0:$.length)??0,extras:{}}},async get(n,r,i){const s=g(n,e),o=s.pk??"id",c=await e.client.from(s.table).select(s.select??t).eq(o,r).single();return c.error&&p(c.error),{data:c.data}},async create(n,r,i){const s=g(n,e),o=A(r),c=s.mapPayload?s.mapPayload(o,"create"):o,d=await e.client.from(s.table).insert(c).select(s.select??t).single();return d.error&&p(d.error),{data:d.data}},async update(n,r,i,s){const o=g(n,e),c=o.pk??"id",d=A(i),u=o.mapPayload?o.mapPayload(d,"update"):d,_=await e.client.from(o.table).update(u).eq(c,r).select(o.select??t).single();return _.error&&p(_.error),{data:_.data}},async delete(n,r){const i=g(n,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,r):await e.client.from(i.table).delete().eq(s,r);c.error&&p(c.error)}}}exports.W_AXIOS_KEY=l.W_AXIOS_KEY;exports.W_CONFIG_KEY=l.W_CONFIG_KEY;exports.W_DATA_PROVIDER_KEY=l.W_DATA_PROVIDER_KEY;exports.W_TAB_HOST_KEY=l.W_TAB_HOST_KEY;exports.useTabHost=l.useTabHost;exports.WActionBar=a._sfc_main;exports.WAutoCompleteFK=a._sfc_main$1;exports.WChart=a.WChart;exports.WCheckList=a._sfc_main$2;exports.WCrudColumnRenderer=a._sfc_main$3;exports.WCrudFormDialog=a._sfc_main$4;exports.WCrudSubview=a._sfc_main$5;exports.WCrudView=a._sfc_main$6;exports.WDatePicker=a._sfc_main$7;exports.WDateRange=a._sfc_main$8;exports.WDetailHeader=a._sfc_main$9;exports.WDialog=a._sfc_main$10;exports.WEditableTable=a._sfc_main$11;exports.WEmptyState=a._sfc_main$12;exports.WFileUpload=a._sfc_main$13;exports.WFormRenderer=a._sfc_main$14;exports.WFormSection=a._sfc_main$15;exports.WImageCropper=a.WImageCropper;exports.WInfoCard=a._sfc_main$16;exports.WKanbanBoard=a._sfc_main$17;exports.WKpiCard=a._sfc_main$18;exports.WKpiGrid=a._sfc_main$19;exports.WMapSelect=a._sfc_main$20;exports.WMarkdownEditor=a._sfc_main$21;exports.WMarkdownToc=a._sfc_main$22;exports.WMarkdownView=a._sfc_main$23;exports.WMoneyInput=a._sfc_main$24;exports.WPageHeader=a._sfc_main$25;exports.WProgressFlow=a._sfc_main$26;exports.WSectionHeader=a._sfc_main$27;exports.WStatusTag=a._sfc_main$28;exports.WStepFlow=a._sfc_main$29;exports.WStepSection=a._sfc_main$30;exports.WTabBar=a._sfc_main$31;exports.WTabNav=a._sfc_main$32;exports.WTabViewport=a._sfc_main$33;exports.WTransferList=a._sfc_main$34;exports.WTreeSelect=a._sfc_main$35;exports.W_STEP_FLOW_KEY=a.W_STEP_FLOW_KEY;exports.buildChartTheme=a.buildChartTheme;exports.buildPrintTheme=a.buildPrintTheme;exports.donutOption=a.donutOption;exports.downloadCsv=a.downloadCsv;exports.mapApiFieldToColumnDef=a.mapApiFieldToColumnDef;exports.mapApiFieldToFieldDef=a.mapApiFieldToFieldDef;exports.mapApiFieldsToColumnDefs=a.mapApiFieldsToColumnDefs;exports.mapApiFieldsToFieldDefs=a.mapApiFieldsToFieldDefs;exports.toCsv=a.toCsv;exports.useApi=W.useApi;exports.useCrudManager=W.useCrudManager;exports.useRouteTabs=W.useRouteTabs;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=C.DEFAULT_CRUD_LABELS;exports.WPrimeVuePlugin=w;exports.createAxiosDataProvider=T;exports.createSupabaseDataProvider=h;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { WPrimeVuePlugin } from './plugin';
|
|
2
|
-
export { WCrudView, WCrudFormDialog, WCrudColumnRenderer, WEditableTable, WCrudSubview, WAutoCompleteFK, WFormRenderer, WDatePicker, WDateRange, WFileUpload, WImageCropper, WMoneyInput, WTransferList, WTreeSelect, WStatusTag, WPageHeader, WDetailHeader, WEmptyState, WInfoCard, WKpiCard, WKpiGrid, WSectionHeader, WFormSection, WActionBar, WProgressFlow, WStepFlow, WStepSection, WCheckList, WMapSelect, WMarkdownView, WMarkdownEditor, WMarkdownToc, WDialog, WTabBar, WTabNav, WTabViewport, WKanbanBoard, } from './components';
|
|
2
|
+
export { WCrudView, WCrudFormDialog, WCrudColumnRenderer, WEditableTable, WCrudSubview, WAutoCompleteFK, WFormRenderer, WDatePicker, WDateRange, WFileUpload, WImageCropper, WMoneyInput, WTransferList, WTreeSelect, WChart, WStatusTag, WPageHeader, WDetailHeader, WEmptyState, WInfoCard, WKpiCard, WKpiGrid, WSectionHeader, WFormSection, WActionBar, WProgressFlow, WStepFlow, WStepSection, WCheckList, WMapSelect, WMarkdownView, WMarkdownEditor, WMarkdownToc, WDialog, WTabBar, WTabNav, WTabViewport, WKanbanBoard, } from './components';
|
|
3
3
|
export { useCrudManager, useSubviewCrud, useApi, useAppToast, useAppConfirm, useApiError, extractApiError, useFormatters, useDateInput, useRouteTabs, } from './composables';
|
|
4
4
|
export type { DateValueFormat } from './composables';
|
|
5
5
|
export { createAxiosDataProvider, createSupabaseDataProvider } from './data-providers';
|
|
@@ -12,6 +12,8 @@ export type { CreateSupabaseDataProviderOptions, SupabaseDataProviderClient, Sup
|
|
|
12
12
|
export { DEFAULT_CRUD_LABELS, W_AXIOS_KEY, W_CONFIG_KEY, W_DATA_PROVIDER_KEY, W_TAB_HOST_KEY, useTabHost, } from './types';
|
|
13
13
|
export type { ApiFieldMeta } from './utils/fieldMapper';
|
|
14
14
|
export { mapApiFieldToFieldDef, mapApiFieldsToFieldDefs, mapApiFieldToColumnDef, mapApiFieldsToColumnDefs, } from './utils/fieldMapper';
|
|
15
|
+
export type { ChartTheme, DonutOptionInput, WChartOption } from './utils/chart';
|
|
16
|
+
export { buildChartTheme, buildPrintTheme, donutOption } from './utils/chart';
|
|
15
17
|
export type { ToCsvOptions } from './utils/csv';
|
|
16
18
|
export { toCsv, downloadCsv } from './utils/csv';
|
|
17
19
|
export type { TreeSelectId, TreeSelectOption, TreeSelectNode, TreeSelectionKeys, TreeSelectionState, } from './utils/treeSelect';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { W as _, b as y, a as w } from "./plugin-CIBvOgwG.js";
|
|
2
2
|
import { c as O, u as B } from "./plugin-CIBvOgwG.js";
|
|
3
|
-
import { f as b, d as
|
|
4
|
-
import { _ as N,
|
|
5
|
-
import { u as
|
|
6
|
-
import { e as
|
|
7
|
-
import { D as
|
|
8
|
-
function
|
|
3
|
+
import { f as b, d as C, c as S, a as P, y as A, I as T, J as v } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-rd2SGufX.js";
|
|
4
|
+
import { _ as N, W as V, b as q, e as j, g as U, h as G, i as J, j as Q, k as X, l as Z, m as ee, n as ae, o as te, p as se, q as re, r as ne, s as oe, t as ie, u as ce, v as ue, w as de, x as le, z as me, A as fe, B as pe, C as ge, D as We, E as _e, F as ye, G as we, H as be, K as Ce, L as Se, M as Pe, N as Ae, O as Te, P as ve, Q as De, R as Fe, S as xe, T as Ee } from "./WKanbanBoard.vue_vue_type_script_setup_true_lang-rd2SGufX.js";
|
|
5
|
+
import { u as Re, a as $e, b as ze, c as Le } from "./useRouteTabs-CSo1j_ji.js";
|
|
6
|
+
import { e as Ye, u as Ie, a as Ke, b as ke, c as Oe, f as Be } from "./useFormKeyboardNav-BrKZrHq9.js";
|
|
7
|
+
import { D as Ne } from "./labels-B28P8JNB.js";
|
|
8
|
+
function D(e, a, t) {
|
|
9
9
|
const s = e;
|
|
10
10
|
return Array.isArray(s.results) ? {
|
|
11
11
|
data: s.results,
|
|
@@ -27,11 +27,11 @@ function F(e, a, t) {
|
|
|
27
27
|
extras: {}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function F(e) {
|
|
31
31
|
return {
|
|
32
32
|
async list(a, t = {}) {
|
|
33
33
|
const s = await e.get(a, { params: t });
|
|
34
|
-
return
|
|
34
|
+
return D(
|
|
35
35
|
s.data,
|
|
36
36
|
Number(t.page ?? 1),
|
|
37
37
|
Number(t.page_size ?? 20)
|
|
@@ -57,7 +57,7 @@ const Y = {
|
|
|
57
57
|
throw new Error(
|
|
58
58
|
'[wPrimeVueComponents] Informe "axios" ou "dataProvider" ao registrar o WPrimeVuePlugin.'
|
|
59
59
|
);
|
|
60
|
-
const t = a.dataProvider ??
|
|
60
|
+
const t = a.dataProvider ?? F(a.axios), s = {
|
|
61
61
|
axios: a.axios,
|
|
62
62
|
dataProvider: t,
|
|
63
63
|
defaultPageSize: a.defaultPageSize ?? 20,
|
|
@@ -66,7 +66,7 @@ const Y = {
|
|
|
66
66
|
locale: a.locale ?? "pt-BR",
|
|
67
67
|
currency: a.currency ?? "BRL"
|
|
68
68
|
};
|
|
69
|
-
a.axios && e.provide(_, a.axios), e.provide(y, t), e.provide(w, s), a.registerComponents !== !1 && (e.component("WCrudView", b), e.component("WCrudFormDialog",
|
|
69
|
+
a.axios && e.provide(_, a.axios), e.provide(y, t), e.provide(w, s), a.registerComponents !== !1 && (e.component("WCrudView", b), e.component("WCrudFormDialog", C), e.component("WCrudColumnRenderer", S), e.component("WAutoCompleteFK", P), e.component("WMoneyInput", A), e.component("WTransferList", T), e.component("WTreeSelect", v));
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
function x(e) {
|
|
@@ -91,7 +91,7 @@ function g(e) {
|
|
|
91
91
|
);
|
|
92
92
|
return e;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function m(e) {
|
|
95
95
|
throw {
|
|
96
96
|
response: {
|
|
97
97
|
data: {
|
|
@@ -104,7 +104,7 @@ function f(e) {
|
|
|
104
104
|
message: (e == null ? void 0 : e.message) ?? "Erro ao consultar Supabase"
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function f(e, a) {
|
|
108
108
|
var r, n;
|
|
109
109
|
const t = x(e), s = (r = a.resources) == null ? void 0 : r[t];
|
|
110
110
|
if (s)
|
|
@@ -143,101 +143,105 @@ function I(e) {
|
|
|
143
143
|
return {
|
|
144
144
|
async list(t, s = {}) {
|
|
145
145
|
var p;
|
|
146
|
-
const r =
|
|
146
|
+
const r = f(t, e), n = Math.max(Number(s.page ?? 1), 1), o = Math.max(Number(s.page_size ?? 20), 1), i = (n - 1) * o, u = i + o - 1;
|
|
147
147
|
let c = e.client.from(r.table).select(r.select ?? a, { count: "exact" });
|
|
148
148
|
c = h(c, s, r), c = R(c, s.search, r.searchFields);
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
return
|
|
153
|
-
data: z(
|
|
149
|
+
const d = $(s.ordering, r.defaultOrdering);
|
|
150
|
+
d && (c = c.order(d.field, { ascending: d.ascending }));
|
|
151
|
+
const l = await c.range(i, u);
|
|
152
|
+
return l.error && m(l.error), {
|
|
153
|
+
data: z(l.data, r),
|
|
154
154
|
page: n,
|
|
155
155
|
page_size: o,
|
|
156
|
-
rows:
|
|
156
|
+
rows: l.count ?? ((p = l.data) == null ? void 0 : p.length) ?? 0,
|
|
157
157
|
extras: {}
|
|
158
158
|
};
|
|
159
159
|
},
|
|
160
160
|
async get(t, s, r) {
|
|
161
|
-
const n =
|
|
162
|
-
return i.error &&
|
|
161
|
+
const n = f(t, e), o = n.pk ?? "id", i = await e.client.from(n.table).select(n.select ?? a).eq(o, s).single();
|
|
162
|
+
return i.error && m(i.error), { data: i.data };
|
|
163
163
|
},
|
|
164
164
|
async create(t, s, r) {
|
|
165
|
-
const n =
|
|
166
|
-
return u.error &&
|
|
165
|
+
const n = f(t, e), o = g(s), i = n.mapPayload ? n.mapPayload(o, "create") : o, u = await e.client.from(n.table).insert(i).select(n.select ?? a).single();
|
|
166
|
+
return u.error && m(u.error), { data: u.data };
|
|
167
167
|
},
|
|
168
168
|
async update(t, s, r, n) {
|
|
169
|
-
const o =
|
|
170
|
-
return
|
|
169
|
+
const o = f(t, e), i = o.pk ?? "id", u = g(r), c = o.mapPayload ? o.mapPayload(u, "update") : u, d = await e.client.from(o.table).update(c).eq(i, s).select(o.select ?? a).single();
|
|
170
|
+
return d.error && m(d.error), { data: d.data };
|
|
171
171
|
},
|
|
172
172
|
async delete(t, s) {
|
|
173
|
-
const r =
|
|
174
|
-
i.error &&
|
|
173
|
+
const r = f(t, e), n = r.pk ?? "id", o = r.softDelete === !0 ? { is_active: !1 } : typeof r.softDelete == "object" ? r.softDelete : null, i = o ? await e.client.from(r.table).update(o).eq(n, s) : await e.client.from(r.table).delete().eq(n, s);
|
|
174
|
+
i.error && m(i.error);
|
|
175
175
|
}
|
|
176
176
|
};
|
|
177
177
|
}
|
|
178
178
|
export {
|
|
179
|
-
|
|
179
|
+
Ne as DEFAULT_CRUD_LABELS,
|
|
180
180
|
N as WActionBar,
|
|
181
|
-
|
|
182
|
-
V as
|
|
183
|
-
|
|
184
|
-
S as
|
|
185
|
-
|
|
181
|
+
P as WAutoCompleteFK,
|
|
182
|
+
V as WChart,
|
|
183
|
+
q as WCheckList,
|
|
184
|
+
S as WCrudColumnRenderer,
|
|
185
|
+
C as WCrudFormDialog,
|
|
186
|
+
j as WCrudSubview,
|
|
186
187
|
b as WCrudView,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
U as WDatePicker,
|
|
189
|
+
G as WDateRange,
|
|
190
|
+
J as WDetailHeader,
|
|
191
|
+
Q as WDialog,
|
|
191
192
|
X as WEditableTable,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
193
|
+
Z as WEmptyState,
|
|
194
|
+
ee as WFileUpload,
|
|
195
|
+
ae as WFormRenderer,
|
|
196
|
+
te as WFormSection,
|
|
197
|
+
se as WImageCropper,
|
|
198
|
+
re as WInfoCard,
|
|
199
|
+
ne as WKanbanBoard,
|
|
200
|
+
oe as WKpiCard,
|
|
201
|
+
ie as WKpiGrid,
|
|
202
|
+
ce as WMapSelect,
|
|
203
|
+
ue as WMarkdownEditor,
|
|
204
|
+
de as WMarkdownToc,
|
|
204
205
|
le as WMarkdownView,
|
|
205
|
-
|
|
206
|
-
|
|
206
|
+
A as WMoneyInput,
|
|
207
|
+
me as WPageHeader,
|
|
207
208
|
Y as WPrimeVuePlugin,
|
|
208
209
|
fe as WProgressFlow,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
210
|
+
pe as WSectionHeader,
|
|
211
|
+
ge as WStatusTag,
|
|
212
|
+
We as WStepFlow,
|
|
213
|
+
_e as WStepSection,
|
|
214
|
+
ye as WTabBar,
|
|
215
|
+
we as WTabNav,
|
|
216
|
+
be as WTabViewport,
|
|
217
|
+
T as WTransferList,
|
|
218
|
+
v as WTreeSelect,
|
|
218
219
|
_ as W_AXIOS_KEY,
|
|
219
220
|
w as W_CONFIG_KEY,
|
|
220
221
|
y as W_DATA_PROVIDER_KEY,
|
|
221
|
-
|
|
222
|
+
Ce as W_STEP_FLOW_KEY,
|
|
222
223
|
O as W_TAB_HOST_KEY,
|
|
223
|
-
|
|
224
|
+
Se as buildChartTheme,
|
|
225
|
+
Pe as buildPrintTheme,
|
|
226
|
+
F as createAxiosDataProvider,
|
|
224
227
|
I as createSupabaseDataProvider,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
228
|
+
Ae as donutOption,
|
|
229
|
+
Te as downloadCsv,
|
|
230
|
+
Ye as extractApiError,
|
|
231
|
+
ve as mapApiFieldToColumnDef,
|
|
232
|
+
De as mapApiFieldToFieldDef,
|
|
233
|
+
Fe as mapApiFieldsToColumnDefs,
|
|
234
|
+
xe as mapApiFieldsToFieldDefs,
|
|
235
|
+
Ee as toCsv,
|
|
236
|
+
Re as useApi,
|
|
237
|
+
Ie as useApiError,
|
|
238
|
+
Ke as useAppConfirm,
|
|
239
|
+
ke as useAppToast,
|
|
240
|
+
$e as useCrudManager,
|
|
241
|
+
Oe as useDateInput,
|
|
242
|
+
Be as useFormatters,
|
|
243
|
+
ze as useRouteTabs,
|
|
244
|
+
Le as useSubviewCrud,
|
|
241
245
|
B as useTabHost
|
|
242
246
|
};
|
|
243
247
|
//# sourceMappingURL=index.js.map
|