y-p-h-in 1.0.2 → 1.0.3

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.
package/demo-ui.js CHANGED
@@ -47395,7 +47395,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47395
47395
  l("changeLang", oe);
47396
47396
  }, { t: o } = go(), a = B(!1), i = B([]), s = B(""), c = v(() => [
47397
47397
  {
47398
- name: o("header.personalCenter"),
47398
+ name: o("ykpHeader.personalCenter"),
47399
47399
  icon: `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
47400
47400
  <path fill-rule="evenodd" clip-rule="evenodd"
47401
47401
  d="M9 16.5C13.1421 16.5 16.5 13.1421 16.5 9C16.5 4.85786 13.1421 1.5 9 1.5C4.85786 1.5 1.5 4.85786 1.5 9C1.5 13.1421 4.85786 16.5 9 16.5Z"
@@ -47409,7 +47409,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47409
47409
  </svg>`
47410
47410
  },
47411
47411
  {
47412
- name: o("header.problemFeedback"),
47412
+ name: o("ykpHeader.problemFeedback"),
47413
47413
  icon: `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
47414
47414
  <path
47415
47415
  d="M6 4.3125C5.6925 4.3125 5.4375 4.0575 5.4375 3.75V1.5C5.4375 1.1925 5.6925 0.9375 6 0.9375C6.3075 0.9375 6.5625 1.1925 6.5625 1.5V3.75C6.5625 4.0575 6.3075 4.3125 6 4.3125Z"
@@ -47432,7 +47432,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47432
47432
  </svg>`
47433
47433
  },
47434
47434
  {
47435
- name: o("header.logout"),
47435
+ name: o("ykpHeader.logout"),
47436
47436
  icon: `<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
47437
47437
  <path d="M8.99689 2.25H2.25V15.75H9" stroke="#EB4747" stroke-width="1.125" stroke-linecap="round"
47438
47438
  stroke-linejoin="round" />
@@ -47451,36 +47451,36 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47451
47451
  model_name: [
47452
47452
  {
47453
47453
  required: !0,
47454
- message: o("header.pleaseSelectModule")
47454
+ message: o("ykpHeader.pleaseSelectModule")
47455
47455
  }
47456
47456
  ],
47457
47457
  content: [
47458
47458
  {
47459
47459
  required: !0,
47460
- message: o("header.pleaseEnterDescription")
47460
+ message: o("ykpHeader.pleaseEnterDescription")
47461
47461
  }
47462
47462
  ],
47463
47463
  email: [
47464
47464
  {
47465
47465
  type: "email",
47466
47466
  required: !0,
47467
- message: o("header.pleaseEnterEmail")
47467
+ message: o("ykpHeader.pleaseEnterEmail")
47468
47468
  }
47469
47469
  ]
47470
47470
  })), g = B(""), y = B(JSON.parse(ka("UserInfo") || "{}")), m = B(!0), h = B({ x: window.innerWidth - 100, y: window.innerHeight - 250 }), b = B(!1), w = B({ x: 0, y: 0 }), C = Ce([]), P = e, S = v(() => {
47471
47471
  switch (u.value) {
47472
47472
  case 0:
47473
- return o("header.allProducts");
47473
+ return o("ykpHeader.allProducts");
47474
47474
  case 1:
47475
- return o("header.searchLiterature");
47475
+ return o("ykpHeader.searchLiterature");
47476
47476
  case 2:
47477
- return o("header.readLiterature");
47477
+ return o("ykpHeader.readLiterature");
47478
47478
  case 3:
47479
- return o("header.writeLiterature");
47479
+ return o("ykpHeader.writeLiterature");
47480
47480
  case 4:
47481
- return o("header.translateLiterature");
47481
+ return o("ykpHeader.translateLiterature");
47482
47482
  default:
47483
- return o("header.allProducts");
47483
+ return o("ykpHeader.allProducts");
47484
47484
  }
47485
47485
  }), O = B([
47486
47486
  {
@@ -47524,7 +47524,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47524
47524
  y: Math.min(h.value.y, window.innerHeight - 60)
47525
47525
  };
47526
47526
  };
47527
- if (window.addEventListener("resize", oe), window.__kefuResizeHandler = oe, localStorage.getItem("loginTypeName") && localStorage.getItem("loginTypeName") == "chatlibrary" && (g.value = ka("CIToken") || ""), ((Se = y.value) == null ? void 0 : Se.userType) == "1" || ((Ee = y.value) == null ? void 0 : Ee.userType) == "2", P.isPerson == !0 && (Ae = y.value) != null && Ae.userType && (((De = y.value) == null ? void 0 : De.userType) == "1" || ((be = y.value) == null ? void 0 : be.userType) == "2") && or.error(o("header.pleaseUsePersonalAccount")), !g.value) {
47527
+ if (window.addEventListener("resize", oe), window.__kefuResizeHandler = oe, localStorage.getItem("loginTypeName") && localStorage.getItem("loginTypeName") == "chatlibrary" && (g.value = ka("CIToken") || ""), ((Se = y.value) == null ? void 0 : Se.userType) == "1" || ((Ee = y.value) == null ? void 0 : Ee.userType) == "2", P.isPerson == !0 && (Ae = y.value) != null && Ae.userType && (((De = y.value) == null ? void 0 : De.userType) == "1" || ((be = y.value) == null ? void 0 : be.userType) == "2") && or.error(o("ykpHeader.pleaseUsePersonalAccount")), !g.value) {
47528
47528
  i.value.push(
47529
47529
  {
47530
47530
  name: "chatlibrary",
@@ -47580,7 +47580,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47580
47580
  s.value && (localStorage.setItem("loginTypeName", s.value), window.location.reload());
47581
47581
  }, M = (oe) => {
47582
47582
  f7(oe).then((fe) => {
47583
- fe.code != 0 && (or.error(o("header.loginExpired")), J());
47583
+ fe.code != 0 && (or.error(o("ykpHeader.loginExpired")), J());
47584
47584
  });
47585
47585
  }, z = (oe) => {
47586
47586
  p.images.splice(oe, 1), C.splice(oe, 1);
@@ -47589,7 +47589,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47589
47589
  }, I = (oe) => {
47590
47590
  let fe = { ...p };
47591
47591
  fe.images = JSON.stringify(fe.images), c7(fe, g.value).then((Se) => {
47592
- Se.code === 0 && (or.success(o("header.feedbackSuccess")), f.value = !1);
47592
+ Se.code === 0 && (or.success(o("ykpHeader.feedbackSuccess")), f.value = !1);
47593
47593
  });
47594
47594
  }, j = (oe) => {
47595
47595
  const { onProgress: fe, onError: Se, onSuccess: Ee, fileItem: Ae, name: De } = oe, be = new FormData();
@@ -47604,7 +47604,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47604
47604
  }
47605
47605
  };
47606
47606
  }, U = (oe) => {
47607
- oe.name === o("header.logout") ? J() : oe.name === o("header.personalCenter") ? te() : oe.name === o("header.problemFeedback") && (f.value = !0);
47607
+ oe.name === o("ykpHeader.logout") ? J() : oe.name === o("ykpHeader.personalCenter") ? te() : oe.name === o("ykpHeader.problemFeedback") && (f.value = !0);
47608
47608
  }, te = () => {
47609
47609
  var fe, Se;
47610
47610
  window.location.href.indexOf("test") > -1 ? window.location.href = "http://testchatlibrary.newacademic.net/personal?regetuserinfo=" + g.value + "&user_type=" + ((fe = y.value) == null ? void 0 : fe.userType) : window.location.href = "https://chatlibrary.newacademic.net/personal?regetuserinfo=" + g.value + "&user_type=" + ((Se = y.value) == null ? void 0 : Se.userType);
@@ -47614,9 +47614,9 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
47614
47614
  oe.indexOf("test") > -1 ? fe = "http://testchatlibrary.newacademic.net/?logout=true" : fe = "https://chatlibrary.newacademic.net/?logout=true", CH(), setTimeout(() => {
47615
47615
  window.location.href = fe;
47616
47616
  }, 2e3);
47617
- }) : alert(o("header.pleaseLogin"));
47617
+ }) : alert(o("ykpHeader.pleaseLogin"));
47618
47618
  }, K = (oe) => {
47619
- g.value ? window.open(`${oe.domain_name}?loginTypeName=${localStorage.getItem("loginTypeName")}`, "_blank") : or.error(o("header.pleaseLogin"));
47619
+ g.value ? window.open(`${oe.domain_name}?loginTypeName=${localStorage.getItem("loginTypeName")}`, "_blank") : or.error(o("ykpHeader.pleaseLogin"));
47620
47620
  }, de = () => {
47621
47621
  var oe = "CIToken";
47622
47622
  localStorage.getItem("loginTypeName") && localStorage.getItem("loginTypeName") == "chatlibrary" && (oe = "CIToken"), y.value = JSON.parse(ka("UserInfo") || "{}"), g.value = ka(oe) || "";
@@ -48036,7 +48036,7 @@ const UY = /* @__PURE__ */ LC(qY, [["render", YY], ["__scopeId", "data-v-1e07665
48036
48036
  ]);
48037
48037
  };
48038
48038
  }
48039
- }), kU = /* @__PURE__ */ LC(wU, [["__scopeId", "data-v-a40be97a"]]), SU = [
48039
+ }), kU = /* @__PURE__ */ LC(wU, [["__scopeId", "data-v-41ca1838"]]), SU = [
48040
48040
  kU
48041
48041
  ];
48042
48042
  function PU(e) {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
- {
2
- "name": "y-p-h-in",
3
- "version": "1.0.2",
4
- "main": "demo-ui.js",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "author": "",
9
- "license": "ISC",
10
- "description": ""
11
- }
1
+ {
2
+ "name": "y-p-h-in",
3
+ "version": "1.0.3",
4
+ "main": "demo-ui.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1"
7
+ },
8
+ "author": "",
9
+ "license": "ISC",
10
+ "description": ""
11
+ }