@das-fed/upf-utils 6.4.0-dev.237 → 6.4.0-dev.239

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 (217) hide show
  1. package/api-services/es5.d.ts +2 -0
  2. package/api-services/es5.js +2176 -2106
  3. package/api-services/i18n/es5.d.ts +63 -0
  4. package/api-services/index.js +1654 -1602
  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 +2305 -2223
  8. package/api-services/modules/app-manage/index.js +1900 -1830
  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 +2373 -2279
  12. package/api-services/modules/authentication/index.js +1979 -1891
  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 +2190 -2120
  16. package/api-services/modules/bems/index.js +1812 -1760
  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 +2305 -2223
  20. package/api-services/modules/contract/index.js +1900 -1830
  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 +2190 -2120
  24. package/api-services/modules/duty-manage/index.js +1813 -1761
  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 +2305 -2223
  28. package/api-services/modules/enterpriseright/index.js +1900 -1830
  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 +1846 -1764
  32. package/api-services/modules/file/es5.d.ts +37 -0
  33. package/api-services/modules/file/es5.js +1900 -1818
  34. package/api-services/modules/file/index.js +1469 -1399
  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 +2365 -2274
  38. package/api-services/modules/gateway-edge/index.js +1973 -1889
  39. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  40. package/api-services/modules/index.js +1374 -1304
  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 +2160 -2078
  44. package/api-services/modules/iot/index.js +1765 -1695
  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 +2370 -2279
  48. package/api-services/modules/justauth/index.js +1975 -1891
  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 +2303 -2223
  52. package/api-services/modules/knowledge/index.js +1898 -1832
  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 +2373 -2279
  56. package/api-services/modules/link/index.js +1979 -1891
  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 +2386 -2316
  60. package/api-services/modules/permission/index.js +1979 -1927
  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 +2323 -2241
  64. package/api-services/modules/platformManage/index.js +1911 -1841
  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 +2189 -2119
  68. package/api-services/modules/portal/index.js +1812 -1760
  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 +2189 -2119
  72. package/api-services/modules/space-manage/index.js +1812 -1760
  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 +2276 -2191
  76. package/api-services/modules/super-admin/index.js +1875 -1801
  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 +2407 -2334
  80. package/api-services/modules/supplier/index.js +1997 -1941
  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 +2305 -2223
  84. package/api-services/modules/supplychain-manage/index.js +1900 -1830
  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 +2398 -2326
  88. package/api-services/modules/systemConfiguration/index.js +1990 -1934
  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 +2403 -2330
  92. package/api-services/modules/tool/index.js +1994 -1938
  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 +2101 -2019
  96. package/api-services/src/create-service/index.js +1718 -1648
  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 +2246 -2229
  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 +2187 -2107
  105. package/common-info/getPermissionMethod/index.d.ts +27 -9
  106. package/common-info/getPermissionMethod/index.js +1774 -1708
  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 +1811 -1792
  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/set-personal-info/es5.js +1073 -997
  113. package/common-info/set-personal-info/index.js +895 -827
  114. package/common-info/set-personal-info/index.js.gz +0 -0
  115. package/common-info/type.d.ts +2 -2
  116. package/common-tools/arr-tools/es5.d.ts +15 -0
  117. package/common-tools/calc-text-width/es5.d.ts +1 -0
  118. package/common-tools/date-format/es5.d.ts +7 -0
  119. package/common-tools/es5.d.ts +15 -0
  120. package/common-tools/es5.js +9 -0
  121. package/common-tools/extract-file-name/es5.d.ts +1 -0
  122. package/common-tools/extract-file-name/es5.js +1074 -998
  123. package/common-tools/extract-file-name/index.js +889 -821
  124. package/common-tools/extract-file-name/index.js.gz +0 -0
  125. package/common-tools/get-file-extension/es5.d.ts +6 -0
  126. package/common-tools/get-url-params/es5.d.ts +46 -0
  127. package/common-tools/handle-data/es5.d.ts +34 -0
  128. package/common-tools/handle-data/es5.js +45 -7
  129. package/common-tools/handle-data/index.d.ts +16 -1
  130. package/common-tools/handle-data/index.js +1 -1
  131. package/common-tools/handle-data/index.js.gz +0 -0
  132. package/common-tools/index.d.ts +1 -0
  133. package/common-tools/index.js +1 -0
  134. package/common-tools/nest-tree-format/es5.d.ts +30 -0
  135. package/common-tools/obj-tools/es5.d.ts +7 -0
  136. package/common-tools/platform-tools/es5.d.ts +19 -0
  137. package/common-tools/queue-promise/es5.d.ts +6 -0
  138. package/common-tools/setHtmlMinWH/es5.d.ts +5 -0
  139. package/common-tools/timezone-format/es5.d.ts +28 -0
  140. package/common-tools/timezone-format/es5.js +140 -0
  141. package/common-tools/timezone-format/index.d.ts +28 -0
  142. package/common-tools/timezone-format/index.js +81 -0
  143. package/common-tools/timezone-format/index.js.gz +0 -0
  144. package/common-tools/update-browser-title/es5.d.ts +1 -0
  145. package/common-tools/update-browser-title/es5.js +1 -1
  146. package/common-tools/update-fav-icon/es5.d.ts +11 -0
  147. package/common-tools/update-fav-icon/es5.js +1 -1
  148. package/config/es5.d.ts +2 -0
  149. package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
  150. package/create-api-service/access-token-auto-refresh/es5.js +28 -27
  151. package/create-api-service/access-token-auto-refresh/index.js +27 -26
  152. package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
  153. package/create-api-service/check-token/es5.d.ts +12 -0
  154. package/create-api-service/check-token/es5.js +1 -1
  155. package/create-api-service/es5.d.ts +8 -0
  156. package/create-api-service/es5.js +2102 -2020
  157. package/create-api-service/i18n/es5.d.ts +39 -0
  158. package/create-api-service/index.js +1719 -1649
  159. package/create-api-service/index.js.gz +0 -0
  160. package/create-api-service/proxy-sso/es5.d.ts +3 -0
  161. package/create-api-service/sso/es5.d.ts +21 -0
  162. package/create-api-service/sso/es5.js +1242 -1166
  163. package/create-api-service/sso/index.js +1006 -938
  164. package/create-api-service/sso/index.js.gz +0 -0
  165. package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
  166. package/create-api-service/token-refresh-shared/es5.js +1125 -1049
  167. package/create-api-service/token-refresh-shared/index.js +927 -859
  168. package/create-api-service/token-refresh-shared/index.js.gz +0 -0
  169. package/curring-http/es5.d.ts +12 -0
  170. package/curring-http/es5.js +1442 -1366
  171. package/curring-http/index.js +1132 -1064
  172. package/curring-http/index.js.gz +0 -0
  173. package/dimple-canvas/es5.d.ts +3 -0
  174. package/directive/auth/es5.d.ts +8 -0
  175. package/directive/clickOutside/es5.d.ts +6 -0
  176. package/directive/clickOutside/es5.js +1 -1
  177. package/directive/es5.d.ts +3 -0
  178. package/directive/hoverInside/es5.d.ts +6 -0
  179. package/directive/hoverInside/es5.js +1 -1
  180. package/directive/utils/es5.d.ts +7 -0
  181. package/directive/utils/es5.js +1 -1
  182. package/dom-check-in/es5.d.ts +6 -0
  183. package/dom-watcher/es5.d.ts +25 -0
  184. package/esm-map.json +32 -7
  185. package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
  186. package/i18n-bridge/es5.d.ts +10 -0
  187. package/index.d.ts +1 -0
  188. package/index.js +1 -0
  189. package/load-js/es5.d.ts +3 -0
  190. package/nextTiken/es5.d.ts +12 -0
  191. package/oss/es5.d.ts +2 -0
  192. package/package.json +4 -3
  193. package/pinyin-first-character/es5.d.ts +2 -0
  194. package/pinyin-first-character/es5.js +47 -45
  195. package/pinyin-first-character/index.js +37 -35
  196. package/pinyin-first-character/index.js.gz +0 -0
  197. package/process-engine-info/es5.d.ts +13 -0
  198. package/pure-image-src/es5.d.ts +2 -0
  199. package/size-watcher/es5.d.ts +6 -0
  200. package/style/es5.d.ts +2 -0
  201. package/style/es5.js +11 -11
  202. package/style/index.js +10 -10
  203. package/style/index.js.gz +0 -0
  204. package/theme/es5.d.ts +92 -0
  205. package/theme/es5.js +1365 -0
  206. package/theme/index.d.ts +92 -0
  207. package/theme/index.js +871 -0
  208. package/theme/index.js.gz +0 -0
  209. package/token-tools/es5.d.ts +21 -0
  210. package/use-low-code/es5.d.ts +1 -0
  211. package/vue/es5.d.ts +1 -0
  212. package/vue/hooks/use-model-value/es5.d.ts +9 -0
  213. package/webSocket-service/es5.d.ts +41 -0
  214. package/with-install/es5.d.ts +11 -0
  215. package/hooks/use-get-auth/es5.js +0 -67
  216. package/hooks/use-get-auth/index.d.ts +0 -4
  217. package/hooks/use-get-auth/index.js +0 -19
