@das-fed/upf-utils 6.4.0-dev.247 → 6.4.0-dev.249

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 (51) hide show
  1. package/api-services/modules/app-manage/es5.js +1079 -1088
  2. package/api-services/modules/app-manage/index.js +883 -897
  3. package/api-services/modules/app-manage/index.js.gz +0 -0
  4. package/api-services/modules/contract/es5.js +1114 -1102
  5. package/api-services/modules/contract/index.js +920 -902
  6. package/api-services/modules/contract/index.js.gz +0 -0
  7. package/api-services/modules/enterpriseright/es5.js +1114 -1102
  8. package/api-services/modules/enterpriseright/index.js +920 -902
  9. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  10. package/api-services/modules/es5.js +1319 -1328
  11. package/api-services/modules/gateway-edge/es5.js +1088 -1079
  12. package/api-services/modules/gateway-edge/index.js +897 -883
  13. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  14. package/api-services/modules/index.js +1032 -1046
  15. package/api-services/modules/index.js.gz +0 -0
  16. package/api-services/modules/justauth/es5.js +1104 -1116
  17. package/api-services/modules/justauth/index.js +903 -921
  18. package/api-services/modules/justauth/index.js.gz +0 -0
  19. package/api-services/modules/link/es5.js +1102 -1114
  20. package/api-services/modules/link/index.js +902 -920
  21. package/api-services/modules/link/index.js.gz +0 -0
  22. package/api-services/modules/platformManage/es5.js +1144 -1132
  23. package/api-services/modules/platformManage/index.js +953 -935
  24. package/api-services/modules/platformManage/index.js.gz +0 -0
  25. package/api-services/modules/portal/es5.js +1102 -1114
  26. package/api-services/modules/portal/index.js +902 -920
  27. package/api-services/modules/portal/index.js.gz +0 -0
  28. package/api-services/modules/supplychain-manage/es5.js +1102 -1114
  29. package/api-services/modules/supplychain-manage/index.js +902 -920
  30. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  31. package/api-services/modules/tool/es5.js +1102 -1114
  32. package/api-services/modules/tool/index.js +902 -920
  33. package/api-services/modules/tool/index.js.gz +0 -0
  34. package/common-info/es5.js +1257 -1248
  35. package/common-info/index.js +1040 -1026
  36. package/common-info/index.js.gz +0 -0
  37. package/common-tools/timezone-format/es5.js +315 -283
  38. package/common-tools/timezone-format/index.js +262 -204
  39. package/common-tools/timezone-format/index.js.gz +0 -0
  40. package/create-api-service/es5.js +1078 -1090
  41. package/create-api-service/index.js +887 -905
  42. package/create-api-service/index.js.gz +0 -0
  43. package/esm-map.json +13 -0
  44. package/package.json +3 -3
  45. package/theme/bridge.d.ts +42 -0
  46. package/theme/es5.d.ts +12 -41
  47. package/theme/es5.js +962 -553
  48. package/theme/index.d.ts +12 -41
  49. package/theme/index.js +698 -473
  50. package/theme/index.js.gz +0 -0
  51. package/theme/source-variables.d.ts +35 -0
Binary file
package/esm-map.json CHANGED
@@ -89,6 +89,19 @@
89
89
  "toDasUiColorOverrides": "/theme/index",
90
90
  "toUpfComponentThemeVariables": "/theme/index",
91
91
  "buildRuntimeThemeVariables": "/theme/index",
92
+ "PRESET_THEME_VARIABLES": "/theme/index",
93
+ "THEME_SOURCE_VARIABLE_CATEGORIES": "/theme/index",
94
+ "THEME_SOURCE_VARIABLE_HINTS": "/theme/index",
95
+ "THEME_SOURCE_VARIABLE_LABELS": "/theme/index",
96
+ "THEME_SOURCE_VARIABLE_META": "/theme/index",
97
+ "THEME_SOURCE_VARIABLE_NAMES": "/theme/index",
98
+ "THEME_SOURCE_VARIABLE_RELATIONS": "/theme/index",
99
+ "getThemeSourceVariableCategories": "/theme/index",
100
+ "getThemeSourceVariableHints": "/theme/index",
101
+ "getThemeSourceVariableLabels": "/theme/index",
102
+ "getThemeSourceVariableNames": "/theme/index",
103
+ "getThemeSourceVariableRelations": "/theme/index",
104
+ "normalizeThemeSourceVariables": "/theme/index",
92
105
  "BUILTIN_PRESET_THEME_NAMES": "/theme/index",
93
106
  "PRESET_THEMES": "/theme/index",
94
107
  "getPresetTheme": "/theme/index",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-utils",
3
- "version": "6.4.0-dev.247",
3
+ "version": "6.4.0-dev.249",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@babel/preset-env": "7.26.0",
25
- "@das-fed/upf-cli": "6.4.0-dev.247",
26
- "@das-fed/upf-web": "6.4.0-dev.247",
25
+ "@das-fed/upf-cli": "6.4.0-dev.249",
26
+ "@das-fed/upf-web": "6.4.0-dev.249",
27
27
  "@rollup/plugin-babel": "6.0.4",
