platform-core-ng 22.3.0-rc.0 → 22.4.0-rc.0

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 (69) hide show
  1. package/README.md +26 -20
  2. package/fesm2022/platform-core-ng-auth.mjs +320 -0
  3. package/fesm2022/platform-core-ng-auth.mjs.map +1 -0
  4. package/fesm2022/platform-core-ng-card.mjs +7 -2
  5. package/fesm2022/platform-core-ng-card.mjs.map +1 -1
  6. package/fesm2022/platform-core-ng-core.mjs +4 -0
  7. package/fesm2022/platform-core-ng-core.mjs.map +1 -1
  8. package/fesm2022/platform-core-ng-feedback-renderers.mjs +348 -0
  9. package/fesm2022/platform-core-ng-feedback-renderers.mjs.map +1 -0
  10. package/fesm2022/platform-core-ng-feedback.mjs +1438 -0
  11. package/fesm2022/platform-core-ng-feedback.mjs.map +1 -0
  12. package/fesm2022/platform-core-ng-http.mjs +959 -4
  13. package/fesm2022/platform-core-ng-http.mjs.map +1 -1
  14. package/fesm2022/platform-core-ng-input.mjs +7 -2
  15. package/fesm2022/platform-core-ng-input.mjs.map +1 -1
  16. package/fesm2022/platform-core-ng-overlay.mjs +2881 -0
  17. package/fesm2022/platform-core-ng-overlay.mjs.map +1 -0
  18. package/fesm2022/platform-core-ng-permission.mjs +298 -4
  19. package/fesm2022/platform-core-ng-permission.mjs.map +1 -1
  20. package/fesm2022/platform-core-ng-providers.mjs +641 -0
  21. package/fesm2022/platform-core-ng-providers.mjs.map +1 -0
  22. package/fesm2022/platform-core-ng-runtime.mjs +632 -0
  23. package/fesm2022/platform-core-ng-runtime.mjs.map +1 -0
  24. package/fesm2022/platform-core-ng-segmented.mjs +7 -2
  25. package/fesm2022/platform-core-ng-segmented.mjs.map +1 -1
  26. package/fesm2022/platform-core-ng-status-dot.mjs +7 -2
  27. package/fesm2022/platform-core-ng-status-dot.mjs.map +1 -1
  28. package/fesm2022/platform-core-ng-testing.mjs +88 -0
  29. package/fesm2022/platform-core-ng-testing.mjs.map +1 -0
  30. package/fesm2022/platform-core-ng-ui-common.mjs +4474 -0
  31. package/fesm2022/platform-core-ng-ui-common.mjs.map +1 -0
  32. package/fesm2022/platform-core-ng-ui-desktop.mjs +4318 -0
  33. package/fesm2022/platform-core-ng-ui-desktop.mjs.map +1 -0
  34. package/fesm2022/platform-core-ng-ui-mobile.mjs +3972 -0
  35. package/fesm2022/platform-core-ng-ui-mobile.mjs.map +1 -0
  36. package/fesm2022/platform-core-ng.mjs +1294 -21112
  37. package/fesm2022/platform-core-ng.mjs.map +1 -1
  38. package/package.json +54 -10
  39. package/shared/components/s-dialog/s-dialog-container.component.scss +2 -1
  40. package/styles/_api.scss +3 -0
  41. package/styles/base/reset.scss +5 -0
  42. package/styles/components/index.scss +1 -3
  43. package/styles/form/_control-size.scss +51 -0
  44. package/styles/form/input.scss +2 -10
  45. package/styles/form/select.scss +1 -8
  46. package/styles/form/textarea.scss +1 -8
  47. package/styles/foundation.scss +17 -16
  48. package/styles/index.scss +2 -0
  49. package/styles/recipes/_p-routed-app-shell.scss +2 -1
  50. package/types/platform-core-ng-auth.d.ts +124 -0
  51. package/types/platform-core-ng-card.d.ts +1 -1
  52. package/types/platform-core-ng-feedback-renderers.d.ts +85 -0
  53. package/types/platform-core-ng-feedback.d.ts +680 -0
  54. package/types/platform-core-ng-http.d.ts +278 -1
  55. package/types/platform-core-ng-input.d.ts +1 -1
  56. package/types/platform-core-ng-overlay.d.ts +1002 -0
  57. package/types/platform-core-ng-permission.d.ts +117 -1
  58. package/types/platform-core-ng-providers.d.ts +303 -0
  59. package/types/platform-core-ng-runtime.d.ts +450 -0
  60. package/types/platform-core-ng-segmented.d.ts +1 -1
  61. package/types/platform-core-ng-status-dot.d.ts +1 -1
  62. package/types/platform-core-ng-testing.d.ts +39 -0
  63. package/types/platform-core-ng-ui-common.d.ts +1450 -0
  64. package/types/platform-core-ng-ui-desktop.d.ts +1675 -0
  65. package/types/platform-core-ng-ui-mobile.d.ts +1757 -0
  66. package/types/platform-core-ng.d.ts +420 -7714
  67. package/shared/components/s-card/s-card.scss +0 -245
  68. package/shared/components/s-list-page-layout/s-list-page-layout.scss +0 -249
  69. package/shared/components/s-status-dot/s-status-dot.scss +0 -56
package/README.md CHANGED
@@ -4,26 +4,32 @@ This package targets Angular 22.
4
4
 
5
5
  ## Public API ownership
6
6
 
7
- The package root keeps a compatibility facade at `src/public-api.ts`, but exports are owned by
8
- layered barrels:
9
-
10
- - `src/core`: runtime, auth, HTTP, permission, handlers, and integration tokens.
11
- - `src/layouts`: shell layouts, layout parts, workspace layout, and layout providers.
12
- - `src/shared/components`: reusable UI components.
13
- - `src/shared/overlay`: dialog, drawer, message overlay contracts, and overlay host utilities.
14
- - `src/shared/directives` and `src/shared/pipes`: shared template helpers.
15
-
16
- Published compatibility entry points are available for the existing import contracts:
17
-
18
- - `platform-core-ng/core`
19
- - `platform-core-ng/http`
20
- - `platform-core-ng/card`
21
- - `platform-core-ng/input`
22
- - `platform-core-ng/segmented`
23
- - `platform-core-ng/status-dot`
24
-
25
- The compatibility entry points re-export the primary package symbols so Angular services and
26
- injection tokens keep one runtime identity when root and subpath imports are mixed.
7
+ 新增代码必须按能力使用正式入口:
8
+
9
+ - 基础能力:`platform-core-ng/runtime`、`/auth`、`/http`、`/permission`、`/feedback`、`/overlay`;
10
+ - 应用装配:`platform-core-ng/providers`;
11
+ - UI:`platform-core-ng/ui/common`、`/ui/mobile`、`/ui/desktop`;
12
+ - 具体反馈渲染器:`platform-core-ng/feedback/renderers`;
13
+ - 消费者测试工具:`platform-core-ng/testing`。
14
+
15
+ 例如:
16
+
17
+ ```ts
18
+ import { providePlatformHostedApp } from "platform-core-ng/providers";
19
+ import { RuntimeService } from "platform-core-ng/runtime";
20
+ import { requestInterceptor } from "platform-core-ng/http";
21
+ import { Card } from "platform-core-ng/ui/common";
22
+ ```
23
+
24
+ `platform-core-ng` 根入口是永久冻结的兼容门面,只转发 22.4.0-rc.0 前已经存在的公共符号;
25
+ 不得为新增能力扩展根入口。`platform-core-ng/core`、`/card`、`/input`、`/segmented` 和
26
+ `/status-dot` 自 22.4.0-rc.0 起进入废弃周期。它们继续保持类型和运行时身份兼容,但新代码不得
27
+ 导入;最早只能在 23.0.0 且仓内外消费者、packed/registry 矩阵和回滚验证全部清零后删除。
28
+
29
+ `BsSelect`、Drawer Form 组件族属于 `stop-new`;`PlatformLoginPage`、`MerchantCard`、
30
+ `NotificationCenter`、`RoutePlaceholderPageComponent` 属于 `move-versioned`。这些符号仅留在
31
+ 冻结根入口供存量消费者编译,不构成新推荐 API。完整生命周期、Owner 与迁移目标见
32
+ [兼容入口生命周期](./docs/compatibility-entrypoints.md)。
27
33
 
28
34
  Use `@use "pkg:platform-core-ng/styles";` for the published Sass entry point.
29
35
 
