@zealicsolutions/web-ui 1.0.45-beta.2 → 1.0.45-beta.3
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 +1 -1
- package/dist/cjs/molecules/Calendar/CalendarMolecule.stories.d.ts +3 -1
- package/dist/cjs/molecules/Visit/VisitMolecule.d.ts +0 -14
- package/dist/cjs/molecules/Visit/VisitMolecule.stories.d.ts +5 -0
- package/dist/esm/molecules/Calendar/CalendarMolecule.d.ts +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.js.map +1 -1
- package/dist/esm/molecules/Calendar/CalendarMolecule.stories.d.ts +3 -1
- package/dist/esm/molecules/Visit/VisitMolecule.d.ts +0 -14
- package/dist/esm/molecules/Visit/VisitMolecule.js +1 -1
- package/dist/esm/molecules/Visit/VisitMolecule.js.map +1 -1
- package/dist/esm/molecules/Visit/VisitMolecule.stories.d.ts +5 -0
- package/dist/index.d.ts +1 -15
- package/package.json +1 -1
@@ -44,8 +44,8 @@ export interface CalendarMoleculeProps {
|
|
44
44
|
resourceAreaBg?: string;
|
45
45
|
resourceTextColor?: string;
|
46
46
|
resourceBorderColor?: string;
|
47
|
-
resourceAreaWidth?: string | number;
|
48
47
|
bodyBg?: string;
|
48
|
+
resourceAreaWidth?: string | number;
|
49
49
|
onEventAdd?: (e: EventInput) => void;
|
50
50
|
configurationItemInfo?: ConfigurationItemInfo;
|
51
51
|
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
2
|
+
import { CalendarMolecule } from './CalendarMolecule';
|
1
3
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./CalendarMolecule").CalendarMoleculeProps>;
|
2
4
|
export default _default;
|
3
|
-
export declare const
|
5
|
+
export declare const DragAndDrop: StoryObj<typeof CalendarMolecule>;
|
@@ -1,23 +1,14 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ConfigurationItemInfo } from 'containers';
|
3
3
|
export interface VisitMoleculeProps {
|
4
|
-
/** Unique visit identifier (used as event.id) */
|
5
4
|
id: string;
|
6
|
-
/** Title shown on the card and used as event.title */
|
7
5
|
title: string;
|
8
|
-
/** Length of the visit, in minutes (used to compute event.end) */
|
9
6
|
duration: number;
|
10
|
-
/** Optional description rendered under the title */
|
11
7
|
description?: string;
|
12
|
-
/** If you want to associate this visit with a resource */
|
13
8
|
resourceId?: string;
|
14
|
-
/** Background color of the card */
|
15
9
|
backgroundColor?: string;
|
16
|
-
/** Text color for title/description */
|
17
10
|
textColor?: string;
|
18
|
-
/** Border color around the card */
|
19
11
|
borderColor?: string;
|
20
|
-
/** Border radius (e.g. '4px') */
|
21
12
|
borderRadius?: string;
|
22
13
|
marginLeft?: string;
|
23
14
|
marginTop?: string;
|
@@ -27,15 +18,10 @@ export interface VisitMoleculeProps {
|
|
27
18
|
paddingTop?: string;
|
28
19
|
paddingRight?: string;
|
29
20
|
paddingBottom?: string;
|
30
|
-
/** Font size for the title (e.g. '14px') */
|
31
21
|
fontSize?: string | number;
|
32
|
-
/** Font weight for the title (e.g. 400, 600) */
|
33
22
|
fontWeight?: string | number;
|
34
|
-
/** If false, disables dragging completely */
|
35
23
|
draggable?: boolean;
|
36
|
-
/** If false, dropping won’t actually create an event */
|
37
24
|
createOnDrop?: boolean;
|
38
|
-
/** Extra props your designer tool may pass */
|
39
25
|
configurationItemInfo?: ConfigurationItemInfo;
|
40
26
|
}
|
41
27
|
export declare const VisitMolecule: React.FC<VisitMoleculeProps>;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
2
|
+
import { VisitMolecule } from './VisitMolecule';
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./VisitMolecule").VisitMoleculeProps>;
|
4
|
+
export default _default;
|
5
|
+
export declare const Default: StoryObj<typeof VisitMolecule>;
|
@@ -44,8 +44,8 @@ export interface CalendarMoleculeProps {
|
|
44
44
|
resourceAreaBg?: string;
|
45
45
|
resourceTextColor?: string;
|
46
46
|
resourceBorderColor?: string;
|
47
|
-
resourceAreaWidth?: string | number;
|
48
47
|
bodyBg?: string;
|
48
|
+
resourceAreaWidth?: string | number;
|
49
49
|
onEventAdd?: (e: EventInput) => void;
|
50
50
|
configurationItemInfo?: ConfigurationItemInfo;
|
51
51
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__spreadArray as e,__assign as o}from"../../node_modules/tslib/tslib.es6.js";import{jsx as r}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useState as i,
|
1
|
+
import{__spreadArray as e,__assign as o}from"../../node_modules/tslib/tslib.es6.js";import{jsx as r}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useState as i,useRef as t,useCallback as n}from"react";import d from"../../node_modules/@fullcalendar/react/dist/index.js";import l from"../../node_modules/@fullcalendar/interaction/index.js";import a from"../../node_modules/@fullcalendar/daygrid/index.js";import c from"../../node_modules/@fullcalendar/timegrid/index.js";import s from"../../node_modules/@fullcalendar/list/index.js";import u from"../../node_modules/@fullcalendar/timeline/index.js";import m from"../../node_modules/@fullcalendar/resource/index.js";import f from"../../node_modules/@fullcalendar/resource-timegrid/index.js";import g from"../../node_modules/@fullcalendar/resource-timeline/index.js";import v from"../../node_modules/@mui/material/Box/Box.js";var b=function(b){var p=b.events,h=void 0===p?[]:p,C=b.resources,y=b.initialView,x=void 0===y?"dayGridMonth":y,j=b.enableDayGrid,B=void 0===j||j,T=b.enableTimeGrid,k=void 0===T||T,_=b.enableList,D=void 0!==_&&_,G=b.enableTimeline,W=void 0!==G&&G,L=b.enableResourceTimeline,R=void 0!==L&&L,w=b.slotDuration,H=void 0===w?"00:15:00":w,S=b.snapDuration,A=void 0===S?"00:05:00":S,I=b.businessHours,M=b.width,z=b.height,F=void 0===z?"auto":z,N=b.backgroundColor,O=b.themeSystem,V=void 0===O?"standard":O,E=b.marginLeft,K=void 0===E?"0":E,P=b.marginTop,q=void 0===P?"0":P,J=b.marginRight,Q=void 0===J?"0":J,U=b.marginBottom,X=void 0===U?"0":U,Y=b.paddingLeft,Z=void 0===Y?"0":Y,$=b.paddingTop,ee=void 0===$?"0":$,oe=b.paddingRight,re=void 0===oe?"0":oe,ie=b.paddingBottom,te=void 0===ie?"0":ie,ne=b.primaryColor,de=b.secondaryColor,le=b.toolbarBg,ae=b.toolbarTextColor,ce=b.buttonBg,se=b.buttonTextColor,ue=b.buttonHoverBg,me=b.dayHeaderColor,fe=b.dayHeaderFontWeight,ge=b.slotLabelColor,ve=b.slotLabelFontSize,be=b.eventBg,pe=b.eventBorderColor,he=b.eventTextColor,Ce=b.eventHoverBg,ye=b.nowIndicatorColor,xe=b.resourceAreaBg,je=b.resourceTextColor,Be=b.resourceBorderColor,Te=b.bodyBg,ke=b.resourceAreaWidth,_e=b.onEventAdd,De=b.configurationItemInfo,Ge=i(h),We=Ge[0],Le=Ge[1],Re=t(null),we=[l,a,c,s,u,m,f,g],He={dayGridMonth:B,dayGridWeek:B,dayGridDay:B,timeGridWeek:k,timeGridDay:k,listWeek:D,listDay:D,timelineWeek:W,timelineDay:W,resourceTimeGridWeek:R,resourceTimeGridDay:R},Se=Object.entries(He).filter((function(e){return e[1]})).map((function(e){return e[0]})),Ae=He[x]?x:Se[0]||"dayGridMonth",Ie=n((function(o){var r,i=o.event.toPlainObject(),t=i.id,n=i.title,d=i.startStr,l=i.endStr,a={id:"".concat(t,"-").concat(d),title:n,start:d,end:l,resourceId:null===(r=o.event.getResources()[0])||void 0===r?void 0:r.id};Le((function(o){return e(e([],o,!0),[a],!1)})),null==_e||_e(a),o.event.remove()}),[_e]);return r(v,o({sx:{width:M,height:F,backgroundColor:N,marginLeft:K,marginTop:q,marginRight:Q,marginBottom:X,paddingLeft:Z,paddingTop:ee,paddingRight:re,paddingBottom:te,"--fc-button-bg":ce||ne,"--fc-button-color":se,"--fc-button-hover-bg":ue||ne,"--fc-event-bg":be||de,"--fc-event-border-color":pe||de,"& .fc .fc-toolbar":{backgroundColor:le,color:ae},"& .fc .fc-col-header-cell-cushion":{color:me,fontWeight:fe},"& .fc .fc-timegrid-slot-label-cushion":{color:ge,fontSize:ve},"& .fc .fc-event":{color:he},"& .fc .fc-event:hover":{backgroundColor:Ce||de},"& .fc .fc-now-indicator":{backgroundColor:ye},"& .fc .fc-resource-area":{backgroundColor:xe},"& .fc .fc-resource .fc-resource-title":{color:je},"& .fc .fc-resource-area-cell":{borderColor:Be},"& .fc .fc-scrollgrid-section":{backgroundColor:Te}}},De,{children:r(d,{ref:Re,plugins:we,themeSystem:V,schedulerLicenseKey:"CC-Attribution-NonCommercial-NoDerivatives",initialView:Ae,headerToolbar:{left:"prev,next today",center:"title",right:Se.join(",")},editable:!0,droppable:!0,businessHours:I,slotDuration:H,snapDuration:A,events:We,resources:C,resourceAreaWidth:ke,eventReceive:Ie})}))};export{b 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","_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","toolbarBg","toolbarTextColor","buttonBg","buttonTextColor","buttonHoverBg","dayHeaderColor","dayHeaderFontWeight","slotLabelColor","slotLabelFontSize","eventBg","eventBorderColor","eventTextColor","eventHoverBg","nowIndicatorColor","resourceAreaBg","resourceTextColor","resourceBorderColor","
|
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","toolbarBg","toolbarTextColor","buttonBg","buttonTextColor","buttonHoverBg","dayHeaderColor","dayHeaderFontWeight","slotLabelColor","slotLabelFontSize","eventBg","eventBorderColor","eventTextColor","eventHoverBg","nowIndicatorColor","resourceAreaBg","resourceTextColor","resourceBorderColor","bodyBg","resourceAreaWidth","onEventAdd","configurationItemInfo","_w","useState","eventsState","setEventsState","calRef","useRef","plugins","interactionPlugin","dayGridPlugin","timeGridPlugin","listPlugin","timelinePlugin","resourcePlugin","resourceTimeGridPlugin","resourceTimelinePlugin","viewMap","dayGridMonth","dayGridWeek","dayGridDay","timeGridWeek","timeGridDay","listWeek","listDay","timelineWeek","timelineDay","resourceTimeGridWeek","resourceTimeGridDay","enabledViews","Object","entries","filter","map","safeInitial","onReceive","useCallback","info","event","toPlainObject","id","title","startStr","endStr","newEvt","concat","start","end","resourceId","getResources","prev","__spreadArray","remove","_jsx","Box","sx","color","fontWeight","fontSize","borderColor","FullCalendar","ref","schedulerLicenseKey","headerToolbar","left","center","right","join","editable","droppable","eventReceive"],"mappings":"25BAoEO,IAAMA,EAAoD,SAACC,GAChE,IAAAC,EAAAD,EAAAE,OAAQC,OAAa,IAAAF,EAAG,GAAEA,EAC1BG,EAASJ,EAAAI,UAETC,EAA4BL,EAAA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P,EAAKC,MAAMc,QACb,GACA,CAACpD,KAoCH,OACEqD,EAACC,KAAIC,GA/BI,CACTlG,MAAKA,EACLE,OAAMA,EACNC,gBAAeA,EACfI,WAAUA,EACVE,UAASA,EACTE,YAAWA,EACXE,aAAYA,EACZE,YAAWA,EACXE,WAAUA,GACVE,aAAYA,GACZE,cAAaA,GACb,iBAAkBK,IAAYJ,GAC9B,oBAAqBK,GACrB,uBAAwBC,IAAiBN,GACzC,gBAAiBW,IAAWV,GAC5B,0BAA2BW,IAAoBX,GAE/C,oBAAqB,CAAEpB,gBAAiBqB,GAAW2E,MAAO1E,IAC1D,oCAAqC,CAAE0E,MAAOtE,GAAgBuE,WAAYtE,IAC1E,wCAAyC,CAAEqE,MAAOpE,GAAgBsE,SAAUrE,IAC5E,kBAAmB,CAAEmE,MAAOhE,IAC5B,wBAAyB,CAAEhC,gBAAiBiC,IAAgBb,IAC5D,0BAA2B,CAAEpB,gBAAiBkC,IAC9C,0BAA2B,CAAElC,gBAAiBmC,IAC9C,wCAAyC,CAAE6D,MAAO5D,IAClD,+BAAgC,CAAE+D,YAAa9D,IAC/C,+BAAgC,CAAErC,gBAAiBsC,MAIlCG,aACfoD,EAACO,GACCC,IAAKvD,GACLE,QAASA,GACT9C,YAAaA,EACboG,oBAAoB,6CACpBzH,YAAa6F,GACb6B,cAAe,CAAEC,KAAM,kBAAmBC,OAAQ,QAASC,MAAOrC,GAAasC,KAAK,MACpFC,YACAC,WAAS,EACTjH,cAAeA,EACfH,aAAcA,EACdE,aAAcA,EACdlB,OAAQmE,GACRjE,UAAWA,EACX4D,kBAAmBA,GACnBuE,aAAcnC,OAItB"}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
2
|
+
import { CalendarMolecule } from './CalendarMolecule';
|
1
3
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./CalendarMolecule").CalendarMoleculeProps>;
|
2
4
|
export default _default;
|
3
|
-
export declare const
|
5
|
+
export declare const DragAndDrop: StoryObj<typeof CalendarMolecule>;
|
@@ -1,23 +1,14 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { ConfigurationItemInfo } from 'containers';
|
3
3
|
export interface VisitMoleculeProps {
|
4
|
-
/** Unique visit identifier (used as event.id) */
|
5
4
|
id: string;
|
6
|
-
/** Title shown on the card and used as event.title */
|
7
5
|
title: string;
|
8
|
-
/** Length of the visit, in minutes (used to compute event.end) */
|
9
6
|
duration: number;
|
10
|
-
/** Optional description rendered under the title */
|
11
7
|
description?: string;
|
12
|
-
/** If you want to associate this visit with a resource */
|
13
8
|
resourceId?: string;
|
14
|
-
/** Background color of the card */
|
15
9
|
backgroundColor?: string;
|
16
|
-
/** Text color for title/description */
|
17
10
|
textColor?: string;
|
18
|
-
/** Border color around the card */
|
19
11
|
borderColor?: string;
|
20
|
-
/** Border radius (e.g. '4px') */
|
21
12
|
borderRadius?: string;
|
22
13
|
marginLeft?: string;
|
23
14
|
marginTop?: string;
|
@@ -27,15 +18,10 @@ export interface VisitMoleculeProps {
|
|
27
18
|
paddingTop?: string;
|
28
19
|
paddingRight?: string;
|
29
20
|
paddingBottom?: string;
|
30
|
-
/** Font size for the title (e.g. '14px') */
|
31
21
|
fontSize?: string | number;
|
32
|
-
/** Font weight for the title (e.g. 400, 600) */
|
33
22
|
fontWeight?: string | number;
|
34
|
-
/** If false, disables dragging completely */
|
35
23
|
draggable?: boolean;
|
36
|
-
/** If false, dropping won’t actually create an event */
|
37
24
|
createOnDrop?: boolean;
|
38
|
-
/** Extra props your designer tool may pass */
|
39
25
|
configurationItemInfo?: ConfigurationItemInfo;
|
40
26
|
}
|
41
27
|
export declare const VisitMolecule: React.FC<VisitMoleculeProps>;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{__assign as o}from"../../node_modules/tslib/tslib.es6.js";import{jsxs as i,jsx as r}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useRef as t,useEffect as e}from"react";import{Draggable as d}from"../../node_modules/@fullcalendar/interaction/index.js";var n=function(n){var a=n.id,
|
1
|
+
import{__assign as o}from"../../node_modules/tslib/tslib.es6.js";import{jsxs as i,jsx as r}from"../../node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.esm.js";import{useRef as t,useEffect as e}from"react";import{Draggable as d}from"../../node_modules/@fullcalendar/interaction/index.js";var n=function(n){var a=n.id,c=n.title,g=n.duration,m=n.description,l=n.resourceId,p=n.backgroundColor,s=void 0===p?"#eee":p,u=n.textColor,v=void 0===u?"#000":u,f=n.borderColor,x=void 0===f?"#ccc":f,b=n.borderRadius,h=void 0===b?"4px":b,R=n.marginLeft,j=void 0===R?"0":R,S=n.marginTop,T=void 0===S?"0":S,y=n.marginRight,B=void 0===y?"0":y,C=n.marginBottom,I=void 0===C?"0":C,L=n.paddingLeft,_=void 0===L?"4px":L,k=n.paddingTop,w=void 0===k?"4px":k,z=n.paddingRight,D=void 0===z?"8px":z,N=n.paddingBottom,O=void 0===N?"4px":N,W=n.fontSize,J=void 0===W?"14px":W,M=n.fontWeight,q=void 0===M?400:M,A=n.draggable,E=void 0===A||A,F=n.createOnDrop,G=void 0===F||F,H=n.configurationItemInfo,K=void 0===H?{}:H,P=Math.floor(g/60),Q=g%60,U={id:a,title:c,duration:"".concat(P,":").concat(Q.toString().padStart(2,"0"))};l&&(U.resourceId=l),G||(U.create=!1);var V=t(null);return e((function(){if(V.current&&E){var o=new d(V.current);return function(){return o.destroy()}}}),[E]),i("div",o({ref:V,className:"fc-event-external",draggable:E,"data-event":JSON.stringify(U),style:{backgroundColor:s,color:v,border:"1px solid ".concat(x),borderRadius:h,marginLeft:j,marginTop:T,marginRight:B,marginBottom:I,paddingLeft:_,paddingTop:w,paddingRight:D,paddingBottom:O,fontSize:J,fontWeight:q,width:"fit-content",cursor:E?"grab":"default"}},K,{children:[i("div",{children:[c," — ",g," min"]}),m&&r("div",o({style:{marginTop:4}},{children:m}))]}))};export{n as VisitMolecule};
|
2
2
|
//# sourceMappingURL=VisitMolecule.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VisitMolecule.js","sources":["../../../../../src/molecules/Visit/VisitMolecule.tsx"],"sourcesContent":[null],"names":["VisitMolecule","_a","id","title","duration","description","resourceId","_b","backgroundColor","_c","textColor","_d","borderColor","_e","borderRadius","_f","
|
1
|
+
{"version":3,"file":"VisitMolecule.js","sources":["../../../../../src/molecules/Visit/VisitMolecule.tsx"],"sourcesContent":[null],"names":["VisitMolecule","_a","id","title","duration","description","resourceId","_b","backgroundColor","_c","textColor","_d","borderColor","_e","borderRadius","_f","marginLeft","_g","marginTop","_h","marginRight","_j","marginBottom","_k","paddingLeft","_l","paddingTop","_m","paddingRight","_o","paddingBottom","_p","fontSize","_q","fontWeight","_r","draggable","_s","createOnDrop","_t","configurationItemInfo","hrs","Math","floor","mins","eventData","concat","toString","padStart","create","ref","useRef","useEffect","current","dd","Draggable","destroy","_jsxs","className","JSON","stringify","style","color","border","width","cursor","children","_jsx","__assign"],"mappings":"qTAoCO,IAAMA,EAA8C,SAACC,GAC1D,IAAAC,EAAED,EAAAC,GACFC,EAAKF,EAAAE,MACLC,EAAQH,EAAAG,SACRC,EAAWJ,EAAAI,YACXC,EAAUL,EAAAK,WACVC,EAAwBN,EAAAO,gBAAxBA,OAAe,IAAAD,EAAG,OAAMA,EACxBE,EAAAR,EAAAS,UAAAA,OAAY,IAAAD,EAAA,OAAMA,EAClBE,gBAAAC,OAAc,IAAAD,EAAA,OAAMA,EACpBE,EAAoBZ,EAAAa,aAApBA,OAAY,IAAAD,EAAG,MAAKA,EACpBE,EAAAd,EAAAe,WAAAA,aAAa,IAAGD,EAChBE,EAAAhB,EAAAiB,UAAAA,OAAY,IAAAD,EAAA,IAAGA,EACfE,EAAiBlB,EAAAmB,YAAjBA,OAAW,IAAAD,EAAG,IAAGA,EACjBE,EAAkBpB,EAAAqB,aAAlBA,OAAY,IAAAD,EAAG,I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EACbE,SAAQA,EACRE,WAAUA,EACV8B,MAAO,cACPC,OAAQ7B,EAAY,OAAS,YAE3BI,aACJiB,EACG,MAAA,CAAAS,SAAA,CAAA/D,QAAUC,EAAQ,UAEpBC,GAAe8D,EAAA,MAAAC,EAAA,CAAKP,MAAO,CAAE3C,UAAW,cAAMb,QAGrD"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
2
|
+
import { VisitMolecule } from './VisitMolecule';
|
3
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./VisitMolecule").VisitMoleculeProps>;
|
4
|
+
export default _default;
|
5
|
+
export declare const Default: StoryObj<typeof VisitMolecule>;
|
package/dist/index.d.ts
CHANGED
@@ -1853,23 +1853,14 @@ interface AvatarMoleculeProps {
|
|
1853
1853
|
}
|
1854
1854
|
|
1855
1855
|
interface VisitMoleculeProps {
|
1856
|
-
/** Unique visit identifier (used as event.id) */
|
1857
1856
|
id: string;
|
1858
|
-
/** Title shown on the card and used as event.title */
|
1859
1857
|
title: string;
|
1860
|
-
/** Length of the visit, in minutes (used to compute event.end) */
|
1861
1858
|
duration: number;
|
1862
|
-
/** Optional description rendered under the title */
|
1863
1859
|
description?: string;
|
1864
|
-
/** If you want to associate this visit with a resource */
|
1865
1860
|
resourceId?: string;
|
1866
|
-
/** Background color of the card */
|
1867
1861
|
backgroundColor?: string;
|
1868
|
-
/** Text color for title/description */
|
1869
1862
|
textColor?: string;
|
1870
|
-
/** Border color around the card */
|
1871
1863
|
borderColor?: string;
|
1872
|
-
/** Border radius (e.g. '4px') */
|
1873
1864
|
borderRadius?: string;
|
1874
1865
|
marginLeft?: string;
|
1875
1866
|
marginTop?: string;
|
@@ -1879,15 +1870,10 @@ interface VisitMoleculeProps {
|
|
1879
1870
|
paddingTop?: string;
|
1880
1871
|
paddingRight?: string;
|
1881
1872
|
paddingBottom?: string;
|
1882
|
-
/** Font size for the title (e.g. '14px') */
|
1883
1873
|
fontSize?: string | number;
|
1884
|
-
/** Font weight for the title (e.g. 400, 600) */
|
1885
1874
|
fontWeight?: string | number;
|
1886
|
-
/** If false, disables dragging completely */
|
1887
1875
|
draggable?: boolean;
|
1888
|
-
/** If false, dropping won’t actually create an event */
|
1889
1876
|
createOnDrop?: boolean;
|
1890
|
-
/** Extra props your designer tool may pass */
|
1891
1877
|
configurationItemInfo?: ConfigurationItemInfo$1;
|
1892
1878
|
}
|
1893
1879
|
|
@@ -1934,8 +1920,8 @@ interface CalendarMoleculeProps {
|
|
1934
1920
|
resourceAreaBg?: string;
|
1935
1921
|
resourceTextColor?: string;
|
1936
1922
|
resourceBorderColor?: string;
|
1937
|
-
resourceAreaWidth?: string | number;
|
1938
1923
|
bodyBg?: string;
|
1924
|
+
resourceAreaWidth?: string | number;
|
1939
1925
|
onEventAdd?: (e: EventInput) => void;
|
1940
1926
|
configurationItemInfo?: ConfigurationItemInfo$1;
|
1941
1927
|
}
|