@linagora/linid-im-front-corelib 0.0.56 → 0.0.58

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,16 @@
1
+ import type { QTreeNode } from 'quasar';
2
+ import type { TreeNode } from '../types/linidTree';
3
+ /**
4
+ * Composable providing utility functions to work with the tree component.
5
+ *
6
+ * This helper acts as a translation layer between:
7
+ * - the `TreeNode` structure used by the application layer, and
8
+ * - the `QTreeNode` structure expected by Quasar's `q-tree` component.
9
+ *
10
+ * It ensures consistent node mapping, key handling, and recursive children
11
+ * conversion across the application.
12
+ * @returns An object exposing tree conversion helpers.
13
+ */
14
+ export declare function useTree(): {
15
+ toQTreeNodes: (nodes: TreeNode[]) => QTreeNode[];
16
+ };
@@ -7,6 +7,7 @@ export { useQuasarFieldValidation } from './composables/useQuasarFieldValidation
7
7
  export { useQuasarRules } from './composables/useQuasarRules';
8
8
  export { useScopedI18n } from './composables/useScopedI18n';
9
9
  export { useUiDesign } from './composables/useUiDesign';
10
+ export { useTree } from './composables/useTree';
10
11
  export { useLinidConfigurationStore } from './stores/linidConfigurationStore';
11
12
  export { useLinidUiStore } from './stores/linidUiStore';
12
13
  export { useLinidZoneStore } from './stores/linidZoneStore';
@@ -28,7 +29,7 @@ export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilte
28
29
  export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
29
30
  export type { FederatedModule, ModuleHostConfig, ModuleZoneDefinition, RemoteModule, } from './types/module';
30
31
  export type { ModuleLifecycleHooks, ModuleLifecycleResult, } from './types/moduleLifecycle';
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';
32
+ export type { LinidQAvatarProps, LinidQBadgeProps, LinidQBannerProps, LinidQBtnDropdownProps, LinidQBtnProps, LinidQCardActionsProps, LinidQCardProps, LinidQDateProps, LinidQDialogProps, LinidQFileProps, LinidQFormProps, LinidQHeaderProps, LinidQIconProps, LinidQImgProps, LinidQInputProps, LinidQItemLabelProps, LinidQItemProps, LinidQItemSectionProps, LinidQListProps, LinidQMenuProps, LinidQRouteTabProps, LinidQSelectProps, LinidQSpinnerProps, LinidQTableProps, LinidQTabsProps, LinidQToggleProps, LinidQToolbarProps, LinidQToolbarTitleProps, LinidQTreeProps, UiDesign, UiDesignNamespace, UiDesignValue, } from './types/uiDesign';
32
33
  export type { NavigationMenuItem } from './types/linidUi';
33
34
  export { ModuleLifecyclePhase } from './types/moduleLifecycle';
34
35
  export { BasicRemoteModule } from './lifecycle/skeleton';
@@ -37,3 +38,4 @@ export type { ValidatorName } from './types/fieldValidation';
37
38
  export type { LinidApiErrorResponseBody } from './types/linidApi';
38
39
  export type { DialogEvent } from './types/dialogType';
39
40
  export type { LinidUser } from './types/linidUser';
