@fayz-ai/plugin-agenda 0.9.0-next.0 → 0.9.0
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/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/google-calendar/connectorDef.d.ts.map +1 -1
- package/dist/views/CalendarView.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/integrations/google-calendar/connectorDef.tsx +8 -0
- package/src/views/CalendarView.tsx +28 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/google-calendar/connectorDef.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAyJxD,eAAO,MAAM,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"connectorDef.d.ts","sourceRoot":"","sources":["../../../src/integrations/google-calendar/connectorDef.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAyJxD,eAAO,MAAM,0BAA0B,EAAE,mBAsBxC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarView.d.ts","sourceRoot":"","sources":["../../src/views/CalendarView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAwRhF,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"CalendarView.d.ts","sourceRoot":"","sources":["../../src/views/CalendarView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAwRhF,wBAAgB,YAAY,sBA+zB3B"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"fayz": {
|
|
4
4
|
"status": "beta"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.9.0
|
|
6
|
+
"version": "0.9.0",
|
|
7
7
|
"description": "Fayz SDK — plugin-agenda plugin",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"sideEffects": [
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^18.0.0 || ^19.0.0",
|
|
33
33
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
34
|
-
"zustand": "^4.5.0",
|
|
34
|
+
"zustand": "^4.5.0 || ^5.0.0",
|
|
35
35
|
"lucide-react": ">=0.400.0 <1.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@tanstack/react-table": "^8.20.0",
|
|
45
45
|
"@fullcalendar/resource-timegrid": "^6.1.0",
|
|
46
46
|
"@fullcalendar/list": "^6.1.0",
|
|
47
|
-
"@fayz-ai/core": "^0.9.0
|
|
48
|
-
"@fayz-ai/
|
|
49
|
-
"@fayz-ai/
|
|
50
|
-
"@fayz-ai/plugin-financial": "^0.9.0
|
|
47
|
+
"@fayz-ai/core": "^0.9.0",
|
|
48
|
+
"@fayz-ai/ui": "^0.9.0",
|
|
49
|
+
"@fayz-ai/saas": "^0.9.0",
|
|
50
|
+
"@fayz-ai/plugin-financial": "^0.9.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/react": "^18.3.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tsup": "^8.2.0",
|
|
56
56
|
"typescript": "^5.5.0",
|
|
57
57
|
"@types/react-dom": "^18.3.0",
|
|
58
|
-
"vitest": "^
|
|
58
|
+
"vitest": "^4.1.5",
|
|
59
59
|
"react-dom": "^18.3.0",
|
|
60
60
|
"zustand": "^4.5.0",
|
|
61
61
|
"lucide-react": "^0.400.0"
|
|
@@ -167,6 +167,14 @@ export const googleCalendarConnectorDef: ConnectorDefinition = {
|
|
|
167
167
|
description: 'Two-way sync between your bookings and Google Calendar.',
|
|
168
168
|
icon: 'Calendar',
|
|
169
169
|
authKind: 'oauth',
|
|
170
|
+
category: 'scheduling',
|
|
171
|
+
direction: 'outbound',
|
|
172
|
+
// Sync only, and deliberately: the agenda has to exist inside the app — to be
|
|
173
|
+
// listed, filtered, reported on, and read when Google is unreachable. An
|
|
174
|
+
// agentic plane would answer questions but leave the calendar screen empty.
|
|
175
|
+
planes: ['sync'],
|
|
176
|
+
entities: ['booking'],
|
|
177
|
+
docsUrl: 'https://support.google.com/calendar',
|
|
170
178
|
async getStatus() {
|
|
171
179
|
const integ = await provider.getIntegration()
|
|
172
180
|
return { connected: !!integ?.connected }
|
|
@@ -633,6 +633,34 @@ export function CalendarView() {
|
|
|
633
633
|
// Alternating resource backgrounds — apply via DOM after render
|
|
634
634
|
const wrapperRef = useRef<HTMLDivElement>(null)
|
|
635
635
|
|
|
636
|
+
// FullCalendar measures its columns once and only re-measures on a WINDOW
|
|
637
|
+
// resize. Opening/closing the assistant rail (or the sidebar) resizes the
|
|
638
|
+
// container without one, so the grid stayed locked at the narrow width until
|
|
639
|
+
// a real window resize came along. Watch the container and hand FC the new box.
|
|
640
|
+
useEffect(() => {
|
|
641
|
+
const container = wrapperRef.current
|
|
642
|
+
if (!container) return
|
|
643
|
+
let frame = 0
|
|
644
|
+
let lastWidth = container.clientWidth
|
|
645
|
+
let lastHeight = container.clientHeight
|
|
646
|
+
const ro = new ResizeObserver(() => {
|
|
647
|
+
const width = container.clientWidth
|
|
648
|
+
const height = container.clientHeight
|
|
649
|
+
if (width === lastWidth && height === lastHeight) return
|
|
650
|
+
lastWidth = width
|
|
651
|
+
lastHeight = height
|
|
652
|
+
// Next frame, not inline: measuring inside the observer callback reads a
|
|
653
|
+
// mid-layout box (and trips the RO loop warning). The rail animates, so
|
|
654
|
+
// this fires on each frame and the last one settles on the final width.
|
|
655
|
+
cancelAnimationFrame(frame)
|
|
656
|
+
frame = requestAnimationFrame(() => calendarRef.current?.getApi()?.updateSize())
|
|
657
|
+
})
|
|
658
|
+
ro.observe(container)
|
|
659
|
+
return () => { cancelAnimationFrame(frame); ro.disconnect() }
|
|
660
|
+
// Re-attach whenever the calendar branch remounts (skeleton → grid, mobile
|
|
661
|
+
// list → grid), since the observed node is gone on the other branches.
|
|
662
|
+
}, [isMobile, mobileGridActive, professionalsLoading, professionals.length])
|
|
663
|
+
|
|
636
664
|
// Responsive day headers — collapse weekday names to a single initial (S M T
|
|
637
665
|
// W T F S, Google-Calendar style) when day columns get too narrow. Measured
|
|
638
666
|
// from the actual rendered column width so it adapts to resource count + view.
|