@das-fed/upf-utils 6.4.0-hot.12 → 6.4.0-hot.13

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 (200) hide show
  1. package/api-services/es5.d.ts +2 -0
  2. package/api-services/es5.js +1619 -1580
  3. package/api-services/i18n/es5.d.ts +63 -0
  4. package/api-services/index.js +1305 -1284
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/es5.d.ts +2 -0
  7. package/api-services/modules/app-manage/es5.js +957 -909
  8. package/api-services/modules/app-manage/index.js +746 -711
  9. package/api-services/modules/app-manage/index.js.gz +0 -0
  10. package/api-services/modules/authentication/es5.d.ts +2 -0
  11. package/api-services/modules/authentication/es5.js +1650 -1587
  12. package/api-services/modules/authentication/index.js +1410 -1353
  13. package/api-services/modules/authentication/index.js.gz +0 -0
  14. package/api-services/modules/bems/es5.d.ts +6 -0
  15. package/api-services/modules/bems/es5.js +1253 -1202
  16. package/api-services/modules/bems/index.js +1034 -995
  17. package/api-services/modules/bems/index.js.gz +0 -0
  18. package/api-services/modules/contract/es5.d.ts +2 -0
  19. package/api-services/modules/contract/es5.js +1250 -1199
  20. package/api-services/modules/contract/index.js +1035 -996
  21. package/api-services/modules/contract/index.js.gz +0 -0
  22. package/api-services/modules/duty-manage/es5.d.ts +7 -0
  23. package/api-services/modules/duty-manage/es5.js +963 -912
  24. package/api-services/modules/duty-manage/index.js +755 -716
  25. package/api-services/modules/duty-manage/index.js.gz +0 -0
  26. package/api-services/modules/enterpriseright/es5.d.ts +2 -0
  27. package/api-services/modules/enterpriseright/es5.js +1250 -1199
  28. package/api-services/modules/enterpriseright/index.js +1035 -996
  29. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  30. package/api-services/modules/es5.d.ts +21 -0
  31. package/api-services/modules/es5.js +1113 -1062
  32. package/api-services/modules/file/es5.d.ts +37 -0
  33. package/api-services/modules/file/es5.js +1005 -954
  34. package/api-services/modules/file/index.js +786 -747
  35. package/api-services/modules/file/index.js.gz +0 -0
  36. package/api-services/modules/gateway-edge/es5.d.ts +2 -0
  37. package/api-services/modules/gateway-edge/es5.js +1650 -1587
  38. package/api-services/modules/gateway-edge/index.js +1410 -1353
  39. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  40. package/api-services/modules/index.js +856 -817
  41. package/api-services/modules/index.js.gz +0 -0
  42. package/api-services/modules/iot/es5.d.ts +16 -0
  43. package/api-services/modules/iot/es5.js +1389 -1350
  44. package/api-services/modules/iot/index.js +1153 -1132
  45. package/api-services/modules/iot/index.js.gz +0 -0
  46. package/api-services/modules/justauth/es5.d.ts +3 -0
  47. package/api-services/modules/justauth/es5.js +1327 -1285
  48. package/api-services/modules/justauth/index.js +1111 -1086
  49. package/api-services/modules/justauth/index.js.gz +0 -0
  50. package/api-services/modules/knowledge/es5.d.ts +2 -0
  51. package/api-services/modules/knowledge/es5.js +1326 -1284
  52. package/api-services/modules/knowledge/index.js +1111 -1086
  53. package/api-services/modules/knowledge/index.js.gz +0 -0
  54. package/api-services/modules/link/es5.d.ts +2 -0
  55. package/api-services/modules/link/es5.js +1650 -1587
  56. package/api-services/modules/link/index.js +1410 -1353
  57. package/api-services/modules/link/index.js.gz +0 -0
  58. package/api-services/modules/permission/es5.d.ts +2 -0
  59. package/api-services/modules/permission/es5.js +1250 -1199
  60. package/api-services/modules/permission/index.js +1035 -996
  61. package/api-services/modules/permission/index.js.gz +0 -0
  62. package/api-services/modules/platformManage/es5.d.ts +14 -0
  63. package/api-services/modules/platformManage/es5.js +966 -915
  64. package/api-services/modules/platformManage/index.js +755 -716
  65. package/api-services/modules/platformManage/index.js.gz +0 -0
  66. package/api-services/modules/portal/es5.d.ts +2 -0
  67. package/api-services/modules/portal/es5.js +1650 -1587
  68. package/api-services/modules/portal/index.js +1410 -1353
  69. package/api-services/modules/portal/index.js.gz +0 -0
  70. package/api-services/modules/space-manage/es5.d.ts +2 -0
  71. package/api-services/modules/space-manage/es5.js +968 -917
  72. package/api-services/modules/space-manage/index.js +763 -724
  73. package/api-services/modules/space-manage/index.js.gz +0 -0
  74. package/api-services/modules/super-admin/es5.d.ts +8 -0
  75. package/api-services/modules/super-admin/es5.js +1260 -1209
  76. package/api-services/modules/super-admin/index.js +1038 -999
  77. package/api-services/modules/super-admin/index.js.gz +0 -0
  78. package/api-services/modules/supplier/es5.d.ts +6 -0
  79. package/api-services/modules/supplier/es5.js +1249 -1198
  80. package/api-services/modules/supplier/index.js +1032 -993
  81. package/api-services/modules/supplier/index.js.gz +0 -0
  82. package/api-services/modules/supplychain-manage/es5.d.ts +2 -0
  83. package/api-services/modules/supplychain-manage/es5.js +1398 -1359
  84. package/api-services/modules/supplychain-manage/index.js +1171 -1150
  85. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  86. package/api-services/modules/systemConfiguration/es5.d.ts +2 -0
  87. package/api-services/modules/systemConfiguration/es5.js +1250 -1199
  88. package/api-services/modules/systemConfiguration/index.js +1035 -996
  89. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  90. package/api-services/modules/tool/es5.d.ts +2 -0
  91. package/api-services/modules/tool/es5.js +1398 -1359
  92. package/api-services/modules/tool/index.js +1171 -1150
  93. package/api-services/modules/tool/index.js.gz +0 -0
  94. package/api-services/src/create-service/es5.d.ts +1 -0
  95. package/api-services/src/create-service/es5.js +1396 -1357
  96. package/api-services/src/create-service/index.js +1170 -1149
  97. package/api-services/src/create-service/index.js.gz +0 -0
  98. package/atob/es5.d.ts +2 -0
  99. package/common-info/es5.d.ts +73 -0
  100. package/common-info/es5.js +2155 -2063
  101. package/common-info/getIframeUrl/es5.d.ts +9 -0
  102. package/common-info/getInfoFromUrl/es5.d.ts +8 -0
  103. package/common-info/getPermissionMethod/es5.d.ts +77 -0
  104. package/common-info/getPermissionMethod/es5.js +1239 -1150
  105. package/common-info/getPermissionMethod/index.d.ts +57 -6
  106. package/common-info/getPermissionMethod/index.js +992 -928
  107. package/common-info/getPermissionMethod/index.js.gz +0 -0
  108. package/common-info/index.d.ts +5 -8
  109. package/common-info/index.js +1818 -1751
  110. package/common-info/index.js.gz +0 -0
  111. package/common-info/set-personal-info/es5.d.ts +5 -0
  112. package/common-info/type.d.ts +2 -2
  113. package/common-tools/arr-tools/es5.d.ts +15 -0
  114. package/common-tools/calc-text-width/es5.d.ts +1 -0
  115. package/common-tools/date-format/es5.d.ts +7 -0
  116. package/common-tools/es5.d.ts +15 -0
  117. package/common-tools/es5.js +9 -0
  118. package/common-tools/extract-file-name/es5.d.ts +1 -0
  119. package/common-tools/get-file-extension/es5.d.ts +6 -0
  120. package/common-tools/get-url-params/es5.d.ts +46 -0
  121. package/common-tools/handle-data/es5.d.ts +34 -0
  122. package/common-tools/handle-data/es5.js +44 -6
  123. package/common-tools/handle-data/index.d.ts +16 -1
  124. package/common-tools/handle-data/index.js +1 -1
  125. package/common-tools/handle-data/index.js.gz +0 -0
  126. package/common-tools/index.d.ts +1 -0
  127. package/common-tools/index.js +1 -0
  128. package/common-tools/nest-tree-format/es5.d.ts +30 -0
  129. package/common-tools/obj-tools/es5.d.ts +7 -0
  130. package/common-tools/platform-tools/es5.d.ts +19 -0
  131. package/common-tools/queue-promise/es5.d.ts +6 -0
  132. package/common-tools/setHtmlMinWH/es5.d.ts +5 -0
  133. package/common-tools/timezone-format/es5.d.ts +132 -0
  134. package/common-tools/timezone-format/es5.js +822 -0
  135. package/common-tools/timezone-format/get-iana-data/dayjs-timezone-iana-plugin.d.ts +72 -0
  136. package/common-tools/timezone-format/get-iana-data/iana-api-fetch.d.ts +21 -0
  137. package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +29 -0
  138. package/common-tools/timezone-format/index.d.ts +132 -0
  139. package/common-tools/timezone-format/index.js +439 -0
  140. package/common-tools/timezone-format/index.js.gz +0 -0
  141. package/common-tools/update-browser-title/es5.d.ts +1 -0
  142. package/common-tools/update-fav-icon/es5.d.ts +11 -0
  143. package/config/es5.d.ts +2 -0
  144. package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
  145. package/create-api-service/access-token-auto-refresh/es5.js +27 -26
  146. package/create-api-service/access-token-auto-refresh/index.js +27 -26
  147. package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
  148. package/create-api-service/check-token/es5.d.ts +12 -0
  149. package/create-api-service/es5.d.ts +8 -0
  150. package/create-api-service/es5.js +1397 -1358
  151. package/create-api-service/i18n/es5.d.ts +39 -0
  152. package/create-api-service/index.js +1171 -1150
  153. package/create-api-service/index.js.gz +0 -0
  154. package/create-api-service/proxy-sso/es5.d.ts +3 -0
  155. package/create-api-service/sso/es5.d.ts +21 -0
  156. package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
  157. package/curring-http/es5.d.ts +12 -0
  158. package/dimple-canvas/es5.d.ts +3 -0
  159. package/directive/auth/es5.d.ts +8 -0
  160. package/directive/auth/es5.js +50 -42
  161. package/directive/auth/index.d.ts +1 -1
  162. package/directive/auth/index.js +42 -34
  163. package/directive/auth/index.js.gz +0 -0
  164. package/directive/clickOutside/es5.d.ts +6 -0
  165. package/directive/es5.d.ts +3 -0
  166. package/directive/hoverInside/es5.d.ts +6 -0
  167. package/directive/utils/es5.d.ts +7 -0
  168. package/dom-check-in/es5.d.ts +6 -0
  169. package/dom-watcher/es5.d.ts +25 -0
  170. package/esm-map.json +66 -3
  171. package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
  172. package/hooks/use-get-auth/apis.d.ts +4 -0
  173. package/hooks/use-get-auth/es5.d.ts +8 -0
  174. package/hooks/use-get-auth/es5.js +325 -57
  175. package/hooks/use-get-auth/index.d.ts +8 -4
  176. package/hooks/use-get-auth/index.js +71 -16
  177. package/hooks/use-get-auth/index.js.gz +0 -0
  178. package/i18n-bridge/es5.d.ts +10 -0
  179. package/index.d.ts +2 -0
  180. package/index.js +2 -0
  181. package/load-js/es5.d.ts +3 -0
  182. package/nextTiken/es5.d.ts +12 -0
  183. package/oss/es5.d.ts +2 -0
  184. package/package.json +4 -3
  185. package/pinyin-first-character/es5.d.ts +2 -0
  186. package/process-engine-info/es5.d.ts +13 -0
  187. package/pure-image-src/es5.d.ts +2 -0
  188. package/size-watcher/es5.d.ts +6 -0
  189. package/style/es5.d.ts +2 -0
  190. package/theme/es5.d.ts +111 -0
  191. package/theme/es5.js +1676 -0
  192. package/theme/index.d.ts +111 -0
  193. package/theme/index.js +1118 -0
  194. package/theme/index.js.gz +0 -0
  195. package/token-tools/es5.d.ts +21 -0
  196. package/use-low-code/es5.d.ts +1 -0
  197. package/vue/es5.d.ts +1 -0
  198. package/vue/hooks/use-model-value/es5.d.ts +9 -0
  199. package/webSocket-service/es5.d.ts +41 -0
  200. package/with-install/es5.d.ts +11 -0