41
+ export type { TreeNode } from './types/linidTree';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Represents a node in the tree structure.
3
+ */
4
+ export type TreeNode = {
5
+ /**
6
+ * The type of the node.
7
+ */
8
+ type: string;
9
+ /**
10
+ * Unique key identifying the node within the tree.
11
+ */
12
+ key: string;
13
+ /**
14
+ * The value associated with the node, which can be a string, number, or an object for complex nodes.
15
+ */
16
+ value: string | number | Record<string, unknown>;
17
+ /**
18
+ * Child nodes nested under this node.
19
+ */
20
+ nodes: TreeNode[];
21
+ };
@@ -1,4 +1,4 @@
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';
1
+ import type { NamedColor, QAvatarProps, QBadgeProps, QBannerProps, QBtnDropdownProps, QBtnProps, QCardActionsProps, QCardProps, QDateProps, QDialogProps, QFileProps, QFormProps, QHeaderProps, QIconProps, QImgProps, QInputProps, QItemLabelProps, QItemProps, QItemSectionProps, QListProps, QMenuProps, QRouteTabProps, QSelectProps, QSpinnerProps, 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
  */
@@ -132,6 +132,14 @@ declare const Q_ITEM_LABEL_PROPS: readonly ["lines", "overline", "caption", "hea
132
132
  * List of QBannerProps keys for type-safe UI design retrieval.
133
133
  */
134
134
  declare const Q_BANNER_PROPS: readonly ["inlineActions", "dense", "rounded", "dark"];
135
+ /**
136
+ * List of QMenuProps keys for type-safe UI design retrieval.
137
+ */
138
+ declare const Q_MENU_PROPS: readonly ["contextMenu", "touchPosition", "persistent", "noEscDismiss", "noRouteDismiss", "autoClose", "separateClosePopup", "noRefocus", "noFocus", "fit", "cover", "anchor", "self", "offset", "dark", "square", "maxHeight", "maxWidth", "transitionShow", "transitionHide", "transitionDuration"];
139
+ /**
140
+ * List of QTreeProps keys for type-safe UI design retrieval.
141
+ */
142
+ declare const Q_TREE_PROPS: readonly ["tickStrategy", "noSelectionUnset", "defaultExpandAll", "accordion", "noTransition", "noConnectors", "color", "controlColor", "textColor", "selectedColor", "dense", "dark", "duration"];
135
143
  /**
136
144
  * Maps Quasar component names to their respective props keys for UI design retrieval.
137
145
  */
@@ -244,12 +252,20 @@ export type LinidQItemLabelProps = Pick<QItemLabelProps, (typeof Q_ITEM_LABEL_PR
244
252
  * Subset of QBannerProps props supported in UI design configuration.
245
253
  */
246
254
  export type LinidQBannerProps = Pick<QBannerProps, (typeof Q_BANNER_PROPS)[number]>;
255
+ /**
256
+ * Subset of QMenuProps props supported in UI design configuration.
257
+ */
258
+ export type LinidQMenuProps = Pick<QMenuProps, (typeof Q_MENU_PROPS)[number]>;
259
+ /**
260
+ * Subset of QTreeProps props supported in UI design configuration.
261
+ */
262
+ export type LinidQTreeProps = Pick<QTreeProps, (typeof Q_TREE_PROPS)[number]>;
247
263
  /**
248
264
  * Union type of all supported Quasar component props subsets.
249
265
  */
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;
266
+ export type LinidQComponentProps = LinidQAvatarProps | LinidQBadgeProps | LinidQBannerProps | LinidQBtnDropdownProps | LinidQBtnProps | LinidQCardActionsProps | LinidQCardProps | LinidQDateProps | LinidQDialogProps | LinidQFileProps | LinidQFormProps | LinidQHeaderProps | LinidQIconProps | LinidQImgProps | LinidQInputProps | LinidQItemLabelProps | LinidQItemProps | LinidQItemSectionProps | LinidQListProps | LinidQMenuProps | LinidQRouteTabProps | LinidQSelectProps | LinidQSpinnerProps | LinidQTableProps | LinidQTabsProps | LinidQToggleProps | LinidQToolbarProps | LinidQToolbarTitleProps | LinidQTreeProps;
251
267
  /**
252
268
  * Valid Quasar component names for type-safe UI design retrieval.
253
269
  */
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';
270
+ 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-menu' | 'q-route-tab' | 'q-select' | 'q-spinner' | 'q-table' | 'q-tabs' | 'q-toggle' | 'q-toolbar' | 'q-toolbar-title' | 'q-tree';
255
271
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linagora/linid-im-front-corelib",
3
- "version": "0.0.56",
3
+ "version": "0.0.58",
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": [