@bluealba/pae-ui-react-core 3.0.2-feature-rename-ba-libraries-scope-1169

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 (206) hide show
  1. package/LICENSE +134 -0
  2. package/README.md +368 -0
  3. package/dist/index.cjs.js +252 -0
  4. package/dist/index.css +1 -0
  5. package/dist/index.esm.js +9741 -0
  6. package/dist/index.systemjs.js +253 -0
  7. package/dist/index.umd.js +253 -0
  8. package/dist/src/MicrofrontendProps.d.ts +9 -0
  9. package/dist/src/components/ApplicationIcon.d.ts +7 -0
  10. package/dist/src/components/Authorized.d.ts +12 -0
  11. package/dist/src/components/ExtendExtensionPoint.d.ts +20 -0
  12. package/dist/src/components/ExtensionPoint.d.ts +39 -0
  13. package/dist/src/components/ModulePlaceHolder/BaseContainer.d.ts +4 -0
  14. package/dist/src/components/ModulePlaceHolder/BaseError.d.ts +7 -0
  15. package/dist/src/components/ModulePlaceHolder/BaseLoading.d.ts +7 -0
  16. package/dist/src/components/ModulePlaceHolder/ModulePlaceHolder.d.ts +22 -0
  17. package/dist/src/components/ModulePlaceHolder/index.d.ts +2 -0
  18. package/dist/src/components/PAEModule.d.ts +18 -0
  19. package/dist/src/components/PlatformEventListener.d.ts +12 -0
  20. package/dist/src/components/common/Alert/Alert.d.ts +16 -0
  21. package/dist/src/components/common/Alert/index.d.ts +2 -0
  22. package/dist/src/components/common/Badge/Badge.d.ts +9 -0
  23. package/dist/src/components/common/Badge/Badge.stories.d.ts +20 -0
  24. package/dist/src/components/common/Badge/Badges.d.ts +6 -0
  25. package/dist/src/components/common/Button/Button.d.ts +10 -0
  26. package/dist/src/components/common/Button/Button.stories.d.ts +45 -0
  27. package/dist/src/components/common/ConfirmDialog/ConfirmDialog.d.ts +11 -0
  28. package/dist/src/components/common/ConfirmDialog/ConfirmDialog.stories.d.ts +14 -0
  29. package/dist/src/components/common/CopyToClipboardButton/CopyToClipboardButton.d.ts +7 -0
  30. package/dist/src/components/common/CopyToClipboardButton/CopyToClipboardButton.stories.d.ts +15 -0
  31. package/dist/src/components/common/Dialog/Dialog.d.ts +26 -0
  32. package/dist/src/components/common/Dialog/Dialog.stories.d.ts +14 -0
  33. package/dist/src/components/common/Dialog/index.d.ts +2 -0
  34. package/dist/src/components/common/Dialog/subComponents/Actions.d.ts +6 -0
  35. package/dist/src/components/common/Dialog/subComponents/Close.d.ts +6 -0
  36. package/dist/src/components/common/Dialog/subComponents/Content.d.ts +6 -0
  37. package/dist/src/components/common/Dialog/subComponents/Description.d.ts +6 -0
  38. package/dist/src/components/common/Dialog/subComponents/Footer.d.ts +6 -0
  39. package/dist/src/components/common/Dialog/subComponents/Header.d.ts +6 -0
  40. package/dist/src/components/common/Dialog/subComponents/Title.d.ts +6 -0
  41. package/dist/src/components/common/DropdownList/DropdownList.d.ts +8 -0
  42. package/dist/src/components/common/DropdownList/index.d.ts +3 -0
  43. package/dist/src/components/common/EmptyState/EmptyState.d.ts +7 -0
  44. package/dist/src/components/common/EmptyState/EmptyState.stories.d.ts +16 -0
  45. package/dist/src/components/common/EmptyState/EmptyStateIcon.d.ts +7 -0
  46. package/dist/src/components/common/ErrorState/ErrorState.d.ts +9 -0
  47. package/dist/src/components/common/ErrorState/ErrorState.stories.d.ts +11 -0
  48. package/dist/src/components/common/ErrorState/WarningIcon.d.ts +6 -0
  49. package/dist/src/components/common/ErrorState/index.d.ts +2 -0
  50. package/dist/src/components/common/FieldGroup/FieldGroup.d.ts +7 -0
  51. package/dist/src/components/common/Icon/ArrowDown.d.ts +7 -0
  52. package/dist/src/components/common/Icon/ChevronLeft.d.ts +7 -0
  53. package/dist/src/components/common/Icon/ChevronRight.d.ts +7 -0
  54. package/dist/src/components/common/Icon/ClipboardCheckIcon.d.ts +13 -0
  55. package/dist/src/components/common/Icon/ClipboardIcon.d.ts +14 -0
  56. package/dist/src/components/common/Icon/EyeIcon.d.ts +13 -0
  57. package/dist/src/components/common/Icon/HorizontalDots.d.ts +7 -0
  58. package/dist/src/components/common/Input/Input.d.ts +7 -0
  59. package/dist/src/components/common/Input/Input.stories.d.ts +23 -0
  60. package/dist/src/components/common/InputError/InputError.d.ts +6 -0
  61. package/dist/src/components/common/Label/Label.d.ts +7 -0
  62. package/dist/src/components/common/List/List.d.ts +26 -0
  63. package/dist/src/components/common/List/List.stories.d.ts +27 -0
  64. package/dist/src/components/common/List/index.d.ts +2 -0
  65. package/dist/src/components/common/List/subComponents/Action.d.ts +6 -0
  66. package/dist/src/components/common/List/subComponents/Actions.d.ts +6 -0
  67. package/dist/src/components/common/List/subComponents/Description.d.ts +6 -0
  68. package/dist/src/components/common/List/subComponents/Icon.d.ts +6 -0
  69. package/dist/src/components/common/List/subComponents/Item.d.ts +8 -0
  70. package/dist/src/components/common/List/subComponents/Title.d.ts +6 -0
  71. package/dist/src/components/common/Pagination/Pagination.d.ts +31 -0
  72. package/dist/src/components/common/PasswordInput/PasswordInput.d.ts +8 -0
  73. package/dist/src/components/common/PasswordInput/PasswordInput.stories.d.ts +20 -0
  74. package/dist/src/components/common/Pill/Pill.d.ts +8 -0
  75. package/dist/src/components/common/Pill/Pill.stories.d.ts +26 -0
  76. package/dist/src/components/common/PluralizeCounter/PluralizeCounter.d.ts +9 -0
  77. package/dist/src/components/common/PluralizeCounter/PluralizeCounter.stories.d.ts +14 -0
  78. package/dist/src/components/common/SearchAutocomplete/AutocompleteHighlighter.d.ts +8 -0
  79. package/dist/src/components/common/SearchAutocomplete/AutocompleteItem.d.ts +7 -0
  80. package/dist/src/components/common/SearchAutocomplete/SearchAutocomplete.d.ts +27 -0
  81. package/dist/src/components/common/SearchAutocomplete/SearchAutocomplete.stories.d.ts +51 -0
  82. package/dist/src/components/common/SearchAutocomplete/hooks/useAutocomplete.d.ts +13 -0
  83. package/dist/src/components/common/SearchAutocomplete/types.d.ts +12 -0
  84. package/dist/src/components/common/SearchInput/SearchInput.d.ts +9 -0
  85. package/dist/src/components/common/SearchInput/SearchInput.stories.d.ts +30 -0
  86. package/dist/src/components/common/Select/Option.d.ts +6 -0
  87. package/dist/src/components/common/Select/Select.d.ts +13 -0
  88. package/dist/src/components/common/Select/Select.stories.d.ts +20 -0
  89. package/dist/src/components/common/Show/Show.d.ts +32 -0
  90. package/dist/src/components/common/Skeleton/Skeleton.d.ts +11 -0
  91. package/dist/src/components/common/Skeleton/Skeleton.stories.d.ts +11 -0
  92. package/dist/src/components/common/Skeleton/SkeletonList.d.ts +10 -0
  93. package/dist/src/components/common/Skeleton/SkeletonList.stories.d.ts +11 -0
  94. package/dist/src/components/common/Spinner/Spinner.d.ts +10 -0
  95. package/dist/src/components/common/Spinner/Spinner.stories.d.ts +11 -0
  96. package/dist/src/components/common/Switch/Switch.d.ts +15 -0
  97. package/dist/src/components/common/Switch/Switch.stories.d.ts +8 -0
  98. package/dist/src/components/common/Table/Table.d.ts +43 -0
  99. package/dist/src/components/common/Table/Table.stories.d.ts +65 -0
  100. package/dist/src/components/common/Table/TablePagination.d.ts +9 -0
  101. package/dist/src/components/common/Table/generatePagination.d.ts +1 -0
  102. package/dist/src/components/common/Table/table.test.d.ts +1 -0
  103. package/dist/src/components/common/Tabs/Tabs.d.ts +30 -0
  104. package/dist/src/components/common/TextArea/TextArea.d.ts +6 -0
  105. package/dist/src/components/common/TextArea/TextArea.stories.d.ts +17 -0
  106. package/dist/src/components/common/Tooltip/Tooltip.d.ts +15 -0
  107. package/dist/src/components/common/Tooltip/Tooltip.stories.d.ts +35 -0
  108. package/dist/src/components/common/index.d.ts +58 -0
  109. package/dist/src/components/index.d.ts +6 -0
  110. package/dist/src/constants/index.d.ts +5 -0
  111. package/dist/src/core/PlatformEvents.d.ts +13 -0
  112. package/dist/src/core/gateway/GatewayHttpHeaders.d.ts +10 -0
  113. package/dist/src/core/index.d.ts +1 -0
  114. package/dist/src/getGlobalState.d.ts +1 -0
  115. package/dist/src/hocs/authorized.d.ts +4 -0
  116. package/dist/src/hocs/extensionPoint.d.ts +17 -0
  117. package/dist/src/hocs/index.d.ts +2 -0
  118. package/dist/src/hooks/applications/ApplicationMenu.d.ts +18 -0
  119. package/dist/src/hooks/applications/PlatformApplication.d.ts +10 -0
  120. package/dist/src/hooks/applications/useApplicationIcon.d.ts +4 -0
  121. package/dist/src/hooks/applications/useApplicationJSModule.d.ts +18 -0
  122. package/dist/src/hooks/applications/useApplicationMenu.d.ts +11 -0
  123. package/dist/src/hooks/applications/useApplicationUIModule.d.ts +4 -0
  124. package/dist/src/hooks/applications/useApplications.d.ts +4 -0
  125. package/dist/src/hooks/applications/useCurrentApplication.d.ts +8 -0
  126. package/dist/src/hooks/applications/useCurrentApplication.test.d.ts +1 -0
  127. package/dist/src/hooks/applications/useCurrentApplicationName.d.ts +6 -0
  128. package/dist/src/hooks/applications/useCurrentJSModule.d.ts +9 -0
  129. package/dist/src/hooks/catalog/useCatalog.d.ts +14 -0
  130. package/dist/src/hooks/catalog/useMutableCatalog.d.ts +28 -0
  131. package/dist/src/hooks/catalog/userCatalog.test.d.ts +1 -0
  132. package/dist/src/hooks/commons/useObservable.d.ts +8 -0
  133. package/dist/src/hooks/commons/useResource.d.ts +21 -0
  134. package/dist/src/hooks/commons/useResourceActions.d.ts +56 -0
  135. package/dist/src/hooks/commons/useSubjectObservable.d.ts +11 -0
  136. package/dist/src/hooks/customizations/useDynamicFonts.d.ts +13 -0
  137. package/dist/src/hooks/customizations/useDynamicStyleSheet.d.ts +1 -0
  138. package/dist/src/hooks/customizations/useGetPlatformTheme.d.ts +3 -0
  139. package/dist/src/hooks/customizations/usePAECustomizationsLoadingState.d.ts +2 -0
  140. package/dist/src/hooks/customizations/usePlatformCustomization.d.ts +8 -0
  141. package/dist/src/hooks/customizations/utils.d.ts +2 -0
  142. package/dist/src/hooks/events/usePlatformEventListener.d.ts +2 -0
  143. package/dist/src/hooks/extensions/useExtendExtensionPoint.d.ts +11 -0
  144. package/dist/src/hooks/extensions/useExtensionPoint.d.ts +16 -0
  145. package/dist/src/hooks/habits/ApplicationEvent.d.ts +4 -0
  146. package/dist/src/hooks/habits/mapEvent.d.ts +17 -0
  147. package/dist/src/hooks/habits/trackEvents.d.ts +9 -0
  148. package/dist/src/hooks/habits/useTrackEvent.d.ts +5 -0
  149. package/dist/src/hooks/habits/useTrackEvents.d.ts +9 -0
  150. package/dist/src/hooks/habits/useTrackEvents.test.d.ts +1 -0
  151. package/dist/src/hooks/index.d.ts +42 -0
  152. package/dist/src/hooks/module/useModule.d.ts +6 -0
  153. package/dist/src/hooks/module/useModuleCommonPaths.d.ts +9 -0
  154. package/dist/src/hooks/module/useModuleConfig.d.ts +5 -0
  155. package/dist/src/hooks/module/useModuleConfigByName.d.ts +5 -0
  156. package/dist/src/hooks/module/useModuleMetadata.d.ts +8 -0
  157. package/dist/src/hooks/routing/useLocation.d.ts +7 -0
  158. package/dist/src/hooks/tenants/constants.d.ts +21 -0
  159. package/dist/src/hooks/tenants/getClientTenantStrategy.d.ts +4 -0
  160. package/dist/src/hooks/tenants/strategies/cookie.d.ts +7 -0
  161. package/dist/src/hooks/tenants/strategies/queryParams.d.ts +7 -0
  162. package/dist/src/hooks/tenants/strategies/sessionStorage.d.ts +7 -0
  163. package/dist/src/hooks/tenants/strategies/subdomain.d.ts +9 -0
  164. package/dist/src/hooks/tenants/strategies/tenantStrategy.interface.d.ts +6 -0
  165. package/dist/src/hooks/tenants/useTenants.d.ts +8 -0
  166. package/dist/src/hooks/useAppStatus.d.ts +6 -0
  167. package/dist/src/hooks/useAppsState.d.ts +18 -0
  168. package/dist/src/hooks/useAuth.d.ts +14 -0
  169. package/dist/src/hooks/useAuth.test.d.ts +1 -0
  170. package/dist/src/hooks/useHasNoSession.d.ts +2 -0
  171. package/dist/src/hooks/useNotifications.d.ts +4 -0
  172. package/dist/src/hooks/useOperations.d.ts +1 -0
  173. package/dist/src/hooks/usePAEState.d.ts +7 -0
  174. package/dist/src/hooks/useServiceBaseURL.d.ts +6 -0
  175. package/dist/src/hooks/useServiceInvoker.d.ts +20 -0
  176. package/dist/src/hooks/useServiceInvoker.test.d.ts +1 -0
  177. package/dist/src/hooks/useUIApplications.d.ts +5 -0
  178. package/dist/src/hooks/userState/UserState.d.ts +7 -0
  179. package/dist/src/hooks/userState/UserStateApiClient.d.ts +9 -0
  180. package/dist/src/hooks/userState/useUserState.d.ts +24 -0
  181. package/dist/src/index.d.ts +11 -0
  182. package/dist/src/model/ModuleMetadata.d.ts +6 -0
  183. package/dist/src/test-utils/setupTestEnvironment.d.ts +15 -0
  184. package/dist/src/types.d.ts +37 -0
  185. package/dist/src/utils/Request.d.ts +7 -0
  186. package/dist/src/utils/URL.d.ts +6 -0
  187. package/dist/src/utils/alphaColor.d.ts +1 -0
  188. package/dist/src/utils/createRootComponent.d.ts +9 -0
  189. package/dist/src/utils/fonts.d.ts +5 -0
  190. package/dist/src/utils/getApplicationUIModule.d.ts +10 -0
  191. package/dist/src/utils/getApplications.d.ts +4 -0
  192. package/dist/src/utils/getOperations.d.ts +5 -0
  193. package/dist/src/utils/hasAccess.d.ts +8 -0
  194. package/dist/src/utils/immutable.d.ts +18 -0
  195. package/dist/src/utils/index.d.ts +18 -0
  196. package/dist/src/utils/initializeMicroFrontend.d.ts +17 -0
  197. package/dist/src/utils/isValidEmail.d.ts +1 -0
  198. package/dist/src/utils/isValidEmail.test.d.ts +1 -0
  199. package/dist/src/utils/logout.d.ts +1 -0
  200. package/dist/src/utils/logout.test.d.ts +1 -0
  201. package/dist/src/utils/navigateTo.d.ts +1 -0
  202. package/dist/src/utils/promises.d.ts +4 -0
  203. package/dist/tests/renderHookWithProviders.d.ts +3 -0
  204. package/dist/tests/testUtils.d.ts +7 -0
  205. package/package.json +61 -0
  206. package/src/global.css +32 -0
