@linagora/linid-im-front-corelib 0.0.39 → 0.0.41

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.
@@ -0,0 +1,10 @@
1
+ import { type DialogEvent } from '../types/dialogType';
2
+ /**
3
+ * Composable to manage the state of a dialog based on events emitted by the DialogSubject.
4
+ * @param key - The key to filter dialog events, allowing multiple dialogs to be managed independently.
5
+ * @param onOpen - Optional callback function to execute when the dialog is opened, receiving the dialog event as an argument.
6
+ * @returns An object containing the reactive `show` property to control the dialog visibility.
7
+ */
8
+ export declare function useDialog<T extends DialogEvent>(key: string, onOpen?: (event: T) => void): {
9
+ show: import("vue").Ref<boolean, boolean>;
10
+ };
@@ -1,6 +1,7 @@
1
1
  export { default as LinidZoneRenderer } from './components/LinidZoneRenderer.vue';
2
2
  export { useFieldValidation } from './composables/useFieldValidation';
3
3
  export { useNotify } from './composables/useNotify';
4
+ export { useDialog } from './composables/useDialog';
4
5
  export { usePagination } from './composables/usePagination';
5
6
  export { useQuasarFieldValidation } from './composables/useQuasarFieldValidation';
6
7
  export { useQuasarRules } from './composables/useQuasarRules';
@@ -25,10 +26,11 @@ export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilte
25
26
  export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
26
27
  export type { FederatedModule, ModuleHostConfig, RemoteModule, } from './types/module';
27
28
  export type { ModuleLifecycleHooks, ModuleLifecycleResult, } from './types/moduleLifecycle';
28
- export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQDateProps, LinidQFileProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQRouteTabProps, LinidQSelectProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
29
+ export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQDateProps, LinidQDialogProps, LinidQFileProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQRouteTabProps, LinidQSelectProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
29
30
  export type { NavigationMenuItem } from './types/linidUi';
30
31
  export { ModuleLifecyclePhase } from './types/moduleLifecycle';
31
32
  export { BasicRemoteModule } from './lifecycle/skeleton';
32
33
  export type { UiEvent } from './types/uiEvent';
33
34
  export type { ValidatorName } from './types/fieldValidation';
34
35
  export type { LinidApiErrorResponseBody } from './types/linidApi';
36
+ export type { DialogEvent } from './types/dialogType';
@@ -17,5 +17,12 @@ export declare const useLinidZoneStore: () => import("pinia").Store<"linidZoneSt
17
17
  * @param entry - The entry to register.
18
18
  */
19
19
  register(zone: string, entry: LinidZoneEntry): void;
20
+ /**
21
+ * Register a new entry only if the plugin
22
+ * is not already registered in the zone.
23
+ * @param zone - The name of the zone.
24
+ * @param entry - The entry to register.
25
+ */
26
+ registerOnce(zone: string, entry: LinidZoneEntry): void;
20
27
  }>;
21
28
  export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Dialog event for user confirmations.
