@vc-shell/framework 1.1.24 → 1.1.26

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 (83) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/core/composables/useAppInsights/index.ts +2 -2
  3. package/core/composables/useErrorHandler/index.ts +3 -2
  4. package/core/composables/useGlobalSearch/useGlobalSearch.md +263 -0
  5. package/core/composables/usePermissions/index.ts +2 -2
  6. package/core/composables/useTheme/index.ts +74 -26
  7. package/core/composables/useUser/index.ts +29 -8
  8. package/core/composables/useUserManagement/index.ts +45 -0
  9. package/core/interceptors/index.ts +2 -2
  10. package/core/plugins/signalR/index.ts +2 -2
  11. package/core/services/global-search-service/global-search-service.md +203 -0
  12. package/core/services/widget-service.ts +35 -12
  13. package/dist/core/composables/useErrorHandler/index.d.ts.map +1 -1
  14. package/dist/core/composables/useTheme/index.d.ts +14 -5
  15. package/dist/core/composables/useTheme/index.d.ts.map +1 -1
  16. package/dist/core/composables/useUser/index.d.ts +11 -3
  17. package/dist/core/composables/useUser/index.d.ts.map +1 -1
  18. package/dist/core/composables/useUserManagement/index.d.ts +23 -0
  19. package/dist/core/composables/useUserManagement/index.d.ts.map +1 -0
  20. package/dist/core/services/widget-service.d.ts +9 -7
  21. package/dist/core/services/widget-service.d.ts.map +1 -1
  22. package/dist/framework.js +94 -93
  23. package/dist/{index-DvenBxy6.js → index-20xYwcGS.js} +22032 -21961
  24. package/dist/{index-Br7ZwtRW.js → index-3B7GY2EI.js} +1 -1
  25. package/dist/{index-DAnceKLv.js → index-BGUwsXYM.js} +1 -1
  26. package/dist/{index-eOG-NNYN.js → index-BGghog2f.js} +1 -1
  27. package/dist/{index-Cxkjjuah.js → index-BQNK41p5.js} +1 -1
  28. package/dist/{index-CIzLBvgg.js → index-BeIJlP3x.js} +1 -1
  29. package/dist/{index-BnqqEJTE.js → index-BobFEOd-.js} +1 -1
  30. package/dist/{index-BYcoxn-f.js → index-CYbdhec2.js} +1 -1
  31. package/dist/{index-BbuBDu8A.js → index-DQczMBoO.js} +1 -1
  32. package/dist/{index-cuex9jil.js → index-DSNT0XVw.js} +1 -1
  33. package/dist/{index-DoArZBIw.js → index-DXHjWa3b.js} +1 -1
  34. package/dist/{index-Dk1K3-27.js → index-Dcf_1-Il.js} +1 -1
  35. package/dist/{index-CGL9e-cM.js → index-DszRvG1r.js} +1 -1
  36. package/dist/{index-CLAYu8Qj.js → index-DyPpTQJI.js} +1 -1
  37. package/dist/{index-Cmbxdwnl.js → index-Nr1LNRXa.js} +1 -1
  38. package/dist/{index-CRwMOCjN.js → index-RMOqRXFr.js} +1 -1
  39. package/dist/{index-BLmjssqE.js → index-Tsyx9GI7.js} +1 -1
  40. package/dist/index.css +1 -1
  41. package/dist/locales/de.json +6 -0
  42. package/dist/locales/en.json +6 -0
  43. package/dist/shared/components/change-password/change-password.vue.d.ts.map +1 -1
  44. package/dist/shared/components/notifications/components/notification-container/index.d.ts +1 -1
  45. package/dist/shared/components/notifications/components/notification-container/index.d.ts.map +1 -1
  46. package/dist/shared/components/settings-menu/settings-menu.vue.d.ts.map +1 -1
  47. package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts +6 -11
  48. package/dist/shared/components/settings-menu-item/settings-menu-item.vue.d.ts.map +1 -1
  49. package/dist/shared/components/sidebar/sidebar.vue.d.ts +3 -11
  50. package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -1
  51. package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -1
  52. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
  53. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
  54. package/dist/shared/pages/LoginPage/components/login/Login.vue.d.ts.map +1 -1
  55. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
  56. package/dist/tsconfig.tsbuildinfo +1 -1
  57. package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
  58. package/dist/ui/components/atoms/vc-widget/vc-widget.vue.d.ts.map +1 -1
  59. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  60. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue.d.ts.map +1 -1
  61. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue.d.ts.map +1 -1
  62. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts +1 -1
  63. package/dist/ui/components/organisms/vc-popup/vc-popup.vue.d.ts.map +1 -1
  64. package/package.json +4 -4
  65. package/shared/components/change-password/change-password.vue +2 -3
  66. package/shared/components/logout-button/logout-button.vue +2 -2
  67. package/shared/components/settings-menu/settings-menu.vue +1 -4
  68. package/shared/components/settings-menu-item/settings-menu-item.vue +9 -1
  69. package/shared/components/sidebar/sidebar.vue +6 -1
  70. package/shared/components/theme-selector/theme-selector.vue +11 -11
  71. package/shared/components/user-dropdown-button/_internal/user-info.vue +2 -2
  72. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +1 -0
  73. package/shared/pages/InvitePage/components/invite/Invite.vue +217 -216
  74. package/shared/pages/LoginPage/components/login/Login.vue +3 -2
  75. package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +3 -2
  76. package/ui/components/atoms/vc-icon/vc-icon.vue +5 -10
  77. package/ui/components/atoms/vc-widget/vc-widget.vue +13 -6
  78. package/ui/components/molecules/vc-input-dropdown/vc-input-dropdown.stories.ts +0 -2
  79. package/ui/components/organisms/vc-app/vc-app.vue +4 -3
  80. package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-desktop.vue +2 -1
  81. package/ui/components/organisms/vc-blade/_internal/vc-blade-widget-container/_internal/vc-widget-container-mobile.vue +2 -0
  82. package/ui/components/organisms/vc-popup/vc-popup.stories.ts +398 -0
  83. package/ui/components/organisms/vc-popup/vc-popup.vue +1 -1