@@ -0,0 +1,43 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export type SortDirection = 'asc' | 'desc';
4
+ export type SortType = {
5
+ field: string;
6
+ direction: SortDirection;
7
+ onSort: (field: string, direction: SortDirection) => void;
8
+ };
9
+ export type PaginationType = {
10
+ page: number;
11
+ totalPages: number;
12
+ onPageChange: (page: number) => void;
13
+ };
14
+ export type ColumnType<T> = {
15
+ name: string;
16
+ displayName: string;
17
+ align?: 'left' | 'center' | 'right';
18
+ isSortable?: boolean;
19
+ sortName?: string;
20
+ width?: number;
21
+ valueGetter?: (row: T) => string | number;
22
+ cellRenderer?: (row: T) => ReactNode | null;
23
+ };
24
+ export type LoadingConfigType = {
25
+ count?: number;
26
+ height?: number;
27
+ };
28
+ type TableProps<T> = {
29
+ isLoading?: boolean;
30
+ columns: ColumnType<T>[];
31
+ data: T[];
32
+ totalCount?: number;
33
+ headerLabel?: string;
34
+ sort?: SortType;
35
+ pagination?: PaginationType;
36
+ loadingConfig?: LoadingConfigType;
37
+ onRowClick?: (row: T) => void;
38
+ };
39
+ declare const Table: {
40
+ <T>({ columns, data, isLoading, totalCount, headerLabel, sort, loadingConfig, pagination, onRowClick }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
41
+ displayName: string;
42
+ };
43
+ export default Table;
@@ -0,0 +1,65 @@
1
+ import { default as Table } from './Table';
2
+ declare namespace _default {
3
+ export let title: string;
4
+ export { Table as component };
5
+ export let tags: string[];
6
+ }
7
+ export default _default;
8
+ export namespace Default {
9
+ namespace args {
10
+ export { columns };
11
+ export { data };
12
+ }
13
+ }
14
+ export namespace CustomLoadingConfig {
15
+ export namespace args_1 {
16
+ export { columns };
17
+ export { data };
18
+ export let isLoading: boolean;
19
+ export namespace loadingConfig {
20
+ let count: number;
21
+ let height: number;
22
+ }
23
+ }
24
+ export { args_1 as args };
25
+ }
26
+ export namespace WithRowClick {
27
+ export namespace args_2 {
28
+ export { columns };
29
+ export { data };
30
+ export let onRowClick: import("@vitest/spy").Mock<(...args: any[]) => any>;
31
+ }
32
+ export { args_2 as args };
33
+ }
34
+ export namespace ServerSideData {
35
+ export namespace args_3 {
36
+ export { columns };
37
+ }
38
+ export { args_3 as args };
39
+ export function render(args: any): import("react/jsx-runtime").JSX.Element;
40
+ }
41
+ declare const columns: ({
42
+ name: string;
43
+ displayName: string;
44
+ valueGetter: (user: any) => any;
45
+ align?: undefined;
46
+ cellRenderer?: undefined;
47
+ } | {
48
+ name: string;
49
+ displayName: string;
50
+ valueGetter?: undefined;
51
+ align?: undefined;
52
+ cellRenderer?: undefined;
53
+ } | {
54
+ name: string;
55
+ displayName: string;
56
+ align: string;
57
+ cellRenderer: () => import("react/jsx-runtime").JSX.Element;
58
+ valueGetter?: undefined;
59
+ })[];
60
+ declare const data: {
61
+ username: string;
62
+ displayName: string;
63
+ email: string;
64
+ createdAt: Date;
65
+ }[];
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+
3
+ interface TablePaginationProps {
4
+ page: number;
5
+ totalPages: number;
6
+ onPageChange: (page: number) => void;
7
+ }
8
+ declare const TablePagination: FC<TablePaginationProps>;
9
+ export default TablePagination;
@@ -0,0 +1 @@
1
+ export declare const generatePagination: (totalPages: number, page: number, surroundingPages?: number) => string[];
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface TabsProps {
4
+ defaultValue?: string;
5
+ value?: string;
6
+ onValueChange?: (value: string) => void;
7
+ orientation?: 'horizontal' | 'vertical';
8
+ className?: string;
9
+ children: React.ReactNode;
10
+ }
11
+ interface TabsListProps {
12
+ className?: string;
13
+ children: React.ReactNode;
14
+ }
15
+ interface TabsTriggerProps {
16
+ value: string;
17
+ disabled?: boolean;
18
+ className?: string;
19
+ children: React.ReactNode;
20
+ }
21
+ interface TabsContentProps {
22
+ value: string;
23
+ className?: string;
24
+ children: React.ReactNode;
25
+ }
26
+ export declare const Tabs: React.FC<TabsProps>;
27
+ export declare const TabsList: React.FC<TabsListProps>;
28
+ export declare const TabsTrigger: React.FC<TabsTriggerProps>;
29
+ export declare const TabsContent: React.FC<TabsContentProps>;
30
+ export {};
@@ -0,0 +1,6 @@
1
+ import { default as React, DetailedHTMLProps } from 'react';
2
+
3
+ export interface TextAreaProps extends DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> {
4
+ }
5
+ export declare const TextArea: React.ForwardRefExoticComponent<Omit<TextAreaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
6
+ export default TextArea;
@@ -0,0 +1,17 @@
1
+ import { default as TextArea } from './TextArea';
2
+ declare namespace _default {
3
+ export let title: string;
4
+ export { TextArea as component };
5
+ export namespace parameters {
6
+ let layout: string;
7
+ }
8
+ export let tags: string[];
9
+ export namespace args {
10
+ let placeholder: string;
11
+ }
12
+ }
13
+ export default _default;
14
+ export const Default: {};
15
+ export namespace WithLabel {
16
+ function render(args: any): import("react/jsx-runtime").JSX.Element;
17
+ }
@@ -0,0 +1,15 @@
1
+ import { FC, ReactNode } from 'react';
2
+
3
+ export interface TooltipProps {
4
+ open?: boolean;
5
+ children: ReactNode;
6
+ displayName?: string;
7
+ tooltipContent?: ReactNode;
8
+ delayDuration?: number;
9
+ disabled?: boolean;
10
+ side?: "right" | "top" | "bottom" | "left";
11
+ sideOffset?: number;
12
+ className?: string;
13
+ }
14
+ export declare const Tooltip: FC<TooltipProps>;
15
+ export default Tooltip;
@@ -0,0 +1,35 @@
1
+ import { default as Tooltip } from './Tooltip';
2
+ declare namespace _default {
3
+ export let title: string;
4
+ export { Tooltip as component };
5
+ export namespace parameters {
6
+ let layout: string;
7
+ }
8
+ export let tags: string[];
9
+ export namespace argTypes {
10
+ namespace children {
11
+ let control: boolean;
12
+ }
13
+ namespace tooltipContent {
14
+ let control_1: boolean;
15
+ export { control_1 as control };
16
+ }
17
+ }
18
+ }
19
+ export default _default;
20
+ export namespace SimpleContent {
21
+ namespace args {
22
+ export let displayName: string;
23
+ let children_1: import("react/jsx-runtime").JSX.Element;
24
+ export { children_1 as children };
25
+ }
26
+ }
27
+ export namespace ComplexContent {
28
+ export namespace args_1 {
29
+ let children_2: import("react/jsx-runtime").JSX.Element;
30
+ export { children_2 as children };
31
+ let tooltipContent_1: import("react/jsx-runtime").JSX.Element;
32
+ export { tooltipContent_1 as tooltipContent };
33
+ }
34
+ export { args_1 as args };
35
+ }
@@ -0,0 +1,58 @@
1
+ export { Button } from './Button/Button';
2
+ export type { ButtonProps } from './Button/Button';
3
+ export { Badge, type BadgeProps } from './Badge/Badge';
4
+ export { Badges, type BadgesProps } from './Badge/Badges';
5
+ export * from './CopyToClipboardButton/CopyToClipboardButton';
6
+ export { FieldGroup } from './FieldGroup/FieldGroup';
7
+ export type { FieldGroupProps } from './FieldGroup/FieldGroup';
8
+ export { Input } from './Input/Input';
9
+ export type { InputProps } from './Input/Input';
10
+ export { InputError } from './InputError/InputError';
11
+ export type { InputErrorProps } from './InputError/InputError';
12
+ export { Label } from './Label/Label';
13
+ export type { LabelProps } from './Label/Label';
14
+ export { default as Select } from './Select/Select';
15
+ export type { SelectProps } from './Select/Select';
16
+ export { TextArea } from './TextArea/TextArea';
17
+ export type { TextAreaProps } from './TextArea/TextArea';
18
+ export { SearchInput } from './SearchInput/SearchInput';
19
+ export type { SearchInputProps } from './SearchInput/SearchInput';
20
+ export { SearchAutocomplete } from './SearchAutocomplete/SearchAutocomplete';
21
+ export type { SearchAutocompleteProps } from './SearchAutocomplete/SearchAutocomplete';
22
+ export type { Suggestion } from './SearchAutocomplete/types';
23
+ export { default as Show } from './Show/Show';
24
+ export { Skeleton } from './Skeleton/Skeleton';
25
+ export { SkeletonList } from './Skeleton/SkeletonList';
26
+ export type { SkeletonProps } from './Skeleton/Skeleton';
27
+ export type { SkeletonListProps } from './Skeleton/SkeletonList';
28
+ export { DropdownList } from './DropdownList/DropdownList';
29
+ export { styles as dropdownListStyles } from './DropdownList';
30
+ export type { DropdownListProps } from './DropdownList/DropdownList';
31
+ export { Tooltip } from './Tooltip/Tooltip';
32
+ export type { TooltipProps } from './Tooltip/Tooltip';
33
+ export { Spinner } from './Spinner/Spinner';
34
+ export type { SpinnerProps } from './Spinner/Spinner';
35
+ export { Switch } from './Switch/Switch';
36
+ export type { SwitchProps } from './Switch/Switch';
37
+ export * from './Tabs/Tabs';
38
+ export { default as EyeIcon } from './Icon/EyeIcon';
39
+ export * from './Icon/ClipboardIcon';
40
+ export * from './Icon/ClipboardCheckIcon';
41
+ export { default as PasswordInput } from './PasswordInput/PasswordInput';
42
+ export { default as Dialog } from './Dialog';
43
+ export * from './Dialog';
44
+ export { default as Pill } from './Pill/Pill';
45
+ export type { PillProps } from './Pill/Pill';
46
+ export { default as ConfirmDialog } from './ConfirmDialog/ConfirmDialog';
47
+ export type { ConfirmDialogProps } from './ConfirmDialog/ConfirmDialog';
48
+ export { default as ErrorState } from './ErrorState';
49
+ export * from './ErrorState';
50
+ export { default as List } from './List';
51
+ export * from './List';
52
+ export * from './Pagination/Pagination';
53
+ export { default as PluralizeCounter } from './PluralizeCounter/PluralizeCounter';
54
+ export { default as Table } from './Table/Table';
55
+ export * from './Table/Table';
56
+ export { default as EmptyState } from './EmptyState/EmptyState';
57
+ export { default as Alert } from './Alert';
58
+ export * from './Alert';
@@ -0,0 +1,6 @@
1
+ export { ModulePlaceHolder } from './ModulePlaceHolder';
2
+ export { ExtendExtensionPoint } from './ExtendExtensionPoint';
3
+ export { ExtensionPoint } from './ExtensionPoint';
4
+ export { default as Authorized } from './Authorized';
5
+ export { default as PlatformEventListener } from './PlatformEventListener';
6
+ export { default as ApplicationIcon } from './ApplicationIcon';
@@ -0,0 +1,5 @@
1
+ export declare const PAE_GLOBAL_STATE_KEY = "__PAE_GLOBAL_STATE__";
2
+ export declare const GLOBAL_REACTIVE_STATE_KEY = "__PAE_REACTIVE_GLOBAL_STATE__";
3
+ export declare const EXTENSION_POINTS_REGISTRY = "__PAE_EXTENSIONS_POINTS_REGISTRY__";
4
+ export declare const PAE_CUSTOMIZATIONS_LOADING_STATE_KEY = "__PAE_CUSTOMIZATIONS_LOADING_STATE_KEY__";
5
+ export declare const LOGOUT_URL = "/auth/logout";
@@ -0,0 +1,13 @@
1
+ declare const PlatformEvents: {
2
+ auth: {
3
+ SESSION_EXPIRED: string;
4
+ };
5
+ apps: {
6
+ APP_CLICKED: string;
7
+ };
8
+ shell: {
9
+ NAVBAR_STATE_CHANGED: string;
10
+ MENU_STATE_CHANGED: string;
11
+ };
12
+ };
13
+ export default PlatformEvents;
@@ -0,0 +1,10 @@
1
+ declare const GatewayHttpHeaders: {
2
+ /**
3
+ * When sent as part of a request to the gateway it won't return a redirect if the the token / session is
4
+ * expired or invalid. It will return a 401 instead.
5
+ * Otherwise by default it redirects to the login (useful for browsers requests)
6
+ */
7
+ NO_AUTH_REDIRECT: string;
8
+ TENANT: string;
9
+ };
10
+ export default GatewayHttpHeaders;
@@ -0,0 +1 @@
1
+ export { default as PlatformEvents } from './PlatformEvents';
@@ -0,0 +1 @@
1
+ export declare function getGlobalState(): import('./types').PAEState;
@@ -0,0 +1,4 @@
1
+ import { default as React } from 'react';
2
+
3
+ export declare const authorized: <T extends object>(WrappedComponent: React.ComponentType<T>, operations: string[]) => React.FC<T>;
4
+ export default authorized;
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+
3
+ /**
4
+ * A HOC to make its wrapped component extensible by other microfrontend modules.
5
+ * If there is an extension then it will use that one instead of the wrapped component.
6
+ *
7
+ * This is one of the ways to declare and use extension points.
8
+ * Suitable to declare a whole React component as extensible.
9
+ *
10
+ * There might be other forms in case the value of the extension point is not intended to be a React Components
11
+ * but some other data type (such as styles ?, colors ?)
12
+ *
13
+ * Under the hood this is a HOC over <ExtensionPoint> component.
14
+ * Another way to use it in case you want to wrap a component.
15
+ */
16
+ export declare const extensionPoint: <T extends object>(WrappedComponent: React.ComponentType<T>, extensionPointName?: string) => React.FC<T>;
17
+ export default extensionPoint;
@@ -0,0 +1,2 @@
1
+ export { extensionPoint } from './extensionPoint';
2
+ export { authorized } from './authorized';
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type AplicationMenuSubItem = {
4
+ label: string;
5
+ path?: string;
6
+ Icon?: React.ReactNode;
7
+ operations?: string[];
8
+ };
9
+ export type ApplicationMenuItem = {
10
+ label: string;
11
+ path?: string;
12
+ Icon?: React.ReactNode;
13
+ align?: 'top' | 'bottom';
14
+ operations?: string[];
15
+ items?: AplicationMenuSubItem[];
16
+ canCollapse?: boolean;
17
+ };
18
+ export type ApplicationMenu = ApplicationMenuItem[];
@@ -0,0 +1,10 @@
1
+ import { ModuleMetadata, Operation, Role } from '@bluealba/pae-core';
2
+
3
+ export type PlatformApplication = {
4
+ name: string;
5
+ displayName?: string;
6
+ route?: string;
7
+ modules: ModuleMetadata[];
8
+ operations: Operation[];
9
+ roles: Role[];
10
+ };
@@ -0,0 +1,4 @@
1
+ import { PlatformApplication } from './PlatformApplication';
2
+
3
+ export declare const useApplicationIcon: (application: PlatformApplication | string) => any;
4
+ export default useApplicationIcon;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Returns the JS Module of a given PAE Module by name.
3
+ * This does the System import of the module.
4
+ * Low-level architectural stuff on top of single-spa architecture.
5
+ * Used by other framework generic hooks to work with PAE modules by convention.
6
+ *
7
+ * Implements in-memory caching with version-based invalidation:
8
+ * - Modules are cached during the session (cleared on page refresh)
9
+ * - Cache key includes module version for automatic invalidation
10
+ * - When module version changes, cache is automatically invalidated
11
+ */
12
+ export declare const useApplicationJSModule: (moduleName?: string) => System.Module | null;
13
+ /**
14
+ * Clear the module cache (useful for debugging and testing)
15
+ * Can clear all modules or a specific module by name
16
+ */
17
+ export declare const clearModuleCache: (moduleName?: string) => void;
18
+ export default useApplicationJSModule;
@@ -0,0 +1,11 @@
1
+ import { ApplicationMenu } from './ApplicationMenu';
2
+ import { PlatformApplication } from './PlatformApplication';
3
+ import { Operation } from '@bluealba/pae-core';
4
+
5
+ type UseApplicationMenuReturnType = {
6
+ loading: boolean;
7
+ menu: ApplicationMenu;
8
+ };
9
+ export declare const useApplicationMenu: (application: PlatformApplication | undefined) => UseApplicationMenuReturnType;
10
+ export default useApplicationMenu;
11
+ export declare const hasAccess: (authorizedOperations: Operation[]) => (operations: string[]) => boolean;
@@ -0,0 +1,4 @@
1
+ import { PlatformApplication } from './PlatformApplication';
2
+
3
+ export declare const useApplicationUIModule: (application: PlatformApplication | undefined) => import('@bluealba/pae-core').ModuleMetadata | undefined;
4
+ export default useApplicationUIModule;
@@ -0,0 +1,4 @@
1
+ import { PlatformApplication } from './PlatformApplication';
2
+
3
+ export declare const useApplications: () => PlatformApplication[];
4
+ export default useApplications;
@@ -0,0 +1,8 @@
1
+ import { PlatformApplication } from './PlatformApplication';
2
+
3
+ /**
4
+ * Gives access to the currently active PAE application based on the current browser's path.
5
+ */
6
+ export declare const useCurrentApplication: () => PlatformApplication | undefined;
7
+ export declare const findApplicationMatchingPath: (path: string, applications: PlatformApplication[]) => PlatformApplication | undefined;
8
+ export default useCurrentApplication;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns the current active PAE application name based on the browser's route.
3
+ * Or null if there is none.
4
+ */
5
+ export declare const useCurrentApplicationName: () => string | undefined;
6
+ export default useCurrentApplicationName;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Gives access to the JS module of the current UI module. This is the JS exported objects.
3
+ * Low-level stuff used by the framework.
4
+ * We use this in cases where a generic module like pae-shell needs to collaborate with a convention
5
+ * over UI modules that export stuff such as icons, or the menu definition.
6
+ * Then the generic shell can render a consistent UI based on the current JS module
7
+ */
8
+ export declare const useCurrentJSModule: () => System.Module | null;
9
+ export default useCurrentJSModule;
@@ -0,0 +1,14 @@
1
+ import { ModuleMetadata } from '@bluealba/pae-core';
2
+
3
+ /**
4
+ * Provides access to the PAE Applications Catalog object.
5
+ * NOTE: in the future we might handle server-side updates of the catalog
6
+ * by reacting with changes.
7
+ *
8
+ * REVIEWME: we are handling a copy of the catalog for every usage of `useCatalog`
9
+ * We should instead see if we can reuse a single source of truth, like a context.
10
+ * The problem is that every MF has its own DOM (React.renderRoot()) and context are not inherited.
11
+ * Maybe we should do the same approach as we did for the <PAEModule> and its ModuleContext.
12
+ * At least 1 copy per application.
13
+ */
14
+ export declare const useCatalog: () => ModuleMetadata[];
@@ -0,0 +1,28 @@
1
+ import { ModuleMetadata, ModuleProps } from '@bluealba/pae-core';
2
+ import { SetOrUpdateParam } from '../../utils/immutable';
3
+
4
+ export type SetCatalogParam = SetOrUpdateParam<ModuleMetadata[]>;
5
+ export type SetModulePropsParam = SetOrUpdateParam<ModuleProps>;
6
+ export type UseMutableCatalogReturnType = [
7
+ ModuleMetadata[],
8
+ (valueOrFn: SetCatalogParam) => void,
9
+ (moduleName: string, valueOrFn: SetOrUpdateParam<ModuleProps>) => void
10
+ ];
11
+ /**
12
+ * Gives access to the catalog (modules) allowing to reactively mutate it.
13
+ * Returns the current value and fn's to update it.
14
+ * Usage:
15
+ *
16
+ * const [catalog, setCatalog, setModuleProps] = useMutableCatalog()
17
+ *
18
+ * // ... later in a callback
19
+ * setCatalog(newValue) // or ...
20
+ * setCatalog(prev => { ...prev, ...changes })
21
+ *
22
+ * // or just update one module
23
+ * setModuleProps("my-module", newProps) // or ...
24
+ * setModuleProps("my-module", prev => ({ ...prev, ...changes }))
25
+ *
26
+ */
27
+ export declare const useMutableCatalog: () => UseMutableCatalogReturnType;
28
+ export default useMutableCatalog;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { Observable } from 'rxjs';
2
+
3
+ /**
4
+ * Given an Observable object it gives a reactive value for React.
5
+ * Subscribes to changes to the observable. Basic, but avoids repeating code
6
+ */
7
+ export declare const useObservable: <T>(observable: Observable<T>, initialValue: T) => T;
8
+ export default useObservable;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A generic hook to work with a REST resources.
3
+ * If you comply with the REST spec for normal operations such as create, update, delete, read will be inferred
4
+ * automatically
5
+ */
6
+ export declare const useResource: <T>(path: string, resourceName: string) => {
7
+ useCreate: (options?: import('./useResourceActions').MutationFeedbackOptions<T> | undefined) => import('@tanstack/react-query').UseMutationResult<T, Error, any, unknown>;
8
+ useReadQuery: (opts?: import('./useResourceActions').QueryOptions) => import('@tanstack/react-query').UseQueryResult<T[], Error>;
9
+ useReadByIdQuery: (id: string, opts?: import('./useResourceActions').QueryOptions) => import('@tanstack/react-query').UseQueryResult<import('@tanstack/query-core').NoInfer<T>, Error>;
10
+ useUpdate: (options?: import('./useResourceActions').MutationFeedbackOptions<T> | undefined) => import('@tanstack/react-query').UseMutationResult<T, Error, {
11
+ id: string;
12
+ data: any;
13
+ }, unknown>;
14
+ usePartialUpdate: (options?: import('./useResourceActions').MutationFeedbackOptions<T> | undefined) => import('@tanstack/react-query').UseMutationResult<T, Error, {
15
+ id: string;
16
+ data: any;
17
+ }, unknown> | undefined;
18
+ useDelete: (options?: import('./useResourceActions').MutationFeedbackOptions<T> | undefined) => import('@tanstack/react-query').UseMutationResult<void, Error, string, unknown>;
19
+ invalidateQueries: () => void;
20
+ };
21
+ export default useResource;
@@ -0,0 +1,56 @@
1
+ import { UseMutationResult, UseQueryResult } from '@tanstack/react-query';
2
+
3
+ /**
4
+ * Type definitions for CRUD operations
5
+ */
6
+ export interface CrudOperations<T = any, TCreate = any, TUpdate = any, TPartialUpdate = any> {
7
+ createFn: (data: TCreate) => Promise<T>;
8
+ readFn: () => Promise<T[]>;
9
+ readByIdFn: (id: string) => Promise<T>;
10
+ updateFn: (id: string, data: TUpdate) => Promise<T>;
11
+ partialUpdateFn?: (id: string, data: TPartialUpdate) => Promise<T>;
12
+ deleteFn: (id: string) => Promise<void>;
13
+ }
14
+ export interface ResourceActions<T = any, TCreate = any, TUpdate = any, TPartialUpdate = any> {
15
+ create: UseMutationResult<T, Error, TCreate, unknown>;
16
+ useReadQuery: () => UseQueryResult<T[], Error>;
17
+ useReadByIdQuery: (id: string) => UseQueryResult<T, Error>;
18
+ update: UseMutationResult<T, Error, {
19
+ id: string;
20
+ data: TUpdate;
21
+ }, unknown>;
22
+ partialUpdate: UseMutationResult<T, Error, {
23
+ id: string;
24
+ data: TPartialUpdate;
25
+ }, unknown>;
26
+ delete: UseMutationResult<void, Error, string, unknown>;
27
+ }
28
+ export interface QueryOptions {
29
+ enabled?: boolean;
30
+ }
31
+ export interface MutationFeedbackOptions<T> {
32
+ overrideSuccessMessage?: (resourceName: string, data?: T | null) => string;
33
+ overrideErrorMessage?: (resourceName: string, error?: Error) => string;
34
+ }
35
+ /**
36
+ * Hook to create standardized CRUD actions for a resource
37
+ *
38
+ * @param resourceKey - Unique identifier for the resource (used in query keys and notifications)
39
+ * @param operations - Object containing CRUD operation functions
40
+ * @returns Object with create, read, readById, update, and delete operations
41
+ */
42
+ export declare const useResourceActions: <T = any, TCreate = any, TUpdate = any, TPartialUpdate = any>(resourceKey: string, resourceName: string, operations: CrudOperations<T, TCreate, TUpdate, TPartialUpdate>) => {
43
+ useCreate: (options?: MutationFeedbackOptions<T>) => UseMutationResult<T, Error, TCreate, unknown>;
44
+ useReadQuery: (opts?: QueryOptions) => UseQueryResult<T[], Error>;
45
+ useReadByIdQuery: (id: string, opts?: QueryOptions) => UseQueryResult<import('@tanstack/react-query').NoInfer<T>, Error>;
46
+ useUpdate: (options?: MutationFeedbackOptions<T>) => UseMutationResult<T, Error, {
47
+ id: string;
48
+ data: TUpdate;
49
+ }, unknown>;
50
+ usePartialUpdate: (options?: MutationFeedbackOptions<T>) => UseMutationResult<T, Error, {
51
+ id: string;
52
+ data: TPartialUpdate;
53
+ }, unknown> | undefined;
54
+ useDelete: (options?: MutationFeedbackOptions<T>) => UseMutationResult<void, Error, string, unknown>;
55
+ invalidateQueries: () => void;
56
+ };
@@ -0,0 +1,11 @@
1
+ import { Subject } from 'rxjs';
2
+ import { SetOrUpdateFn } from '../../utils/immutable';
3
+
4
+ /**
5
+ * Hook to work reactively with Subject's (which are mutable Observables)
6
+ * This would be the mutable version of useObservable.
7
+ * Of course everything is pure here so when we say "mutable" we actually mean that it provides
8
+ * a pure way to change the value (doesn't actually mutate it but creates a new value and triggers reactivity)
9
+ */
10
+ export declare const useSubjectObservable: <T>(subject: Subject<T>, initialValue: T) => [T, SetOrUpdateFn<T>];
11
+ export default useSubjectObservable;
@@ -0,0 +1,13 @@
1
+ type FontVariant = {
2
+ path: string;
3
+ fontWeight: string;
4
+ format?: string;
5
+ };
6
+ export type FontDefinition = {
7
+ fontFamily: string;
8
+ variants: FontVariant[];
9
+ };
10
+ export declare function useDynamicFonts(fonts?: FontDefinition[]): {
11
+ fontsLoaded: boolean;
12
+ };
13
+ export {};