@geexcode/geex-angular 0.0.39 → 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.
package/dist/index.d.ts CHANGED
@@ -1,148 +1,1015 @@
1
- import { WritableSignal, Signal, Injector, Provider, InjectionToken } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { WritableSignal, Signal, Injector, Provider, InjectionToken, EnvironmentProviders, ChangeDetectorRef, TemplateRef, Type, ExtendedSignal, CreateSignalOptions } from '@angular/core';
3
+ import { HttpContextToken, HttpInterceptor, HttpRequest, HttpResponseBase, HttpHandler, HttpHeaders, HttpEvent } from '@angular/common/http';
4
+ import { TypePolicies, ApolloLink, InMemoryCache, ApolloClient } from '@apollo/client';
5
+ import { ApolloBase, Apollo } from 'apollo-angular';
6
+ import { HttpLink } from 'apollo-angular/http';
7
+ import { AuthConfig, OAuthService } from 'angular-oauth2-oidc';
8
+ import { TranslateLoader, TranslationObject } from '@ngx-translate/core';
9
+ import { Observable, ObservableInput, ObservedValueOf } from 'rxjs';
10
+ import { AlainI18NService, ModalHelper, TitleService } from '@delon/theme';
11
+ import { DocumentNode } from 'graphql';
12
+ import { NzModalService, NzModalRef } from 'ng-zorro-antd/modal';
13
+ import { NzNotificationService } from 'ng-zorro-antd/notification';
14
+ import { FormGroup, FormControl, FormBuilder, FormArray, AbstractControlOptions } from '@angular/forms';
15
+ import { Router, Params, ActivatedRoute, Route, NavigationExtras, UrlTree, ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy, Data, NavigationEnd } from '@angular/router';
16
+ import { ACLService, ACLCanType } from '@delon/acl';
17
+ import { NzMessageService } from 'ng-zorro-antd/message';
18
+ import { Location } from '@angular/common';
19
+ import { ReuseTabService, ReuseTabStrategy, provideReuseTabConfig } from '@delon/abc/reuse-tab';
20
+ import { LoadingService } from '@delon/abc/loading';
21
+ import { STChange, STData, STColumn, STExportOptions } from '@delon/abc/st';
22
+ import { List } from 'linqts-camelcase';
23
+ import { ToSignalOptions } from '@angular/core/rxjs-interop';
24
+ import { Maybe } from 'graphql/jsutils/Maybe';
2
25
 
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;
26
+ declare const ExtensionModule: Record<string, unknown>;
27
+ type ExtensionModule = typeof ExtensionModule;
28
+ type GeexModule<TExtension = any> = {
29
+ init: (force?: boolean) => Promise<unknown>;
30
+ } & TExtension;
31
+ interface UiModule extends GeexModule<{
32
+ fullScreen: WritableSignal<boolean>;
33
+ isMobile: Signal<boolean | undefined>;
34
+ activeRoutedComponent?: unknown;
35
+ }> {
36
36
  }
