v-sistec-features 1.8.0 → 1.8.1
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/iframeCommunicator.d.ts +1 -1
- package/dist/iframeCommunicator.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{useThemeFromParent-CYvPb79h.js → useThemeFromParent-Bk-du0-V.js} +7 -7
- package/dist/v-sistec-features.css +1 -1
- package/dist/vDataPage.d.ts +1 -1
- package/dist/vDataPage.js +161 -164
- package/package.json +1 -1
- package/src/DataPageVue/components/VDataPage.vue +1 -2
- package/src/DataPageVue/types/v-data-page.ts +1 -1
- package/src/iframeCommunicator/useIframeCommunicator.ts +7 -3
|
@@ -4,7 +4,7 @@ import { Ref } from 'vue';
|
|
|
4
4
|
* Um Composable para gerenciar a comunicação entre um iframe e sua janela pai.
|
|
5
5
|
* @param onMessageReceived - Uma função de callback que será executada quando uma mensagem for recebida do pai.
|
|
6
6
|
*/
|
|
7
|
-
export declare function useIframeCommunicator(onMessageReceived
|
|
7
|
+
export declare function useIframeCommunicator(onMessageReceived?: (event: MessageEvent) => void): {
|
|
8
8
|
isInIframe: Readonly<Ref<boolean, boolean>>;
|
|
9
9
|
sendMessage: (message: any, targetOrigin?: string) => void;
|
|
10
10
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const SistecPlugin: {
|
|
|
9
9
|
* Um Composable para gerenciar a comunicação entre um iframe e sua janela pai.
|
|
10
10
|
* @param onMessageReceived - Uma função de callback que será executada quando uma mensagem for recebida do pai.
|
|
11
11
|
*/
|
|
12
|
-
export declare function useIframeCommunicator(onMessageReceived
|
|
12
|
+
export declare function useIframeCommunicator(onMessageReceived?: (event: MessageEvent) => void): {
|
|
13
13
|
isInIframe: Readonly<Ref<boolean, boolean>>;
|
|
14
14
|
sendMessage: (message: any, targetOrigin?: string) => void;
|
|
15
15
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { ref as o, onMounted as a, onUnmounted as d, readonly as r } from "vue";
|
|
2
2
|
function i(e) {
|
|
3
3
|
const t = o(window.parent !== window);
|
|
4
|
-
function n
|
|
5
|
-
t.value && window.parent.postMessage(
|
|
4
|
+
function m(n, s = "*") {
|
|
5
|
+
t.value && window.parent.postMessage(n, s);
|
|
6
6
|
}
|
|
7
7
|
return a(() => {
|
|
8
|
-
window.addEventListener("message", e);
|
|
8
|
+
e && window.addEventListener("message", e);
|
|
9
9
|
}), d(() => {
|
|
10
|
-
window.removeEventListener("message", e);
|
|
10
|
+
e && window.removeEventListener("message", e);
|
|
11
11
|
}), {
|
|
12
12
|
isInIframe: r(t),
|
|
13
13
|
// readonly para evitar modificação externa
|
|
14
|
-
sendMessage:
|
|
14
|
+
sendMessage: m
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
function u(e) {
|
|
18
18
|
e.data.type === "setTheme" && document.documentElement.setAttribute("data-bs-theme", e.data.theme), e.data.type === "setThemePrimary" && document.documentElement.setAttribute("data-bs-theme-primary", e.data.themePrimary), e.data.type === "setThemeBase" && document.documentElement.setAttribute("data-bs-theme-base", e.data.themeBase), e.data.type === "reload" && location.reload();
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function h() {
|
|
21
21
|
const { sendMessage: e } = i(u);
|
|
22
22
|
a(() => {
|
|
23
23
|
e({ type: "iframeReady" });
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
h as a,
|
|
28
28
|
i as u
|
|
29
29
|
};
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
* Copyright 2018-2025 The Tabler Authors
|
|
9
9
|
* Copyright 2018-2025 codecalm.net Paweł Kuna
|
|
10
10
|
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
|
11
|
-
*/[data-bs-theme-base=slate]{--tblr-gray-50:#f8fafc;--tblr-gray-100:#f1f5f9;--tblr-gray-200:#e2e8f0;--tblr-gray-300:#cbd5e1;--tblr-gray-400:#94a3b8;--tblr-gray-500:#64748b;--tblr-gray-600:#475569;--tblr-gray-700:#334155;--tblr-gray-800:#1e293b;--tblr-gray-900:#0f172a;--tblr-gray-950:#020617}[data-bs-theme-base=gray]{--tblr-gray-50:#f9fafb;--tblr-gray-100:#f3f4f6;--tblr-gray-200:#e5e7eb;--tblr-gray-300:#d1d5db;--tblr-gray-400:#9ca3af;--tblr-gray-500:#6b7280;--tblr-gray-600:#4b5563;--tblr-gray-700:#374151;--tblr-gray-800:#1f2937;--tblr-gray-900:#111827;--tblr-gray-950:#030712}[data-bs-theme-base=zinc]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f4f4f5;--tblr-gray-200:#e4e4e7;--tblr-gray-300:#d4d4d8;--tblr-gray-400:#a1a1aa;--tblr-gray-500:#71717a;--tblr-gray-600:#52525b;--tblr-gray-700:#3f3f46;--tblr-gray-800:#27272a;--tblr-gray-900:#18181b;--tblr-gray-950:#09090b}[data-bs-theme-base=neutral]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f5f5f5;--tblr-gray-200:#e5e5e5;--tblr-gray-300:#d4d4d4;--tblr-gray-400:#a3a3a3;--tblr-gray-500:#737373;--tblr-gray-600:#525252;--tblr-gray-700:#404040;--tblr-gray-800:#262626;--tblr-gray-900:#171717;--tblr-gray-950:#0a0a0a}[data-bs-theme-base=stone]{--tblr-gray-50:#fafaf9;--tblr-gray-100:#f5f5f4;--tblr-gray-200:#e7e5e4;--tblr-gray-300:#d6d3d1;--tblr-gray-400:#a8a29e;--tblr-gray-500:#78716c;--tblr-gray-600:#57534e;--tblr-gray-700:#44403c;--tblr-gray-800:#292524;--tblr-gray-900:#1c1917;--tblr-gray-950:#0c0a09}[data-bs-theme-base=pink]{--tblr-gray-50:#fdf2f8;--tblr-gray-100:#fce7f3;--tblr-gray-200:#fbcfe8;--tblr-gray-300:#f9a8d4;--tblr-gray-400:#f472b6;--tblr-gray-500:#ec4899;--tblr-gray-600:#db2777;--tblr-gray-700:#be185d;--tblr-gray-800:#9d174d;--tblr-gray-900:#831843;--tblr-gray-950:#500724}[data-bs-theme-primary=blue]{--tblr-primary:#066fd1;--tblr-primary-rgb:6,111,209}[data-bs-theme-primary=azure]{--tblr-primary:#4299e1;--tblr-primary-rgb:66,153,225}[data-bs-theme-primary=indigo]{--tblr-primary:#4263eb;--tblr-primary-rgb:66,99,235}[data-bs-theme-primary=purple]{--tblr-primary:#ae3ec9;--tblr-primary-rgb:174,62,201}[data-bs-theme-primary=pink]{--tblr-primary:#d6336c;--tblr-primary-rgb:214,51,108}[data-bs-theme-primary=red]{--tblr-primary:#d63939;--tblr-primary-rgb:214,57,57}[data-bs-theme-primary=orange]{--tblr-primary:#f76707;--tblr-primary-rgb:247,103,7}[data-bs-theme-primary=yellow]{--tblr-primary:#f59f00;--tblr-primary-rgb:245,159,0}[data-bs-theme-primary=lime]{--tblr-primary:#74b816;--tblr-primary-rgb:116,184,22}[data-bs-theme-primary=green]{--tblr-primary:#2fb344;--tblr-primary-rgb:47,179,68}[data-bs-theme-primary=teal]{--tblr-primary:#0ca678;--tblr-primary-rgb:12,166,120}[data-bs-theme-primary=cyan]{--tblr-primary:#17a2b8;--tblr-primary-rgb:23,162,184}[data-bs-theme-radius="0"]{--tblr-border-radius-scale:0}[data-bs-theme-radius="0.5"]{--tblr-border-radius-scale:.5}[data-bs-theme-radius="1"]{--tblr-border-radius-scale:1}[data-bs-theme-radius="1.5"]{--tblr-border-radius-scale:1.5}[data-bs-theme-radius="2"]{--tblr-border-radius-scale:2}[data-bs-theme-primary=inverted]{--tblr-primary:var(--tblr-gray-800);--tblr-primary-fg:var(--tblr-light);--tblr-primary-rgb:31,41,55}[data-bs-theme-primary=inverted] [data-bs-theme=dark],[data-bs-theme-primary=inverted][data-bs-theme=dark]{--tblr-primary:#f9fafb;--tblr-primary-fg:var(--tblr-dark);--tblr-primary-rgb:249,250,251}[data-bs-theme-font=monospace]{--tblr-body-font-family:var(--tblr-font-monospace);--tblr-body-font-size:80%}[data-bs-theme-font=sans-serif]{--tblr-body-font-family:var(--tblr-font-sans-serif)}[data-bs-theme-font=serif]{--tblr-body-font-family:var(--tblr-font-serif)}[data-bs-theme-font=comic]{--tblr-body-font-family:var(--tblr-font-comic)}:root{--color-error-inputs: red}[data-bs-theme=dark]{--color-error-inputs: oklch(.666 .179 58.318)}.style-custom-v-required-default{display:flex!important;justify-content:center!important;flex-direction:column!important;gap:2px}.style-custom-v-required-error .v-required-span{color:var(--color-error-inputs)!important;white-space:pre-wrap}.multiselect__tags{background-color:var(--cor-bg-inputs);border:var(--border-inputs);border-radius:5px!important;font-size:.875rem;line-height:1.4285714286}.multiselect__placeholder{color:var(--color-text-multiselect)!important}.style-custom-v-required-error input,.style-custom-v-required-error select,.style-custom-v-required-error textarea{border:2px solid var(--color-error-inputs)!important;color:var(--color-error-inputs)!important}.style-custom-v-required-error .multiselect__tags{border:2px solid var(--color-error-inputs)!important}.style-custom-v-required-error .multiselect__input{border:none!important}.style-custom-v-required-error .multiselect__placeholder{color:var(--color-error-inputs)!important}.style-custom-v-required-error .image-drop-zone{border-color:var(--color-error-inputs)!important}.style-custom-v-required-error .quillWrapper{border:2px solid var(--color-error-inputs)!important}.style-custom-v-required-error input::placeholder{color:var(--color-error-inputs)!important}.rotate-180[data-v-785126fa] svg{transform:rotate(180deg)}.page-select[data-v-785126fa]{background-color:var(--tblr-primary)!important;color:#fff!important;border:none!important}.page-estilo[data-v-785126fa]{border:none;--cor-escurecida: color-mix(in srgb, var(--tblr-primary), #000 25%);background:transparent;padding:1px 10px;border-radius:7px;margin:0!important;transition:color .15s ease-in-out,background-color .15s ease-in-out}.page-estilo[data-v-785126fa]:hover{background:var(--cor-escurecida);color:#fff}.btn[data-v-785126fa]{padding:0!important;margin:0!important;background:transparent!important;border:none!important;box-shadow:none!important}[data-v-785126fa] .btn-estilo svg{padding:0!important;margin:0!important}[data-v-785126fa] .btn-estilo:hover svg{stroke:var(--tblr-primary)}.icon-tabler[data-v-785126fa]{margin:0!important;padding:0!important}.t-container{width:100%;display:flex;justify-content:space-between;align-items:center;color:#fff}.scroll-finish-style[data-v-
|
|
11
|
+
*/[data-bs-theme-base=slate]{--tblr-gray-50:#f8fafc;--tblr-gray-100:#f1f5f9;--tblr-gray-200:#e2e8f0;--tblr-gray-300:#cbd5e1;--tblr-gray-400:#94a3b8;--tblr-gray-500:#64748b;--tblr-gray-600:#475569;--tblr-gray-700:#334155;--tblr-gray-800:#1e293b;--tblr-gray-900:#0f172a;--tblr-gray-950:#020617}[data-bs-theme-base=gray]{--tblr-gray-50:#f9fafb;--tblr-gray-100:#f3f4f6;--tblr-gray-200:#e5e7eb;--tblr-gray-300:#d1d5db;--tblr-gray-400:#9ca3af;--tblr-gray-500:#6b7280;--tblr-gray-600:#4b5563;--tblr-gray-700:#374151;--tblr-gray-800:#1f2937;--tblr-gray-900:#111827;--tblr-gray-950:#030712}[data-bs-theme-base=zinc]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f4f4f5;--tblr-gray-200:#e4e4e7;--tblr-gray-300:#d4d4d8;--tblr-gray-400:#a1a1aa;--tblr-gray-500:#71717a;--tblr-gray-600:#52525b;--tblr-gray-700:#3f3f46;--tblr-gray-800:#27272a;--tblr-gray-900:#18181b;--tblr-gray-950:#09090b}[data-bs-theme-base=neutral]{--tblr-gray-50:#fafafa;--tblr-gray-100:#f5f5f5;--tblr-gray-200:#e5e5e5;--tblr-gray-300:#d4d4d4;--tblr-gray-400:#a3a3a3;--tblr-gray-500:#737373;--tblr-gray-600:#525252;--tblr-gray-700:#404040;--tblr-gray-800:#262626;--tblr-gray-900:#171717;--tblr-gray-950:#0a0a0a}[data-bs-theme-base=stone]{--tblr-gray-50:#fafaf9;--tblr-gray-100:#f5f5f4;--tblr-gray-200:#e7e5e4;--tblr-gray-300:#d6d3d1;--tblr-gray-400:#a8a29e;--tblr-gray-500:#78716c;--tblr-gray-600:#57534e;--tblr-gray-700:#44403c;--tblr-gray-800:#292524;--tblr-gray-900:#1c1917;--tblr-gray-950:#0c0a09}[data-bs-theme-base=pink]{--tblr-gray-50:#fdf2f8;--tblr-gray-100:#fce7f3;--tblr-gray-200:#fbcfe8;--tblr-gray-300:#f9a8d4;--tblr-gray-400:#f472b6;--tblr-gray-500:#ec4899;--tblr-gray-600:#db2777;--tblr-gray-700:#be185d;--tblr-gray-800:#9d174d;--tblr-gray-900:#831843;--tblr-gray-950:#500724}[data-bs-theme-primary=blue]{--tblr-primary:#066fd1;--tblr-primary-rgb:6,111,209}[data-bs-theme-primary=azure]{--tblr-primary:#4299e1;--tblr-primary-rgb:66,153,225}[data-bs-theme-primary=indigo]{--tblr-primary:#4263eb;--tblr-primary-rgb:66,99,235}[data-bs-theme-primary=purple]{--tblr-primary:#ae3ec9;--tblr-primary-rgb:174,62,201}[data-bs-theme-primary=pink]{--tblr-primary:#d6336c;--tblr-primary-rgb:214,51,108}[data-bs-theme-primary=red]{--tblr-primary:#d63939;--tblr-primary-rgb:214,57,57}[data-bs-theme-primary=orange]{--tblr-primary:#f76707;--tblr-primary-rgb:247,103,7}[data-bs-theme-primary=yellow]{--tblr-primary:#f59f00;--tblr-primary-rgb:245,159,0}[data-bs-theme-primary=lime]{--tblr-primary:#74b816;--tblr-primary-rgb:116,184,22}[data-bs-theme-primary=green]{--tblr-primary:#2fb344;--tblr-primary-rgb:47,179,68}[data-bs-theme-primary=teal]{--tblr-primary:#0ca678;--tblr-primary-rgb:12,166,120}[data-bs-theme-primary=cyan]{--tblr-primary:#17a2b8;--tblr-primary-rgb:23,162,184}[data-bs-theme-radius="0"]{--tblr-border-radius-scale:0}[data-bs-theme-radius="0.5"]{--tblr-border-radius-scale:.5}[data-bs-theme-radius="1"]{--tblr-border-radius-scale:1}[data-bs-theme-radius="1.5"]{--tblr-border-radius-scale:1.5}[data-bs-theme-radius="2"]{--tblr-border-radius-scale:2}[data-bs-theme-primary=inverted]{--tblr-primary:var(--tblr-gray-800);--tblr-primary-fg:var(--tblr-light);--tblr-primary-rgb:31,41,55}[data-bs-theme-primary=inverted] [data-bs-theme=dark],[data-bs-theme-primary=inverted][data-bs-theme=dark]{--tblr-primary:#f9fafb;--tblr-primary-fg:var(--tblr-dark);--tblr-primary-rgb:249,250,251}[data-bs-theme-font=monospace]{--tblr-body-font-family:var(--tblr-font-monospace);--tblr-body-font-size:80%}[data-bs-theme-font=sans-serif]{--tblr-body-font-family:var(--tblr-font-sans-serif)}[data-bs-theme-font=serif]{--tblr-body-font-family:var(--tblr-font-serif)}[data-bs-theme-font=comic]{--tblr-body-font-family:var(--tblr-font-comic)}:root{--color-error-inputs: red}[data-bs-theme=dark]{--color-error-inputs: oklch(.666 .179 58.318)}.style-custom-v-required-default{display:flex!important;justify-content:center!important;flex-direction:column!important;gap:2px}.style-custom-v-required-error .v-required-span{color:var(--color-error-inputs)!important;white-space:pre-wrap}.multiselect__tags{background-color:var(--cor-bg-inputs);border:var(--border-inputs);border-radius:5px!important;font-size:.875rem;line-height:1.4285714286}.multiselect__placeholder{color:var(--color-text-multiselect)!important}.style-custom-v-required-error input,.style-custom-v-required-error select,.style-custom-v-required-error textarea{border:2px solid var(--color-error-inputs)!important;color:var(--color-error-inputs)!important}.style-custom-v-required-error .multiselect__tags{border:2px solid var(--color-error-inputs)!important}.style-custom-v-required-error .multiselect__input{border:none!important}.style-custom-v-required-error .multiselect__placeholder{color:var(--color-error-inputs)!important}.style-custom-v-required-error .image-drop-zone{border-color:var(--color-error-inputs)!important}.style-custom-v-required-error .quillWrapper{border:2px solid var(--color-error-inputs)!important}.style-custom-v-required-error input::placeholder{color:var(--color-error-inputs)!important}.rotate-180[data-v-785126fa] svg{transform:rotate(180deg)}.page-select[data-v-785126fa]{background-color:var(--tblr-primary)!important;color:#fff!important;border:none!important}.page-estilo[data-v-785126fa]{border:none;--cor-escurecida: color-mix(in srgb, var(--tblr-primary), #000 25%);background:transparent;padding:1px 10px;border-radius:7px;margin:0!important;transition:color .15s ease-in-out,background-color .15s ease-in-out}.page-estilo[data-v-785126fa]:hover{background:var(--cor-escurecida);color:#fff}.btn[data-v-785126fa]{padding:0!important;margin:0!important;background:transparent!important;border:none!important;box-shadow:none!important}[data-v-785126fa] .btn-estilo svg{padding:0!important;margin:0!important}[data-v-785126fa] .btn-estilo:hover svg{stroke:var(--tblr-primary)}.icon-tabler[data-v-785126fa]{margin:0!important;padding:0!important}.t-container{width:100%;display:flex;justify-content:space-between;align-items:center;color:#fff}.scroll-finish-style[data-v-77d6f2cb]{color:#6c757d;display:block;text-align:center;margin-top:1rem;margin-bottom:1rem}.inputClose[data-v-dc655be7]{color:var(--tblr-icon-color);z-index:10;position:absolute;top:50%;right:0;transform:translateY(-50%);font-size:1.2em;min-width:2.5rem;display:flex;justify-content:center}.inputClose[data-v-dc655be7]:hover{cursor:pointer}.selected[data-v-dc655be7]:hover{background-color:#b02a2a!important;color:#fff!important}.table-responsive[data-v-87ed687a]{overflow-x:auto}.state-feedback[data-v-87ed687a]{padding:1rem;text-align:center}.state-feedback.error[data-v-87ed687a]{color:red}.pagination-controls[data-v-87ed687a]{margin-top:1rem;display:flex;justify-content:space-between}.placeholder-img[data-v-87ed687a]{width:40px;height:40px;border-radius:4px}.container-img[data-v-87ed687a]{aspect-ratio:1;display:flex;justify-content:center;overflow:hidden;position:relative;max-width:40px;min-width:40px}.container-img .img-tamanho-cover[data-v-87ed687a]{position:absolute;top:0;width:100%;height:100%;object-fit:cover;z-index:0;opacity:.5;filter:blur(4px)}.container-img .img-tamanho[data-v-87ed687a]{object-fit:contain;width:100%;height:100%;z-index:2}.container-img.container-img-preview[data-v-87ed687a]{cursor:pointer}.container-img.container-img-preview[data-v-87ed687a]:hover{border-style:dashed;border-color:var(--tblr-primary);border-width:2px;transition:border-width .15s ease-in-out}.container-img.container-img-preview:hover .img-tamanho[data-v-87ed687a]{opacity:.3}.erro-custom-container[data-v-87ed687a]{display:inline-block;padding:.2em .6em;border-radius:4px;background-color:#fff;font-weight:700;text-transform:uppercase}.erro-custom-text[data-v-87ed687a]{font-size:.8em;text-transform:uppercase;font-weight:700}.bg-img[data-v-87ed687a]{background-color:#0000004d;position:absolute;top:0;width:100%;height:100%;z-index:1}.image-preview-container[data-v-87ed687a]{position:fixed;z-index:9999;background-color:#fff;border-radius:8px;box-shadow:0 4px 12px #0003;padding:5px;pointer-events:none;transition:opacity .2s ease-in-out}.image-preview-container .image-preview-large[data-v-87ed687a]{display:block;max-width:250px;max-height:250px;border-radius:4px}.form-check-input[data-v-87ed687a]{border-width:1px!important;border-color:#00000064!important;width:17px;height:17px}[data-bs-theme=dark] .form-check-input[data-v-87ed687a]{border-color:#ffffff5f!important}.ghost-item[data-v-87ed687a]{opacity:.5;background:var(--tblr-primary-lt, #e6f0ff);border-radius:8px}.dragging-item[data-v-87ed687a]{cursor:grabbing;background:var(--tblr-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d;opacity:.5;background-color:var(--tblr-primary-bg-subtle);filter:grayscale(0) invert(0)}.header-draggable[data-v-87ed687a]{cursor:grab}.column-move-move[data-v-87ed687a]{transition:transform .4s ease}.column-move-enter-active[data-v-87ed687a],.column-move-leave-active[data-v-87ed687a]{transition:all .4s ease}.header-ordering[data-v-87ed687a]{display:flex;justify-content:space-between}
|
package/dist/vDataPage.d.ts
CHANGED
package/dist/vDataPage.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as Q, ref as _, toRefs as oe, createElementBlock as g, watch as P, onMounted as ue, onUnmounted as se, openBlock as m, withDirectives as de, renderSlot as
|
|
2
|
-
import { P as
|
|
3
|
-
function
|
|
1
|
+
import { defineComponent as Q, ref as _, toRefs as oe, createElementBlock as g, watch as P, onMounted as ue, onUnmounted as se, openBlock as m, withDirectives as de, renderSlot as y, createCommentVNode as U, createElementVNode as k, createVNode as q, vShow as fe, toDisplayString as G, nextTick as T, pushScopeId as ce, popScopeId as pe, computed as R, readonly as _e, isRef as ge, Fragment as z, normalizeClass as M, renderList as W, unref as D, withCtx as $ } from "vue";
|
|
2
|
+
import { P as me, _ as ve } from "./Pagination-DtVDFQ07.js";
|
|
3
|
+
function he(a, d = null) {
|
|
4
4
|
if (!a)
|
|
5
5
|
return !1;
|
|
6
6
|
const u = a.getBoundingClientRect(), i = d ? d.getBoundingClientRect() : { top: 0, left: 0, bottom: window.innerHeight, right: window.innerWidth };
|
|
7
7
|
return u.bottom >= i.top && u.top <= i.bottom && u.right >= i.left && u.left <= i.right;
|
|
8
8
|
}
|
|
9
|
-
async function
|
|
10
|
-
return a ? (await
|
|
9
|
+
async function ye(a) {
|
|
10
|
+
return a ? (await T(), a.value instanceof HTMLElement ? a.value : a.value ? document.querySelector(a.value) : null) : null;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function ke(a) {
|
|
13
13
|
let d = `0px 0px ${a.distance}px 0px`;
|
|
14
14
|
a.top && (d = `${a.distance}px 0px 0px 0px`);
|
|
15
15
|
const u = new IntersectionObserver(
|
|
@@ -21,7 +21,7 @@ function Ie(a) {
|
|
|
21
21
|
return a.infiniteLoading.value && u.observe(a.infiniteLoading.value), u;
|
|
22
22
|
}
|
|
23
23
|
async function J(a, d) {
|
|
24
|
-
if (await
|
|
24
|
+
if (await T(), !a.top)
|
|
25
25
|
return;
|
|
26
26
|
const u = a.parentEl || document.documentElement;
|
|
27
27
|
u.scrollTop = u.scrollHeight - d;
|
|
@@ -31,13 +31,13 @@ const Y = (a, d) => {
|
|
|
31
31
|
for (const [i, e] of d)
|
|
32
32
|
u[i] = e;
|
|
33
33
|
return u;
|
|
34
|
-
},
|
|
35
|
-
|
|
34
|
+
}, Ie = {}, we = (a) => (ce("data-v-d3e37633"), a = a(), pe(), a), Le = { class: "container" }, Ee = /* @__PURE__ */ we(() => /* @__PURE__ */ k("div", { class: "spinner" }, null, -1)), be = [
|
|
35
|
+
Ee
|
|
36
36
|
];
|
|
37
|
-
function
|
|
38
|
-
return m(), g("div",
|
|
37
|
+
function xe(a, d) {
|
|
38
|
+
return m(), g("div", Le, be);
|
|
39
39
|
}
|
|
40
|
-
const
|
|
40
|
+
const De = /* @__PURE__ */ Y(Ie, [["render", xe], ["__scopeId", "data-v-d3e37633"]]), Pe = { class: "state-error" }, Te = /* @__PURE__ */ Q({
|
|
41
41
|
__name: "InfiniteLoading",
|
|
42
42
|
props: {
|
|
43
43
|
top: { type: Boolean, default: !1 },
|
|
@@ -51,71 +51,71 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
51
51
|
setup(a, { emit: d }) {
|
|
52
52
|
const u = a;
|
|
53
53
|
let i = null, e = 0;
|
|
54
|
-
const I = _(null),
|
|
54
|
+
const I = _(null), v = _(""), { top: B, firstload: s, distance: o } = u, { identifier: F, target: S } = oe(u), f = {
|
|
55
55
|
infiniteLoading: I,
|
|
56
|
-
top:
|
|
56
|
+
top: B,
|
|
57
57
|
firstload: s,
|
|
58
58
|
distance: o,
|
|
59
59
|
parentEl: null,
|
|
60
60
|
emit() {
|
|
61
|
-
e = (
|
|
61
|
+
e = (f.parentEl || document.documentElement).scrollHeight, w.loading(), d("infinite", w);
|
|
62
62
|
}
|
|
63
63
|
}, w = {
|
|
64
64
|
loading() {
|
|
65
|
-
|
|
65
|
+
v.value = "loading";
|
|
66
66
|
},
|
|
67
67
|
async loaded() {
|
|
68
|
-
|
|
68
|
+
v.value = "loaded", await J(f, e), he(I.value, f.parentEl) && f.emit();
|
|
69
69
|
},
|
|
70
70
|
async complete() {
|
|
71
|
-
|
|
71
|
+
v.value = "complete", await J(f, e), i?.disconnect();
|
|
72
72
|
},
|
|
73
73
|
error() {
|
|
74
|
-
|
|
74
|
+
v.value = "error";
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
function n() {
|
|
78
|
-
i?.disconnect(), i =
|
|
78
|
+
i?.disconnect(), i = ke(f);
|
|
79
79
|
}
|
|
80
|
-
return P(
|
|
81
|
-
|
|
80
|
+
return P(F, n), ue(async () => {
|
|
81
|
+
f.parentEl = await ye(S), n();
|
|
82
82
|
}), se(() => i?.disconnect()), (L, C) => (m(), g("div", {
|
|
83
83
|
ref_key: "infiniteLoading",
|
|
84
84
|
ref: I,
|
|
85
85
|
class: "v3-infinite-loading"
|
|
86
86
|
}, [
|
|
87
|
-
de(
|
|
88
|
-
|
|
89
|
-
q(
|
|
87
|
+
de(k("div", null, [
|
|
88
|
+
y(L.$slots, "spinner", {}, () => [
|
|
89
|
+
q(De)
|
|
90
90
|
], !0)
|
|
91
91
|
], 512), [
|
|
92
|
-
[
|
|
92
|
+
[fe, v.value == "loading"]
|
|
93
93
|
]),
|
|
94
|
-
|
|
95
|
-
var
|
|
94
|
+
v.value == "complete" ? y(L.$slots, "complete", { key: 0 }, () => {
|
|
95
|
+
var c;
|
|
96
96
|
return [
|
|
97
|
-
|
|
97
|
+
k("span", null, G(((c = L.slots) == null ? void 0 : c.complete) || "No more results!"), 1)
|
|
98
98
|
];
|
|
99
99
|
}, !0) : U("", !0),
|
|
100
|
-
|
|
100
|
+
v.value == "error" ? y(L.$slots, "error", {
|
|
101
101
|
key: 1,
|
|
102
|
-
retry:
|
|
102
|
+
retry: f.emit
|
|
103
103
|
}, () => {
|
|
104
|
-
var
|
|
104
|
+
var c;
|
|
105
105
|
return [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
k("span", Pe, [
|
|
107
|
+
k("span", null, G(((c = L.slots) == null ? void 0 : c.error) || "Oops something went wrong!"), 1),
|
|
108
|
+
k("button", {
|
|
109
109
|
class: "retry",
|
|
110
110
|
onClick: C[0] || (C[0] = //@ts-ignore
|
|
111
|
-
(...b) =>
|
|
111
|
+
(...b) => f.emit && f.emit(...b))
|
|
112
112
|
}, "retry")
|
|
113
113
|
])
|
|
114
114
|
];
|
|
115
115
|
}, !0) : U("", !0)
|
|
116
116
|
], 512));
|
|
117
117
|
}
|
|
118
|
-
}), K = /* @__PURE__ */ Y(
|
|
118
|
+
}), K = /* @__PURE__ */ Y(Te, [["__scopeId", "data-v-4bdee133"]]), Be = /* @__PURE__ */ Q({
|
|
119
119
|
__name: "VDataPage",
|
|
120
120
|
props: {
|
|
121
121
|
fetch: {},
|
|
@@ -152,7 +152,7 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
152
152
|
},
|
|
153
153
|
emits: ["tradePage", "beforeFetch", "afterFetch"],
|
|
154
154
|
setup(a, { expose: d, emit: u }) {
|
|
155
|
-
const i = u, e = a, I = _(!0),
|
|
155
|
+
const i = u, e = a, I = _(!0), v = _(Date.now()), B = _(Date.now()), s = _([]), o = _([]), F = _(0), S = _(!1), f = _(null), w = _(!1), n = _({
|
|
156
156
|
current_page: e.page_starts_at,
|
|
157
157
|
// pagina atual
|
|
158
158
|
count: 0,
|
|
@@ -163,44 +163,44 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
163
163
|
// termo de busca
|
|
164
164
|
filter: ""
|
|
165
165
|
// filtro selecionado
|
|
166
|
-
}), { data: L, pending: C, error:
|
|
166
|
+
}), { data: L, pending: C, error: c, execute: b, attempt: Fe } = e.fetch(e.endpoint, {
|
|
167
167
|
params: () => e.deactivate_default_params ? e.add_params && typeof e.add_params == "function" ? e.add_params() : {
|
|
168
168
|
...e.add_params
|
|
169
169
|
} : e.add_params && typeof e.add_params == "function" ? {
|
|
170
|
-
...
|
|
170
|
+
...A.value,
|
|
171
171
|
...e.add_params()
|
|
172
172
|
} : {
|
|
173
|
-
...
|
|
173
|
+
...A.value,
|
|
174
174
|
...e.add_params
|
|
175
175
|
},
|
|
176
176
|
retry: e.retry_attempts,
|
|
177
177
|
retryDelay: e.retry_delay,
|
|
178
178
|
paramsReactives: !1,
|
|
179
179
|
immediate: !1
|
|
180
|
-
}, e.fetch_name),
|
|
180
|
+
}, e.fetch_name), A = R(() => ({
|
|
181
181
|
[e.page_param_name]: n.value.current_page + 1,
|
|
182
182
|
[e.page_size_param_name]: n.value.limit_per_page,
|
|
183
183
|
[e.search_param_name]: n.value.search || "",
|
|
184
184
|
[e.filter_param_name]: n.value.filter || ""
|
|
185
|
-
})), X =
|
|
185
|
+
})), X = R(() => C.value || S.value);
|
|
186
186
|
P(L, (t) => {
|
|
187
|
-
t ? (s.value = t[e.data_key] || [],
|
|
187
|
+
t ? (s.value = t[e.data_key] || [], F.value = t[e.total_key] || 0, n.value.count = F.value) : (s.value = [], F.value = 0);
|
|
188
188
|
}, { immediate: !0 });
|
|
189
189
|
function x() {
|
|
190
190
|
n.value.current_page = e.page_starts_at, E();
|
|
191
191
|
}
|
|
192
192
|
async function E() {
|
|
193
|
-
if (
|
|
194
|
-
|
|
193
|
+
if (f.value && clearTimeout(f.value), S.value = !0, f.value = setTimeout(() => {
|
|
194
|
+
S.value = !1;
|
|
195
195
|
}, e.min_loading_delay), e.type_fetch === "infinite-scroll")
|
|
196
196
|
return b();
|
|
197
197
|
e.type_fetch === "pagination" && (i("beforeFetch"), await b(), i("afterFetch"));
|
|
198
198
|
}
|
|
199
199
|
let N = 0;
|
|
200
|
-
async function
|
|
200
|
+
async function H() {
|
|
201
201
|
N++;
|
|
202
202
|
const t = N;
|
|
203
|
-
s.value = [], o.value = [], n.value.current_page = e.page_starts_at, i("beforeFetch"), await E(), i("afterFetch"), t === N &&
|
|
203
|
+
s.value = [], o.value = [], n.value.current_page = e.page_starts_at, i("beforeFetch"), await E(), i("afterFetch"), t === N && T(() => {
|
|
204
204
|
if (t !== N)
|
|
205
205
|
return;
|
|
206
206
|
let r = crypto.randomUUID();
|
|
@@ -210,7 +210,7 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
210
210
|
o.value.forEach((l) => {
|
|
211
211
|
l.idhashInfiniteLoading === r && (l.loading = !1, delete l.idhashInfiniteLoading);
|
|
212
212
|
});
|
|
213
|
-
}, e.min_loading_delay), w.value = !0,
|
|
213
|
+
}, e.min_loading_delay), w.value = !0, v.value++, B.value++;
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
216
|
function Z(t) {
|
|
@@ -233,16 +233,16 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
233
233
|
set_filter: te,
|
|
234
234
|
set_page: ae,
|
|
235
235
|
reSearch: x,
|
|
236
|
-
default_params:
|
|
236
|
+
default_params: A
|
|
237
237
|
});
|
|
238
|
-
const
|
|
238
|
+
const j = R(() => L.value?.[e.next_page_response_name] || null);
|
|
239
239
|
async function ne(t) {
|
|
240
240
|
if (!w.value) return;
|
|
241
|
-
if (!
|
|
241
|
+
if (!j.value) {
|
|
242
242
|
t.complete();
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
245
|
-
if (n.value.current_page += 1, await b(),
|
|
245
|
+
if (n.value.current_page += 1, await b(), c.value) {
|
|
246
246
|
t.error();
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
@@ -251,7 +251,7 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
251
251
|
return;
|
|
252
252
|
}
|
|
253
253
|
const r = s.value.filter(
|
|
254
|
-
(p) => !o.value.some((
|
|
254
|
+
(p) => !o.value.some((V) => V[e.item_key] === p[e.item_key])
|
|
255
255
|
);
|
|
256
256
|
if (r.length === 0 && s.value.length > 0) {
|
|
257
257
|
t.loaded();
|
|
@@ -264,8 +264,8 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
264
264
|
o.value.forEach((p) => {
|
|
265
265
|
p.idhashInfiniteLoading === l && (p.loading = !1, delete p.idhashInfiniteLoading);
|
|
266
266
|
});
|
|
267
|
-
}, e.min_loading_delay),
|
|
268
|
-
o.value && o.value.length > n.value.limit_per_page * 2 && o.value.splice(0, n.value.limit_per_page),
|
|
267
|
+
}, e.min_loading_delay), T(() => {
|
|
268
|
+
o.value && o.value.length > n.value.limit_per_page * 2 && o.value.splice(0, n.value.limit_per_page), j.value ? t.loaded() : t.complete(), B.value++;
|
|
269
269
|
});
|
|
270
270
|
}
|
|
271
271
|
async function ie(t) {
|
|
@@ -281,7 +281,7 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
281
281
|
t.error();
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
if (n.value.current_page -= 1, await b(),
|
|
284
|
+
if (n.value.current_page -= 1, await b(), c.value) {
|
|
285
285
|
t.error();
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
@@ -290,34 +290,34 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
290
290
|
return;
|
|
291
291
|
}
|
|
292
292
|
const p = s.value.filter(
|
|
293
|
-
(
|
|
294
|
-
),
|
|
295
|
-
if (p.forEach((
|
|
296
|
-
|
|
293
|
+
(h) => !o.value.some((re) => re[e.item_key] === h[e.item_key])
|
|
294
|
+
), V = crypto.randomUUID();
|
|
295
|
+
if (p.forEach((h) => {
|
|
296
|
+
h.loading = !0, h.idhashInfiniteLoading = V;
|
|
297
297
|
}), p.length === 0 && s.value.length > 0) {
|
|
298
298
|
t.loaded();
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
o.value.unshift(...p), o.value && o.value.length > n.value.limit_per_page * 2 && o.value.splice(-n.value.limit_per_page, n.value.limit_per_page), setTimeout(() => {
|
|
302
|
-
o.value.forEach((
|
|
303
|
-
|
|
302
|
+
o.value.forEach((h) => {
|
|
303
|
+
h.idhashInfiniteLoading === V && (h.loading = !1, delete h.idhashInfiniteLoading);
|
|
304
304
|
});
|
|
305
|
-
}, e.min_loading_delay),
|
|
306
|
-
const
|
|
307
|
-
|
|
305
|
+
}, e.min_loading_delay), T(() => {
|
|
306
|
+
const h = document.getElementById(e.element_id + l);
|
|
307
|
+
h ? h.scrollIntoView({ behavior: "auto", block: "start" }) : console.warn(`
|
|
308
308
|
Elemento não encontrado para scroll verifique se a propriedade 'element_id' está correta ou não foi definida.
|
|
309
|
-
`),
|
|
309
|
+
`), v.value++, t.loaded();
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const O = [];
|
|
313
313
|
e.watch && Array.isArray(e.watch) && e.watch.forEach((t) => {
|
|
314
|
-
(ge(t) || typeof t == "function") &&
|
|
314
|
+
(ge(t) || typeof t == "function") && O.push(t);
|
|
315
315
|
}), P(() => n.value.current_page, () => {
|
|
316
316
|
i("tradePage");
|
|
317
|
-
}),
|
|
317
|
+
}), O.length > 0 && (e.type_fetch === "pagination" ? P(O, () => {
|
|
318
318
|
x();
|
|
319
|
-
}, { deep: !0 }) : e.type_fetch === "infinite-scroll" && P(
|
|
320
|
-
w.value = !1,
|
|
319
|
+
}, { deep: !0 }) : e.type_fetch === "infinite-scroll" && P(O, () => {
|
|
320
|
+
w.value = !1, H();
|
|
321
321
|
}, { deep: !0 }));
|
|
322
322
|
function le() {
|
|
323
323
|
i("tradePage"), E();
|
|
@@ -325,104 +325,101 @@ const Te = /* @__PURE__ */ Y(we, [["render", De], ["__scopeId", "data-v-d3e37633
|
|
|
325
325
|
return P(
|
|
326
326
|
() => e.add_params,
|
|
327
327
|
() => {
|
|
328
|
-
I.value ?
|
|
329
|
-
I.value && e.type_fetch === "infinite-scroll" ? (
|
|
330
|
-
}) : e.type_fetch === "pagination" ? x() : e.type_fetch === "infinite-scroll" && (w.value = !1,
|
|
328
|
+
I.value ? T(() => {
|
|
329
|
+
I.value && e.type_fetch === "infinite-scroll" ? (H(), I.value = !1) : I.value && e.type_fetch === "pagination" && (E(), I.value = !1);
|
|
330
|
+
}) : e.type_fetch === "pagination" ? x() : e.type_fetch === "infinite-scroll" && (w.value = !1, H());
|
|
331
331
|
},
|
|
332
332
|
{ deep: !0, immediate: !0 }
|
|
333
|
-
), (t, r) => (m(), g(
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
}, void 0, !0)), 128))
|
|
345
|
-
], 2)) : T(f) ? k(t.$slots, "error", {
|
|
346
|
-
key: 1,
|
|
347
|
-
error: T(f)
|
|
348
|
-
}, () => [
|
|
349
|
-
r[0] || (r[0] = v("div", {
|
|
350
|
-
class: "alert alert-danger",
|
|
351
|
-
role: "alert"
|
|
352
|
-
}, " Ocorreu um erro ao carregar os dados. ", -1))
|
|
353
|
-
], !0) : n.value.count === 0 ? k(t.$slots, "empty", { key: 2 }, () => [
|
|
354
|
-
r[1] || (r[1] = v("div", {
|
|
355
|
-
class: "alert alert-info",
|
|
356
|
-
role: "alert"
|
|
357
|
-
}, " Nenhum registro encontrado. ", -1))
|
|
358
|
-
], !0) : (m(), g("div", {
|
|
359
|
-
key: 3,
|
|
360
|
-
class: M(e.class_container)
|
|
361
|
-
}, [
|
|
362
|
-
(m(!0), g(D, null, $(s.value, (l) => k(t.$slots, "body", {
|
|
363
|
-
key: l[e.item_key],
|
|
364
|
-
item: l
|
|
365
|
-
}, void 0, !0)), 128))
|
|
366
|
-
], 2))
|
|
367
|
-
], 64)) : a.type_fetch === "infinite-scroll" ? (m(), g("div", {
|
|
333
|
+
), (t, r) => (m(), g("div", null, [
|
|
334
|
+
a.type_fetch === "pagination" ? (m(), g(z, { key: 0 }, [
|
|
335
|
+
X.value ? (m(), g("div", {
|
|
336
|
+
key: 0,
|
|
337
|
+
class: M(e.class_loading_container)
|
|
338
|
+
}, [
|
|
339
|
+
(m(!0), g(z, null, W(n.value.limit_per_page, (l) => y(t.$slots, "loading", {
|
|
340
|
+
key: "placeholder-" + l,
|
|
341
|
+
n: l
|
|
342
|
+
}, void 0, !0)), 128))
|
|
343
|
+
], 2)) : D(c) ? y(t.$slots, "error", {
|
|
368
344
|
key: 1,
|
|
345
|
+
error: D(c)
|
|
346
|
+
}, () => [
|
|
347
|
+
r[0] || (r[0] = k("div", {
|
|
348
|
+
class: "alert alert-danger",
|
|
349
|
+
role: "alert"
|
|
350
|
+
}, " Ocorreu um erro ao carregar os dados. ", -1))
|
|
351
|
+
], !0) : n.value.count === 0 ? y(t.$slots, "empty", { key: 2 }, () => [
|
|
352
|
+
r[1] || (r[1] = k("div", {
|
|
353
|
+
class: "alert alert-info",
|
|
354
|
+
role: "alert"
|
|
355
|
+
}, " Nenhum registro encontrado. ", -1))
|
|
356
|
+
], !0) : (m(), g("div", {
|
|
357
|
+
key: 3,
|
|
369
358
|
class: M(e.class_container)
|
|
370
359
|
}, [
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
k(t.$slots, "scroll-finish", {}, () => [
|
|
398
|
-
r[4] || (r[4] = v("span", { class: "scroll-finish-style" }, " Fim dos registros", -1))
|
|
399
|
-
], !0)
|
|
400
|
-
]),
|
|
401
|
-
_: 3
|
|
402
|
-
}, 8, ["identifier"])
|
|
403
|
-
], 2)) : U("", !0),
|
|
404
|
-
a.type_fetch === "pagination" ? k(t.$slots, "pagination", {
|
|
405
|
-
key: 2,
|
|
406
|
-
pagination: n.value,
|
|
407
|
-
tradePage: E,
|
|
408
|
-
error: T(f)
|
|
409
|
-
}, () => [
|
|
410
|
-
!T(f) && n.value.count > 0 ? (m(), g("div", {
|
|
360
|
+
(m(!0), g(z, null, W(s.value, (l) => y(t.$slots, "body", {
|
|
361
|
+
key: l[e.item_key],
|
|
362
|
+
item: l
|
|
363
|
+
}, void 0, !0)), 128))
|
|
364
|
+
], 2))
|
|
365
|
+
], 64)) : a.type_fetch === "infinite-scroll" ? (m(), g("div", {
|
|
366
|
+
key: 1,
|
|
367
|
+
class: M(e.class_container)
|
|
368
|
+
}, [
|
|
369
|
+
q(D(K), {
|
|
370
|
+
identifier: B.value,
|
|
371
|
+
direction: "top",
|
|
372
|
+
onInfinite: ie
|
|
373
|
+
}, {
|
|
374
|
+
complete: $(() => [...r[2] || (r[2] = [
|
|
375
|
+
k("span", null, null, -1)
|
|
376
|
+
])]),
|
|
377
|
+
spinner: $(() => [...r[3] || (r[3] = [
|
|
378
|
+
k("span", null, null, -1)
|
|
379
|
+
])]),
|
|
380
|
+
_: 1
|
|
381
|
+
}, 8, ["identifier"]),
|
|
382
|
+
(m(!0), g(z, null, W(o.value, (l) => (m(), g(z, {
|
|
383
|
+
key: l[e.item_key]
|
|
384
|
+
}, [
|
|
385
|
+
l.loading ? y(t.$slots, "loading", { key: 1 }, void 0, !0) : y(t.$slots, "body", {
|
|
411
386
|
key: 0,
|
|
412
|
-
|
|
413
|
-
},
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
387
|
+
item: l
|
|
388
|
+
}, void 0, !0)
|
|
389
|
+
], 64))), 128)),
|
|
390
|
+
q(D(K), {
|
|
391
|
+
identifier: v.value,
|
|
392
|
+
onInfinite: ne
|
|
393
|
+
}, {
|
|
394
|
+
complete: $(() => [
|
|
395
|
+
y(t.$slots, "scroll-finish", {}, () => [
|
|
396
|
+
r[4] || (r[4] = k("span", { class: "scroll-finish-style" }, " Fim dos registros", -1))
|
|
397
|
+
], !0)
|
|
398
|
+
]),
|
|
399
|
+
_: 3
|
|
400
|
+
}, 8, ["identifier"])
|
|
401
|
+
], 2)) : U("", !0),
|
|
402
|
+
a.type_fetch === "pagination" ? y(t.$slots, "pagination", {
|
|
403
|
+
key: 2,
|
|
404
|
+
pagination: n.value,
|
|
405
|
+
tradePage: E,
|
|
406
|
+
error: D(c)
|
|
407
|
+
}, () => [
|
|
408
|
+
!D(c) && n.value.count > 0 ? (m(), g("div", {
|
|
409
|
+
key: 0,
|
|
410
|
+
class: M(["px-3", e.class_pagination])
|
|
411
|
+
}, [
|
|
412
|
+
q(me, {
|
|
413
|
+
filtering: !0,
|
|
414
|
+
page_starts_at: e.page_starts_at,
|
|
415
|
+
pagination: n.value,
|
|
416
|
+
onTradePage: le
|
|
417
|
+
}, null, 8, ["page_starts_at", "pagination"])
|
|
418
|
+
], 2)) : U("", !0)
|
|
419
|
+
], !0) : U("", !0)
|
|
420
|
+
]));
|
|
424
421
|
}
|
|
425
|
-
}),
|
|
422
|
+
}), Ue = /* @__PURE__ */ ve(Be, [["__scopeId", "data-v-77d6f2cb"]]);
|
|
426
423
|
export {
|
|
427
|
-
|
|
424
|
+
Ue as VDataPage
|
|
428
425
|
};
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { onMounted, onUnmounted, readonly, ref } from 'vue';
|
|
|
4
4
|
* Um Composable para gerenciar a comunicação entre um iframe e sua janela pai.
|
|
5
5
|
* @param onMessageReceived - Uma função de callback que será executada quando uma mensagem for recebida do pai.
|
|
6
6
|
*/
|
|
7
|
-
export function useIframeCommunicator(onMessageReceived
|
|
7
|
+
export function useIframeCommunicator(onMessageReceived?: (event: MessageEvent) => void) {
|
|
8
8
|
|
|
9
9
|
// Uma ref reativa para saber se o app está rodando dentro de um iframe
|
|
10
10
|
const isInIframe = ref(window.parent !== window);
|
|
@@ -22,12 +22,16 @@ export function useIframeCommunicator(onMessageReceived: (event: MessageEvent) =
|
|
|
22
22
|
|
|
23
23
|
// Configura o ouvinte de eventos quando o componente é montado
|
|
24
24
|
onMounted(() => {
|
|
25
|
-
|
|
25
|
+
if (onMessageReceived){
|
|
26
|
+
window.addEventListener('message', onMessageReceived);
|
|
27
|
+
}
|
|
26
28
|
});
|
|
27
29
|
|
|
28
30
|
// Remove o ouvinte de eventos quando o componente é desmontado
|
|
29
31
|
onUnmounted(() => {
|
|
30
|
-
|
|
32
|
+
if (onMessageReceived){
|
|
33
|
+
window.removeEventListener('message', onMessageReceived);
|
|
34
|
+
}
|
|
31
35
|
});
|
|
32
36
|
|
|
33
37
|
// Retorna os valores e funções que o componente poderá usar
|