@wgalleti/primevue-components 1.15.0 → 1.16.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/{components-BzGcHXo6.cjs → components-CYEqtT7k.cjs} +2 -2
- package/dist/components-CYEqtT7k.cjs.map +1 -0
- package/dist/{components-DlhMmfWP.js → components-mSxE0Tfa.js} +4 -4
- package/dist/components-mSxE0Tfa.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/field.d.ts +2 -0
- package/package.json +1 -1
- package/dist/components-BzGcHXo6.cjs.map +0 -1
- package/dist/components-DlhMmfWP.js.map +0 -1
package/dist/components.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components-CYEqtT7k.cjs");exports.WActionBar=e.x,exports.WAttentionList=e.p,exports.WAutoCompleteFK=e.et,exports.WAvatar=e.g,exports.WCalendarGrid=e.n,exports.WChart=e.I,exports.WCheckList=e.h,exports.WCrudColumnRenderer=e.at,exports.WCrudFormDialog=e.J,exports.WCrudSubview=e.U,exports.WCrudView=e.G,exports.WDatePicker=e.$,exports.WDateRange=e.H,exports.WDetailHeader=e.M,exports.WDialog=e.s,exports.WEditableTable=e.W,exports.WEmptyState=e.N,exports.WFileUpload=e.V,exports.WFlipCard=e.o,exports.WFormRenderer=e.Y,exports.WFormSection=e.S,exports.WGroupedSelectList=e.f,exports.WImageCropper=e.Z,exports.WInfoCard=e.j,exports.WInlineCell=e.m,exports.WKanbanBoard=e.t,exports.WKpiCard=e.A,exports.WKpiGrid=e.k,exports.WMapSelect=e.d,exports.WMarkdownEditor=e.l,exports.WMarkdownToc=e.c,exports.WMarkdownView=e.u,exports.WMeter=e.D,exports.WMoneyInput=e.Q,exports.WPageHeader=e.P,exports.WProgressFlow=e.b,exports.WSectionAccordion=e.T,exports.WSectionHeader=e.w,exports.WSectionPanel=e.C,exports.WStatusTag=e.F,exports.WStepFlow=e.v,exports.WStepSection=e._,exports.WTabBar=e.a,exports.WTabNav=e.i,exports.WTabViewport=e.r,exports.WTransferList=e.X,exports.WTreeSelect=e.B;
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, F as a, G as o, H as s, I as c, J as l, M as u, N as d, P as f, Q as p, S as m, T as h, U as g, V as _, W as v, X as y, Y as b, Z as x, _ as S, a as C, at as w, b as T, c as E, d as D, et as O, f as k, g as A, h as j, i as M, j as N, k as P, l as F, m as I, n as L, o as R, p as z, r as B, s as V, t as H, u as U, v as W, w as G, x as K } from "./components-
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, F as a, G as o, H as s, I as c, J as l, M as u, N as d, P as f, Q as p, S as m, T as h, U as g, V as _, W as v, X as y, Y as b, Z as x, _ as S, a as C, at as w, b as T, c as E, d as D, et as O, f as k, g as A, h as j, i as M, j as N, k as P, l as F, m as I, n as L, o as R, p as z, r as B, s as V, t as H, u as U, v as W, w as G, x as K } from "./components-mSxE0Tfa.js";
|
|
2
2
|
export { K as WActionBar, z as WAttentionList, O as WAutoCompleteFK, A as WAvatar, L as WCalendarGrid, c as WChart, j as WCheckList, w as WCrudColumnRenderer, l as WCrudFormDialog, g as WCrudSubview, o as WCrudView, e as WDatePicker, s as WDateRange, u as WDetailHeader, V as WDialog, v as WEditableTable, d as WEmptyState, _ as WFileUpload, R as WFlipCard, b as WFormRenderer, m as WFormSection, k as WGroupedSelectList, x as WImageCropper, N as WInfoCard, I as WInlineCell, H as WKanbanBoard, t as WKpiCard, P as WKpiGrid, D as WMapSelect, F as WMarkdownEditor, E as WMarkdownToc, U as WMarkdownView, i as WMeter, p as WMoneyInput, f as WPageHeader, T as WProgressFlow, h as WSectionAccordion, G as WSectionHeader, r as WSectionPanel, a as WStatusTag, W as WStepFlow, S as WStepSection, C as WTabBar, M as WTabNav, B as WTabViewport, y as WTransferList, n as WTreeSelect };
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useFormKeyboardNav-DkUCe_b7.cjs"),t=require("./routeTabs-BnVpnSeJ.cjs"),n=require("./components-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./useFormKeyboardNav-DkUCe_b7.cjs"),t=require("./routeTabs-BnVpnSeJ.cjs"),n=require("./components-CYEqtT7k.cjs"),r=require("./labels-DiFDhFhQ.cjs"),i=require("./composables-BZTlY1QU.cjs");require("./types.cjs");let a=require("primevue/dialog");a=e.v(a,1);let o=require("primevue/drawer");o=e.v(o,1);function s(e,t,n){let 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 c(e){return{async list(t,n={}){return s((await e.get(t,{params:n})).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}/`)}}}var l=`[data-pc-name="dialog"], [data-pc-name="drawer"]`,u=Symbol(`w-escape-stack`);function d(e){for(let t=e;t;t=t.parentElement)if(t.hidden||getComputedStyle(t).display===`none`)return!1;return!0}function f(e){let t=Number.parseInt(getComputedStyle(e.parentElement??e).zIndex,10);return Number.isNaN(t)?0:t}function p(){return Array.from(document.querySelectorAll(l)).filter(d)}function m(e){if(!e)return!0;let t=p();if(!t.includes(e))return!1;if(t.length===1)return!0;let n=t[0];for(let e of t)f(e)>=f(n)&&(n=e);return n===e}function h(e,t){let n=e.methods,r=n?.[t];if(!n||!r||r[u])return;let i=function(e){e.code===`Escape`&&!m(this.container)||r.call(this,e)};i[u]=!0,n[t]=i}function g(){typeof document>`u`||(h(a.default,`onKeyDown`),h(o.default,`onKeydown`))}var _={install(e,r){if(!r?.axios&&!r?.dataProvider)throw Error(`[wPrimeVueComponents] Informe "axios" ou "dataProvider" ao registrar o WPrimeVuePlugin.`);let i=r.dataProvider??c(r.axios),a={axios:r.axios,dataProvider:i,defaultPageSize:r.defaultPageSize??20,dateFormat:r.dateFormat??`DD/MM/YYYY`,dateTimeFormat:r.dateTimeFormat??`DD/MM/YYYY HH:mm`,locale:r.locale??`pt-BR`,currency:r.currency??`BRL`,keyboardNav:r.keyboardNav??!1};r.axios&&e.provide(t.r,r.axios),e.provide(t.a,i),e.provide(t.i,a),r.patchDialogEscape!==!1&&g(),r.registerComponents!==!1&&(e.component(`WCrudView`,n.G),e.component(`WCrudFormDialog`,n.J),e.component(`WCrudColumnRenderer`,n.at),e.component(`WAutoCompleteFK`,n.et),e.component(`WMoneyInput`,n.Q),e.component(`WTransferList`,n.X),e.component(`WTreeSelect`,n.B))}};function v(e){return e.split(`?`)[0].replace(/^\/+|\/+$/g,``).replace(/^api\/v\d+\//,``)}function y(e){return typeof e==`string`?{table:e}:e}function b(e,t=400){return{response:{status:t,data:{detail:e}},message:e}}function x(e){if(e instanceof FormData)throw b(`SupabaseDataProvider nao envia FormData diretamente. Faça upload do arquivo no Storage e envie a URL/caminho no payload.`);return e}function S(e){throw{response:{data:{detail:e?.message??`Erro ao consultar Supabase`,code:e?.code,details:e?.details,hint:e?.hint}},message:e?.message??`Erro ao consultar Supabase`}}function C(e,t){let n=v(e),r=t.resources?.[n];if(r)return y(r);if(t.allowedTables?.includes(n))return{table:n};throw b(`Recurso Supabase nao registrado para o endpoint "${e}".`,404)}function w(e,t,n){let r=new Set([`page`,`page_size`,`search`,`ordering`]),i={...n.defaultFilters,...t};for(let[t,n]of Object.entries(i))r.has(t)||n==null||n===``||(e=e.eq(t,n));return e}function T(e,t,n){if(typeof t!=`string`||!t.trim()||!n?.length)return e;let r=t.trim().replace(/,/g,`\\,`),i=n.map(e=>`${e}.ilike.%${r}%`).join(`,`);return e.or(i)}function E(e,t){let n=typeof e==`string`&&e?e:t;return n?{field:n.startsWith(`-`)?n.slice(1):n,ascending:!n.startsWith(`-`)}:null}function D(e,t){return e?t.mapListItem?e.map(e=>t.mapListItem?.(e)):e:[]}function O(e){let t=e.defaultSelect??`*`;return{async list(n,r={}){let i=C(n,e),a=Math.max(Number(r.page??1),1),o=Math.max(Number(r.page_size??20),1),s=(a-1)*o,c=s+o-1,l=e.client.from(i.table).select(i.select??t,{count:`exact`});l=w(l,r,i),l=T(l,r.search,i.searchFields);let u=E(r.ordering,i.defaultOrdering);u&&(l=l.order(u.field,{ascending:u.ascending}));let d=await l.range(s,c);return d.error&&S(d.error),{data:D(d.data,i),page:a,page_size:o,rows:d.count??d.data?.length??0,extras:{}}},async get(n,r,i){let a=C(n,e),o=a.pk??`id`,s=await e.client.from(a.table).select(a.select??t).eq(o,r).single();return s.error&&S(s.error),{data:s.data}},async create(n,r,i){let a=C(n,e),o=x(r),s=a.mapPayload?a.mapPayload(o,`create`):o,c=await e.client.from(a.table).insert(s).select(a.select??t).single();return c.error&&S(c.error),{data:c.data}},async update(n,r,i,a){let o=C(n,e),s=o.pk??`id`,c=x(i),l=o.mapPayload?o.mapPayload(c,`update`):c,u=await e.client.from(o.table).update(l).eq(s,r).select(o.select??t).single();return u.error&&S(u.error),{data:u.data}},async delete(t,n){let r=C(t,e),i=r.pk??`id`,a=r.softDelete===!0?{is_active:!1}:typeof r.softDelete==`object`?r.softDelete:null,o=a?await e.client.from(r.table).update(a).eq(i,n):await e.client.from(r.table).delete().eq(i,n);o.error&&S(o.error)}}}exports.BREAKPOINTS=e.g,exports.DEFAULT_CRUD_LABELS=r.t,exports.MIN_CHECK_INTERVAL_MS=i.t,exports.RECENT_READ_MS=i.n,exports.WActionBar=n.x,exports.WAttentionList=n.p,exports.WAutoCompleteFK=n.et,exports.WAvatar=n.g,exports.WCalendarGrid=n.n,exports.WChart=n.I,exports.WCheckList=n.h,exports.WCrudColumnRenderer=n.at,exports.WCrudFormDialog=n.J,exports.WCrudSubview=n.U,exports.WCrudView=n.G,exports.WDatePicker=n.$,exports.WDateRange=n.H,exports.WDetailHeader=n.M,exports.WDialog=n.s,exports.WEditableTable=n.W,exports.WEmptyState=n.N,exports.WFileUpload=n.V,exports.WFlipCard=n.o,exports.WFormRenderer=n.Y,exports.WFormSection=n.S,exports.WGroupedSelectList=n.f,exports.WImageCropper=n.Z,exports.WInfoCard=n.j,exports.WInlineCell=n.m,exports.WKanbanBoard=n.t,exports.WKpiCard=n.A,exports.WKpiGrid=n.k,exports.WMapSelect=n.d,exports.WMarkdownEditor=n.l,exports.WMarkdownToc=n.c,exports.WMarkdownView=n.u,exports.WMeter=n.D,exports.WMoneyInput=n.Q,exports.WPageHeader=n.P,exports.WPrimeVuePlugin=_,exports.WProgressFlow=n.b,exports.WSectionAccordion=n.T,exports.WSectionHeader=n.w,exports.WSectionPanel=n.C,exports.WStatusTag=n.F,exports.WStepFlow=n.v,exports.WStepSection=n._,exports.WTabBar=n.a,exports.WTabNav=n.i,exports.WTabViewport=n.r,exports.WTransferList=n.X,exports.WTreeSelect=n.B,exports.W_AXIOS_KEY=t.r,exports.W_CONFIG_KEY=t.i,exports.W_DATA_PROVIDER_KEY=t.a,exports.W_SECTION_ACCORDION_KEY=n.E,exports.W_STEP_FLOW_KEY=n.y,exports.W_TAB_HOST_KEY=t.t,exports.buildChartTheme=n.L,exports.buildPrintTheme=n.R,exports.convertFormRecord=e.s,exports.createAxiosDataProvider=c,exports.createPublishedVersion=i.r,exports.createSupabaseDataProvider=O,exports.donutOption=n.z,exports.downloadCsv=n.K,exports.extractApiError=e.r,exports.getFieldDefaults=e.c,exports.installPublishedVersion=i.i,exports.isChunkError=i.a,exports.isTopOverlay=m,exports.listPendingForms=i.d,exports.mapApiFieldToColumnDef=n.tt,exports.mapApiFieldToFieldDef=n.nt,exports.mapApiFieldsToColumnDefs=n.rt,exports.mapApiFieldsToFieldDefs=n.it,exports.meterSeverity=n.O,exports.patchDialogEscapeStack=g,exports.setPendingForm=i.f,exports.toCsv=n.q,exports.useApi=i.s,exports.useApiError=e.i,exports.useAppConfirm=e.a,exports.useAppToast=e.o,exports.useBreakpoint=e._,exports.useCrudManager=i.u,exports.useDateInput=e.n,exports.useFormatters=e.f,exports.usePendingForm=i.p,exports.useRouteTabs=i.o,exports.useSubviewCrud=i.l,exports.useTabHost=t.n,exports.validateFormRecord=e.d,exports.visibleOverlays=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, a as t, c as n, d as r, f as i, g as a, i as o, n as s, o as c, r as l, s as u } from "./useFormKeyboardNav-DNaAWyrr.js";
|
|
2
2
|
import { a as d, i as f, n as ee, r as p, t as te } from "./routeTabs-D6m8PuP6.js";
|
|
3
|
-
import { $ as ne, A as m, B as h, C as re, D as ie, E as g, F as _, G as v, H as ae, I as oe, J as y, K as se, L as ce, M as le, N as ue, O as de, P as fe, Q as b, R as x, S, T as C, U as w, V as T, W as E, X as D, Y as O, Z as k, _ as A, a as j, at as M, b as N, c as P, d as F, et as I, f as L, g as R, h as z, i as B, it as V, j as pe, k as me, l as he, m as ge, n as _e, nt as ve, o as ye, p as be, q as xe, r as Se, rt as Ce, s as we, t as H, tt as Te, u as Ee, v as De, w as Oe, x as ke, y as Ae, z as je } from "./components-
|
|
3
|
+
import { $ as ne, A as m, B as h, C as re, D as ie, E as g, F as _, G as v, H as ae, I as oe, J as y, K as se, L as ce, M as le, N as ue, O as de, P as fe, Q as b, R as x, S, T as C, U as w, V as T, W as E, X as D, Y as O, Z as k, _ as A, a as j, at as M, b as N, c as P, d as F, et as I, f as L, g as R, h as z, i as B, it as V, j as pe, k as me, l as he, m as ge, n as _e, nt as ve, o as ye, p as be, q as xe, r as Se, rt as Ce, s as we, t as H, tt as Te, u as Ee, v as De, w as Oe, x as ke, y as Ae, z as je } from "./components-mSxE0Tfa.js";
|
|
4
4
|
import { t as Me } from "./labels-CXBhCk2N.js";
|
|
5
5
|
import { a as Ne, d as Pe, f as Fe, i as Ie, l as Le, n as Re, o as ze, p as Be, r as Ve, s as He, t as Ue, u as We } from "./composables-Bu1oxAgP.js";
|
|
6
6
|
import "./types.js";
|
package/dist/types/field.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export interface FieldSubRowsResult {
|
|
|
27
27
|
export type FieldSubRowsFetch = (rows: Record<string, unknown>[]) => Promise<FieldSubRowsResult>;
|
|
28
28
|
/** Recorte do `CrudManagerConfig` que faz sentido dentro do modal de uma FK. */
|
|
29
29
|
export interface FkCrudConfig {
|
|
30
|
+
/** Destino da gravação (criar/editar/excluir); omitido grava em `endpoint` do campo. */
|
|
31
|
+
endpoint?: string;
|
|
30
32
|
form: FieldDef[];
|
|
31
33
|
columns?: ColumnDef[];
|
|
32
34
|
formColumns?: number;
|