@zealicsolutions/web-ui 1.0.44-beta-3 → 1.0.44-beta-4
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/molecules/Calendar/CalendarMolecule.d.ts +3 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.d.ts +3 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
@@ -2,7 +2,8 @@ import React from 'react';
|
|
2
2
|
import { EventInput, ThemeSystem } from '@fullcalendar/react';
|
3
3
|
import { ConfigurationItemInfo } from 'containers';
|
4
4
|
export interface CalendarMoleculeProps {
|
5
|
-
events
|
5
|
+
/** initial events (will be copied into internal state) */
|
6
|
+
events?: EventInput[];
|
6
7
|
resources?: any[];
|
7
8
|
initialView?: string;
|
8
9
|
enableDayGrid?: boolean;
|
@@ -27,6 +28,7 @@ export interface CalendarMoleculeProps {
|
|
27
28
|
paddingBottom?: string;
|
28
29
|
primaryColor?: string;
|
29
30
|
secondaryColor?: string;
|
31
|
+
/** callback whenever a drop creates a new event */
|
30
32
|
onEventAdd?: (e: EventInput) => void;
|
31
33
|
configurationItemInfo?: ConfigurationItemInfo;
|
32
34
|
}
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
2
2
|
import { EventInput, ThemeSystem } from '@fullcalendar/react';
|
3
3
|
import { ConfigurationItemInfo } from 'containers';
|
4
4
|
export interface CalendarMoleculeProps {
|
5
|
-
events
|
5
|
+
/** initial events (will be copied into internal state) */
|
6
|
+
events?: EventInput[];
|
6
7
|
resources?: any[];
|
7
8
|
initialView?: string;
|
8
9
|
enableDayGrid?: boolean;
|
@@ -27,6 +28,7 @@ export interface CalendarMoleculeProps {
|
|
27
28
|
paddingBottom?: string;
|
28
29
|
primaryColor?: string;
|
29
30
|
secondaryColor?: string;
|
31
|
+
/** callback whenever a drop creates a new event */
|
30
32
|
onEventAdd?: (e: EventInput) => void;
|
31
33
|
configurationItemInfo?: ConfigurationItemInfo;
|
32
34
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__assign as e}from"../../node_modules/tslib/tslib.es6.js";import{jsx as
|
1
|
+
import{__assign as e,__spreadArray as i}from"../../node_modules/tslib/tslib.es6.js";import{jsx as t}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useRef as o,useState as r,useEffect as n}from"react";import d from"../../node_modules/@fullcalendar/react/dist/index.js";import a,{Draggable as l}from"../../node_modules/@fullcalendar/interaction/index.js";import m from"../../node_modules/@fullcalendar/daygrid/index.js";import s from"../../node_modules/@fullcalendar/timegrid/index.js";import u from"../../node_modules/@fullcalendar/list/index.js";import c from"../../node_modules/@fullcalendar/timeline/index.js";import f from"../../node_modules/@fullcalendar/resource/index.js";import v from"../../node_modules/@fullcalendar/resource-timegrid/index.js";import g from"../../node_modules/@fullcalendar/resource-timeline/index.js";import p from"../../node_modules/@mui/material/Box/Box.js";var h=function(h){var b=h.events,y=void 0===b?[]:b,x=h.resources,j=h.initialView,D=void 0===j?"dayGridMonth":j,T=h.enableDayGrid,_=void 0===T||T,G=h.enableTimeGrid,k=void 0===G||G,S=h.enableList,B=void 0!==S&&S,C=h.enableTimeline,M=void 0!==C&&C,L=h.enableResourceTimeline,R=void 0!==L&&L,W=h.slotDuration,w=void 0===W?"00:15:00":W,A=h.snapDuration,I=void 0===A?"00:05:00":A,N=h.businessHours,O=h.width,E=h.height,H=void 0===E?"auto":E,V=h.backgroundColor,Y=h.themeSystem,J=void 0===Y?"standard":Y,K=h.marginLeft,P=void 0===K?"0":K,q=h.marginTop,z=void 0===q?"0":q,F=h.marginRight,Q=void 0===F?"0":F,U=h.marginBottom,X=void 0===U?"0":U,Z=h.paddingLeft,$=void 0===Z?"0":Z,ee=h.paddingTop,ie=void 0===ee?"0":ee,te=h.paddingRight,oe=void 0===te?"0":te,re=h.paddingBottom,ne=void 0===re?"0":re,de=h.primaryColor,ae=h.secondaryColor,le=h.onEventAdd,me=h.configurationItemInfo,se=o(null),ue=r(y),ce=ue[0],fe=ue[1];n((function(){var e=document.getElementById("external-events");e&&new l(e,{itemSelector:".fc-event-external",eventData:function(e){var i=JSON.parse(e.getAttribute("data-event")),t=Math.floor(i.duration/60),o=i.duration%60;return{id:i.id,title:i.title,duration:"".concat(t,":").concat(o.toString().padStart(2,"0"))}}})}),[]);var ve=[a,m,s,u,c,f,v,g],ge={dayGridMonth:_,dayGridWeek:_,dayGridDay:_,timeGridWeek:k,timeGridDay:k,listYear:B,listMonth:B,listWeek:B,listDay:B,timelineYear:M,timelineMonth:M,timelineWeek:M,timelineDay:M,resourceTimeGridWeek:R,resourceTimeGridDay:R,resourceTimelineMonth:R,resourceTimelineWeek:R,resourceTimelineDay:R},pe=Object.entries(ge).filter((function(e){return e[0],e[1]})).map((function(e){return e[0]})).join(","),he=ge[D]?D:pe.split(",")[0]||"dayGridMonth";return t(p,e({sx:{width:O,height:H,backgroundColor:V,marginLeft:P,marginTop:z,marginRight:Q,marginBottom:X,paddingLeft:$,paddingTop:ie,paddingRight:oe,paddingBottom:ne,"--fc-button-bg":de,"--fc-event-bg":ae}},me,{children:t(d,{ref:se,themeSystem:J,schedulerLicenseKey:"CC-Attribution-NonCommercial-NoDerivatives",plugins:ve,initialView:he,headerToolbar:{left:"prev,next today",center:"title",right:pe},editable:!0,droppable:!0,businessHours:N,slotDuration:w,snapDuration:I,events:ce,resources:x,eventReceive:function(e){var t=e.event.toPlainObject(),o={id:t.id,title:t.title,start:t.startStr,end:t.endStr};fe((function(e){return i(i([],e,!0),[o],!1)})),null==le||le(o),e.event.remove()}})}))};export{h as CalendarMolecule};
|
2
2
|
//# sourceMappingURL=CalendarMolecule.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CalendarMolecule.js","sources":["../../../../../src/molecules/Calendar/CalendarMolecule.tsx"],"sourcesContent":[null],"names":["CalendarMolecule","_a","events","resources","
|
1
|
+
{"version":3,"file":"CalendarMolecule.js","sources":["../../../../../src/molecules/Calendar/CalendarMolecule.tsx"],"sourcesContent":[null],"names":["CalendarMolecule","_a","_b","events","initialEvents","resources","_c","initialView","_d","enableDayGrid","_e","enableTimeGrid","_f","enableList","_g","enableTimeline","_h","enableResourceTimeline","_j","slotDuration","_k","snapDuration","businessHours","width","_l","height","backgroundColor","_m","themeSystem","_o","marginLeft","_p","marginTop","_q","marginRight","_r","marginBottom","_s","paddingLeft","_t","paddingTop","_u","paddingRight","_v","paddingBottom","primaryColor","secondaryColor","onEventAdd","configurationItemInfo","calendarRef","useRef","_w","useState","eventsState","setEventsState","useEffect","box","document","getElementById","Draggable","itemSelector","eventData","el","raw","JSON","parse","getAttribute","hrs","Math","floor","duration","mins","id","title","concat","toString","padStart","ALL_PLUGINS","interactionPlugin","dayGridPlugin","timeGridPlugin","listPlugin","timelinePlugin","resourcePlugin","resourceTimeGridPlugin","resourceTimelinePlugin","viewMap","dayGridMonth","dayGridWeek","dayGridDay","timeGridWeek","timeGridDay","listYear","listMonth","listWeek","listDay","timelineYear","timelineMonth","timelineWeek","timelineDay","resourceTimeGridWeek","resourceTimeGridDay","resourceTimelineMonth","resourceTimelineWeek","resourceTimelineDay","toolbarViews","Object","entries","filter","map","join","safeInitialView","split","_jsx","Box","__assign","sx","FullCalendar","ref","schedulerLicenseKey","plugins","headerToolbar","left","center","right","editable","droppable","eventReceive","info","e","event","toPlainObject","newEvt","start","startStr","end","endStr","prev","__spreadArray","remove"],"mappings":"y6BAuDO,IAAMA,EAAoD,SAACC,GAChE,IAAAC,EAAAD,EAAAE,OAAQC,OAAgB,IAAAF,EAAA,KACxBG,EAASJ,EAAAI,UACTC,gBAAAC,OAAc,IAAAD,EAAA,iBACdE,EAAAP,EAAAQ,cAAAA,cAAoBD,EACpBE,EAAAT,EAAAU,eAAAA,OAAc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E,MAAMC,gBACfC,EAAqB,CACzB5D,GAAIyD,EAAEzD,GACNC,MAAOwD,EAAExD,MACT4D,MAAOJ,EAAEK,SACTC,IAAKN,EAAEO,QAETlF,IAAe,SAACmF,GAAS,OAAAC,EAAAA,EAAA,GAAID,GAAI,GAAA,CAAEL,IAAM,EAAC,IAC1CrF,UAAAA,GAAaqF,GACbJ,EAAKE,MAAMS,cAKrB"}
|
package/dist/index.d.ts
CHANGED
@@ -1806,7 +1806,8 @@ interface AvatarMoleculeProps {
|
|
1806
1806
|
}
|
1807
1807
|
|
1808
1808
|
interface CalendarMoleculeProps {
|
1809
|
-
events
|
1809
|
+
/** initial events (will be copied into internal state) */
|
1810
|
+
events?: EventInput[];
|
1810
1811
|
resources?: any[];
|
1811
1812
|
initialView?: string;
|
1812
1813
|
enableDayGrid?: boolean;
|
@@ -1831,6 +1832,7 @@ interface CalendarMoleculeProps {
|
|
1831
1832
|
paddingBottom?: string;
|
1832
1833
|
primaryColor?: string;
|
1833
1834
|
secondaryColor?: string;
|
1835
|
+
/** callback whenever a drop creates a new event */
|
1834
1836
|
onEventAdd?: (e: EventInput) => void;
|
1835
1837
|
configurationItemInfo?: ConfigurationItemInfo$1;
|
1836
1838
|
}
|