superapp-miniapp-invoke-native 1.0.28 → 1.0.30

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 (36) hide show
  1. package/lib/chunk/umd/5ca52608.umd.cjs +1 -0
  2. package/lib/chunk/umd/7c40191f.umd.cjs +1 -0
  3. package/lib/chunk/umd/fbb879ae.umd.cjs +1 -0
  4. package/lib/main.d.ts +1 -1
  5. package/lib/main.js +2 -3
  6. package/lib/main.umd.cjs +1 -1
  7. package/lib/src/apiHandle/communicate/index.d.ts +0 -5
  8. package/lib/src/apiHandle/initialContext/getData/index.js +22 -0
  9. package/lib/src/apiHandle/initialContext/getData/mock/asia-uat.js +127 -0
  10. package/lib/src/apiHandle/initialContext/getData/mock/eu-sit.js +136 -0
  11. package/lib/src/apiHandle/initialContext/getData/mock/eu-uat.js +136 -0
  12. package/lib/src/apiHandle/{hooks/nativeHandle.d.ts → initialContext/hooks/index.d.ts} +1 -3
  13. package/lib/src/apiHandle/initialContext/hooks/index.js +17 -0
  14. package/lib/src/apiHandle/initialContext/index.d.ts +17 -0
  15. package/lib/src/apiHandle/initialContext/index.js +38 -0
  16. package/lib/src/apiHandle/initialContext/isNative/index.d.ts +2 -0
  17. package/lib/src/apiHandle/initialContext/isNative/index.js +10 -0
  18. package/lib/src/apiHandle/initialContext/specifiedPage/index.d.ts +5 -0
  19. package/lib/src/apiHandle/initialContext/specifiedPage/index.js +17 -0
  20. package/lib/src/constant/index.js +5 -0
  21. package/lib/src/init/NativeApi.d.ts +12 -3
  22. package/lib/src/init/NativeApi.js +33 -0
  23. package/lib/src/init/index.d.ts +4 -3
  24. package/lib/src/init/index.js +4 -6
  25. package/lib/src/init/type.d.ts +3 -5
  26. package/lib/src/utils/baseHandle.d.ts +0 -1
  27. package/package.json +1 -1
  28. package/lib/src/apiHandle/communicate/hooks/specifiedPage/index.d.ts +0 -6
  29. /package/lib/src/apiHandle/communicate/{hooks/addListener → addListener}/back/index.d.ts +0 -0
  30. /package/lib/src/apiHandle/communicate/{hooks/addListener → addListener}/fab/index.d.ts +0 -0
  31. /package/lib/src/apiHandle/communicate/{hooks/addListener → addListener}/home/index.d.ts +0 -0
  32. /package/lib/src/apiHandle/{communicate/hooks → initialContext}/getData/index.d.ts +0 -0
  33. /package/lib/src/apiHandle/{communicate → initialContext/getData}/mock/asia-uat.d.ts +0 -0
  34. /package/lib/src/apiHandle/{communicate → initialContext/getData}/mock/eu-sit.d.ts +0 -0
  35. /package/lib/src/apiHandle/{communicate → initialContext/getData}/mock/eu-uat.d.ts +0 -0
  36. /package/lib/src/apiHandle/{hooks → initialContext}/type.d.ts +0 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={data_info:{bu:{default_tenant_code:"KVN",tenants:[{code:"KVN",name:"KVN",store_detail_list:[{buCode:"KVN",code:"9998",name:"KVNL 9998"}],stores:["9998"],timezone:"Europe/Amsterdam"}],errorCode:0,errorMessage:"",requseCodeTag:6,success:!1},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"eu",serverEnv:"sit"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{buCode:"KVN",code:"9998",name:"KVNL 9998"},data_language:{code:"en",id:"en_US",name:"English"}};exports.default=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={data_info:{bu:{default_tenant_code:"KVN",tenants:[{code:"KVN",name:"KVN",store_detail_list:[{buCode:"KVN",code:"9998",name:"KVNL 9998"}],stores:["9998"],timezone:"Europe/Amsterdam"}],errorCode:0,errorMessage:"",requseCodeTag:6,success:!1},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"eu",serverEnv:"sit"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{buCode:"KVN",code:"9998",name:"KVNL 9998"},data_language:{code:"en",id:"en_US",name:"English"}};exports.default=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={data_info:{bu:{default_tenant_code:"WTCHK",tenants:[{store_detail_list:[{name:"APELDOORN HOOFDSTRAAT 136",code:"3462"}],name:"WTCHK",stores:["3462"],timezone:"Europe/Amsterdam",code:"WTCHK"}]},menus:[{code:"osp-superapp-inventory",id:"6113847737833037825",name:"Inventory",parent_id:"0"},{code:"osp-superapp-event-count",id:"6113867563402076161",name:"Event Count",parent_id:"6113847737833037825"},{code:"osp-superapp-shelf-fulfillment",id:"6113867975718936577",name:"Shelf Fulfillment",parent_id:"6113847737833037825"},{code:"osp-superapp-reports",id:"6113868456755273729",name:"Reports",parent_id:"0"},{code:"osp-superapp-user-management",id:"6113868869072134145",name:"User Management",parent_id:"0"},{code:"osp-superapp-online-orders",id:"6318558832782852097",name:"Online Orders",parent_id:"0"},{code:"osp-superapp-pick-pack-orders",id:"6318559348178927617",name:"Pick & Pack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders",id:"6318559863575003137",name:"Collect Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@unpack_orders/home",id:"6318560756928200705",name:"Unpack Orders",parent_id:"6318558832782852097"},{code:"osp-superapp-collect-orders@orders_collect/search",id:"6318561856439828481",name:"Search Orders",parent_id:"6318558832782852097"}],serverInfo:{serverArea:"asia",serverEnv:"uat"},token:{access_token:"2c0d362e-5835-4bac-b168-a00ac9856998",expires_in:86399,refresh_token:"992e3a36-fd27-4074-af15-f09a4a939b67",scope:"read write",token_type:"bearer"},user:{create_time:"2023-08-22 11: 08: 21",email:"ospsuperapp2@163.com",gender:"",id:"6113892817809776640",introduction:"",language:"en",last_modify_time:"2023-08-24 10: 53: 32",password_strength_name:"MIDDLE",password_validity_period:"PERMANENT",password_validity_period_time:"2856-12-22 11: 08: 21",phone:"",real_name:"ospsuperapp2",special:"false",status:"NORMAL",tenant_id:"0",time_zone:"Europe/Amsterdam",type:"STAFF",user_name:"ospsuperapp2",errorCode:0,errorMessage:"",requseCodeTag:4,success:!1}},data_store:{name:"APELDOORN HOOFDSTRAAT 3462",code:"3462"},data_language:{code:"en",id:"en_US",name:"English"}};exports.default=e;
package/lib/main.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const NativeApi: import("./src/init/type").initType;
1
+ import NativeApi from './src/init';
2
2
  export default NativeApi;
package/lib/main.js CHANGED
@@ -1,5 +1,4 @@
1
- import t from "./src/init/index.js";
2
- const i = t;
1
+ import a from "./src/init/index.js";
3
2
  export {
4
- i as default
3
+ a as default
5
4
  };
package/lib/main.umd.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const i={init(t){return console.log("initNative",t),t}},e=i;module.exports=e;
1
+ "use strict";var de=Object.defineProperty;var ue=(t,e,n)=>e in t?de(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var O=(t,e,n)=>(ue(t,typeof e!="symbol"?e+"":e,n),n);/*! Capacitor: https://capacitorjs.com/ - MIT License */const fe=t=>{const e=new Map;e.set("web",{name:"web"});const n=t.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:e},s=(a,o)=>{n.platforms.set(a,o)},r=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=r,n},pe=t=>t.CapacitorPlatforms=fe(t),Y=pe(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Y.addPlatform;Y.setPlatform;var A;(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(A||(A={}));class _ extends Error{constructor(e,n,s){super(e),this.message=e,this.code=n,this.data=s}}const ge=t=>{var e,n;return t!=null&&t.androidBridge?"android":!((n=(e=t==null?void 0:t.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},ve=t=>{var e,n,s,r,a;const o=t.CapacitorCustomPlatform||null,i=t.Capacitor||{},f=i.Plugins=i.Plugins||{},l=t.CapacitorPlatforms,x=()=>o!==null?o.name:ge(t),y=((e=l==null?void 0:l.currentPlatform)===null||e===void 0?void 0:e.getPlatform)||x,j=()=>y()!=="web",V=((n=l==null?void 0:l.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||j,ee=c=>{const d=E.get(c);return!!(d!=null&&d.platforms.has(y())||B(c))},te=((s=l==null?void 0:l.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||ee,ne=c=>{var d;return(d=i.PluginHeaders)===null||d===void 0?void 0:d.find(C=>C.name===c)},B=((r=l==null?void 0:l.currentPlatform)===null||r===void 0?void 0:r.getPluginHeader)||ne,re=c=>t.console.error(c),ae=(c,d,C)=>Promise.reject(`${C} does not have an implementation of "${d}".`),E=new Map,se=(c,d={})=>{const C=E.get(c);if(C)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),C.proxy;const P=y(),L=B(c);let w;const oe=async()=>(!w&&P in d?w=typeof d[P]=="function"?w=await d[P]():w=d[P]:o!==null&&!w&&"web"in d&&(w=typeof d.web=="function"?w=await d.web():w=d.web),w),le=(u,p)=>{var v,m;if(L){const h=L==null?void 0:L.methods.find(g=>p===g.name);if(h)return h.rtype==="promise"?g=>i.nativePromise(c,p.toString(),g):(g,H)=>i.nativeCallback(c,p.toString(),g,H);if(u)return(v=u[p])===null||v===void 0?void 0:v.bind(u)}else{if(u)return(m=u[p])===null||m===void 0?void 0:m.bind(u);throw new _(`"${c}" plugin is not implemented on ${P}`,A.Unimplemented)}},T=u=>{let p;const v=(...m)=>{const h=oe().then(g=>{const H=le(g,u);if(H){const U=H(...m);return p=U==null?void 0:U.remove,U}else throw new _(`"${c}.${u}()" is not implemented on ${P}`,A.Unimplemented)});return u==="addListener"&&(h.remove=async()=>p()),h};return v.toString=()=>`${u.toString()}() { [capacitor code] }`,Object.defineProperty(v,"name",{value:u,writable:!1,configurable:!1}),v},G=T("addListener"),J=T("removeListener"),ce=(u,p)=>{const v=G({eventName:u},p),m=async()=>{const g=await v;J({eventName:u,callbackId:g},p)},h=new Promise(g=>v.then(()=>g({remove:m})));return h.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await m()},h},S=new Proxy({},{get(u,p){switch(p){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return L?ce:G;case"removeListener":return J;default:return T(p)}}});return f[c]=S,E.set(c,{name:c,proxy:S,platforms:new Set([...Object.keys(d),...L?[P]:[]])}),S},ie=((a=l==null?void 0:l.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||se;return i.convertFileSrc||(i.convertFileSrc=c=>c),i.getPlatform=y,i.handleError=re,i.isNativePlatform=V,i.isPluginAvailable=te,i.pluginMethodNoop=ae,i.registerPlugin=ie,i.Exception=_,i.DEBUG=!!i.DEBUG,i.isLoggingEnabled=!!i.isLoggingEnabled,i.platform=i.getPlatform(),i.isNative=i.isNativePlatform(),i},we=t=>t.Capacitor=ve(t),I=we(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),W=I.registerPlugin;I.Plugins;class M{constructor(e){this.listeners={},this.windowListeners={},e&&(console.warn(`Capacitor WebPlugin "${e.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=e)}addListener(e,n){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(n);const r=this.windowListeners[e];r&&!r.registered&&this.addWindowListener(r);const a=async()=>this.removeListener(e,n),o=Promise.resolve({remove:a});return Object.defineProperty(o,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await a()}}),o}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,n){const s=this.listeners[e];s&&s.forEach(r=>r(n))}hasListeners(e){return!!this.listeners[e].length}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(e="not implemented"){return new I.Exception(e,A.Unimplemented)}unavailable(e="not available"){return new I.Exception(e,A.Unavailable)}async removeListener(e,n){const s=this.listeners[e];if(!s)return;const r=s.indexOf(n);this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}}const F=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),K=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class me extends M{async getCookies(){const e=document.cookie,n={};return e.split(";").forEach(s=>{if(s.length<=0)return;let[r,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");r=K(r).trim(),a=K(a).trim(),n[r]=a}),n}async setCookie(e){try{const n=F(e.key),s=F(e.value),r=`; expires=${(e.expires||"").replace("expires=","")}`,a=(e.path||"/").replace("path=",""),o=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${n}=${s||""}${r}; path=${a}; ${o};`}catch(n){return Promise.reject(n)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const n of e)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}W("CapacitorCookies",{web:()=>new me});const he=async t=>new Promise((e,n)=>{const s=new FileReader;s.onload=()=>{const r=s.result;e(r.indexOf(",")>=0?r.split(",")[1]:r)},s.onerror=r=>n(r),s.readAsDataURL(t)}),Pe=(t={})=>{const e=Object.keys(t);return Object.keys(t).map(r=>r.toLocaleLowerCase()).reduce((r,a,o)=>(r[a]=t[e[o]],r),{})},be=(t,e=!0)=>t?Object.entries(t).reduce((s,r)=>{const[a,o]=r;let i,f;return Array.isArray(o)?(f="",o.forEach(l=>{i=e?encodeURIComponent(l):l,f+=`${a}=${i}&`}),f.slice(0,-1)):(i=e?encodeURIComponent(o):o,f=`${a}=${i}`),`${s}&${f}`},"").substr(1):null,ye=(t,e={})=>{const n=Object.assign({method:t.method||"GET",headers:t.headers},e),r=Pe(t.headers)["content-type"]||"";if(typeof t.data=="string")n.body=t.data;else if(r.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[o,i]of Object.entries(t.data||{}))a.set(o,i);n.body=a.toString()}else if(r.includes("multipart/form-data")){const a=new FormData;if(t.data instanceof FormData)t.data.forEach((i,f)=>{a.append(f,i)});else for(const i of Object.keys(t.data))a.append(i,t.data[i]);n.body=a;const o=new Headers(n.headers);o.delete("content-type"),n.headers=o}else(r.includes("application/json")||typeof t.data=="object")&&(n.body=JSON.stringify(t.data));return n};class Ce extends M{async request(e){const n=ye(e,e.webFetchExtra),s=be(e.params,e.shouldEncodeUrlParams),r=s?`${e.url}?${s}`:e.url,a=await fetch(r,n),o=a.headers.get("content-type")||"";let{responseType:i="text"}=a.ok?e:{};o.includes("application/json")&&(i="json");let f,l;switch(i){case"arraybuffer":case"blob":l=await a.blob(),f=await he(l);break;case"json":f=await a.json();break;case"document":case"text":default:f=await a.text()}const x={};return a.headers.forEach((y,j)=>{x[j]=y}),{data:f,headers:x,status:a.status,url:a.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}W("CapacitorHttp",{web:()=>new Ce});/*! Ionic Portals: https://ionic.io/portals - Commercial License */W("Portals",{web:()=>Promise.resolve().then(function(){return Ae}).then(t=>new t.PortalsWeb)});function N(){return I.getPlatform()==="android"?JSON.parse(AndroidInitialContext.initialContext()):window.portalInitialContext}class Le extends M{async publishNative(e){}}const Ae=Object.freeze({__proto__:null,PortalsWeb:Le});var $=(t=>(t.DEV="dev",t.SIT="sit",t.UAT="uat",t.PROD="prod",t.TEST="test",t))($||{}),D=(t=>(t.EU="eu",t.ASIA="asia",t))(D||{});const q=t=>{var e,n;if(!(typeof window>"u")&&N&&(e=N())!=null&&e.value){const s=((n=N())==null?void 0:n.value)??null;s&&t&&t(s)}},Oe=(t,{asiaUatData:e,euSitData:n,euUatData:s})=>{const r=t.env.serveEnv,a=t.env.areaEnv;let o=null;return D.ASIA===a?$.UAT===r&&(o=e):D.EU===a&&($.SIT===r?o=n:$.UAT===r&&(o=s)),o},R=t=>new Promise(async e=>{let n=Oe(t,{asiaUatData:await Promise.resolve().then(()=>require("./chunk/umd/fbb879ae.umd.cjs")),euSitData:await Promise.resolve().then(()=>require("./chunk/umd/7c40191f.umd.cjs")),euUatData:await Promise.resolve().then(()=>require("./chunk/umd/5ca52608.umd.cjs"))});e((n==null?void 0:n.default)??"")}),z=()=>{let t=null;return q(e=>{e?t={data_info:e.data_info?JSON.parse(e.data_info):null,data_store:e.data_store?JSON.parse(e.data_store):null,data_language:e.data_language?JSON.parse(e.data_language):null}:t=null}),t},Q=({cb:t})=>{setTimeout(()=>{q(e=>{if(!(e!=null&&e.params))return;const n=JSON.parse(e.params)??null;if(!n)return;const{params:s,routeName:r}=n;!s||!r||t&&t()})})},X=()=>{let t=!1;return q(e=>{t=!!(e!=null&&e.isNative)}),t},k=class k{constructor(e){O(this,"nativeApiConfig");this.nativeApiConfig=e,k.nativeApiConfig=e}async getIsNativeHandle(){return await X()}static async getIsNativeHandle(){return await X()}async specifiedPageHandle({cb:e}){await Q({cb:e})}static async specifiedPageHandle({cb:e}){await Q({cb:e})}async nativeAppInfo(){return await this.getIsNativeHandle()?await z():await R(this.nativeApiConfig)}static async nativeAppInfo(){return await this.getIsNativeHandle()?await z():await R(k.nativeApiConfig)}};O(k,"nativeApiConfig");let b=k;class Z extends b{constructor(n){super(n);O(this,"nativeApiConfig");this.nativeApiConfig=n,b.nativeApiConfig=n}async getIsNativeHandle(){return await super.getIsNativeHandle()}static async getIsNativeHandle(){return await b.getIsNativeHandle()}async specifiedPageHandle({cb:n}){return await super.specifiedPageHandle({cb:n})}static async specifiedPageHandle({cb:n}){return await b.specifiedPageHandle({cb:n})}async nativeAppInfo(){await super.nativeAppInfo()}static async nativeAppInfo(){await b.nativeAppInfo()}}O(Z,"nativeApiConfig");class ke extends Z{}module.exports=ke;
@@ -1,11 +1,6 @@
1
1
  import type { PluginCallback } from '@capacitor/core';
2
2
  import type { MinAppType, TitleType, isClickType, subMaskType } from '../../plugins/communicate';
3
- import { specifiedPageType } from '../../apiHandle/communicate/hooks/specifiedPage';
4
3
  declare class CommunicatePlugins {
5
- nativeApiConfig?: any;
6
- constructor(communicateParams?: any);
7
- nativeAppInfo(): Promise<any>;
8
- specifiedPageHandle({ router }: specifiedPageType): Promise<void>;
9
4
  homeIsClick(isClick: isClickType): Promise<void>;
10
5
  openMinApp(minApp: MinAppType): Promise<void>;
11
6
  showTitle(title: TitleType): Promise<void>;
@@ -0,0 +1,22 @@
1
+ import { getLocationMockDataHandle as n, getInitialContextHandle as o } from "../hooks/index.js";
2
+ const r = (t) => new Promise(async (a) => {
3
+ let e = n(t, {
4
+ asiaUatData: await import("./mock/asia-uat.js"),
5
+ euSitData: await import("./mock/eu-sit.js"),
6
+ euUatData: await import("./mock/eu-uat.js")
7
+ });
8
+ a((e == null ? void 0 : e.default) ?? "");
9
+ }), l = () => {
10
+ let t = null;
11
+ return o((a) => {
12
+ a ? t = {
13
+ data_info: a.data_info ? JSON.parse(a.data_info) : null,
14
+ data_store: a.data_store ? JSON.parse(a.data_store) : null,
15
+ data_language: a.data_language ? JSON.parse(a.data_language) : null
16
+ } : t = null;
17
+ }), t;
18
+ };
19
+ export {
20
+ l as getNativeAppInfo,
21
+ r as getNativeAppInfoDev
22
+ };
@@ -0,0 +1,127 @@
1
+ const e = {
2
+ data_info: {
3
+ bu: {
4
+ default_tenant_code: "WTCHK",
5
+ tenants: [
6
+ {
7
+ store_detail_list: [
8
+ { name: "APELDOORN HOOFDSTRAAT 136", code: "3462" }
9
+ ],
10
+ name: "WTCHK",
11
+ stores: ["3462"],
12
+ timezone: "Europe/Amsterdam",
13
+ code: "WTCHK"
14
+ }
15
+ ]
16
+ },
17
+ menus: [
18
+ {
19
+ code: "osp-superapp-inventory",
20
+ id: "6113847737833037825",
21
+ name: "Inventory",
22
+ parent_id: "0"
23
+ },
24
+ {
25
+ code: "osp-superapp-event-count",
26
+ id: "6113867563402076161",
27
+ name: "Event Count",
28
+ parent_id: "6113847737833037825"
29
+ },
30
+ {
31
+ code: "osp-superapp-shelf-fulfillment",
32
+ id: "6113867975718936577",
33
+ name: "Shelf Fulfillment",
34
+ parent_id: "6113847737833037825"
35
+ },
36
+ {
37
+ code: "osp-superapp-reports",
38
+ id: "6113868456755273729",
39
+ name: "Reports",
40
+ parent_id: "0"
41
+ },
42
+ {
43
+ code: "osp-superapp-user-management",
44
+ id: "6113868869072134145",
45
+ name: "User Management",
46
+ parent_id: "0"
47
+ },
48
+ {
49
+ code: "osp-superapp-online-orders",
50
+ id: "6318558832782852097",
51
+ name: "Online Orders",
52
+ parent_id: "0"
53
+ },
54
+ {
55
+ code: "osp-superapp-pick-pack-orders",
56
+ id: "6318559348178927617",
57
+ name: "Pick & Pack Orders",
58
+ parent_id: "6318558832782852097"
59
+ },
60
+ {
61
+ code: "osp-superapp-collect-orders",
62
+ id: "6318559863575003137",
63
+ name: "Collect Orders",
64
+ parent_id: "6318558832782852097"
65
+ },
66
+ {
67
+ code: "osp-superapp-collect-orders@unpack_orders/home",
68
+ id: "6318560756928200705",
69
+ name: "Unpack Orders",
70
+ parent_id: "6318558832782852097"
71
+ },
72
+ {
73
+ code: "osp-superapp-collect-orders@orders_collect/search",
74
+ id: "6318561856439828481",
75
+ name: "Search Orders",
76
+ parent_id: "6318558832782852097"
77
+ }
78
+ ],
79
+ serverInfo: {
80
+ serverArea: "asia",
81
+ serverEnv: "uat"
82
+ },
83
+ token: {
84
+ access_token: "2c0d362e-5835-4bac-b168-a00ac9856998",
85
+ expires_in: 86399,
86
+ refresh_token: "992e3a36-fd27-4074-af15-f09a4a939b67",
87
+ scope: "read write",
88
+ token_type: "bearer"
89
+ },
90
+ user: {
91
+ create_time: "2023-08-22 11: 08: 21",
92
+ email: "ospsuperapp2@163.com",
93
+ gender: "",
94
+ id: "6113892817809776640",
95
+ introduction: "",
96
+ language: "en",
97
+ last_modify_time: "2023-08-24 10: 53: 32",
98
+ password_strength_name: "MIDDLE",
99
+ password_validity_period: "PERMANENT",
100
+ password_validity_period_time: "2856-12-22 11: 08: 21",
101
+ phone: "",
102
+ real_name: "ospsuperapp2",
103
+ special: "false",
104
+ status: "NORMAL",
105
+ tenant_id: "0",
106
+ time_zone: "Europe/Amsterdam",
107
+ type: "STAFF",
108
+ user_name: "ospsuperapp2",
109
+ errorCode: 0,
110
+ errorMessage: "",
111
+ requseCodeTag: 4,
112
+ success: !1
113
+ }
114
+ },
115
+ data_store: {
116
+ name: "APELDOORN HOOFDSTRAAT 3462",
117
+ code: "3462"
118
+ },
119
+ data_language: {
120
+ code: "en",
121
+ id: "en_US",
122
+ name: "English"
123
+ }
124
+ };
125
+ export {
126
+ e as default
127
+ };
@@ -0,0 +1,136 @@
1
+ const e = {
2
+ data_info: {
3
+ bu: {
4
+ default_tenant_code: "KVN",
5
+ tenants: [
6
+ {
7
+ code: "KVN",
8
+ name: "KVN",
9
+ store_detail_list: [
10
+ {
11
+ buCode: "KVN",
12
+ code: "9998",
13
+ name: "KVNL 9998"
14
+ }
15
+ ],
16
+ stores: ["9998"],
17
+ timezone: "Europe/Amsterdam"
18
+ }
19
+ ],
20
+ errorCode: 0,
21
+ errorMessage: "",
22
+ requseCodeTag: 6,
23
+ success: !1
24
+ },
25
+ menus: [
26
+ {
27
+ code: "osp-superapp-inventory",
28
+ id: "6113847737833037825",
29
+ name: "Inventory",
30
+ parent_id: "0"
31
+ },
32
+ {
33
+ code: "osp-superapp-event-count",
34
+ id: "6113867563402076161",
35
+ name: "Event Count",
36
+ parent_id: "6113847737833037825"
37
+ },
38
+ {
39
+ code: "osp-superapp-shelf-fulfillment",
40
+ id: "6113867975718936577",
41
+ name: "Shelf Fulfillment",
42
+ parent_id: "6113847737833037825"
43
+ },
44
+ {
45
+ code: "osp-superapp-reports",
46
+ id: "6113868456755273729",
47
+ name: "Reports",
48
+ parent_id: "0"
49
+ },
50
+ {
51
+ code: "osp-superapp-user-management",
52
+ id: "6113868869072134145",
53
+ name: "User Management",
54
+ parent_id: "0"
55
+ },
56
+ {
57
+ code: "osp-superapp-online-orders",
58
+ id: "6318558832782852097",
59
+ name: "Online Orders",
60
+ parent_id: "0"
61
+ },
62
+ {
63
+ code: "osp-superapp-pick-pack-orders",
64
+ id: "6318559348178927617",
65
+ name: "Pick & Pack Orders",
66
+ parent_id: "6318558832782852097"
67
+ },
68
+ {
69
+ code: "osp-superapp-collect-orders",
70
+ id: "6318559863575003137",
71
+ name: "Collect Orders",
72
+ parent_id: "6318558832782852097"
73
+ },
74
+ {
75
+ code: "osp-superapp-collect-orders@unpack_orders/home",
76
+ id: "6318560756928200705",
77
+ name: "Unpack Orders",
78
+ parent_id: "6318558832782852097"
79
+ },
80
+ {
81
+ code: "osp-superapp-collect-orders@orders_collect/search",
82
+ id: "6318561856439828481",
83
+ name: "Search Orders",
84
+ parent_id: "6318558832782852097"
85
+ }
86
+ ],
87
+ serverInfo: {
88
+ serverArea: "eu",
89
+ serverEnv: "sit"
90
+ },
91
+ token: {
92
+ access_token: "2c0d362e-5835-4bac-b168-a00ac9856998",
93
+ expires_in: 86399,
94
+ refresh_token: "992e3a36-fd27-4074-af15-f09a4a939b67",
95
+ scope: "read write",
96
+ token_type: "bearer"
97
+ },
98
+ user: {
99
+ create_time: "2023-08-22 11: 08: 21",
100
+ email: "ospsuperapp2@163.com",
101
+ gender: "",
102
+ id: "6113892817809776640",
103
+ introduction: "",
104
+ language: "en",
105
+ last_modify_time: "2023-08-24 10: 53: 32",
106
+ password_strength_name: "MIDDLE",
107
+ password_validity_period: "PERMANENT",
108
+ password_validity_period_time: "2856-12-22 11: 08: 21",
109
+ phone: "",
110
+ real_name: "ospsuperapp2",
111
+ special: "false",
112
+ status: "NORMAL",
113
+ tenant_id: "0",
114
+ time_zone: "Europe/Amsterdam",
115
+ type: "STAFF",
116
+ user_name: "ospsuperapp2",
117
+ errorCode: 0,
118
+ errorMessage: "",
119
+ requseCodeTag: 4,
120
+ success: !1
121
+ }
122
+ },
123
+ data_store: {
124
+ buCode: "KVN",
125
+ code: "9998",
126
+ name: "KVNL 9998"
127
+ },
128
+ data_language: {
129
+ code: "en",
130
+ id: "en_US",
131
+ name: "English"
132
+ }
133
+ };
134
+ export {
135
+ e as default
136
+ };
@@ -0,0 +1,136 @@
1
+ const e = {
2
+ data_info: {
3
+ bu: {
4
+ default_tenant_code: "KVN",
5
+ tenants: [
6
+ {
7
+ code: "KVN",
8
+ name: "KVN",
9
+ store_detail_list: [
10
+ {
11
+ buCode: "KVN",
12
+ code: "9998",
13
+ name: "KVNL 9998"
14
+ }
15
+ ],
16
+ stores: ["9998"],
17
+ timezone: "Europe/Amsterdam"
18
+ }
19
+ ],
20
+ errorCode: 0,
21
+ errorMessage: "",
22
+ requseCodeTag: 6,
23
+ success: !1
24
+ },
25
+ menus: [
26
+ {
27
+ code: "osp-superapp-inventory",
28
+ id: "6113847737833037825",
29
+ name: "Inventory",
30
+ parent_id: "0"
31
+ },
32
+ {
33
+ code: "osp-superapp-event-count",
34
+ id: "6113867563402076161",
35
+ name: "Event Count",
36
+ parent_id: "6113847737833037825"
37
+ },
38
+ {
39
+ code: "osp-superapp-shelf-fulfillment",
40
+ id: "6113867975718936577",
41
+ name: "Shelf Fulfillment",
42
+ parent_id: "6113847737833037825"
43
+ },
44
+ {
45
+ code: "osp-superapp-reports",
46
+ id: "6113868456755273729",
47
+ name: "Reports",
48
+ parent_id: "0"
49
+ },
50
+ {
51
+ code: "osp-superapp-user-management",
52
+ id: "6113868869072134145",
53
+ name: "User Management",
54
+ parent_id: "0"
55
+ },
56
+ {
57
+ code: "osp-superapp-online-orders",
58
+ id: "6318558832782852097",
59
+ name: "Online Orders",
60
+ parent_id: "0"
61
+ },
62
+ {
63
+ code: "osp-superapp-pick-pack-orders",
64
+ id: "6318559348178927617",
65
+ name: "Pick & Pack Orders",
66
+ parent_id: "6318558832782852097"
67
+ },
68
+ {
69
+ code: "osp-superapp-collect-orders",
70
+ id: "6318559863575003137",
71
+ name: "Collect Orders",
72
+ parent_id: "6318558832782852097"
73
+ },
74
+ {
75
+ code: "osp-superapp-collect-orders@unpack_orders/home",
76
+ id: "6318560756928200705",
77
+ name: "Unpack Orders",
78
+ parent_id: "6318558832782852097"
79
+ },
80
+ {
81
+ code: "osp-superapp-collect-orders@orders_collect/search",
82
+ id: "6318561856439828481",
83
+ name: "Search Orders",
84
+ parent_id: "6318558832782852097"
85
+ }
86
+ ],
87
+ serverInfo: {
88
+ serverArea: "eu",
89
+ serverEnv: "sit"
90
+ },
91
+ token: {
92
+ access_token: "2c0d362e-5835-4bac-b168-a00ac9856998",
93
+ expires_in: 86399,
94
+ refresh_token: "992e3a36-fd27-4074-af15-f09a4a939b67",
95
+ scope: "read write",
96
+ token_type: "bearer"
97
+ },
98
+ user: {
99
+ create_time: "2023-08-22 11: 08: 21",
100
+ email: "ospsuperapp2@163.com",
101
+ gender: "",
102
+ id: "6113892817809776640",
103
+ introduction: "",
104
+ language: "en",
105
+ last_modify_time: "2023-08-24 10: 53: 32",
106
+ password_strength_name: "MIDDLE",
107
+ password_validity_period: "PERMANENT",
108
+ password_validity_period_time: "2856-12-22 11: 08: 21",
109
+ phone: "",
110
+ real_name: "ospsuperapp2",
111
+ special: "false",
112
+ status: "NORMAL",
113
+ tenant_id: "0",
114
+ time_zone: "Europe/Amsterdam",
115
+ type: "STAFF",
116
+ user_name: "ospsuperapp2",
117
+ errorCode: 0,
118
+ errorMessage: "",
119
+ requseCodeTag: 4,
120
+ success: !1
121
+ }
122
+ },
123
+ data_store: {
124
+ buCode: "KVN",
125
+ code: "9998",
126
+ name: "KVNL 9998"
127
+ },
128
+ data_language: {
129
+ code: "en",
130
+ id: "en_US",
131
+ name: "English"
132
+ }
133
+ };
134
+ export {
135
+ e as default
136
+ };
@@ -1,5 +1,3 @@
1
1
  import { PluginCallback } from '@capacitor/core';
2
- export type ContextType = {
3
- params: string;
4
- };
5
2
  export declare const getInitialContextHandle: (cb: PluginCallback) => void;
3
+ export declare const getLocationMockDataHandle: (globalConfig: any, { asiaUatData, euSitData, euUatData }: any) => any;
@@ -0,0 +1,17 @@
1
+ import { getInitialContext as r } from "../../../../node_modules/@ionic/portals/dist/index.js";
2
+ import { SERVE_AREA as f, SERVE_ENV as l } from "../../../constant/index.js";
3
+ const u = (e) => {
4
+ var t, n;
5
+ if (!(typeof window > "u") && r && (t = r()) != null && t.value) {
6
+ const i = ((n = r()) == null ? void 0 : n.value) ?? null;
7
+ i && e && e(i);
8
+ }
9
+ }, c = (e, { asiaUatData: t, euSitData: n, euUatData: i }) => {
10
+ const a = e.env.serveEnv, E = e.env.areaEnv;
11
+ let o = null;
12
+ return f.ASIA === E ? l.UAT === a && (o = t) : f.EU === E && (l.SIT === a ? o = n : l.UAT === a && (o = i)), o;
13
+ };
14
+ export {
15
+ u as getInitialContextHandle,
16
+ c as getLocationMockDataHandle
17
+ };
@@ -0,0 +1,17 @@
1
+ import { specifiedPageType } from './specifiedPage';
2
+ export interface InitialContextPluginsType {
3
+ getIsNativeHandle: () => Promise<boolean>;
4
+ specifiedPageHandle: ({ cb }: specifiedPageType) => void;
5
+ nativeAppInfo: () => Promise<any>;
6
+ }
7
+ export default class InitialContextPlugins implements InitialContextPluginsType {
8
+ nativeApiConfig?: any;
9
+ static nativeApiConfig?: any;
10
+ constructor(nativeApiConfig?: any);
11
+ getIsNativeHandle(): Promise<boolean>;
12
+ static getIsNativeHandle(): Promise<boolean>;
13
+ specifiedPageHandle({ cb }: specifiedPageType): Promise<void>;
14
+ static specifiedPageHandle({ cb }: specifiedPageType): Promise<void>;
15
+ nativeAppInfo(): Promise<any>;
16
+ static nativeAppInfo(): Promise<any>;
17
+ }
@@ -0,0 +1,38 @@
1
+ var c = Object.defineProperty;
2
+ var f = (t, a, i) => a in t ? c(t, a, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[a] = i;
3
+ var s = (t, a, i) => (f(t, typeof a != "symbol" ? a + "" : a, i), i);
4
+ import { getNativeAppInfo as n, getNativeAppInfoDev as o } from "./getData/index.js";
5
+ import r from "./specifiedPage/index.js";
6
+ import p from "./isNative/index.js";
7
+ const e = class e {
8
+ constructor(a) {
9
+ s(this, "nativeApiConfig");
10
+ this.nativeApiConfig = a, e.nativeApiConfig = a;
11
+ }
12
+ // getIsNativeHandle
13
+ async getIsNativeHandle() {
14
+ return await p();
15
+ }
16
+ static async getIsNativeHandle() {
17
+ return await p();
18
+ }
19
+ // specifiedPageHandle
20
+ async specifiedPageHandle({ cb: a }) {
21
+ await r({ cb: a });
22
+ }
23
+ static async specifiedPageHandle({ cb: a }) {
24
+ await r({ cb: a });
25
+ }
26
+ // nativeAppInfo
27
+ async nativeAppInfo() {
28
+ return await this.getIsNativeHandle() ? await n() : await o(this.nativeApiConfig);
29
+ }
30
+ static async nativeAppInfo() {
31
+ return await this.getIsNativeHandle() ? await n() : await o(e.nativeApiConfig);
32
+ }
33
+ };
34
+ s(e, "nativeApiConfig");
35
+ let v = e;
36
+ export {
37
+ v as default
38
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: () => boolean;
2
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { getInitialContextHandle as i } from "../hooks/index.js";
2
+ const s = () => {
3
+ let e = !1;
4
+ return i((t) => {
5
+ e = !!(t != null && t.isNative);
6
+ }), e;
7
+ };
8
+ export {
9
+ s as default
10
+ };
@@ -0,0 +1,5 @@
1
+ export interface specifiedPageType {
2
+ cb: (params?: any) => void;
3
+ }
4
+ declare const _default: ({ cb }: specifiedPageType) => void;
5
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { getInitialContextHandle as n } from "../hooks/index.js";
2
+ const i = ({ cb: r }) => {
3
+ setTimeout(() => {
4
+ n((t) => {
5
+ if (!(t != null && t.params))
6
+ return;
7
+ const e = JSON.parse(t.params) ?? null;
8
+ if (!e)
9
+ return;
10
+ const { params: o, routeName: a } = e;
11
+ !o || !a || r && r();
12
+ });
13
+ });
14
+ };
15
+ export {
16
+ i as default
17
+ };
@@ -0,0 +1,5 @@
1
+ var t = /* @__PURE__ */ ((r) => (r.DEV = "dev", r.SIT = "sit", r.UAT = "uat", r.PROD = "prod", r.TEST = "test", r))(t || {}), e = /* @__PURE__ */ ((r) => (r.EU = "eu", r.ASIA = "asia", r))(e || {});
2
+ export {
3
+ e as SERVE_AREA,
4
+ t as SERVE_ENV
5
+ };
@@ -1,5 +1,14 @@
1
- import { NativeApiType } from './type';
2
- export declare class NativeMainApi implements NativeApiType {
3
- static nativeAppInfo(): Promise<void>;
1
+ import InitialContextPlugins from '../apiHandle/initialContext';
2
+ import type { NativeApiType } from './type';
3
+ import type { specifiedPageType } from '../apiHandle/initialContext/specifiedPage';
4
+ export default class NativeMainApi extends InitialContextPlugins implements NativeApiType {
5
+ nativeApiConfig?: any;
6
+ static nativeApiConfig?: any;
7
+ constructor(nativeApiConfig?: any);
8
+ getIsNativeHandle(): Promise<boolean>;
9
+ static getIsNativeHandle(): Promise<boolean>;
10
+ specifiedPageHandle({ cb }: specifiedPageType): Promise<void>;
11
+ static specifiedPageHandle({ cb }: specifiedPageType): Promise<void>;
4
12
  nativeAppInfo(): Promise<void>;
13
+ static nativeAppInfo(): Promise<void>;
5
14
  }
@@ -0,0 +1,33 @@
1
+ var s = Object.defineProperty;
2
+ var p = (t, e, a) => e in t ? s(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
3
+ var n = (t, e, a) => (p(t, typeof e != "symbol" ? e + "" : e, a), a);
4
+ import i from "../apiHandle/initialContext/index.js";
5
+ class c extends i {
6
+ constructor(a) {
7
+ super(a);
8
+ n(this, "nativeApiConfig");
9
+ this.nativeApiConfig = a, i.nativeApiConfig = a;
10
+ }
11
+ async getIsNativeHandle() {
12
+ return await super.getIsNativeHandle();
13
+ }
14
+ static async getIsNativeHandle() {
15
+ return await i.getIsNativeHandle();
16
+ }
17
+ async specifiedPageHandle({ cb: a }) {
18
+ return await super.specifiedPageHandle({ cb: a });
19
+ }
20
+ static async specifiedPageHandle({ cb: a }) {
21
+ return await i.specifiedPageHandle({ cb: a });
22
+ }
23
+ async nativeAppInfo() {
24
+ await super.nativeAppInfo();
25
+ }
26
+ static async nativeAppInfo() {
27
+ await i.nativeAppInfo();
28
+ }
29
+ }
30
+ n(c, "nativeApiConfig");
31
+ export {
32
+ c as default
33
+ };
@@ -1,3 +1,4 @@
1
- import { initType } from '../init/type';
2
- declare const _default: initType;
3
- export default _default;
1
+ import type { NativeApiType } from '../init/type';
2
+ import NativeMainApi from '../init/NativeApi';
3
+ export default class NativeApi extends NativeMainApi implements NativeApiType {
4
+ }
@@ -1,8 +1,6 @@
1
- const i = {
2
- init(t) {
3
- return console.log("initNative", t), t;
4
- }
5
- };
1
+ import a from "./NativeApi.js";
2
+ class t extends a {
3
+ }
6
4
  export {
7
- i as default
5
+ t as default
8
6
  };
@@ -1,11 +1,9 @@
1
- export interface initType {
2
- init: (params: NativeApiParamsType) => void;
3
- }
4
- export interface NativeApiParamsType {
1
+ import type { InitialContextPluginsType } from '../apiHandle/initialContext';
2
+ export interface NativeApiConfigType {
5
3
  serverInfo: {
6
4
  area: string;
7
5
  env: string;
8
6
  };
9
7
  }
10
- export interface NativeApiType {
8
+ export interface NativeApiType extends InitialContextPluginsType {
11
9
  }
@@ -1 +0,0 @@
1
- export declare const getLocationMockDataHandle: (globalConfig: any, { asiaUatData, euSitData, euUatData }: any) => any;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "superapp-miniapp-invoke-native",
3
3
  "type": "module",
4
- "version": "1.0.28",
4
+ "version": "1.0.30",
5
5
  "description": "Superapp中,小程序调用Native 接口的封装,如OSP项目中,需要调用Native的相机扫描,镭射扫描,获取RBAC的数据等",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -1,6 +0,0 @@
1
- import { Router } from 'vue-router';
2
- export interface specifiedPageType {
3
- router: Router;
4
- }
5
- declare const _default: ({ router }: specifiedPageType) => void;
6
- export default _default;