@@ -0,0 +1,320 @@
1
+ import { toSafeRedirectQueryParams, resolveSafeRedirect } from 'platform-core-ts';
2
+ export { getSafeLoginRedirect, normalizeSafeInternalPath, resolveSafeRedirect, toSafeRedirectQueryParams } from 'platform-core-ts';
3
+ import * as i0 from '@angular/core';
4
+ import { makeEnvironmentProviders, InjectionToken, inject, Injectable, DestroyRef, provideEnvironmentInitializer } from '@angular/core';
5
+ import { HTTP_AUTH_TOKEN_GETTER } from 'platform-core-ng/http';
6
+ import { Router } from '@angular/router';
7
+
8
+ // 保留 Angular Runtime 历史入口;真实策略由 platform-core-ts 唯一实现。
9
+
10
+ /**
11
+ * Auth 正式入口拥有的 Token Reader Port。
12
+ *
13
+ * 该 Token 与 HTTP 低层凭证读取 Port 分离,由 Provider 配方显式连接,避免 HTTP 反向读取会话服务。
14
+ */
15
+ class AuthTokenReaderPort {
16
+ }
17
+ /**
18
+ * 同时注册 Auth Token Reader 与 HTTP 低层适配器。
19
+ *
20
+ * @param readerFactory 创建 Auth Token Reader 的工厂
21
+ * @returns 可加入应用配置的 EnvironmentProviders
22
+ */
23
+ function provideAuthTokenReader(readerFactory) {
24
+ const readerProvider = {
25
+ provide: AuthTokenReaderPort,
26
+ useFactory: () => {
27
+ const reader = readerFactory();
28
+ return { read: reader };
29
+ },
30
+ };
31
+ return makeEnvironmentProviders([
32
+ readerProvider,
33
+ {
34
+ provide: HTTP_AUTH_TOKEN_GETTER,
35
+ useFactory: (port) => () => port.read(),
36
+ deps: [AuthTokenReaderPort],
37
+ },
38
+ ]);
39
+ }
40
+
41
+ const AUTHENTICATED_STATE_GETTER = new InjectionToken('AUTHENTICATED_STATE_GETTER');
42
+ const CORE_AUTH_GUARD_CONFIG = new InjectionToken('CORE_AUTH_GUARD_CONFIG', {
43
+ factory: () => ({
44
+ authenticatedRedirectPath: '/',
45
+ loginPath: '/login',
46
+ }),
47
+ });
48
+ function provideAuthenticatedStateGetter(getterFactory) {
49
+ return {
50
+ provide: AUTHENTICATED_STATE_GETTER,
51
+ useFactory: getterFactory,
52
+ };
53
+ }
54
+ function provideCoreAuthGuardConfig(config) {
55
+ return {
56
+ provide: CORE_AUTH_GUARD_CONFIG,
57
+ useValue: config,
58
+ };
59
+ }
60
+
61
+ /** 仅允许已认证会话进入,并保留安全的站内回跳地址。 */
62
+ const coreAuthGuard = (_route, state) => {
63
+ const isAuthenticated = inject(AUTHENTICATED_STATE_GETTER);
64
+ const config = inject(CORE_AUTH_GUARD_CONFIG);
65
+ const router = inject(Router);
66
+ if (isAuthenticated()) {
67
+ return true;
68
+ }
69
+ return router.createUrlTree([config.loginPath ?? '/login'], {
70
+ queryParams: toSafeRedirectQueryParams(state.url, config.loginPath),
71
+ });
72
+ };
73
+ /** 仅允许匿名会话进入登录等 Guest 页面。 */
74
+ const coreGuestOnlyGuard = (route) => {
75
+ const isAuthenticated = inject(AUTHENTICATED_STATE_GETTER);
76
+ const config = inject(CORE_AUTH_GUARD_CONFIG);
77
+ const router = inject(Router);
78
+ if (!isAuthenticated()) {
79
+ return true;
80
+ }
81
+ const redirect = resolveSafeRedirect(route.queryParamMap.get('redirect'), {
82
+ fallbackPath: config.authenticatedRedirectPath,
83
+ loginPath: config.loginPath,
84
+ });
85
+ return router.createUrlTree([redirect]);
86
+ };
87
+
88
+ const HOSTED_AUTH_MESSAGE_CHANNEL = 'platform:auth';
89
+ const HOSTED_AUTH_MESSAGE_VERSION = 1;
90
+ const HOSTED_AUTH_WINDOW_EVENT_NAMES = {
91
+ AUTH_EXPIRED: 'platform:auth:expired',
92
+ LOGOUT_REQUEST: 'platform:auth:logout-request',
93
+ };
94
+ const DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG = {
95
+ acceptedSources: [],
96
+ acceptAnySource: false,
97
+ acceptedOrigins: [],
98
+ acceptAnyOrigin: false,
99
+ acceptedMessageSources: [],
100
+ acceptAnyMessageSource: false,
101
+ requireSameOrigin: true,
102
+ };
103
+ const HOSTED_AUTH_EVENT_HANDLER = new InjectionToken('HOSTED_AUTH_EVENT_HANDLER', {
104
+ factory: () => null,
105
+ });
106
+ const HOSTED_AUTH_EVENT_LISTENER_CONFIG = new InjectionToken('HOSTED_AUTH_EVENT_LISTENER_CONFIG', {
107
+ factory: () => DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG,
108
+ });
109
+ class HostedAuthTrustedMessageSourceRegistry {
110
+ sources = new Set();
111
+ register(source) {
112
+ if (!source) {
113
+ return () => undefined;
114
+ }
115
+ this.sources.add(source);
116
+ return () => {
117
+ this.sources.delete(source);
118
+ };
119
+ }
120
+ has(source) {
121
+ return !!source && this.sources.has(source);
122
+ }
123
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthTrustedMessageSourceRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
124
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthTrustedMessageSourceRegistry, providedIn: 'root' });
125
+ }
126
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthTrustedMessageSourceRegistry, decorators: [{
127
+ type: Injectable,
128
+ args: [{ providedIn: 'root' }]
129
+ }] });
130
+ class HostedAuthBridgeService {
131
+ emitAuthExpired(source, error, config = {}) {
132
+ this.emit('AUTH_EXPIRED', {
133
+ source,
134
+ status: error?.status,
135
+ url: error?.url ?? null,
136
+ }, config);
137
+ }
138
+ emitLogoutRequest(source, config = {}) {
139
+ this.emit('LOGOUT_REQUEST', { source }, config);
140
+ }
141
+ emit(type, detail, config = {}) {
142
+ if (typeof window === 'undefined') {
143
+ return;
144
+ }
145
+ window.dispatchEvent(new CustomEvent(HOSTED_AUTH_WINDOW_EVENT_NAMES[type], { detail }));
146
+ if (window.parent && window.parent !== window) {
147
+ window.parent.postMessage(createHostedAuthMessage(type, detail), config.targetOrigin ?? window.location.origin);
148
+ }
149
+ }
150
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthBridgeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
151
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthBridgeService, providedIn: 'root' });
152
+ }
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthBridgeService, decorators: [{
154
+ type: Injectable,
155
+ args: [{ providedIn: 'root' }]
156
+ }] });
157
+ class HostedAuthEventListenerService {
158
+ config = inject(HOSTED_AUTH_EVENT_LISTENER_CONFIG);
159
+ destroyRef = inject(DestroyRef);
160
+ handler = inject(HOSTED_AUTH_EVENT_HANDLER);
161
+ trustedMessageSources = inject(HostedAuthTrustedMessageSourceRegistry);
162
+ started = false;
163
+ start() {
164
+ if (this.started || typeof window === 'undefined') {
165
+ return;
166
+ }
167
+ this.started = true;
168
+ for (const eventName of Object.values(HOSTED_AUTH_WINDOW_EVENT_NAMES)) {
169
+ window.addEventListener(eventName, this.handleWindowAuthEvent);
170
+ }
171
+ window.addEventListener('message', this.handlePostMessage);
172
+ this.destroyRef.onDestroy(() => this.stop());
173
+ }
174
+ stop() {
175
+ if (!this.started || typeof window === 'undefined') {
176
+ return;
177
+ }
178
+ this.started = false;
179
+ for (const eventName of Object.values(HOSTED_AUTH_WINDOW_EVENT_NAMES)) {
180
+ window.removeEventListener(eventName, this.handleWindowAuthEvent);
181
+ }
182
+ window.removeEventListener('message', this.handlePostMessage);
183
+ }
184
+ handleWindowAuthEvent = (event) => {
185
+ const type = getHostedAuthEventTypeFromWindowEventName(event.type);
186
+ if (!(event instanceof CustomEvent) || !type) {
187
+ return;
188
+ }
189
+ this.handleAuthEvent(type, event.detail);
190
+ };
191
+ handlePostMessage = (event) => {
192
+ if (!this.isAcceptedOrigin(event.origin) || !this.isAcceptedMessageSource(event.source)) {
193
+ return;
194
+ }
195
+ if (!isHostedAuthMessage(event.data)) {
196
+ return;
197
+ }
198
+ this.handleAuthEvent(event.data.type, event.data.detail);
199
+ };
200
+ handleAuthEvent(type, detail) {
201
+ if (!isHostedAuthEventPayload(detail) || !this.isAcceptedSource(detail.source)) {
202
+ return;
203
+ }
204
+ void this.handler?.({
205
+ type,
206
+ detail,
207
+ });
208
+ }
209
+ isAcceptedSource(source) {
210
+ return this.config.acceptAnySource || this.config.acceptedSources.includes(source);
211
+ }
212
+ isAcceptedOrigin(origin) {
213
+ if (this.config.acceptAnyOrigin || (this.config.acceptedOrigins ?? []).includes(origin)) {
214
+ return true;
215
+ }
216
+ return (this.config.requireSameOrigin &&
217
+ typeof window !== 'undefined' &&
218
+ origin === window.location.origin);
219
+ }
220
+ isAcceptedMessageSource(source) {
221
+ if (this.config.acceptAnyMessageSource) {
222
+ return true;
223
+ }
224
+ if (source && (this.config.acceptedMessageSources ?? []).includes(source)) {
225
+ return true;
226
+ }
227
+ if (this.trustedMessageSources.has(source)) {
228
+ return true;
229
+ }
230
+ return typeof window !== 'undefined' && (source === window || source === window.parent);
231
+ }
232
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthEventListenerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
233
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthEventListenerService, providedIn: 'root' });
234
+ }
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: HostedAuthEventListenerService, decorators: [{
236
+ type: Injectable,
237
+ args: [{ providedIn: 'root' }]
238
+ }] });
239
+ function provideHostedAuthEventHandler(handlerFactory, config = {}) {
240
+ return makeEnvironmentProviders([
241
+ {
242
+ provide: HOSTED_AUTH_EVENT_HANDLER,
243
+ useFactory: handlerFactory,
244
+ },
245
+ {
246
+ provide: HOSTED_AUTH_EVENT_LISTENER_CONFIG,
247
+ useValue: normalizeHostedAuthEventListenerConfig(config),
248
+ },
249
+ provideEnvironmentInitializer(() => inject(HostedAuthEventListenerService).start()),
250
+ ]);
251
+ }
252
+ function normalizeHostedAuthEventListenerConfig(config) {
253
+ return {
254
+ acceptedSources: config.acceptedSources ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedSources,
255
+ acceptAnySource: config.acceptAnySource ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnySource,
256
+ acceptedOrigins: config.acceptedOrigins ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedOrigins,
257
+ acceptAnyOrigin: config.acceptAnyOrigin ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnyOrigin,
258
+ acceptedMessageSources: config.acceptedMessageSources ??
259
+ DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedMessageSources,
260
+ acceptAnyMessageSource: config.acceptAnyMessageSource ??
261
+ DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnyMessageSource,
262
+ requireSameOrigin: config.requireSameOrigin ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.requireSameOrigin,
263
+ };
264
+ }
265
+ function createHostedAuthMessage(type, detail) {
266
+ return {
267
+ channel: HOSTED_AUTH_MESSAGE_CHANNEL,
268
+ version: HOSTED_AUTH_MESSAGE_VERSION,
269
+ type,
270
+ detail,
271
+ };
272
+ }
273
+ function getHostedAuthEventTypeFromWindowEventName(eventName) {
274
+ switch (eventName) {
275
+ case HOSTED_AUTH_WINDOW_EVENT_NAMES.AUTH_EXPIRED:
276
+ return 'AUTH_EXPIRED';
277
+ case HOSTED_AUTH_WINDOW_EVENT_NAMES.LOGOUT_REQUEST:
278
+ return 'LOGOUT_REQUEST';
279
+ default:
280
+ return null;
281
+ }
282
+ }
283
+ function isHostedAuthEventType(value) {
284
+ return value === 'AUTH_EXPIRED' || value === 'LOGOUT_REQUEST';
285
+ }
286
+ function isHostedAuthMessage(value) {
287
+ return (typeof value === 'object' &&
288
+ value !== null &&
289
+ value.channel === HOSTED_AUTH_MESSAGE_CHANNEL &&
290
+ value.version === HOSTED_AUTH_MESSAGE_VERSION &&
291
+ isHostedAuthEventType(value.type) &&
292
+ isHostedAuthEventPayload(value.detail));
293
+ }
294
+ function isHostedAuthEventPayload(value) {
295
+ return (typeof value === 'object' &&
296
+ value !== null &&
297
+ typeof value.source === 'string' &&
298
+ value.source.trim().length > 0 &&
299
+ isOptionalNumber(value.status) &&
300
+ isOptionalNullableString(value.url));
301
+ }
302
+ function isOptionalNumber(value) {
303
+ return value === undefined || (typeof value === 'number' && Number.isFinite(value));
304
+ }
305
+ function isOptionalNullableString(value) {
306
+ return value === undefined || value === null || typeof value === 'string';
307
+ }
308
+
309
+ /**
310
+ * platform-core-ng Auth 正式入口。
311
+ *
312
+ * 该入口拥有认证 Guard、Hosted Auth Event 与 Auth Token Reader,不依赖任何 UI 能力。
313
+ */
314
+
315
+ /**
316
+ * Generated bundle index. Do not edit.
317
+ */
318
+
319
+ export { AUTHENTICATED_STATE_GETTER, AuthTokenReaderPort, CORE_AUTH_GUARD_CONFIG, HOSTED_AUTH_EVENT_HANDLER, HOSTED_AUTH_EVENT_LISTENER_CONFIG, HOSTED_AUTH_MESSAGE_CHANNEL, HOSTED_AUTH_MESSAGE_VERSION, HOSTED_AUTH_WINDOW_EVENT_NAMES, HostedAuthBridgeService, HostedAuthEventListenerService, HostedAuthTrustedMessageSourceRegistry, coreAuthGuard, coreGuestOnlyGuard, provideAuthTokenReader, provideAuthenticatedStateGetter, provideCoreAuthGuardConfig, provideHostedAuthEventHandler };
320
+ //# sourceMappingURL=platform-core-ng-auth.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform-core-ng-auth.mjs","sources":["../../auth/src/auth-redirect.ts","../../auth/src/auth-token.port.ts","../../auth/src/auth.tokens.ts","../../auth/src/auth.guards.ts","../../auth/src/hosted-auth-events.ts","../../auth/public-api.ts","../../auth/platform-core-ng-auth.ts"],"sourcesContent":["// 保留 Angular Runtime 历史入口;真实策略由 platform-core-ts 唯一实现。\r\nexport {\r\n getSafeLoginRedirect,\r\n normalizeSafeInternalPath,\r\n resolveSafeRedirect,\r\n toSafeRedirectQueryParams,\r\n type SafeRedirectOptions,\r\n} from 'platform-core-ts';\r\n","import { makeEnvironmentProviders, type EnvironmentProviders, type Provider } from '@angular/core';\r\nimport {\r\n HTTP_AUTH_TOKEN_GETTER,\r\n type HttpAuthTokenGetter,\r\n} from 'platform-core-ng/http';\r\n\r\n/** 读取当前应用拥有的短期访问凭证。 */\r\nexport type AuthTokenReader = HttpAuthTokenGetter;\r\n\r\n/**\r\n * Auth 正式入口拥有的 Token Reader Port。\r\n *\r\n * 该 Token 与 HTTP 低层凭证读取 Port 分离,由 Provider 配方显式连接,避免 HTTP 反向读取会话服务。\r\n */\r\nexport abstract class AuthTokenReaderPort {\r\n /** 返回当前访问凭证;匿名或离线会话返回 null。 */\r\n abstract read(): string | null;\r\n}\r\n\r\n/**\r\n * 同时注册 Auth Token Reader 与 HTTP 低层适配器。\r\n *\r\n * @param readerFactory 创建 Auth Token Reader 的工厂\r\n * @returns 可加入应用配置的 EnvironmentProviders\r\n */\r\nexport function provideAuthTokenReader(\r\n readerFactory: () => AuthTokenReader,\r\n): EnvironmentProviders {\r\n const readerProvider: Provider = {\r\n provide: AuthTokenReaderPort,\r\n useFactory: () => {\r\n const reader = readerFactory();\r\n return { read: reader } satisfies AuthTokenReaderPort;\r\n },\r\n };\r\n\r\n return makeEnvironmentProviders([\r\n readerProvider,\r\n {\r\n provide: HTTP_AUTH_TOKEN_GETTER,\r\n useFactory: (port: AuthTokenReaderPort) => () => port.read(),\r\n deps: [AuthTokenReaderPort],\r\n },\r\n ]);\r\n}\r\n","import { InjectionToken, Provider } from '@angular/core';\r\n\r\n/** 读取当前平台会话是否已经认证。 */\r\nexport type AuthenticatedStateGetter = () => boolean;\r\n\r\nexport interface CoreAuthGuardConfig {\r\n readonly loginPath?: string;\r\n readonly authenticatedRedirectPath?: string;\r\n}\r\n\r\nexport const AUTHENTICATED_STATE_GETTER = new InjectionToken<AuthenticatedStateGetter>(\r\n 'AUTHENTICATED_STATE_GETTER',\r\n);\r\n\r\nexport const CORE_AUTH_GUARD_CONFIG = new InjectionToken<CoreAuthGuardConfig>(\r\n 'CORE_AUTH_GUARD_CONFIG',\r\n {\r\n factory: () => ({\r\n authenticatedRedirectPath: '/',\r\n loginPath: '/login',\r\n }),\r\n },\r\n);\r\n\r\nexport function provideAuthenticatedStateGetter(\r\n getterFactory: () => AuthenticatedStateGetter,\r\n): Provider {\r\n return {\r\n provide: AUTHENTICATED_STATE_GETTER,\r\n useFactory: getterFactory,\r\n };\r\n}\r\n\r\nexport function provideCoreAuthGuardConfig(config: CoreAuthGuardConfig): Provider {\r\n return {\r\n provide: CORE_AUTH_GUARD_CONFIG,\r\n useValue: config,\r\n };\r\n}\r\n","import { inject } from '@angular/core';\r\nimport { CanActivateFn, Router } from '@angular/router';\r\nimport { resolveSafeRedirect, toSafeRedirectQueryParams } from './auth-redirect';\r\nimport { AUTHENTICATED_STATE_GETTER, CORE_AUTH_GUARD_CONFIG } from './auth.tokens';\r\n\r\n/** 仅允许已认证会话进入,并保留安全的站内回跳地址。 */\r\nexport const coreAuthGuard: CanActivateFn = (_route, state) => {\r\n const isAuthenticated = inject(AUTHENTICATED_STATE_GETTER);\r\n const config = inject(CORE_AUTH_GUARD_CONFIG);\r\n const router = inject(Router);\r\n\r\n if (isAuthenticated()) {\r\n return true;\r\n }\r\n\r\n return router.createUrlTree([config.loginPath ?? '/login'], {\r\n queryParams: toSafeRedirectQueryParams(state.url, config.loginPath),\r\n });\r\n};\r\n\r\n/** 仅允许匿名会话进入登录等 Guest 页面。 */\r\nexport const coreGuestOnlyGuard: CanActivateFn = (route) => {\r\n const isAuthenticated = inject(AUTHENTICATED_STATE_GETTER);\r\n const config = inject(CORE_AUTH_GUARD_CONFIG);\r\n const router = inject(Router);\r\n\r\n if (!isAuthenticated()) {\r\n return true;\r\n }\r\n\r\n const redirect = resolveSafeRedirect(route.queryParamMap.get('redirect'), {\r\n fallbackPath: config.authenticatedRedirectPath,\r\n loginPath: config.loginPath,\r\n });\r\n return router.createUrlTree([redirect]);\r\n};\r\n","import type { HttpErrorResponse } from '@angular/common/http';\r\nimport {\r\n DestroyRef,\r\n inject,\r\n Injectable,\r\n InjectionToken,\r\n makeEnvironmentProviders,\r\n provideEnvironmentInitializer,\r\n type EnvironmentProviders,\r\n} from '@angular/core';\r\n\r\n/** Hosted 边界允许跨窗口传递的认证事件类型。 */\r\nexport type HostedAuthEventType = 'AUTH_EXPIRED' | 'LOGOUT_REQUEST';\r\n\r\nexport const HOSTED_AUTH_MESSAGE_CHANNEL = 'platform:auth';\r\nexport const HOSTED_AUTH_MESSAGE_VERSION = 1;\r\nexport const HOSTED_AUTH_WINDOW_EVENT_NAMES = {\r\n AUTH_EXPIRED: 'platform:auth:expired',\r\n LOGOUT_REQUEST: 'platform:auth:logout-request',\r\n} as const satisfies Record<HostedAuthEventType, string>;\r\n\r\nexport interface HostedAuthEventPayload {\r\n readonly source: string;\r\n readonly status?: number;\r\n readonly url?: string | null;\r\n}\r\n\r\nexport interface HostedAuthEvent {\r\n readonly type: HostedAuthEventType;\r\n readonly detail: HostedAuthEventPayload;\r\n}\r\n\r\nexport type HostedAuthEventHandler = (event: HostedAuthEvent) => void | Promise<void>;\r\n\r\nexport interface HostedAuthBridgeConfig {\r\n readonly targetOrigin?: string;\r\n}\r\n\r\nexport interface HostedAuthEventListenerConfig {\r\n readonly acceptedSources: readonly string[];\r\n readonly acceptAnySource: boolean;\r\n readonly acceptedOrigins: readonly string[];\r\n readonly acceptAnyOrigin: boolean;\r\n readonly acceptedMessageSources: readonly MessageEventSource[];\r\n readonly acceptAnyMessageSource: boolean;\r\n readonly requireSameOrigin: boolean;\r\n}\r\n\r\nexport interface HostedAuthEventListenerConfigInput {\r\n readonly acceptedSources?: readonly string[];\r\n readonly acceptAnySource?: boolean;\r\n readonly acceptedOrigins?: readonly string[];\r\n readonly acceptAnyOrigin?: boolean;\r\n readonly acceptedMessageSources?: readonly MessageEventSource[];\r\n readonly acceptAnyMessageSource?: boolean;\r\n readonly requireSameOrigin?: boolean;\r\n}\r\n\r\nexport interface HostedAuthMessage {\r\n readonly channel: typeof HOSTED_AUTH_MESSAGE_CHANNEL;\r\n readonly version: typeof HOSTED_AUTH_MESSAGE_VERSION;\r\n readonly type: HostedAuthEventType;\r\n readonly detail: HostedAuthEventPayload;\r\n}\r\n\r\nconst DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG: HostedAuthEventListenerConfig = {\r\n acceptedSources: [],\r\n acceptAnySource: false,\r\n acceptedOrigins: [],\r\n acceptAnyOrigin: false,\r\n acceptedMessageSources: [],\r\n acceptAnyMessageSource: false,\r\n requireSameOrigin: true,\r\n};\r\n\r\nexport const HOSTED_AUTH_EVENT_HANDLER = new InjectionToken<HostedAuthEventHandler | null>(\r\n 'HOSTED_AUTH_EVENT_HANDLER',\r\n {\r\n factory: () => null,\r\n },\r\n);\r\n\r\nexport const HOSTED_AUTH_EVENT_LISTENER_CONFIG = new InjectionToken<HostedAuthEventListenerConfig>(\r\n 'HOSTED_AUTH_EVENT_LISTENER_CONFIG',\r\n {\r\n factory: () => DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG,\r\n },\r\n);\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class HostedAuthTrustedMessageSourceRegistry {\r\n private readonly sources = new Set<MessageEventSource>();\r\n\r\n register(source: MessageEventSource | null | undefined): () => void {\r\n if (!source) {\r\n return () => undefined;\r\n }\r\n\r\n this.sources.add(source);\r\n return () => {\r\n this.sources.delete(source);\r\n };\r\n }\r\n\r\n has(source: MessageEventSource | null): boolean {\r\n return !!source && this.sources.has(source);\r\n }\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class HostedAuthBridgeService {\r\n emitAuthExpired(source: string, error?: HttpErrorResponse, config: HostedAuthBridgeConfig = {}): void {\r\n this.emit('AUTH_EXPIRED', {\r\n source,\r\n status: error?.status,\r\n url: error?.url ?? null,\r\n }, config);\r\n }\r\n\r\n emitLogoutRequest(source: string, config: HostedAuthBridgeConfig = {}): void {\r\n this.emit('LOGOUT_REQUEST', { source }, config);\r\n }\r\n\r\n emit(\r\n type: HostedAuthEventType,\r\n detail: HostedAuthEventPayload,\r\n config: HostedAuthBridgeConfig = {},\r\n ): void {\r\n if (typeof window === 'undefined') {\r\n return;\r\n }\r\n\r\n window.dispatchEvent(new CustomEvent(HOSTED_AUTH_WINDOW_EVENT_NAMES[type], { detail }));\r\n\r\n if (window.parent && window.parent !== window) {\r\n window.parent.postMessage(\r\n createHostedAuthMessage(type, detail),\r\n config.targetOrigin ?? window.location.origin,\r\n );\r\n }\r\n }\r\n}\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class HostedAuthEventListenerService {\r\n private readonly config = inject(HOSTED_AUTH_EVENT_LISTENER_CONFIG);\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly handler = inject(HOSTED_AUTH_EVENT_HANDLER);\r\n private readonly trustedMessageSources = inject(HostedAuthTrustedMessageSourceRegistry);\r\n private started = false;\r\n\r\n start(): void {\r\n if (this.started || typeof window === 'undefined') {\r\n return;\r\n }\r\n\r\n this.started = true;\r\n for (const eventName of Object.values(HOSTED_AUTH_WINDOW_EVENT_NAMES)) {\r\n window.addEventListener(eventName, this.handleWindowAuthEvent);\r\n }\r\n window.addEventListener('message', this.handlePostMessage);\r\n this.destroyRef.onDestroy(() => this.stop());\r\n }\r\n\r\n stop(): void {\r\n if (!this.started || typeof window === 'undefined') {\r\n return;\r\n }\r\n\r\n this.started = false;\r\n for (const eventName of Object.values(HOSTED_AUTH_WINDOW_EVENT_NAMES)) {\r\n window.removeEventListener(eventName, this.handleWindowAuthEvent);\r\n }\r\n window.removeEventListener('message', this.handlePostMessage);\r\n }\r\n\r\n private readonly handleWindowAuthEvent = (event: Event): void => {\r\n const type = getHostedAuthEventTypeFromWindowEventName(event.type);\r\n if (!(event instanceof CustomEvent) || !type) {\r\n return;\r\n }\r\n\r\n this.handleAuthEvent(type, event.detail);\r\n };\r\n\r\n private readonly handlePostMessage = (event: MessageEvent): void => {\r\n if (!this.isAcceptedOrigin(event.origin) || !this.isAcceptedMessageSource(event.source)) {\r\n return;\r\n }\r\n\r\n if (!isHostedAuthMessage(event.data)) {\r\n return;\r\n }\r\n\r\n this.handleAuthEvent(event.data.type, event.data.detail);\r\n };\r\n\r\n private handleAuthEvent(type: HostedAuthEventType, detail: unknown): void {\r\n if (!isHostedAuthEventPayload(detail) || !this.isAcceptedSource(detail.source)) {\r\n return;\r\n }\r\n\r\n void this.handler?.({\r\n type,\r\n detail,\r\n });\r\n }\r\n\r\n private isAcceptedSource(source: string): boolean {\r\n return this.config.acceptAnySource || this.config.acceptedSources.includes(source);\r\n }\r\n\r\n private isAcceptedOrigin(origin: string): boolean {\r\n if (this.config.acceptAnyOrigin || (this.config.acceptedOrigins ?? []).includes(origin)) {\r\n return true;\r\n }\r\n\r\n return (\r\n this.config.requireSameOrigin &&\r\n typeof window !== 'undefined' &&\r\n origin === window.location.origin\r\n );\r\n }\r\n\r\n private isAcceptedMessageSource(source: MessageEventSource | null): boolean {\r\n if (this.config.acceptAnyMessageSource) {\r\n return true;\r\n }\r\n\r\n if (source && (this.config.acceptedMessageSources ?? []).includes(source)) {\r\n return true;\r\n }\r\n\r\n if (this.trustedMessageSources.has(source)) {\r\n return true;\r\n }\r\n\r\n return typeof window !== 'undefined' && (source === window || source === window.parent);\r\n }\r\n}\r\n\r\nexport function provideHostedAuthEventHandler(\r\n handlerFactory: () => HostedAuthEventHandler,\r\n config: HostedAuthEventListenerConfigInput = {},\r\n): EnvironmentProviders {\r\n return makeEnvironmentProviders([\r\n {\r\n provide: HOSTED_AUTH_EVENT_HANDLER,\r\n useFactory: handlerFactory,\r\n },\r\n {\r\n provide: HOSTED_AUTH_EVENT_LISTENER_CONFIG,\r\n useValue: normalizeHostedAuthEventListenerConfig(config),\r\n },\r\n provideEnvironmentInitializer(() => inject(HostedAuthEventListenerService).start()),\r\n ]);\r\n}\r\n\r\nfunction normalizeHostedAuthEventListenerConfig(\r\n config: HostedAuthEventListenerConfigInput,\r\n): HostedAuthEventListenerConfig {\r\n return {\r\n acceptedSources: config.acceptedSources ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedSources,\r\n acceptAnySource: config.acceptAnySource ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnySource,\r\n acceptedOrigins: config.acceptedOrigins ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedOrigins,\r\n acceptAnyOrigin: config.acceptAnyOrigin ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnyOrigin,\r\n acceptedMessageSources:\r\n config.acceptedMessageSources ??\r\n DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptedMessageSources,\r\n acceptAnyMessageSource:\r\n config.acceptAnyMessageSource ??\r\n DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.acceptAnyMessageSource,\r\n requireSameOrigin: config.requireSameOrigin ?? DEFAULT_HOSTED_AUTH_EVENT_LISTENER_CONFIG.requireSameOrigin,\r\n };\r\n}\r\n\r\nfunction createHostedAuthMessage(\r\n type: HostedAuthEventType,\r\n detail: HostedAuthEventPayload,\r\n): HostedAuthMessage {\r\n return {\r\n channel: HOSTED_AUTH_MESSAGE_CHANNEL,\r\n version: HOSTED_AUTH_MESSAGE_VERSION,\r\n type,\r\n detail,\r\n };\r\n}\r\n\r\nfunction getHostedAuthEventTypeFromWindowEventName(\r\n eventName: string,\r\n): HostedAuthEventType | null {\r\n switch (eventName) {\r\n case HOSTED_AUTH_WINDOW_EVENT_NAMES.AUTH_EXPIRED:\r\n return 'AUTH_EXPIRED';\r\n case HOSTED_AUTH_WINDOW_EVENT_NAMES.LOGOUT_REQUEST:\r\n return 'LOGOUT_REQUEST';\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\nfunction isHostedAuthEventType(value: unknown): value is HostedAuthEventType {\r\n return value === 'AUTH_EXPIRED' || value === 'LOGOUT_REQUEST';\r\n}\r\n\r\nfunction isHostedAuthMessage(value: unknown): value is HostedAuthMessage {\r\n return (\r\n typeof value === 'object' &&\r\n value !== null &&\r\n (value as HostedAuthMessage).channel === HOSTED_AUTH_MESSAGE_CHANNEL &&\r\n (value as HostedAuthMessage).version === HOSTED_AUTH_MESSAGE_VERSION &&\r\n isHostedAuthEventType((value as HostedAuthMessage).type) &&\r\n isHostedAuthEventPayload((value as HostedAuthMessage).detail)\r\n );\r\n}\r\n\r\nfunction isHostedAuthEventPayload(value: unknown): value is HostedAuthEventPayload {\r\n return (\r\n typeof value === 'object' &&\r\n value !== null &&\r\n typeof (value as HostedAuthEventPayload).source === 'string' &&\r\n (value as HostedAuthEventPayload).source.trim().length > 0 &&\r\n isOptionalNumber((value as HostedAuthEventPayload).status) &&\r\n isOptionalNullableString((value as HostedAuthEventPayload).url)\r\n );\r\n}\r\n\r\nfunction isOptionalNumber(value: unknown): value is number | undefined {\r\n return value === undefined || (typeof value === 'number' && Number.isFinite(value));\r\n}\r\n\r\nfunction isOptionalNullableString(value: unknown): value is string | null | undefined {\r\n return value === undefined || value === null || typeof value === 'string';\r\n}\r\n","/**\r\n * platform-core-ng Auth 正式入口。\r\n *\r\n * 该入口拥有认证 Guard、Hosted Auth Event 与 Auth Token Reader,不依赖任何 UI 能力。\r\n */\r\nexport * from './src';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;ACSA;;;;AAIG;MACmB,mBAAmB,CAAA;AAGxC;AAED;;;;;AAKG;AACG,SAAU,sBAAsB,CACpC,aAAoC,EAAA;AAEpC,IAAA,MAAM,cAAc,GAAa;AAC/B,QAAA,OAAO,EAAE,mBAAmB;QAC5B,UAAU,EAAE,MAAK;AACf,YAAA,MAAM,MAAM,GAAG,aAAa,EAAE;AAC9B,YAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAgC;QACvD,CAAC;KACF;AAED,IAAA,OAAO,wBAAwB,CAAC;QAC9B,cAAc;AACd,QAAA;AACE,YAAA,OAAO,EAAE,sBAAsB;AAC/B,YAAA,UAAU,EAAE,CAAC,IAAyB,KAAK,MAAM,IAAI,CAAC,IAAI,EAAE;YAC5D,IAAI,EAAE,CAAC,mBAAmB,CAAC;AAC5B,SAAA;AACF,KAAA,CAAC;AACJ;;MClCa,0BAA0B,GAAG,IAAI,cAAc,CAC1D,4BAA4B;MAGjB,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB,EACxB;AACE,IAAA,OAAO,EAAE,OAAO;AACd,QAAA,yBAAyB,EAAE,GAAG;AAC9B,QAAA,SAAS,EAAE,QAAQ;KACpB,CAAC;AACH,CAAA;AAGG,SAAU,+BAA+B,CAC7C,aAA6C,EAAA;IAE7C,OAAO;AACL,QAAA,OAAO,EAAE,0BAA0B;AACnC,QAAA,UAAU,EAAE,aAAa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qBAAqB,CAAC,KAAc,EAAA;AAC3C,IAAA,OAAO,KAAK,KAAK,cAAc,IAAI,KAAK,KAAK,gBAAgB;AAC/D;AAEA,SAAS,mBAAmB,CAAC,KAAc,EAAA;AACzC,IAAA,QACE,OAAO,KAAK,KAAK,QAAQ;AACzB,QAAA,KAAK,KAAK,IAAI;QACb,KAA2B,CAAC,OAAO,KAAK,2BAA2B;QACnE,KAA2B,CAAC,OAAO,KAAK,2BAA2B;AACpE,QAAA,qBAAqB,CAAE,KAA2B,CAAC,IAAI,CAAC;AACxD,QAAA,wBAAwB,CAAE,KAA2B,CAAC,MAAM,CAAC;AAEjE;AAEA,SAAS,wBAAwB,CAAC,KAAc,EAAA;AAC9C,IAAA,QACE,OAAO,KAAK,KAAK,QAAQ;AACzB,QAAA,KAAK,KAAK,IAAI;AACd,QAAA,OAAQ,KAAgC,CAAC,MAAM,KAAK,QAAQ;QAC3D,KAAgC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;AAC1D,QAAA,gBAAgB,CAAE,KAAgC,CAAC,MAAM,CAAC;AAC1D,QAAA,wBAAwB,CAAE,KAAgC,CAAC,GAAG,CAAC;AAEnE;AAEA,SAAS,gBAAgB,CAAC,KAAc,EAAA;AACtC,IAAA,OAAO,KAAK,KAAK,SAAS,KAAK,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACrF;AAEA,SAAS,wBAAwB,CAAC,KAAc,EAAA;AAC9C,IAAA,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;AAC3E;;AC7UA;;;;AAIG;;ACJH;;AAEG;;;;"}
@@ -1,6 +1,11 @@
1
- export { Card } from 'platform-core-ng';
1
+ export { Card } from 'platform-core-ng/ui/common';
2
2
 
