@luizleon/sf.prefeiturasp.vuecomponents 4.0.0 → 4.0.2

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 (57) 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.es.js → sf.prefeiturasp.vuecomponents.js} +2103 -2222
  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/{components → src/components}/layout/Layout.d.ts +0 -2
  8. package/dist/{components → src/components}/navmenu/NavMenu.d.ts +4 -1
  9. package/dist/{index.d.ts → src/index.d.ts} +1 -3
  10. package/dist/style.css +1 -1
  11. package/package.json +5 -5
  12. package/src/components/layout/Layout.d.ts +1 -7
  13. package/src/components/layout/Layout.vue +0 -2
  14. package/src/components/navmenu/NavMenu.vue +5 -1
  15. package/src/index.ts +0 -4
  16. package/src/ts-helpers.d.ts +0 -13
  17. package/src/vite-env.d.ts +1 -0
  18. package/tsconfig.json +5 -3
  19. package/vite.config.js +2 -3
  20. package/dist/components/navmenulink/NavMenuLink.d.ts +0 -18
  21. package/dist/components/panelmenu/PanelMenu.d.ts +0 -16
  22. package/dist/sf.prefeiturasp.vuecomponents.es.js.map +0 -1
  23. package/dist/sf.prefeiturasp.vuecomponents.umd.js +0 -423
  24. package/dist/sf.prefeiturasp.vuecomponents.umd.js.map +0 -1
  25. package/src/components/button/Button.d.ts +0 -26
  26. package/src/components/content/Content.d.ts +0 -28
  27. package/src/components/drawer/Drawer.d.ts +0 -50
  28. package/src/components/icon/Icon.d.ts +0 -23
  29. package/src/components/message/Message.d.ts +0 -28
  30. package/src/components/navmenu/NavMenu.d.ts +0 -30
  31. package/src/components/navmenulink/NavMenuLink.d.ts +0 -29
  32. package/src/components/navmenulink/NavMenuLink.vue +0 -49
  33. package/src/components/panelmenu/PanelMenu.d.ts +0 -26
  34. package/src/components/panelmenu/PanelMenu.vue +0 -101
  35. package/src/components/tabnavigation/TabNavigation.d.ts +0 -34
  36. package/src/components/tooltip/Tooltip.d.ts +0 -23
  37. /package/dist/{axios → src/axios}/axiosClient.d.ts +0 -0
  38. /package/dist/{common → src/common}/appResult.d.ts +0 -0
  39. /package/dist/{components → src/components}/button/Button.d.ts +0 -0
  40. /package/dist/{components → src/components}/content/Content.d.ts +0 -0
  41. /package/dist/{components → src/components}/drawer/Drawer.d.ts +0 -0
  42. /package/dist/{components → src/components}/icon/Icon.d.ts +0 -0
  43. /package/dist/{components → src/components}/internal/HeaderAvatar.d.ts +0 -0
  44. /package/dist/{components → src/components}/internal/LoadingCircle.d.ts +0 -0
  45. /package/dist/{components → src/components}/internal/MenuIcon.d.ts +0 -0
  46. /package/dist/{components → src/components}/internal/ScrollToTop.d.ts +0 -0
  47. /package/dist/{components → src/components}/internal/ThemeToggle.d.ts +0 -0
  48. /package/dist/{components → src/components}/internal/cssClassBuilder.d.ts +0 -0
  49. /package/dist/{components → src/components}/internal/getMaxZindex.d.ts +0 -0
  50. /package/dist/{components → src/components}/message/Message.d.ts +0 -0
  51. /package/dist/{components → src/components}/tabnavigation/TabNavigation.d.ts +0 -0
  52. /package/dist/{components → src/components}/tooltip/Tooltip.d.ts +0 -0
  53. /package/dist/{keycloak.d.ts → src/keycloak.d.ts} +0 -0
  54. /package/dist/{services → src/services}/authService.d.ts +0 -0
  55. /package/dist/{services → src/services}/dialogService.d.ts +0 -0
  56. /package/dist/{services → src/services}/navMenuService.d.ts +0 -0
  57. /package/dist/{types → src/types}/index.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,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,30 +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 { SfNavMenuItem } from "../../types";
9
-
10
- export interface SfNavMenuProps {
11
- items: SfNavMenuItem[];
12
- }
13
-
14
- export interface SfNavMenuSlots {}
15
-
16
- export declare type SfNavMenuEmits = {};
17
-
18
- declare class SfNavMenu extends ClassComponent<
19
- SfNavMenuProps,
20
- SfNavMenuSlots,
21
- SfNavMenuEmits
22
- > {}
23
-
24
- declare module "@vue/runtime-core" {
25
- interface GlobalComponents {
26
- SfNavMenu: GlobalComponentConstructor<SfNavMenu>;
27
- }
28
- }
29
-
30
- export default SfNavMenu;
@@ -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;
File without changes
File without changes
File without changes
File without changes