Binary file
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 获取用户信息存入sessionStorage
3
+ * @param token token
4
+ */
5
+ export declare const setPersonalInfo: (token: string) => any;
@@ -116,8 +116,8 @@ export interface HomeInfo {
116
116
  export interface PersonalConfigInfo {
117
117
  /** 侧边栏菜单风格(1:弹出式;2:内嵌式 )*/
118
118
  style: 1 | 2
119
- /** 皮肤风格 (default:默认皮肤;kjl:科技蓝;cjb:纯净白;ssl:深邃蓝)*/
120
- skinStyle: 'default' | 'kjl' | 'cjb' | 'ssl'
119
+ /** 皮肤风格 (default:经典蓝;cjb:纯净白;ssl:深邃蓝;dkh:大咖红)*/
120
+ skinStyle: 'default' | 'cjb' | 'ssl' | 'dkh'
121
121
  }
122
122
 
123
123
  export interface ProjectInfo {
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 判断两个数组是否内容相等
3
+ * @param a 数组一
4
+ * @param b 数组二
5
+ * @param isSort 是否排序完成之后再比较,也就是顺序无关,默认为true
6
+ * @returns 是否相等
7
+ */
8
+ export declare const arrEqual: (a: any[], b: any[], isSort?: boolean) => boolean;
9
+ /**
10
+ * 根据数组对象的某个字段去重
11
+ * @param arr 需要处理的数组
12
+ * @param val 要根据哪个字段来去重
13
+ * @returns
14
+ */
15
+ export declare const arrUnique: (arr: any[], val: string) => any;
@@ -0,0 +1 @@
1
+ export declare const calcTextWidth: (text: string, fontSize: number) => any;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 时间格式化工具
3
+ * @param value 需要格式化的时间戳,不传则默认当前时间
4
+ * @param fmt 格式化字符串格式,默认'yyyy-MM-dd HH:mm:ss'
5
+ * @returns 如2017-09-15 10:09:00
6
+ */
7
+ export declare const dateFormat: (value?: string, fmt?: string) => string;
@@ -0,0 +1,15 @@
1
+ export * from '@das-fed/upf-utils/common-tools/date-format';
2
+ export * from '@das-fed/upf-utils/common-tools/get-url-params';
3
+ export * from '@das-fed/upf-utils/common-tools/nest-tree-format';
4
+ export * from '@das-fed/upf-utils/common-tools/obj-tools';
5
+ export * from '@das-fed/upf-utils/common-tools/arr-tools';
6
+ export * from '@das-fed/upf-utils/common-tools/handle-data';
7
+ export * from '@das-fed/upf-utils/common-tools/setHtmlMinWH';
8
+ export * from '@das-fed/upf-utils/common-tools/queue-promise';
9
+ export * from '@das-fed/upf-utils/common-tools/platform-tools';
10
+ export * from '@das-fed/upf-utils/common-tools/update-fav-icon';
11
+ export * from '@das-fed/upf-utils/common-tools/update-browser-title';
12
+ export * from '@das-fed/upf-utils/common-tools/extract-file-name';
13
+ export * from '@das-fed/upf-utils/common-tools/get-file-extension';
14
+ export * from '@das-fed/upf-utils/common-tools/calc-text-width';
15
+ export * from '@das-fed/upf-utils/common-tools/timezone-format';
@@ -14,6 +14,7 @@ var updateBrowserTitle = require('@das-fed/upf-utils/common-tools/update-browser
14
14
  var extractFileName = require('@das-fed/upf-utils/common-tools/extract-file-name/es5');
15
15
  var getFileExtension = require('@das-fed/upf-utils/common-tools/get-file-extension/es5');
16
16
  var calcTextWidth = require('@das-fed/upf-utils/common-tools/calc-text-width/es5');
17
+ var timezoneFormat = require('@das-fed/upf-utils/common-tools/timezone-format/es5');
17
18
  Object.keys(dateFormat).forEach(function (k) {
18
19
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
19
20
  enumerable: true,
@@ -126,3 +127,11 @@ Object.keys(calcTextWidth).forEach(function (k) {
126
127
  }
127
128
  });
128
129
  });
130
+ Object.keys(timezoneFormat).forEach(function (k) {
131
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
132
+ enumerable: true,
133
+ get: function get() {
134
+ return timezoneFormat[k];
135
+ }
136
+ });
137
+ });
@@ -0,0 +1 @@
1
+ export declare const extractFilename: (fileUrl: string) => unknown;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 获取文件后缀名
3
+ * @param filename
4
+ * @returns
5
+ */
6
+ export declare const getFileExtension: (filename: string) => any;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * 获取url中的参数
3
+ * @param url url地址
4
+ * @param queryName 参数名称,不传则返回参数集合
5
+ * @returns
6
+ */
7
+ export declare const getUrlParams: (allUrl?: string, queryName?: string) => any;
8
+ /**
9
+ * 拼接完整的url
10
+ * @param url pathname
11
+ * @param queryObj 参数集合
12
+ * @returns
13
+ */
14
+ export declare const getFullPath: (url: string, queryObj?: any) => string;
15
+ /**
16
+ * 删除url中指定的参数,并返回最终的url
17
+ * @param queryNames 数组,需要删除的参数名集合
18
+ * @param url 指定url
19
+ * @returns
20
+ */
21
+ export declare const funcUrlDel: (queryNames: string[], url?: string) => string;
22
+ /**
23
+ * 将url中的query参数转换成对象
24
+ * @param url url链接,域名可带可不带
25
+ * @returns params url链接参数转化的Object
26
+ */
27
+ export declare const urlParamsToObject: (url: string) => any;
28
+ /**
29
+ * 将对象转换成url中的query参数
30
+ * @param params 参数对象
31
+ * @returns url形式的参数
32
+ */
33
+ export declare const objectToUrlparams: (params: any) => string;
34
+ /**
35
+ * 给url拼接params参数
36
+ * @param url 路径
37
+ * @param pathParams 参数,数组格式
38
+ * @returns
39
+ */
40
+ export declare const addPathParamsToUrl: (url: string, pathParams: string[]) => any;
41
+ /**
42
+ * 从URL中获取origin
43
+ * @param url url
44
+ * @returns origin
45
+ */
46
+ export declare function getOriginFromUrl(url: string): any;
@@ -0,0 +1,34 @@
1
+ export type I18nResourceMap = Record<string, any>;
2
+ export interface HandleI18nDataResult {
3
+ frontEnd: Record<string, I18nResourceMap> | null;
4
+ dasUiEnd: I18nResourceMap | null;
5
+ backMsg: Record<string, I18nResourceMap> | null;
6
+ }
7
+ export interface HandleI18nDataOptions {
8
+ currentLang?: string;
9
+ baseUrl?: string;
10
+ appName?: string | string[];
11
+ isPullFrontEnd?: boolean;
12
+ isPullBack?: boolean;
13
+ isDasUI?: boolean;
14
+ fallbackBaseUrl?: string;
15
+ }
16
+ /**
17
+ * 判断是否为空值
18
+ * @param value 需要判断的值
19
+ * @returns
20
+ */
21
+ export declare const isEmpty: (value: any) => boolean;
22
+ export declare const isCurrentLangInSysLang: (lang: string) => any;
23
+ /**
24
+ * 处理多语言在打包时的数据
25
+ * @param opt
26
+ * @param opt.currentLang - 当前语言,默认 'zh-CN'
27
+ * @param opt.baseUrl - 资源基础路径,默认 '/'
28
+ * @param opt.appName - 应用名称,支持 string 或 string[],默认 'jc'
29
+ * @param opt.isPullFrontEnd - 是否加载前端资源,默认 true
30
+ * @param opt.isPullBack - 是否加载后端资源,默认 false
31
+ * @param opt.isDasUI - 是否加载 DasUI 资源,默认 false
32
+ * @param opt.fallbackBaseUrl - 回退资源路径,默认 ''
33
+ */
34
+ export declare const handleI18nData: (opt?: HandleI18nDataOptions) => Promise<HandleI18nDataResult>;
@@ -17,11 +17,49 @@ var M = function M(f) {
17
17
  return (((n = config.getConfig()) == null ? undefined : n.systemLangList) || ["zh-CN", "en-US", "zh-MO"]).includes(f);
18
18
  },
