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

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 (50) hide show
  1. package/api-services/modules/contract/es5.js +849 -852
  2. package/api-services/modules/contract/index.js +661 -665
  3. package/api-services/modules/contract/index.js.gz +0 -0
  4. package/api-services/modules/duty-manage/es5.js +1075 -1087
  5. package/api-services/modules/duty-manage/index.js +880 -898
  6. package/api-services/modules/duty-manage/index.js.gz +0 -0
  7. package/api-services/modules/enterpriseright/es5.js +1102 -1114
  8. package/api-services/modules/enterpriseright/index.js +902 -920
  9. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  10. package/api-services/modules/es5.js +1361 -1349
  11. package/api-services/modules/gateway-edge/es5.js +1079 -1088
  12. package/api-services/modules/gateway-edge/index.js +883 -897
  13. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  14. package/api-services/modules/index.js +1073 -1055
  15. package/api-services/modules/index.js.gz +0 -0
  16. package/api-services/modules/justauth/es5.js +1090 -1081
  17. package/api-services/modules/justauth/index.js +898 -884
  18. package/api-services/modules/justauth/index.js.gz +0 -0
  19. package/api-services/modules/portal/es5.js +1114 -1102
  20. package/api-services/modules/portal/index.js +920 -902
  21. package/api-services/modules/portal/index.js.gz +0 -0
  22. package/api-services/modules/super-admin/es5.js +1093 -1081
  23. package/api-services/modules/super-admin/index.js +901 -883
  24. package/api-services/modules/super-admin/index.js.gz +0 -0
  25. package/api-services/modules/supplychain-manage/es5.js +1114 -1102
  26. package/api-services/modules/supplychain-manage/index.js +920 -902
  27. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  28. package/api-services/modules/systemConfiguration/es5.js +1074 -1067
  29. package/api-services/modules/systemConfiguration/index.js +886 -876
  30. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  31. package/api-services/modules/tool/es5.js +1114 -1102
  32. package/api-services/modules/tool/index.js +920 -902
  33. package/api-services/modules/tool/index.js.gz +0 -0
  34. package/common-info/es5.js +1248 -1257
  35. package/common-info/getPermissionMethod/es5.js +1332 -1344
  36. package/common-info/getPermissionMethod/index.js +1104 -1122
  37. package/common-info/getPermissionMethod/index.js.gz +0 -0
  38. package/common-info/index.js +1026 -1040
  39. package/common-info/index.js.gz +0 -0
  40. package/create-api-service/es5.js +1090 -1078
  41. package/create-api-service/index.js +905 -887
  42. package/create-api-service/index.js.gz +0 -0
  43. package/esm-map.json +3 -1
  44. package/package.json +3 -3
  45. package/theme/color.d.ts +7 -0
  46. package/theme/es5.d.ts +20 -8
  47. package/theme/es5.js +491 -431
  48. package/theme/index.d.ts +20 -8
  49. package/theme/index.js +249 -222
  50. package/theme/index.js.gz +0 -0
Binary file
package/esm-map.json CHANGED
@@ -239,5 +239,7 @@
239
239
  "DAS_UI_THEME_BRIDGE_ITEMS": "/theme/index",
240
240
  "UPF_COMPONENT_THEME_BRIDGE_ITEMS": "/theme/index",
241
241
  "getHostThemeSnapshotFromWindowName": "/theme/index",
242
- "clonePresetTheme": "/theme/presets/index"
242
+ "clonePresetTheme": "/theme/presets/index",
243
+ "normalizeHexColor": "/theme/index",
244
+ "resolvePrimaryBgColor": "/theme/index"
243
245
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-utils",
3
- "version": "6.4.0-dev.245",
3
+ "version": "6.4.0-dev.247",
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.245",
26
- "@das-fed/upf-web": "6.4.0-dev.245",
25
+ "@das-fed/upf-cli": "6.4.0-dev.247",
26
+ "@das-fed/upf-web": "6.4.0-dev.247",
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,7 @@
1
+ declare const WHITE_COLOR = "#ffffff";
2
+ declare const BLACK_COLOR = "#000000";
3
+ export declare const normalizeHexColor: (color: string) => any;
4
+ export declare const mixHexColor: (foreground: string, background: string, foregroundWeight: number, fallback: string) => string;
5
+ export declare const toRgbaColor: (color: string, alpha: number, fallback: string) => string;
6
+ export declare const resolvePrimaryBgColor: (primaryColor: string, backgroundColor?: string) => string;
7
+ export { BLACK_COLOR, WHITE_COLOR };
package/theme/es5.d.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import { BUILTIN_PRESET_THEME_NAMES, PRESET_THEMES, BuiltinPresetThemeConfig, BuiltinPresetThemeName } from './presets';
2
+ import { mixHexColor, toRgbaColor } from './color';
2
3
 
