@linagora/linid-im-front-corelib 0.0.53 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core-lib.es.js +1542 -1508
- package/dist/core-lib.umd.js +13 -13
- package/dist/package.json +2 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/composables/useFieldValidation.d.ts +1 -0
- package/dist/types/src/composables/useQuasarFieldValidation.d.ts +1 -0
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/stores/linidUserStore.d.ts +25 -0
- package/dist/types/src/types/linidUser.d.ts +21 -0
- package/dist/types/src/types/uiDesign.d.ts +11 -3
- package/package.json +2 -1
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
export declare function useFieldValidation(instanceId: string, fieldName: string): {
|
|
9
9
|
validateFromApi: (value: unknown) => Promise<true | string>;
|
|
10
10
|
required: (value: unknown) => true | string;
|
|
11
|
+
email: (value: unknown) => true | string;
|
|
11
12
|
minLength: (value: string | null | undefined, minValue: number) => true | string;
|
|
12
13
|
maxLength: (value: string | null | undefined, maxValue: number) => true | string;
|
|
13
14
|
min: (value: number, minValue: number) => true | string;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
export declare function useQuasarFieldValidation(instanceId: string, fieldName: string): {
|
|
8
8
|
validateFromApi: (value: unknown) => Promise<true | string>;
|
|
9
9
|
required: (value: unknown) => true | string;
|
|
10
|
+
email: (value: unknown) => true | string;
|
|
10
11
|
min: (minValue: number) => (value: string | number) => string | true;
|
|
11
12
|
max: (maxValue: number) => (value: string | number) => string | true;
|
|
12
13
|
minLength: (minValue: number) => (value: string) => string | true;
|
|
@@ -10,6 +10,7 @@ export { useUiDesign } from './composables/useUiDesign';
|
|
|
10
10
|
export { useLinidConfigurationStore } from './stores/linidConfigurationStore';
|
|
11
11
|
export { useLinidUiStore } from './stores/linidUiStore';
|
|
12
12
|
export { useLinidZoneStore } from './stores/linidZoneStore';
|
|
13
|
+
export { useLinidUserStore } from './stores/linidUserStore';
|
|
13
14
|
export { getModuleFederation, loadAsyncComponent, setModuleFederation, } from './services/federationService';
|
|
14
15
|
export { getHttpClient, setHttpClient } from './services/httpClientService';
|
|
15
16
|
export { getI18nInstance, setI18nInstance } from './services/i18nService';
|
|
@@ -27,7 +28,7 @@ export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilte
|
|
|
27
28
|
export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
|
|
28
29
|
export type { FederatedModule, ModuleHostConfig, ModuleZoneDefinition, RemoteModule, } from './types/module';
|
|
29
30
|
export type { ModuleLifecycleHooks, ModuleLifecycleResult, } from './types/moduleLifecycle';
|
|
30
|
-
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQDateProps, LinidQDialogProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQListProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSpinnerProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
31
|
+
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQDateProps, LinidQDialogProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQListProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSpinnerProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
31
32
|
export type { NavigationMenuItem } from './types/linidUi';
|
|
32
33
|
export { ModuleLifecyclePhase } from './types/moduleLifecycle';
|
|
33
34
|
export { BasicRemoteModule } from './lifecycle/skeleton';
|
|
@@ -35,3 +36,4 @@ export type { UiEvent } from './types/uiEvent';
|
|
|
35
36
|
export type { ValidatorName } from './types/fieldValidation';
|
|
36
37
|
export type { LinidApiErrorResponseBody } from './types/linidApi';
|
|
37
38
|
export type { DialogEvent } from './types/dialogType';
|
|
39
|
+
export type { LinidUser } from './types/linidUser';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { IdTokenClaims } from 'oidc-client-ts';
|
|
2
|
+
import type { LinidUser } from '../types/linidUser';
|
|
3
|
+
/**
|
|
4
|
+
* State interface for the Linid User Store.
|
|
5
|
+
*/
|
|
6
|
+
interface LinidUserState {
|
|
7
|
+
/** The current user information. */
|
|
8
|
+
user: LinidUser;
|
|
9
|
+
/** Flag indicating whether the user is authenticated. */
|
|
10
|
+
isAuthenticated: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Returns the Linid User Store instance.
|
|
14
|
+
* @returns The Linid User Store instance.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useLinidUserStore: () => import("pinia").Store<"LinidUserStore", LinidUserState, {}, {
|
|
17
|
+
/**
|
|
18
|
+
* Populates the store from the claims of an OIDC ID token.
|
|
19
|
+
* Maps `sub` → username, `email`, `name` → fullName, `roles` → roles,
|
|
20
|
+
* and flips `isAuthenticated` to true.
|
|
21
|
+
* @param claims The decoded ID token claims provided by oidc-client-ts.
|
|
22
|
+
*/
|
|
23
|
+
setUserFromClaims(claims: IdTokenClaims): void;
|
|
24
|
+
}>;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a user in the system.
|
|
3
|
+
*/
|
|
4
|
+
export interface LinidUser {
|
|
5
|
+
/**
|
|
6
|
+
* Username of the user.
|
|
7
|
+
*/
|
|
8
|
+
username: string;
|
|
9
|
+
/**
|
|
10
|
+
* Email address of the user.
|
|
11
|
+
*/
|
|
12
|
+
email: string;
|
|
13
|
+
/**
|
|
14
|
+
* Full name of the user.
|
|
15
|
+
*/
|
|
16
|
+
fullName: string;
|
|
17
|
+
/**
|
|
18
|
+
* The list of roles assigned to the user.
|
|
19
|
+
*/
|
|
20
|
+
roles: string[];
|
|
21
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NamedColor, QAvatarProps, QBadgeProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QDateProps, QDialogProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QListProps, QRouteTabProps, QSelectProps, QSpinnerProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
|
|
1
|
+
import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QDateProps, QDialogProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QListProps, QRouteTabProps, QSelectProps, QSpinnerProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
|
|
2
2
|
/**
|
|
3
3
|
* Represents a single primitive value in the UI configuration.
|
|
4
4
|
*/
|
|
@@ -128,6 +128,10 @@ declare const Q_FORM_PROPS: readonly ["autofocus", "noErrorFocus", "noResetFocus
|
|
|
128
128
|
* List of QItemLabelProps keys for type-safe UI design retrieval.
|
|
129
129
|
*/
|
|
130
130
|
declare const Q_ITEM_LABEL_PROPS: readonly ["lines", "overline", "caption", "header"];
|
|
131
|
+
/**
|
|
132
|
+
* List of QBannerProps keys for type-safe UI design retrieval.
|
|
133
|
+
*/
|
|
134
|
+
declare const Q_BANNER_PROPS: readonly ["inlineActions", "dense", "rounded", "dark"];
|
|
131
135
|
/**
|
|
132
136
|
* Maps Quasar component names to their respective props keys for UI design retrieval.
|
|
133
137
|
*/
|
|
@@ -236,12 +240,16 @@ export type LinidQItemSectionProps = Pick<QItemSectionProps, (typeof Q_ITEM_SECT
|
|
|
236
240
|
* Subset of QItemLabelProps props supported in UI design configuration.
|
|
237
241
|
*/
|
|
238
242
|
export type LinidQItemLabelProps = Pick<QItemLabelProps, (typeof Q_ITEM_LABEL_PROPS)[number]>;
|
|
243
|
+
/**
|
|
244
|
+
* Subset of QBannerProps props supported in UI design configuration.
|
|
245
|
+
*/
|
|
246
|
+
export type LinidQBannerProps = Pick<QBannerProps, (typeof Q_BANNER_PROPS)[number]>;
|
|
239
247
|
/**
|
|
240
248
|
* Union type of all supported Quasar component props subsets.
|
|
241
249
|
*/
|
|
242
|
-
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQDateProps | LinidQDialogProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSpinnerProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps;
|
|
250
|
+
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQDateProps | LinidQDialogProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSpinnerProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQBannerProps;
|
|
243
251
|
/**
|
|
244
252
|
* Valid Quasar component names for type-safe UI design retrieval.
|
|
245
253
|
*/
|
|
246
|
-
export type QComponentName = 'q-avatar' | 'q-badge' | 'q-btn' | 'q-btn-dropdown' | 'q-card' | 'q-card-actions' | 'q-date' | 'q-dialog' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-list' | 'q-route-tab' | 'q-select' | 'q-spinner' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title';
|
|
254
|
+
export type QComponentName = 'q-avatar' | 'q-badge' | 'q-banner' | 'q-btn' | 'q-btn-dropdown' | 'q-card' | 'q-card-actions' | 'q-date' | 'q-dialog' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-list' | 'q-route-tab' | 'q-select' | 'q-spinner' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title';
|
|
247
255
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linagora/linid-im-front-corelib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.55",
|
|
4
4
|
"description": "Core library of the LinID Identity Manager project. Provides shared types, services, components, and utilities for front-end and plugin, enabling consistent integration across the LinID ecosystem.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"eslint-plugin-jsdoc": "62.8.0",
|
|
66
66
|
"eslint-plugin-vue": "10.8.0",
|
|
67
67
|
"happy-dom": "20.8.3",
|
|
68
|
+
"oidc-client-ts": "3.5.0",
|
|
68
69
|
"prettier": "3.8.1",
|
|
69
70
|
"typescript": "5.9.3",
|
|
70
71
|
"vite": "7.3.1",
|