Binary file
@@ -0,0 +1,3 @@
1
+ import { useDimpleCanvas, Konva } from '@das-fed/upf-utils/dimple-canvas/use-dimple-canvas';
2
+
3
+ export { useDimpleCanvas, Konva };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * 按钮权限控制工具,只支持判断当前菜单下的按钮权限,使用时传入按钮权限code,支持单个或数组形式。
3
+ * @param el 绑定的dom
4
+ * @param binding 使用指令时对应binding,使用函数时对应options
5
+ * @param vnode
6
+ * @returns 是否有权限
7
+ */
8
+ export declare const vAuth: (el: any, binding: any) => boolean;
@@ -0,0 +1,6 @@
1
+ import { Directive } from 'vue';
2
+
3
+ /**
4
+ * 点击当前区域或者指定区域之外的位置
5
+ */
6
+ export declare const vClickOutside: Directive<HTMLElement>;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
4
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
4
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
5
5
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
6
6
  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; } }
7
7
  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; }
@@ -0,0 +1,3 @@
1
+ export { vAuth } from '@das-fed/upf-utils/directive/auth';
2
+ export { vClickOutside } from '@das-fed/upf-utils/directive/clickOutside';
3
+ export { vHoverInside } from '@das-fed/upf-utils/directive/hoverInside';
@@ -0,0 +1,6 @@
1
+ import { Directive } from 'vue';
2
+
3
+ /**
4
+ * 指令:鼠标移入移出dom事件
5
+ */
6
+ export declare const vHoverInside: Directive<HTMLElement>;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
4
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var _o = function _o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; _o("next", 0), _o("throw", 1), _o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
4
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
5
5
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
6
6
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
7
7
  var utils = require('@das-fed/upf-utils/directive/utils/es5');
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 获取指定dom
3
+ * @param el
4
+ * @param options
5
+ * @returns
6
+ */
7
+ export declare const getEl: (el: HTMLElement, options: any) => Promise<HTMLElement>;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
4
- function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
4
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
5
5
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
6
6
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
7
7
  var a = /*#__PURE__*/function () {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 判断鼠标是否落在一个块级元素内部
3
+ * @param {*} dom 块级元素
4
+ * @returns
5
+ */
6
+ export declare const domCheckIn: (dom: HTMLElement) => boolean;
@@ -0,0 +1,25 @@
1
+ interface Config {
2
+ /** 观察目标节点的子节点的新增和删除;*/
3
+ childList?: boolean;
4
+ /** 观察目标节点的属性节点(新增或删除了某个属性,以及某个属性的属性值发生了变化); */
5
+ attributes?: boolean;
6
+ /** 要监视的特定属性名称的数组,如果未包含此属性,则对所有属性的更改都会触发变动通知; */
7
+ attributeFilter?: any[];
8
+ /** 在attributes属性已经设为true的前提下, 将发生变化的属性节点之前的属性值记录下来(记录在MutationRecord对象的oldValue属性中); */
9
+ attributeOldValue?: boolean;
10
+ /** 在characterData属性已经设为true的前提下,将发生变化characterData节点之前的文本内容记录下来(记录在MutationRecord对象的oldValue属性中); */
11
+ characterDataOldValue?: boolean;
12
+ /** 如果目标节点为characterData节点(一种抽象接口,具体可以为文本节点、注释节点,以及处理指令节点)时,也要观察该节点的文本内容是否发生变化; */
13
+ characterData?: boolean;
14
+ /** 观察目标节点的所有后代节点(观察目标节点所包含的整棵DOM树上的上述三种节点变化); */
15
+ subtree?: boolean;
16
+ }
17
+ /**
18
+ * dom监听器
19
+ * @param cb 回调函数
20
+ * @param dom 目标dom
21
+ * @param config 配置
22
+ * @returns
23
+ */
24
+ declare const DomWatcher: (cb: (list: MutationRecord[]) => void, dom: HTMLElement, config?: Config) => any;
25
+ export { DomWatcher };
package/esm-map.json CHANGED
@@ -46,15 +46,36 @@
46
46
  "getTenantInfo": "/common-info/index",
47
47
  "getProjectInfo": "/common-info/index",
48
48
  "getHomeInfo": "/common-info/index",
49
- "getPageAuth": "/common-info/index",
50
- "getPageAuthBtn": "/common-info/index",
51
- "getSubApps": "/common-info/index",
52
- "getMenus": "/common-info/index",
53
- "getTabInfo": "/common-info/index",
54
49
  "getMinioAddress": "/common-info/index",
55
50
  "getInstanceInfo": "/common-info/index",
56
51
  "getFavIcon": "/common-info/index",
57
52
  "dateFormat": "/common-tools/date-format/index",
53
+ "getClientTimeZone": "/common-tools/timezone-format/index",
54
+ "normalizeLocaleCode": "/common-tools/timezone-format/index",
55
+ "isDaylightSavingTime": "/common-tools/timezone-format/index",
56
+ "getTimeZoneDisplayInfo": "/common-tools/timezone-format/index",
57
+ "mixHexColor": "/theme/index",
58
+ "toRgbaColor": "/theme/index",
59
+ "resolveThemeBridgeVariables": "/theme/index",
60
+ "toLegacyThemeVariables": "/theme/index",
61
+ "toElementThemeVariables": "/theme/index",
62
+ "toDasUiColorOverrides": "/theme/index",
63
+ "toUpfComponentThemeVariables": "/theme/index",
64
+ "buildRuntimeThemeVariables": "/theme/index",
65
+ "applyThemeVariablesToDocument": "/theme/index",
66
+ "applyThemeEventToDocument": "/theme/index",
67
+ "getThemeAPI": "/theme/index",
68
+ "getCurrentTheme": "/theme/index",
69
+ "getThemeVariables": "/theme/index",
70
+ "changeTheme": "/theme/index",
71
+ "syncThemeFromHost": "/theme/index",
72
+ "syncHostThemeRoot": "/theme/index",
73
+ "initSubAppThemeSync": "/theme/index",
74
+ "initHostThemeRootSync": "/theme/index",
75
+ "getThemeVariable": "/theme/index",
76
+ "getVar": "/theme/index",
77
+ "getVarValue": "/theme/index",
78
+ "useSubAppTheme": "/theme/vue",
58
79
  "getOriginFromUrl": "/common-tools/get-url-params/index",
59
80
  "getUrlParams": "/common-tools/get-url-params/index",
60
81
  "getFullPath": "/common-tools/get-url-params/index",
@@ -126,7 +147,6 @@
126
147
  "getQuery": "/create-api-service/sso/index",
127
148
  "tokenStorage": "/create-api-service/sso/index",
128
149
  "login": "/create-api-service/sso/index",
129
- "useGetAuth": "/hooks/use-get-auth/index",
130
150
  "getPinyinFirstCharacter": "/pinyin-first-character/index",
131
151
  "useZIndex": "/hooks/popup-manager/use-zindex/index",
132
152
  "Graph": "/dimple-canvas/use-dimple-canvas/core/antv-x6/index",
@@ -176,5 +196,10 @@
176
196
  "resolveRefreshResult": "/create-api-service/token-refresh-shared/index",
177
197
  "rejectRefreshResult": "/create-api-service/token-refresh-shared/index",
178
198
  "clearRefreshState": "/create-api-service/token-refresh-shared/index",
179
- "refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index"
199
+ "refreshTokenWithRetry": "/create-api-service/token-refresh-shared/index",
200
+ "LEGACY_THEME_BRIDGE_ITEMS": "/theme/index",
201
+ "ELEMENT_THEME_BRIDGE_ITEMS": "/theme/index",
202
+ "DAS_UI_THEME_BRIDGE_ITEMS": "/theme/index",
203
+ "UPF_COMPONENT_THEME_BRIDGE_ITEMS": "/theme/index",
204
+ "getHostThemeSnapshotFromWindowName": "/theme/index"
180
205
  }