37
- interface UserOrgMembership {
38
- code: string;
39
- name: string;
40
- allParentOrgs: Org[];
37
+ interface GeexModuleMap {
38
+ ui: UiModule;
39
+ [name: string]: GeexModule<any>;
41
40
  }
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;
41
+ type GeexModules<TExtensionModules extends Record<string, GeexModule> = {}> = {
42
+ init: (force?: boolean) => Promise<{
43
+ [K in keyof (GeexModuleMap & TExtensionModules)]: unknown;
44
+ }>;
45
+ } & GeexModuleMap & TExtensionModules;
46
+ declare function createUiModule(_injector: Injector): UiModule;
47
+
48
+ declare function provideGeex<TExtensionModules extends Record<string, GeexModule> = {}>(overrides?: Partial<GeexModules>, extensions?: TExtensionModules): Provider[];
49
+
50
+ /**
51
+ * Core meta-provide aligned with backend Geex.Common.
52
+ * Installs geex signal modules. Delon page bases are opt-in via `provideGeexDelonBase()`.
53
+ * Does not install admin business UI pages; use `geex add <name>` for source modules.
54
+ */
55
+ declare function provideGeexCommon<TExtensionModules extends Record<string, GeexModule> = {}>(overrides?: Partial<GeexModules>, extensions?: TExtensionModules): Provider[];
56
+
57
+ type GeexTypePolicies = TypePolicies | Record<string, unknown>;
58
+ type GeexApolloTypePolicyContribution = () => GeexTypePolicies;
59
+ declare const GEEX_APOLLO_TYPE_POLICY_CONTRIBUTIONS: InjectionToken<readonly GeexApolloTypePolicyContribution[]>;
60
+ declare function provideGeexApolloTypePolicies(contribution: GeexApolloTypePolicyContribution): EnvironmentProviders;
61
+ interface GeexApolloCacheOptions {
62
+ possibleTypes?: Record<string, string[]>;
63
+ typePolicies?: GeexTypePolicies;
64
+ /** When true (default), merge with geexDefaultTypePolicies(). */
65
+ includeDefaults?: boolean;
61
66
  }
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;
67
+ interface GeexApolloLinkOptions {
68
+ baseUrl: string;
69
+ httpLinkInstance: ApolloLink;
70
+ extraLinks?: ApolloLink[];
71
+ }
72
+ interface GeexGraphqlErrorHandler {
73
+ handleGraphQLErrors(params: {
74
+ graphQLErrors?: ReadonlyArray<{
75
+ message?: string;
76
+ extensions?: any;
77
+ }>;
78
+ operation?: any;
79
+ response?: {
80
+ data?: any;
81
+ } | null;
82
+ }): void;
83
+ handleGraphQLNetworkError(networkError: unknown): void;
84
+ buildCommonHeaders?(): {
85
+ [name: string]: string;
86
+ };
73
87
  }
74
- interface AuthModule extends GeexModule {
75
- /** Current authenticated user */
76
- user: WritableSignal<User | null>;
88
+ declare const geexApolloDefaultOptions: {
89
+ query: {
90
+ fetchPolicy: "network-only";
91
+ errorPolicy: "ignore";
92
+ };
93
+ mutate: {
94
+ fetchPolicy: "no-cache";
95
+ errorPolicy: "ignore";
96
+ };
97
+ watchQuery: {
98
+ fetchPolicy: "cache-first";
99
+ errorPolicy: "ignore";
100
+ };
101
+ };
102
+ /** Core cache policies. Feature-specific policies are registered by extensions. */
103
+ declare function geexDefaultTypePolicies(): TypePolicies;
104
+ declare function createGeexInMemoryCache(options?: GeexApolloCacheOptions, contributions?: readonly GeexApolloTypePolicyContribution[]): InMemoryCache;
105
+ declare function createGeexUriLink(baseUrl: string): ApolloLink;
106
+ declare function createGeexHttpApolloOptions(options: GeexApolloLinkOptions & {
107
+ cache: InMemoryCache;
108
+ }): ApolloClient.Options;
109
+ declare function isGeexSilentOperation(operation: {
110
+ getContext: () => Record<string, unknown>;
111
+ }, silentToken?: HttpContextToken<boolean>): boolean;
112
+ declare function createGeexGraphqlErrorLink(handler: GeexGraphqlErrorHandler): ApolloLink;
113
+ declare function createGeexSilentContextLink(silentToken?: HttpContextToken<boolean>): ApolloLink;
114
+ declare function createGeexWsApolloOptions(options: {
115
+ baseUrl?: string;
116
+ url?: string;
117
+ cache: InMemoryCache;
118
+ connectionParams?: () => Promise<Record<string, string>> | Record<string, string>;
119
+ retryAttempts?: number;
120
+ onOpened?: () => void;
121
+ onError?: (err: unknown) => void;
122
+ }): ApolloClient.Options;
123
+ /**
124
+ * HttpLink with multipart upload support.
125
+ * Uses peer `extract-files` by default; overrides via options.
126
+ */
127
+ declare function createGeexUploadHttpLink(httpLink: HttpLink, options?: {
128
+ withCredentials?: boolean;
129
+ extractFilesFn?: (body: any, isExtractable: (v: any) => boolean) => any;
130
+ isExtractableFile?: (value: any) => boolean;
131
+ }): ApolloLink;
132
+ declare const SilentApollo: InjectionToken<ApolloBase>;
133
+ declare const GEEX_APOLLO_CACHE: InjectionToken<InMemoryCache>;
134
+ interface ProvideGeexApolloOptions {
135
+ baseUrl: string;
136
+ possibleTypes?: Record<string, string[]>;
137
+ typePolicies?: GeexTypePolicies;
138
+ includeDefaultTypePolicies?: boolean;
77
139
  /**
78
- * Load current user information. Returns undefined when unauthenticated.
140
+ * Default true: multipart upload via `extract-files`.
141
+ * Ignored when `createHttpLinkInstance` is set.
79
142
  */
80
- loadUserData(): Promise<User | undefined>;
143
+ enableUpload?: boolean;
144
+ /** Override default HttpLink factory (upload or plain). */
145
+ createHttpLinkInstance?: (httpLink: HttpLink) => ApolloLink;
146
+ errorHandler?: GeexGraphqlErrorHandler;
147
+ }
148
+ declare function provideGeexApollo(options: ProvideGeexApolloOptions): Provider[];
149
+
150
+ /** Startup-only orchestration. Module-owned keys live on their provideGeex* entrypoints. */
151
+ interface GeexStartupOptions {
152
+ oauth: {
153
+ getConfig: () => AuthConfig;
154
+ };
155
+ /** Forward host `environment.blockDebugger`. */
156
+ blockDebugger?: boolean;
81
157
  }
82
- interface IdentityModule extends GeexModule {
83
- /** All organizations */
84
- orgs: WritableSignal<Org[]>;
85
- /** Organizations owned by current user */
86
- userOwnedOrgs: WritableSignal<Org[]>;
158
+ interface GeexSessionTerminatedCopy {
159
+ title?: string;
160
+ okText?: string;
87
161
  }
88
- interface MessagingModule extends GeexModule {
162
+ interface GeexStartupI18nAdapter {
163
+ merge(translations: object): void;
164
+ use(lang: string): void;
165
+ }
166
+
167
+ declare const GEEX_STARTUP_OPTIONS: InjectionToken<GeexStartupOptions>;
168
+ declare const GEEX_EXCEPTION_500_PATH: InjectionToken<string>;
169
+ declare const GEEX_SESSION_TERMINATED_COPY: InjectionToken<GeexSessionTerminatedCopy>;
170
+
171
+ /**
172
+ * Single bootstrap entry for app session.
173
+ *
174
+ * Linear flow:
175
+ * 1. configure OAuth
176
+ * 2. if OIDC callback code present → tryLogin (once)
177
+ * 3. geex.init()
178
+ * 4. bind Delon user / ACL / menus
179
+ * 5. start session watch (once)
180
+ *
181
+ * Login pages must not call tryLogin/load for OIDC callbacks.
182
+ * Password / WeChat token handoff uses initCodeFlow → IdP → this bootstrap again.
183
+ */
184
+ declare class GeexStartupService {
185
+ private readonly options;
186
+ private readonly injector;
187
+ private readonly geex;
188
+ private readonly oAuthService;
189
+ private readonly aclService;
190
+ private readonly settingsService;
191
+ private readonly router;
192
+ private readonly modalService;
193
+ private readonly menuService;
194
+ private readonly loginPath;
195
+ private readonly afterLoginNavigate;
196
+ private readonly superAdminUserId;
197
+ private readonly exception500Url;
198
+ private readonly sessionTerminatedCopy;
199
+ private readonly defaultMenus;
200
+ private readonly debuggerBlocker;
201
+ private bootstrapPromise;
202
+ private bootstrapped;
203
+ private sessionWatchStarted;
204
+ /** APP_INITIALIZER entry. Safe to call concurrently; runs the bootstrap pipeline once. */
205
+ load(): Promise<void>;
206
+ private bootstrap;
207
+ private tryOidcCodeCallback;
208
+ /** Fill tokenEndpoint gaps after discovery (or when discovery is unreachable). */
209
+ private ensureOAuthTokenEndpoint;
210
+ private bindUiSession;
211
+ tryAutoOAuthLogin(): Promise<void>;
212
+ private findMenuByLink;
213
+ private findSystemConfigGroup;
214
+ private resolveI18nAdapter;
215
+ /** Safe read: guardedSignal throws before auth.init finishes. */
216
+ private readAuthUser;
89
217
  /**
90
- * Subscribe to server broadcast events.
218
+ * After OIDC, auth.init may have finished with a null user (token race) or still be settling.
219
+ * Never throw EmptyError into bootstrap (that becomes the 500 page).
91
220
  */
92
- onPublicNotify(notify: any): void;
221
+ private resolveAuthUser;
222
+ private trySwitchTenant;
223
+ private ensureSessionWatch;
224
+ static ɵfac: i0.ɵɵFactoryDeclaration<GeexStartupService, never>;
225
+ static ɵprov: i0.ɵɵInjectableDeclaration<GeexStartupService>;
93
226
  }
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;
227
+
228
+ declare function provideGeexStartup(options: GeexStartupOptions): Array<Provider | EnvironmentProviders>;
229
+
230
+ /** Per-language ngx-translate dictionaries keyed by locale code (e.g. `zh-cn`). */
231
+ declare const GEEX_I18N_PACKS: InjectionToken<Record<string, Record<string, unknown>>>;
232
+ /** Well-known setting names for post-login localization (aligned with SettingDefinition). */
233
+ declare const GEEX_LOCALIZATION_DATA_SETTING = "LocalizationData";
234
+ declare const GEEX_LOCALIZATION_LANGUAGE_SETTING = "LocalizationLanguage";
235
+
236
+ /**
237
+ * Nested i18n dictionary typing.
238
+ * Leaf values keep the source type (so Go-to-Definition can reach pack literals).
239
+ * Nested objects also expose runtime `get(key)` from kiwi attachGetter.
240
+ */
241
+ type LangObject<O = Record<string, any>> = O extends object ? O extends (...args: never[]) => unknown ? O : {
242
+ get(x: string, notFoundValue?: string): string;
243
+ } & {
244
+ [K in keyof O]: LangObject<O[K]>;
245
+ } : O;
246
+
247
+ declare function mergeGeexI18nPacks<T extends Record<string, unknown>>(base: T, ...overlays: Array<Partial<T> | Record<string, unknown>>): T;
248
+
249
+ declare class GeexTranslateLoader implements TranslateLoader {
250
+ private readonly packs;
251
+ getTranslation(lang: string): Observable<TranslationObject>;
252
+ static ɵfac: i0.ɵɵFactoryDeclaration<GeexTranslateLoader, never>;
253
+ static ɵprov: i0.ɵɵInjectableDeclaration<GeexTranslateLoader>;
104
254
  }
105
- declare const ExtensionModule: Record<string, any> & {};
106
- type ExtensionModule = typeof ExtensionModule;
107
- type GeexModules<TExtensionModules extends ExtensionModule = ExtensionModule> = {
108
- init: (force?: boolean) => Promise<{
109
- [K in keyof GeexModules<TExtensionModules>]: any;
255
+
256
+ /** Mutable kiwi dictionary; host may re-export as `I18N`. */
257
+ declare let I18N: LangObject<any>;
258
+ /**
259
+ * Alain + kiwi i18n runtime. Packs come from `GEEX_I18N_PACKS` (host zh-CN/en-US assembly).
260
+ */
261
+ declare class GeexI18nService implements AlainI18NService {
262
+ private _default;
263
+ private change$;
264
+ private kiwiLangs;
265
+ private _langs;
266
+ private readonly settings;
267
+ private readonly nzI18nService;
268
+ private readonly delonLocaleService;
269
+ private readonly translate;
270
+ private readonly packs;
271
+ constructor();
272
+ /** Current kiwi dictionary (also mirrored by module `I18N`). */
273
+ get dictionary(): LangObject<any>;
274
+ private getDefaultLang;
275
+ private updateLangData;
276
+ get change(): Observable<string>;
277
+ merge(translations: object): void;
278
+ use(lang: string): void;
279
+ getLangs(): Array<{
280
+ code: string;
281
+ text: string;
282
+ abbr: string;
110
283
  }>;
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
- * @param force - If true, forces re-initialization. Defaults to false.
124
- * When force is false, multiple calls will share the same initialization Promise.
125
- */
126
- init: (force?: boolean) => 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;
284
+ fanyi(key: string, interpolateParams?: {}): any;
285
+ get defaultLang(): string;
286
+ get currentLang(): string;
287
+ static ɵfac: i0.ɵɵFactoryDeclaration<GeexI18nService, never>;
288
+ static ɵprov: i0.ɵɵInjectableDeclaration<GeexI18nService>;
289
+ }
134
290
 
135
- declare function provideGeex<TExtensionModules extends Record<string, GeexModule> = {}>(overrides?: Partial<GeexModules>, extensions?: TExtensionModules): Provider[];
291
+ interface GeexI18nProvideOptions {
292
+ fallbackLang?: string;
293
+ }
294
+ /**
295
+ * Register kiwi packs + GeexI18nService + Alain/ngx-translate wiring.
296
+ */
297
+ declare function provideGeexI18n(packs: Record<string, Record<string, unknown>>, options?: GeexI18nProvideOptions): Array<Provider | EnvironmentProviders>;
298
+
299
+ declare const GEEX_CANCEL_AUTHENTICATION_DOCUMENT: InjectionToken<DocumentNode>;
300
+ /** Header profile route (default `/identity/me`). */
301
+ declare const GEEX_PROFILE_PATH: InjectionToken<string>;
302
+ /** Header profile menu label (default 个人中心). */
303
+ declare const GEEX_PROFILE_LABEL: InjectionToken<string>;
304
+
305
+ declare const cancelAuthenticationMutation: DocumentNode;
306
+ declare class GeexAuthLogout {
307
+ private readonly apollo;
308
+ private readonly oauth;
309
+ private readonly settings;
310
+ private readonly acl;
311
+ private readonly router;
312
+ private readonly loginPath;
313
+ private readonly afterLoginNavigate;
314
+ private readonly cancelDocument;
315
+ logout(): Promise<void>;
316
+ static ɵfac: i0.ɵɵFactoryDeclaration<GeexAuthLogout, never>;
317
+ static ɵprov: i0.ɵɵInjectableDeclaration<GeexAuthLogout>;
318
+ }
319
+
320
+ type GeexEnvironmentOverridesOptions = {
321
+ url?: string;
322
+ onInvalid?: (override: unknown, url: string) => void;
323
+ onLoadError?: (error: unknown, url: string) => void;
324
+ };
325
+ /** Deep-set env from flat / dotted override keys. Host may pass typed `environment` objects. */
326
+ declare function applyEnvironmentOverrides(env: object, override: Record<string, unknown>): void;
327
+ /**
328
+ * Loads `/assets/environment.override.js` (or options.url) and merges into env.
329
+ * Missing / invalid override is non-fatal.
330
+ */
331
+ declare function loadEnvironmentOverrides(env: object, options?: GeexEnvironmentOverridesOptions): Promise<void>;
136
332
 
137
- type GeexOverrides<TExtensionModules extends Record<string, GeexModule> = {}> = Partial<Omit<GeexModules<TExtensionModules>, "init">>;
138
- type GeexExtensions<TExtensionModules extends Record<string, GeexModule> = {}> = Partial<TExtensionModules>;
333
+ declare global {
334
+ interface Window {
335
+ clearHistory(): void;
336
+ }
337
+ function clearHistory(): void;
338
+ }
339
+
340
+ /** Mark HTTP / GraphQL ops that should not show error UI. */
341
+ declare const SILENT_REQUEST: HttpContextToken<boolean>;
342
+ declare const GEEX_DEFAULT_HTTP_STATUS_MESSAGES: {
343
+ [key: number]: string;
344
+ };
345
+ /** Override status → message map (defaults to GEEX_DEFAULT_HTTP_STATUS_MESSAGES). */
346
+ declare const GEEX_HTTP_STATUS_MESSAGES: InjectionToken<{
347
+ [key: number]: string;
348
+ }>;
349
+ /** Login route after 401 (default `/authentication/login`). */
350
+ declare const GEEX_LOGIN_PATH: InjectionToken<string>;
351
+ /** Called after navigating to login. Defaults to `window.clearHistory`. */
352
+ declare const GEEX_AFTER_LOGIN_NAVIGATE: InjectionToken<() => void>;
353
+ /** API base URL for relative HTTP requests (host `environment.api.baseUrl`). */
354
+ declare const GEEX_API_BASE_URL: InjectionToken<string>;
355
+
356
+ /**
357
+ * Default Geex HTTP interceptor (zh-CN messages, `/authentication/login`, tenant/Bearer headers).
358
+ * Override via tokens or protected hooks; host may `extends` or provide callbacks.
359
+ */
360
+ declare class GeexHttpInterceptor implements HttpInterceptor {
361
+ protected injector: Injector;
362
+ protected oauthService: OAuthService;
363
+ protected modalSrv: NzModalService;
364
+ protected statusMessages: {
365
+ [key: number]: string;
366
+ };
367
+ protected loginPath: string;
368
+ protected afterLoginNavigate: () => void;
369
+ protected apiBaseUrl: string;
370
+ private loginTrigger$;
371
+ private loginModal$;
372
+ constructor();
373
+ protected get notification(): NzNotificationService;
374
+ protected buildLoginConfirmOptions(): {
375
+ nzTitle: string;
376
+ };
377
+ protected goTo(url: string): void;
378
+ protected isSilentRequest(req: HttpRequest<any>): boolean;
379
+ protected shouldAttachTenant(): boolean;
380
+ protected notifyHttpError(status: number, text: string): void;
381
+ protected onUnauthorized(): void;
382
+ protected checkStatus(ev: HttpResponseBase, silent: boolean): void;
383
+ /** Status-branch template method; override for custom 200/403/exception routing. */
384
+ protected handleHttpStatus(ev: HttpResponseBase, silent: boolean): void;
385
+ protected handleData(ev: HttpResponseBase, _req: HttpRequest<any>, _next: HttpHandler): Observable<any>;
386
+ buildCommonHeaders(headers?: HttpHeaders): {
387
+ [name: string]: string;
388
+ };
389
+ handleGraphQLErrors(params: {
390
+ graphQLErrors?: ReadonlyArray<{
391
+ message?: string;
392
+ locations?: any;
393
+ path?: ReadonlyArray<string | number>;
394
+ extensions?: any;
395
+ }>;
396
+ operation?: any;
397
+ response?: {
398
+ data?: any;
399
+ } | null;
400
+ }): void;
401
+ handleGraphQLNetworkError(networkError: unknown): void;
402
+ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
403
+ static ɵfac: i0.ɵɵFactoryDeclaration<GeexHttpInterceptor, never>;
404
+ static ɵprov: i0.ɵɵInjectableDeclaration<GeexHttpInterceptor>;
405
+ }
406
+
407
+ interface GeexHttpProvideOptions {
408
+ apiBaseUrl: string;
409
+ }
410
+ declare function provideGeexHttp(options: GeexHttpProvideOptions): Provider[];
411
+
412
+ interface GeexModuleContributionContext {
413
+ readonly injector: Injector;
414
+ readonly modules: Readonly<Record<string, GeexModule>>;
415
+ }
416
+ interface GeexModuleContribution {
417
+ readonly createModules: (context: GeexModuleContributionContext) => Readonly<Record<string, GeexModule>>;
418
+ }
419
+ declare const GEEX_MODULE_CONTRIBUTIONS: InjectionToken<readonly GeexModuleContribution[]>;
420
+ declare function provideGeexModuleContribution(contribution: GeexModuleContribution): EnvironmentProviders;
421
+
422
+ type GeexOverrides<TExtensionModules extends Record<string, GeexModule> = Record<string, GeexModule>> = Partial<Omit<GeexModules<TExtensionModules>, "init">>;
423
+ type GeexExtensions<TExtensionModules extends Record<string, GeexModule> = Record<string, GeexModule>> = Partial<TExtensionModules>;
139
424
  declare let geex: GeexModules;
140
425
  declare let Geex: InjectionToken<GeexModules>;
426
+ declare function configGeex<TExtensionModules extends Record<string, GeexModule> = Record<string, never>>(injector: Injector, overrides?: GeexOverrides<TExtensionModules>, contributions?: readonly GeexModuleContribution[]): void;
427
+
428
+ declare function guardedSignal<T>(innerSignal: WritableSignal<T>, isInitialized: () => boolean): WritableSignal<T>;
429
+ declare function guardedSignal<T>(innerSignal: Signal<T>, isInitialized: () => boolean): Signal<T>;
430
+
431
+ /** Minimal menu shape shared by host Delon menus and extension plugins. */
432
+ interface GeexMenuItem {
433
+ text?: string;
434
+ link?: string;
435
+ icon?: string | object;
436
+ group?: boolean;
437
+ hideInBreadcrumb?: boolean;
438
+ open?: boolean;
439
+ children?: GeexMenuItem[];
440
+ [key: string]: unknown;
441
+ }
442
+ interface GeexMenuContributionContext {
443
+ id: string;
444
+ }
445
+ /**
446
+ * Multi-provider token for additive menu contributions.
447
+ * Host should merge contributions into app menus with a single MenuService.add([...app, ...extras]).
448
+ */
449
+ interface GeexMenuContribution {
450
+ resolve(user: GeexMenuContributionContext): Promise<GeexMenuItem[]>;
451
+ }
452
+ declare const GEEX_MENU_CONTRIBUTIONS: InjectionToken<GeexMenuContribution[]>;
453
+ /** Host-composed default menus (e.g. from module-registry). */
454
+ declare const GEEX_DEFAULT_MENUS: InjectionToken<GeexMenuItem[]>;
455
+ declare function provideGeexMenus(menus: GeexMenuItem[]): Provider[];
456
+
457
+ /** Well-known setting names for post-login app/menu bind (aligned with SettingDefinition). */
458
+ declare const GEEX_APP_NAME_SETTING = "AppAppName";
459
+ declare const GEEX_APP_MENU_SETTING = "AppAppMenu";
460
+
461
+ /** When true, DebuggerBlockerService activates anti-devtools measures. */
462
+ declare const GEEX_BLOCK_DEBUGGER: InjectionToken<boolean>;
463
+
464
+ declare class DebuggerBlockerService {
465
+ private readonly enabled;
466
+ init(): void;
467
+ private blockDebugger;
468
+ private disableDevToolsShortcuts;
469
+ static ɵfac: i0.ɵɵFactoryDeclaration<DebuggerBlockerService, never>;
470
+ static ɵprov: i0.ɵɵInjectableDeclaration<DebuggerBlockerService>;
471
+ }
472
+
473
+ interface IdentityClaims {
474
+ nbf: number;
475
+ exp: number;
476
+ iss: string;
477
+ aud: string;
478
+ nonce: string;
479
+ iat: number;
480
+ at_hash: string;
481
+ s_hash: string;
482
+ sid: string;
483
+ sub: string;
484
+ auth_time: number;
485
+ idp: string;
486
+ amr: string[];
487
+ picture: string;
488
+ role: string;
489
+ email: string;
490
+ phone_number: string;
491
+ name: string;
492
+ nickname: string;
493
+ __tenant: string;
494
+ preferred_username: string;
495
+ email_verified: boolean;
496
+ login_provider: string;
497
+ }
498
+ declare module "angular-oauth2-oidc" {
499
+ interface OAuthService {
500
+ getIdentityClaims(this: this): IdentityClaims;
501
+ }
502
+ }
503
+
504
+ /**
505
+ * Host-augmentable i18n dictionary shape.
506
+ * Apps should `declare module "@geexcode/geex-angular" { interface GeexI18n extends ... {} }`
507
+ * (typically in module-registry) so `inject(GEEX_I18N)` / `BusinessComponentBase.I18N` stay typed.
508
+ */
509
+ interface GeexI18n {
510
+ }
511
+ /**
512
+ * Host provides AlainI18NService-compatible instance (e.g. `GeexI18nService`).
513
+ */
514
+ declare const GEEX_I18N_SERVICE: InjectionToken<unknown>;
515
+ /**
516
+ * Host-augmentable AppPermission map / enum object.
517
+ * Apps should augment `GeexAppPermission` from generated `AppPermission`.
518
+ */
519
+ interface GeexAppPermission {
520
+ }
521
+ /**
522
+ * Typed kiwi/i18n dictionary (augment `GeexI18n` in the host app).
523
+ */
524
+ declare const GEEX_I18N: InjectionToken<GeexI18n>;
525
+ /**
526
+ * Typed AppPermission enum/map (augment `GeexAppPermission` in the host app).
527
+ */
528
+ declare const GEEX_APP_PERMISSION: InjectionToken<GeexAppPermission>;
529
+
530
+ /** Loose entity / DTO shape used by page bases (host `Hint<T>`-compatible). */
531
+ type GeexHint<T> = T & Record<string, any>;
532
+ /**
533
+ * Host-compatible typed FormGroup (mirrors admin `TypedFormGroup` augmentation).
534
+ * Keeps `controls.*` as FormControl for template `[formControl]` bindings.
535
+ */
536
+ type GeexTypedFormGroup<TValue> = FormGroup & {
537
+ controls: {
538
+ [K in keyof TValue]: FormControl<any>;
539
+ };
540
+ value: TValue;
541
+ };
542
+
543
+ declare abstract class BusinessComponentBase<TParam = any> {
544
+ protected acl: ACLService;
545
+ protected apollo: Apollo;
546
+ protected i18n: unknown;
547
+ protected modal: ModalHelper;
548
+ protected msgSrv: NzMessageService;
549
+ protected nzModalSrv: NzModalService;
550
+ protected router: Router;
551
+ params: WritableSignal<TParam>;
552
+ I18N: GeexI18n;
553
+ AppPermission: GeexAppPermission;
554
+ can(permission: ACLCanType): boolean;
555
+ static ɵfac: i0.ɵɵFactoryDeclaration<BusinessComponentBase<any>, never>;
556
+ static ɵprov: i0.ɵɵInjectableDeclaration<BusinessComponentBase<any>>;
557
+ }
558
+
559
+ type ParamMappingValue<TValue> = {
560
+ position: "pathParams" | "queryParams" | "fragment";
561
+ default?: TValue;
562
+ };
563
+ type RouteParamsMappings<TParams extends {}> = {
564
+ [Key in keyof TParams]: ParamMappingValue<TParams[Key]>;
565
+ };
566
+ type RouteParams = {
567
+ pathParams?: Params;
568
+ queryParams?: Params;
569
+ fragment?: string;
570
+ };
571
+ declare abstract class RoutedComponent<TParams extends {}> extends BusinessComponentBase<TParams> {
572
+ abstract routeParamsMappings: RouteParamsMappings<TParams>;
573
+ defaultParams: TParams;
574
+ paramsForm: GeexTypedFormGroup<TParams>;
575
+ params: WritableSignal<TParams>;
576
+ title: i0.ExtendedWritableSignal<string | undefined>;
577
+ protected cdr: ChangeDetectorRef;
578
+ protected fb: FormBuilder;
579
+ protected loading: i0.ExtendedWritableSignal<boolean>;
580
+ protected loadingSrv: LoadingService;
581
+ protected location: Location;
582
+ protected reuseTabSrv: ReuseTabService;
583
+ protected route: ActivatedRoute;
584
+ protected titleSrv: TitleService;
585
+ ngOnInit(): Promise<void>;
586
+ constructor();
587
+ /** Full route-reload pipeline; override to replace navigation side effects. */
588
+ protected handleRouteReload(): Promise<void>;
589
+ protected beforeOnRouted(_params: TParams): void | Promise<void>;
590
+ protected afterOnRouted(_params: TParams): void | Promise<void>;
591
+ protected buildParamsForm(defaults: TParams): GeexTypedFormGroup<TParams>;
592
+ protected decodeQueryParam(raw: string): unknown;
593
+ resolve({ pathParams, queryParams, fragment }: RouteParams): Promise<TParams>;
594
+ refresh(): void;
595
+ reset(): void;
596
+ abstract onRouted(params: TParams): void | Promise<void>;
597
+ paramsToRouteParams(params: TParams): RouteParams;
598
+ protected isEqualToDefault(value: any, defaultValue: any): boolean;
599
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoutedComponent<any>, never>;
600
+ static ɵprov: i0.ɵɵInjectableDeclaration<RoutedComponent<any>>;
601
+ }
602
+
603
+ type BatchOperationName = "delete" | "approve" | "submit" | "unApprove" | "unSubmit";
604
+ declare class ListPageParams<T> {
605
+ pi?: number;
606
+ ps?: number;
607
+ /** Host GraphQL sort input; kept loose to match module-specific SortInput types. */
608
+ sort?: any;
609
+ }
610
+ declare abstract class RoutedListComponent<TParams extends ListPageParams<TDto>, TDto extends GeexHint<{
611
+ id?: string;
612
+ }>> extends RoutedComponent<TParams> {
613
+ data: i0.ExtendedWritableSignal<GeexHint<TDto>[]>;
614
+ abstract columns?: any;
615
+ total: i0.ExtendedWritableSignal<number>;
616
+ selectedData: i0.ExtendedWritableSignal<GeexHint<TDto>[]>;
617
+ allSelected: i0.Signal<boolean>;
618
+ onAllChecked(value: boolean): void;
619
+ onItemChecked(data: TDto, checked: boolean): void;
620
+ tableChange(args: STChange): Promise<void>;
621
+ protected onTableCheckbox(args: STChange): void;
622
+ protected onTablePage(args: STChange): void;
623
+ protected onTableSort(args: STChange): void;
624
+ batchOperation(operation: BatchOperationName, entityType: string, remark?: string): Promise<boolean>;
625
+ protected filterBatchIds(operation: BatchOperationName, selectedData: Array<GeexHint<TDto>>): {
626
+ ids: any[];
627
+ error?: string;
628
+ };
629
+ protected buildBatchMutation(operation: BatchOperationName, entityType: string): string;
630
+ protected confirmBatch(operation: BatchOperationName, apiName: string, ids: any[], remark?: string): Promise<boolean>;
631
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoutedListComponent<any, any>, never>;
632
+ static ɵcmp: i0.ɵɵComponentDeclaration<RoutedListComponent<any, any>, "ng-component", never, {}, {}, never, never, true, never>;
633
+ }
634
+
635
+ declare abstract class RoutedEditComponent<TParams extends GeexHint<{
636
+ id?: string;
637
+ }>, TEntity extends GeexHint<{
638
+ id?: string;
639
+ }>, TEditSchema extends GeexHint<Partial<TEntity>>> extends RoutedComponent<TParams> {
640
+ entity?: GeexHint<TEntity>;
641
+ entityForm?: GeexTypedFormGroup<TEditSchema>;
642
+ originalValue?: TEditSchema;
643
+ close(): Promise<void>;
644
+ closableCheck(): Promise<boolean>;
645
+ protected isEntityDirty(): boolean;
646
+ protected unsavedConfirmTitle(): string;
647
+ back(reload?: boolean): Promise<void>;
648
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoutedEditComponent<any, any, any>, never>;
649
+ static ɵcmp: i0.ɵɵComponentDeclaration<RoutedEditComponent<any, any, any>, "ng-component", never, {}, {}, never, never, true, never>;
650
+ }
651
+
652
+ /**
653
+ * Base for components opened inside nz-modal.
654
+ * NzModalRef is required; only use for modal-hosted components.
655
+ */
656
+ declare abstract class ModalComponentBase {
657
+ title: string;
658
+ loading: boolean;
659
+ protected nzModalRef: NzModalRef<any, any>;
660
+ success(result?: any): void;
661
+ close(_$event?: MouseEvent): void;
662
+ /** Hook after modal closes; override for cleanup / analytics. */
663
+ protected afterClose(_result?: unknown): void;
664
+ }
665
+
666
+ declare abstract class TreeTableComponentBase<ITreeNode = any> {
667
+ mapOfExpandedData: {
668
+ [key: string]: ITreeNode[];
669
+ };
670
+ I18N: GeexI18n;
671
+ protected getNodeKey(node: ITreeNode): string;
672
+ protected getNodeChildren(node: ITreeNode): ITreeNode[] | undefined;
673
+ collapse(array: ITreeNode[], data: ITreeNode, $event: boolean): void;
674
+ convertTreeToList(root: ITreeNode): ITreeNode[];
675
+ visitNode(node: ITreeNode, hashMap: {
676
+ [key: string]: boolean;
677
+ }, array: ITreeNode[]): void;
678
+ static ɵfac: i0.ɵɵFactoryDeclaration<TreeTableComponentBase<any>, never>;
679
+ static ɵcmp: i0.ɵɵComponentDeclaration<TreeTableComponentBase<any>, "ng-component", never, {}, {}, never, never, true, never>;
680
+ }
681
+
682
+ declare class GeexRouter extends Router {
683
+ lastRoute: Route;
684
+ constructor(injector: Injector);
685
+ private isDifferentPath;
686
+ createUrlTree(commands: any[], navigationExtras?: NavigationExtras): UrlTree;
687
+ static ɵfac: i0.ɵɵFactoryDeclaration<GeexRouter, never>;
688
+ static ɵprov: i0.ɵɵInjectableDeclaration<GeexRouter>;
689
+ }
690
+
691
+ /**
692
+ * Hardens Delon ReuseTabStrategy against undefined snapshots / empty-path leaves
693
+ * that otherwise throw during createRouterState / outlet.detach (NG04012).
694
+ */
695
+ declare class GeexReuseTabStrategy extends ReuseTabStrategy {
696
+ shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean;
697
+ shouldDetach(route: ActivatedRouteSnapshot): boolean;
698
+ retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null;
699
+ shouldAttach(route: ActivatedRouteSnapshot): boolean;
700
+ static ɵfac: i0.ɵɵFactoryDeclaration<GeexReuseTabStrategy, never>;
701
+ static ɵprov: i0.ɵɵInjectableDeclaration<GeexReuseTabStrategy>;
702
+ }
703
+
704
+ declare class ListPageLayoutComponent {
705
+ private i18n;
706
+ title: i0.InputSignal<string>;
707
+ loading: i0.InputSignal<boolean>;
708
+ total: i0.InputSignal<number>;
709
+ data: i0.InputSignal<STData[]>;
710
+ columns: i0.InputSignal<STColumn<any>[]>;
711
+ pi: i0.InputSignal<number>;
712
+ ps: i0.InputSignal<number>;
713
+ selectedCount: i0.InputSignal<number>;
714
+ multiSort: i0.InputSignal<boolean>;
715
+ filtersInHeader: i0.InputSignal<boolean>;
716
+ tableChange: i0.OutputEmitterRef<STChange<any>>;
717
+ refresh: i0.OutputEmitterRef<void>;
718
+ headerExtraTpl: i0.Signal<TemplateRef<void> | undefined>;
719
+ headerTabTpl: i0.Signal<TemplateRef<void> | undefined>;
720
+ headerActionTpl: i0.Signal<TemplateRef<void> | undefined>;
721
+ get selectedLabel(): string;
722
+ get selectedUnitLabel(): string;
723
+ get refreshLabel(): string;
724
+ static ɵfac: i0.ɵɵFactoryDeclaration<ListPageLayoutComponent, never>;
725
+ static ɵcmp: i0.ɵɵComponentDeclaration<ListPageLayoutComponent, "list-page-layout", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "pi": { "alias": "pi"; "required": false; "isSignal": true; }; "ps": { "alias": "ps"; "required": false; "isSignal": true; }; "selectedCount": { "alias": "selectedCount"; "required": false; "isSignal": true; }; "multiSort": { "alias": "multiSort"; "required": false; "isSignal": true; }; "filtersInHeader": { "alias": "filtersInHeader"; "required": false; "isSignal": true; }; }, { "tableChange": "tableChange"; "refresh": "refresh"; }, ["headerExtraTpl", "headerTabTpl", "headerActionTpl"], ["[filters]", "[filters]", "[toolbar]"], true, never>;
726
+ }
727
+
728
+ type GeexReuseTabOptions = NonNullable<Parameters<typeof provideReuseTabConfig>[0]>;
729
+ interface GeexDelonProvideOptions {
730
+ router?: Type<Router>;
731
+ reuseStrategy?: Type<RouteReuseStrategy>;
732
+ appPermission?: GeexAppPermission;
733
+ reuseTab?: GeexReuseTabOptions;
734
+ }
735
+ /**
736
+ * Delon-coupled Core providers (Router subclass + ReuseTab + optional AppPermission).
737
+ */
738
+ declare function provideGeexDelonBase(options?: GeexDelonProvideOptions): Array<Provider | EnvironmentProviders>;
739
+
740
+ declare global {
741
+ interface ReadonlyArray<T> {
742
+ any(): boolean;
743
+ any(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): boolean;
744
+ any(predicate?: any): any;
745
+ first(): T;
746
+ first(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T;
747
+ first(predicate?: any): any;
748
+ firstOrDefault(defaultValue?: Partial<T>): T;
749
+ firstOrDefault(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean, defaultValue?: Partial<T>): T;
750
+ firstOrDefault(predicate?: any, defaultValue?: Partial<T>): any;
751
+ }
752
+ interface Array<T> {
753
+ add(element: T): void;
754
+ addRange(elements: T[]): void;
755
+ aggregate<U>(accumulator: (accum: U, value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => any, initialValue?: U | undefined): any;
756
+ all(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): boolean;
757
+ any(): boolean;
758
+ clear(): void;
759
+ any(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): boolean;
760
+ any(predicate?: any): any;
761
+ average(): number;
762
+ average(transform: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => any): number;
763
+ average(transform?: any): any;
764
+ contains(element: T): boolean;
765
+ count(): number;
766
+ count(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): number;
767
+ count(predicate?: any): any;
768
+ defaultIfEmpty(defaultValue?: T | undefined): T[];
769
+ distinct(): T[];
770
+ distinctBy(keySelector: (key: T) => string | number): T[];
771
+ elementAt(index: number): T;
772
+ toArray(): T[];
773
+ elementAtOrDefault(index: number): T | undefined;
774
+ except(source: T[]): T[];
775
+ first(): T;
776
+ first(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T;
777
+ first(predicate?: any): any;
778
+ firstOrDefault(defaultValue?: Partial<T>): T;
779
+ firstOrDefault(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean, defaultValue?: Partial<T>): T;
780
+ firstOrDefault(predicate?: any, defaultValue?: Partial<T>): any;
781
+ groupBy<TResult = T>(grouper: (key: T) => string | number, mapper?: ((element: T) => TResult) | undefined): {
782
+ [key: string]: TResult[];
783
+ };
784
+ groupJoin<U, R>(list: List<U>, key1: (k: T) => any, key2: (k: U) => any, result: (first: T, second: List<U>) => any): R[];
785
+ insert(index: number, element: T): void | Error;
786
+ intersect(source: T[]): T[];
787
+ linqJoin<U, R>(list: List<U>, key1: (key: T) => any, key2: (key: U) => any, result: (first: T, second: U) => R): R[];
788
+ last(): T;
789
+ last(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T;
790
+ last(predicate?: any): any;
791
+ lastOrDefault(): T;
792
+ lastOrDefault(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T;
793
+ lastOrDefault(predicate?: any): any;
794
+ max(): number;
795
+ max(selector: (value: T, index: number, array: T[]) => number): number;
796
+ max(selector?: any): any;
797
+ min(): number;
798
+ min(selector: (value: T, index: number, array: T[]) => number): number;
799
+ min(selector?: any): any;
800
+ ofType<U>($type: any): List<U>;
801
+ orderBy(keySelector: (key: T) => any, comparer?: ((a: T, b: T) => number) | undefined): T[];
802
+ orderByDescending(keySelector: (key: T) => any, comparer?: ((a: T, b: T) => number) | undefined): T[];
803
+ thenBy(keySelector: (key: T) => any): T[];
804
+ thenByDescending(keySelector: (key: T) => any): T[];
805
+ remove(element: T): boolean;
806
+ removeAll(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T[];
807
+ removeAt(index: number): void;
808
+ selectMany<TOut extends any[]>(selector: (element: T, index: number) => TOut): TOut;
809
+ sequenceEqual(list: T[]): boolean;
810
+ single(predicate?: ((value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean) | undefined): T;
811
+ singleOrDefault(predicate?: ((value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean) | undefined): T;
812
+ skip(amount: number): T[];
813
+ skipWhile(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T[];
814
+ sum(): number;
815
+ sum(transform: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => number): number;
816
+ sum(transform?: any): any;
817
+ take(amount: number): T[];
818
+ takeWhile(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T[];
819
+ toDictionary<TKey>(key: (key: T) => TKey): List<{
820
+ Key: TKey;
821
+ Value: T;
822
+ }>;
823
+ toDictionary<TKey, TValue>(key: (key: T) => TKey, value: (value: T) => TValue): List<{
824
+ Key: TKey;
825
+ Value: T | TValue;
826
+ }>;
827
+ toDictionary(key: any, value?: any): any;
828
+ toLookup<TResult>(keySelector: (key: T) => string | number, elementSelector: (element: T) => TResult): {
829
+ [key: string]: TResult[];
830
+ };
831
+ union(list: T[]): T[];
832
+ where(predicate: (value?: T | undefined, index?: number | undefined, list?: T[] | undefined) => boolean): T[];
833
+ zip<U, TOut>(list: U[], result: (first: T, second: U) => TOut): TOut[];
834
+ }
835
+ }
836
+
837
+ declare global {
838
+ interface String {
839
+ contains(this: string, value: string): boolean;
840
+ }
841
+ }
842
+
843
+ declare module "@angular/core" {
844
+ interface SignalExtensions<T> {
845
+ toDebounced(debounceTimeInMs: number): ExtendedSignal<T>;
846
+ toObservable(): Observable<T>;
847
+ }
848
+ type ExtendedSignal<T> = Signal<T> & SignalExtensions<T> & {
849
+ toDeepSignal(): DeepSignal<T>;
850
+ };
851
+ type ExtendedWritableSignal<T> = WritableSignal<T> & SignalExtensions<T> & {
852
+ toDeepSignal(): WritableDeepSignal<T>;
853
+ };
854
+ function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): ExtendedWritableSignal<T>;
855
+ }
856
+ type IsRecord<T> = T extends object ? T extends unknown[] ? false : T extends Set<unknown> ? false : T extends Map<unknown, unknown> ? false : T extends Function ? false : true : false;
857
+ type IsUnknownRecord<T> = string extends keyof T ? true : number extends keyof T ? true : false;
858
+ type IsKnownRecord<T> = IsRecord<T> extends true ? (IsUnknownRecord<T> extends true ? false : true) : false;
859
+ type DeepSignal<T> = ExtendedSignal<T> & (IsKnownRecord<T> extends true ? Readonly<{
860
+ [K in keyof T]: IsKnownRecord<T[K]> extends true ? DeepSignal<T[K]> : ExtendedSignal<T[K]>;
861
+ }> : unknown);
862
+ type WritableDeepSignal<T> = Signal<T> & WritableSignal<T> & (IsKnownRecord<T> extends true ? Readonly<{
863
+ [K in keyof T]: IsKnownRecord<T[K]> extends true ? WritableDeepSignal<T[K]> : WritableSignal<T[K]>;
864
+ }> : unknown);
865
+ declare function deepSignal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableDeepSignal<T>;
866
+ declare function computedAsync<T>(computation: () => Observable<T> | Promise<T> | T | undefined | null): Signal<T | null>;
867
+
868
+ declare module "rxjs" {
869
+ interface Observable<T> {
870
+ lastValuePromise(this: this): Promise<T | undefined>;
871
+ firstValuePromise(this: this): Promise<T | undefined>;
872
+ toSignal(this: this, options?: ToSignalOptions<T> & {
873
+ deep?: false;
874
+ initialValue?: T;
875
+ requireSync?: false;
876
+ }): ExtendedSignal<T>;
877
+ toSignal(this: this, options?: ToSignalOptions<T> & {
878
+ deep?: true;
879
+ initialValue?: T;
880
+ requireSync?: false;
881
+ }): DeepSignal<T>;
882
+ pipeMap<R>(this: this, project: (value: T, index: number) => R | undefined): Observable<R | undefined>;
883
+ pipeSwitchMap<R extends ObservableInput<any>>(this: this, project: (value: T, index: number) => R): Observable<ObservedValueOf<R>>;
884
+ pipeFilter(this: this, predicate: (value: T, index: number) => boolean): Observable<T | undefined>;
885
+ }
886
+ }
887
+
888
+ declare module "@angular/router" {
889
+ interface ActivatedRouteSnapshot {
890
+ getResolvedUrl(): string;
891
+ getConfiguredUrl(): string;
892
+ getDeepestRouteConfig(): GeexRoute | null;
893
+ }
894
+ interface RouteData extends Data {
895
+ singleton?: boolean;
896
+ reuse?: boolean;
897
+ title?: string;
898
+ }
899
+ interface NavigationBehaviorOptions {
900
+ forceReload?: boolean;
901
+ }
902
+ type GeexRoutes = GeexRoute[];
903
+ interface GeexRoute extends Route {
904
+ data?: RouteData;
905
+ }
906
+ interface Router {
907
+ navigationReload: WritableSignal<NavigationEnd | undefined>;
908
+ }
909
+ }
910
+ declare module "@angular/forms" {
911
+ type IsArray<TValue> = TValue extends Array<any> ? true : false;
912
+ type IsObject<TValue> = TValue extends object ? (TValue extends Array<any> ? false : TValue extends Date ? false : true) : false;
913
+ type TypedAbstractControl<TValue> = IsArray<TValue> extends true ? TypedFormArray<TValue extends Array<infer U> ? U : never> & FormControl<TValue> : IsObject<TValue> extends true ? TypedFormGroup<TValue> & FormControl<TValue> : FormControl<TValue>;
914
+ interface TypedFormGroup<TValue> extends FormGroup {
915
+ controls: {
916
+ [K in keyof TValue]: TypedAbstractControl<TValue[K]>;
917
+ };
918
+ value: TValue;
919
+ }
920
+ interface TypedFormArray<TValue> extends FormArray {
921
+ controls: Array<TypedAbstractControl<TValue>>;
922
+ value: Array<TValue>;
923
+ }
924
+ type ValueOrTypedAbstractControl<T> = {
925
+ [key in keyof T]: FormControl<T[key]> | ValueOrTypedAbstractControl<T[key]>;
926
+ };
927
+ interface FormBuilder {
928
+ build<T>(controls: ValueOrTypedAbstractControl<T>, options?: AbstractControlOptions | null): TypedFormGroup<T>;
929
+ }
930
+ }
931
+
932
+ declare module "@delon/abc/st" {
933
+ interface STComponent {
934
+ exportAll: (opt?: STExportOptions) => Promise<void>;
935
+ $exportData: Observable<any[]>;
936
+ }
937
+ }
938
+
939
+ declare function extract<TActual = any, T = any>(object: TActual, properties: Partial<Record<keyof (T | TActual), true>>): Partial<T>;
940
+ declare global {
941
+ type Hint<T> = Maybe<T>;
942
+ function extract<TActual = any, T = any>(object: TActual, properties: Partial<Record<keyof (T | TActual), true>>): Partial<T>;
943
+ interface Date {
944
+ add: (value: {
945
+ years?: number;
946
+ months?: number;
947
+ weeks?: number;
948
+ days?: number;
949
+ hours?: number;
950
+ minutes?: number;
951
+ seconds?: number;
952
+ milliseconds?: number;
953
+ }) => Date;
954
+ format(format: string): string;
955
+ getTotalMonth(): number;
956
+ }
957
+ interface Array<T> {
958
+ flatMapDeep<U>(this: this, iteratee: (value: T, index: number, array: T[]) => U[], thisArg?: any): U[];
959
+ }
960
+ interface ArrayConstructor {
961
+ range(start: number, end: number): number[];
962
+ }
963
+ interface Number {
964
+ hasFlag(...flags: number[]): boolean;
965
+ hasNoFlag(...flags: number[]): boolean;
966
+ }
967
+ interface String {
968
+ trimEnd(strToTrim: string): string;
969
+ }
970
+ }
971
+ declare function assertIsDefined<T>(val: T): asserts val is NonNullable<T>;
972
+ declare function assertIsArray<T>(val: T | T[]): asserts val is T[];
973
+ declare function assert<T>(_val: any): asserts _val is T;
974
+ declare function assertIsNotArray<T>(val: T | T[]): asserts val is T;
975
+ type PropertyAccessType = "create" | "modify" | "delete" | "assignment";
976
+ declare function deepProxy<T>(obj: T, callback: (type: PropertyAccessType, param: {
977
+ target: any;
978
+ key: string | number | symbol;
979
+ value: any;
980
+ }) => void): any;
981
+ declare function isRecord<TValue = any>(value: unknown): value is Record<string, TValue>;
982
+
983
+ declare global {
984
+ interface Blob {
985
+ computeChecksumMd5(this: Blob): Promise<string>;
986
+ }
987
+ }
988
+
989
+ declare function provideGeexExtensions(): void;
990
+
991
+ declare const GEEX_MOBILE_PATH_SUFFIX: InjectionToken<string>;
992
+
993
+ declare const GEEX_SUPER_ADMIN_USER_ID: InjectionToken<string>;
994
+
995
+ declare const GEEX_EXCEPTION_403_PROFILE_PATH: InjectionToken<string>;
996
+ declare const GEEX_EXCEPTION_403_PROFILE_LABEL: InjectionToken<string>;
997
+ declare const GEEX_EXCEPTION_LOGIN_PATH: InjectionToken<string>;
998
+
999
+ declare global {
1000
+ var geex: typeof geex;
1001
+ interface Window {
1002
+ geex: typeof geex;
1003
+ }
1004
+ }
141
1005
  /**
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
1006
+ * Expose package `geex` on globalThis/window via a live getter.
1007
+ * Must not copy the value at bind time — `geex` is only assigned inside `configGeex`.
145
1008
  */
146
- declare function configGeex<TExtensionModules extends Record<string, GeexModule> = ExtensionModule>(injector: Injector, overrides?: GeexOverrides<TExtensionModules>): void;
1009
+ declare function bindGeexGlobal(): void;
1010
+
1011
+ declare const exports: Record<string, any>;
147
1012
 
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 };
1013
+ export { BusinessComponentBase, DebuggerBlockerService, ExtensionModule, GEEX_AFTER_LOGIN_NAVIGATE, GEEX_API_BASE_URL, GEEX_APOLLO_CACHE, GEEX_APOLLO_TYPE_POLICY_CONTRIBUTIONS, GEEX_APP_MENU_SETTING, GEEX_APP_NAME_SETTING, GEEX_APP_PERMISSION, GEEX_BLOCK_DEBUGGER, GEEX_CANCEL_AUTHENTICATION_DOCUMENT, GEEX_DEFAULT_HTTP_STATUS_MESSAGES, GEEX_DEFAULT_MENUS, GEEX_EXCEPTION_403_PROFILE_LABEL, GEEX_EXCEPTION_403_PROFILE_PATH, GEEX_EXCEPTION_500_PATH, GEEX_EXCEPTION_LOGIN_PATH, GEEX_HTTP_STATUS_MESSAGES, GEEX_I18N, GEEX_I18N_PACKS, GEEX_I18N_SERVICE, GEEX_LOCALIZATION_DATA_SETTING, GEEX_LOCALIZATION_LANGUAGE_SETTING, GEEX_LOGIN_PATH, GEEX_MENU_CONTRIBUTIONS, GEEX_MOBILE_PATH_SUFFIX, GEEX_MODULE_CONTRIBUTIONS, GEEX_PROFILE_LABEL, GEEX_PROFILE_PATH, GEEX_SESSION_TERMINATED_COPY, GEEX_STARTUP_OPTIONS, GEEX_SUPER_ADMIN_USER_ID, Geex, GeexAuthLogout, GeexHttpInterceptor, GeexI18nService, GeexReuseTabStrategy, GeexRouter, GeexStartupService, GeexTranslateLoader, I18N, GeexI18nService as I18NService, ListPageLayoutComponent, ListPageParams, ModalComponentBase, RoutedComponent, RoutedEditComponent, RoutedListComponent, SILENT_REQUEST, SilentApollo, TreeTableComponentBase, applyEnvironmentOverrides, assert, assertIsArray, assertIsDefined, assertIsNotArray, bindGeexGlobal, cancelAuthenticationMutation, computedAsync, configGeex, createGeexGraphqlErrorLink, createGeexHttpApolloOptions, createGeexInMemoryCache, createGeexSilentContextLink, createGeexUploadHttpLink, createGeexUriLink, createGeexWsApolloOptions, createUiModule, deepProxy, deepSignal, extract, geex, geexApolloDefaultOptions, geexDefaultTypePolicies, guardedSignal, isGeexSilentOperation, isRecord, loadEnvironmentOverrides, mergeGeexI18nPacks, provideGeex, provideGeexApollo, provideGeexApolloTypePolicies, provideGeexCommon, provideGeexDelonBase, provideGeexExtensions, provideGeexHttp, provideGeexI18n, provideGeexMenus, provideGeexModuleContribution, provideGeexStartup, exports as rison };
1014
+ export type { BatchOperationName, DeepSignal, GeexApolloCacheOptions, GeexApolloLinkOptions, GeexApolloTypePolicyContribution, GeexAppPermission, GeexDelonProvideOptions, GeexEnvironmentOverridesOptions, GeexExtensions, GeexGraphqlErrorHandler, GeexHint, GeexHttpProvideOptions, GeexI18n, GeexI18nProvideOptions, GeexMenuContribution, GeexMenuContributionContext, GeexMenuItem, GeexModule, GeexModuleContribution, GeexModuleContributionContext, GeexModuleMap, GeexModules, GeexOverrides, GeexSessionTerminatedCopy, GeexStartupI18nAdapter, GeexStartupOptions, GeexTypePolicies, GeexTypedFormGroup, IdentityClaims, LangObject, PropertyAccessType, ProvideGeexApolloOptions, RouteParams, RouteParamsMappings, UiModule, WritableDeepSignal };
1015
+ //# sourceMappingURL=index.d.ts.map