@schedule-x/vue
Advanced tools
Comparing version 1.43.2 to 1.43.3
@@ -1,1 +0,1 @@ | ||
(function(o,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(o=typeof globalThis<"u"?globalThis:o||self,e(o["schedule-x-vue"]={},o.Vue))})(this,function(o,e){"use strict";const m=(n,s)=>(t,c)=>{const d={Component:e.h(s,c),wrapperElement:t};n(d)},p=e.defineComponent({name:"ScheduleXCalendar",props:{calendarApp:{type:Object,required:!0},customComponents:{type:Object,default:()=>({})}},data(){return{elId:"sx"+Math.random().toString(36).substr(2,9),customComponentsMeta:[]}},mounted(){const n={...this.customComponents,...this.$slots};for(const[s,t]of Object.entries(n))this.calendarApp._setCustomComponentFn(s,m(this.setCustomComponentMeta,t));this.calendarApp.render(document.getElementById(this.elId))},methods:{setCustomComponentMeta(n){const s=({wrapperElement:i})=>i instanceof HTMLElement,t=[...this.customComponentsMeta.filter(s)],c=n.wrapperElement.dataset.ccid,d=t.find(({wrapperElement:i})=>i.dataset.ccid===c);d&&t.splice(t.indexOf(d),1),this.customComponentsMeta=[...t,n]}},render(){const n=this.customComponentsMeta.map(({Component:s,wrapperElement:t})=>e.h(e.Teleport,{to:t},s));return e.h("div",{id:this.elId,class:"sx-vue-calendar-wrapper"},e.h(e.Fragment,{},n))}});o.ScheduleXCalendar=p,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})}); | ||
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["schedule-x-vue"]={},n.Vue))})(this,function(n,e){"use strict";const p=(t,s)=>(o,r)=>{const a={Component:e.h(s,r),wrapperElement:o};t(a)},i=e.defineComponent({name:"ScheduleXCalendar",props:{calendarApp:{type:Object,required:!0},customComponents:{type:Object,default:()=>({})}},data(){return{elId:"sx"+Math.random().toString(36).substr(2,9),customComponentsMeta:[]}},mounted(){const t={...this.customComponents,...this.$slots};for(const[s,o]of Object.entries(t))this.calendarApp._setCustomComponentFn(s,p(this.setCustomComponentMeta,o));this.calendarApp.render(document.getElementById(this.elId))},methods:{setCustomComponentMeta(t){if(!(t.wrapperElement instanceof HTMLElement))return;const o=({wrapperElement:d})=>d instanceof HTMLElement,r=[...this.customComponentsMeta.filter(o)],a=t.wrapperElement.dataset.ccid,c=r.find(({wrapperElement:d})=>d.dataset.ccid===a);c&&r.splice(r.indexOf(c),1),this.customComponentsMeta=[...r,t]}},render(){const t=this.customComponentsMeta.map(({Component:s,wrapperElement:o})=>e.h(e.Teleport,{to:o},s));return e.h("div",{id:this.elId,class:"sx-vue-calendar-wrapper"},e.h(e.Fragment,{},t))}});n.ScheduleXCalendar=i,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}); |
{ | ||
"name": "@schedule-x/vue", | ||
"license": "MIT", | ||
"version": "1.43.2", | ||
"version": "1.43.3", | ||
"main": "./dist/schedule-x-vue.umd.js", | ||
@@ -6,0 +6,0 @@ "module": "./dist/schedule-x-vue.mjs", |
Sorry, the diff of this file is not supported yet
9289
110