@das-fed/upf-utils 6.4.0-dev.248 → 6.4.0-dev.250

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 (95) hide show
  1. package/api-services/es5.js +2421 -2278
  2. package/api-services/index.js +2041 -1924
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +1335 -1207
  5. package/api-services/modules/app-manage/index.js +1093 -998
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/es5.js +1335 -1207
  8. package/api-services/modules/authentication/index.js +1093 -998
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/es5.js +1485 -1342
  11. package/api-services/modules/bems/index.js +1235 -1118
  12. package/api-services/modules/bems/index.js.gz +0 -0
  13. package/api-services/modules/contract/es5.js +1335 -1207
  14. package/api-services/modules/contract/index.js +1093 -998
  15. package/api-services/modules/contract/index.js.gz +0 -0
  16. package/api-services/modules/duty-manage/es5.js +1362 -1229
  17. package/api-services/modules/duty-manage/index.js +1125 -1022
  18. package/api-services/modules/duty-manage/index.js.gz +0 -0
  19. package/api-services/modules/enterpriseright/es5.js +1417 -1298
  20. package/api-services/modules/enterpriseright/index.js +1168 -1087
  21. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  22. package/api-services/modules/es5.js +2191 -2060
  23. package/api-services/modules/file/es5.js +2374 -2231
  24. package/api-services/modules/file/index.js +2049 -1932
  25. package/api-services/modules/file/index.js.gz +0 -0
  26. package/api-services/modules/gateway-edge/es5.js +1334 -1203
  27. package/api-services/modules/gateway-edge/index.js +1104 -1005
  28. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  29. package/api-services/modules/index.js +1833 -1734
  30. package/api-services/modules/index.js.gz +0 -0
  31. package/api-services/modules/iot/es5.js +1522 -1391
  32. package/api-services/modules/iot/index.js +1261 -1162
  33. package/api-services/modules/iot/index.js.gz +0 -0
  34. package/api-services/modules/justauth/es5.js +1415 -1296
  35. package/api-services/modules/justauth/index.js +1168 -1087
  36. package/api-services/modules/justauth/index.js.gz +0 -0
  37. package/api-services/modules/knowledge/es5.js +1480 -1337
  38. package/api-services/modules/knowledge/index.js +1226 -1109
  39. package/api-services/modules/knowledge/index.js.gz +0 -0
  40. package/api-services/modules/link/es5.js +1334 -1203
  41. package/api-services/modules/link/index.js +1104 -1005
  42. package/api-services/modules/link/index.js.gz +0 -0
  43. package/api-services/modules/permission/es5.js +1481 -1341
  44. package/api-services/modules/permission/index.js +1234 -1121
  45. package/api-services/modules/permission/index.js.gz +0 -0
  46. package/api-services/modules/platformManage/es5.js +1485 -1366
  47. package/api-services/modules/platformManage/index.js +1221 -1140
  48. package/api-services/modules/platformManage/index.js.gz +0 -0
  49. package/api-services/modules/portal/es5.js +1351 -1220
  50. package/api-services/modules/portal/index.js +1100 -1001
  51. package/api-services/modules/portal/index.js.gz +0 -0
  52. package/api-services/modules/space-manage/es5.js +1417 -1298
  53. package/api-services/modules/space-manage/index.js +1168 -1087
  54. package/api-services/modules/space-manage/index.js.gz +0 -0
  55. package/api-services/modules/super-admin/es5.js +1358 -1227
  56. package/api-services/modules/super-admin/index.js +1121 -1022
  57. package/api-services/modules/super-admin/index.js.gz +0 -0
  58. package/api-services/modules/supplier/es5.js +1355 -1224
  59. package/api-services/modules/supplier/index.js +1106 -1007
  60. package/api-services/modules/supplier/index.js.gz +0 -0
  61. package/api-services/modules/supplychain-manage/es5.js +1482 -1339
  62. package/api-services/modules/supplychain-manage/index.js +1232 -1115
  63. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  64. package/api-services/modules/systemConfiguration/es5.js +1334 -1203
  65. package/api-services/modules/systemConfiguration/index.js +1104 -1005
  66. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  67. package/api-services/modules/tool/es5.js +1334 -1203
  68. package/api-services/modules/tool/index.js +1104 -1005
  69. package/api-services/modules/tool/index.js.gz +0 -0
  70. package/api-services/src/create-service/es5.js +1341 -1210
  71. package/api-services/src/create-service/index.js +1108 -1009
  72. package/api-services/src/create-service/index.js.gz +0 -0
  73. package/common-info/es5.js +1752 -1621
  74. package/common-info/getPermissionMethod/es5.js +1326 -1198
  75. package/common-info/getPermissionMethod/index.js +1066 -971
  76. package/common-info/getPermissionMethod/index.js.gz +0 -0
  77. package/common-info/index.js +1460 -1361
  78. package/common-info/index.js.gz +0 -0
  79. package/common-tools/timezone-format/es5.d.ts +31 -1
  80. package/common-tools/timezone-format/es5.js +640 -462
  81. package/common-tools/timezone-format/index.d.ts +31 -1
  82. package/common-tools/timezone-format/index.js +467 -304
  83. package/common-tools/timezone-format/index.js.gz +0 -0
  84. package/create-api-service/es5.js +1342 -1211
  85. package/create-api-service/index.js +1109 -1010
  86. package/create-api-service/index.js.gz +0 -0
  87. package/esm-map.json +20 -0
  88. package/package.json +3 -3
  89. package/theme/bridge.d.ts +42 -0
  90. package/theme/es5.d.ts +8 -41
  91. package/theme/es5.js +800 -490
  92. package/theme/index.d.ts +8 -41
  93. package/theme/index.js +538 -391
  94. package/theme/index.js.gz +0 -0
  95. package/theme/source-variables.d.ts +35 -0