@@ -0,0 +1,3 @@
1
+ export declare const useZIndex: () => {
2
+ nextZIndex: () => any;
3
+ };
@@ -0,0 +1,10 @@
1
+ export type I18nBridgeLangRef = {
2
+ value: string;
3
+ };
4
+ export type I18nBridgeT = (key: string, ...args: any[]) => string;
5
+ export type I18nBridgeState = {
6
+ t: I18nBridgeT;
7
+ currentLang: I18nBridgeLangRef;
8
+ };
9
+ export declare const setI18nBridge: (next: Partial<I18nBridgeState>) => void;
10
+ export declare const getI18nBridge: () => I18nBridgeState;
package/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from '@das-fed/upf-utils/directive';
2
2
  export * from '@das-fed/upf-utils/with-install';
3
+ export * from '@das-fed/upf-utils/theme';
package/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "@das-fed/upf-utils/directive";
2
2
  export * from "@das-fed/upf-utils/with-install";
3
+ export * from "@das-fed/upf-utils/theme";
@@ -0,0 +1,3 @@
1
+ /** 使用promise加载js的工具 */
2
+ declare const loadJs: (src: string) => any;
3
+ export { loadJs };
@@ -0,0 +1,12 @@
1
+ import { PersonalInfo, TenantInfo } from '@das-fed/upf-utils/common-info/type';
2
+
3
+ /** 等待获取到token */
4
+ export declare const tokenNextTick_1: () => Promise<string>;
5
+ /** 等待获取到projectId */
6
+ export declare const projectNextTick: () => Promise<string | number>;
7
+ /** 等待获取到token和projectId */
8
+ export declare const tokenNextTick: () => Promise<boolean>;
9
+ /** 等待获取到userInfo */
10
+ export declare const userInfoNextTick: () => Promise<PersonalInfo>;
11
+ /** 等待获取到租户信息 */
12
+ export declare const tenantInfoNextTick: () => Promise<TenantInfo>;
package/oss/es5.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare const oss: (urlName: any) => any;
2
+ export { oss };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@das-fed/upf-utils",
3
- "version": "6.4.0-dev.237",
3
+ "version": "6.4.0-dev.239",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -9,6 +9,7 @@
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
11
  "@antv/x6": "^2.18.1",