3
- /** 兼容现有 platform-core-ng/card 导入。 */
3
+ /**
4
+ * 兼容现有 `platform-core-ng/card` 导入。
5
+ *
6
+ * @deprecated 自 22.4.0-rc.0 起改用 `platform-core-ng/ui/common`;最早在 23.0.0
7
+ * 且外部消费者清零后删除。
8
+ */
4
9
 
5
10
  /**
6
11
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"platform-core-ng-card.mjs","sources":["../../card/public-api.ts","../../card/platform-core-ng-card.ts"],"sourcesContent":["/** 兼容现有 platform-core-ng/card 导入。 */\r\nexport {\r\n Card,\r\n type CardActionEvent,\r\n type CardIconAction,\r\n type CardMenuItem,\r\n} from 'platform-core-ng';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;ACAA;;AAEG"}
1
+ {"version":3,"file":"platform-core-ng-card.mjs","sources":["../../card/public-api.ts","../../card/platform-core-ng-card.ts"],"sourcesContent":["/**\r\n * 兼容现有 `platform-core-ng/card` 导入。\r\n *\r\n * @deprecated 自 22.4.0-rc.0 起改用 `platform-core-ng/ui/common`;最早在 23.0.0\r\n * 且外部消费者清零后删除。\r\n */\r\nexport {\r\n Card,\r\n type CardActionEvent,\r\n type CardIconAction,\r\n type CardMenuItem,\r\n} from 'platform-core-ng/ui/common';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;;ACLH;;AAEG"}
@@ -5,6 +5,10 @@ export { APP_RUNTIME_CONTEXT, APP_RUNTIME_USER_PROFILE_METADATA_KEY, AUTHENTICAT
5
5
  *
6
6
  * 这里显式从主入口重导出 core API,既维持原有子路径契约,也避免在多个
7
7
  * FESM 中重复创建 InjectionToken、服务和异常类型。
8
+ *
9
+ * @deprecated 自 22.4.0-rc.0 起停止用于新代码。请按能力改用 `/runtime`、`/auth`、
10
+ * `/http`、`/permission`、`/feedback`、`/overlay`、`/providers` 或 `/ui/*`;最早在 23.0.0
11
+ * 且外部消费者清零后删除。
8
12
  */
9
13
 
10
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"platform-core-ng-core.mjs","sources":["../../core/public-api.ts","../../core/platform-core-ng-core.ts"],"sourcesContent":["/**\r\n * Angular 平台基础能力的兼容二级入口。\r\n *\r\n * 这里显式从主入口重导出 core API,既维持原有子路径契约,也避免在多个\r\n * FESM 中重复创建 InjectionToken、服务和异常类型。\r\n */\r\nexport {\r\n APP_RUNTIME_CONTEXT,\r\n APP_RUNTIME_USER_PROFILE_METADATA_KEY,\r\n type AppRuntimeContext,\r\n type AppRuntimeExtraProvider,\r\n type AppRuntimeHost,\r\n type AppRuntimeProviders,\r\n type AppRuntimeUserProfile,\r\n AUTHENTICATED_STATE_GETTER,\r\n type AuthenticatedStateGetter,\r\n BaseListComponent,\r\n BrowserPlatformDownloadService,\r\n ConsolePlatformLogger,\r\n CORE_AUTH_GUARD_CONFIG,\r\n coreAuthGuard,\r\n type CoreAuthGuardConfig,\r\n coreGuestOnlyGuard,\r\n createAppRuntimeProviders,\r\n type CreateAppRuntimeProvidersOptions,\r\n decreaseLoading,\r\n DEFAULT_APP_RUNTIME_CONTEXT,\r\n DEFAULT_HTTP_RESPONSE_INTERCEPTOR_CONFIG,\r\n ElectronRequest,\r\n EMBEDDED_RUNTIME_CAPABILITIES,\r\n getSafeLoginRedirect,\r\n GlobalErrorHandler,\r\n HasPermissionDirective,\r\n type HasPermissionMode,\r\n HOSTED_AUTH_EVENT_HANDLER,\r\n HOSTED_AUTH_EVENT_LISTENER_CONFIG,\r\n HOSTED_AUTH_MESSAGE_CHANNEL,\r\n HOSTED_AUTH_MESSAGE_VERSION,\r\n HOSTED_AUTH_WINDOW_EVENT_NAMES,\r\n HOSTED_RUNTIME_CAPABILITIES,\r\n HOSTED_WORKSPACE_VIEWPORTS,\r\n type HostedAppConfig,\r\n type HostedAppOptions,\r\n type HostedAppRuntimeConfig,\r\n type HostedAppRuntimeMode,\r\n type HostedAuthBridgeConfig,\r\n HostedAuthBridgeService,\r\n type HostedAuthEvent,\r\n type HostedAuthEventHandler,\r\n type HostedAuthEventListenerConfig,\r\n type HostedAuthEventListenerConfigInput,\r\n HostedAuthEventListenerService,\r\n type HostedAuthEventPayload,\r\n type HostedAuthEventType,\r\n type HostedAuthMessage,\r\n HostedAuthTrustedMessageSourceRegistry,\r\n type HostedWorkspaceBreadcrumbViewportRegistration,\r\n type HostedWorkspaceIntegrationMode,\r\n type HostedWorkspaceShellViewportRegistration,\r\n type HostedWorkspaceViewportRegistration,\r\n RuntimeSessionReaderService,\r\n type RuntimeSessionRecord,\r\n HTTP_AUTH_TOKEN_GETTER,\r\n HTTP_CONFIG,\r\n HTTP_RESPONSE_INTERCEPTOR_CONFIG,\r\n HTTP_SKIP_AUTH,\r\n HTTP_SUCCESS_MESSAGE,\r\n HTTP_UNAUTHORIZED_HANDLER,\r\n type HttpAuthTokenGetter,\r\n HttpConfig,\r\n type HttpResponseInterceptorConfig,\r\n type HttpResponseInterceptorConfigInput,\r\n type HttpSuccessMessageInput,\r\n type HttpSuccessMessageOptions,\r\n HttpUnauthorizedException,\r\n type HttpUnauthorizedHandler,\r\n increaseLoading,\r\n isLoading,\r\n LoggingPlatformAuditLogger,\r\n type MobileRouteTransitionContext,\r\n type MobileRouteTransitionDirection,\r\n type MobileRouteTransitionForwardEnterFrom,\r\n type MobileRouteTransitionOptions,\r\n type MobileRouteTransitionRouteContext,\r\n normalizeRuntimeContext,\r\n normalizeSafeInternalPath,\r\n type OptionalPermissionInput,\r\n Outlets,\r\n type PermissionDeniedMode,\r\n type PermissionInput,\r\n type PermissionMatchMode,\r\n PermissionService,\r\n PLATFORM_AUDIT_ACTIONS,\r\n type PlatformAuditEvent,\r\n PlatformAuditLogger,\r\n type PlatformAuditRecordDetails,\r\n type PlatformAuditRecordInput,\r\n type PlatformAuditResult,\r\n PlatformAuditService,\r\n type PlatformDataScope,\r\n type PlatformDownloadOptions,\r\n type PlatformDownloadResult,\r\n PlatformDownloadService,\r\n type PlatformFeedbackContext,\r\n type PlatformFeedbackGovernanceEvent,\r\n type PlatformFeedbackGovernanceEventType,\r\n type PlatformFeedbackGovernanceReason,\r\n type PlatformFeedbackGovernanceReporter,\r\n type PlatformFeedbackHandle,\r\n type PlatformFeedbackHostMatch,\r\n type PlatformFeedbackHostRegistration,\r\n PlatformFeedbackHostRegistry,\r\n type PlatformFeedbackHostRegistryListener,\r\n type PlatformFeedbackHostSelection,\r\n PlatformFeedbackHostController,\r\n type PlatformFeedbackHostControllerOptions,\r\n type PlatformFeedbackHostItem,\r\n type PlatformFeedbackHostSnapshot,\r\n type PlatformFeedbackHostSnapshotListener,\r\n type PlatformFeedbackHostSnapshotUnsubscribe,\r\n type PlatformFeedbackHostUnregister,\r\n type PlatformFeedbackActionShowOptions,\r\n type PlatformFeedbackPassiveShowOptions,\r\n type PlatformFeedbackRouterGovernanceEvent,\r\n type PlatformFeedbackRouterGovernanceEventType,\r\n type PlatformFeedbackRouterGovernanceReporter,\r\n type PlatformFeedbackRouterOptions,\r\n PlatformFeedbackRouter,\r\n type PlatformFeedbackScheduler,\r\n PlatformFeedbackService,\r\n PlatformFeedbackMobileSnackbarRenderer,\r\n PlatformFeedbackPcMessageRenderer,\r\n type PlatformFeedbackScopeOptions,\r\n type PlatformFeedbackShowOptions,\r\n type PlatformFeedbackShowOptionsBase,\r\n type PlatformFeedbackTargetGovernanceEvent,\r\n type PlatformFeedbackTargetNormalizationFailure,\r\n type PlatformFeedbackTargetNormalizationResult,\r\n type PlatformFeedbackTargetNormalized,\r\n type PlatformFeedbackTargetRejected,\r\n type PlatformTransientFeedbackRequest,\r\n PLATFORM_FEEDBACK_CURRENT_CAPACITY,\r\n PLATFORM_FEEDBACK_PENDING_CAPACITY,\r\n PLATFORM_FEEDBACK_ROUTER_OPTIONS,\r\n type PlatformHostedAppConfig,\r\n PlatformLogger,\r\n platformPermissionCanMatch,\r\n type PlatformPermissionContext,\r\n type PlatformRuntimeCapabilities,\r\n type PlatformRuntimeMode,\r\n provideAuthenticatedStateGetter,\r\n provideCoreAuthGuardConfig,\r\n provideGlobalErrorHandler,\r\n provideHostedAuthEventHandler,\r\n provideHttpAuthTokenGetter,\r\n provideHttpConfig,\r\n provideHttpResponseInterceptorConfig,\r\n provideHttpUnauthorizedHandler,\r\n provideMobileRouteTransitionRuntime,\r\n provideMobileRouteTransitions,\r\n providePermissionContext,\r\n providePlatformAuditLogger,\r\n providePlatformDownloadService,\r\n providePlatformFeedbackRouterOptions,\r\n providePlatformFeedbackScope,\r\n providePlatformHostedApp,\r\n providePlatformLogger,\r\n provideRuntimeContext,\r\n requestInterceptor,\r\n createPlatformFeedbackOwnerKey,\r\n normalizePlatformFeedbackTarget,\r\n registerPlatformFeedbackHostController,\r\n resolvePlatformFeedbackAccessibility,\r\n resolvePlatformFeedbackDuration,\r\n type ResolvedPlatformFeedbackAccessibility,\r\n type RequiredPermissions,\r\n resolveSafeRedirect,\r\n responseInterceptor,\r\n RuntimeService,\r\n type SafeRedirectOptions,\r\n STANDALONE_RUNTIME_CAPABILITIES,\r\n type StandaloneAppOptions,\r\n syncPlatformScrollbarStyles,\r\n type SyncPlatformScrollbarStylesOptions,\r\n syncPlatformScrollbarStylesToIframe,\r\n ThrowException,\r\n toSafeRedirectQueryParams,\r\n withHttpSuccessMessage,\r\n withoutHttpAuth,\r\n withoutHttpSuccessMessage,\r\n type WorkspaceRefreshable,\r\n WORKSPACE_APPLICATION_HOST,\r\n type WorkspaceApplicationHostCapability,\r\n WORKSPACE_APPLICATION_HOST_CONTROLLER,\r\n type WorkspaceApplicationHostController,\r\n type WorkspaceApplicationHostScopeOptions,\r\n type WorkspaceApplicationLifecycleSnapshot,\r\n WorkspaceApplicationLifecycleRegistry,\r\n type WorkspaceApplicationLifecycleUnregister,\r\n type WorkspaceApplicationScopeBinding,\r\n type WorkspaceApplicationScopeRegistration,\r\n provideWorkspaceApplicationHostScope,\r\n registerWorkspaceApplicationLifecycleParticipant,\r\n} from 'platform-core-ng';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;AAKG;;ACLH;;AAEG"}
1
+ {"version":3,"file":"platform-core-ng-core.mjs","sources":["../../core/public-api.ts","../../core/platform-core-ng-core.ts"],"sourcesContent":["/**\r\n * Angular 平台基础能力的兼容二级入口。\r\n *\r\n * 这里显式从主入口重导出 core API,既维持原有子路径契约,也避免在多个\r\n * FESM 中重复创建 InjectionToken、服务和异常类型。\r\n *\r\n * @deprecated 自 22.4.0-rc.0 起停止用于新代码。请按能力改用 `/runtime`、`/auth`、\r\n * `/http`、`/permission`、`/feedback`、`/overlay`、`/providers` 或 `/ui/*`;最早在 23.0.0\r\n * 且外部消费者清零后删除。\r\n */\r\nexport {\r\n APP_RUNTIME_CONTEXT,\r\n APP_RUNTIME_USER_PROFILE_METADATA_KEY,\r\n type AppRuntimeContext,\r\n type AppRuntimeExtraProvider,\r\n type AppRuntimeHost,\r\n type AppRuntimeProviders,\r\n type AppRuntimeUserProfile,\r\n AUTHENTICATED_STATE_GETTER,\r\n type AuthenticatedStateGetter,\r\n BaseListComponent,\r\n BrowserPlatformDownloadService,\r\n ConsolePlatformLogger,\r\n CORE_AUTH_GUARD_CONFIG,\r\n coreAuthGuard,\r\n type CoreAuthGuardConfig,\r\n coreGuestOnlyGuard,\r\n createAppRuntimeProviders,\r\n type CreateAppRuntimeProvidersOptions,\r\n decreaseLoading,\r\n DEFAULT_APP_RUNTIME_CONTEXT,\r\n DEFAULT_HTTP_RESPONSE_INTERCEPTOR_CONFIG,\r\n ElectronRequest,\r\n EMBEDDED_RUNTIME_CAPABILITIES,\r\n getSafeLoginRedirect,\r\n GlobalErrorHandler,\r\n HasPermissionDirective,\r\n type HasPermissionMode,\r\n HOSTED_AUTH_EVENT_HANDLER,\r\n HOSTED_AUTH_EVENT_LISTENER_CONFIG,\r\n HOSTED_AUTH_MESSAGE_CHANNEL,\r\n HOSTED_AUTH_MESSAGE_VERSION,\r\n HOSTED_AUTH_WINDOW_EVENT_NAMES,\r\n HOSTED_RUNTIME_CAPABILITIES,\r\n HOSTED_WORKSPACE_VIEWPORTS,\r\n type HostedAppConfig,\r\n type HostedAppOptions,\r\n type HostedAppRuntimeConfig,\r\n type HostedAppRuntimeMode,\r\n type HostedAuthBridgeConfig,\r\n HostedAuthBridgeService,\r\n type HostedAuthEvent,\r\n type HostedAuthEventHandler,\r\n type HostedAuthEventListenerConfig,\r\n type HostedAuthEventListenerConfigInput,\r\n HostedAuthEventListenerService,\r\n type HostedAuthEventPayload,\r\n type HostedAuthEventType,\r\n type HostedAuthMessage,\r\n HostedAuthTrustedMessageSourceRegistry,\r\n type HostedWorkspaceBreadcrumbViewportRegistration,\r\n type HostedWorkspaceIntegrationMode,\r\n type HostedWorkspaceShellViewportRegistration,\r\n type HostedWorkspaceViewportRegistration,\r\n RuntimeSessionReaderService,\r\n type RuntimeSessionRecord,\r\n HTTP_AUTH_TOKEN_GETTER,\r\n HTTP_CONFIG,\r\n HTTP_RESPONSE_INTERCEPTOR_CONFIG,\r\n HTTP_SKIP_AUTH,\r\n HTTP_SUCCESS_MESSAGE,\r\n HTTP_UNAUTHORIZED_HANDLER,\r\n type HttpAuthTokenGetter,\r\n HttpConfig,\r\n type HttpResponseInterceptorConfig,\r\n type HttpResponseInterceptorConfigInput,\r\n type HttpSuccessMessageInput,\r\n type HttpSuccessMessageOptions,\r\n HttpUnauthorizedException,\r\n type HttpUnauthorizedHandler,\r\n increaseLoading,\r\n isLoading,\r\n LoggingPlatformAuditLogger,\r\n type MobileRouteTransitionContext,\r\n type MobileRouteTransitionDirection,\r\n type MobileRouteTransitionForwardEnterFrom,\r\n type MobileRouteTransitionOptions,\r\n type MobileRouteTransitionRouteContext,\r\n normalizeRuntimeContext,\r\n normalizeSafeInternalPath,\r\n type OptionalPermissionInput,\r\n Outlets,\r\n type PermissionDeniedMode,\r\n type PermissionInput,\r\n type PermissionMatchMode,\r\n PermissionService,\r\n PLATFORM_AUDIT_ACTIONS,\r\n type PlatformAuditEvent,\r\n PlatformAuditLogger,\r\n type PlatformAuditRecordDetails,\r\n type PlatformAuditRecordInput,\r\n type PlatformAuditResult,\r\n PlatformAuditService,\r\n type PlatformDataScope,\r\n type PlatformDownloadOptions,\r\n type PlatformDownloadResult,\r\n PlatformDownloadService,\r\n type PlatformFeedbackContext,\r\n type PlatformFeedbackGovernanceEvent,\r\n type PlatformFeedbackGovernanceEventType,\r\n type PlatformFeedbackGovernanceReason,\r\n type PlatformFeedbackGovernanceReporter,\r\n type PlatformFeedbackHandle,\r\n type PlatformFeedbackHostMatch,\r\n type PlatformFeedbackHostRegistration,\r\n PlatformFeedbackHostRegistry,\r\n type PlatformFeedbackHostRegistryListener,\r\n type PlatformFeedbackHostSelection,\r\n PlatformFeedbackHostController,\r\n type PlatformFeedbackHostControllerOptions,\r\n type PlatformFeedbackHostItem,\r\n type PlatformFeedbackHostSnapshot,\r\n type PlatformFeedbackHostSnapshotListener,\r\n type PlatformFeedbackHostSnapshotUnsubscribe,\r\n type PlatformFeedbackHostUnregister,\r\n type PlatformFeedbackActionShowOptions,\r\n type PlatformFeedbackPassiveShowOptions,\r\n type PlatformFeedbackRouterGovernanceEvent,\r\n type PlatformFeedbackRouterGovernanceEventType,\r\n type PlatformFeedbackRouterGovernanceReporter,\r\n type PlatformFeedbackRouterOptions,\r\n PlatformFeedbackRouter,\r\n type PlatformFeedbackScheduler,\r\n PlatformFeedbackService,\r\n PlatformFeedbackMobileSnackbarRenderer,\r\n PlatformFeedbackPcMessageRenderer,\r\n type PlatformFeedbackScopeOptions,\r\n type PlatformFeedbackShowOptions,\r\n type PlatformFeedbackShowOptionsBase,\r\n type PlatformFeedbackTargetGovernanceEvent,\r\n type PlatformFeedbackTargetNormalizationFailure,\r\n type PlatformFeedbackTargetNormalizationResult,\r\n type PlatformFeedbackTargetNormalized,\r\n type PlatformFeedbackTargetRejected,\r\n type PlatformTransientFeedbackRequest,\r\n PLATFORM_FEEDBACK_CURRENT_CAPACITY,\r\n PLATFORM_FEEDBACK_PENDING_CAPACITY,\r\n PLATFORM_FEEDBACK_ROUTER_OPTIONS,\r\n type PlatformHostedAppConfig,\r\n PlatformLogger,\r\n platformPermissionCanMatch,\r\n type PlatformPermissionContext,\r\n type PlatformRuntimeCapabilities,\r\n type PlatformRuntimeMode,\r\n provideAuthenticatedStateGetter,\r\n provideCoreAuthGuardConfig,\r\n provideGlobalErrorHandler,\r\n provideHostedAuthEventHandler,\r\n provideHttpAuthTokenGetter,\r\n provideHttpConfig,\r\n provideHttpResponseInterceptorConfig,\r\n provideHttpUnauthorizedHandler,\r\n provideMobileRouteTransitionRuntime,\r\n provideMobileRouteTransitions,\r\n providePermissionContext,\r\n providePlatformAuditLogger,\r\n providePlatformDownloadService,\r\n providePlatformFeedbackRouterOptions,\r\n providePlatformFeedbackScope,\r\n providePlatformHostedApp,\r\n providePlatformLogger,\r\n provideRuntimeContext,\r\n requestInterceptor,\r\n createPlatformFeedbackOwnerKey,\r\n normalizePlatformFeedbackTarget,\r\n registerPlatformFeedbackHostController,\r\n resolvePlatformFeedbackAccessibility,\r\n resolvePlatformFeedbackDuration,\r\n type ResolvedPlatformFeedbackAccessibility,\r\n type RequiredPermissions,\r\n resolveSafeRedirect,\r\n responseInterceptor,\r\n RuntimeService,\r\n type SafeRedirectOptions,\r\n STANDALONE_RUNTIME_CAPABILITIES,\r\n type StandaloneAppOptions,\r\n syncPlatformScrollbarStyles,\r\n type SyncPlatformScrollbarStylesOptions,\r\n syncPlatformScrollbarStylesToIframe,\r\n ThrowException,\r\n toSafeRedirectQueryParams,\r\n withHttpSuccessMessage,\r\n withoutHttpAuth,\r\n withoutHttpSuccessMessage,\r\n type WorkspaceRefreshable,\r\n WORKSPACE_APPLICATION_HOST,\r\n type WorkspaceApplicationHostCapability,\r\n WORKSPACE_APPLICATION_HOST_CONTROLLER,\r\n type WorkspaceApplicationHostController,\r\n type WorkspaceApplicationHostScopeOptions,\r\n type WorkspaceApplicationLifecycleSnapshot,\r\n WorkspaceApplicationLifecycleRegistry,\r\n type WorkspaceApplicationLifecycleUnregister,\r\n type WorkspaceApplicationScopeBinding,\r\n type WorkspaceApplicationScopeRegistration,\r\n provideWorkspaceApplicationHostScope,\r\n registerWorkspaceApplicationLifecycleParticipant,\r\n} from 'platform-core-ng';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;AASG;;ACTH;;AAEG"}