@@ -0,0 +1,203 @@
1
+ # Global Search Service Documentation
2
+
3
+ The Global Search Service is a core component of the VC-Shell framework that provides a centralized mechanism for implementing search functionality across the application. It allows registering search providers and executing search operations with visibility control.
4
+
5
+ ## Overview
6
+
7
+ The Global Search Service facilitates the implementation of search functionality throughout the application, managing search visibility states and provider registration. It's particularly useful for mobile interfaces where search views need to be toggled.
8
+
9
+ ## File Path
10
+ `/framework/core/services/global-search-service.ts`
11
+
12
+ ## Core Interfaces
13
+
14
+ While the complete interfaces aren't shown in the snippets, we can infer the following from usage:
15
+
16
+ ```typescript
17
+ export interface IGlobalSearchService {
18
+ isSearchVisible: Ref<Record<string, boolean>>;
19
+ toggleSearch: (bladeId: string) => void;
20
+ closeSearch: (bladeId: string) => void;
21
+ // Likely additional methods for search provider registration and query execution
22
+ }
23
+ ```
24
+
25
+ ## Primary Features
26
+
27
+ ### Search Visibility Management
28
+
29
+ The service tracks whether search functionality is visible on different blades and provides methods to toggle this visibility.
30
+
31
+ ```typescript
32
+ // Toggle search visibility for a specific blade
33
+ globalSearchService.toggleSearch('blade-123');
34
+
35
+ // Explicitly close search for a blade
36
+ globalSearchService.closeSearch('blade-123');
37
+
38
+ // Check if search is visible for a blade
39
+ const isVisible = globalSearchService.isSearchVisible.value['blade-123'];
40
+ ```
41
+
42
+ ### Integration with Mobile UI
43
+
44
+ The service is particularly useful for controlling search visibility in mobile interfaces, where screen real estate is limited and search often needs to be toggled.
45
+
46
+ ## Usage in Components
47
+
48
+ The Global Search Service is accessed through the `useGlobalSearch` composable. Here's a real-world example from the `vc-table-header` component:
49
+
50
+ ```typescript
51
+ // From framework/ui/components/organisms/vc-table/_internal/vc-table-header/vc-table-header.vue
52
+ <script lang="ts" setup>
53
+ import { VNode, computed, inject, Ref, h, useSlots, onBeforeUnmount, onMounted, ref } from "vue";
54
+ import { useGlobalSearch } from "../../../../../../core/composables/useGlobalSearch";
55
+ import { useAppBarMobileButtons } from "../../../../../../core/composables/useAppBarMobileButtons";
56
+ import { SearchIcon } from "../../../../atoms/vc-icon/icons";
57
+ import { FALLBACK_BLADE_ID } from "../../../../../../core/constants";
58
+
59
+ const props = defineProps<{
60
+ // Component props
61
+ hasHeaderSlot: boolean;
62
+ header: boolean;
63
+ columnsInit: boolean;
64
+ searchValue?: string;
65
+ // other props...
66
+ }>();
67
+
68
+ const blade = inject(
69
+ BladeInstance,
70
+ computed(
71
+ (): Partial<IBladeInstance> => ({
72
+ navigation: {
73
+ idx: 0,
74
+ instance: null,
75
+ },
76
+ }),
77
+ ),
78
+ );
79
+ const globalSearch = useGlobalSearch();
80
+ const isMobile = inject("isMobile") as Ref<boolean>;
81
+ const { register: registerMobileButton, unregister: unregisterMobileButton } = useAppBarMobileButtons();
82
+
83
+ const currentBladeId = computed(() => {
84
+ return blade?.value?.id || 0;
85
+ });
86
+
87
+ // Determine if search should be shown based on mobile state and search visibility
88
+ const shouldShowSearch = computed(() => {
89
+ if (!isMobile.value) return true;
90
+
91
+ if (blade?.value.navigation?.idx === 0) {
92
+ return globalSearch.isSearchVisible.value[currentBladeId.value];
93
+ }
94
+
95
+ return true;
96
+ });
97
+
98
+ const bladeId = computed(() => {
99
+ return blade.value?.id || FALLBACK_BLADE_ID;
100
+ });
101
+
102
+ // Configure search button for mobile view
103
+ const searchButtonConfig = ref({
104
+ id: "global-search",
105
+ icon: SearchIcon,
106
+ onClick: () => {
107
+ globalSearch.toggleSearch(bladeId.value);
108
+ },
109
+ onClose: () => {
110
+ globalSearch.closeSearch(bladeId.value);
111
+ },
112
+ // Button is visible only if:
113
+ // 1. We are in the root blade (idx === 0)
114
+ // 2. Header is available for display
115
+ isVisible: computed(() => Boolean(blade.value?.navigation?.idx === 0 && showHeader.value)),
116
+ order: 5,
117
+ });
118
+
119
+ // Register search button when mounted
120
+ onMounted(() => {
121
+ if (props.hasHeaderSlot || props.header) {
122
+ registerMobileButton(searchButtonConfig.value);
123
+ }
124
+ });
125
+
126
+ // Close search and unregister button when unmounted
127
+ onBeforeUnmount(() => {
128
+ if (globalSearch.isSearchVisible.value[bladeId.value]) {
129
+ globalSearch.closeSearch(bladeId.value);
130
+ }
131
+ unregisterMobileButton("global-search");
132
+ });
133
+ </script>
134
+ ```
135
+
136
+ This implementation displays how the Global Search Service:
137
+
138
+ 1. Controls search visibility based on the current blade and mobile state
139
+ 2. Integrates with mobile buttons for toggling search
140
+ 3. Automatically handles cleanup when components are unmounted
141
+
142
+ ## Template Integration
143
+
144
+ The search functionality is conditionally displayed based on the visibility state managed by the service:
145
+
146
+ ```vue
147
+ <template>
148
+ <Transition name="table-header">
149
+ <div
150
+ v-if="showHeader && shouldShowSearch"
151
+ class="vc-table-header"
152
+ >
153
+ <slot
154
+ name="header"
155
+ :header="headerComponent"
156
+ >
157
+ <component :is="headerComponent" />
158
+ </slot>
159
+ </div>
160
+ </Transition>
161
+ </template>
162
+ ```
163
+
164
+ ## Mobile Integration
165
+
166
+ The search button is registered with the App Bar Mobile Buttons Service to provide a consistent way to toggle search on mobile devices:
167
+
168
+ ```typescript
169
+ // Register search button when component is mounted
170
+ onMounted(() => {
171
+ if (props.hasHeaderSlot || props.header) {
172
+ registerMobileButton({
173
+ id: "global-search",
174
+ icon: SearchIcon,
175
+ onClick: () => {
176
+ globalSearch.toggleSearch(bladeId.value);
177
+ },
178
+ onClose: () => {
179
+ globalSearch.closeSearch(bladeId.value);
180
+ },
181
+ isVisible: computed(() => Boolean(blade.value?.navigation?.idx === 0 && showHeader.value)),
182
+ order: 5,
183
+ });
184
+ }
185
+ });
186
+ ```
187
+
188
+ ## Best Practices
189
+
190
+ 1. **Blade-Specific Search**: Always associate search state with specific blade IDs to ensure each blade can have independent search visibility.
191
+
192
+ 2. **Mobile Considerations**: Implement different search behavior for mobile versus desktop views, using the isMobile flag.
193
+
194
+ 3. **Cleanup**: Always close search and unregister any associated UI elements when components unmount.
195
+
196
+ 4. **Search Toggling**: Use the toggleSearch method for buttons that need to both open and close search, rather than implementing toggle logic yourself.
197
+
198
+ 5. **Default Visibility**: In desktop views, typically keep search visible by default, only using toggle behavior on mobile.
199
+
200
+ ## Related Composables
201
+
202
+ - `useGlobalSearch`: Provides access to the Global Search Service within Vue components.
203
+ - `provideGlobalSearchService`: Creates and provides the Global Search Service to the component tree.
@@ -6,6 +6,10 @@ export type WidgetEventHandler = (...args: unknown[]) => void;
6
6
  export interface IWidgetEvents {
7
7
  [key: string]: Set<WidgetEventHandler>;
8
8
  }
