@linagora/linid-im-front-corelib 0.0.5 → 0.0.7

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.
Files changed (48) hide show
  1. package/README.md +3 -3
  2. package/dist/core-lib.es.js +923 -852
  3. package/dist/core-lib.umd.js +9 -9
  4. package/dist/package.json +19 -14
  5. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  6. package/dist/types/src/index.d.ts +4 -0
  7. package/dist/types/src/services/httpClientService.d.ts +13 -0
  8. package/dist/types/src/services/linIdConfigurationService.d.ts +21 -0
  9. package/dist/types/src/stores/linIdConfigurationStore.d.ts +79 -0
  10. package/dist/types/src/types/linidConfiguration.d.ts +42 -0
  11. package/package.json +18 -13
  12. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -83
  13. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -90
  14. package/.github/ISSUE_TEMPLATE/question.yml +0 -31
  15. package/.github/ISSUE_TEMPLATE/security.yml +0 -69
  16. package/.github/actions/setup-node-pnpm/action.yml +0 -29
  17. package/.github/workflows/pull-request.yml +0 -147
  18. package/.github/workflows/release.yml +0 -90
  19. package/.prettierignore +0 -7
  20. package/.prettierrc.json +0 -5
  21. package/.vscode/extensions.json +0 -3
  22. package/.vscode/settings.json +0 -9
  23. package/CHANGELOG.md +0 -40
  24. package/CONTRIBUTING.md +0 -269
  25. package/COPYRIGHT +0 -23
  26. package/docs/components-plugin-zones.md +0 -168
  27. package/docs/helpers.md +0 -188
  28. package/docs/module-lifecycle.md +0 -717
  29. package/docs/types-and-interfaces.md +0 -92
  30. package/eslint.config.js +0 -136
  31. package/src/components/LinidZoneRenderer.vue +0 -77
  32. package/src/index.ts +0 -51
  33. package/src/lifecycle/skeleton.ts +0 -147
  34. package/src/services/federationService.ts +0 -44
  35. package/src/stores/linidZoneStore.ts +0 -62
  36. package/src/types/linidZone.ts +0 -48
  37. package/src/types/module.ts +0 -96
  38. package/src/types/moduleLifecycle.ts +0 -154
  39. package/tests/unit/components/LinidZoneRenderer.spec.js +0 -135
  40. package/tests/unit/lifecycle/skeleton.spec.js +0 -138
  41. package/tests/unit/services/federationService.spec.js +0 -146
  42. package/tests/unit/stores/linidZoneStore.spec.js +0 -94
  43. package/tsconfig.json +0 -14
  44. package/tsconfig.lib.json +0 -20
  45. package/tsconfig.node.json +0 -9
  46. package/tsconfig.spec.json +0 -16
  47. package/vite.config.ts +0 -37
  48. package/vitest.config.ts +0 -19
