@das-fed/utils 6.3.0-beta.1 → 6.3.0-beta.11

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 (169) hide show
  1. package/__VLS_types.d.ts +124 -0
  2. package/api-services/modules/{file.d.ts → file/index.d.ts} +4 -4
  3. package/api-services/modules/{file.js → file/index.js} +18 -36
  4. package/api-services/modules/file/index.js.gz +0 -0
  5. package/api-services/modules/index.js.gz +0 -0
  6. package/atob/index.d.ts +2 -2
  7. package/common-info/{getIframeUrl.js → getIframeUrl/index.js} +1 -2
  8. package/common-info/getInfoFromUrl/index.js +84 -0
  9. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  10. package/common-info/index.d.ts +1 -1
  11. package/common-info/index.js +2 -4
  12. package/common-info/index.js.gz +0 -0
  13. package/common-info/{set-personal-info.d.ts → set-personal-info/index.d.ts} +1 -1
  14. package/common-info/{set-personal-info.js → set-personal-info/index.js} +595 -583
  15. package/common-info/set-personal-info/index.js.gz +0 -0
  16. package/common-info/type.d.ts +104 -0
  17. package/common-tools/{arr-tools.d.ts → arr-tools/index.d.ts} +1 -1
  18. package/common-tools/{get-url-params.d.ts → get-url-params/index.d.ts} +2 -2
  19. package/common-tools/get-url-params/index.js +63 -0
  20. package/common-tools/get-url-params/index.js.gz +0 -0
  21. package/common-tools/{nest-tree-format.d.ts → nest-tree-format/index.d.ts} +1 -1
  22. package/common-tools/{nest-tree-format.js → nest-tree-format/index.js} +2 -4
  23. package/common-tools/obj-tools/index.js +14 -0
  24. package/common-tools/{platform-tools.js → platform-tools/index.js} +1 -2
  25. package/common-tools/{queue-promise.d.ts → queue-promise/index.d.ts} +1 -1
  26. package/common-tools/setHtmlMinWH/index.d.ts +5 -0
  27. package/common-tools/update-fav-icon/index.d.ts +11 -0
  28. package/common-tools/update-fav-icon/index.js +21 -0
  29. package/create-api-service/index.js +1408 -1414
  30. package/create-api-service/index.js.gz +0 -0
  31. package/create-api-service/{sso.d.ts → sso/index.d.ts} +5 -5
  32. package/create-api-service/{sso.js → sso/index.js} +747 -745
  33. package/create-api-service/sso/index.js.gz +0 -0
  34. package/curring-http/index.js +1658 -4815
  35. package/curring-http/index.js.gz +0 -0
  36. package/curring-http/type.d.ts +89 -0
  37. package/directive/{auth.js → auth/index.js} +2 -4
  38. package/directive/auth/index.js.gz +0 -0
  39. package/dom-check-in/index.js +5 -5
  40. package/dom-watcher/index.d.ts +1 -1
  41. package/esm-map.json +8 -0
  42. package/hooks/use-get-auth/index.d.ts +3 -3
  43. package/hooks/use-get-auth/index.js +4 -8
  44. package/hooks/use-get-auth/index.js.gz +0 -0
  45. package/load-js/index.d.ts +1 -1
  46. package/load-js/index.js +1 -2
  47. package/nextTiken/index.js +5 -10
  48. package/nextTiken/index.js.gz +0 -0
  49. package/oss/index.d.ts +1 -1
  50. package/oss/index.js +1 -2
  51. package/package.json +10 -3
  52. package/pinyin-first-character/index.js +151 -146
  53. package/pinyin-first-character/index.js.gz +0 -0
  54. package/style/index.js +5 -9
  55. package/style/index.js.gz +0 -0
  56. package/style/style.d.ts +3 -3
  57. package/token-tools/index.d.ts +1 -1
  58. package/token-tools/index.js.gz +0 -0
  59. package/use-low-code/index.js +1 -2
  60. package/use-low-code/index.js.gz +0 -0
  61. package/vue/hooks/{use-model-value.d.ts → use-model-value/index.d.ts} +2 -0
  62. package/webSocket-service/index.js +41 -52
  63. package/webSocket-service/index.js.gz +0 -0
  64. package/webSocket-service/type.d.ts +28 -0
  65. package/with-install/index.d.ts +1 -1
  66. package/common-info/getInfoFromUrl.js +0 -85
  67. package/common-tools/get-url-params.js +0 -62
  68. package/common-tools/obj-tools.js +0 -20
  69. package/common-tools/setHtmlMinWH.d.ts +0 -5
  70. package/common-tools/update-fav-icon.d.ts +0 -10
  71. package/common-tools/update-fav-icon.js +0 -22
  72. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.d.ts +0 -29
  73. package/dimple-canvas/use-dimple-canvas/core/antv-x6/index.js +0 -19925
  74. package/dimple-canvas/use-dimple-canvas/core/konva/index.d.ts +0 -54
  75. package/dimple-canvas/use-dimple-canvas/core/konva/index.js +0 -119
  76. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.d.ts +0 -101
  77. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-event-listener.js +0 -17
  78. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.d.ts +0 -8
  79. package/dimple-canvas/use-dimple-canvas/core/konva/utils/add-object/index.js +0 -55
  80. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.d.ts +0 -5
  81. package/dimple-canvas/use-dimple-canvas/core/konva/utils/create-canvas.js +0 -14
  82. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.d.ts +0 -5
  83. package/dimple-canvas/use-dimple-canvas/core/konva/utils/find.js +0 -5
  84. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.d.ts +0 -5
  85. package/dimple-canvas/use-dimple-canvas/core/konva/utils/guideline.js +0 -181
  86. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.d.ts +0 -4
  87. package/dimple-canvas/use-dimple-canvas/core/konva/utils/lib.js +0 -7402
  88. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.d.ts +0 -6
  89. package/dimple-canvas/use-dimple-canvas/core/konva/utils/load-json.js +0 -13
  90. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.d.ts +0 -4
  91. package/dimple-canvas/use-dimple-canvas/core/konva/utils/remove-object.js +0 -7
  92. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.d.ts +0 -8
  93. package/dimple-canvas/use-dimple-canvas/core/konva/utils/rule.js +0 -193
  94. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.d.ts +0 -11
  95. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transform-axis.js +0 -20
  96. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.d.ts +0 -5
  97. package/dimple-canvas/use-dimple-canvas/core/konva/utils/transformer.js +0 -52
  98. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.d.ts +0 -2
  99. package/dimple-canvas/use-dimple-canvas/core/konva/utils/wheel-zoom.js +0 -14
  100. package/dimple-canvas/use-dimple-canvas/index.d.ts +0 -9
  101. package/dimple-canvas/use-dimple-canvas/index.js +0 -10
  102. package/hooks/use-get-auth/apis.js +0 -8
  103. package/style/math.js +0 -17
  104. package/style/style.js +0 -61
  105. /package/api-services/modules/{app-manage.d.ts → app-manage/index.d.ts} +0 -0
  106. /package/api-services/modules/{app-manage.js → app-manage/index.js} +0 -0
  107. /package/api-services/modules/{authentication.d.ts → authentication/index.d.ts} +0 -0
  108. /package/api-services/modules/{authentication.js → authentication/index.js} +0 -0
  109. /package/api-services/modules/{bems.d.ts → bems/index.d.ts} +0 -0
  110. /package/api-services/modules/{bems.js → bems/index.js} +0 -0
  111. /package/api-services/modules/{contract.d.ts → contract/index.d.ts} +0 -0
  112. /package/api-services/modules/{contract.js → contract/index.js} +0 -0
  113. /package/api-services/modules/{duty-manage.d.ts → duty-manage/index.d.ts} +0 -0
  114. /package/api-services/modules/{duty-manage.js → duty-manage/index.js} +0 -0
  115. /package/api-services/modules/{enterpriseright.d.ts → enterpriseright/index.d.ts} +0 -0
  116. /package/api-services/modules/{enterpriseright.js → enterpriseright/index.js} +0 -0
  117. /package/api-services/modules/{gateway-edge.d.ts → gateway-edge/index.d.ts} +0 -0
  118. /package/api-services/modules/{gateway-edge.js → gateway-edge/index.js} +0 -0
  119. /package/api-services/modules/{iot.d.ts → iot/index.d.ts} +0 -0
  120. /package/api-services/modules/{iot.js → iot/index.js} +0 -0
  121. /package/api-services/modules/{justauth.d.ts → justauth/index.d.ts} +0 -0
  122. /package/api-services/modules/{justauth.js → justauth/index.js} +0 -0
  123. /package/api-services/modules/{knowledge.d.ts → knowledge/index.d.ts} +0 -0
  124. /package/api-services/modules/{knowledge.js → knowledge/index.js} +0 -0
  125. /package/api-services/modules/{link.d.ts → link/index.d.ts} +0 -0
  126. /package/api-services/modules/{link.js → link/index.js} +0 -0
  127. /package/api-services/modules/{permission.d.ts → permission/index.d.ts} +0 -0
  128. /package/api-services/modules/{permission.js → permission/index.js} +0 -0
  129. /package/api-services/modules/{platformManage.d.ts → platformManage/index.d.ts} +0 -0
  130. /package/api-services/modules/{platformManage.js → platformManage/index.js} +0 -0
  131. /package/api-services/modules/{portal.d.ts → portal/index.d.ts} +0 -0
  132. /package/api-services/modules/{portal.js → portal/index.js} +0 -0
  133. /package/api-services/modules/{space-manage.d.ts → space-manage/index.d.ts} +0 -0
  134. /package/api-services/modules/{space-manage.js → space-manage/index.js} +0 -0
  135. /package/api-services/modules/{super-admin.d.ts → super-admin/index.d.ts} +0 -0
  136. /package/api-services/modules/{super-admin.js → super-admin/index.js} +0 -0
  137. /package/api-services/modules/{supplier.d.ts → supplier/index.d.ts} +0 -0
  138. /package/api-services/modules/{supplier.js → supplier/index.js} +0 -0
  139. /package/api-services/modules/{supplychain-manage.d.ts → supplychain-manage/index.d.ts} +0 -0
  140. /package/api-services/modules/{supplychain-manage.js → supplychain-manage/index.js} +0 -0
  141. /package/api-services/modules/{systemConfiguration.d.ts → systemConfiguration/index.d.ts} +0 -0
  142. /package/api-services/modules/{systemConfiguration.js → systemConfiguration/index.js} +0 -0
  143. /package/api-services/modules/{tool.d.ts → tool/index.d.ts} +0 -0
  144. /package/api-services/modules/{tool.js → tool/index.js} +0 -0
  145. /package/api-services/src/{create-service.d.ts → create-service/index.d.ts} +0 -0
  146. /package/api-services/src/{create-service.js → create-service/index.js} +0 -0
  147. /package/common-info/{getIframeUrl.d.ts → getIframeUrl/index.d.ts} +0 -0
  148. /package/common-info/{getInfoFromUrl.d.ts → getInfoFromUrl/index.d.ts} +0 -0
  149. /package/common-tools/{arr-tools.js → arr-tools/index.js} +0 -0
  150. /package/common-tools/{date-format.d.ts → date-format/index.d.ts} +0 -0
  151. /package/common-tools/{date-format.js → date-format/index.js} +0 -0
  152. /package/common-tools/{handle-data.d.ts → handle-data/index.d.ts} +0 -0
  153. /package/common-tools/{handle-data.js → handle-data/index.js} +0 -0
  154. /package/common-tools/{obj-tools.d.ts → obj-tools/index.d.ts} +0 -0
  155. /package/common-tools/{platform-tools.d.ts → platform-tools/index.d.ts} +0 -0
  156. /package/common-tools/{queue-promise.js → queue-promise/index.js} +0 -0
  157. /package/common-tools/{setHtmlMinWH.js → setHtmlMinWH/index.js} +0 -0
  158. /package/create-api-service/{proxy-sso.d.ts → proxy-sso/index.d.ts} +0 -0
  159. /package/create-api-service/{proxy-sso.js → proxy-sso/index.js} +0 -0
  160. /package/directive/{auth.d.ts → auth/index.d.ts} +0 -0
  161. /package/directive/{clickOutside.d.ts → clickOutside/index.d.ts} +0 -0
  162. /package/directive/{clickOutside.js → clickOutside/index.js} +0 -0
  163. /package/directive/{hoverInside.d.ts → hoverInside/index.d.ts} +0 -0
  164. /package/directive/{hoverInside.js → hoverInside/index.js} +0 -0
  165. /package/directive/{utils.d.ts → utils/index.d.ts} +0 -0
  166. /package/directive/{utils.js → utils/index.js} +0 -0
  167. /package/hooks/popup-manager/{use-zindex.d.ts → use-zindex/index.d.ts} +0 -0
  168. /package/hooks/popup-manager/{use-zindex.js → use-zindex/index.js} +0 -0
  169. /package/vue/hooks/{use-model-value.js → use-model-value/index.js} +0 -0
