@das-fed/web 7.1.0-dev.1 → 7.1.0-dev.2

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.
Binary file
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { J as e, A as t, C as n, B as i, D as r, e as u, m as o, w as m, o as p, f as g, k as D, v as l, y as L, z as b, h as c, i as h, G as A, H as T, q as y, E as R, F as W, K as I, I as M, s as F, j as V, n as f, r as k, x as v, t as w } from "./index-DhNUE9iu.js";
1
+ import { J as e, A as t, C as n, B as i, D as r, e as u, m as o, w as m, o as p, f as g, k as D, v as l, y as L, z as b, h as c, i as h, G as A, H as T, q as y, E as R, F as W, K as I, I as M, s as F, j as V, n as f, r as k, x as v, t as w } from "./index-DQLGDm8x.js";
2
2
  export {
3
3
  e as DasMainAppLayout,
4
4
  t as DasWebLayout,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@das-fed/web",
3
- "version": "7.1.0-dev.1",
3
+ "version": "7.1.0-dev.2",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@das-fed/ui": "7.1.0-dev.1",
8
- "@das-fed/utils": "7.1.0-dev.1",
9
- "@das-fed/web": "7.1.0-dev.1",
10
- "@das-fed/web-components": "7.1.0-dev.1",
7
+ "@das-fed/ui": "7.1.0-dev.2",
8
+ "@das-fed/utils": "7.1.0-dev.2",
9
+ "@das-fed/web": "7.1.0-dev.2",
10
+ "@das-fed/web-components": "7.1.0-dev.2",
11
11
  "@microsoft/signalr": "^8.0.7",
12
12
  "@vueuse/core": "^9.13.0",
13
13
  "animate.css": "^4.1.1",
@@ -19,7 +19,7 @@
19
19
  "vue-router": "^4.4.0"
20
20
  },
