@luizleon/sf.prefeiturasp.vuecomponents 0.0.36 → 0.0.37
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/lib.es.js +655 -665
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +2 -2
- package/dist/lib.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/index.ts +0 -22
- package/src/services/authService.ts +11 -1
- package/src/style/tema.scss +4 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -13,8 +13,6 @@ import { AppResult } from "./common/appResult";
|
|
|
13
13
|
|
|
14
14
|
import { Cor, Tamanho } from "./enum";
|
|
15
15
|
|
|
16
|
-
import { nextTick } from "vue";
|
|
17
|
-
|
|
18
16
|
import "./style/tema.scss";
|
|
19
17
|
import "./style/componentes.scss";
|
|
20
18
|
import { AxiosClient, UseAxiosClient } from "./axios/axiosClient";
|
|
@@ -35,26 +33,6 @@ export {
|
|
|
35
33
|
Tamanho,
|
|
36
34
|
AxiosClient,
|
|
37
35
|
};
|
|
38
|
-
/**
|
|
39
|
-
* https://stackoverflow.com/questions/37112218/css3-100vh-not-constant-in-mobile-browser
|
|
40
|
-
*/
|
|
41
|
-
(() => {
|
|
42
|
-
function Ajusta() {
|
|
43
|
-
nextTick(() => {
|
|
44
|
-
setTimeout(() => {
|
|
45
|
-
const root = document.querySelector(":root");
|
|
46
|
-
root &&
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
root.style.setProperty(
|
|
49
|
-
"--window-height",
|
|
50
|
-
`${window.visualViewport?.height ?? window.innerHeight}px`
|
|
51
|
-
);
|
|
52
|
-
}, 1);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
Ajusta();
|
|
56
|
-
window.addEventListener("resize", Ajusta);
|
|
57
|
-
})();
|
|
58
36
|
|
|
59
37
|
/**
|
|
60
38
|
* Tema inicial
|
|
@@ -47,6 +47,12 @@ function AuthService(config: KeycloakConfig) {
|
|
|
47
47
|
) => {
|
|
48
48
|
const check = await CheckSilentLoginFile();
|
|
49
49
|
if (!check) return;
|
|
50
|
+
if (initOptions.onLoad === "login-required") {
|
|
51
|
+
document.documentElement.setAttribute(
|
|
52
|
+
"data-app-message",
|
|
53
|
+
"Autorizando..."
|
|
54
|
+
);
|
|
55
|
+
}
|
|
50
56
|
return keycloakInstance
|
|
51
57
|
.init(initOptions)
|
|
52
58
|
.then(async (authenticated) => {
|
|
@@ -54,10 +60,14 @@ function AuthService(config: KeycloakConfig) {
|
|
|
54
60
|
await FetchUserInfo();
|
|
55
61
|
}
|
|
56
62
|
if (callback && typeof callback === "function") callback();
|
|
63
|
+
document.documentElement.classList.add("app-mounted");
|
|
57
64
|
})
|
|
58
65
|
.catch((e: any) => {
|
|
59
66
|
console.error(e);
|
|
60
|
-
document.
|
|
67
|
+
document.documentElement.setAttribute(
|
|
68
|
+
"data-app-message",
|
|
69
|
+
"Não foi possível conectar no servidor de autenticação."
|
|
70
|
+
);
|
|
61
71
|
});
|
|
62
72
|
};
|
|
63
73
|
|
package/src/style/tema.scss
CHANGED
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
@import "./src/normalize";
|
|
7
7
|
|
|
8
8
|
:root {
|
|
9
|
-
--window-height:
|
|
9
|
+
--window-height: 100svh;
|
|
10
10
|
--font-family: "Roboto", "Helvetica", "Arial", sans-serif;
|
|
11
11
|
--font-size: 1rem;
|
|
12
12
|
--font-weight: 400;
|
|
13
13
|
--line-height: 1.15;
|
|
14
14
|
--header-height: 60px;
|
|
15
|
-
--main-height: calc(
|
|
15
|
+
--main-height: calc(
|
|
16
|
+
var(--window-height, 100vh) - var(--header-height)
|
|
17
|
+
);
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
html,
|