12
+ "@das-fed/mframe": "^0.0.0",
12
13
  "@vue/shared": "^3.4.21",
13
14
  "@vueuse/core": "^9.6.0",
14
15
  "axios": "^1.6.7",
@@ -21,8 +22,8 @@
21
22
  },
22
23
  "devDependencies": {
23
24
  "@babel/preset-env": "7.26.0",
24
- "@das-fed/upf-cli": "6.4.0-dev.237",
25
- "@das-fed/upf-web": "6.4.0-dev.237",
25
+ "@das-fed/upf-cli": "6.4.0-dev.239",
26
+ "@das-fed/upf-web": "6.4.0-dev.239",
26
27
  "@rollup/plugin-babel": "6.0.4",
27
28
  "@types/js-cookie": "^3.0.6",
28
29
  "@types/lodash-es": "^4.17.12",
@@ -0,0 +1,2 @@
1
+ /** 获取输入内容中的中文拼音首字符,如:汉字 --> hz; test汉字拼音test --> hzpy */
2
+ export declare const getPinyinFirstCharacter: (value: string) => any;
@@ -4099,7 +4099,7 @@ var Z = nn(),
4099
4099
  un = Object.keys(O);
4100
4100
  function sn(n, i, g) {
4101
4101
  if (un.indexOf(n) === -1) return e(n);
4102
- if (i === g && i && e(i) !== i) return f(e(n));
4102
+ if (i === g && i && e(i) !== i) return q(e(n));
4103
4103
  if (g && !hn[n].includes(g)) {
4104
4104
  var h = e(g);
4105
4105
  if (h !== g) {
@@ -8734,7 +8734,7 @@ var a = {
8734
8734
  dict: Symbol("dict4")
8735
8735
  };
8736
8736
  }),
8737
- _ = {
8737
+ v = {
8738
8738
  巴尔干半岛: "bā ěr gàn bàn dǎo",
8739
8739
  巴尔喀什湖: "bā ěr kā shí hú",
8740
8740
  不幸而言中: "bú xìng ér yán zhòng",
@@ -8751,17 +8751,17 @@ var a = {
8751
8751
  眼不见为净: "yǎn bú jiàn wéi jìng",
8752
8752
  竹筒倒豆子: "zhú tǒng dào dòu zi"
8753
8753
  },
8754
- jn = Object.keys(_).map(function (n) {
8754
+ jn = Object.keys(v).map(function (n) {
8755
8755
  return {
8756
8756
  zh: n,
8757
- pinyin: _[n],
8757
+ pinyin: v[n],
8758
8758
  probability: 2e-8,
8759
8759
  length: 5,
8760
8760
  priority: j.Normal,
8761
8761
  dict: Symbol("dict5")
8762
8762
  };
8763
8763
  });
8764
- function v(n, i) {
8764
+ function _(n, i) {
8765
8765
  return n && (n.decimal < i.decimal || n.decimal === i.decimal && n.probability > i.probability) ? n : i;
8766
8766
  }
8767
8767
  function E(n) {
@@ -8788,14 +8788,14 @@ function xn(n, i) {
8788
8788
  patterns: z.patterns,
8789
8789
  concatPattern: u
8790
8790
  };
8791
- E(y), g[l] = v(g[l], y), u = n[--h];
8791
+ E(y), g[l] = _(g[l], y), u = n[--h];
8792
8792
  }
8793
8793
  var o = {
8794
8794
  probability: 1e-13 * z.probability,
8795
8795
  decimal: 0,
8796
8796
  patterns: z.patterns
8797
8797
  };
8798
- E(o), g[s] = v(g[s], o), g[s].concatPattern && (g[s].patterns = g[s].patterns.concat(g[s].concatPattern), g[s].concatPattern = undefined, delete g[s + 1]);
8798
+ E(o), g[s] = _(g[s], o), g[s].concatPattern && (g[s].patterns = g[s].patterns.concat(g[s].concatPattern), g[s].concatPattern = undefined, delete g[s + 1]);
8799
8799
  }
8800
8800
  return g[0].patterns.reverse();
8801
8801
  }
@@ -8854,12 +8854,12 @@ var $ = /*#__PURE__*/_createClass(function $(i) {
8854
8854
  _classCallCheck(this, $);
8855
8855
  this.children = /* @__PURE__ */new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = h;
8856
8856
  });
8857
- var qn = /*#__PURE__*/function () {
8858
- function qn() {
8859
- _classCallCheck(this, qn);
8857
+ var fn = /*#__PURE__*/function () {
8858
+ function fn() {
8859
+ _classCallCheck(this, fn);
8860
8860
  this.dictMap = /* @__PURE__ */new Map(), this.queues = [], this.root = new $(null);
8861
8861
  }
8862
- return _createClass(qn, [{
8862
+ return _createClass(fn, [{
8863
8863
  key: "build",
8864
8864
  value: function build(i) {
8865
8865
  this.buildTrie(i), this.buildFailPointer();
@@ -8984,9 +8984,9 @@ var qn = /*#__PURE__*/function () {
8984
8984
  }
8985
8985
  }]);
8986
8986
  }();
8987
- var fn = [].concat(_toConsumableArray(jn), _toConsumableArray(tn), _toConsumableArray(cn), _toConsumableArray(ln), _toConsumableArray(gn), _toConsumableArray(yn)),
8988
- U = new qn();
8989
- U.build(fn);
8987
+ var qn = [].concat(_toConsumableArray(jn), _toConsumableArray(tn), _toConsumableArray(cn), _toConsumableArray(ln), _toConsumableArray(gn), _toConsumableArray(yn)),
8988
+ U = new fn();
8989
+ U.build(qn);
8990
8990
  var mn = new F(),
8991
8991
  pn = function pn() {
8992
8992
  return mn;
@@ -9019,9 +9019,9 @@ var mn = new F(),
9019
9019
  var _b = w(l.zh);
9020
9020
  i[o + _t] = {
9021
9021
  origin: _b[_t],
9022
- result: y[c],
9022
+ result: y[c] || "",
9023
9023
  isZh: true,
9024
- originPinyin: y[c]
9024
+ originPinyin: y[c] || ""
9025
9025
  }, c++;
9026
9026
  }
9027
9027
  o += l.length, s++;
@@ -9041,7 +9041,7 @@ var mn = new F(),
9041
9041
  matches: u
9042
9042
  };
9043
9043
  },
9044
- f = function f(n) {
9044
+ q = function q(n) {
9045
9045
  return n.replace(/(ā|á|ǎ|à)/g, "a").replace(/(ō|ó|ǒ|ò)/g, "o").replace(/(ē|é|ě|è)/g, "e").replace(/(ī|í|ǐ|ì)/g, "i").replace(/(ū|ú|ǔ|ù)/g, "u").replace(/(ǖ|ǘ|ǚ|ǜ)/g, "ü").replace(/(n̄|ń|ň|ǹ)/g, "n").replace(/(m̄|ḿ|m̌|m̀)/g, "m").replace(/(ê̄|ế|ê̌|ề)/g, "ê");
9046
9046
  },
9047
9047
  W = function W(n) {
@@ -9073,20 +9073,20 @@ var mn = new F(),
9073
9073
  originPinyin: n
9074
9074
  }];
9075
9075
  },
9076
- q = function q(n) {
9077
- var i = n.split(" "),
9078
- g = [],
9079
- h = [];
9080
- var _iterator3 = _createForOfIteratorHelper(i),
9076
+ f = function f(n, i) {
9077
+ var g = n.split(" "),
9078
+ h = [],
9079
+ u = [];
9080
+ var _iterator3 = _createForOfIteratorHelper(g),
9081
9081
  _step3;
9082
9082
  try {
9083
9083
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
9084
- var u = _step3.value;
9084
+ var s = _step3.value;
9085
9085
  for (var _i = 0, _G = G; _i < _G.length; _i++) {
9086
- var s = _G[_i];
9087
- if (u.startsWith(s)) {
9088
- var z = u.slice(s.length);
9089
- J.indexOf(s) !== -1 && K.indexOf(z) !== -1 && (z = X[z]), g.push(s), h.push(z);
9086
+ var z = _G[_i];
9087
+ if (s.startsWith(z)) {
9088
+ var o = s.slice(z.length);
9089
+ J.indexOf(z) !== -1 && K.indexOf(o) !== -1 && (o = X[o]), h.push(z), u.push(o);
9090
9090
  break;
9091
9091
  }
9092
9092
  }
@@ -9096,19 +9096,21 @@ var mn = new F(),
9096
9096
  } finally {
9097
9097
  _iterator3.f();
9098
9098
  }
9099
- return {
9100
- "final": h.join(" "),
9101
- initial: g.join(" ")
9099
+ return i === "standard" && h.forEach(function (s, z) {
9100
+ (s === "y" || s === "w") && (h[z] = "");
9101
+ }), {
9102
+ "final": u.join(" "),
9103
+ initial: h.join(" ")
9102
9104
  // 声母
9103
9105
  };
9104
9106
  },
9105
9107
  r = function r(n) {
9106
- var _q = q(n),
9107
- i = _q["final"];
9108
+ var _f = f(n),
9109
+ i = _f["final"];
9108
9110
  var g = "",
9109
9111
  h = "",
9110
9112
  u = "";
9111
- return Y.indexOf(f(i)) !== -1 ? (g = i[0], h = i[1], u = i.slice(2)) : (h = i[0] || "", u = i.slice(1) || ""), {
9113
+ return Y.indexOf(q(i)) !== -1 ? (g = i[0], h = i[1], u = i.slice(2)) : (h = i[0] || "", u = i.slice(1) || ""), {
9112
9114
  head: g,
9113
9115
  body: h,
9114
9116
  tail: u
@@ -9127,7 +9129,7 @@ var mn = new F(),
9127
9129
  }), o.join(" ");
9128
9130
  },
9129
9131
  Pn = function Pn(n, i) {
9130
- var g = f(n).split(" "),
9132
+ var g = q(n).split(" "),
9131
9133
  h = m(i).split(" "),
9132
9134
  u = [];
9133
9135
  return g.forEach(function (s, z) {
@@ -9176,12 +9178,12 @@ var Dn = function Dn(n, i) {
9176
9178
  break;
9177
9179
  case "initial":
9178
9180
  n.forEach(function (g) {
9179
- g.result = g.isZh ? q(g.result).initial : "";
9181
+ g.result = g.isZh ? f(g.result, i.initialPattern).initial : "";
9180
9182
  });
9181
9183
  break;
9182
9184
  case "final":
9183
9185
  n.forEach(function (g) {
9184
- g.result = g.isZh ? q(g.result)["final"] : "";
9186
+ g.result = g.isZh ? f(g.result, i.initialPattern)["final"] : "";
9185
9187
  });
9186
9188
  break;
9187
9189
  case "first":
@@ -9212,7 +9214,7 @@ var Dn = function Dn(n, i) {
9212
9214
  break;
9213
9215
  case "none":
9214
9216
  n.forEach(function (g) {
9215
- g.isZh && (g.result = f(g.result));
9217
+ g.isZh && (g.result = q(g.result));
9216
9218
  });
9217
9219
  break;
9218
9220
  case "num":
@@ -9226,7 +9228,7 @@ var Dn = function Dn(n, i) {
9226
9228
  },
9227
9229
  Cn = function Cn(n, i) {
9228
9230
  i.v && n.forEach(function (g) {
9229
- g.isZh && (g.result = g.result.replace(/ü/g, "v"));
9231
+ g.isZh && (g.result = g.result.replace(/ü/g, typeof i.v == "string" ? i.v : "v"));
9230
9232
  });
9231
9233
  },
9232
9234
  Mn = function Mn(n, i, g) {
@@ -9241,9 +9243,9 @@ var Dn = function Dn(n, i) {
9241
9243
  return h.result;
9242
9244
  }) : i.type === "all" ? n.map(function (h) {
9243
9245
  var u = h.isZh ? h.result : "",
9244
- _q2 = q(u),
9245
- s = _q2.initial,
9246
- z = _q2["final"],
9246
+ _f2 = f(u, i.initialPattern),
9247
+ s = _f2.initial,
9248
+ z = _f2["final"],
9247
9249
  _r = r(u),
9248
9250
  o = _r.head,
9249
9251
  l = _r.body,
@@ -9288,7 +9290,7 @@ var Dn = function Dn(n, i) {
9288
9290
  toneSandhi: true,
9289
9291
  segmentit: 2
9290
9292
  };
9291
- function _n(n, i) {
9293
+ function vn(n, i) {
9292
9294
  if (i = Object.assign(Object.assign({}, Nn), i || {}), !Sn(n)) return n;
9293
9295
  if (n === "") return i.type === "array" || i.type === "all" ? [] : "";
9294
9296
  i.surname === undefined && (i.mode === "surname" ? i.surname = "all" : i.surname = "off"), i.type === "all" && (i.pattern = "pinyin"), i.pattern === "num" && (i.toneType = "none"), i.removeNonZh && (i.nonZh = "removed");
@@ -9302,12 +9304,12 @@ var k;
9302
9304
  n[n.AllSegment = 1] = "AllSegment", n[n.AllArray = 2] = "AllArray", n[n.AllString = 3] = "AllString", n[n.PinyinSegment = 4] = "PinyinSegment", n[n.PinyinArray = 5] = "PinyinArray", n[n.PinyinString = 6] = "PinyinString", n[n.ZhSegment = 7] = "ZhSegment", n[n.ZhArray = 8] = "ZhArray", n[n.ZhString = 9] = "ZhString";
9303
9305
  })(k || (k = {}));
9304
9306
  k.AllSegment;
9305
- var vn = function vn(n) {
9306
- return _n(n, {
9307
+ var _n = function _n(n) {
9308
+ return vn(n, {
9307
9309
  pattern: "first",
9308
9310
  toneType: "none",
9309
9311
  type: "string",
9310
9312
  separator: ""
9311
9313
  });
9312
9314
  };
9313
- exports.getPinyinFirstCharacter = vn;
9315
+ exports.getPinyinFirstCharacter = _n;