cnhis-design-vue 3.1.49-beta.10 → 3.1.49-beta.12

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
- import{nextTick as e}from"vue";import"../../index.js";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function i(){const i="filterVisibleEventPlugin";return t({name:i,apply(t){t.eventHooks.onFilterVisible.tap(i,(({$table:t,visible:i})=>{i&&e((()=>{const e=document.querySelector(".vxe-table--filter-wrapper"),i=null==e?void 0:e.getBoundingClientRect(),n=Math.min(document.documentElement.clientHeight,window.innerHeight),o=parseFloat(t.reactData.filterStore.style.top);n-i.top-o<=i.height&&(e.style.height=`${i.height}px`,e.style.transform=`translateY(${-(i.height+o)}px)`)}))}))}})}export{i as filterVisibleEventPlugin};
1
+ import{nextTick as e}from"vue";import"../../index.js";import{defineTablePlugin as t}from"../hooks/useTablePlugin.js";function i(){const i="filterVisibleEventPlugin";return t({name:i,apply(t){t.eventHooks.onFilterVisible.tap(i,(({$table:t,visible:i})=>{i&&e((()=>{const e=t.getRefMaps().refTableFilter.value.$el,i=null==e?void 0:e.getBoundingClientRect(),n=Math.min(document.documentElement.clientHeight,window.innerHeight),l=parseFloat(t.reactData.filterStore.style.top);n-i.top-l<=i.height&&(e.style.transform=`translateY(${-(i.height+l)}px)`)}))}))}})}export{i as filterVisibleEventPlugin};
@@ -1 +1 @@
1
- import{computed as e,unref as t}from"vue";import{useEventListener as n}from"@vueuse/core";import{isValid as l}from"date-fns";function i(e,t=""){e.value=t,e.dispatchEvent(new InputEvent("input"))}function o(e,t,n,l){const o=e.value;if(!o)return;const u=e.selectionEnd||0,s=o.length;let r=0,c=0,a=0,d="",f=0;for(;r<s;){const e=o[r++];if(/\d/.test(e)&&(d+=e),r===u){a=d.length;const e=o.slice(r).match(/^\d+/);f=e?e[0].length:0}}const v=Array.isArray(t)?function(e){var t,n;let l=!1,i=e.parentNode||null;for(;i;){if(null==(n=null==(t=i.classList)?void 0:t.contains)?void 0:n.call(t,"n-time-picker")){l=!0;break}i=i.parentNode||null}return l}(e)?t[1]:t[0]:t;let g="",m=0,h=0;for(r=0;r<v.length&&(l||!(c>=d.length));){const e=v[r++];if(/[yMdHms]/.test(e)?g+=d[c++]||"0":g+=e,n&&c===a){a=-1,m=g.length,h=m;let e=v.slice(r).match(/^[yMdHms]+/);e?(f=Math.min(f,e[0].length),f&&(g+=d.slice(c,c+f),c+=f),r+=e[0].length):(e=v.slice(r).match(/^([^yMdHms]+)([yMdHms]*)/),e&&(m+=e[1].length,h=m+e[2].length))}}const p=g!==o;return p&&i(e,g),n&&(m=m||g.length+1,h=h||g.length+1,e.setSelectionRange(m,h)),p}function u(u,s,r,c){const a=e((()=>{var e;return null==(e=u.value)?void 0:e.$el})),d=e((()=>{const e={};return["date","time","hour","minute","second"].forEach((t=>function(e,t){const n=`is-${t}-disabled`;r[n]&&(e[n.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))]=r[n])}(e,t))),e}));function f(e){o(e,t(s),!1,!0);const n=null==e?void 0:e.value,u=Reflect.get(r,"type")||"";n&&!u.includes("range")&&l(new Date(n))&&!function(e){const{isTimeDisabled:t,isDateDisabled:n,isHourDisabled:l,isMinuteDisabled:i,isSecondDisabled:o}=d.value;if(null==n?void 0:n(e.getTime()))return;const u=(null==t?void 0:t(e.getTime()).isHourDisabled)||l,s=(null==t?void 0:t(e.getTime()).isMinuteDisabled)||i,r=(null==t?void 0:t(e.getTime()).isSecondDisabled)||o;if(null==u?void 0:u(e.getHours()))return;if(null==s?void 0:s(e.getMinutes()))return;if(null==r?void 0:r(e.getSeconds()))return;return!0}(new Date(n))&&i(e)}return n(a,"input",(function(e){const n=e.target;if(!n.value||!Reflect.get(n,"_f_"))return;Reflect.set(n,"_f_",0),o(n,t(s),!0)&&(e.preventDefault(),e.stopPropagation())}),!0),n(a,"keydown",(function(e){const{key:t}=e,n=e.target;if(/\d/.test(t)&&n)Reflect.set(n,"_f_",1);else if("Enter"===t)f(n);else if("Backspace"===t&&!c){const e=null==n?void 0:n.value;1===(null==e?void 0:e.length)&&(i(n),n.blur(),n.focus())}}),!0),n(a,"mouseup",(function(e){const t=e.target;["INPUT"].includes(t.tagName)&&0===e.button&&function(e){const{selectionStart:t=0,selectionEnd:n=0,value:l}=e;if(t!==n)return;const i=/(\d+)/g;let o,u,s;for(;null!==(o=i.exec(l));)if(t&&o.index<=t&&t<=i.lastIndex){u=o.index,s=i.lastIndex;break}void 0!==u&&void 0!==s&&e.setSelectionRange(u,s)}(t)}),!0),{handleConfirm:f,focus:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.focus)?void 0:t.call(e)},blur:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.blur)?void 0:t.call(e)}}}export{u as useDateTime};
1
+ import{computed as e,unref as t}from"vue";import{useEventListener as n}from"@vueuse/core";import{isValid as l}from"date-fns";function i(e,t=""){e.value=t,e.dispatchEvent(new InputEvent("input"))}function o(e,t,n,l){const o=e.value;if(!o)return;const u=e.selectionEnd||0,s=o.length;let r=0,a=0,c=0,d="",f=0;for(;r<s;){const e=o[r++];if(/\d/.test(e)&&(d+=e),r===u){c=d.length;const e=o.slice(r).match(/^\d+/);f=e?e[0].length:0}}const v=Array.isArray(t)?function(e){var t,n;let l=!1,i=e.parentNode||null;for(;i;){if(null==(n=null==(t=i.classList)?void 0:t.contains)?void 0:n.call(t,"n-time-picker")){l=!0;break}i=i.parentNode||null}return l}(e)?t[1]:t[0]:t;let g="",m=0,p=0;for(r=0;r<v.length&&(l||!(a>=d.length));){const e=v[r++];if(/[yMdHms]/.test(e)?g+=d[a++]||"0":g+=e,n&&a===c){c=-1,m=g.length,p=m;let e=v.slice(r).match(/^[yMdHms]+/);e?(f=Math.min(f,e[0].length),f&&(g+=d.slice(a,a+f),a+=f),r+=e[0].length):(e=v.slice(r).match(/^([^yMdHms]+)([yMdHms]*)/),e&&(m+=e[1].length,p=m+e[2].length))}}const h=g!==o;return h&&i(e,g),n&&(m=m||g.length+1,p=p||g.length+1,e.setSelectionRange(m,p)),h}function u(u,s,r,a){const c=e((()=>{var e;return null==(e=u.value)?void 0:e.$el})),d=e((()=>{const e={};return["date","time","hour","minute","second"].forEach((t=>function(e,t){const n=`is-${t}-disabled`;r[n]&&(e[n.replace(/-(\w)/g,((e,t)=>t.toUpperCase()))]=r[n])}(e,t))),e}));function f(e){o(e,t(s),!1,!0);const n=null==e?void 0:e.value,u=Reflect.get(r,"type")||"";n&&!u.includes("range")&&l(new Date(n))&&!function(e){const{isTimeDisabled:t,isDateDisabled:n,isHourDisabled:l,isMinuteDisabled:i,isSecondDisabled:o}=d.value;if(null==n?void 0:n(e.getTime()))return;const u=(null==t?void 0:t(e.getTime()).isHourDisabled)||l,s=(null==t?void 0:t(e.getTime()).isMinuteDisabled)||i,r=(null==t?void 0:t(e.getTime()).isSecondDisabled)||o;if(null==u?void 0:u(e.getHours()))return;if(null==s?void 0:s(e.getMinutes()))return;if(null==r?void 0:r(e.getSeconds()))return;return!0}(new Date(n))&&i(e)}return n(c,"input",(function(e){const n=e.target;if(!n.value||!Reflect.get(n,"_f_"))return;Reflect.set(n,"_f_",0),o(n,t(s),!0)&&(e.preventDefault(),e.stopPropagation())}),!0),n(c,"keydown",(function(e){const{key:t}=e,n=e.target;if(/\d/.test(t)&&n)Reflect.set(n,"_f_",1);else if("Enter"===t)f(n);else if("Backspace"===t&&!a){const e=null==n?void 0:n.value;1===(null==e?void 0:e.length)&&(i(n),n.blur(),n.focus())}}),!0),n(c,"mouseup",(function(e){const t=e.target;["INPUT"].includes(t.tagName)&&0===e.button&&function(e){const{selectionStart:t=0,selectionEnd:n=0,value:l}=e;if(t!==n)return;const i=/(\d+)/g;let o,u,s;for(;null!==(o=i.exec(l));)if(t&&o.index<=t&&t<=i.lastIndex){u=o.index,s=i.lastIndex;break}void 0!==u&&void 0!==s&&e.setSelectionRange(u,s)}(t)}),!0),n(c,"paste",(function(e){var t,n;const l=(null==(t=e.clipboardData)?void 0:t.getData("text"))||"",o=null==(n=l.match(/\d+/g))?void 0:n.join(",");if(!o)return;e.preventDefault(),e.stopPropagation();const u=e.target;i(u,o),f(u)}),!0),{handleConfirm:f,focus:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.focus)?void 0:t.call(e)},blur:()=>{var e,t;return null==(t=null==(e=u.value)?void 0:e.blur)?void 0:t.call(e)}}}export{u as useDateTime};
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.1.49-beta.10",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.1.49-beta.10",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.1.49-beta.12",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.1.49-beta.12",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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.49-beta.10",
3
+ "version": "3.1.49-beta.12",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -63,5 +63,5 @@
63
63
  "iOS 7",
64
64
  "last 3 iOS versions"
65
65
  ],
66
- "gitHead": "67ac02c51f8dec3e499068fa087940cd9f567f71"
66
+ "gitHead": "64346cbe165f8e8bd385338d6156f9ada3cc439f"
67
67
  }