@linagora/linid-im-front-corelib 0.0.77 → 0.0.79
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/README.md +5 -0
- package/dist/core-lib.es.js +2235 -2160
- package/dist/core-lib.umd.js +21 -21
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/composables/useLinidUserPreference.d.ts +15 -0
- package/dist/types/src/filters/linidFilterSet.d.ts +8 -2
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/stores/linidUserPreferenceStore.d.ts +29 -0
- package/dist/types/src/types/uiDesign.d.ts +8 -3
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable to manage user preferences lifecycle and synchronization
|
|
3
|
+
* between backend API and local Pinia store.
|
|
4
|
+
* @returns Composable exposing methods to interact with user preferences and the underlying store.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useLinidUserPreference(): {
|
|
7
|
+
init: () => Promise<void>;
|
|
8
|
+
saveUserPreference: (key: string, value: string) => Promise<void>;
|
|
9
|
+
deleteUserPreference: (key: string) => Promise<void>;
|
|
10
|
+
userPreferenceStore: import("pinia").Store<"LinidUserPreferenceStore", import("../stores/linidUserPreferenceStore").LinidUserPreferenceState, {}, {
|
|
11
|
+
setUserPreferences(values: Record<string, string>): void;
|
|
12
|
+
setUserPreference(key: string, value: string): void;
|
|
13
|
+
removeUserPreference(key: string): void;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
@@ -8,6 +8,10 @@ import { LinidFilter } from './linidFilter';
|
|
|
8
8
|
* [`spring-query-filter`](https://github.com/Zorin95670/spring-query-filter).
|
|
9
9
|
*/
|
|
10
10
|
export declare class LinidFilterSet {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier of the filter set.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
11
15
|
/**
|
|
12
16
|
* User-friendly name of the favorite search (e.g. "My Active Projects").
|
|
13
17
|
*/
|
|
@@ -18,10 +22,11 @@ export declare class LinidFilterSet {
|
|
|
18
22
|
filters: LinidFilter[];
|
|
19
23
|
/**
|
|
20
24
|
* Creates a new filter set.
|
|
25
|
+
* @param id - Unique identifier of the filter set.
|
|
21
26
|
* @param label - User-friendly name of the favorite search.
|
|
22
27
|
* @param filters - Collection of filters composing the favorite search.
|
|
23
28
|
*/
|
|
24
|
-
constructor(label: string, filters: LinidFilter[]);
|
|
29
|
+
constructor(id: string, label: string, filters: LinidFilter[]);
|
|
25
30
|
/**
|
|
26
31
|
* Parses a string representation of a filter set, as produced by {@link LinidFilterSet.toString},
|
|
27
32
|
* into a new {@link LinidFilterSet} instance.
|
|
@@ -35,11 +40,12 @@ export declare class LinidFilterSet {
|
|
|
35
40
|
* `value` tolerates `null`/`undefined`/any non-string at runtime (e.g. `localStorage.getItem(...)`,
|
|
36
41
|
* or across a Module Federation boundary): like an empty string, it produces an empty `filters`
|
|
37
42
|
* array instead of throwing.
|
|
43
|
+
* @param id - Unique identifier of the filter set.
|
|
38
44
|
* @param label - User-friendly name of the favorite search.
|
|
39
45
|
* @param value - The `&`-separated string of `name=value` pairs, as produced by `toString()`.
|
|
40
46
|
* @returns The parsed filter set.
|
|
41
47
|
*/
|
|
42
|
-
static fromString(label: string, value: string | null | undefined): LinidFilterSet;
|
|
48
|
+
static fromString(id: string, label: string, value: string | null | undefined): LinidFilterSet;
|
|
43
49
|
/**
|
|
44
50
|
* Reconstructs the filter set as a `&`-separated string of `name=value` pairs, one per filter,
|
|
45
51
|
* ready to use with APIs powered by `spring-query-filter` or to store in user preferences.
|
|
@@ -12,10 +12,12 @@ export { useScopedI18n } from './composables/useScopedI18n';
|
|
|
12
12
|
export { useTree } from './composables/useTree';
|
|
13
13
|
export { useUiDesign } from './composables/useUiDesign';
|
|
14
14
|
export { useLinidFilterUrl } from './composables/useLinidFilterUrl';
|
|
15
|
+
export { useLinidUserPreference } from './composables/useLinidUserPreference';
|
|
15
16
|
export { useLinidConfigurationStore } from './stores/linidConfigurationStore';
|
|
16
17
|
export { useLinidUiStore } from './stores/linidUiStore';
|
|
17
18
|
export { useLinidUserStore } from './stores/linidUserStore';
|
|
18
19
|
export { useLinidZoneStore } from './stores/linidZoneStore';
|
|
20
|
+
export { useLinidUserPreferenceStore } from './stores/linidUserPreferenceStore';
|
|
19
21
|
export { getDayjsInstance, setDayjsInstance } from './services/dayjsService';
|
|
20
22
|
export { getModuleFederation, loadAsyncComponent, setModuleFederation, } from './services/federationService';
|
|
21
23
|
export { getHttpClient, setHttpClient } from './services/httpClientService';
|
|
@@ -38,7 +40,7 @@ export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilte
|
|
|
38
40
|
export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
|
|
39
41
|
export type { FederatedModule, ModuleHostConfig, ModuleZoneDefinition, RemoteModule, } from './types/module';
|
|
40
42
|
export type { ModuleLifecycleHooks, ModuleLifecycleResult, } from './types/moduleLifecycle';
|
|
41
|
-
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQCheckboxProps, LinidQDateProps, LinidQDialogProps, LinidQFieldProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQChipProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQLayoutProps, LinidQListProps, LinidQMenuProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSeparatorProps, LinidQSpinnerProps, LinidQSplitterProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
43
|
+
export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQCheckboxProps, LinidQDateProps, LinidQDialogProps, LinidQFieldProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQChipProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQLayoutProps, LinidQListProps, LinidQMenuProps, LinidQOptionGroupProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSeparatorProps, LinidQSpinnerProps, LinidQSplitterProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
|
|
42
44
|
export type { NavigationMenuItem } from './types/linidUi';
|
|
43
45
|
export { ModuleLifecyclePhase } from './types/moduleLifecycle';
|
|
44
46
|
export { BasicRemoteModule } from './lifecycle/skeleton';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State interface for the Linid User Preference Store.
|
|
3
|
+
*/
|
|
4
|
+
export interface LinidUserPreferenceState {
|
|
5
|
+
/** Collection of user preferences indexed by key. */
|
|
6
|
+
userPreferences: Record<string, string>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Returns the Linid User Preference Store instance.
|
|
10
|
+
* @returns The Linid User Preference Store instance.
|
|
11
|
+
*/
|
|
12
|
+
export declare const useLinidUserPreferenceStore: () => import("pinia").Store<"LinidUserPreferenceStore", LinidUserPreferenceState, {}, {
|
|
13
|
+
/**
|
|
14
|
+
* Replaces all user preferences with the provided collection.
|
|
15
|
+
* @param values The complete set of user preferences.
|
|
16
|
+
*/
|
|
17
|
+
setUserPreferences(values: Record<string, string>): void;
|
|
18
|
+
/**
|
|
19
|
+
* Creates or updates a user preference.
|
|
20
|
+
* @param key The user preference key.
|
|
21
|
+
* @param value The user preference value.
|
|
22
|
+
*/
|
|
23
|
+
setUserPreference(key: string, value: string): void;
|
|
24
|
+
/**
|
|
25
|
+
* Removes a user preference by its key.
|
|
26
|
+
* @param key The user preference key to remove.
|
|
27
|
+
*/
|
|
28
|
+
removeUserPreference(key: string): void;
|
|
29
|
+
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QCheckboxProps, QChipProps, QDateProps, QDialogProps, QFieldProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QLayoutProps, QListProps, QMenuProps, QRouteTabProps, QSelectProps, QSeparatorProps, QSpinnerProps, QSplitterProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, QTreeProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
|
|
1
|
+
import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QCheckboxProps, QChipProps, QDateProps, QDialogProps, QFieldProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QLayoutProps, QListProps, QMenuProps, QOptionGroup, QRouteTabProps, QSelectProps, QSeparatorProps, QSpinnerProps, QSplitterProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, QTreeProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
|
|
2
2
|
/**
|
|
3
3
|
* Represents a single primitive value in the UI configuration.
|
|
4
4
|
*/
|
|
@@ -161,6 +161,7 @@ declare const Q_TREE_PROPS: readonly ["tickStrategy", "noSelectionUnset", "defau
|
|
|
161
161
|
*/
|
|
162
162
|
declare const Q_SPLITTER_PROPS: readonly ["horizontal", "limits", "modelValue", "reverse", "unit", "disable", "beforeClass", "afterClass", "separatorClass", "separatorStyle", "dark"];
|
|
163
163
|
declare const Q_SEPARATOR_PROPS: readonly ["spaced", "inset", "vertical", "dark", "size", "color"];
|
|
164
|
+
declare const Q_OPTION_GROUP_PROPS: readonly ["keepColor", "type", "leftLabel", "inline", "size", "color", "dark", "dense"];
|
|
164
165
|
/**
|
|
165
166
|
* Maps Quasar component names to their respective props keys for UI design retrieval.
|
|
166
167
|
*/
|
|
@@ -305,12 +306,16 @@ export type LinidQSplitterProps = Pick<QSplitterProps, (typeof Q_SPLITTER_PROPS)
|
|
|
305
306
|
* Subset of QSeparator props supported in UI design configuration.
|
|
306
307
|
*/
|
|
307
308
|
export type LinidQSeparatorProps = Pick<QSeparatorProps, (typeof Q_SEPARATOR_PROPS)[number]>;
|
|
309
|
+
/**
|
|
310
|
+
* Subset of QOptionGroup props supported in UI design configuration.
|
|
311
|
+
*/
|
|
312
|
+
export type LinidQOptionGroupProps = Pick<QOptionGroup, (typeof Q_OPTION_GROUP_PROPS)[number]>;
|
|
308
313
|
/**
|
|
309
314
|
* Union type of all supported Quasar component props subsets.
|
|
310
315
|
*/
|
|
311
|
-
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBannerProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQCheckboxProps | LinidQDateProps | LinidQDialogProps | LinidQFieldProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQChipProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQMenuProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSeparatorProps | LinidQSpinnerProps | LinidQSplitterProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
|
|
316
|
+
export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBannerProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQCheckboxProps | LinidQDateProps | LinidQDialogProps | LinidQFieldProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQChipProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQMenuProps | LinidQOptionGroupProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSeparatorProps | LinidQSpinnerProps | LinidQSplitterProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
|
|
312
317
|
/**
|
|
313
318
|
* Valid Quasar component names for type-safe UI design retrieval.
|
|
314
319
|
*/
|
|
315
|
-
export type QComponentName = 'q-avatar' | 'q-badge' | 'q-banner' | 'q-btn' | 'q-btn-dropdown' | 'q-card' | 'q-card-actions' | 'q-checkbox' | 'q-date' | 'q-dialog' | 'q-field' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-chip' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-layout' | 'q-list' | 'q-menu' | 'q-route-tab' | 'q-select' | 'q-separator' | 'q-spinner' | 'q-splitter' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree';
|
|
320
|
+
export type QComponentName = 'q-avatar' | 'q-badge' | 'q-banner' | 'q-btn' | 'q-btn-dropdown' | 'q-card' | 'q-card-actions' | 'q-checkbox' | 'q-date' | 'q-dialog' | 'q-field' | 'q-file' | 'q-form' | 'q-header' | 'q-icon' | 'q-chip' | 'q-img' | 'q-input' | 'q-item' | 'q-item-label' | 'q-item-section' | 'q-layout' | 'q-list' | 'q-menu' | 'q-option-group' | 'q-route-tab' | 'q-select' | 'q-separator' | 'q-spinner' | 'q-splitter' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree';
|
|
316
321
|
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.79",
|
|
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": [
|