28
28
  "@types/js-cookie": "^3.0.6",
29
29
  "@types/lodash-es": "^4.17.12",
@@ -0,0 +1,42 @@
1
+ import { mixHexColor, toRgbaColor } from './color';
2
+ import { ThemeVariables } from './source-variables';
3
+
4
+ export type { ThemeVariables } from './source-variables';
5
+ export interface ThemeBridgeVariableResolveOptions {
6
+ themeName?: string;
7
+ basePresetName?: string;
8
+ }
9
+ export interface ThemeBridgeResolveContext<TVariables extends object = ThemeVariables> {
10
+ variables: TVariables;
11
+ result: Record<string, string>;
12
+ themeName?: string;
13
+ basePresetName?: string;
14
+ }
15
+ export interface ThemeBridgeVariableItem<TVariables extends object = ThemeVariables> {
16
+ target: string | readonly string[];
17
+ from?: keyof TVariables | string;
18
+ value?: string;
19
+ resolve?: (context: ThemeBridgeResolveContext<TVariables> & {
20
+ mixHexColor: typeof mixHexColor;
21
+ toRgbaColor: typeof toRgbaColor;
22
+ }) => string;
23
+ }
24
+ export interface RuntimeThemeVariableBuildOptions {
25
+ /** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
26
+ includeElementAndDasUiBridges?: boolean;
27
+ /** 当前主题名,用于按预设差异化桥接局部组件 token。 */
28
+ themeName?: string;
29
+ /** 当前主题基础预设名,自定义主题可通过该字段继承预设差异。 */
30
+ basePresetName?: string;
31
+ }
32
+ export declare const normalizeRuntimeThemeSourceVariables: (variables: object) => any;
33
+ export declare const resolveThemeBridgeVariables: <TVariables extends object = ThemeVariables>(variables: TVariables, items: readonly ThemeBridgeVariableItem<TVariables>[], options?: ThemeBridgeVariableResolveOptions) => any;
34
+ export declare const LEGACY_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
35
+ export declare const ELEMENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
36
+ export declare const DAS_UI_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
37
+ export declare const UPF_COMPONENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
38
+ export declare const toLegacyThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
39
+ export declare const toElementThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
40
+ export declare const toDasUiColorOverrides: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
41
+ export declare const toUpfComponentThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
42
+ export declare const buildRuntimeThemeVariables: (variables: object, options?: RuntimeThemeVariableBuildOptions) => Record<string, string>;
package/theme/es5.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { BUILTIN_PRESET_THEME_NAMES, PRESET_THEMES, BuiltinPresetThemeConfig, BuiltinPresetThemeName } from './presets';
2
- import { mixHexColor, toRgbaColor } from './color';
2
+ import { RuntimeThemeVariableBuildOptions } from './bridge';
3
+ import { ThemeVariables } from './source-variables';
3
4
 
4
5
  export { mixHexColor, normalizeHexColor, resolvePrimaryBgColor, toRgbaColor } from './color';
5
- export type ThemeVariables = Record<string, string>;
6
+ export { DAS_UI_THEME_BRIDGE_ITEMS, ELEMENT_THEME_BRIDGE_ITEMS, LEGACY_THEME_BRIDGE_ITEMS, UPF_COMPONENT_THEME_BRIDGE_ITEMS, buildRuntimeThemeVariables, resolveThemeBridgeVariables, toDasUiColorOverrides, toElementThemeVariables, toLegacyThemeVariables, toUpfComponentThemeVariables, } from './bridge';
7
+ export { PRESET_THEME_VARIABLES, THEME_SOURCE_VARIABLE_CATEGORIES, THEME_SOURCE_VARIABLE_HINTS, THEME_SOURCE_VARIABLE_LABELS, THEME_SOURCE_VARIABLE_META, THEME_SOURCE_VARIABLE_NAMES, THEME_SOURCE_VARIABLE_RELATIONS, getThemeSourceVariableCategories, getThemeSourceVariableHints, getThemeSourceVariableLabels, getThemeSourceVariableNames, getThemeSourceVariableRelations, normalizeThemeSourceVariables, } from './source-variables';
8
+ export type { RuntimeThemeVariableBuildOptions, ThemeBridgeResolveContext, ThemeBridgeVariableItem, ThemeBridgeVariableResolveOptions, } from './bridge';
9
+ export type { BuiltinPresetThemeName, PartialThemeVariables, ThemeMode, ThemeSourceVariableMeta, ThemeSourceVariableName, ThemeVariableCategory, ThemeVariableCategoryGroupKey, ThemeVariables, } from './source-variables';
6
10
  type ThemeVariableSource = Record<string, string | undefined>;
