@linagora/linid-im-front-corelib 0.0.83 → 0.0.84

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.
@@ -35,7 +35,7 @@ export { LinidFilterSet } from './filters/linidFilterSet';
35
35
  export { LinidFilterValue } from './filters/linidFilterValue';
36
36
  export { LINID_FILTER_NEGATION_PREFIX, LINID_FILTER_OR_SEPARATOR, } from './types/linidFilter';
37
37
  export type { LinidFilterSetUserPreference } from './types/linidFilter';
38
- export type { LinidZoneEntry } from './types/linidZone';
38
+ export type { BaseLinidZoneEntry, ComponentLinidZoneEntry, FederatedLinidZoneEntry, LinidZoneEntry, LinidZoneResolvedEntry, } from './types/linidZone';
39
39
  export type { LinidRoute, LinidRoutes } from './types/linidRoute';
40
40
  export type { Page, Pagination, QTableRequestEvent, QuasarPagination, QueryFilter, } from './types/page';
41
41
  export type { AttributeInputType, LinidApiEndpointConfiguration, LinidAttributeConfiguration, LinidEntityConfiguration, } from './types/linidConfiguration';
@@ -1,3 +1,4 @@
1
+ import type { Component } from 'vue';
1
2
  import type { LinidZoneEntry } from '../types/linidZone';
2
3
  /**
3
4
  * State interface for the Linid Zone Store.
@@ -12,17 +13,37 @@ interface LinidZoneState {
12
13
  */
13
14
  export declare const useLinidZoneStore: () => import("pinia").Store<"linidZoneStore", LinidZoneState, {}, {
14
15
  /**
15
- * Register a new entry in a specified zone.
16
+ * Append an entry to a specified zone, creating the zone if needed.
17
+ *
18
+ * Internal helper backing the public `register*` actions.
16
19
  * @param zone - The name of the zone.
17
- * @param entry - The entry to register.
20
+ * @param entry - The entry to append.
18
21
  */
19
- register(zone: string, entry: LinidZoneEntry): void;
22
+ appendEntry(zone: string, entry: LinidZoneEntry): void;
20
23
  /**
21
- * Register a new entry only if the plugin
24
+ * Register a federated plugin component in a specified zone.
25
+ * @param zone - The name of the zone.
26
+ * @param plugin - The plugin identifier of the remote component to load.
27
+ * @param props - Optional props passed to the rendered component.
28
+ */
29
+ registerPlugin(zone: string, plugin: string, props?: Record<string, unknown>): void;
30
+ /**
31
+ * Register a federated plugin component only if the plugin
22
32
  * is not already registered in the zone.
23
33
  * @param zone - The name of the zone.
24
- * @param entry - The entry to register.
34
+ * @param plugin - The plugin identifier of the remote component to load.
35
+ * @param props - Optional props passed to the rendered component.
36
+ */
37
+ registerPluginOnce(zone: string, plugin: string, props?: Record<string, unknown>): void;
38
+ /**
39
+ * Register a Vue component directly in a specified zone.
40
+ *
41
+ * The component is stored with `markRaw` to keep it out of the
42
+ * reactivity system, as Vue components must not be reactive.
43
+ * @param zone - The name of the zone.
44
+ * @param component - The Vue component to render as-is.
45
+ * @param props - Optional props passed to the rendered component.
25
46
  */
26
- registerOnce(zone: string, entry: LinidZoneEntry): void;
47
+ registerComponent(zone: string, component: Component, props?: Record<string, unknown>): void;
27
48
  }>;
28
49
  export {};
@@ -1,21 +1,68 @@
1
+ import type { Component } from 'vue';
1
2
  /**
2
- * Represents a single entry registered within a Linid Zone.
3
- *
4
- * Each entry corresponds to a component provided by a plugin,
5
- * and can optionally define props to configure that component.
3
+ * Base model shared by all zone entry variants.
4
+ */
5
+ export interface BaseLinidZoneEntry {
6
+ /**
7
+ * Optional props to be passed to the rendered component.
8
+ *
9
+ * The keys are prop names, and the values are Vue components or objects
10
+ * compatible with Vue’s component system.
11
+ */
12
+ props?: Record<string, unknown>;
13
+ }
14
+ /**
15
+ * Zone entry referencing a component loaded through module federation.
6
16
  */
7
- export interface LinidZoneEntry {
17
+ export interface FederatedLinidZoneEntry extends BaseLinidZoneEntry {
18
+ /** Discriminant of the federated variant. */
19
+ type: 'federated';
8
20
  /**
9
21
  * The unique plugin identifier that registered this entry.
10
22
  *
11
23
  * Typically corresponds to the plugin name or package name.
12
24
  */
13
25
  plugin: string;
26
+ }
27
+ /**
28
+ * Zone entry providing a Vue component directly.
29
+ *
30
+ * Unlike federated entries, no module federation loading is involved:
31
+ * the component is rendered as-is.
32
+ */
33
+ export interface ComponentLinidZoneEntry extends BaseLinidZoneEntry {
34
+ /** Discriminant of the component variant. */
35
+ type: 'component';
14
36
  /**
15
- * Optional props to be passed to the rendered component.
37
+ * The Vue component to render directly.
38
+ */
39
+ component: Component;
40
+ }
41
+ /**
42
+ * Represents a single entry registered within a Linid Zone.
43
+ *
44
+ * An entry provides its component either through a federated plugin
45
+ * identifier ({@link FederatedLinidZoneEntry}) or as a Vue component
46
+ * given directly ({@link ComponentLinidZoneEntry}), and can optionally
47
+ * define props to configure that component.
48
+ */
49
+ export type LinidZoneEntry = FederatedLinidZoneEntry | ComponentLinidZoneEntry;
50
+ /**
51
+ * A zone entry resolved for rendering by `LinidZoneRenderer`.
52
+ *
53
+ * Whatever the entry variant, the resolved form always carries the
54
+ * component to render.
55
+ */
56
+ export interface LinidZoneResolvedEntry {
57
+ /**
58
+ * The component to render.
16
59
  *
17
- * The keys are prop names, and the values are Vue components or objects
18
- * compatible with Vue’s component system.
60
+ * Either the async component loaded from the federated plugin,
61
+ * or the Vue component provided directly by the entry.
62
+ */
63
+ component: Component;
64
+ /**
65
+ * Optional props to be passed to the rendered component.
19
66
  */
20
67
  props?: Record<string, unknown>;
21
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linagora/linid-im-front-corelib",
3
- "version": "0.0.83",
3
+ "version": "0.0.84",
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": [