Binary file
package/esm-map.json CHANGED
@@ -56,6 +56,13 @@
56
56
  "getFavIcon": "/common-info/index",
57
57
  "dateFormat": "/common-tools/date-format/index",
58
58
  "getClientTimeZone": "/common-tools/timezone-format/index",
59
+ "clientTimeZone": "/common-tools/timezone-format/index",
60
+ "setClientTimeZone": "/common-tools/timezone-format/index",
61
+ "syncClientTimeZone": "/common-tools/timezone-format/index",
62
+ "onClientTimeZoneChange": "/common-tools/timezone-format/index",
63
+ "initClientTimeZoneSync": "/common-tools/timezone-format/index",
64
+ "TIMEZONE_CHANGE_EVENT": "/common-tools/timezone-format/index",
65
+ "UPF_TIMEZONE_MESSAGE_TYPE": "/common-tools/timezone-format/index",
59
66
  "normalizeLocaleCode": "/common-tools/timezone-format/index",
60
67
  "isDaylightSavingTime": "/common-tools/timezone-format/index",
61
68
  "getTimeZoneDisplayInfo": "/common-tools/timezone-format/index",
@@ -89,6 +96,19 @@
89
96
  "toDasUiColorOverrides": "/theme/index",
90
97
  "toUpfComponentThemeVariables": "/theme/index",
91
98
  "buildRuntimeThemeVariables": "/theme/index",
99
+ "PRESET_THEME_VARIABLES": "/theme/index",
100
+ "THEME_SOURCE_VARIABLE_CATEGORIES": "/theme/index",
101
+ "THEME_SOURCE_VARIABLE_HINTS": "/theme/index",
102
+ "THEME_SOURCE_VARIABLE_LABELS": "/theme/index",
103
+ "THEME_SOURCE_VARIABLE_META": "/theme/index",
104
+ "THEME_SOURCE_VARIABLE_NAMES": "/theme/index",
105
+ "THEME_SOURCE_VARIABLE_RELATIONS": "/theme/index",
106
+ "getThemeSourceVariableCategories": "/theme/index",
107
+ "getThemeSourceVariableHints": "/theme/index",
108
+ "getThemeSourceVariableLabels": "/theme/index",
109
+ "getThemeSourceVariableNames": "/theme/index",
110
+ "getThemeSourceVariableRelations": "/theme/index",
111
+ "normalizeThemeSourceVariables": "/theme/index",
92
112
  "BUILTIN_PRESET_THEME_NAMES": "/theme/index",
93
113
  "PRESET_THEMES": "/theme/index",
94
114
  "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.248",