@@ -1,92 +0,0 @@
1
- # TypeScript Types & Interfaces 🧩
2
-
3
- This document explains the **types and interfaces** used in `linid-im-front-corelib`.
4
-
5
- ---
6
-
7
- ## 🔌 LinidZoneEntry
8
-
9
- Represents a plugin entry that can be rendered inside a zone.
10
-
11
- ```ts
12
- export interface LinidZoneEntry {
13
- /** Path or identifier of the plugin module */
14
- plugin: string;
15
-
16
- /** Props forwarded to the plugin component */
17
- props?: Record<string, unknown>;
18
- }
19
- ```
20
-
21
- **Usage:**
22
- All plugins registered to the `Linid Zone Store` must implement this interface.
23
-
24
- ---
25
-
26
- ## 🧱 LinidZoneState
27
-
28
- Represents the state of the Pinia store that manages all plugin zones.
29
-
30
- ```ts
31
- interface LinidZoneState {
32
- /** Map of zone names to their registered plugin entries */
33
- zones: Record<string, LinidZoneEntry[]>;
34
- }
35
- ```
36
-
37
- * `zones` is a reactive object.
38
- * Each key corresponds to a zone, each value is an array of plugins for that zone.
39
-
40
- ---
41
-
42
- ## 📦 RemoteComponentModule
43
-
44
- Defines the structure of a Vue component module loaded via Module Federation.
45
-
46
- ```ts
47
- export interface RemoteComponentModule {
48
- /** The default exported Vue component */
49
- default: Component;
50
- }
51
- ```
52
-
53
- **Usage:**
54
-
55
- Used internally by [`loadAsyncComponent`](./helpers.md#loadasynccomponent) to ensure type safety when loading federated components.
56
-
57
- **Remote modules must export a default component:**
58
-
59
- ```vue
60
- <!-- ✅ Correct - .vue file -->
61
- <template>
62
- <div>My Component</div>
63
- </template>
64
-
65
- <script setup lang="ts">
66
- // Default export is automatic
67
- </script>
68
- ```
69
-
70
- ```typescript
71
- // ❌ Wrong - named export only
72
- export const MyComponent = defineComponent({ /* ... */ });
73
-
74
- // ✅ Correct - default export
75
- export default defineComponent({ /* ... */ });
76
- ```
77
-
78
- ---
79
-
80
- ## 🧰 Summary
81
-
82
- | Type / Interface | Purpose |
83
- | ----------------------- | ----------------------------------------------------- |
84
- | `LinidZoneEntry` | Defines the contract for a plugin component |
85
- | `LinidZoneState` | Defines the structure of the zone store |
86
- | `RemoteComponentModule` | Defines the structure of a federated component module |
87
-
88
- These types enforce **consistency and type safety** across all front-end modules and plugins.
89
-
90
- ---
91
-
92
- > Additional types and interfaces will be added as new features are implemented in the library.
package/eslint.config.js DELETED
@@ -1,136 +0,0 @@
1
- import js from '@eslint/js';
2
- import prettierSkipFormatting from '@vue/eslint-config-prettier/skip-formatting';
3
- import {
4
- defineConfigWithVueTs,
5
- vueTsConfigs,
6
- } from '@vue/eslint-config-typescript';
7
- import jsdoc from 'eslint-plugin-jsdoc';
8
- import vue from 'eslint-plugin-vue';
9
- import headers from 'eslint-plugin-headers';
10
-
11
- export default defineConfigWithVueTs(
12
- {
13
- ignores: [
14
- 'dist/',
15
- 'coverage/',
16
- '**/vite.config.*.timestamp*',
17
- '**/vitest.config.*.timestamp*',
18
- ],
19
- },
20
- js.configs.recommended,
21
- vueTsConfigs.recommended,
22
- vue.configs['flat/recommended'],
23
- jsdoc.configs['flat/recommended-typescript'],
24
- prettierSkipFormatting,
25
- {
26
- files: ['**/*.{js,mjs,cjs}'],
27
- languageOptions: {
28
- globals: {
29
- process: 'readonly',
30
- },
31
- },
32
- },
33
- {
34
- files: ['**/*.{js,mjs,cjs,ts,vue}'],
35
- rules: {
36
- // Vue rules
37
- 'vue/multi-word-component-names': 'off',
38
- 'vue/require-default-prop': 'error',
39
- 'vue/require-prop-types': 'error',
40
- 'vue/component-api-style': ['error', ['script-setup']],
41
- 'vue/max-attributes-per-line': 'error',
42
-
43
- // TypeScript rules
44
- '@typescript-eslint/no-explicit-any': 'warn',
45
- '@typescript-eslint/no-unused-vars': [
46
- 'error',
47
- {
48
- argsIgnorePattern: '^_',
49
- varsIgnorePattern: '^_',
50
- },
51
- ],
52
- '@typescript-eslint/consistent-type-imports': 'error',
53
-
54
- // JSDoc rules
55
- 'jsdoc/require-jsdoc': [
56
- 'error',
57
- {
58
- require: {
59
- ArrowFunctionExpression: false,
60
- ClassDeclaration: true,
61
- ClassExpression: true,
62
- FunctionExpression: true,
63
- MethodDefinition: true,
64
- },
65
- contexts: [
66
- 'TSInterfaceDeclaration',
67
- 'TSTypeAliasDeclaration',
68
- 'TSEnumDeclaration',
69
- 'TSPropertySignature',
70
- 'TSModuleDeclaration VariableDeclaration',
71
- 'VariableDeclaration > VariableDeclarator > ArrowFunctionExpression',
72
- ],
73
- },
74
- ],
75
- 'jsdoc/check-tag-names': 'error',
76
- 'jsdoc/check-types': 'error',
77
- 'jsdoc/check-param-names': 'error',
78
- 'jsdoc/require-description': 'warn',
79
- 'jsdoc/require-description-complete-sentence': 'error',
80
-
81
- // General rules
82
- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
83
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
84
- curly: 'error',
85
- 'arrow-body-style': ['error', 'as-needed'],
86
- },
87
- },
88
- {
89
- files: ['src/**/*.vue'],
90
- plugins: {
91
- headers,
92
- },
93
- rules: {
94
- 'headers/header-format': [
95
- 'error',
96
- {
97
- source: 'file',
98
- path: 'COPYRIGHT',
99
- trailingNewlines: 2,
100
- enableVueSupport: true,
101
- },
102
- ],
103
- },
104
- },
105
- {
106
- files: ['src/**/*.{ts,js}'],
107
- plugins: {
108
- headers,
109
- },
110
- rules: {
111
- 'headers/header-format': [
112
- 'error',
113
- {
114
- source: 'file',
115
- path: 'COPYRIGHT',
116
- blockPrefix: '\n',
117
- trailingNewlines: 2,
118
- },
119
- ],
120
- },
121
- },
122
- {
123
- files: [
124
- '**/*.test.ts',
125
- '**/*.spec.ts',
126
- '**/*.test.js',
127
- '**/*.spec.js',
128
- '**/__tests__/**',
129
- '**/*.config.*',
130
- ],
131
- rules: {
132
- 'jsdoc/require-jsdoc': 'off',
133
- 'headers/header-format': 'off',
134
- },
135
- }
136
- );
@@ -1,77 +0,0 @@
1
- <!--
2
- Copyright (C) 2025 Linagora
3
-
4
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
5
- Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
6
- any later version, provided you comply with the Additional Terms applicable for LinID Identity Manager software by
7
- LINAGORA pursuant to Section 7 of the GNU Affero General Public License, subsections (b), (c), and (e), pursuant to
8
- which these Appropriate Legal Notices must notably (i) retain the display of the "LinID™" trademark/logo at the top
9
- of the interface window, the display of the “You are using the Open Source and free version of LinID™, powered by
10
- Linagora © 2009–2013. Contribute to LinID R&D by subscribing to an Enterprise offer!” infobox and in the e-mails
11
- sent with the Program, notice appended to any type of outbound messages (e.g. e-mail and meeting requests) as well
12
- as in the LinID Identity Manager user interface, (ii) retain all hypertext links between LinID Identity Manager
13
- and https://linid.org/, as well as between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA
14
- intellectual property rights over its trademarks and commercial brands. Other Additional Terms apply, see
15
- <http://www.linagora.com/licenses/> for more details.
16
-
17
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
18
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19
- details.
20
-
21
- You should have received a copy of the GNU Affero General Public License and its applicable Additional Terms for
22
- LinID Identity Manager along with this program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero
23
- General Public License version 3 and <http://www.linagora.com/licenses/> for the Additional Terms applicable to the
24
- LinID Identity Manager software.
25
- -->
26
-
27
- <template>
28
- <component
29
- :is="entry.component"
30
- v-for="(entry, index) in components"
31
- :key="entry.plugin + index"
32
- v-bind="entry.props"
33
- />
34
- <slot v-if="isLoadingComplete && components.length === 0">
35
- <div>No components to render in this zone.</div>
36
- </slot>
37
- </template>
38
-
39
- <script setup lang="ts">
40
- import { ref, watchEffect } from 'vue';
41
- import { loadAsyncComponent } from '../services/federationService';
42
- import { useLinidZoneStore } from '../stores/linidZoneStore';
43
- import type { LinidZoneEntry } from '../types/linidZone';
44
-
45
- const props = defineProps<{
46
- /**
47
- * The zone identifier where to render components.
48
- */
49
- zone: string;
50
- }>();
51
- const linidZoneStore = useLinidZoneStore();
52
-
53
- const components = ref<
54
- ({
55
- /**
56
- * The component to render.
57
- */
58
- component: unknown;
59
- } & LinidZoneEntry)[]
60
- >([]);
61
-
62
- const isLoadingComplete = ref(false);
63
-
64
- watchEffect(() => {
65
- isLoadingComplete.value = false;
66
-
67
- const entries = linidZoneStore.zones[props.zone] || [];
68
- components.value = entries.map((entry) => ({
69
- ...entry,
70
- component: loadAsyncComponent(entry.plugin),
71
- }));
72
-
73
- Promise.resolve().then(() => {
74
- isLoadingComplete.value = true;
75
- });
76
- });
77
- </script>
package/src/index.ts DELETED
@@ -1,51 +0,0 @@
1
- /*
2
- * Copyright (C) 2025 Linagora
3
- *
4
- * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
5
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
6
- * any later version, provided you comply with the Additional Terms applicable for LinID Identity Manager software by
7
- * LINAGORA pursuant to Section 7 of the GNU Affero General Public License, subsections (b), (c), and (e), pursuant to
8
- * which these Appropriate Legal Notices must notably (i) retain the display of the "LinID™" trademark/logo at the top
9
- * of the interface window, the display of the “You are using the Open Source and free version of LinID™, powered by
10
- * Linagora © 2009–2013. Contribute to LinID R&D by subscribing to an Enterprise offer!” infobox and in the e-mails
11
- * sent with the Program, notice appended to any type of outbound messages (e.g. e-mail and meeting requests) as well
12
- * as in the LinID Identity Manager user interface, (ii) retain all hypertext links between LinID Identity Manager
13
- * and https://linid.org/, as well as between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA
14
- * intellectual property rights over its trademarks and commercial brands. Other Additional Terms apply, see
15
- * <http://www.linagora.com/licenses/> for more details.
16
- *
17
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
18
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19
- * details.
20
- *
21
- * You should have received a copy of the GNU Affero General Public License and its applicable Additional Terms for
22
- * LinID Identity Manager along with this program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero
23
- * General Public License version 3 and <http://www.linagora.com/licenses/> for the Additional Terms applicable to the
24
- * LinID Identity Manager software.
25
- */
26
-
27
- // Components
28
- export { default as LinidZoneRenderer } from './components/LinidZoneRenderer.vue';
29
-
30
- // Stores
31
- export { useLinidZoneStore } from './stores/linidZoneStore';
32
-
33
- // Types - Zones
34
- export type { LinidZoneEntry } from './types/linidZone';
35
-
36
- export type {
37
- ModuleHostConfig,
38
- RemoteComponentModule,
39
- RemoteModule,
40
- } from './types/module';
41
-
42
- // Types - Module Lifecycle
43
- export type {
44
- ModuleLifecycleHooks,
45
- ModuleLifecycleResult,
46
- } from './types/moduleLifecycle';
47
-
48
- export { ModuleLifecyclePhase } from './types/moduleLifecycle';
49
-
50
- // Lifecycle Base Class
51
- export { BasicRemoteModule } from './lifecycle/skeleton';
@@ -1,147 +0,0 @@
1
- /*
2
- * Copyright (C) 2025 Linagora
3
- *
4
- * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
5
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
6
- * any later version, provided you comply with the Additional Terms applicable for LinID Identity Manager software by
7
- * LINAGORA pursuant to Section 7 of the GNU Affero General Public License, subsections (b), (c), and (e), pursuant to
8
- * which these Appropriate Legal Notices must notably (i) retain the display of the "LinID™" trademark/logo at the top
9
- * of the interface window, the display of the “You are using the Open Source and free version of LinID™, powered by
10
- * Linagora © 2009–2013. Contribute to LinID R&D by subscribing to an Enterprise offer!” infobox and in the e-mails
11
- * sent with the Program, notice appended to any type of outbound messages (e.g. e-mail and meeting requests) as well
12
- * as in the LinID Identity Manager user interface, (ii) retain all hypertext links between LinID Identity Manager
13
- * and https://linid.org/, as well as between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA
14
- * intellectual property rights over its trademarks and commercial brands. Other Additional Terms apply, see
15
- * <http://www.linagora.com/licenses/> for more details.
16
- *
17
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
18
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19
- * details.
20
- *
21
- * You should have received a copy of the GNU Affero General Public License and its applicable Additional Terms for
22
- * LinID Identity Manager along with this program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero
23
- * General Public License version 3 and <http://www.linagora.com/licenses/> for the Additional Terms applicable to the
24
- * LinID Identity Manager software.
25
- */
26
-
27
- import type { ModuleHostConfig, RemoteModule } from '../types/module';
28
- import type { ModuleLifecycleResult } from '../types/moduleLifecycle';
29
-
30
- /**
31
- * Basic implementation of a remote module lifecycle.
32
- *
33
- * This class provides default implementations for all lifecycle hooks,
34
- * allowing business modules to extend it and override only the hooks they need.
35
- *
36
- * All lifecycle hooks are optional and return success by default.
37
- */
38
- export class BasicRemoteModule implements RemoteModule {
39
- /**
40
- * Unique identifier for the module.
41
- *
42
- * Must match the ID in the host configuration.
43
- */
44
- public readonly id: string;
45
-
46
- /**
47
- * Human-readable name of the module.
48
- */
49
- public readonly name: string;
50
-
51
- /**
52
- * Version of the module (semantic versioning).
53
- */
54
- public readonly version: string;
55
-
56
- /**
57
- * Optional description of what the module does.
58
- */
59
- public readonly description?: string;
60
-
61
- /**
62
- * Creates a new remote module instance.
63
- * @param id - Unique module identifier (kebab-case).
64
- * @param name - Human-readable module name.
65
- * @param version - Module version (semver).
66
- * @param description - Optional module description.
67
- */
68
- constructor(id: string, name: string, version: string, description?: string) {
69
- this.id = id;
70
- this.name = name;
71
- this.version = version;
72
- this.description = description;
73
- }
74
-
75
- /**
76
- * Setup phase - validate dependencies and prepare the module.
77
- *
78
- * This is called first, before any other lifecycle phase.
79
- * Use it to check if all required dependencies are available.
80
- *
81
- * Default implementation returns success.
82
- * Override this method to add custom setup logic.
83
- * @returns Promise resolving to the lifecycle result.
84
- */
85
- async setup(): Promise<ModuleLifecycleResult> {
86
- return { success: true };
87
- }
88
-
89
- /**
90
- * Configure phase - receive and validate host configuration.
91
- *
92
- * This is called after setup, before initialization.
93
- * Use it to receive and validate the configuration from the host.
94
- *
95
- * Default implementation returns success.
96
- * Override this method to add custom configuration logic.
97
- * @param config - Module-specific configuration from host.
98
- * @returns Promise resolving to the lifecycle result.
99
- */
100
- async configure(
101
- config: ModuleHostConfig /* eslint-disable-line @typescript-eslint/no-unused-vars */
102
- ): Promise<ModuleLifecycleResult> {
103
- return { success: true };
104
- }
105
-
106
- /**
107
- * Initialize phase - register stores and initialize resources.
108
- *
109
- * This is called after configuration.
110
- * Use it to register Pinia stores and initialize module resources.
111
- *
112
- * Default implementation returns success.
113
- * Override this method to add custom initialization logic.
114
- * @returns Promise resolving to the lifecycle result.
115
- */
116
- async initialize(): Promise<ModuleLifecycleResult> {
117
- return { success: true };
118
- }
119
-
120
- /**
121
- * Ready phase - signal that the module is ready for use.
122
- *
123
- * This is called after all modules are initialized.
124
- * Use it to perform final checks and emit ready state.
125
- *
126
- * Default implementation returns success.
127
- * Override this method to add custom ready logic.
128
- * @returns Promise resolving to the lifecycle result.
129
- */
130
- async ready(): Promise<ModuleLifecycleResult> {
131
- return { success: true };
132
- }
133
-
134
- /**
135
- * Post-initialization phase - cross-module integrations.
136
- *
137
- * This is called after all modules are ready.
138
- * Use it for cross-module integrations and final setup.
139
- *
140
- * Default implementation returns success.
141
- * Override this method to add custom post-init logic.
142
- * @returns Promise resolving to the lifecycle result.
143
- */
144
- async postInit(): Promise<ModuleLifecycleResult> {
145
- return { success: true };
146
- }
147
- }
@@ -1,44 +0,0 @@
1
- /*
2
- * Copyright (C) 2025 Linagora
3
- *
4
- * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
5
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
6
- * any later version, provided you comply with the Additional Terms applicable for LinID Identity Manager software by
7
- * LINAGORA pursuant to Section 7 of the GNU Affero General Public License, subsections (b), (c), and (e), pursuant to
8
- * which these Appropriate Legal Notices must notably (i) retain the display of the "LinID™" trademark/logo at the top
9
- * of the interface window, the display of the “You are using the Open Source and free version of LinID™, powered by
10
- * Linagora © 2009–2013. Contribute to LinID R&D by subscribing to an Enterprise offer!” infobox and in the e-mails
11
- * sent with the Program, notice appended to any type of outbound messages (e.g. e-mail and meeting requests) as well
12
- * as in the LinID Identity Manager user interface, (ii) retain all hypertext links between LinID Identity Manager
13
- * and https://linid.org/, as well as between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA
14
- * intellectual property rights over its trademarks and commercial brands. Other Additional Terms apply, see
15
- * <http://www.linagora.com/licenses/> for more details.
16
- *
17
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
18
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19
- * details.
20
- *
21
- * You should have received a copy of the GNU Affero General Public License and its applicable Additional Terms for
22
- * LinID Identity Manager along with this program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero
23
- * General Public License version 3 and <http://www.linagora.com/licenses/> for the Additional Terms applicable to the
24
- * LinID Identity Manager software.
25
- */
26
-
27
- import { loadRemote } from '@module-federation/enhanced/runtime';
28
- import { defineAsyncComponent } from 'vue';
29
- import type { RemoteComponentModule } from '../types/module';
30
-
31
- /**
32
- * Loads a remote component using the module federation enhanced runtime.
33
- * @param plugin - The name of the remote plugin component to load.
34
- * @returns A Vue async component.
35
- */
36
- export const loadAsyncComponent = (plugin: string) =>
37
- defineAsyncComponent(() =>
38
- loadRemote<RemoteComponentModule>(plugin).then((module) => {
39
- if (!module?.default) {
40
- throw new Error(`Failed to load component from ${plugin}`);
41
- }
42
- return module.default;
43
- })
44
- );
@@ -1,62 +0,0 @@
1
- /*
2
- * Copyright (C) 2025 Linagora
3
- *
4
- * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
5
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
6
- * any later version, provided you comply with the Additional Terms applicable for LinID Identity Manager software by
7
- * LINAGORA pursuant to Section 7 of the GNU Affero General Public License, subsections (b), (c), and (e), pursuant to
8
- * which these Appropriate Legal Notices must notably (i) retain the display of the "LinID™" trademark/logo at the top
9
- * of the interface window, the display of the “You are using the Open Source and free version of LinID™, powered by
10
- * Linagora © 2009–2013. Contribute to LinID R&D by subscribing to an Enterprise offer!” infobox and in the e-mails
11
- * sent with the Program, notice appended to any type of outbound messages (e.g. e-mail and meeting requests) as well
12
- * as in the LinID Identity Manager user interface, (ii) retain all hypertext links between LinID Identity Manager
13
- * and https://linid.org/, as well as between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA
14
- * intellectual property rights over its trademarks and commercial brands. Other Additional Terms apply, see
15
- * <http://www.linagora.com/licenses/> for more details.
16
- *
17
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
18
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19
- * details.
20
- *
21
- * You should have received a copy of the GNU Affero General Public License and its applicable Additional Terms for
22
- * LinID Identity Manager along with this program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero
23
- * General Public License version 3 and <http://www.linagora.com/licenses/> for the Additional Terms applicable to the
24
- * LinID Identity Manager software.
25
- */
26
-
27
- import { defineStore } from 'pinia';
28
- import type { LinidZoneEntry } from '../types/linidZone';
29
-
30
- /**
31
- * State interface for the Linid Zone Store.
32
- */
33
- interface LinidZoneState {
34
- /** Map of zone names to their registered entries. */
35
- zones: Record<string, LinidZoneEntry[]>;
36
- }
37
-
38
- /**
39
- * Pinia store managing Linid zones and their registered entries.
40
- *
41
- * Each zone can contain multiple {@link LinidZoneEntry} objects,
42
- * and this store provides utilities to register them dynamically.
43
- */
44
- export const useLinidZoneStore = defineStore('linidZoneStore', {
45
- state: (): LinidZoneState => ({
46
- zones: {},
47
- }),
48
-
49
- actions: {
50
- /**
51
- * Register a new entry in a specified zone.
52
- * @param zone - The name of the zone.
53
- * @param entry - The entry to register.
54
- */
55
- register(zone: string, entry: LinidZoneEntry): void {
56
- if (!this.zones[zone]) {
57
- this.zones[zone] = [];
58
- }
59
- this.zones[zone].push(entry);
60
- },
61
- },
62
- });
@@ -1,48 +0,0 @@
1
- /*
2
- * Copyright (C) 2025 Linagora
3
- *
4
- * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
5
- * Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option)
6
- * any later version, provided you comply with the Additional Terms applicable for LinID Identity Manager software by
7
- * LINAGORA pursuant to Section 7 of the GNU Affero General Public License, subsections (b), (c), and (e), pursuant to
8
- * which these Appropriate Legal Notices must notably (i) retain the display of the "LinID™" trademark/logo at the top
9
- * of the interface window, the display of the “You are using the Open Source and free version of LinID™, powered by
10
- * Linagora © 2009–2013. Contribute to LinID R&D by subscribing to an Enterprise offer!” infobox and in the e-mails
11
- * sent with the Program, notice appended to any type of outbound messages (e.g. e-mail and meeting requests) as well
12
- * as in the LinID Identity Manager user interface, (ii) retain all hypertext links between LinID Identity Manager
13
- * and https://linid.org/, as well as between LINAGORA and LINAGORA.com, and (iii) refrain from infringing LINAGORA
14
- * intellectual property rights over its trademarks and commercial brands. Other Additional Terms apply, see
15
- * <http://www.linagora.com/licenses/> for more details.
16
- *
17
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
18
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
19
- * details.
20
- *
21
- * You should have received a copy of the GNU Affero General Public License and its applicable Additional Terms for
22
- * LinID Identity Manager along with this program. If not, see <http://www.gnu.org/licenses/> for the GNU Affero
23
- * General Public License version 3 and <http://www.linagora.com/licenses/> for the Additional Terms applicable to the
24
- * LinID Identity Manager software.
25
- */
26
-
27
- /**
28
- * Represents a single entry registered within a Linid Zone.
29
- *
30
- * Each entry corresponds to a component provided by a plugin,
31
- * and can optionally define props to configure that component.
32
- */
33
- export interface LinidZoneEntry {
34
- /**
35
- * The unique plugin identifier that registered this entry.
36
- *
37
- * Typically corresponds to the plugin name or package name.
38
- */
39
- plugin: string;
40
-
41
- /**
42
- * Optional props to be passed to the rendered component.
43
- *
44
- * The keys are prop names, and the values are Vue components or objects
45
- * compatible with Vue’s component system.
46
- */
47
- props?: Record<string, unknown>;
48
- }