@@ -0,0 +1,104 @@
1
+ export interface UserInfo {
2
+ /** 用户id */
3
+ id: string
4
+ /** 用户名称 */
5
+ name: string
6
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
7
+ flag: number
8
+ /** 租户id */
9
+ tenantId: string
10
+ }
11
+
12
+ export interface PersonalInfo {
13
+ /** id */
14
+ id: string
15
+ /** 名称 */
16
+ name: string
17
+ /** 手机号 */
18
+ phone: string
19
+ /** 用户名称 */
20
+ userName: string
21
+ /** 邮箱 */
22
+ email: string
23
+ /** 头像 */
24
+ headPicture: string
25
+ }
26
+
27
+ export interface TenantInfo {
28
+ /** 用户ID */
29
+ userId: string
30
+ /** 用户名 */
31
+ userName: string
32
+ name: string
33
+ /** 租户信息 */
34
+ tenant: {
35
+ id: string
36
+ name: string
37
+ adminUserId: string
38
+ description: string
39
+ domain: string
40
+ }
41
+ /** 用户标识 2 - B端身份, 4 - C 端身份, 6 - B+C 端身份 */
42
+ flag: number
43
+ areaCode: string
44
+ /** 手机号 */
45
+ phone: string
46
+ }
47
+
48
+ export interface HomeInfo {
49
+ applicationCode: string
50
+ applicationPath: string
51
+ enable: boolean
52
+ originalCode: string
53
+ routeUrl: string
54
+ type: number | null
55
+ }
56
+
57
+ export interface ProjectInfo {
58
+ /** 项目id */
59
+ id: string | number
60
+ /** 父级id */
61
+ parentId?: string
62
+ /** 项目名称 */
63
+ name: string
64
+ /** 租户id */
65
+ tenantId?: string
66
+ }
67
+
68
+ export interface SubAppsInfo {
69
+ /** 所有应用信息 */
70
+ appcategorys?: any[]
71
+ /** 当前应用完整信息 */
72
+ currentSubApp?: any
73
+ /** 所有应用 */
74
+ flatSubAppList?: any[]
75
+ /** 当前应用code */
76
+ currentSubAppCode?: string
77
+ /** 当前打开的应用 */
78
+ subAppList?: any[]
79
+ }
80
+
81
+ interface TabItem {
82
+ /** 当前应用url */
83
+ currentApplication: string
84
+ /** 当前加载的应用 */
85
+ applicationPath: string
86
+ applicationCode: string
87
+ menuId: string
88
+ name: string
89
+ path: string
90
+ code: string
91
+ query?: any
92
+ }
93
+ export interface TabInfo {
94
+ /** 当前tabs key */
95
+ currentCode?: string
96
+ /** 当前tabs */
97
+ currentTab?: TabItem
98
+ /** 用于记录该应用上次开启的tab */
99
+ preTab?: Record<string, TabItem>
100
+ /** 当前打开的tabs(微前端环境会存入) */
101
+ tabMap?: Record<string, TabItem[]>
102
+ }
103
+
104
+ export type permissionBtnInfo = { code?: string; name?: string }[]
@@ -12,4 +12,4 @@ export declare const arrEqual: (a: any[], b: any[], isSort?: boolean) => boolean
12
12
  * @param val 要根据哪个字段来去重
