@luizleon/sf.prefeiturasp.vuecomponents 0.0.66 → 4.0.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.
Files changed (78) hide show
  1. package/dist/sf.prefeiturasp.vuecomponents.cjs +423 -0
  2. package/dist/sf.prefeiturasp.vuecomponents.cjs.map +1 -0
  3. package/dist/sf.prefeiturasp.vuecomponents.js +8953 -0
  4. package/dist/sf.prefeiturasp.vuecomponents.js.map +1 -0
  5. package/dist/sf.prefeiturasp.vuecomponents.umd.cjs +423 -0
  6. package/dist/sf.prefeiturasp.vuecomponents.umd.cjs.map +1 -0
  7. package/dist/{axios → src/axios}/axiosClient.d.ts +7 -0
  8. package/dist/{components/button/Button.d.ts → src/components/button/Button.vue.d.ts} +16 -16
  9. package/dist/{components/content/Content.d.ts → src/components/content/Content.vue.d.ts} +7 -7
  10. package/dist/{components/drawer/Drawer.d.ts → src/components/drawer/Drawer.vue.d.ts} +15 -15
  11. package/dist/{components/icon/Icon.d.ts → src/components/icon/Icon.vue.d.ts} +23 -24
  12. package/dist/{components/internal/HeaderAvatar.d.ts → src/components/internal/HeaderAvatar.vue.d.ts} +2 -2
  13. package/dist/src/components/internal/LoadingCircle.vue.d.ts +2 -0
  14. package/dist/src/components/internal/MenuIcon.vue.d.ts +2 -0
  15. package/dist/src/components/internal/ScrollToTop.vue.d.ts +2 -0
  16. package/dist/src/components/internal/ThemeToggle.d.ts +10 -0
  17. package/dist/src/components/internal/ThemeToggle.vue.d.ts +2 -0
  18. package/dist/{components/layout/Layout.d.ts → src/components/layout/Layout.vue.d.ts} +9 -2
  19. package/dist/{components/message/Message.d.ts → src/components/message/Message.vue.d.ts} +14 -14
  20. package/dist/src/components/navmenu/NavMenu.vue.d.ts +15 -0
  21. package/dist/{components/tabnavigation/TabNavigation.d.ts → src/components/tabnavigation/TabNavigation.vue.d.ts} +9 -9
  22. package/dist/{components/tooltip/Tooltip.d.ts → src/components/tooltip/Tooltip.vue.d.ts} +7 -7
  23. package/dist/src/index.d.ts +17 -0
  24. package/dist/{types → src/types}/index.d.ts +11 -0
  25. package/dist/style.css +1 -1
  26. package/dist/tsconfig.tsbuildinfo +1 -0
  27. package/package.json +10 -9
  28. package/src/axios/axiosClient.ts +111 -3
  29. package/src/components/button/Button.vue +1 -1
  30. package/src/components/icon/Icon.vue +12 -16
  31. package/src/components/internal/getMaxZindex.ts +3 -2
  32. package/src/components/layout/Layout.vue +8 -1
  33. package/src/components/navmenu/NavMenu.vue +109 -0
  34. package/src/index.ts +2 -4
  35. package/src/keycloak.js +1485 -1890
  36. package/src/services/authService.ts +13 -4
  37. package/src/style/componentes.scss +5 -1
  38. package/src/style/src/_functions.scss +17 -2
  39. package/src/style/src/_mixins.scss +51 -29
  40. package/src/style/src/_variables.scss +11 -0
  41. package/src/style/src/components/_button.scss +8 -11
  42. package/src/style/src/components/_icon.scss +49 -47
  43. package/src/style/src/components/_tooltip.scss +6 -7
  44. package/src/types/index.ts +24 -0
  45. package/src/vite-env.d.ts +1 -0
  46. package/tsconfig.json +5 -3
  47. package/vite.config.js +2 -4
  48. package/dist/components/internal/LoadingCircle.d.ts +0 -2
  49. package/dist/components/internal/MenuIcon.d.ts +0 -2
  50. package/dist/components/internal/ScrollToTop.d.ts +0 -2
  51. package/dist/components/internal/ThemeToggle.d.ts +0 -2
  52. package/dist/components/navmenulink/NavMenuLink.d.ts +0 -18
  53. package/dist/components/panelmenu/PanelMenu.d.ts +0 -16
  54. package/dist/index.d.ts +0 -18
  55. package/dist/keycloak.d.ts +0 -671
  56. package/dist/sf.prefeiturasp.vuecomponents.es.js +0 -8685
  57. package/dist/sf.prefeiturasp.vuecomponents.es.js.map +0 -1
  58. package/dist/sf.prefeiturasp.vuecomponents.umd.js +0 -153
  59. package/dist/sf.prefeiturasp.vuecomponents.umd.js.map +0 -1
  60. package/src/components/button/Button.d.ts +0 -26
  61. package/src/components/content/Content.d.ts +0 -28
  62. package/src/components/drawer/Drawer.d.ts +0 -50
  63. package/src/components/icon/Icon.d.ts +0 -23
  64. package/src/components/layout/Layout.d.ts +0 -44
  65. package/src/components/message/Message.d.ts +0 -28
  66. package/src/components/navmenulink/NavMenuLink.d.ts +0 -29
  67. package/src/components/navmenulink/NavMenuLink.vue +0 -49
  68. package/src/components/panelmenu/PanelMenu.d.ts +0 -26
  69. package/src/components/panelmenu/PanelMenu.vue +0 -101
  70. package/src/components/tabnavigation/TabNavigation.d.ts +0 -34
  71. package/src/components/tooltip/Tooltip.d.ts +0 -23
  72. package/src/ts-helpers.d.ts +0 -57
  73. /package/dist/{common → src/common}/appResult.d.ts +0 -0
  74. /package/dist/{components → src/components}/internal/cssClassBuilder.d.ts +0 -0
  75. /package/dist/{components → src/components}/internal/getMaxZindex.d.ts +0 -0
  76. /package/dist/{services → src/services}/authService.d.ts +0 -0
  77. /package/dist/{services → src/services}/dialogService.d.ts +0 -0
  78. /package/dist/{services → src/services}/navMenuService.d.ts +0 -0