19
19
  A = /*#__PURE__*/function () {
20
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(f) {
21
- var x, _x$currentLang, n, _x$baseUrl, c, _x$appName, h, _x$isPullFrontEnd, L, _x$isPullBack, N, _x$isDasUI, O, _x$fallbackBaseUrl, a, l, y, j, r, _iterator, _step, s, $, w, u, _r, _iterator2, _step2, _s, _$, _w, _u, _r2, _s2, _t3, _t4;
20
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
21
+ var f,
22
+ x,
23
+ _x$currentLang,
24
+ n,
25
+ _x$baseUrl,
26
+ c,
27
+ _x$appName,
28
+ h,
29
+ _x$isPullFrontEnd,
30
+ L,
31
+ _x$isPullBack,
32
+ N,
33
+ _x$isDasUI,
34
+ O,
35
+ _x$fallbackBaseUrl,
36
+ a,
37
+ l,
38
+ y,
39
+ j,
40
+ r,
41
+ _iterator,
42
+ _step,
43
+ s,
44
+ $,
45
+ w,
46
+ u,
47
+ _r,
48
+ _iterator2,
49
+ _step2,
50
+ _s,
51
+ _$,
52
+ _w,
53
+ _u,
54
+ _r2,
55
+ _s2,
56
+ _args4 = arguments,
57
+ _t3,
58
+ _t4;
22
59
  return _regenerator().w(function (_context4) {
23
60
  while (1) switch (_context4.p = _context4.n) {
24
61
  case 0:
62
+ f = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
25
63
  x = f || {};
26
64
  _x$currentLang = x.currentLang, n = _x$currentLang === void 0 ? "zh-CN" : _x$currentLang, _x$baseUrl = x.baseUrl, c = _x$baseUrl === void 0 ? "/" : _x$baseUrl, _x$appName = x.appName, h = _x$appName === void 0 ? "jc" : _x$appName, _x$isPullFrontEnd = x.isPullFrontEnd, L = _x$isPullFrontEnd === void 0 ? true : _x$isPullFrontEnd, _x$isPullBack = x.isPullBack, N = _x$isPullBack === void 0 ? false : _x$isPullBack, _x$isDasUI = x.isDasUI, O = _x$isDasUI === void 0 ? false : _x$isDasUI, _x$fallbackBaseUrl = x.fallbackBaseUrl, a = _x$fallbackBaseUrl === void 0 ? "" : _x$fallbackBaseUrl;
27
65
  (typeof n != "string" || !n) && (n = "zh-CN");
@@ -110,7 +148,7 @@ var M = function M(f) {
110
148
  }
111
149
  }, _callee, null, [[0, 8]]);
112
150
  }));
