cnhis-design-vue 3.2.3-beta.22 → 3.2.3-beta.24

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.
@@ -1 +1 @@
1
- class t{constructor(t){this.maskMove=t=>{const e=this._isV?t.screenX:t.screenY,s=e-this._mv;this._mv=e;const{onMove:o}=this.options;o&&o({evt:t,distance:s})},this.maskUp=t=>{const{onEnd:e}=this.options,s=this._isV?t.screenX:t.screenY;e&&e({evt:t,distance:s-this._ms}),this.maskRemove()},this.toolDown=t=>{this.maskInsert(),this._isV=/^V/.test(this.options.mode),this._ms=this._mv=this._isV?t.screenX:t.screenY;const{onStart:e}=this.options;e&&e({evt:t,distance:0})},this.options=t||{},this.tool=null,this.mask=null,this._elPosition=null,this._isV=!1,this._ms=0,this._mv=0,this.init(t)}init(t){const{el:e}=t;if(!e)return;const s=this.toolCreate();this.initElPosition(),e.appendChild(s)}destroyed(){const{el:t}=this.options;this.maskRemove(),this.toolRemove(),this._elPosition?t.style.setProperty("position",this._elPosition):t.style.removeProperty("position")}initElPosition(){const t=this.options.el;if(!t)return;this._elPosition=t.style.position;const e=window.getComputedStyle(t,null).position;e&&"static"!==e||t.style.setProperty("position","relative")}maskCreate(t){if(this.mask)return this.mask;const e=document.createElement("div");return e.style="position:fixed;top:0;bottom:0;left:0;right:0;z-index:99999;cursor:"+(/^V/.test(t)?"col":"row")+"-resize",e.addEventListener("mousemove",this.maskMove),e.addEventListener("mouseup",this.maskUp),this.mask=e,e}maskRemove(){const t=this.mask;t&&(t.parentNode&&t.parentNode.removeChild(t),t.removeEventListener("mousemove",this.maskMove),t.removeEventListener("mouseup",this.maskUp),this.mask=null)}maskInsert(){const t=this.mask||this.maskCreate(this.options.mode);return document.body.appendChild(t),t}toolCreate(){if(this.tool)return this.tool;const t=document.createElement("div");return t.addEventListener("mousedown",this.toolDown),this.tool=t,this.toolInitStyle(),t}toolRemove(){const t=this.tool;t&&(t.parentNode&&t.parentNode.removeChild(t),this.tool=null)}toolInitStyle(){let t="user-select:none;cursor:col-resize;position:absolute;";const e=this.options.mode;/^V/.test(e)?t+="width: 8px;cursor:col-resize;":t+="height: 8px;cursor:row-resize;";const s={VR:"left",VL:"right",HT:"bottom",HB:"top"},o=s[e];t+=Object.keys(s).reduce(((t,e)=>{const i=s[e];return i!==o&&(t+=`${i}:0;`),t}),""),this.tool&&(this.tool.style=t)}}const e={mounted(e,{value:s}){e._flexibleResize||(e._flexibleResize=new t({el:e,mode:s.mode||"VR",onMove:s.onMove,onEnd:s.onEnd}))},beforeUnmount(t){t._flexibleResize&&(t._flexibleResize.destroyed(),t._flexibleResize=void 0)}};export{e as vFlexibleResize};
1
+ class t{constructor(t){this.maskMove=t=>{const e=this._isV?t.screenX:t.screenY,s=e-this._mv;this._mv=e;const{onMove:o}=this.options;o&&o({evt:t,distance:s})},this.maskUp=t=>{const{onEnd:e}=this.options,s=this._isV?t.screenX:t.screenY;e&&e({evt:t,distance:s-this._ms}),this.maskRemove()},this.toolDown=t=>{this.maskInsert(),this._isV=/^V/.test(this.options.mode),this._ms=this._mv=this._isV?t.screenX:t.screenY;const{onStart:e}=this.options;e&&e({evt:t,distance:0})},this.options=t||{},this.tool=null,this.mask=null,this._elPosition=null,this._isV=!1,this._ms=0,this._mv=0,this.init(t)}init(t){const{el:e}=t;if(!e)return;const s=this.toolCreate();this.initElPosition(),e.appendChild(s)}destroyed(){const{el:t}=this.options;this.maskRemove(),this.toolRemove(),this._elPosition?t.style.setProperty("position",this._elPosition):t.style.removeProperty("position")}initElPosition(){const t=this.options.el;if(!t)return;this._elPosition=t.style.position;const e=window.getComputedStyle(t,null).position;e&&"static"!==e||t.style.setProperty("position","relative")}maskCreate(t){if(this.mask)return this.mask;const e=document.createElement("div");return e.style="position:fixed;top:0;bottom:0;left:0;right:0;z-index:99999;cursor:"+(/^V/.test(t)?"col":"row")+"-resize",e.addEventListener("mousemove",this.maskMove),e.addEventListener("mouseup",this.maskUp),this.mask=e,e}maskRemove(){const t=this.mask;t&&(t.parentNode&&t.parentNode.removeChild(t),t.removeEventListener("mousemove",this.maskMove),t.removeEventListener("mouseup",this.maskUp),this.mask=null)}maskInsert(){const t=this.mask||this.maskCreate(this.options.mode);return document.body.appendChild(t),t}toolCreate(){if(this.tool)return this.tool;const t=document.createElement("div");return t.addEventListener("mousedown",this.toolDown),this.tool=t,this.toolInitStyle(),t}toolRemove(){const t=this.tool;t&&(t.parentNode&&t.parentNode.removeChild(t),this.tool=null)}toolInitStyle(){let t="user-select:none;cursor:col-resize;position:absolute;";const e=this.options.mode,s=this.options.style;/^V/.test(e)?t+="width: 8px;cursor:col-resize;":t+="height: 8px;cursor:row-resize;";const o={VR:"left",VL:"right",HT:"bottom",HB:"top"},i=o[e];if(t+=Object.keys(o).reduce(((t,e)=>{const s=o[e];return s!==i&&(t+=`${s}:0;`),t}),""),s){t+=Object.keys(s).reduce(((t,e)=>t+=`${e}:${s[e]};`),"")}this.tool&&(this.tool.style=t)}}const e={mounted(e,{value:s}){e._flexibleResize||(e._flexibleResize=new t({el:e,mode:s.mode||"VR",onMove:s.onMove,onEnd:s.onEnd,style:s.style}))},beforeUnmount(t){t._flexibleResize&&(t._flexibleResize.destroyed(),t._flexibleResize=void 0)}};export{e as vFlexibleResize};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.3-beta.22",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.3-beta.22",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.2.3-beta.24",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.3-beta.24",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
@@ -5,6 +5,7 @@ export declare type IFlexibleType = {
5
5
  onMove: (result: any) => void;
6
6
  onEnd: (result: any) => void;
7
7
  onStart?: (result: any) => void;
8
+ style?: AnyObject;
8
9
  };
9
10
  export declare namespace LowCodeTypes {
10
11
  type VALUE_RELATION = 'EQ' | 'NEQ' | 'CL' | 'NC' | 'NULL' | 'NOT_NULL' | 'BIG' | 'BIGEQ' | 'LESS' | 'LESSEQ';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.2.3-beta.22",
3
+ "version": "3.2.3-beta.24",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -71,5 +71,5 @@
71
71
  "iOS 7",
72
72
  "last 3 iOS versions"
73
73
  ],
74
- "gitHead": "e6767c2d0b35d4f6433709c17f61417d5c8f54d3"
74
+ "gitHead": "eb35722607b65d248e4aaab157a7fce845b8825b"
75
75
  }