@wgalleti/primevue-components 0.3.4
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 +218 -0
- package/dist/components/crud/WCrudColumnRenderer.vue.d.ts +8 -0
- package/dist/components/crud/WCrudFormDialog.vue.d.ts +214 -0
- package/dist/components/crud/WCrudView.vue.d.ts +89 -0
- package/dist/components/form/WAutoCompleteFK.vue.d.ts +43 -0
- package/dist/components/form/WFormRenderer.vue.d.ts +41 -0
- package/dist/components/form/WMoneyInput.vue.d.ts +28 -0
- package/dist/components/form/WTransferList.vue.d.ts +25 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/components/ui/WActionBar.vue.d.ts +27 -0
- package/dist/components/ui/WDetailHeader.vue.d.ts +29 -0
- package/dist/components/ui/WEmptyState.vue.d.ts +13 -0
- package/dist/components/ui/WFormSection.vue.d.ts +23 -0
- package/dist/components/ui/WInfoCard.vue.d.ts +11 -0
- package/dist/components/ui/WKpiCard.vue.d.ts +33 -0
- package/dist/components/ui/WKpiGrid.vue.d.ts +31 -0
- package/dist/components/ui/WPageHeader.vue.d.ts +27 -0
- package/dist/components/ui/WProgressFlow.vue.d.ts +33 -0
- package/dist/components/ui/WSectionHeader.vue.d.ts +25 -0
- package/dist/components/ui/WStatusTag.vue.d.ts +10 -0
- package/dist/composables/index.d.ts +6 -0
- package/dist/composables/useApi.d.ts +2 -0
- package/dist/composables/useApiError.d.ts +4 -0
- package/dist/composables/useAppConfirm.d.ts +4 -0
- package/dist/composables/useAppToast.d.ts +6 -0
- package/dist/composables/useCrudManager.d.ts +2 -0
- package/dist/composables/useFormatters.d.ts +19 -0
- package/dist/data-providers/axiosDataProvider.d.ts +3 -0
- package/dist/data-providers/index.d.ts +2 -0
- package/dist/data-providers/supabaseDataProvider.d.ts +54 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +3287 -0
- package/dist/index.js.map +1 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/primevue-components.css +1 -0
- package/dist/types/api.d.ts +60 -0
- package/dist/types/components/crud/WCrudColumnRenderer.vue.d.ts +8 -0
- package/dist/types/components/crud/WCrudFormDialog.vue.d.ts +49 -0
- package/dist/types/components/crud/WCrudView.vue.d.ts +103 -0
- package/dist/types/components/form/WAutoCompleteFK.vue.d.ts +43 -0
- package/dist/types/components/form/WFormRenderer.vue.d.ts +40 -0
- package/dist/types/components/form/WMoneyInput.vue.d.ts +28 -0
- package/dist/types/components/form/WTransferList.vue.d.ts +25 -0
- package/dist/types/components/index.d.ts +18 -0
- package/dist/types/components/ui/WActionBar.vue.d.ts +25 -0
- package/dist/types/components/ui/WDetailHeader.vue.d.ts +24 -0
- package/dist/types/components/ui/WEmptyState.vue.d.ts +13 -0
- package/dist/types/components/ui/WFormSection.vue.d.ts +19 -0
- package/dist/types/components/ui/WInfoCard.vue.d.ts +11 -0
- package/dist/types/components/ui/WKpiCard.vue.d.ts +32 -0
- package/dist/types/components/ui/WKpiGrid.vue.d.ts +26 -0
- package/dist/types/components/ui/WPageHeader.vue.d.ts +22 -0
- package/dist/types/components/ui/WProgressFlow.vue.d.ts +28 -0
- package/dist/types/components/ui/WSectionHeader.vue.d.ts +22 -0
- package/dist/types/components/ui/WStatusTag.vue.d.ts +10 -0
- package/dist/types/composables/index.d.ts +6 -0
- package/dist/types/composables/useApi.d.ts +2 -0
- package/dist/types/composables/useApiError.d.ts +4 -0
- package/dist/types/composables/useAppConfirm.d.ts +4 -0
- package/dist/types/composables/useAppToast.d.ts +6 -0
- package/dist/types/composables/useCrudManager.d.ts +2 -0
- package/dist/types/composables/useFormatters.d.ts +19 -0
- package/dist/types/crud.d.ts +184 -0
- package/dist/types/data-providers/axiosDataProvider.d.ts +3 -0
- package/dist/types/data-providers/index.d.ts +2 -0
- package/dist/types/data-providers/supabaseDataProvider.d.ts +54 -0
- package/dist/types/dataProvider.d.ts +28 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/plugin.d.ts +2 -0
- package/dist/types/types/api.d.ts +60 -0
- package/dist/types/types/crud.d.ts +184 -0
- package/dist/types/types/dataProvider.d.ts +28 -0
- package/dist/types/types/index.d.ts +6 -0
- package/dist/types/types/plugin.d.ts +24 -0
- package/dist/types/utils/cep.d.ts +14 -0
- package/dist/types/utils/dates.d.ts +5 -0
- package/dist/types/utils/fieldMapper.d.ts +20 -0
- package/dist/types/utils/masks.d.ts +8 -0
- package/dist/utils/cep.d.ts +14 -0
- package/dist/utils/dates.d.ts +5 -0
- package/dist/utils/fieldMapper.d.ts +20 -0
- package/dist/utils/masks.d.ts +8 -0
- package/package.json +78 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { default as WCrudView } from './crud/WCrudView.vue';
|
|
2
|
+
export { default as WCrudFormDialog } from './crud/WCrudFormDialog.vue';
|
|
3
|
+
export { default as WCrudColumnRenderer } from './crud/WCrudColumnRenderer.vue';
|
|
4
|
+
export { default as WAutoCompleteFK } from './form/WAutoCompleteFK.vue';
|
|
5
|
+
export { default as WFormRenderer } from './form/WFormRenderer.vue';
|
|
6
|
+
export { default as WMoneyInput } from './form/WMoneyInput.vue';
|
|
7
|
+
export { default as WTransferList } from './form/WTransferList.vue';
|
|
8
|
+
export { default as WStatusTag } from './ui/WStatusTag.vue';
|
|
9
|
+
export { default as WPageHeader } from './ui/WPageHeader.vue';
|
|
10
|
+
export { default as WEmptyState } from './ui/WEmptyState.vue';
|
|
11
|
+
export { default as WDetailHeader } from './ui/WDetailHeader.vue';
|
|
12
|
+
export { default as WInfoCard } from './ui/WInfoCard.vue';
|
|
13
|
+
export { default as WKpiCard } from './ui/WKpiCard.vue';
|
|
14
|
+
export { default as WKpiGrid } from './ui/WKpiGrid.vue';
|
|
15
|
+
export { default as WSectionHeader } from './ui/WSectionHeader.vue';
|
|
16
|
+
export { default as WFormSection } from './ui/WFormSection.vue';
|
|
17
|
+
export { default as WActionBar } from './ui/WActionBar.vue';
|
|
18
|
+
export { default as WProgressFlow } from './ui/WProgressFlow.vue';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
align?: 'between' | 'start' | 'end';
|
|
3
|
+
stackOnMobile?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
slots: {
|
|
8
|
+
primary?(_: {}): any;
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
filters?(_: {}): any;
|
|
11
|
+
secondary?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
align: "between" | "start" | "end";
|
|
19
|
+
stackOnMobile: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
backRoute?: string;
|
|
6
|
+
backTo?: string | Record<string, unknown>;
|
|
7
|
+
status?: string;
|
|
8
|
+
statusMap?: Record<string, {
|
|
9
|
+
label: string;
|
|
10
|
+
severity: string;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
slots: {
|
|
16
|
+
actions?(_: {}): any;
|
|
17
|
+
};
|
|
18
|
+
refs: {};
|
|
19
|
+
rootEl: HTMLDivElement;
|
|
20
|
+
};
|
|
21
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
22
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
icon: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actionLabel?: string;
|
|
6
|
+
actionIcon?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
action: () => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onAction?: (() => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
variant?: 'default' | 'muted' | 'outlined';
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
actions?(_: {}): any;
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface InfoField {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number | null | undefined;
|
|
4
|
+
format?: 'currency' | 'date' | 'datetime' | 'number' | 'text';
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
title?: string;
|
|
8
|
+
fields: InfoField[];
|
|
9
|
+
};
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string | number;
|
|
4
|
+
icon?: string;
|
|
5
|
+
hint?: string;
|
|
6
|
+
severity?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
7
|
+
trend?: {
|
|
8
|
+
value: string;
|
|
9
|
+
direction?: 'up' | 'down' | 'neutral';
|
|
10
|
+
};
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
slots: {
|
|
16
|
+
icon?(_: {}): any;
|
|
17
|
+
trend?(_: {}): any;
|
|
18
|
+
value?(_: {}): any;
|
|
19
|
+
hint?(_: {}): any;
|
|
20
|
+
footer?(_: {}): any;
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
rootEl: HTMLElement;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { KpiItem } from '../../types/crud';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items?: KpiItem[];
|
|
4
|
+
columns?: 2 | 3 | 4;
|
|
5
|
+
dense?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
item?(_: {
|
|
11
|
+
key: number;
|
|
12
|
+
item: KpiItem;
|
|
13
|
+
index: number;
|
|
14
|
+
}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: HTMLDivElement;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
columns: 2 | 3 | 4;
|
|
22
|
+
items: KpiItem[];
|
|
23
|
+
dense: boolean;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle?: string;
|
|
4
|
+
actionLabel?: string;
|
|
5
|
+
actionIcon?: string;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
actions?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLDivElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
action: () => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onAction?: (() => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface ProgressStep {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
steps: ProgressStep[];
|
|
8
|
+
currentStep: string;
|
|
9
|
+
orientation?: 'horizontal' | 'vertical';
|
|
10
|
+
};
|
|
11
|
+
declare function __VLS_template(): {
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
slots: {
|
|
14
|
+
step?(_: {
|
|
15
|
+
step: ProgressStep;
|
|
16
|
+
index: number;
|
|
17
|
+
state: string;
|
|
18
|
+
}): any;
|
|
19
|
+
};
|
|
20
|
+
refs: {};
|
|
21
|
+
rootEl: HTMLDivElement;
|
|
22
|
+
};
|
|
23
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
24
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
25
|
+
orientation: "horizontal" | "vertical";
|
|
26
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
+
new (): {
|
|
31
|
+
$slots: S;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
compact?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
icon?(_: {}): any;
|
|
11
|
+
meta?(_: {}): any;
|
|
12
|
+
actions?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
rootEl: HTMLDivElement;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface StatusMapping {
|
|
2
|
+
label: string;
|
|
3
|
+
severity: string;
|
|
4
|
+
}
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
value: string;
|
|
7
|
+
map?: Record<string, StatusMapping>;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useCrudManager } from './useCrudManager';
|
|
2
|
+
export { useApi } from './useApi';
|
|
3
|
+
export { useAppToast } from './useAppToast';
|
|
4
|
+
export { useAppConfirm } from './useAppConfirm';
|
|
5
|
+
export { useApiError, extractApiError } from './useApiError';
|
|
6
|
+
export { useFormatters } from './useFormatters';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { parseDate, toDateString, toDateTimeString } from '../utils/dates';
|
|
2
|
+
import { formatCpf, formatCnpj, formatCpfCnpj, formatTelefone, validateCpf, validateCnpj, validateCpfCnpj } from '../utils/masks';
|
|
3
|
+
export declare function useFormatters(): {
|
|
4
|
+
formatCurrency: (value: number | null | undefined) => string;
|
|
5
|
+
formatNumber: (value: number | null | undefined, decimals?: number) => string;
|
|
6
|
+
formatDate: (value: string | Date | null | undefined, format?: string) => string;
|
|
7
|
+
formatDateTime: (value: string | Date | null | undefined) => string;
|
|
8
|
+
formatPercent: (value: number | null | undefined) => string;
|
|
9
|
+
formatCpf: typeof formatCpf;
|
|
10
|
+
formatCnpj: typeof formatCnpj;
|
|
11
|
+
formatCpfCnpj: typeof formatCpfCnpj;
|
|
12
|
+
formatTelefone: typeof formatTelefone;
|
|
13
|
+
validateCpf: typeof validateCpf;
|
|
14
|
+
validateCnpj: typeof validateCnpj;
|
|
15
|
+
validateCpfCnpj: typeof validateCpfCnpj;
|
|
16
|
+
parseDate: typeof parseDate;
|
|
17
|
+
toDateString: typeof toDateString;
|
|
18
|
+
toDateTimeString: typeof toDateTimeString;
|
|
19
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { DataProvider } from '../types/dataProvider';
|
|
2
|
+
type SupabaseResult<T> = {
|
|
3
|
+
data: T | null;
|
|
4
|
+
error: {
|
|
5
|
+
message: string;
|
|
6
|
+
code?: string;
|
|
7
|
+
details?: string;
|
|
8
|
+
hint?: string;
|
|
9
|
+
} | null;
|
|
10
|
+
count?: number | null;
|
|
11
|
+
};
|
|
12
|
+
type SupabaseFilterBuilder<T> = PromiseLike<SupabaseResult<T>> & {
|
|
13
|
+
select(columns?: string, options?: {
|
|
14
|
+
count?: 'exact' | 'planned' | 'estimated';
|
|
15
|
+
}): SupabaseFilterBuilder<T>;
|
|
16
|
+
eq(column: string, value: unknown): SupabaseFilterBuilder<T>;
|
|
17
|
+
ilike(column: string, pattern: string): SupabaseFilterBuilder<T>;
|
|
18
|
+
or(filters: string): SupabaseFilterBuilder<T>;
|
|
19
|
+
order(column: string, options?: {
|
|
20
|
+
ascending?: boolean;
|
|
21
|
+
}): SupabaseFilterBuilder<T>;
|
|
22
|
+
range(from: number, to: number): SupabaseFilterBuilder<T>;
|
|
23
|
+
single(): Promise<SupabaseResult<T>>;
|
|
24
|
+
};
|
|
25
|
+
type SupabaseTable = {
|
|
26
|
+
select<T = unknown>(columns?: string, options?: {
|
|
27
|
+
count?: 'exact' | 'planned' | 'estimated';
|
|
28
|
+
}): SupabaseFilterBuilder<T>;
|
|
29
|
+
insert<T = unknown>(payload: unknown): SupabaseFilterBuilder<T>;
|
|
30
|
+
update<T = unknown>(payload: unknown): SupabaseFilterBuilder<T>;
|
|
31
|
+
delete<T = unknown>(): SupabaseFilterBuilder<T>;
|
|
32
|
+
};
|
|
33
|
+
export interface SupabaseDataProviderClient {
|
|
34
|
+
from(table: string): SupabaseTable;
|
|
35
|
+
}
|
|
36
|
+
export interface SupabaseResourceConfig {
|
|
37
|
+
table: string;
|
|
38
|
+
pk?: string;
|
|
39
|
+
select?: string;
|
|
40
|
+
searchFields?: string[];
|
|
41
|
+
defaultOrdering?: string;
|
|
42
|
+
defaultFilters?: Record<string, unknown>;
|
|
43
|
+
softDelete?: boolean | Record<string, unknown>;
|
|
44
|
+
mapListItem?: (item: Record<string, unknown>) => Record<string, unknown>;
|
|
45
|
+
mapPayload?: (payload: Record<string, unknown>, operation: 'create' | 'update') => Record<string, unknown>;
|
|
46
|
+
}
|
|
47
|
+
export interface CreateSupabaseDataProviderOptions {
|
|
48
|
+
client: SupabaseDataProviderClient;
|
|
49
|
+
resources?: Record<string, SupabaseResourceConfig | string>;
|
|
50
|
+
defaultSelect?: string;
|
|
51
|
+
allowedTables?: string[];
|
|
52
|
+
}
|
|
53
|
+
export declare function createSupabaseDataProvider(options: CreateSupabaseDataProviderOptions): DataProvider;
|
|
54
|
+
export {};
|