4
+ export { mixHexColor, normalizeHexColor, resolvePrimaryBgColor, toRgbaColor } from './color';
3
5
  export type ThemeVariables = Record<string, string>;
4
6
  type ThemeVariableSource = Record<string, string | undefined>;
7
+ export interface ThemeBridgeVariableResolveOptions {
8
+ themeName?: string;
9
+ basePresetName?: string;
10
+ }
5
11
  export interface ThemeConfig {
6
12
  name?: string;
7
13
  basePresetName?: string;
@@ -34,9 +40,11 @@ export interface DefaultThemeStyleOptions extends ApplyThemeVariablesOptions {
34
40
  export interface ThemeBridgeResolveContext<TVariables extends object = ThemeVariables> {
35
41
  variables: TVariables;
36
42
  result: Record<string, string>;
43
+ themeName?: string;
44
+ basePresetName?: string;
37
45
  }
38
46
  export interface ThemeBridgeVariableItem<TVariables extends object = ThemeVariables> {
39
- target: string;
47
+ target: string | readonly string[];
40
48
  from?: keyof TVariables | string;
41
49
  value?: string;
42
50
  resolve?: (context: ThemeBridgeResolveContext<TVariables> & {
@@ -53,6 +61,8 @@ export interface ApplyThemeVariablesOptions {
53
61
  includeElementAndDasUiBridges?: boolean;
54
62
  /** 写入 data-theme 的主题名。 */
55
63
  themeName?: string;
64
+ /** 当前主题基础预设名,用于自定义主题继承预设差异化 token。 */
65
+ basePresetName?: string;
56
66
  /** 写入 data-skin 的皮肤名;传 null 时移除。 */
57
67
  skinName?: string | null;
58
68
  }
@@ -72,18 +82,20 @@ export type HostThemeRootSyncOptions = SubAppThemeSyncOptions;
72
82
  export interface RuntimeThemeVariableBuildOptions {
73
83
  /** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
74
84
  includeElementAndDasUiBridges?: boolean;
85
+ /** 当前主题名,用于按预设差异化桥接局部组件 token。 */
86
+ themeName?: string;
87
+ /** 当前主题基础预设名,自定义主题可通过该字段继承预设差异。 */
88
+ basePresetName?: string;
75
89
  }
76
- export declare const mixHexColor: (foreground: string, background: string, foregroundWeight: number, fallback: string) => string;
77
- export declare const toRgbaColor: (color: string, alpha: number, fallback: string) => string;
78
- export declare const resolveThemeBridgeVariables: <TVariables extends object = ThemeVariables>(variables: TVariables, items: readonly ThemeBridgeVariableItem<TVariables>[]) => any;
90
+ export declare const resolveThemeBridgeVariables: <TVariables extends object = ThemeVariables>(variables: TVariables, items: readonly ThemeBridgeVariableItem<TVariables>[], options?: ThemeBridgeVariableResolveOptions) => any;
79
91
  export declare const LEGACY_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
80
92
  export declare const ELEMENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
81
93
  export declare const DAS_UI_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
82
94
  export declare const UPF_COMPONENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
83
- export declare const toLegacyThemeVariables: (variables: object) => any;
84
- export declare const toElementThemeVariables: (variables: object) => any;
85
- export declare const toDasUiColorOverrides: (variables: object) => any;
86
- export declare const toUpfComponentThemeVariables: (variables: object) => any;
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;
87
99
  export declare const buildRuntimeThemeVariables: (variables: object, options?: RuntimeThemeVariableBuildOptions) => Record<string, string>;
88
100
  export { BUILTIN_PRESET_THEME_NAMES, PRESET_THEMES };
89
101
  export declare const getPresetTheme: (themeName: string) => any;