9
+ export interface IExposedWidget {
10
+ id?: string;
11
+ [key: string]: unknown;
12
+ }
9
13
 
10
14
  export interface IWidget {
11
15
  id: string;
@@ -14,8 +18,7 @@ export interface IWidget {
14
18
  props?: Record<string, unknown>;
15
19
  events?: Record<string, unknown>;
16
20
  isVisible?: boolean | ComputedRef<boolean> | Ref<boolean> | ((blade?: IBladeInstance) => boolean);
17
- onOpen?: (blade: { id: string }) => void;
18
- onClose?: (blade: { id: string }) => void;
21
+ updateFunctionName?: string;
19
22
  }
20
23
 
21
24
  export interface IWidgetRegistration {
@@ -30,7 +33,7 @@ export interface IWidgetService {
30
33
  clearBladeWidgets: (bladeId: string) => void;
31
34
  registeredWidgets: IWidgetRegistration[];
32
35
  isActiveWidget: (id: string) => boolean;
33
- setActiveWidget: (ref: ComponentInternalInstance["exposed"]) => void;
36
+ setActiveWidget: ({ exposed, widgetId }: { exposed: ComponentInternalInstance["exposed"]; widgetId: string }) => void;
34
37
  updateActiveWidget: () => void;
35
38
  isWidgetRegistered: (id: string) => boolean;
36
39
  updateWidget: ({ id, bladeId, widget }: { id: string; bladeId: string; widget: Partial<IWidget> }) => void;
@@ -52,7 +55,7 @@ export function registerWidget(widget: IWidget, bladeId: string): void {
52
55
  export function createWidgetService(): IWidgetService {
53
56
  const widgetRegistry = reactive<Record<string, IWidget[]>>({});
54
57
  const registeredWidgets = reactive<IWidgetRegistration[]>([]);
55
- const activeWidgetRef = ref();
58
+ const activeWidget = ref<{ exposed: ComponentInternalInstance["exposed"]; widgetId: string } | undefined>();
56
59
  const registeredIds = reactive(new Set<string>());
57
60
 
58
61
  const registerWidget = (widget: IWidget, bladeId: string): void => {
@@ -123,19 +126,39 @@ export function createWidgetService(): IWidgetService {
123
126
  });
124
127
  };
125
128
 
126
- const setActiveWidget = (ref: ComponentInternalInstance["exposed"]): void => {
127
- activeWidgetRef.value = undefined;
128
-
129
- activeWidgetRef.value = ref;
129
+ const setActiveWidget = ({
130
+ exposed,
131
+ widgetId,
132
+ }: {
133
+ exposed: ComponentInternalInstance["exposed"];
134
+ widgetId: string;
135
+ }): void => {
136
+ activeWidget.value = undefined;
137
+
138
+ activeWidget.value = {
139
+ exposed,
140
+ widgetId,
141
+ };
130
142
  };
131
143
 
132
144
  const updateActiveWidget = (): void => {
133
- if (!activeWidgetRef.value) {
145
+ const activeExposed = activeWidget.value?.exposed as IExposedWidget | undefined;
146
+
147
+ if (!activeExposed) {
134
148
  return;
135
149
  }
136
150
 
137
- if (activeWidgetRef.value?.updateActiveWidgetCount) {
138
- activeWidgetRef.value.updateActiveWidgetCount();
151
+ const widgetId = activeWidget.value?.widgetId;
152
+
153
+ if (widgetId) {
154
+ const registration = registeredWidgets.find((reg) => reg.widget.id === widgetId);
155
+ const functionNameToCall = registration?.widget?.updateFunctionName;
156
+
157
+ if (functionNameToCall && typeof activeExposed[functionNameToCall] === "function") {
158
+ activeExposed[functionNameToCall]();
159
+ } else {
160
+ console.warn(`Widget '${widgetId}' does not have an exposed function named '${functionNameToCall}'.`);
161
+ }
139
162
  }
140
163
  };
141
164
 
@@ -144,7 +167,7 @@ export function createWidgetService(): IWidgetService {
144
167
  };
145
168
 
146
169
  const isActiveWidget = (id: string): boolean => {
147
- return activeWidgetRef.value?.id === id;
170
+ return activeWidget.value?.widgetId === id;
148
171
  };
149
172
 
150
173
  preregisteredWidgets.forEach((widget) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useErrorHandler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,GAAG,EAAE,MAAM,KAAK,CAAC;AAGpE,UAAU,gBAAgB;IACxB,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,gBAAgB,CA2DnE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useErrorHandler/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,GAAG,EAAE,MAAM,KAAK,CAAC;AAIpE,UAAU,gBAAgB;IACxB,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,gBAAgB,CA2DnE"}
@@ -1,11 +1,20 @@
1
1
  import { type Ref } from "vue";
2
+ export interface ThemeDefinition {
3
+ key: string;
4
+ localizationKey?: string;
5
+ }
6
+ export interface DisplayTheme {
7
+ key: string;
8
+ name: string;
9
+ }
2
10
  export interface IUseTheme {
3
- themes: Ref<string[]>;
4
- current: Ref<string>;
11
+ themes: Ref<DisplayTheme[]>;
12
+ currentThemeKey: Ref<string>;
13
+ currentLocalizedName: Ref<string>;
5
14
  next: () => void;
6
- register: (customNames: string | string[]) => void;
7
- unregister: (customNames: string | string[]) => void;
8
- setTheme: (theme: string) => void;
15
+ register: (themesToAdd: ThemeDefinition | ThemeDefinition[]) => void;
16
+ unregister: (themeKeysToRemove: string | string[]) => void;
17
+ setTheme: (themeKey: string) => void;
9
18
  }
10
19
  export declare const useTheme: () => IUseTheme;
11
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useTheme/index.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAE3D,MAAM,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C"}
@@ -1,7 +1,7 @@
1
1
  import { ComputedRef } from "vue";
2
2
  import { UserDetail, SecurityResult, IdentityResult, LoginType, SignInResult } from "./../../api/platform";
3
3
  import { RequestPasswordResult } from "./../../types";
4
- interface IUseUser {
4
+ export interface IUserInternalAPI {
5
5
  user: ComputedRef<UserDetail | undefined>;
6
6
  loading: ComputedRef<boolean>;
7
7
  isAdministrator: ComputedRef<boolean | undefined>;
@@ -19,6 +19,14 @@ interface IUseUser {
19
19
  getLoginType: () => Promise<LoginType[]>;
20
20
  isAuthenticated: ComputedRef<boolean>;
21
21
  }
22
- export declare const useUser: () => IUseUser;
23
- export {};
22
+ export interface IAppUserAPI {
23
+ user: ComputedRef<UserDetail | undefined>;
24
+ loading: ComputedRef<boolean>;
25
+ isAuthenticated: ComputedRef<boolean>;
26
+ isAdministrator: ComputedRef<boolean | undefined>;
27
+ loadUser: () => Promise<UserDetail>;
28
+ signOut: () => Promise<void>;
29
+ }
30
+ export declare function _createInternalUserLogic(): IUserInternalAPI;
31
+ export declare const useUser: () => IAppUserAPI;
24
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useUser/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,WAAW,EAAE,MAAM,KAAK,CAAC;AACtD,OAAO,EACL,UAAU,EAGV,cAAc,EAEd,cAAc,EAEd,SAAS,EAET,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAItD,UAAU,QAAQ;IAChB,IAAI,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IAC1C,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,eAAe,EAAE,WAAW,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAElD,QAAQ,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;IACpC,MAAM,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,CAAC,CAAC;IACtC,eAAe,EAAE,WAAW,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;IAClD,QAAQ,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAC;IACpC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAID,wBAAgB,wBAAwB,IAAI,gBAAgB,CAwJ3D;AAED,eAAO,MAAM,OAAO,QAA8B,WAUhD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { ComputedRef } from "vue";
2
+ import { SecurityResult, IdentityResult, LoginType, UserDetail, SignInResult } from "./../../api/platform";
3
+ import { RequestPasswordResult } from "./../../types";
4
+ export interface IUserManagementAPI {
5
+ user: ComputedRef<UserDetail | undefined>;
6
+ loading: ComputedRef<boolean>;
7
+ isAdministrator: ComputedRef<boolean | undefined>;
8
+ isAuthenticated: ComputedRef<boolean>;
9
+ validateToken: (userId: string, token: string) => Promise<boolean>;
10
+ validatePassword: (password: string) => Promise<IdentityResult>;
11
+ resetPasswordByToken: (userId: string, password: string, token: string) => Promise<SecurityResult>;
12
+ getLoginType: () => Promise<LoginType[]>;
13
+ loadUser: () => Promise<UserDetail>;
14
+ requestPasswordReset: (loginOrEmail: string) => Promise<RequestPasswordResult>;
15
+ changeUserPassword: (oldPassword: string, newPassword: string) => Promise<SecurityResult | undefined>;
16
+ signIn: (username: string, password: string) => Promise<SignInResult | {
17
+ succeeded: boolean;
18
+ error?: any;
19
+ }>;
20
+ signOut: () => Promise<void>;
21
+ }
22
+ export declare const useUserManagement: () => IUserManagementAPI;
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../core/composables/useUserManagement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,KAAK,CAAC;AAG5C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,s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CAAC"}
@@ -4,6 +4,10 @@ export type WidgetEventHandler = (...args: unknown[]) => void;
4
4
  export interface IWidgetEvents {
5
5
  [key: string]: Set<WidgetEventHandler>;
6
6
  }
7
+ export interface IExposedWidget {
8
+ id?: string;
9
+ [key: string]: unknown;
10
+ }
7
11
  export interface IWidget {
8
12
  id: string;
9
13
  title?: string;
@@ -11,12 +15,7 @@ export interface IWidget {
11
15
  props?: Record<string, unknown>;
12
16
  events?: Record<string, unknown>;
13
17
  isVisible?: boolean | ComputedRef<boolean> | Ref<boolean> | ((blade?: IBladeInstance) => boolean);
14
- onOpen?: (blade: {
15
- id: string;
16
- }) => void;
17
- onClose?: (blade: {
18
- id: string;
19
- }) => void;
18
+ updateFunctionName?: string;
20
19
  }
21
20
  export interface IWidgetRegistration {
22
21
  bladeId: string;
@@ -29,7 +28,10 @@ export interface IWidgetService {
29
28
  clearBladeWidgets: (bladeId: string) => void;
30
29
  registeredWidgets: IWidgetRegistration[];
31
30
  isActiveWidget: (id: string) => boolean;
32
- setActiveWidget: (ref: ComponentInternalInstance["exposed"]) => void;
31
+ setActiveWidget: ({ exposed, widgetId }: {
32
+ exposed: ComponentInternalInstance["exposed"];
33
+ widgetId: string;
34
+ }) => void;
33
35
  updateActiveWidget: () => void;
34
36
  isWidgetRegistered: (id: string) => boolean;
35
37
  updateWidget: ({ id, bladeId, widget }: {
@@ -1 +1 @@
1
- {"version":3,"file":"widget-service.d.ts","sourceRoot":"","sources":["../../../core/services/widget-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiB,yBAAyB,EAAE,WAAW,EAAE,GAAG,EAAsB,MAAM,KAAK,CAAC;AAChH,OAAO,EAAE,cAAc,EAAE,MAAM,gDAAgD,CAAC;AAEhF,MAAM,MAAM,kBAAkB,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG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