113
- return function u(_x4) {
151
+ return function u(_x3) {
114
152
  return _ref3.apply(this, arguments);
115
153
  };
116
154
  }();
@@ -171,7 +209,7 @@ var M = function M(f) {
171
209
  }
172
210
  }, _callee2);
173
211
  }));
174
- return function U(_x5) {
212
+ return function U(_x4) {
175
213
  return _ref4.apply(this, arguments);
176
214
  };
177
215
  }();
@@ -203,7 +241,7 @@ var M = function M(f) {
203
241
  }
204
242
  }, _callee3);
205
243
  }));
206
- return function j(_x2, _x3) {
244
+ return function j(_x, _x2) {
207
245
  return _ref2.apply(this, arguments);
208
246
  };
209
247
  }();
@@ -298,7 +336,7 @@ var M = function M(f) {
298
336
  }
299
337
  }, _callee4, null, [[10, 15, 16, 17], [1, 6, 7, 8]]);
300
338
  }));
301
- return function A(_x) {
339
+ return function A() {
302
340
  return _ref.apply(this, arguments);
303
341
  };
304
342
  }();
@@ -1,3 +1,18 @@
1
+ export type I18nResourceMap = Record<string, any>;
2
+ export interface HandleI18nDataResult {
3
+ frontEnd: Record<string, I18nResourceMap> | null;
4
+ dasUiEnd: I18nResourceMap | null;
5
+ backMsg: Record<string, I18nResourceMap> | null;
6
+ }
7
+ export interface HandleI18nDataOptions {
8
+ currentLang?: string;
9
+ baseUrl?: string;
10
+ appName?: string | string[];
11
+ isPullFrontEnd?: boolean;
12
+ isPullBack?: boolean;
13
+ isDasUI?: boolean;
14
+ fallbackBaseUrl?: string;
15
+ }
1
16
  /**
2
17
  * 判断是否为空值
3
18
  * @param value 需要判断的值
@@ -16,4 +31,4 @@ export declare const isCurrentLangInSysLang: (lang: string) => any;
16
31
  * @param opt.isDasUI - 是否加载 DasUI 资源,默认 false
17
32
  * @param opt.fallbackBaseUrl - 回退资源路径,默认 ''
18
33
  */
