@das-fed/upf-utils 6.4.0-dev.238 → 6.4.0-dev.240

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 (190) hide show
  1. package/api-services/es5.d.ts +2 -0
  2. package/api-services/es5.js +1360 -1345
  3. package/api-services/i18n/es5.d.ts +63 -0
  4. package/api-services/index.js +1076 -1060
  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 +25 -19
  8. package/api-services/modules/app-manage/index.js +17 -15
  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 +1100 -1082
  12. package/api-services/modules/authentication/index.js +911 -891
  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 +96 -90
  16. package/api-services/modules/bems/index.js +75 -73
  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 +25 -19
  20. package/api-services/modules/contract/index.js +17 -15
  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 +23 -17
  24. package/api-services/modules/duty-manage/index.js +16 -14
  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 +829 -826
  28. package/api-services/modules/enterpriseright/index.js +651 -653
  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 +1353 -1356
  32. package/api-services/modules/file/es5.d.ts +37 -0
  33. package/api-services/modules/file/es5.js +1226 -1232
  34. package/api-services/modules/file/index.js +993 -1009
  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 +1343 -1325
  38. package/api-services/modules/gateway-edge/index.js +1140 -1120
  39. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  40. package/api-services/modules/index.js +1062 -1074
  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 +33 -27
  44. package/api-services/modules/iot/index.js +23 -21
  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 +1345 -1351
  48. package/api-services/modules/justauth/index.js +1127 -1143
  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 +1343 -1325
  52. package/api-services/modules/knowledge/index.js +1140 -1120
  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 +25 -19
  56. package/api-services/modules/link/index.js +17 -15
  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 +1100 -1106
  60. package/api-services/modules/permission/index.js +897 -913
  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 +1350 -1356
  64. package/api-services/modules/platformManage/index.js +1131 -1147
  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 +1343 -1349
  68. package/api-services/modules/portal/index.js +1126 -1142
  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 +1343 -1349
  72. package/api-services/modules/space-manage/index.js +1126 -1142
  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 +1104 -1110
  76. package/api-services/modules/super-admin/index.js +899 -915
  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 +1104 -1110
  80. package/api-services/modules/supplier/index.js +899 -915
  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 +1343 -1325
  84. package/api-services/modules/supplychain-manage/index.js +1140 -1120
  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 +25 -19
  88. package/api-services/modules/systemConfiguration/index.js +17 -15
  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 +845 -836
  92. package/api-services/modules/tool/index.js +660 -654
  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 +99 -93
  96. package/api-services/src/create-service/index.js +78 -76
  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 +48 -0
  100. package/common-info/es5.js +915 -965
  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 +1371 -1355
  105. package/common-info/getPermissionMethod/index.d.ts +27 -9
  106. package/common-info/getPermissionMethod/index.js +1141 -1125
  107. package/common-info/getPermissionMethod/index.js.gz +0 -0
  108. package/common-info/index.d.ts +1 -29
  109. package/common-info/index.js +725 -757
  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 +28 -0
  134. package/common-tools/timezone-format/es5.js +140 -0
  135. package/common-tools/timezone-format/index.d.ts +28 -0
  136. package/common-tools/timezone-format/index.js +81 -0
  137. package/common-tools/timezone-format/index.js.gz +0 -0
  138. package/common-tools/update-browser-title/es5.d.ts +1 -0
  139. package/common-tools/update-fav-icon/es5.d.ts +11 -0
  140. package/config/es5.d.ts +2 -0
  141. package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
  142. package/create-api-service/access-token-auto-refresh/es5.js +27 -26
  143. package/create-api-service/access-token-auto-refresh/index.js +27 -26
  144. package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
  145. package/create-api-service/check-token/es5.d.ts +12 -0
  146. package/create-api-service/es5.d.ts +8 -0
  147. package/create-api-service/es5.js +24 -18
  148. package/create-api-service/i18n/es5.d.ts +39 -0
  149. package/create-api-service/index.js +17 -15
  150. package/create-api-service/index.js.gz +0 -0
  151. package/create-api-service/proxy-sso/es5.d.ts +3 -0
  152. package/create-api-service/sso/es5.d.ts +21 -0
  153. package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
  154. package/curring-http/es5.d.ts +12 -0
  155. package/dimple-canvas/es5.d.ts +3 -0
  156. package/directive/auth/es5.d.ts +8 -0
  157. package/directive/clickOutside/es5.d.ts +6 -0
  158. package/directive/es5.d.ts +3 -0
  159. package/directive/hoverInside/es5.d.ts +6 -0
  160. package/directive/utils/es5.d.ts +7 -0
  161. package/dom-check-in/es5.d.ts +6 -0
  162. package/dom-watcher/es5.d.ts +25 -0
  163. package/esm-map.json +32 -7
  164. package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
  165. package/i18n-bridge/es5.d.ts +10 -0
  166. package/index.d.ts +1 -0
  167. package/index.js +1 -0
  168. package/load-js/es5.d.ts +3 -0
  169. package/nextTiken/es5.d.ts +12 -0
  170. package/oss/es5.d.ts +2 -0
  171. package/package.json +4 -3
  172. package/pinyin-first-character/es5.d.ts +2 -0
  173. package/process-engine-info/es5.d.ts +13 -0
  174. package/pure-image-src/es5.d.ts +2 -0
  175. package/size-watcher/es5.d.ts +6 -0
  176. package/style/es5.d.ts +2 -0
  177. package/theme/es5.d.ts +92 -0
  178. package/theme/es5.js +1365 -0
  179. package/theme/index.d.ts +92 -0
  180. package/theme/index.js +871 -0
  181. package/theme/index.js.gz +0 -0
  182. package/token-tools/es5.d.ts +21 -0
  183. package/use-low-code/es5.d.ts +1 -0
  184. package/vue/es5.d.ts +1 -0
  185. package/vue/hooks/use-model-value/es5.d.ts +9 -0
  186. package/webSocket-service/es5.d.ts +41 -0
  187. package/with-install/es5.d.ts +11 -0
  188. package/hooks/use-get-auth/es5.js +0 -67
  189. package/hooks/use-get-auth/index.d.ts +0 -4
  190. package/hooks/use-get-auth/index.js +0 -19
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,28 @@
1
+ import { Dayjs } from 'dayjs';
2
+
3
+ type TimeValue = string | number | Date | Dayjs | null | undefined;
4
+ export interface TimeZoneDisplayOptions {
5
+ value?: TimeValue;
6
+ locale?: string;
7
+ format?: string;
8
+ timeZone?: string;
9
+ supportedLocales?: string[];
10
+ showDaylightSavingLabel?: boolean;
11
+ showDaylightSavingMarker?: boolean;
12
+ }
13
+ export interface TimeZoneDisplayResult {
14
+ formattedValue: string;
15
+ locale: string;
16
+ timeZone: string;
17
+ timeZoneName: string;
18
+ timeZoneLabel: string;
19
+ offsetLabel: string;
20
+ offsetMinutes: number;
21
+ isDaylightSavingTime: boolean;
22
+ daylightSavingLabel: string;
23
+ }
24
+ export declare const getClientTimeZone: () => any;
25
+ export declare const normalizeLocaleCode: (locale?: string, supportedLocales?: string[]) => any;
26
+ export declare const isDaylightSavingTime: (timeZone?: string, value?: TimeValue) => boolean;
27
+ export declare const getTimeZoneDisplayInfo: (options?: TimeZoneDisplayOptions) => TimeZoneDisplayResult;
28
+ export {};
@@ -0,0 +1,140 @@
1
+ 'use strict';
2
+
3
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
4
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
6
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
7
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
8
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
+ var l = require('dayjs');
11
+ var T = require('dayjs/plugin/utc');
12
+ var w = require('dayjs/plugin/timezone');
13
+ l.extend(T);
14
+ l.extend(w);
15
+ var f = "zh-CN",
16
+ y = "YYYY.MM.DD HH:mm:ss",
17
+ D = "UTC",
18
+ m = {
19
+ zh: "夏令时",
20
+ "default": "DST"
21
+ },
22
+ u = function u() {
23
+ return l.tz.guess() || D;
24
+ },
25
+ v = function v() {
26
+ var t;
27
+ return (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" && (t = window.navigator) != null && t.language ? window.navigator.language : f;
28
+ },
29
+ S = function S(t) {
30
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
31
+ var n = t || v() || f,
32
+ r = n.toLowerCase();
33
+ if (!e.length) return r === "en" ? "en-US" : r === "zh" || r === "zh-cn" ? f : n;
34
+ var a = e.find(function (i) {
35
+ return i.toLowerCase() === r;
36
+ });
37
+ if (a) return a;
38
+ var c = r.split("-")[0],
39
+ s = e.find(function (i) {
40
+ return i.toLowerCase().split("-")[0] === c;
41
+ });
42
+ return s || (c === "en" ? e.find(function (i) {
43
+ return i.toLowerCase().startsWith("en-");
44
+ }) || n : c === "zh" ? e.find(function (i) {
45
+ return i.toLowerCase().startsWith("zh-");
46
+ }) || f : n);
47
+ },
48
+ g = function g(t) {
49
+ if (l.isDayjs(t)) return t;
50
+ if (t == null || t === "") return l();
51
+ var e = l(t);
52
+ return e.isValid() ? e : l();
53
+ },
54
+ h = function h(t) {
55
+ if (!t) return u();
56
+ try {
57
+ return new Intl.DateTimeFormat(void 0, {
58
+ timeZone: t
59
+ }), t;
60
+ } catch (_unused) {
61
+ return u();
62
+ }
63
+ },
64
+ L = function L(t) {
65
+ return "UTC".concat(t);
66
+ },
67
+ z = function z(t, e) {
68
+ var o = t.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
69
+ if (!o[1]) return e;
70
+ var n = o[1].startsWith("-") ? "-" : "+",
71
+ r = o[1].replace(/[+-]/, "").padStart(2, "0"),
72
+ a = o[2] || "00";
73
+ return "UTC".concat(n).concat(r, ":").concat(a);
74
+ },
75
+ C = function C(t, e, o) {
76
+ var r, a;
77
+ var n = L(o.format("Z"));
78
+ try {
79
+ var c = Intl.DateTimeFormat.supportedLocalesOf([e])[0] || e,
80
+ s = (a = (r = new Intl.DateTimeFormat(c, {
81
+ timeZone: t,
82
+ timeZoneName: "long"
83
+ }).formatToParts(o.toDate()).find(function (i) {
84
+ return i.type === "timeZoneName";
85
+ })) == null ? void 0 : r.value) == null ? void 0 : a.trim();
86
+ return s ? /^(gmt|utc)/i.test(s) ? z(s, n) : s : n;
87
+ } catch (_unused2) {
88
+ return n;
89
+ }
90
+ },
91
+ Z = function Z(t, e) {
92
+ var o = e.year();
93
+ return Array.from(new Set(Array.from({
94
+ length: 12
95
+ }, function (n, r) {
96
+ var a = "".concat(r + 1).padStart(2, "0");
97
+ return l.tz("".concat(o, "-").concat(a, "-15 12:00:00"), t).utcOffset();
98
+ })));
99
+ },
100
+ b = function b(t, e) {
101
+ var o = h(t),
102
+ n = g(e).tz(o),
103
+ r = Z(o, n);
104
+ return r.length <= 1 ? false : n.utcOffset() > Math.min.apply(Math, _toConsumableArray(r));
105
+ },
106
+ A = function A(t) {
107
+ var e = t.toLowerCase().split("-")[0];
108
+ return m[e] || m["default"];
109
+ },
110
+ O = function O(t) {
111
+ var _t$showDaylightSaving;
112
+ return typeof t.showDaylightSavingLabel == "boolean" ? t.showDaylightSavingLabel : (_t$showDaylightSaving = t.showDaylightSavingMarker) !== null && _t$showDaylightSaving !== void 0 ? _t$showDaylightSaving : true;
113
+ },
114
+ U = function U() {
115
+ var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
116
+ var e = S(t.locale, t.supportedLocales),
117
+ o = h(t.timeZone),
118
+ n = g(t.value).tz(o),
119
+ r = C(o, e, n),
120
+ a = L(n.format("Z")),
121
+ c = b(o, n),
122
+ s = c ? A(e) : "",
123
+ i = O(t),
124
+ d = c && i ? "".concat(r, " - ").concat(s) : r;
125
+ return {
126
+ formattedValue: n.format(t.format || y),
127
+ locale: e,
128
+ timeZone: o,
129
+ timeZoneName: r,
130
+ timeZoneLabel: d,
131
+ offsetLabel: a,
132
+ offsetMinutes: n.utcOffset(),
133
+ isDaylightSavingTime: c,
134
+ daylightSavingLabel: s
135
+ };
136
+ };
137
+ exports.getClientTimeZone = u;
138
+ exports.getTimeZoneDisplayInfo = U;
139
+ exports.isDaylightSavingTime = b;
140
+ exports.normalizeLocaleCode = S;
@@ -0,0 +1,28 @@
1
+ import { Dayjs } from 'dayjs';
2
+
3
+ type TimeValue = string | number | Date | Dayjs | null | undefined;
4
+ export interface TimeZoneDisplayOptions {
5
+ value?: TimeValue;
6
+ locale?: string;
7
+ format?: string;
8
+ timeZone?: string;
9
+ supportedLocales?: string[];
10
+ showDaylightSavingLabel?: boolean;
11
+ showDaylightSavingMarker?: boolean;
12
+ }
13
+ export interface TimeZoneDisplayResult {
14
+ formattedValue: string;
15
+ locale: string;
16
+ timeZone: string;
17
+ timeZoneName: string;
18
+ timeZoneLabel: string;
19
+ offsetLabel: string;
20
+ offsetMinutes: number;
21
+ isDaylightSavingTime: boolean;
22
+ daylightSavingLabel: string;
23
+ }
24
+ export declare const getClientTimeZone: () => any;
25
+ export declare const normalizeLocaleCode: (locale?: string, supportedLocales?: string[]) => any;
26
+ export declare const isDaylightSavingTime: (timeZone?: string, value?: TimeValue) => boolean;
27
+ export declare const getTimeZoneDisplayInfo: (options?: TimeZoneDisplayOptions) => TimeZoneDisplayResult;
28
+ export {};