@geexcode/geex-angular 0.0.38 → 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.
@@ -1,65 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name);
6
- var __typeError = (msg) => {
7
- throw TypeError(msg);
8
- };
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
12
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
13
- }) : x)(function(x) {
14
- if (typeof require !== "undefined") return require.apply(this, arguments);
15
- throw Error('Dynamic require of "' + x + '" is not supported');
16
- });
17
- var __commonJS = (cb, mod) => function __require2() {
18
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
- };
20
- var __decoratorStart = (base) => [, , , __create(base?.[__knownSymbol("metadata")] ?? null)];
21
- var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"];
22
- var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn;
23
- var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) });
24
- var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]);
25
- var __runInitializers = (array, flags, self, value) => {
26
- for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) flags & 1 ? fns[i].call(self) : value = fns[i].call(self, value);
27
- return value;
28
- };
29
- var __decorateElement = (array, flags, name, decorators, target, extra) => {
30
- var fn, it, done, ctx, access, k = flags & 7, s = !!(flags & 8), p = !!(flags & 16);
31
- var j = k > 3 ? array.length + 1 : k ? s ? 1 : 2 : 0, key = __decoratorStrings[k + 5];
32
- var initializers = k > 3 && (array[j - 1] = []), extraInitializers = array[j] || (array[j] = []);
33
- var desc = k && (!p && !s && (target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(k < 4 ? target : { get [name]() {
34
- return __privateGet(this, extra);
35
- }, set [name](x) {
36
- return __privateSet(this, extra, x);
37
- } }, name));
38
- k ? p && k < 4 && __name(extra, (k > 2 ? "set " : k > 1 ? "get " : "") + name) : __name(target, name);
39
- for (var i = decorators.length - 1; i >= 0; i--) {
40
- ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers);
41
- if (k) {
42
- ctx.static = s, ctx.private = p, access = ctx.access = { has: p ? (x) => __privateIn(target, x) : (x) => name in x };
43
- if (k ^ 3) access.get = p ? (x) => (k ^ 1 ? __privateGet : __privateMethod)(x, target, k ^ 4 ? extra : desc.get) : (x) => x[name];
44
- if (k > 2) access.set = p ? (x, y) => __privateSet(x, target, y, k ^ 4 ? extra : desc.set) : (x, y) => x[name] = y;
45
- }
46
- it = (0, decorators[i])(k ? k < 4 ? p ? extra : desc[key] : k > 4 ? void 0 : { get: desc.get, set: desc.set } : target, ctx), done._ = 1;
47
- if (k ^ 4 || it === void 0) __expectFn(it) && (k > 4 ? initializers.unshift(it) : k ? p ? extra = it : desc[key] = it : target = it);
48
- else if (typeof it !== "object" || it === null) __typeError("Object expected");
49
- else __expectFn(fn = it.get) && (desc.get = fn), __expectFn(fn = it.set) && (desc.set = fn), __expectFn(fn = it.init) && initializers.unshift(fn);
50
- }
51
- return k || __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target;
52
- };
53
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
54
- var __privateIn = (member, obj) => Object(obj) !== obj ? __typeError('Cannot use the "in" operator on this value') : member.has(obj);
55
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
56
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
57
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
58
-
59
- export {
60
- __require,
61
- __commonJS,
62
- __decoratorStart,
63
- __runInitializers,
64
- __decorateElement
65
- };
@@ -1,15 +0,0 @@
1
- var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
- }) : x)(function(x) {
5
- if (typeof require !== "undefined") return require.apply(this, arguments);
6
- throw Error('Dynamic require of "' + x + '" is not supported');
7
- });
8
- var __commonJS = (cb, mod) => function __require2() {
9
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
- };
11
-
12
- export {
13
- __require,
14
- __commonJS
15
- };
@@ -1,37 +0,0 @@
1
- /**
2
- * ESBuild plugin to handle .gql imports and redirect them to .gql.ts files
3
- *
4
- * This plugin resolves .gql imports by checking if a corresponding .gql.ts file exists.
5
- * If it does, it redirects the import to the .gql.ts file. Otherwise, it lets esbuild
6
- * handle the .gql file normally.
7
- *
8
- * Now supports TypeScript path aliases for proper module resolution.
9
- *
10
- * @param {GqlRedirectPluginOptions} [options]
11
- * @returns {Plugin}
12
- */
13
- declare function gqlRedirectPlugin(options?: GqlRedirectPluginOptions): Plugin;
14
- declare namespace gqlRedirectPlugin {
15
- export { gqlRedirectPlugin as default, gqlRedirectPlugin, type Plugin, type GqlRedirectPluginOptions, type PathMapping };
16
- }
17
- type Plugin = any;
18
- type GqlRedirectPluginOptions = {
19
- /**
20
- * Whether to enable verbose logging
21
- */
22
- verbose?: boolean | undefined;
23
- /**
24
- * Path to tsconfig.json file for path alias resolution
25
- */
26
- tsconfigPath?: string | undefined;
27
- /**
28
- * Whether to automatically run pnpm gqlgen when .gql.ts files are missing
29
- */
30
- autoGqlGen?: boolean | undefined;
31
- };
32
- type PathMapping = {
33
- alias: string;
34
- paths: string[];
35
- };
36
-
37
- export { gqlRedirectPlugin as default };
@@ -1,37 +0,0 @@
1
- /**
2
- * ESBuild plugin to handle .gql imports and redirect them to .gql.ts files
3
- *
4
- * This plugin resolves .gql imports by checking if a corresponding .gql.ts file exists.
5
- * If it does, it redirects the import to the .gql.ts file. Otherwise, it lets esbuild
6
- * handle the .gql file normally.
7
- *
8
- * Now supports TypeScript path aliases for proper module resolution.
9
- *
10
- * @param {GqlRedirectPluginOptions} [options]
11
- * @returns {Plugin}
12
- */
13
- declare function gqlRedirectPlugin(options?: GqlRedirectPluginOptions): Plugin;
14
- declare namespace gqlRedirectPlugin {
15
- export { gqlRedirectPlugin as default, gqlRedirectPlugin, type Plugin, type GqlRedirectPluginOptions, type PathMapping };
16
- }
17
- type Plugin = any;
18
- type GqlRedirectPluginOptions = {
19
- /**
20
- * Whether to enable verbose logging
21
- */
22
- verbose?: boolean | undefined;
23
- /**
24
- * Path to tsconfig.json file for path alias resolution
25
- */
26
- tsconfigPath?: string | undefined;
27
- /**
28
- * Whether to automatically run pnpm gqlgen when .gql.ts files are missing
29
- */
30
- autoGqlGen?: boolean | undefined;
31
- };
32
- type PathMapping = {
33
- alias: string;
34
- paths: string[];
35
- };
36
-
37
- export { gqlRedirectPlugin as default };
@@ -1,269 +0,0 @@
1
- import {
2
- __commonJS,
3
- __require
4
- } from "../chunk-EBO3CZXG.mjs";
5
-
6
- // src/esbuild/gql-redirect.plugin.js
7
- var require_gql_redirect_plugin = __commonJS({
8
- "src/esbuild/gql-redirect.plugin.js"(exports, module) {
9
- var path = __require("path");
10
- var fs = __require("fs");
11
- var json5 = __require("json5");
12
- var crypto = __require("crypto");
13
- var { execSync } = __require("child_process");
14
- var { glob } = __require("glob");
15
- var yaml = __require("yaml");
16
- var graphqlrcContent = void 0;
17
- function loadTsconfigPaths(tsconfigPath) {
18
- try {
19
- const tsconfig = json5.parse(fs.readFileSync(tsconfigPath, "utf8"));
20
- const baseUrl = tsconfig.compilerOptions && tsconfig.compilerOptions.baseUrl || "./";
21
- const paths = tsconfig.compilerOptions && tsconfig.compilerOptions.paths || {};
22
- return Object.entries(paths).map(([alias, pathList]) => ({
23
- alias: alias.replace(/\/\*$/, ""),
24
- paths: (
25
- /** @type {string[]} */
26
- pathList.map(
27
- (p) => path.resolve(path.dirname(tsconfigPath), baseUrl, p.replace(/\/\*$/, ""))
28
- )
29
- )
30
- }));
31
- } catch (error) {
32
- console.warn(`[gql-redirect] Failed to load tsconfig from ${tsconfigPath}:`, error);
33
- return [];
34
- }
35
- }
36
- function findAngularJsonDir(startDir) {
37
- try {
38
- let dir = startDir;
39
- while (true) {
40
- if (fs.existsSync(path.join(dir, "angular.json"))) return dir;
41
- const parent = path.dirname(dir);
42
- if (parent === dir) return startDir;
43
- dir = parent;
44
- }
45
- } catch {
46
- return startDir;
47
- }
48
- }
49
- function parseGraphqlrcDocuments(projectRoot) {
50
- try {
51
- const graphqlrcPath = path.join(projectRoot, ".graphqlrc.yml");
52
- if (!fs.existsSync(graphqlrcPath)) {
53
- console.warn("[gql-redirect] .graphqlrc.yml not found, falling back to default patterns");
54
- return [];
55
- }
56
- graphqlrcContent ?? (graphqlrcContent = fs.readFileSync(graphqlrcPath, "utf8"));
57
- const cleanContent = graphqlrcContent.replace(/^# gql-hash:.*\n/, "");
58
- const config = yaml.parse(cleanContent);
59
- if (!config || !config.documents) {
60
- console.warn("[gql-redirect] No documents section found in .graphqlrc.yml");
61
- return [];
62
- }
63
- const documents = config.documents;
64
- if (Array.isArray(documents)) {
65
- return documents.filter((doc) => typeof doc === "string");
66
- } else if (typeof documents === "string") {
67
- return [documents];
68
- } else {
69
- console.warn("[gql-redirect] Unexpected documents format in .graphqlrc.yml");
70
- return [];
71
- }
72
- } catch (error) {
73
- console.warn(`[gql-redirect] Failed to parse .graphqlrc.yml:`, error.message);
74
- return [];
75
- }
76
- }
77
- function findGqlFilesByDocuments(projectRoot) {
78
- try {
79
- const documentPatterns = parseGraphqlrcDocuments(projectRoot);
80
- const allFiles = /* @__PURE__ */ new Set();
81
- for (const pattern of documentPatterns) {
82
- if (pattern.startsWith("!")) {
83
- continue;
84
- }
85
- try {
86
- const matches = glob.sync(pattern, {
87
- cwd: projectRoot,
88
- absolute: true,
89
- nodir: true
90
- });
91
- matches.forEach((file) => allFiles.add(file));
92
- } catch (error) {
93
- console.warn(`[gql-redirect] Failed to process pattern "${pattern}":`, error.message);
94
- }
95
- }
96
- const negationPatterns = documentPatterns.filter((pattern) => pattern.startsWith("!"));
97
- let filteredFiles = Array.from(allFiles);
98
- for (const negPattern of negationPatterns) {
99
- const pattern = negPattern.substring(1);
100
- try {
101
- const excludeMatches = glob.sync(pattern, {
102
- cwd: projectRoot,
103
- absolute: true,
104
- nodir: true
105
- });
106
- const excludeSet = new Set(excludeMatches);
107
- filteredFiles = filteredFiles.filter((file) => !excludeSet.has(file));
108
- } catch (error) {
109
- console.warn(`[gql-redirect] Failed to process negation pattern "${negPattern}":`, error.message);
110
- }
111
- }
112
- return filteredFiles.sort();
113
- } catch (error) {
114
- console.warn(`[gql-redirect] Failed to find GQL files:`, error.message);
115
- return [];
116
- }
117
- }
118
- function calculateGqlHash(projectRoot) {
119
- try {
120
- const hash = crypto.createHash("md5");
121
- const gqlFiles = findGqlFilesByDocuments(projectRoot);
122
- for (const filePath of gqlFiles) {
123
- try {
124
- const content = fs.readFileSync(filePath, "utf8");
125
- hash.update(`${path.relative(projectRoot, filePath)}:${content}`);
126
- } catch (error) {
127
- console.warn(`[gql-redirect] Failed to read ${filePath}:`, error.message);
128
- }
129
- }
130
- const graphqlrcPath = path.join(projectRoot, ".graphqlrc.yml");
131
- if (fs.existsSync(graphqlrcPath)) {
132
- try {
133
- graphqlrcContent ?? (graphqlrcContent = fs.readFileSync(graphqlrcPath, "utf8"));
134
- const cleanContent = graphqlrcContent.replace(/^# gql-hash: .*/m, "");
135
- hash.update(`.graphqlrc.yml:${cleanContent}`);
136
- } catch (error) {
137
- console.warn(`[gql-redirect] Failed to read .graphqlrc.yml:`, error.message);
138
- }
139
- }
140
- return hash.digest("hex");
141
- } catch (error) {
142
- console.warn(`[gql-redirect] Failed to calculate GQL hash:`, error.message);
143
- return "";
144
- }
145
- }
146
- function getPreviousGqlHash(projectRoot) {
147
- try {
148
- const graphqlrcPath = path.join(projectRoot, ".graphqlrc.yml");
149
- if (!fs.existsSync(graphqlrcPath)) {
150
- return "";
151
- }
152
- graphqlrcContent ?? (graphqlrcContent = fs.readFileSync(graphqlrcPath, "utf8"));
153
- const match = graphqlrcContent.match(/^# gql-hash: (.*)$/m);
154
- return match ? match[1].trim() : "";
155
- } catch (error) {
156
- console.warn(`[gql-redirect] Failed to read previous GQL hash:`, error.message);
157
- return "";
158
- }
159
- }
160
- function updateGraphqlrcHash(projectRoot, newHash) {
161
- try {
162
- const graphqlrcPath = path.join(projectRoot, ".graphqlrc.yml");
163
- if (!fs.existsSync(graphqlrcPath)) {
164
- return;
165
- }
166
- const currentContent = fs.readFileSync(graphqlrcPath, "utf8");
167
- const newContent = currentContent.replace(/^# gql-hash: .*/m, `# gql-hash: ${newHash}`);
168
- fs.writeFileSync(graphqlrcPath, newContent, "utf8");
169
- } catch (error) {
170
- console.warn(`[gql-redirect] Failed to update .graphqlrc.yml hash:`, error.message);
171
- }
172
- }
173
- function runGqlGen(projectRoot, verbose) {
174
- try {
175
- const currentGqlHash = calculateGqlHash(projectRoot);
176
- const previousGqlHash = getPreviousGqlHash(projectRoot);
177
- if (currentGqlHash && currentGqlHash === previousGqlHash) {
178
- console.log("[gql-redirect] GQL files unchanged, skipping pnpm gqlgen");
179
- return true;
180
- }
181
- console.log(`[gql-redirect] GQL files changed (${previousGqlHash}) => (${currentGqlHash}), running pnpm gqlgen in ${projectRoot}...`);
182
- try {
183
- execSync("pnpm gqlgen", {
184
- cwd: projectRoot,
185
- stdio: verbose ? "inherit" : "pipe",
186
- timeout: 3e4
187
- // 30 second timeout
188
- });
189
- } catch (error) {
190
- if (error.message.includes("NODE_TLS_REJECT_UNAUTHORIZED")) {
191
- }
192
- }
193
- if (currentGqlHash) {
194
- updateGraphqlrcHash(projectRoot, currentGqlHash);
195
- }
196
- if (verbose) {
197
- console.log("[gql-redirect] Successfully executed pnpm gqlgen and updated hash");
198
- }
199
- return true;
200
- } catch (error) {
201
- console.error(`[gql-redirect] Failed to execute pnpm gqlgen:`, error.message);
202
- return false;
203
- }
204
- }
205
- function resolvePathAlias(modulePath, pathMappings, resolveDir) {
206
- const possiblePaths = [];
207
- for (const mapping of pathMappings) {
208
- if (modulePath.startsWith(mapping.alias)) {
209
- const remainingPath = modulePath.slice(mapping.alias.length);
210
- const cleanRemainingPath = remainingPath.startsWith("/") ? remainingPath.slice(1) : remainingPath;
211
- for (const basePath of mapping.paths) {
212
- const resolvedPath = cleanRemainingPath ? path.join(basePath, cleanRemainingPath) : basePath;
213
- possiblePaths.push(resolvedPath);
214
- }
215
- }
216
- }
217
- if (possiblePaths.length === 0) {
218
- possiblePaths.push(path.resolve(resolveDir, modulePath));
219
- }
220
- return possiblePaths;
221
- }
222
- function gqlRedirectPlugin(options = {}) {
223
- const { verbose = false, tsconfigPath = "./tsconfig.json", autoGqlGen = true } = options;
224
- return {
225
- name: "gql-redirect",
226
- setup(build) {
227
- const angularJsonDir = findAngularJsonDir(process.cwd());
228
- const pathMappings = loadTsconfigPaths(tsconfigPath);
229
- if (verbose && pathMappings.length > 0) {
230
- console.log(`[gql-redirect] Loaded ${pathMappings.length} path mappings from ${tsconfigPath}`);
231
- }
232
- if (autoGqlGen) {
233
- runGqlGen(angularJsonDir, verbose);
234
- }
235
- build.onResolve({ filter: /\.gql$/ }, (args) => {
236
- try {
237
- const possiblePaths = resolvePathAlias(args.path, pathMappings, args.resolveDir);
238
- for (const resolvedPath of possiblePaths) {
239
- const gqlTsPath = resolvedPath + ".ts";
240
- if (fs.existsSync(gqlTsPath)) {
241
- if (verbose) {
242
- const displayPath = path.relative(angularJsonDir, gqlTsPath) || ".";
243
- console.log(`[gql-redirect] Redirecting "${args.path}" to "${displayPath}"`);
244
- }
245
- return { path: gqlTsPath };
246
- }
247
- }
248
- if (verbose) {
249
- console.warn(`[gql-redirect] No .gql.ts found for ${args.path} in any of the resolved paths: ${possiblePaths.join(", ")}`);
250
- } else {
251
- console.warn(`[gql-redirect] No .gql.ts found for ${args.path}, please run pnpm gqlgen to ensure it.`);
252
- }
253
- return null;
254
- } catch (error) {
255
- if (verbose) {
256
- console.error(`[gql-redirect] Error processing ${args.path}:`, error);
257
- }
258
- return null;
259
- }
260
- });
261
- }
262
- };
263
- }
264
- module.exports = gqlRedirectPlugin;
265
- module.exports.default = gqlRedirectPlugin;
266
- module.exports.gqlRedirectPlugin = gqlRedirectPlugin;
267
- }
268
- });
269
- export default require_gql_redirect_plugin();
package/dist/index.d.mts DELETED
@@ -1,148 +0,0 @@
1
- import { WritableSignal, Signal, Injector, Provider, InjectionToken } from '@angular/core';
2
-
3
- interface Tenant {
4
- /** Unique identifier */
5
- id: string;
6
- /** Tenant code */
7
- code: string;
8
- /** Tenant display name */
9
- name: string;
10
- /** Whether the tenant is enabled */
11
- isEnabled: boolean;
12
- /** Creation timestamp */
13
- createdOn: Date;
14
- [key: string]: any;
15
- }
16
- declare const LoginProviderEnum: Record<string, string> & {
17
- Local: "Local";
18
- };
19
- type LoginProviderEnum = (typeof LoginProviderEnum)[keyof typeof LoginProviderEnum];
20
- declare const OrgTypeEnum: Record<string, string> & {
21
- Default: "Default";
22
- };
23
- type OrgTypeEnum = (typeof OrgTypeEnum)[keyof typeof OrgTypeEnum];
24
- interface Org {
25
- /** Unique identifier */
26
- id: string;
27
- /** Organization type */
28
- orgType: OrgTypeEnum;
29
- /** Hierarchical code */
30
- code: string;
31
- /** Organization name */
32
- name: string;
33
- /** Parent organization code */
34
- parentOrgCode: string;
35
- [key: string]: any;
36
- }
37
- interface UserOrgMembership {
38
- code: string;
39
- name: string;
40
- allParentOrgs: Org[];
41
- }
42
- interface User {
43
- id: string;
44
- orgs: UserOrgMembership[];
45
- isEnable: boolean;
46
- permissions: string[];
47
- orgCodes: string[];
48
- username: string;
49
- claims: {
50
- claimType: string;
51
- claimValue: string;
52
- }[];
53
- roleIds: string[];
54
- loginProvider: LoginProviderEnum;
55
- roleNames: string[];
56
- [key: string]: any;
57
- }
58
- interface SettingItem {
59
- name: string;
60
- value?: any;
61
- }
62
- interface TenantModule extends GeexModule {
63
- /** Current tenant reactive state */
64
- current: WritableSignal<Tenant | null>;
65
- /**
66
- * Load tenant information by code.
67
- */
68
- loadTenantData(code: string): Promise<Tenant>;
69
- /**
70
- * Switch current tenant.
71
- */
72
- switchTenant(targetTenantCode: string): void;
73
- }
74
- interface AuthModule extends GeexModule {
75
- /** Current authenticated user */
76
- user: WritableSignal<User | null>;
77
- /**
78
- * Load current user information. Returns undefined when unauthenticated.
79
- */
80
- loadUserData(): Promise<User | undefined>;
81
- }
82
- interface IdentityModule extends GeexModule {
83
- /** All organizations */
84
- orgs: WritableSignal<Org[]>;
85
- /** Organizations owned by current user */
86
- userOwnedOrgs: WritableSignal<Org[]>;
87
- }
88
- interface MessagingModule extends GeexModule {
89
- /**
90
- * Subscribe to server broadcast events.
91
- */
92
- onPublicNotify(notify: any): void;
93
- }
94
- interface SettingsModule extends GeexModule {
95
- settings: WritableSignal<SettingItem[]>;
96
- }
97
- interface UiModule extends GeexModule {
98
- /** Whether the app is currently in fullscreen mode */
99
- fullScreen: WritableSignal<boolean>;
100
- /** Responsive helper stream notifying if device is mobile-like */
101
- isMobile: Signal<boolean | undefined>;
102
- /** Currently active routed component (framework dependent) */
103
- activeRoutedComponent?: any;
104
- }
105
- declare const ExtensionModule: Record<string, any> & {};
106
- type ExtensionModule = typeof ExtensionModule;
107
- type GeexModules<TExtensionModules extends ExtensionModule = ExtensionModule> = {
108
- init: Promise<{
109
- [K in keyof GeexModules<TExtensionModules>]: any;
110
- }>;
111
- tenant: TenantModule;
112
- auth: AuthModule;
113
- identity: IdentityModule;
114
- messaging: MessagingModule;
115
- settings: SettingsModule;
116
- ui: UiModule;
117
- } & TExtensionModules;
118
- type GeexModule<TExtension = ExtensionModule> = {
119
- /**
120
- * A module combines both reactive state (signals) and business logic methods.
121
- * Concrete modules can extend this interface to expose their own signals & methods.
122
- * This empty base exists mainly for typing convenience and future extension.
123
- * The init property is a Promise that resolves when the module is initialized.
124
- * Multiple awaits on the same init will share the same initialization process.
125
- */
126
- init: Promise<any>;
127
- } & TExtension;
128
- declare function createTenantModule(injector: Injector): TenantModule;
129
- declare function createAuthModule(injector: Injector): AuthModule;
130
- declare function createIdentityModule(injector: Injector): IdentityModule;
131
- declare function createMessagingModule(injector: Injector): MessagingModule;
132
- declare function createSettingsModule(injector: Injector): SettingsModule;
133
- declare function createUiModule(injector: Injector): UiModule;
134
-
135
- declare function provideGeex<TExtensionModules extends Record<string, GeexModule> = {}>(overrides?: Partial<GeexModules>, extensions?: TExtensionModules): Provider[];
136
-
137
- type GeexOverrides<TExtensionModules extends Record<string, GeexModule> = {}> = Partial<Omit<GeexModules<TExtensionModules>, "init">>;
138
- type GeexExtensions<TExtensionModules extends Record<string, GeexModule> = {}> = Partial<TExtensionModules>;
139
- declare let geex: GeexModules;
140
- declare let Geex: InjectionToken<GeexModules>;
141
- /**
142
- * Initialize geex singleton with concrete dependencies
143
- * @param deps Required runtime services
144
- * @param overrides Custom module overrides – properties will be merged into generated modules
145
- */
146
- declare function configGeex<TExtensionModules extends Record<string, GeexModule> = ExtensionModule>(injector: Injector, overrides?: GeexOverrides<TExtensionModules>): void;
147
-
148
- export { type AuthModule, ExtensionModule, Geex, type GeexExtensions, type GeexModule, type GeexModules, type GeexOverrides, type IdentityModule, LoginProviderEnum, type MessagingModule, type Org, OrgTypeEnum, type SettingItem, type SettingsModule, type Tenant, type TenantModule, type UiModule, type User, type UserOrgMembership, configGeex, createAuthModule, createIdentityModule, createMessagingModule, createSettingsModule, createTenantModule, createUiModule, geex, provideGeex };