@das-fed/upf-utils 6.4.0-dev.248 → 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 (57) hide show
  1. package/api-services/modules/authentication/es5.js +1088 -1079
  2. package/api-services/modules/authentication/index.js +897 -883
  3. package/api-services/modules/authentication/index.js.gz +0 -0
  4. package/api-services/modules/bems/es5.js +1118 -1106
  5. package/api-services/modules/bems/index.js +923 -905
  6. package/api-services/modules/bems/index.js.gz +0 -0
  7. package/api-services/modules/contract/es5.js +1088 -1079
  8. package/api-services/modules/contract/index.js +897 -883
  9. package/api-services/modules/contract/index.js.gz +0 -0
  10. package/api-services/modules/duty-manage/es5.js +1048 -1058
  11. package/api-services/modules/duty-manage/index.js +858 -872
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/es5.js +976 -973
  14. package/api-services/modules/index.js +733 -729
  15. package/api-services/modules/index.js.gz +0 -0
  16. package/api-services/modules/iot/es5.js +868 -871
  17. package/api-services/modules/iot/index.js +681 -685
  18. package/api-services/modules/iot/index.js.gz +0 -0
  19. package/api-services/modules/justauth/es5.js +1104 -1116
  20. package/api-services/modules/justauth/index.js +903 -921
  21. package/api-services/modules/justauth/index.js.gz +0 -0
  22. package/api-services/modules/knowledge/es5.js +1114 -1102
  23. package/api-services/modules/knowledge/index.js +920 -902
  24. package/api-services/modules/knowledge/index.js.gz +0 -0
  25. package/api-services/modules/link/es5.js +1102 -1114
  26. package/api-services/modules/link/index.js +902 -920
  27. package/api-services/modules/link/index.js.gz +0 -0
  28. package/api-services/modules/permission/es5.js +849 -852
  29. package/api-services/modules/permission/index.js +661 -665
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/supplier/es5.js +1093 -1081
  32. package/api-services/modules/supplier/index.js +901 -883
  33. package/api-services/modules/supplier/index.js.gz +0 -0
  34. package/api-services/modules/systemConfiguration/es5.js +815 -817
  35. package/api-services/modules/systemConfiguration/index.js +636 -640
  36. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  37. package/api-services/modules/tool/es5.js +1102 -1114
  38. package/api-services/modules/tool/index.js +902 -920
  39. package/api-services/modules/tool/index.js.gz +0 -0
  40. package/common-info/getPermissionMethod/es5.js +856 -859
  41. package/common-info/getPermissionMethod/index.js +665 -669
  42. package/common-info/getPermissionMethod/index.js.gz +0 -0
  43. package/common-tools/timezone-format/es5.js +315 -283
  44. package/common-tools/timezone-format/index.js +262 -204
  45. package/common-tools/timezone-format/index.js.gz +0 -0
  46. package/create-api-service/es5.js +1078 -1090
  47. package/create-api-service/index.js +887 -905
  48. package/create-api-service/index.js.gz +0 -0
  49. package/esm-map.json +13 -0
  50. package/package.json +3 -3
  51. package/theme/bridge.d.ts +42 -0
  52. package/theme/es5.d.ts +8 -41
  53. package/theme/es5.js +799 -489
  54. package/theme/index.d.ts +8 -41
  55. package/theme/index.js +537 -390
  56. package/theme/index.js.gz +0 -0
  57. package/theme/source-variables.d.ts +35 -0
package/theme/index.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;