7
- export interface ThemeBridgeVariableResolveOptions {
8
- themeName?: string;
9
- basePresetName?: string;
10
- }
11
11
  export interface ThemeConfig {
12
12
  name?: string;
13
13
  basePresetName?: string;
@@ -30,6 +30,10 @@ export interface ThemeBridgeAPI<TThemeName extends string = string, TVariables e
30
30
  export interface DefaultThemeStyleOptions extends ApplyThemeVariablesOptions {
31
31
  /** 默认注入的预设主题名称。 */
32
32
  presetName?: BuiltinPresetThemeName | string;
33
+ /** 未显式指定 presetName 时,是否读取本地主题缓存;默认 false。 */
34
+ useStoredTheme?: boolean;
35
+ /** 本地主题缓存 key;用于独立运行兜底时对齐主应用已保存主题。 */
36
+ storageKey?: string;
33
37
  /** 默认主题 style 标签 id;用于手动注入时避免重复插入。 */
34
38
  styleId?: string;
35
39
  /** 已存在运行时主题变量时是否强制覆盖;默认 false。 */
@@ -37,21 +41,6 @@ export interface DefaultThemeStyleOptions extends ApplyThemeVariablesOptions {
37
41
  /** 是否写入 data-theme/data-skin;默认 true,mframe 自动兜底可关闭避免误标记。 */
38
42
  setThemeAttributes?: boolean;
39
43
  }
40
- export interface ThemeBridgeResolveContext<TVariables extends object = ThemeVariables> {
41
- variables: TVariables;
42
- result: Record<string, string>;
43
- themeName?: string;
44
- basePresetName?: string;
45
- }
46
- export interface ThemeBridgeVariableItem<TVariables extends object = ThemeVariables> {
47
- target: string | readonly string[];
48
- from?: keyof TVariables | string;
49
- value?: string;
50
- resolve?: (context: ThemeBridgeResolveContext<TVariables> & {
51
- mixHexColor: typeof mixHexColor;
52
- toRgbaColor: typeof toRgbaColor;
53
- }) => string;
54
- }
55
44
  export interface ApplyThemeVariablesOptions {
56
45
  /** 写入目标节点;默认当前文档 html。 */
57
46
  root?: HTMLElement | null;
@@ -79,24 +68,6 @@ export interface SubAppThemeSyncOptions extends ThemePullOptions {
79
68
  onThemeChange?: (event: ThemeChangeEvent) => void;
80
69
  }
81
70
  export type HostThemeRootSyncOptions = SubAppThemeSyncOptions;
82
- export interface RuntimeThemeVariableBuildOptions {
83
- /** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
84
- includeElementAndDasUiBridges?: boolean;
85
- /** 当前主题名,用于按预设差异化桥接局部组件 token。 */
86
- themeName?: string;
87
- /** 当前主题基础预设名,自定义主题可通过该字段继承预设差异。 */
88
- basePresetName?: string;
89
- }
90
- export declare const resolveThemeBridgeVariables: <TVariables extends object = ThemeVariables>(variables: TVariables, items: readonly ThemeBridgeVariableItem<TVariables>[], options?: ThemeBridgeVariableResolveOptions) => any;
91
- export declare const LEGACY_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
92
- export declare const ELEMENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
93
- export declare const DAS_UI_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
94
- export declare const UPF_COMPONENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
95
- export declare const toLegacyThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
96
- export declare const toElementThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
97
- export declare const toDasUiColorOverrides: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
98
- export declare const toUpfComponentThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
99
- export declare const buildRuntimeThemeVariables: (variables: object, options?: RuntimeThemeVariableBuildOptions) => Record<string, string>;
100
71
  export { BUILTIN_PRESET_THEME_NAMES, PRESET_THEMES };
101
72
  export declare const getPresetTheme: (themeName: string) => any;
102
73
  export declare const getAllPresetThemes: () => any;
@@ -109,10 +80,10 @@ export declare const getHostThemeSnapshotFromWindowName: (debug?: boolean) => Th
109
80
  export declare const applyThemeVariablesToDocument: (variables: object, options?: ApplyThemeVariablesOptions) => any;
110
81
  export declare const applyThemeEventToDocument: (event: ThemeChangeEvent, options?: ApplyThemeVariablesOptions) => any;
111
82
  export declare const getThemeAPI: (debug?: boolean) => ThemeBridgeAPI | null;
112
- export declare const getCurrentTheme: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<string, string>>;
83
+ export declare const getCurrentTheme: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<import('./source-variables').ThemeSourceVariableName, string>>;
113
84
  export declare const getThemeVariables: (options?: ThemePullOptions) => any;
114
85
  export declare const changeTheme: (themeName: string, debug?: boolean) => boolean;
115
- export declare const syncThemeFromHost: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<string, string>>;
86
+ export declare const syncThemeFromHost: (options?: ThemePullOptions) => ThemeChangeEvent<string, Record<import('./source-variables').ThemeSourceVariableName, string>>;
116
87
  export declare const syncHostThemeRoot: (options?: ThemePullOptions) => ThemeChangeEvent | null;
117
88
  export declare const initSubAppThemeSync: (options?: SubAppThemeSyncOptions) => () => void;
118
89
  export declare const initHostThemeRootSync: (options?: HostThemeRootSyncOptions) => () => void;