@linagora/linid-im-front-corelib 0.0.57 → 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, LinidQMenuProps, 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, QMenuProps, 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
  */
@@ -136,6 +136,10 @@ declare const Q_BANNER_PROPS: readonly ["inlineActions", "dense", "rounded", "da
136
136
  * List of QMenuProps keys for type-safe UI design retrieval.
137
137
  */
138
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"];
139
143
  /**
140
144
  * Maps Quasar component names to their respective props keys for UI design retrieval.
141
145
  */
@@ -252,12 +256,16 @@ export type LinidQBannerProps = Pick<QBannerProps, (typeof Q_BANNER_PROPS)[numbe
252
256
  * Subset of QMenuProps props supported in UI design configuration.
253
257
  */
254
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]>;
255
263
  /**
256
264
  * Union type of all supported Quasar component props subsets.
257
265
  */
258
- 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;
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;
259
267
  /**
260
268
  * Valid Quasar component names for type-safe UI design retrieval.
261
269
  */
262
- 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';
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';
263
271
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linagora/linid-im-front-corelib",
3
- "version": "0.0.57",
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": [