3
+ "version": "6.4.0-dev.250",
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.248",
26
- "@das-fed/upf-web": "6.4.0-dev.248",
25
+ "@das-fed/upf-cli": "6.4.0-dev.250",
26
+ "@das-fed/upf-web": "6.4.0-dev.250",
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;
@@ -41,21 +41,6 @@ export interface DefaultThemeStyleOptions extends ApplyThemeVariablesOptions {
41
41
  /** 是否写入 data-theme/data-skin;默认 true,mframe 自动兜底可关闭避免误标记。 */
42
42
  setThemeAttributes?: boolean;
43
43
  }
44
- export interface ThemeBridgeResolveContext<TVariables extends object = ThemeVariables> {
45
- variables: TVariables;
46
- result: Record<string, string>;
47
- themeName?: string;
48
- basePresetName?: string;
49
- }
50
- export interface ThemeBridgeVariableItem<TVariables extends object = ThemeVariables> {
51
- target: string | readonly string[];
52
- from?: keyof TVariables | string;
53
- value?: string;
54
- resolve?: (context: ThemeBridgeResolveContext<TVariables> & {
55
- mixHexColor: typeof mixHexColor;
56
- toRgbaColor: typeof toRgbaColor;
57
- }) => string;
58
- }
59
44
  export interface ApplyThemeVariablesOptions {
60
45
  /** 写入目标节点;默认当前文档 html。 */
61
46
  root?: HTMLElement | null;
@@ -83,24 +68,6 @@ export interface SubAppThemeSyncOptions extends ThemePullOptions {
83
68
  onThemeChange?: (event: ThemeChangeEvent) => void;
84
69
  }
85
70
  export type HostThemeRootSyncOptions = SubAppThemeSyncOptions;
86
- export interface RuntimeThemeVariableBuildOptions {
87
- /** 是否写入 Element Plus 与 das-ui/das 历史兼容变量;默认 true。 */
88
- includeElementAndDasUiBridges?: boolean;
89
- /** 当前主题名,用于按预设差异化桥接局部组件 token。 */
90
- themeName?: string;
91
- /** 当前主题基础预设名,自定义主题可通过该字段继承预设差异。 */
92
- basePresetName?: string;
93
- }
94
- export declare const resolveThemeBridgeVariables: <TVariables extends object = ThemeVariables>(variables: TVariables, items: readonly ThemeBridgeVariableItem<TVariables>[], options?: ThemeBridgeVariableResolveOptions) => any;
95
- export declare const LEGACY_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
96
- export declare const ELEMENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
97
- export declare const DAS_UI_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
98
- export declare const UPF_COMPONENT_THEME_BRIDGE_ITEMS: ThemeBridgeVariableItem[];
99
- export declare const toLegacyThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
100
- export declare const toElementThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
101
- export declare const toDasUiColorOverrides: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
102
- export declare const toUpfComponentThemeVariables: (variables: object, options?: ThemeBridgeVariableResolveOptions) => any;
103
- export declare const buildRuntimeThemeVariables: (variables: object, options?: RuntimeThemeVariableBuildOptions) => Record<string, string>;
104
71
  export { BUILTIN_PRESET_THEME_NAMES, PRESET_THEMES };
105
72
  export declare const getPresetTheme: (themeName: string) => any;
106
73
  export declare const getAllPresetThemes: () => any;
@@ -113,10 +80,10 @@ export declare const getHostThemeSnapshotFromWindowName: (debug?: boolean) => Th
113
80
  export declare const applyThemeVariablesToDocument: (variables: object, options?: ApplyThemeVariablesOptions) => any;
114
81
  export declare const applyThemeEventToDocument: (event: ThemeChangeEvent, options?: ApplyThemeVariablesOptions) => any;
115
82
  export declare const getThemeAPI: (debug?: boolean) => ThemeBridgeAPI | null;
116
- 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>>;
117
84
  export declare const getThemeVariables: (options?: ThemePullOptions) => any;
118
85
  export declare const changeTheme: (themeName: string, debug?: boolean) => boolean;
119
- 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>>;
120
87
  export declare const syncHostThemeRoot: (options?: ThemePullOptions) => ThemeChangeEvent | null;
121
88
  export declare const initSubAppThemeSync: (options?: SubAppThemeSyncOptions) => () => void;
122
89
  export declare const initHostThemeRootSync: (options?: HostThemeRootSyncOptions) => () => void;