13
13
  * @returns
14
14
  */
15
- export declare const arrUnique: (arr: any[], val: string) => any[];
15
+ export declare const arrUnique: (arr: any[], val: string) => any;
@@ -37,10 +37,10 @@ export declare const objectToUrlparams: (params: any) => string;
37
37
  * @param pathParams 参数,数组格式
38
38
  * @returns
39
39
  */
40
- export declare const addPathParamsToUrl: (url: string, pathParams: any[]) => string;
40
+ export declare const addPathParamsToUrl: (url: string, pathParams: string[]) => any;
41
41
  /**
42
42
  * 从URL中获取origin
43
43
  * @param url url
44
44
  * @returns origin
45
45
  */
46
- export declare function getOriginFromUrl(url: string): string;
46
+ export declare function getOriginFromUrl(url: string): any;
@@ -0,0 +1,63 @@
1
+ const i = (n, s) => {
2
+ let e = window.location.search || "";
3
+ if (n && n !== location.href) {
4
+ const t = n.indexOf("?");
5
+ t !== -1 ? e = n.slice(t) : e = "";
6
+ }
7
+ const r = new URLSearchParams(e);
8
+ if (s)
9
+ return r.get(s);
10
+ {
11
+ let t = {};
12
+ for (let [o, l] of r.entries())
13
+ t[o] = l;
14
+ return t;
15
+ }
16
+ }, f = (n, s = {}) => {
17
+ let e = "", r = "";
18
+ const t = Object.keys(s);
19
+ return t && t.length && t.forEach((o, l) => {
20
+ l === t.length - 1 ? r += `${o}=${s[o]}` : r += `${o}=${s[o]}&`;
21
+ }), r ? e = location.origin + n + `?${r}` : e = location.origin + n, e;
22
+ }, h = (n, s) => {
23
+ const e = s || location.href, r = i(e), t = Object.keys(r) || [];
24
+ if (!t || !t.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
25
+ let o = t.filter((a) => !n.includes(a));
26
+ if (!o || !o.length) return e.includes("?") ? e.split("?")[0] : e.split("&")[0];
27
+ let l = "";
28
+ return o.forEach((a, c) => {
29
+ c === t.length - 1 ? l += `${a}=${r[a]}` : l += `${a}=${r[a]}&`;
30
+ }), e.includes("?") ? e.split("?")[0] + `?${l}` : e.split("&")[0] + `?${l}`;
31
+ }, u = (n) => {
32
+ const s = new URLSearchParams(n.split("?")[1]), e = {};
33
+ for (const [r, t] of s)
34
+ e.hasOwnProperty(r) ? Array.isArray(e[r]) ? e[r].push(t) : e[r] = [e[r], t] : e[r] = t;
35
+ return e;
36
+ }, g = (n) => {
37
+ let s = "";
38
+ const e = Object.keys(n);
39
+ return e && e.length && e.forEach((r, t) => {
40
+ t === e.length - 1 ? s += `${r}=${n[r]}` : s += `${r}=${n[r]}&`;
41
+ }), s;
42
+ }, p = (n, s) => {
43
+ const e = new URL(n, location.origin);
44
+ let { origin: r, pathname: t } = e;
45
+ t === "/" && (t = ""), s.map((l) => t += `/${l}`);
46
+ const o = new URL(`${r}${t}`);
47
+ return e.searchParams.forEach((l, a) => {
48
+ o.searchParams.append(a, l);
49
+ }), o.toString();
50
+ };
51
+ function $(n) {
52
+ const s = /^(https?:\/\/[^/]+)/, e = n.match(s);
53
+ return e && e.length > 1 ? e[1] : null;
54
+ }
55
+ export {
56
+ p as addPathParamsToUrl,
57
+ h as funcUrlDel,
58
+ f as getFullPath,
59
+ $ as getOriginFromUrl,
60
+ i as getUrlParams,
61
+ g as objectToUrlparams,
62
+ u as urlParamsToObject
63
+ };
@@ -20,7 +20,7 @@ export declare const flatTree: (list: any[], child?: string, deleteChild?: boole
20
20
  * @param children 子节点指定字段名,默认‘children’
21
21
  * @returns
22
22
  */
23
- export declare const filterTreeArray: (tree: any[], predicate: (node: any) => boolean, children?: string) => any[];
23
+ export declare const filterTreeArray: (tree: any[], predicate: (node: any) => boolean, children?: string) => any;
24
24
  /**
25
25
  * 树结构查找节点,深度优先
26
26
  * @param tree 要过滤的树
@@ -8,12 +8,10 @@ const o = (n, t = "children") => {
8
8
  return r && delete u[t], l && l.length ? e.concat(u, c(l, t, r)) : e.concat(u);
9
9
  }, []) : [], s = (n, t, r = "children") => n.filter((e) => t(e)).map((e) => (e = Object.assign({}, e), e[r] && (e[r] = s(e[r], t)), e)), h = (n, t) => {
10
10
  for (const r of n) {
11
- if (t(r))
12
- return r;
11
+ if (t(r)) return r;
13
12
  if (r != null && r.children && r.children.length) {
14
13
  const e = h(r.children, t);
15
- if (e)
16
- return e;
14
+ if (e) return e;
17
15
  }
18
16
  }
19
17
  return null;
@@ -0,0 +1,14 @@
1
+ const f = (t, r) => {
2
+ if (!t || !r || Object.keys(t).length !== Object.keys(r).length) return !1;
3
+ for (let e in t) {
4
+ if (r[e] === void 0) return !1;
5
+ if (typeof r[e] == "function" || typeof t[e] == "function") throw new Error("type error");
6
+ if (typeof r[e] != typeof t[e]) return !1;
7
+ if (typeof t[e] == "object") return f(t[e], r[e]);
8
+ if (t[e] !== r[e]) return !1;
9
+ }
10
+ return !0;
11
+ };
12
+ export {
13
+ f as objEqual
14
+ };
@@ -1,7 +1,6 @@
1
1
  import { getToken as o } from "@das-fed/utils/common-info";
2
2
  const n = (t) => !!(!t.startsWith("http") || t.startsWith(location.origin)), i = (t) => {
3
- if (!t)
4
- return "";
3
+ if (!t) return "";
5
4
  let e = t;
6
5
  return n(t) && !t.includes("showLayout=false") && (e = t.indexOf("?") !== -1 ? t + "&showLayout=false" : t + "?showLayout=false"), e;
7
6
  }, a = (t) => {
@@ -3,4 +3,4 @@
3
3
  * @param promiseFuncArr promise数组
4
4
  * @returns promise
5
5
  */
6
- export declare function runPromiseByQueue(promiseFuncArr: any[]): Promise<unknown>;
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,11 @@
1
+ /**
2
+ * 设置平台的favIcon
3
+ * @param favIcon 图标
4
+ * @param defaultIcon 默认图标
5
+ */
6
+ export declare const updateFavIcon: (favIcon: string, defaultIcon?: string) => void;
7
+ /**
8
+ * 设置平台的favIcon,如果localStorage中没有则调用接口获取
9
+ * @param defaultIcon 默认图标
10
+ */
11
+ export declare const setDasHtmlIcon: (defaultIcon?: string) => any;
@@ -0,0 +1,21 @@
1
+ import { getFavIcon as s } from "@das-fed/utils/common-info";
2
+ import { pureImageSrc as l } from "@das-fed/utils/pure-image-src";
3
+ import { systemConfiguration as m } from "@das-fed/utils/api-services/modules";
4
+ const c = m.get("/visitor/appearance/with-default", (t) => (t.public = !0, t)), i = (t, o = "./logo.svg") => {
5
+ const r = t || o;
6
+ let e = document.querySelector('link[rel*="icon"]');
7
+ e ? e == null || e.setAttribute("href", r) : (e = document.createElement("link"), e.rel = "icon", e.type = "image/svg+xml", e.href = r, document.getElementsByTagName("head")[0].appendChild(e));
8
+ }, f = async (t = "./logo.svg") => {
9
+ let o = s();
10
+ if (!o) {
11
+ const [r, e] = await c().run();
12
+ if (r) return;
13
+ const { browserLogoImgHost: n = "", browserLogoImg: a = "" } = e;
14
+ o = a ? n + l(a) : "";
15
+ }
16
+ i(o, t);
17
+ };
18
+ export {
19
+ f as setDasHtmlIcon,
20
+ i as updateFavIcon
21
+ };