21
21
  "devDependencies": {
22
- "@das-fed/cli": "7.1.0-dev.1",
22
+ "@das-fed/cli": "7.1.0-dev.2",
23
23
  "@types/crypto-js": "^4.2.2",
24
24
  "@types/lodash": "^4.14.194",
25
25
  "@types/lodash-es": "^4.17.12",
@@ -1,5 +1,5 @@
1
- import { reactive as s, ref as z, computed as k } from "vue";
2
- const _ = {
1
+ import { reactive as s, ref as k, computed as _ } from "vue";
2
+ const l = {
3
3
  // 按钮
4
4
  详情: { "zh-CN": "详情", en: "Details", _appCode: "framework" },
5
5
  下载: { "zh-CN": "下载", en: "Download", _appCode: "framework" },
@@ -119,57 +119,61 @@ const _ = {
119
119
  删除失败: { "zh-CN": "删除失败", en: "Deleted Failed", _appCode: "framework" },
120
120
  操作成功: { "zh-CN": "操作成功", en: "Operated Successfully", _appCode: "framework" },
121
121
  操作失败: { "zh-CN": "操作失败", en: "Operated Failed", _appCode: "framework" }
122
- }, d = s({}), f = s({}), t = s({});
123
- var i;
124
- const l = sessionStorage.getItem("currentLang") ? sessionStorage.getItem("currentLang") : (i = navigator.language) != null && i.toLowerCase().startsWith("zh") ? "zh-CN" : "en", m = z(l), c = "dasI18n", b = (e = {}, r) => {
122
+ }, f = s({}), t = s({}), m = s({}), c = new URLSearchParams(window.location.search);
123
+ let d = c.get("lang");
124
+ d === "english" && (d = "en");
125
+ d === "chinese_simplified" && (d = "zh-CN");
126
+ d !== "zh-CN" && d !== "en" && (d = "");
127
+ var N;
128
+ const g = d || (sessionStorage.getItem("currentLang") ? sessionStorage.getItem("currentLang") : (N = navigator.language) != null && N.toLowerCase().startsWith("zh") ? "zh-CN" : "en"), w = k(g), u = "dasI18n", R = (e = {}, r) => {
125
129
  const C = r === "global", n = !C, p = {};
126
130
  for (const o in e)
127
131
  for (const a in e[o])
128
- p[a] || (p[a] = {}), p[a][o] = e[o][a] ?? "", C && (f[a] || (f[a] = {}), f[a][o] = p[a][o]), n && (d[a] || (d[a] = {}), d[a][o] = p[a][o]);
129
- }, h = (e = {}, r) => {
132
+ p[a] || (p[a] = {}), p[a][o] = e[o][a] ?? "", C && (t[a] || (t[a] = {}), t[a][o] = p[a][o]), n && (f[a] || (f[a] = {}), f[a][o] = p[a][o]);
133
+ }, i = (e = {}, r) => {
130
134
  var p;
131
135
  const C = r === "global", n = !C;
132
136
  for (const o in e)
133
- if (C && !f[o] && (f[o] = e[o]), n) {
137
+ if (C && !t[o] && (t[o] = e[o]), n) {
134
138
  const a = (p = e[o]) != null && p._appCode ? e[o]._appCode.toLowerCase() : "";
135
- a && (t[a] || (t[a] = {}), t[a][o] = e[o]), d[o] || (d[o] = e[o]);
139
+ a && (m[a] || (m[a] = {}), m[a][o] = e[o]), f[o] || (f[o] = e[o]);
136
140
  }
137
- }, S = async (e) => {
141
+ }, L = async (e) => {
138
142
  var p, o;
139
143
  const r = document.documentElement;
140
- r && r.setAttribute("lang", m.value);
141
- const C = window[c];
142
- C && h(C, "global"), h(_);
144
+ r && r.setAttribute("lang", w.value);
145
+ const C = window[u];
146
+ C && i(C, "global"), i(l);
143
147
  let n = Object.assign(((p = e == null ? void 0 : e.i18n) == null ? void 0 : p.glob) || {});
144
148
  (o = e == null ? void 0 : e.microApps) == null || o.map((a) => {
145
- var w;
146
- n = Object.assign(n, ((w = a.i18n) == null ? void 0 : w.glob) || {});
147
- }), Object.values(n).filter((a) => !!a).flat().map((a) => h(a));
148
- }, u = (e) => {
149
+ var h;
150
+ n = Object.assign(n, ((h = a.i18n) == null ? void 0 : h.glob) || {});
151
+ }), Object.values(n).filter((a) => !!a).flat().map((a) => i(a));
152
+ }, P = (e) => {
149
153
  let r = "";
150
154
  const C = /\/([^\/]+)\/([^\/]+)\//, n = e.match(C);
151
155
  return n && n.length >= 3 && (r = n[1] + "/" + n[2]), r ? r.toLowerCase() : "";
152
- }, g = (e, ...r) => k(() => {
153
- const C = u(location.pathname);
154
- let n = t.framework ?? {}, p = t[C] ?? {}, o = f[e] || n[e] || p[e] || d[e] || e;
156
+ }, v = (e, ...r) => _(() => {
157
+ const C = P(location.pathname);
158
+ let n = m.framework ?? {}, p = m[C] ?? {}, o = t[e] || n[e] || p[e] || f[e] || e;
155
159
  if (o === e) return e;
156
160
  typeof o == "string" && (o = { "zh-CN": o });
157
- let a = o[m.value];
158
- return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (a = o["zh-cn"]), r.map((w, N) => {
159
- a && (a = a.replace(`$${N}`, w));
161
+ let a = o[w.value];
162
+ return w.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (a = o["zh-cn"]), r.map((h, z) => {
163
+ a && (a = a.replace(`$${z}`, h));
160
164
  }), a;
161
- }), P = g, R = (e, ...r) => P(e, ...r).value, D = (e) => {
162
- sessionStorage.setItem("currentLang", e), m.value = e;
163
- }, L = () => m;
165
+ }), S = v, D = (e, ...r) => S(e, ...r).value, A = (e) => {
166
+ sessionStorage.setItem("currentLang", e), w.value = e;
167
+ }, I = () => w;
164
168
  export {
165
- m as currentLang,
166
- d as customLangeData,
167
- g as getI18nRule,
168
- L as getLang,
169
- P as i18n,
170
- S as initI18n,
171
- h as setI18nRule,
172
- D as setLang,
173
- b as setLangRule,
174
- R as t
169
+ w as currentLang,
170
+ f as customLangeData,
171
+ v as getI18nRule,
172
+ I as getLang,
173
+ S as i18n,
174
+ L as initI18n,
175
+ i as setI18nRule,
176
+ A as setLang,
177
+ R as setLangRule,
178
+ D as t
175
179
  };
Binary file