19
- export declare const handleI18nData: (opt: any) => unknown;
34
+ export declare const handleI18nData: (opt?: HandleI18nDataOptions) => Promise<HandleI18nDataResult>;
@@ -2,7 +2,7 @@ import { getConfig as _ } from "@das-fed/upf-utils/config";
2
2
  const M = (f) => f === null || typeof f > "u" || f === "", z = (f) => {
3
3
  var n;
4
4
  return (((n = _()) == null ? void 0 : n.systemLangList) || ["zh-CN", "en-US", "zh-MO"]).includes(f);
5
- }, A = async (f) => {
5
+ }, A = async (f = {}) => {
6
6
  const x = f || {};
7
7
  let {
8
8
  currentLang: n = "zh-CN",
@@ -12,3 +12,4 @@ export * from '@das-fed/upf-utils/common-tools/update-browser-title';
12
12
  export * from '@das-fed/upf-utils/common-tools/extract-file-name';
13
13
  export * from '@das-fed/upf-utils/common-tools/get-file-extension';
14
14
  export * from '@das-fed/upf-utils/common-tools/calc-text-width';
15
+ export * from '@das-fed/upf-utils/common-tools/timezone-format';
@@ -12,3 +12,4 @@ export * from "@das-fed/upf-utils/common-tools/update-browser-title";
12
12
  export * from "@das-fed/upf-utils/common-tools/extract-file-name";
13
13
  export * from "@das-fed/upf-utils/common-tools/get-file-extension";
14
14
  export * from "@das-fed/upf-utils/common-tools/calc-text-width";
15
+ export * from "@das-fed/upf-utils/common-tools/timezone-format";
@@ -0,0 +1,30 @@
1
+ /**
2
+ * 过滤掉叶子节点,返回嵌套数组
3
+ * @param arr 要过滤的树
4
+ * @param children 子节点指定字段名,默认‘children’
5
+ * @returns 返回过滤掉叶子节点的嵌套数组
6
+ */
7
+ export declare const findNonEmptyChildrenItems: (arr: any[], children?: string) => any[];
8
+ /**
9
+ * 树形数组转扁平数组
10
+ * @param list 要拍平的树
11
+ * @param child 子节点指定字段名,默认‘children’
12
+ * @param deleteChild 是否删除children字段,默认为true
13
+ * @returns
14
+ */
15
+ export declare const flatTree: (list: any[], child?: string, deleteChild?: boolean) => any[];
16
+ /**
17
+ * 根据条件过滤节点
18
+ * @param tree 要过滤的树
19
+ * @param predicate 过滤条件,符合条件的节点保留
20
+ * @param children 子节点指定字段名,默认‘children’
21
+ * @returns
22
+ */
23
+ export declare const filterTreeArray: (tree: any[], predicate: (node: any) => boolean, children?: string) => any;
24
+ /**
25
+ * 树结构查找节点,深度优先
26
+ * @param tree 要过滤的树
27
+ * @param func 过滤条件,符合条件的节点保留(参数为函数,返回值为布尔值)
28
+ * @returns 查找到的节点
29
+ */
30
+ export declare const treeFind: (tree: any[], func: (node: any) => boolean, children?: string) => any;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 判断两个对象内容值是否相等,无关顺序
3
+ * @param a 对象一
4
+ * @param b 对象二
5
+ * @returns 相等返回true,不相等返回false
6
+ */
7
+ export declare const objEqual: (a: Record<string, any>, b: Record<string, any>) => boolean;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * 判断一个 URL 路径是否是相对路径或者同域名
3
+ * @param url
4
+ * @returns
5
+ */
6
+ export declare const isRelativeOrSameDomain: (url: string) => boolean;
7
+ /**
8
+ * 自动拼接上showLayout=false参数
9
+ * @param url
10
+ * @returns
11
+ */
12
+ export declare const setShowLayout: (url: string) => string;
13
+ export declare const setShowWatermark: (url: string) => string;
14
+ /**
15
+ * url携带token
16
+ * @param url
17
+ * @returns
18
+ */
19
+ export declare const withToken: (url: string) => string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 串行执行promise
3
+ * @param promiseFuncArr promise数组
4
+ * @returns promise
5
+ */
6
+ export declare function runPromiseByQueue(promiseFuncArr: any[]): any;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 自定义html最小宽高
3
+ * @param layout minWidth、minHeight为空则为重置
4
+ */
5
+ export declare const setHtmlMinWH: (layout?: Record<"minWidth" | "minHeight", string>) => void;
@@ -0,0 +1,132 @@
1
+ import { Dayjs } from 'dayjs';
2
+ import { default as dayjsTimezoneIanaPlugin, PackedIanaData, PreloadDayjsIanaOptions } from './get-iana-data/dayjs-timezone-iana-plugin';
3
+ import { loadIanaData as loadMomentIanaData, loadIanaFromApi as loadMomentIanaFromApi, LoadIanaFromApiOptions, MomentWithTimezone, PackedIanaTzData } from './get-iana-data/moment-iana-loader';
4
+
5
+ export * from './get-iana-data';
6
+ export { dayjsTimezoneIanaPlugin, loadMomentIanaData, loadMomentIanaFromApi };
7
+ export type TimeValue = string | number | Date | Dayjs | null | undefined;
8
+ export type TimeZoneFlag = number | string | null | undefined;
9
+ export type TimeZoneDateLibrary = 'dayjs' | 'moment';
10
+ export type TimeZoneInputMode = 'instant' | 'local';
11
+ interface MomentFormatValue {
12
+ tz?: (timeZone: string) => MomentFormatValue;
13
+ format: (format?: string) => string;
14
+ isValid?: () => boolean;
15
+ }
16
+ export interface MomentTimezoneFormatInstance extends MomentWithTimezone {
17
+ (value?: unknown): MomentFormatValue;
18
+ tz: MomentWithTimezone['tz'] & {
19
+ (value?: unknown, timeZone?: string): MomentFormatValue;
20
+ guess?: () => string;
21
+ setDefault?: (zone: string) => void;
22
+ };
23
+ }
24
+ export interface TimeZoneOption {
25
+ /** IANA 时区标识,如 Asia/Shanghai。 */
26
+ timeZoneId: string;
27
+ /** 后端下发的本地化展示名。 */
28
+ tzShowName?: string;
29
+ /** 关联城市名,保留给后续业务自定义展示。 */
30
+ cities?: string[];
31
+ /** 1 表示存在夏令时规则,0 表示固定偏移。 */
32
+ dynamicOffsetFlag?: TimeZoneFlag;
33
+ /** 1 表示当前处于夏令时,0 表示当前非夏令时。 */
34
+ currentDstFlag?: TimeZoneFlag;
35
+ /** 标准 UTC 偏移量文本,如 +08:00。 */
36
+ baseUtcOffsetText?: string;
37
+ /** 当前实际 UTC 偏移量文本,包含夏令时偏移。 */
38
+ currentUtcOffsetText?: string;
39
+ }
40
+ export interface TimeZoneDisplayOption {
41
+ /** IANA 时区标识,作为下拉 value。 */
42
+ value: string;
43
+ /** 下拉展示文本。 */
44
+ label: string;
45
+ /** 主展示区使用的时区名称。 */
46
+ zoneName: string;
47
+ /** 是否存在夏令时规则。 */
48
+ hasDST: boolean;
49
+ /** 当前是否处于夏令时。 */
50
+ isDST: boolean;
51
+ }
52
+ export interface TimeZoneDisplayOptions {
53
+ value?: TimeValue;
54
+ locale?: string;
55
+ format?: string;
56
+ timeZone?: string;
57
+ supportedLocales?: string[];
58
+ showDaylightSavingLabel?: boolean;
59
+ showDaylightSavingMarker?: boolean;
60
+ }
61
+ export interface TimeZoneDisplayResult {
62
+ formattedValue: string;
63
+ locale: string;
64
+ timeZone: string;
65
+ timeZoneName: string;
66
+ timeZoneLabel: string;
67
+ offsetLabel: string;
68
+ offsetMinutes: number;
69
+ isDaylightSavingTime: boolean;
70
+ daylightSavingLabel: string;
71
+ }
72
+ export interface FormatClientLocalDateTimeLineOptions {
73
+ showZoneLabel?: boolean;
74
+ zoneLabel?: string;
75
+ /** 是否存在夏令时规则;未传时回退本地规则判断。 */
76
+ hasDST?: boolean;
77
+ /** 当前是否处于夏令时;未传时回退本地规则判断。 */
78
+ isDST?: boolean;
79
+ standardTimeLabel?: string;
80
+ daylightSavingLabel?: string;
81
+ format?: string;
82
+ }
83
+ export interface FormatLocalDateTimeOptions {
84
+ /** 输出格式,默认 YYYY-MM-DD HH:mm:ss。 */
85
+ format?: string;
86
+ /** 目标 IANA 时区;为空时保持时间库本机格式化行为。 */
87
+ timeZone?: string | null;
88
+ /** 使用的时间库,默认 dayjs;c3 可传 moment。 */
89
+ dateLibrary?: TimeZoneDateLibrary;
90
+ /** moment 模式必须传当前应用同一个 moment-timezone 实例。 */
91
+ moment?: MomentTimezoneFormatInstance;
92
+ /** instant 表示转换真实时间点,local 表示把输入文本按目标时区本地时间解析。 */
93
+ inputMode?: TimeZoneInputMode;
94
+ /** 未传 timeZone 时是否读取 sessionStorage/客户端时区。默认 false,兼容旧 toLocalDate。 */
95
+ useClientTimeZone?: boolean;
96
+ }
97
+ export interface ApplyIanaTimeZoneOptions {
98
+ /** 指定默认时区,后续 dayjs.tz(value) 可直接使用。 */
99
+ defaultTimeZone?: string;
100
+ }
101
+ export interface LoadIanaTimeZoneOptions extends PreloadDayjsIanaOptions, ApplyIanaTimeZoneOptions {
102
+ }
103
+ export interface ApplyIanaTimeZoneResult {
104
+ data: PackedIanaData;
105
+ knownTimeZones: string[];
106
+ }
107
+ export interface LoadMomentIanaTimeZoneOptions extends LoadIanaFromApiOptions {
108
+ url?: string;
109
+ }
110
+ export declare const isKnownTimeZone: (timeZone?: string | null) => any;
111
+ export declare const rebuildKnownTimeZoneIds: (data: Pick<PackedIanaData, "zones" | "links">) => any;
112
+ export declare const getKnownTimeZoneIds: () => any;
113
+ export declare const applyDayjsIanaTimeZoneData: (data: PackedIanaData, options?: ApplyIanaTimeZoneOptions) => Promise<ApplyIanaTimeZoneResult>;
114
+ export declare const loadDayjsIanaTimeZoneData: (options?: LoadIanaTimeZoneOptions) => Promise<ApplyIanaTimeZoneResult>;
115
+ export declare const applyMomentIanaTimeZoneData: (moment: MomentWithTimezone, data: PackedIanaTzData) => PackedIanaTzData;
116
+ export declare const loadMomentIanaTimeZoneData: (moment: MomentWithTimezone, options?: LoadMomentIanaTimeZoneOptions) => unknown;
117
+ export declare const getClientTimeZone: () => any;
118
+ export declare const resolveTimeZone: (timeZone?: string | null) => any;
119
+ export declare const setDefaultTimeZone: (timeZone?: string | null) => boolean;
120
+ export declare const normalizeLocaleCode: (locale?: string, supportedLocales?: string[]) => any;
121
+ export declare const getZoneUtcOffset: (value: TimeValue, timeZone?: string | null) => any;
122
+ export declare const formatInTimeZone: (value?: TimeValue, timeZone?: string | null, format?: string) => any;
123
+ export declare const formatLocalDateTime: (value?: TimeValue, options?: FormatLocalDateTimeOptions | string) => string;
124
+ export declare const toLocalDate: (value?: TimeValue, format?: string, options?: Omit<FormatLocalDateTimeOptions, "format">) => string;
125
+ export declare const formatTimeZoneOffsetLabel: (value?: TimeValue, timeZone?: string | null) => string;
126
+ export declare const resolveUtcOffsetFallback: (option: Pick<TimeZoneOption, "timeZoneId" | "baseUtcOffsetText" | "currentUtcOffsetText">, referenceDate?: Date) => string;
127
+ export declare const timeZoneHasDST: (timeZone?: string | null, value?: TimeValue) => boolean;
128
+ export declare const timeZoneIsDST: (timeZone?: string | null, value?: TimeValue) => boolean;
129
+ export declare const isDaylightSavingTime: (timeZone?: string | null, value?: TimeValue) => boolean;
130
+ export declare const buildTimeZoneDisplayOptions: (options: TimeZoneOption[], referenceDate?: Date) => TimeZoneDisplayOption[];
131
+ export declare const formatClientLocalDateTimeLine: (value: TimeValue, timeZone?: string | null, options?: FormatClientLocalDateTimeLineOptions) => any;
132
+ export declare const getTimeZoneDisplayInfo: (options?: TimeZoneDisplayOptions) => TimeZoneDisplayResult;