@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/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # @geexcode/geex-angular
2
+
3
+ Geex Angular **Core**: headless signal modules + **Delon page bases**.
4
+
5
+ Delon / ng-zorro are **required peer dependencies** (not an optional side package). Align versions with the admin template (Delon / ng-zorro 20.x).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @geexcode/geex-angular
11
+ ```
12
+
13
+ Peers (excerpt): `@angular/*`, `@delon/abc|acl|form|theme|util`, `ng-zorro-antd`, `apollo-angular`, `extract-files`, `graphql`, `graphql-ws`, `kiwi-intl`, `rxjs`.
14
+
15
+ ## Providers
16
+
17
+ ```ts
18
+ import {
19
+ provideGeexCommon,
20
+ provideGeexDelonBase,
21
+ provideGeexApollo,
22
+ provideGeexI18n,
23
+ provideGeexStartup,
24
+ GeexI18nService,
25
+ GeexStartupService,
26
+ GeexHttpInterceptor,
27
+ GeexTranslateLoader,
28
+ loadEnvironmentOverrides,
29
+ GEEX_APP_PERMISSION,
30
+ GEEX_API_BASE_URL,
31
+ GEEX_AFTER_LOGIN_NAVIGATE,
32
+ } from "@geexcode/geex-angular";
33
+ import { ALAIN_I18N_TOKEN } from "@delon/theme";
34
+
35
+ await loadEnvironmentOverrides(environment);
36
+
37
+ bootstrapApplication(AppComponent, {
38
+ providers: [
39
+ provideGeexCommon(),
40
+ ...provideGeexI18n(hostI18nPacks),
41
+ { provide: ALAIN_I18N_TOKEN, useExisting: GeexI18nService },
42
+ { provide: GEEX_APP_PERMISSION, useValue: AppPermission },
43
+ { provide: GEEX_API_BASE_URL, useValue: environment.api.baseUrl },
44
+ { provide: GEEX_AFTER_LOGIN_NAVIGATE, useValue: () => window.clearHistory() },
45
+ GeexHttpInterceptor,
46
+ { provide: HTTP_INTERCEPTORS, useExisting: GeexHttpInterceptor, multi: true },
47
+ ...provideGeexStartup({ /* getOAuthConfig, defaultMenus, settingKeys, onDebuggerInit */ }),
48
+ provideAppInitializer(() => inject(GeexStartupService).load()),
49
+ provideReuseTabConfig({ /* ... */ }),
50
+ ...provideGeexDelonBase(),
51
+ ...provideGeexApollo({
52
+ baseUrl: environment.api.baseUrl,
53
+ possibleTypes: introspection.possibleTypes,
54
+ }),
55
+ ],
56
+ });
57
+ ```
58
+
59
+ - `provideGeexCommon()` — headless modules only.
60
+ - `provideGeexI18n(packs)` — `GeexI18nService` + `GEEX_I18N` / `GEEX_I18N_PACKS`; host owns zh-CN/en-US dictionary data; also wire `ALAIN_I18N_TOKEN` → `GeexI18nService` and `TranslateLoader` → `GeexTranslateLoader`.
61
+ - `provideGeexStartup` / `GeexStartupService` — inject Core service directly (no host facade).
62
+ - `provideGeexDelonBase()` — `GeexRouter` + `GeexReuseTabStrategy` (call after `provideReuseTabConfig`).
63
+ - `GeexHttpInterceptor` — default zh-CN status messages + `/authentication/login`; override via `GEEX_HTTP_STATUS_MESSAGES` / `GEEX_LOGIN_PATH` / hooks.
64
+ - `provideGeexApollo` — default typePolicies + error/silent/WS links + **multipart upload** (`extract-files`); host must pass `baseUrl` + `possibleTypes`. Opt out: `enableUpload: false` or custom `createHttpLinkInstance`.
65
+ - `loadEnvironmentOverrides` — merges `/assets/environment.override.js` into host `environment`.
66
+
67
+ ## Delon surface
68
+
69
+ | Export | Role |
70
+ |--------|------|
71
+ | `BusinessComponentBase` / `RoutedComponent` / `RoutedListComponent` / `RoutedEditComponent` | Page bases (Template Method hooks for override) |
72
+ | `ModalComponentBase` / `TreeTableComponentBase` | Modal / tree-table bases |
73
+ | `GeexRouter` / `GeexReuseTabStrategy` | Router + reuse-tab harden |
74
+ | `ListPageLayoutComponent` | Generic list layout |
75
+ | `rison` | Query-param encoding |
76
+ | `GEEX_*` tokens | Host i18n / permission / HTTP / blob / org / exception injection |
77
+
78
+ Override: subclass `protected` hooks (`handleRouteReload`, `onTableSort`, `filterBatchIds`, `afterClose`, `getNodeKey`, ...). No Page-Token ladder.
79
+
80
+ ### Tenant type
81
+
82
+ Hosts should use Core `Tenant` from `@geexcode/geex-angular`. For legacy `ITenant` imports, `export type ITenant = Tenant` is available from the package.
83
+
84
+ ### P2 UI (provide-layer)
85
+
86
+ | Area | Exports |
87
+ |------|---------|
88
+ | Approve | `ApproveButtonComponent`, `ApproveBadge`, `GEEX_APPROVE_STATUS_OPTIONS` |
89
+ | Permissions | `PermissionTransferWidget`, `PermissionsComponent`, `GEEX_PERMISSION_FILTER` |
90
+ | Org tree | `OrgTreeSelectWidget`, `OrgTreeSelectPickerDirective`, `GEEX_ORG_OWNERSHIP_FILTER`, `GEEX_SUPER_ADMIN_USER_ID` |
91
+ | Upload | `GeexUploadComponent`, `GeexUploadWidget`, `GEEX_BLOB_*` tokens |
92
+ | Guards | `CurrentPlatformRedirectGuard`, `GEEX_MOBILE_PATH_SUFFIX` |
93
+ | Exception | `Exception403/404/500Component`, `geexExceptionRoutes`, `provideGeexExceptionRoutes()` |
94
+ | Header chrome | `HeaderUserComponent` (`GeexAuthLogout` + `GEEX_PROFILE_PATH` / `GEEX_PROFILE_LABEL`), `HeaderI18nComponent`, fullscreen/search/clear-storage |
95
+ | i18n | `GeexI18nService`, `LangObject`, `provideGeexI18n`, `GeexTranslateLoader` |
96
+
97
+ Host must provide blob GraphQL documents via `GEEX_BLOB_CREATE_DOCUMENT`, `GEEX_BLOB_LIST_DOCUMENT`, `GEEX_BLOB_DELETE_DOCUMENT` (from generated `mutations.gql` / `queries.gql`).
98
+
99
+ ## Host-only (not in Core)
100
+
101
+ - **debugger-blocker** (product policy + `eval`) — keep in app `shared/services`
102
+ - i18n **packs** (`zh-CN` / `en-US` with permissions / module-registry merge) — provide via `provideGeexI18n`
103
+ - `environment` values and generated `introspection.possibleTypes`
104
+ - optional `clearHistory` via `GEEX_AFTER_LOGIN_NAVIGATE`
105
+ - peer `extract-files` installed in host (used by Core default upload link)
106
+ - full-page `LayoutBasic` / `LayoutAuth` assembly (logo / watermark / PDF)
107
+
108
+ Business UI (`modules/*`) and identity widgets stay in the app source.
package/dist/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # @geexcode/geex-angular
2
+
3
+ Geex Angular **Core**: headless signal modules + **Delon page bases**.
4
+
5
+ Delon / ng-zorro are **required peer dependencies** (not an optional side package). Align versions with the admin template (Delon / ng-zorro 20.x).
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @geexcode/geex-angular
11
+ ```
12
+
13
+ Peers (excerpt): `@angular/*`, `@delon/abc|acl|form|theme|util`, `ng-zorro-antd`, `apollo-angular`, `extract-files`, `graphql`, `graphql-ws`, `kiwi-intl`, `rxjs`.
14
+
15
+ ## Providers
16
+
17
+ ```ts
18
+ import {
19
+ provideGeexCommon,
20
+ provideGeexDelonBase,
21
+ provideGeexApollo,
22
+ provideGeexI18n,
23
+ provideGeexStartup,
24
+ GeexI18nService,
25
+ GeexStartupService,
26
+ GeexHttpInterceptor,
27
+ GeexTranslateLoader,
28
+ loadEnvironmentOverrides,
29
+ GEEX_APP_PERMISSION,
30
+ GEEX_API_BASE_URL,
31
+ GEEX_AFTER_LOGIN_NAVIGATE,
32
+ } from "@geexcode/geex-angular";
33
+ import { ALAIN_I18N_TOKEN } from "@delon/theme";
34
+
35
+ await loadEnvironmentOverrides(environment);
36
+
37
+ bootstrapApplication(AppComponent, {
38
+ providers: [
39
+ provideGeexCommon(),
40
+ ...provideGeexI18n(hostI18nPacks),
41
+ { provide: ALAIN_I18N_TOKEN, useExisting: GeexI18nService },
42
+ { provide: GEEX_APP_PERMISSION, useValue: AppPermission },
43
+ { provide: GEEX_API_BASE_URL, useValue: environment.api.baseUrl },
44
+ { provide: GEEX_AFTER_LOGIN_NAVIGATE, useValue: () => window.clearHistory() },
45
+ GeexHttpInterceptor,
46
+ { provide: HTTP_INTERCEPTORS, useExisting: GeexHttpInterceptor, multi: true },
47
+ ...provideGeexStartup({ /* getOAuthConfig, defaultMenus, settingKeys, onDebuggerInit */ }),
48
+ provideAppInitializer(() => inject(GeexStartupService).load()),
49
+ provideReuseTabConfig({ /* ... */ }),
50
+ ...provideGeexDelonBase(),
51
+ ...provideGeexApollo({
52
+ baseUrl: environment.api.baseUrl,
53
+ possibleTypes: introspection.possibleTypes,
54
+ }),
55
+ ],
56
+ });
57
+ ```
58
+
59
+ - `provideGeexCommon()` — headless modules only.
60
+ - `provideGeexI18n(packs)` — `GeexI18nService` + `GEEX_I18N` / `GEEX_I18N_PACKS`; host owns zh-CN/en-US dictionary data; also wire `ALAIN_I18N_TOKEN` → `GeexI18nService` and `TranslateLoader` → `GeexTranslateLoader`.
61
+ - `provideGeexStartup` / `GeexStartupService` — inject Core service directly (no host facade).
62
+ - `provideGeexDelonBase()` — `GeexRouter` + `GeexReuseTabStrategy` (call after `provideReuseTabConfig`).
63
+ - `GeexHttpInterceptor` — default zh-CN status messages + `/authentication/login`; override via `GEEX_HTTP_STATUS_MESSAGES` / `GEEX_LOGIN_PATH` / hooks.
64
+ - `provideGeexApollo` — default typePolicies + error/silent/WS links + **multipart upload** (`extract-files`); host must pass `baseUrl` + `possibleTypes`. Opt out: `enableUpload: false` or custom `createHttpLinkInstance`.
65
+ - `loadEnvironmentOverrides` — merges `/assets/environment.override.js` into host `environment`.
66
+
67
+ ## Delon surface
68
+
69
+ | Export | Role |
70
+ |--------|------|
71
+ | `BusinessComponentBase` / `RoutedComponent` / `RoutedListComponent` / `RoutedEditComponent` | Page bases (Template Method hooks for override) |
72
+ | `ModalComponentBase` / `TreeTableComponentBase` | Modal / tree-table bases |
73
+ | `GeexRouter` / `GeexReuseTabStrategy` | Router + reuse-tab harden |
74
+ | `ListPageLayoutComponent` | Generic list layout |
75
+ | `rison` | Query-param encoding |
76
+ | `GEEX_*` tokens | Host i18n / permission / HTTP / blob / org / exception injection |
77
+
78
+ Override: subclass `protected` hooks (`handleRouteReload`, `onTableSort`, `filterBatchIds`, `afterClose`, `getNodeKey`, ...). No Page-Token ladder.
79
+
80
+ ### Tenant type
81
+
82
+ Hosts should use Core `Tenant` from `@geexcode/geex-angular`. For legacy `ITenant` imports, `export type ITenant = Tenant` is available from the package.
83
+
84
+ ### P2 UI (provide-layer)
85
+
86
+ | Area | Exports |
87
+ |------|---------|
88
+ | Approve | `ApproveButtonComponent`, `ApproveBadge`, `GEEX_APPROVE_STATUS_OPTIONS` |
89
+ | Permissions | `PermissionTransferWidget`, `PermissionsComponent`, `GEEX_PERMISSION_FILTER` |
90
+ | Org tree | `OrgTreeSelectWidget`, `OrgTreeSelectPickerDirective`, `GEEX_ORG_OWNERSHIP_FILTER`, `GEEX_SUPER_ADMIN_USER_ID` |
91
+ | Upload | `GeexUploadComponent`, `GeexUploadWidget`, `GEEX_BLOB_*` tokens |
92
+ | Guards | `CurrentPlatformRedirectGuard`, `GEEX_MOBILE_PATH_SUFFIX` |
93
+ | Exception | `Exception403/404/500Component`, `geexExceptionRoutes`, `provideGeexExceptionRoutes()` |
94
+ | Header chrome | `HeaderUserComponent` (`GeexAuthLogout` + `GEEX_PROFILE_PATH` / `GEEX_PROFILE_LABEL`), `HeaderI18nComponent`, fullscreen/search/clear-storage |
95
+ | i18n | `GeexI18nService`, `LangObject`, `provideGeexI18n`, `GeexTranslateLoader` |
96
+
97
+ Host must provide blob GraphQL documents via `GEEX_BLOB_CREATE_DOCUMENT`, `GEEX_BLOB_LIST_DOCUMENT`, `GEEX_BLOB_DELETE_DOCUMENT` (from generated `mutations.gql` / `queries.gql`).
98
+
99
+ ## Host-only (not in Core)
100
+
101
+ - **debugger-blocker** (product policy + `eval`) — keep in app `shared/services`
102
+ - i18n **packs** (`zh-CN` / `en-US` with permissions / module-registry merge) — provide via `provideGeexI18n`
103
+ - `environment` values and generated `introspection.possibleTypes`
104
+ - optional `clearHistory` via `GEEX_AFTER_LOGIN_NAVIGATE`
105
+ - peer `extract-files` installed in host (used by Core default upload link)
106
+ - full-page `LayoutBasic` / `LayoutAuth` assembly (logo / watermark / PDF)
107
+
108
+ Business UI (`modules/*`) and identity widgets stay in the app source.