@@ -1,26 +0,0 @@
1
- import { VNode } from "vue";
2
- import { StyleValue } from "vue";
3
- import {
4
- ClassComponent,
5
- GlobalComponentConstructor,
6
- HintedString,
7
- } from "../../ts-helpers";
8
- import { SfButtonProps } from "./Button.vue";
9
-
10
- export interface SfButtonSlots {}
11
-
12
- export declare type SfButtonEmits = {};
13
-
14
- declare class SfButton extends ClassComponent<
15
- SfButtonProps,
16
- SfButtonSlots,
17
- SfButtonEmits
18
- > {}
19
-
20
- declare module "@vue/runtime-core" {
21
- interface GlobalComponents {
22
- SfButton: GlobalComponentConstructor<SfButton>;
23
- }
24
- }
25
-
26
- export default SfButton;
@@ -1,28 +0,0 @@
1
- import { VNode } from "vue";
2
- import { StyleValue } from "vue";
3
- import {
4
- ClassComponent,
5
- GlobalComponentConstructor,
6
- } from "../../ts-helpers";
7
-
8
- export interface SfContentSlots {
9
- header: () => VNode[];
10
- footer: () => VNode[];
11
- default: () => VNode[];
12
- }
13
-
14
- export declare type SfContentEmits = {};
15
-
16
- declare class SfContent extends ClassComponent<
17
- SfContentProps,
18
- SfContentSlots,
19
- SfContentEmits
20
- > {}
21
-
22
- declare module "@vue/runtime-core" {
23
- interface GlobalComponents {
24
- SfContent: GlobalComponentConstructor<SfContent>;
25
- }
26
- }
27
-
28
- export default SfContent;
@@ -1,50 +0,0 @@
1
- import { StyleValue, VNode } from "vue";
2
- import {
3
- ClassComponent,
4
- GlobalComponentConstructor,
5
- } from "../../ts-helpers";
6
- import { SfDrawerProps } from "./Drawer.vue";
7
-
8
- export interface SfDrawerSlots {
9
- /**
10
- * Default content slot.
11
- */
12
- default: () => VNode[];
13
- /**
14
- * Título da janela
15
- */
16
- title: () => VNode[];
17
- /**
18
- * Conteúdo para exibir no rodapé
19
- */
20
- footer: () => VNode[];
21
- }
22
-
23
- export declare type SfDrawerEmits = {
24
- /**
25
- * Emitted when the visible changes.
26
- */
27
- "update:visible": (value: boolean) => void;
28
- /**
29
- * Emitido após aberta
30
- */
31
- open: () => void;
32
- /**
33
- * Emitido antes de fechar
34
- */
35
- "before-close": () => void;
36
- };
37
-
38
- declare class SfDrawer extends ClassComponent<
39
- SfDrawerProps,
40
- SfDrawerSlots,
41
- SfDrawerEmits
42
- > {}
43
-
44
- declare module "@vue/runtime-core" {
45
- interface GlobalComponents {
46
- SfDrawer: GlobalComponentConstructor<SfDrawer>;
47
- }
48
- }
49
-
50
- export default SfDrawer;
@@ -1,23 +0,0 @@
1
- import {
2
- ClassComponent,
3
- GlobalComponentConstructor,
4
- } from "../../ts-helpers";
5
- import { SfIconProps } from "./Icon";
6
-
7
- export interface SfIconSlots {}
8
-
9
- export declare type SfIconEmits = {};
10
-
11
- declare class SfIcon extends ClassComponent<
12
- SfIconProps,
13
- SfIconSlots,
14
- SfIconEmits
15
- > {}
16
-
17
- declare module "@vue/runtime-core" {
18
- interface GlobalComponents {
19
- SfIcon: GlobalComponentConstructor<SfIcon>;
20
- }
21
- }
22
-
23
- export default SfIcon;
@@ -1,44 +0,0 @@
1
- import { VNode } from "vue";
2
- import {
3
- ClassComponent,
4
- GlobalComponentConstructor,
5
- } from "../ts-helpers";
6
- import { SfLayoutProps } from "./Layout.vue";
7
-
8
- export interface SfLayoutSlots {
9
- /**
10
- * Título ao lado do botão do menu
11
- */
12
- title: () => VNode[];
13
- /**
14
- * Conteúdo para ficar no menu
15
- */
16
- menu: () => VNode[];
17
- /**
18
- * Visível no footer da aplicação.
19
- */
20
- "app-version": () => VNode[];
21
- /**
22
- * Conteúdo principal
23
- */
24
- content: () => VNode[];
25
- }
26
-
27
- export declare type SfLayoutEmits = {
28
- mounted: () => void;
29
- logout: () => void;
30
- };
31
-
32
- declare class SfLayout extends ClassComponent<
33
- SfLayoutProps,
34
- SfLayoutSlots,
35
- SfLayoutEmits
36
- > {}
37
-
38
- declare module "@vue/runtime-core" {
39
- interface GlobalComponents {
40
- SfLayout: GlobalComponentConstructor<SfLayout>;
41
- }
42
- }
43
-
44
- export default SfLayout;
@@ -1,28 +0,0 @@
1
- import { VNode } from "vue";
2
- import { StyleValue } from "vue";
3
- import {
4
- ClassComponent,
5
- GlobalComponentConstructor,
6
- } from "../../ts-helpers";
7
- import { Cor } from "../../enum";
8
- import { SfMessageProps } from "./Message.vue";
9
-
10
- export interface SfMessageSlots {
11
- default: VNode[];
12
- }
13
-
14
- export declare type SfMessageEmits = {};
15
-
16
- declare class SfMessage extends ClassComponent<
17
- SfMessageProps,
18
- SfMessageSlots,
19
- SfMessageEmits
20
- > {}
21
-
22
- declare module "@vue/runtime-core" {
23
- interface GlobalComponents {
24
- SfMessage: GlobalComponentConstructor<SfMessage>;
25
- }
26
- }
27
-
28
- export default SfMessage;
@@ -1,29 +0,0 @@
1
- import {
2
- ClassComponent,
3
- GlobalComponentConstructor,
4
- } from "../../ts-helpers";
5
- import { SfNavMenuLinkProps } from "./NavMenuLink.vue";
6
-
7
- export interface SfNavMenuLinkSlots {}
8
-
9
- export declare type SfNavMenuLinkEmits = {};
10
-
11
- declare class SfNavMenuLink extends ClassComponent<
12
- SfNavMenuLinkProps,
13
- SfNavMenuLinkSlots,
14
- SfNavMenuLinkEmits
15
- > {}
16
-
17
- declare module "@vue/runtime-core" {
18
- interface GlobalComponents {
19
- SfNavMenuLink: GlobalComponentConstructor<SfNavMenuLink>;
20
- }
21
- }
22
-
23
- /**
24
- * Componente para navegação no menu.
25
- *
26
- * Dependência: router-link.
27
- * @see [https://router.vuejs.org/api/#router-link-s-v-slot](https://router.vuejs.org/api/#router-link-s-v-slot)
28
- */
29
- export default SfNavMenuLink;
@@ -1,49 +0,0 @@
1
- <script setup lang="ts">
2
- import { UseNavMenuService } from "../../services/navMenuService";
3
- import Icon from "../icon/Icon.vue";
4
-
5
- export interface SfNavMenuLinkProps {
6
- href: string;
7
- text: string;
8
- icon?: string;
9
- iconFilled?: boolean;
10
- exact?: boolean;
11
- }
12
-
13
- const props: SfNavMenuLinkProps = defineProps<SfNavMenuLinkProps>();
14
-
15
- const navService = UseNavMenuService();
16
-
17
- function OnClick(ev: Event, navigate: any) {
18
- ev.preventDefault();
19
- const target = ev.target as HTMLElement;
20
- const nav = target.closest(".sf-layout-nav-content");
21
- navigate();
22
- if (nav && nav.clientWidth + 10 > document.body.clientWidth) {
23
- navService.Close();
24
- }
25
- }
26
- </script>
27
-
28
- <template>
29
- <router-link
30
- :to="props.href"
31
- custom
32
- v-slot="{ href, navigate, isExactActive, isActive }"
33
- >
34
- <a
35
- class="sf-navmenulink"
36
- :href="href"
37
- :data-active="props.exact ? isExactActive : isActive"
38
- @click="OnClick($event, navigate)"
39
- >
40
- <Icon
41
- v-if="props.icon"
42
- :icon="props.icon"
43
- :filled="props.iconFilled"
44
- :button-props="{ tabindex: -1 }"
45
- />
46
- <span class="sf-navmenulink-text">{{ props.text }}</span>
47
- </a>
48
- </router-link>
49
- </template>
@@ -1,26 +0,0 @@
1
- import { VNode } from "vue";
2
- import { StyleValue } from "vue";
3
- import {
4
- ClassComponent,
5
- GlobalComponentConstructor,
6
- HintedString,
7
- } from "../../ts-helpers";
8
- import { SfPanelMenuProps } from "./PanelMenu.vue";
9
-
10
- export interface SfPanelMenuSlots {}
11
-
12
- export declare type SfPanelMenuEmits = {};
13
-
14
- declare class SfPanelMenu extends ClassComponent<
15
- SfPanelMenuProps,
16
- SfPanelMenuSlots,
17
- SfPanelMenuEmits
18
- > {}
19
-
20
- declare module "@vue/runtime-core" {
21
- interface GlobalComponents {
22
- SfPanelMenu: GlobalComponentConstructor<SfPanelMenu>;
23
- }
24
- }
25
-
26
- export default SfPanelMenu;
@@ -1,101 +0,0 @@
1
- <script setup lang="ts">
2
- import { useRoute } from "vue-router";
3
- import PanelMenu, { PanelMenuExpandedKeys } from "primevue/panelmenu";
4
- import Icon from "./../icon/Icon.vue";
5
- import { Ref, computed, ref, watch } from "vue";
6
- import { SfPanelMenuItem } from "../../types";
7
-
8
- interface Menu extends SfPanelMenuItem {
9
- parentKey?: string;
10
- }
11
-
12
- const props = defineProps<{
13
- items: SfPanelMenuItem[];
14
- }>();
15
-
16
- const route = useRoute();
17
-
18
- const menu: Ref<Menu[]> = computed(() => {
19
- return props.items;
20
- });
21
-
22
- AdicionarSourceKeys(menu.value);
23
-
24
- function AdicionarSourceKeys(
25
- items: Menu[],
26
- key: string | undefined = undefined
27
- ) {
28
- items.forEach((item) => {
29
- if (!!key) {
30
- item.parentKey = key;
31
- }
32
- if (item.items) {
33
- AdicionarSourceKeys(item.items, item.key);
34
- }
35
- });
36
- }
37
-
38
- const expandedKeys = ref<PanelMenuExpandedKeys>({});
39
-
40
- function MudancaDeRota(
41
- items: Menu[],
42
- route: string,
43
- key: string | undefined = undefined
44
- ) {
45
- items.forEach((item) => {
46
- if (!!item.routeName && item.routeName === route && !!key) {
47
- expandedKeys.value[key] = key === item.parentKey;
48
- }
49
- if (item.items) {
50
- MudancaDeRota(item.items, route, item.key);
51
- }
52
- });
53
- }
54
-
55
- watch(
56
- () => route.name,
57
- (v) => {
58
- if (!v) return;
59
- MudancaDeRota(menu.value, v.toString());
60
- }
61
- );
62
- </script>
63
-
64
- <template>
65
- <PanelMenu
66
- :model="menu"
67
- v-model:expandedKeys="expandedKeys"
68
- :multiple="true"
69
- :class="'sf-p-2'"
70
- >
71
- <template #item="{ item, active }">
72
- <router-link
73
- v-if="!!item.routeName"
74
- v-slot="{ href, navigate, isActive }"
75
- :to="{ name: item.routeName }"
76
- custom
77
- >
78
- <a
79
- class="sf-flex sf-align-items-center sf-px-3 sf-py-2 sf-ripple"
80
- :data-active="isActive"
81
- :href="href"
82
- @click="navigate"
83
- >
84
- <Icon :icon="item.icon ?? 'chevron_right'" />
85
- <span class="sf-ml-2">{{ item.label }}</span>
86
- </a>
87
- </router-link>
88
- <a
89
- v-else
90
- class="sf-flex sf-align-items-center sf-pl-3 sf-py-2"
91
- :href="item.url"
92
- :target="item.target"
93
- >
94
- <Icon v-if="item.icon" :icon="item.icon" />
95
- <span class="sf-ml-2">{{ item.label }}</span>
96
- <div class="sf-flex-grow-1"></div>
97
- <Icon :icon="active ? 'expand_less' : 'expand_more'" />
98
- </a>
99
- </template>
100
- </PanelMenu>
101
- </template>
@@ -1,34 +0,0 @@
1
- import {
2
- ClassComponent,
3
- GlobalComponentConstructor,
4
- } from "../../ts-helpers";
5
- import { SfTabNavigationProps } from "./TabNavigation.vue";
6
-
7
- export interface SfTabNavigationSlots {
8
- item: (scope: {
9
- navigate: () => void;
10
- isActive: boolean;
11
- }) => VNode[];
12
- }
13
-
14
- export declare type SfTabNavigationEmits = {};
15
-
16
- declare class SfTabNavigation extends ClassComponent<
17
- SfTabNavigationProps,
18
- SfTabNavigationSlots,
19
- SfTabNavigationEmits
20
- > {}
21
-
22
- declare module "@vue/runtime-core" {
23
- interface GlobalComponents {
24
- SfTabNavigation: GlobalComponentConstructor<SfTabNavigation>;
25
- }
26
- }
27
-
28
- /**
29
- * Componente para navegação em abas
30
- *
31
- * Dependência: router-link.
32
- * @see [https://router.vuejs.org/api/#router-link-s-v-slot](https://router.vuejs.org/api/#router-link-s-v-slot)
33
- */
34
- export default SfTabNavigation;
@@ -1,23 +0,0 @@
1
- import {
2
- ClassComponent,
3
- GlobalComponentConstructor,
4
- } from "../../ts-helpers";
5
- import { SfTooltipProps } from "./Tooltip.vue";
6
-
7
- export interface SfTooltipSlots {}
8
-
9
- export declare type SfTooltipEmits = {};
10
-
11
- declare class SfTooltip extends ClassComponent<
12
- SfTooltipProps,
13
- SfTooltipSlots,
14
- SfTooltipEmits
15
- > {}
16
-
17
- declare module "@vue/runtime-core" {
18
- interface GlobalComponents {
19
- SfTooltip: GlobalComponentConstructor<SfTooltip>;
20
- }
21
- }
22
-
23
- export default SfTooltip;
@@ -1,57 +0,0 @@
1
- import {
2
- AllowedComponentProps,
3
- ComponentCustomProps,
4
- ObjectEmitsOptions,
5
- VNode,
6
- VNodeProps,
7
- } from "vue";
8
-
9
- declare type PublicProps = VNodeProps &
10
- AllowedComponentProps &
11
- ComponentCustomProps;
12
-
13
- declare type UnionToIntersection<U> = (
14
- U extends any ? (k: U) => void : never
15
- ) extends (k: infer I) => void
16
- ? I
17
- : never;
18
-
19
- declare type EmitFn<
20
- Options = ObjectEmitsOptions,
21
- Event extends keyof Options = keyof Options
22
- > = Options extends Array<infer V>
23
- ? (event: V, ...args: any[]) => void
24
- : {} extends Options
25
- ? (event: string, ...args: any[]) => void
26
- : UnionToIntersection<
27
- {
28
- [key in Event]: Options[key] extends (
29
- ...args: infer Args
30
- ) => any
31
- ? (event: key, ...args: Args) => void
32
- : (event: key, ...args: any[]) => void;
33
- }[Event]
34
- >;
35
-
36
- export class ClassComponent<Props, Slots, Emits> {
37
- $props: Props & PublicProps;
38
- $slots: Slots;
39
- $emit: EmitFn<Emits>;
40
- }
41
-
42
- export type GlobalComponentConstructor<T> = {
43
- new (): T;
44
- };
45
-
46
- /**
47
- * Custom types
48
- */
49
- export declare type Booleanish = boolean | "true" | "false";
50
-
51
- export declare type Numberish = number | string;
52
-
53
- export declare type Nullable<T = void> = T | null | undefined;
54
-
55
- export declare type HintedString<T extends string> =
56
- | (string & {})
57
- | T;
File without changes