x-essential-lib 0.10.17 → 0.10.19

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.
@@ -4,6 +4,7 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
4
4
  var en_exports = /* @__PURE__ */ __exportAll({ default: () => en_default });
5
5
  var en_default = {
6
6
  "dlg": { common: {
7
+ ask: "Do you want {verb} {objet} '{name}'",
7
8
  cancel: "Cancel",
8
9
  confirm: "Confirm",
9
10
  responding: "Responding..."
@@ -4,6 +4,7 @@ import { t as __exportAll } from "./rolldown-runtime.c6i0pdwe.js";
4
4
  var zhHans_exports = /* @__PURE__ */ __exportAll({ default: () => zhHans_default });
5
5
  var zhHans_default = {
6
6
  "dlg": { common: {
7
+ ask: "你想要{verb}{objet}'{name}'",
7
8
  cancel: "取消",
8
9
  confirm: "确定",
9
10
  responding: "响应中..."
package/dist/index.d.ts CHANGED
@@ -339,6 +339,7 @@ declare function useViewStack(name: string, hook?: (params: unknown) => void): {
339
339
  declare function loadLocaleMessageEssential(locale: string): Promise<{
340
340
  dlg: {
341
341
  common: {
342
+ ask: string;
342
343
  cancel: string;
343
344
  confirm: string;
344
345
  responding: string;
package/dist/index.js CHANGED
@@ -517,42 +517,36 @@ const routeMetas = [
517
517
  {
518
518
  app: "x-mine-mf",
519
519
  path: "/mine/personalInfo",
520
- back: "/mine",
521
520
  level: 1,
522
521
  requireAuth: true
523
522
  },
524
523
  {
525
524
  app: "x-mine-mf",
526
- path: "/mine/accountSecurity",
527
- back: "/mine/personalInfo",
528
- level: 2,
525
+ path: "/mine/settings",
526
+ level: 1,
529
527
  requireAuth: true
530
528
  },
531
529
  {
532
530
  app: "x-mine-mf",
533
- path: "/mine/settings",
534
- back: "/mine",
535
- level: 1,
531
+ path: "/mine/accountSecurity",
532
+ level: 2,
536
533
  requireAuth: true
537
534
  },
538
535
  {
539
536
  app: "x-mine-mf",
540
537
  path: "/mine/general",
541
- back: "/mine/settings",
542
538
  level: 2,
543
539
  requireAuth: true
544
540
  },
545
541
  {
546
542
  app: "x-mine-mf",
547
- path: "/mine/general/darkMode",
548
- back: "/mine/general",
543
+ path: "/mine/darkMode",
549
544
  level: 3,
550
545
  requireAuth: true
551
546
  },
552
547
  {
553
548
  app: "x-mine-mf",
554
- path: "/mine/general/language",
555
- back: "/mine/general",
549
+ path: "/mine/language",
556
550
  level: 3,
557
551
  requireAuth: true
558
552
  },
@@ -798,7 +792,7 @@ function useMicroApp(globalStates, base, customBack) {
798
792
  running.value = true;
799
793
  }
800
794
  async function onBackButton() {
801
- await handleBack();
795
+ eventBus.emit("back");
802
796
  }
803
797
  function onDeviceReady() {
804
798
  console.log("onDeviceReady");
@@ -865,10 +859,11 @@ function useMicroApp(globalStates, base, customBack) {
865
859
  if (!routeMeta) return;
866
860
  if (routeMeta.level === 0) navigator?.Backbutton?.goHome(() => {}, () => {});
867
861
  else if (customBack) customBack(routeMeta);
868
- else if (routeMeta.back) await router.replace({
862
+ else if (routeMeta.back) router.replace({
869
863
  path: routeMeta.back,
870
864
  query: { orgId: activeOrg.value }
871
865
  });
866
+ else router.back();
872
867
  }
873
868
  async function onKeyDown(e) {
874
869
  if (e.key === "Escape") {
@@ -879,9 +874,11 @@ function useMicroApp(globalStates, base, customBack) {
879
874
  if (!base) {
880
875
  onMounted(() => {
881
876
  window.addEventListener("keydown", onKeyDown);
877
+ eventBus.on("back", handleBack);
882
878
  });
883
879
  onBeforeUnmount(() => {
884
880
  window.removeEventListener("keydown", onKeyDown);
881
+ eventBus.off("back", handleBack);
885
882
  });
886
883
  }
887
884
  function onUpdateDark(val) {
@@ -1682,8 +1679,8 @@ const install = (app) => {
1682
1679
  //#endregion
1683
1680
  //#region src/i18n/index.ts
1684
1681
  async function loadLocaleMessageEssential(locale) {
1685
- if (locale === "en") return (await import("./i18n-en.fcyirt0q.js").then((n) => n.t)).default;
1686
- else if (locale === "zhHans") return (await import("./i18n-zhHans.kjj6z3dm.js").then((n) => n.t)).default;
1682
+ if (locale === "en") return (await import("./i18n-en.go5xopo5.js").then((n) => n.t)).default;
1683
+ else if (locale === "zhHans") return (await import("./i18n-zhHans.i1hcjh5z.js").then((n) => n.t)).default;
1687
1684
  else throw new Error(`invalid locale=${locale}`);
1688
1685
  }
1689
1686
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
- "version": "0.10.17",
3
+ "version": "0.10.19",
4
4
  "files": [
5
5
  "dist"
6
6
  ],