3
+ */
4
+ export type DialogEvent = {
5
+ /**
6
+ * Event type, expected to be 'open' or 'close'.
7
+ */
8
+ type: 'open' | 'close';
9
+ /**
10
+ * Namespace for the UI design.
11
+ */
12
+ uiNamespace: string;
13
+ /**
14
+ * I18n scope for translating the dialog content and buttons.
15
+ */
16
+ i18nScope: string;
17
+ };
@@ -1,4 +1,4 @@
1
- import type { NamedColor, QAvatarProps, QBadgeProps, QBtnProps, QCardActionsProps, QCardProps, QDateProps, QFileProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QRouteTabProps, QSelectProps, QTableProps, QTabsProps, QToggleProps, QToolbarProps, QToolbarTitleProps, VueClassProp, VueStyleObjectProp, VueStyleProp } from 'quasar';
1
+ import type { NamedColor, QAvatarProps, QBadgeProps, QBtnProps, QCardActionsProps, QCardProps, QDateProps, QDialogProps, QFileProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QRouteTabProps, QSelectProps, 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
  */
@@ -96,6 +96,10 @@ declare const Q_FILE_PROPS: readonly ["autofocus", "stackLabel", "hideHint", "cl
96
96
  * List of QSelectProps keys for type-safe UI design retrieval.
97
97
  */
98
98
  declare const Q_SELECT_PROPS: readonly ["virtualScrollHorizontal", "clearable", "autofocus", "hideDropdownIcon", "popupNoRouteDismiss", "fillInput", "transitionShow", "transitionHide", "transitionDuration", "behavior", "stackLabel", "hideHint", "clearIcon", "counter", "dropdownIcon", "useInput", "inputDebounce", "optionsDense", "optionsDark", "optionsSelectedClass", "optionsCover", "menuShrink", "disableTabSelection", "menuAnchor", "menuSelf", "menuOffset", "displayValueHtml", "hideSelected", "useChips", "labelColor", "color", "bgColor", "dark", "filled", "outlined", "borderless", "standout", "hideBottomSpace", "rounded", "square", "dense", "itemAligned", "popupContentClass", "popupContentStyle", "inputClass", "inputStyle", "noErrorIcon", "virtualScrollSliceSize", "virtualScrollSliceRatioBefore", "virtualScrollSliceRatioAfter", "virtualScrollItemSize", "virtualScrollStickySizeStart", "virtualScrollStickySizeEnd"];
99
+ /**
100
+ * List of QDialogProps keys for type-safe UI design retrieval.
101
+ */
102
+ declare const Q_DIALOG_PROPS: readonly ["persistent", "noEscDismiss", "noBackdropDismiss", "noRouteDismiss", "autoClose", "noRefocus", "noFocus", "noShake", "allowFocusOutside", "seamless", "maximized", "fullWidth", "fullHeight", "position", "backdropFilter", "square", "transitionShow", "transitionHide", "transitionDuration"];
99
103
  /**
100
104
  * Maps Quasar component names to their respective props keys for UI design retrieval.
101
105
  */
@@ -172,12 +176,16 @@ export type LinidQFileProps = Pick<QFileProps, (typeof Q_FILE_PROPS)[number]>;
172
176
  * Subset of QSelect props supported in UI design configuration.
173
177
  */
174
178
  export type LinidQSelectProps = Pick<QSelectProps, (typeof Q_SELECT_PROPS)[number]>;
179
+ /**
180
+ * Subset of QDialog props supported in UI design configuration.
181
+ */
182
+ export type LinidQDialogProps = Pick<QDialogProps, (typeof Q_DIALOG_PROPS)[number]>;
175
183
  /**
176
184
  * Union type of all supported Quasar component props subsets.
177
185
  */
178
- export type LinidQComponentProps = LinidQBtnProps | LinidQTabsProps | LinidQRouteTabProps | LinidQHeaderProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQAvatarProps | LinidQBadgeProps | LinidQTableProps | LinidQCardProps | LinidQCardActionsProps | LinidQIconProps | LinidQToggleProps | LinidQInputProps | LinidQDateProps | LinidQImgProps | LinidQFileProps | LinidQSelectProps;
186
+ export type LinidQComponentProps = LinidQBtnProps | LinidQTabsProps | LinidQRouteTabProps | LinidQHeaderProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQAvatarProps | LinidQBadgeProps | LinidQTableProps | LinidQCardProps | LinidQCardActionsProps | LinidQIconProps | LinidQToggleProps | LinidQInputProps | LinidQDateProps | LinidQImgProps | LinidQFileProps | LinidQSelectProps | LinidQDialogProps;
179
187
  /**
180
188
  * Valid Quasar component names for type-safe UI design retrieval.
181
189
  */
182
- export type QComponentName = 'q-btn' | 'q-tabs' | 'q-route-tab' | 'q-header' | 'q-toolbar' | 'q-toolbar-title' | 'q-avatar' | 'q-badge' | 'q-table' | 'q-card' | 'q-card-actions' | 'q-icon' | 'q-toggle' | 'q-input' | 'q-date' | 'q-img' | 'q-file' | 'q-select';
190
+ export type QComponentName = 'q-btn' | 'q-tabs' | 'q-route-tab' | 'q-header' | 'q-toolbar' | 'q-toolbar-title' | 'q-avatar' | 'q-badge' | 'q-table' | 'q-card' | 'q-card-actions' | 'q-icon' | 'q-toggle' | 'q-input' | 'q-date' | 'q-img' | 'q-file' | 'q-select' | 'q-dialog';
183
191
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linagora/linid-im-front-corelib",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
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": [