cnhis-design-vue 3.1.57-beta.20 → 3.1.57-beta.21
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{defineComponent as e,ref as t,reactive as n,createVNode as a,createTextVNode as o,watch as r,openBlock as s,createElementBlock as i,normalizeStyle as l,unref as d,createElementVNode as c,Fragment as u,renderList as m,normalizeClass as
|
|
1
|
+
import{defineComponent as e,ref as t,reactive as n,createVNode as a,createTextVNode as o,watch as r,openBlock as s,createElementBlock as i,normalizeStyle as l,unref as d,createElementVNode as c,Fragment as u,renderList as m,normalizeClass as p,toDisplayString as v,createCommentVNode as y,createBlock as f,nextTick as h}from"vue";import{NIcon as C}from"naive-ui";import{ChevronBackOutline as g,ChevronForwardOutline as M}from"@vicons/ionicons5";import D from"@fullcalendar/vue3";import k from"@fullcalendar/resource-timegrid";import w from"@fullcalendar/scrollgrid";import b from"@fullcalendar/interaction";import{useTheme as H}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import{format as R,isSameDay as x,toDate as L,startOfMonth as j,endOfMonth as N,eachDayOfInterval as z,getDay as O,isSameMonth as S,startOfDay as T,endOfDay as F}from"date-fns";import{isFunction as I,cloneDeep as _}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";const A={key:0,class:"select-day-wrapper"},E={class:"day-wrapper"},G=["onClick"];var P=e({__name:"Calendar",props:{date:{type:Date,default:new Date},showDateNavigation:{type:Boolean,default:!0},events:{type:Array,default:()=>[]},resources:{type:Array,default:()=>[]},eventContentRender:{type:Function},resourceLabelContentRender:{type:Function},options:{type:Object,default:()=>({})}},emits:["select","eventDrag","eventClick","eventResize","dateChange"],setup(e,{emit:P}){const B=e,K=["周一","周二","周三","周四","周五","周六","周日"],V=H(),W=t(),q=t(new Date),J=t([]),Q=t(!1),U=n({schedulerLicenseKey:"GPL-My-Project-Is-Open-Source",plugins:[k,w,b],initialView:"resourceTimeGridDay",initialDate:R(q.value,"yyyy-MM-dd"),headerToolbar:{left:"",center:"",right:""},allDaySlot:!1,slotLabelInterval:{minute:30},slotLabelFormat:{hour:"2-digit",minute:"2-digit",meridiem:!1,hour12:!1},slotLabelContent:e=>R(e.date,"HH:mm"),nowIndicator:!0,dayMaxEvents:!0,eventOverlap:!1,slotMinTime:{hour:0},slotMaxTime:{hour:24},dayMinWidth:100,expandRows:!0,droppable:!0,editable:!0,selectable:!0,refetchResourcesOnNavigate:!0,resources:[],events:[],dayCellClassNames:["custom-day-cell"],eventClassNames:["custom-event"],eventContent:function(e){const{start:t,end:n,title:r}=e.event;return I(B.eventContentRender)?B.eventContentRender(e):[a("p",{class:"text"},[R(t,"HH:mm"),o("-"),R(n,"HH:mm")]),a("p",{class:"text"},[r])]},resourceLabelContent:function(e){const{title:t}=e.resource;return I(B.resourceLabelContentRender)?B.resourceLabelContentRender(e):a("span",null,[t])},select:(...e)=>P("select",...e),eventDrop:(...e)=>P("eventDrag",...e),eventResize:(...e)=>P("eventResize",...e),eventClick:(...e)=>P("eventClick",...e)});function X(e){const t=L(q.value);"prev"===e?t.setMonth(t.getMonth()-1):t.setMonth(t.getMonth()+1),Y(t),P("dateChange",Z())}function Y(e){const t=j(e),n=N(e),a=z({start:t,end:n});J.value=a.map((e=>({date:e,formatDate:R(e,"yyyy-MM-dd HH:mm:ss"),day:e.getDate(),week:K[O(e)]}))),q.value=S(e,new Date)?new Date:J.value[0].date}function Z(){const e=T(q.value),t=F(q.value);return{start:e,end:t,startStr:R(e,"yyyy-MM-dd HH:mm:ss"),endStr:R(t,"yyyy-MM-dd HH:mm:ss")}}return r((()=>q.value),(e=>{!async function(e){Q.value=!1,await h(),e(),Q.value=!0}((()=>{U.initialDate=R(e,"yyyy-MM-dd")}))})),r((()=>B.date),(e=>{Y(e)}),{immediate:!0}),r((()=>B.events),(e=>{U.events=_(e).map((e=>({...e,resourceEditable:!1})))}),{deep:!0,immediate:!0}),r((()=>B.resources),(e=>{U.resources=_(e)}),{deep:!0,immediate:!0}),r((()=>B.options),(()=>{Object.assign(U,B.options)}),{deep:!0,immediate:!0}),(t,n)=>(s(),i("div",{class:"c-calendar",style:l({...d(V),"--nav-height":e.showDateNavigation?"70px":"0px"})},[e.showDateNavigation?(s(),i("div",A,[a(d(C),{size:"20",component:d(g),onClick:n[0]||(n[0]=()=>X("prev"))},null,8,["component"]),c("div",E,[(s(!0),i(u,null,m(J.value,((e,t)=>(s(),i("div",{class:p(["day",{"day--active":d(x)(e.date,q.value)}]),key:t,onClick:()=>async function(e){q.value=e.date,P("dateChange",Z())}(e)},[c("p",null,v(e.day),1),c("span",null,v(e.week),1)],10,G)))),128))]),a(d(C),{size:"20",component:d(M),onClick:n[1]||(n[1]=()=>X("next"))},null,8,["component"])])):y("v-if",!0),Q.value?(s(),f(d(D),{key:1,ref_key:"calendarRef",ref:W,options:U},null,8,["options"])):y("v-if",!0)],4))}});export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function i(i,n,o,l){const{other:r,vitalSignsOriginY:s,xCellWidth:
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function i(i,n,o,l){const{other:r,vitalSignsOriginY:s,xCellWidth:h,yCellHeight:a,endX:u}=n;let c=0;function f(n,l,s){const u=[];String(n.value).split("").forEach(((i,o)=>{const l=new t.Text(i,{left:0,top:a*o,originX:"center",...e,objectCaching:!1,...n.style||{}});c=(a-(l.height||0))/2,u.push(l)}));const f=new t.Rect({left:0,top:0,width:h,height:a*u.length,fill:"transparent",originX:"center",...e}),{eventHighlight:g=!1}=r||{},p={originX:"center",left:l,top:s+c,baseTop:(n.baseTop||0)*a,trueLeft:l,trueHeight:u.length*a,objectCaching:!1,hoverCursor:"pointer",highlightObject:f,originData:n,selectable:!1,evented:g},v=new t.Group([f,...u],p);return function(t){const{highlightColor:e="#ffff00"}=r||{};t.on("mouseover",(()=>{t.highlightObject.set("fill",e),i.value.requestRenderAll()})),t.on("mouseout",(()=>{t.highlightObject.set("fill","transparent"),i.value.requestRenderAll()})),t.on("mousedown",(function(){o("eventClick",t.originData)}))}(v),i.value.add(v),v}!function(){if(!(null==r?void 0:r.list))return!1;const t=[],e=[];r.list.forEach(((t,i)=>{const n=0===i?"vertical":t.align||"vertical",o=l(t.time,!0);if(o>u)return;const r=e.find((t=>t.left==o));if(r)r[n].push(t);else{const i={left:o,vertical:[],horizontal:[]};i[n].push(t),e.push(i)}})),e.forEach((e=>{let i=s.originY,n=e.left;e.vertical.forEach(((o,l)=>{var r,u;const c=(o.baseTop||0)*a,g=(null==(r=t.at(-1))?void 0:r.left)||0;0===l&&e.left<=g&&(n=g+h);if(t.filter((t=>t.trueLeft===n)).length){const e=String(o.value).length*a,l=(null==(u=t.at(-1))?void 0:u.trueHeight)||0;i+=l,i+e+c>s.endY&&(i=s.originY,n+=h)}i+=c,String(o.value).length&&t.push(f(o,n,i))})),e.horizontal.forEach(((i,o)=>{var l;const r=s.originY+(i.baseTop||0)*a,u=(null==(l=t.at(-1))?void 0:l.left)||0;e.left<=u&&(n=u+h),String(i.value).length&&t.push(f(i,n,r))}))}))}()}export{i as useOther};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.57-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.57-beta.21",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.57-beta.21",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.57-beta.
|
|
3
|
+
"version": "3.1.57-beta.21",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"iOS 7",
|
|
71
71
|
"last 3 iOS versions"
|
|
72
72
|
],
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "e6b1a03650037da2c95e8f48ffab33d04f1cfc14"
|
|
74
74
|
}
|