@skyservice-developers/vue-dev-kit 2.2.0 → 2.3.0
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/dist/{api-Eeo-WwNi.js → api-AhLH5w3p.js} +35 -33
- package/dist/api-lQ6dAmaI.cjs +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/sdk/api.d.ts +2 -2
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/types.d.ts +10 -0
- package/dist/sdk.cjs +1 -1
- package/dist/sdk.js +1 -1
- package/dist/shared/ui/BaseTeleport/index.d.ts +1 -0
- package/dist/shared/ui/Dialog/index.d.ts +1 -0
- package/dist/shared/ui/DialogModal/index.d.ts +1 -0
- package/dist/shared/ui/DialogNext/index.d.ts +1 -0
- package/dist/shared/ui/Header/index.d.ts +1 -0
- package/dist/shared/ui/Modal/index.d.ts +1 -0
- package/dist/shared/ui/SkyAlert/SkyAlert.vue.d.ts +16 -0
- package/dist/shared/ui/SkyAlert/index.d.ts +1 -0
- package/dist/shared/ui/SkyBadge/SkyBadge.vue.d.ts +18 -0
- package/dist/shared/ui/SkyBadge/index.d.ts +1 -0
- package/dist/shared/ui/SkyButton/index.d.ts +1 -0
- package/dist/shared/ui/SkyCard/SkyCard.vue.d.ts +12 -0
- package/dist/shared/ui/SkyCard/index.d.ts +1 -0
- package/dist/shared/ui/SkyCardHeader/SkyCardHeader.vue.d.ts +18 -0
- package/dist/shared/ui/SkyCardHeader/index.d.ts +1 -0
- package/dist/shared/ui/SkyCardRow/SkyCardRow.vue.d.ts +16 -0
- package/dist/shared/ui/SkyCardRow/index.d.ts +1 -0
- package/dist/shared/ui/SkySelect/index.d.ts +1 -0
- package/dist/shared/ui/index.d.ts +13 -0
- package/dist/style.css +1 -1
- package/dist/vue-dev-kit.cjs +1 -1
- package/dist/vue-dev-kit.js +612 -444
- package/dist/widgets/SkyTileCard/SkyTileCard.vue.d.ts +18 -0
- package/dist/widgets/SkyTileCard/index.d.ts +1 -0
- package/dist/widgets/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/api-CpNSgpsc.cjs +0 -1
- package/dist/components/index.d.ts +0 -8
- /package/dist/{components → shared/ui/BaseTeleport}/BaseTeleport.vue.d.ts +0 -0
- /package/dist/{components → shared/ui/Dialog}/Dialog.vue.d.ts +0 -0
- /package/dist/{components → shared/ui/DialogModal}/DialogModal.vue.d.ts +0 -0
- /package/dist/{components → shared/ui/DialogNext}/DialogNext.vue.d.ts +0 -0
- /package/dist/{components → shared/ui/Header}/Header.vue.d.ts +0 -0
- /package/dist/{components → shared/ui/Modal}/Modal.vue.d.ts +0 -0
- /package/dist/{components → shared/ui/SkyButton}/SkyButton.vue.d.ts +0 -0
- /package/dist/{components → shared/ui/SkySelect}/SkySelect.vue.d.ts +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
2
|
+
export default _default;
|
|
3
|
+
type __VLS_WithTemplateSlots<T, S> = T & (new () => {
|
|
4
|
+
$slots: S;
|
|
5
|
+
});
|
|
6
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {
|
|
7
|
+
title: string;
|
|
8
|
+
subtitle: string;
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
$props: {
|
|
11
|
+
readonly title?: string | undefined;
|
|
12
|
+
readonly subtitle?: string | undefined;
|
|
13
|
+
readonly imageUrl?: string | undefined;
|
|
14
|
+
};
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare function __VLS_template(): {
|
|
17
|
+
icon?(_: {}): any;
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SkyTileCard.vue';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SkyTileCard } from './SkyTileCard';
|
package/package.json
CHANGED
package/dist/api-CpNSgpsc.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const S=require("ua-parser-js"),m="DASHBOARD",b=5e3;let A=0,p=null;function E(){return`sdk_${Date.now()}_${++A}`}function L(){return"APP_"+Math.random().toString(36).slice(2,10)}function C(t){p=t}function f(){return p||(p=L()),p}function a(t){window.parent.postMessage({...t,sender:f(),target:t.target||m},"*")}function g(t,e,r=b){return y()?new Promise(n=>{const o=E(),i=f(),s=setTimeout(()=>{window.removeEventListener("message",d),n(null)},r);function d(k){const c=k.data;(c==null?void 0:c.type)==="DATA_RESPONSE"&&(c==null?void 0:c.requestId)===o&&(!c.target||c.target===i)&&(clearTimeout(s),window.removeEventListener("message",d),n(c.data??null))}window.addEventListener("message",d),a({type:"DATA_REQUEST",requestId:o,source:t,key:e})}):Promise.resolve(null)}function P(t){a({type:"navigate",path:t})}function v(){a({type:"exit"})}const T=v;function w(t){return g("store",t)}function l(t){return g("localStorage",t)}function _(t){return g("window",t)}function D(){return w("company")}function W(){return w("user")}function R(){return l("token")}function U(){return l("lang")}function N(){return w("productCategories")}function $(t,e){a({type:"setLocalStorage",key:t,value:e})}function M(t){a({type:"setRocketMode",value:t})}function O(t,e){a({type:"trackVisit",name:t,path:e})}function x(t){a({type:"openExternalLink",url:t})}function q(){a({type:"openCrispChat"})}function B(t){a({type:"notification",text:t})}function j(t){a({type:"notification",text:t,variant:"error"})}function G(t){a({type:"notification",text:t,variant:"warn"})}function y(){try{return window.self!==window.top}catch{return!0}}const V=y;function F(t){function e(r){var n;((n=r.data)==null?void 0:n.sender)===m&&t(r.data)}return window.addEventListener("message",e),()=>window.removeEventListener("message",e)}function u(){if(typeof window>"u")return"browser";if(window.webkit!=null&&window.webkit.messageHandlers!==void 0)try{if(S(navigator.userAgent).browser.name==="WebKit")return"ios_webview"}catch(t){console.error(t)}return typeof Android<"u"?"android_webview":typeof window.cefQuery<"u"?"cef_webview":"browser"}function H(){return u()==="ios_webview"}function Q(){return u()==="android_webview"}function z(){return u()==="cef_webview"}function J(){return u()!=="browser"}const K="https://api.cabinet.developer.skyservice.online/index.php";class h{constructor(e){this.token=e.token,this.companyId=e.companyId,this.appId=e.appId,this.developerId=e.developerId,this.deploymentId=e.deploymentId,this.appName=e.appName;const r=e.domain.replace("dashboard","api");this.baseUrl=r.startsWith("http")?r:`https://${r}`}static create(e){return new h(e)}async get(e){const r=new URLSearchParams({token:this.token,companyId:this.companyId,...e}),n=await fetch(`${this.baseUrl}/?${r}`);if(!n.ok)throw new Error(`Skyservice API error: ${n.status}`);const o=await n.json();if(o.status!=="done")throw new Error(`Skyservice API returned status: ${o.status}`);return o.data}async post(e,r,n){const o=new URLSearchParams({token:this.token,...r}),i=await fetch(`${e}?${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw new Error(`Skyservice API error: ${i.status}`);return i.json()}async getTradepoints(e){const r=await this.get({section:"tradepoints",action:"getTradepoints"});return e!=null&&e.includeDeleted?r.items:r.items.filter(n=>!n.deleted&&!n.frozen)}async getCategoryTree(e){const r=await this.get({section:"productCategory",action:"getCategories",...e?{tradepointId:String(e)}:{}});return I(r,e)}async getProducts(e){const r=await this.get({section:"products",action:"getProducts",pagelimit:"9999",ot:"desc",of:"nomenclatureId",...e!=null&&e.tradepointId?{tradepointId:String(e.tradepointId)}:{}});return Z(r.items,e==null?void 0:e.includeInactive)}async setAppActive({isActive:e,title:r,settings:n}){var d;const o=e?"activateApp":"deactivateApp",i={company_id:this.companyId,app_id:this.appId,...this.developerId!==void 0&&{developer_id:this.developerId},...e&&n!==void 0&&{settings:n}},s=await this.post(K,{section:"integrations",action:o},i);return this.deploymentId&&this.appName&&typeof window<"u"&&window.self!==window.top&&window.parent.postMessage({type:"sendActiveApp",id:((d=s==null?void 0:s.data)==null?void 0:d.appId)??this.appId,is_active:e,deploymentId:this.deploymentId,appName:this.appName,title:r},"*"),s}}function I(t,e){var n,o;const r=[];for(const i of t){if(e!=null&&!((n=i.tradepointShow)==null?void 0:n[String(e)]))continue;const s={id:i.id,pid:i.pid,name:i.name,active:i.active,background:i.background,show:i.show};i.img&&(s.img=i.img),(o=i.children)!=null&&o.length&&(s.children=I(i.children,e)),r.push(s)}return r}const Y=new Set(["product","techcard"]),X="/img/no.png";function Z(t,e){const r=[];for(const n of t)Y.has(n.type)&&(!e&&!n.active||r.push({id:n.id,name:n.nomenclatureName,price:n.price,categoryId:n.categoryId,categoryName:n.categoryTitle||"",active:n.active,type:n.type,unit:n.unit,logo:n.logo&&n.logo!==X?n.logo:""}));return r}exports.SkyserviceAPI=h;exports.exit=v;exports.getBack=T;exports.getCompany=D;exports.getLang=U;exports.getLocalStorageData=l;exports.getProductCategories=N;exports.getSenderId=f;exports.getStoreData=w;exports.getToken=R;exports.getUser=W;exports.getWindowData=_;exports.isAndroidWebview=Q;exports.isCefWebview=z;exports.isInIframe=V;exports.isInsideIframe=y;exports.isIosWebview=H;exports.isWebview=J;exports.navigate=P;exports.notify=B;exports.notifyError=j;exports.notifyWarn=G;exports.onMessage=F;exports.openCrispChat=q;exports.openExternalLink=x;exports.setLocalStorage=$;exports.setRocketMode=M;exports.setSenderId=C;exports.trackVisit=O;exports.webviewCheck=u;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as Header } from './Header.vue';
|
|
2
|
-
export { default as Dialog } from './Dialog.vue';
|
|
3
|
-
export { default as DialogModal } from './DialogModal.vue';
|
|
4
|
-
export { default as DialogNext } from './DialogNext.vue';
|
|
5
|
-
export { default as Modal } from './Modal.vue';
|
|
6
|
-
export { default as SkyButton } from './SkyButton.vue';
|
|
7
|
-
export { default as SkySelect } from './SkySelect.vue';
|
|
8
|
-
export { default as BaseTeleport } from './BaseTeleport.vue';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|