@object-ui/plugin-calendar 17.3.0 → 17.6.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/CHANGELOG.md +594 -0
- package/README.md +133 -48
- package/dist/CalendarView.d.ts +24 -4
- package/dist/CalendarView.d.ts.map +1 -1
- package/dist/ObjectCalendar.d.ts +18 -2
- package/dist/ObjectCalendar.d.ts.map +1 -1
- package/dist/index.d.ts +27 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +338 -248
- package/dist/index.umd.cjs +1 -1
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ import '@object-ui/plugin-calendar';
|
|
|
89
89
|
// Now you can use calendar types in your schemas
|
|
90
90
|
const schema = {
|
|
91
91
|
type: 'calendar-view',
|
|
92
|
-
|
|
92
|
+
data: [
|
|
93
93
|
{
|
|
94
94
|
id: '1',
|
|
95
95
|
title: 'Team Meeting',
|
|
@@ -100,49 +100,112 @@ const schema = {
|
|
|
100
100
|
};
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
###
|
|
103
|
+
### What the side-effect import registers
|
|
104
|
+
|
|
105
|
+
Registration is *only* a side effect of importing the package — the single
|
|
106
|
+
`import '@object-ui/plugin-calendar'` above is the whole of it. There is no
|
|
107
|
+
components map to iterate over: importing the entry point runs the
|
|
108
|
+
`ComponentRegistry.register(...)` calls in `src/index.tsx` and
|
|
109
|
+
`src/calendar-view-renderer.tsx`, which claim these schema types:
|
|
110
|
+
|
|
111
|
+
| Schema `type` | Namespaced key | Renderer |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| `object-calendar` | `plugin-calendar:object-calendar` | `ObjectCalendarRenderer` |
|
|
114
|
+
| `calendar` | `view:calendar` | `ObjectCalendarRenderer` |
|
|
115
|
+
| `calendar-view` | `plugin-calendar:calendar-view` | internal wrapper around `CalendarView` (not exported) |
|
|
116
|
+
|
|
117
|
+
Both spellings work — the namespaced key and the bare `type` fallback.
|
|
118
|
+
|
|
119
|
+
### Public exports
|
|
120
|
+
|
|
121
|
+
The package exports components and their types, not a registry map:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import {
|
|
125
|
+
ObjectCalendar, // ObjectQL-integrated calendar component
|
|
126
|
+
CalendarView, // standalone calendar component
|
|
127
|
+
ObjectCalendarRenderer, // the registered renderer for `object-calendar` / `calendar`
|
|
128
|
+
} from '@object-ui/plugin-calendar';
|
|
129
|
+
|
|
130
|
+
import type {
|
|
131
|
+
ObjectCalendarComponentProps,
|
|
132
|
+
CalendarViewProps,
|
|
133
|
+
CalendarViewEvent,
|
|
134
|
+
} from '@object-ui/plugin-calendar';
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
To serve the calendar under a registry key of your own, register the exported
|
|
138
|
+
renderer under that key:
|
|
104
139
|
|
|
105
140
|
```typescript
|
|
106
|
-
import { calendarComponents } from '@object-ui/plugin-calendar';
|
|
107
141
|
import { ComponentRegistry } from '@object-ui/core';
|
|
142
|
+
import { ObjectCalendarRenderer } from '@object-ui/plugin-calendar';
|
|
108
143
|
|
|
109
|
-
|
|
110
|
-
Object.entries(calendarComponents).forEach(([type, component]) => {
|
|
111
|
-
ComponentRegistry.register(type, component);
|
|
112
|
-
});
|
|
144
|
+
ComponentRegistry.register('my-calendar', ObjectCalendarRenderer);
|
|
113
145
|
```
|
|
114
146
|
|
|
115
147
|
## Schema API
|
|
116
148
|
|
|
117
149
|
### CalendarView
|
|
118
150
|
|
|
119
|
-
Display a
|
|
151
|
+
Display a calendar computed from the node's `data` records. This is the full
|
|
152
|
+
authored surface: `CalendarViewSchema` in `@object-ui/types` declares 13 keys of
|
|
153
|
+
its own, converged on what the registered `calendar-view` renderer actually
|
|
154
|
+
reads (objectui#5667). Two of them — `data` and `className` — refine common
|
|
155
|
+
`BaseSchema` keys; the rest of `BaseSchema` (`id`, `visible`, ...) applies as on
|
|
156
|
+
any node.
|
|
120
157
|
|
|
121
158
|
```typescript
|
|
122
159
|
{
|
|
123
160
|
type: 'calendar-view',
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
161
|
+
data?: any, // records rendered as events (array, or a binding expression)
|
|
162
|
+
titleField?: string, // default 'title'
|
|
163
|
+
startDateField?: string, // default 'start'
|
|
164
|
+
endDateField?: string, // default 'end'
|
|
165
|
+
allDayField?: string, // default 'allDay'
|
|
166
|
+
colorField?: string, // default 'color'
|
|
167
|
+
view?: CalendarViewMode, // 'month' | 'week' | 'day' (default 'month')
|
|
168
|
+
currentDate?: string | Date, // ISO string authored; Date from a React host
|
|
169
|
+
allowCreate?: boolean, // default false — shows the "New event" button
|
|
170
|
+
className?: string, // Tailwind classes for the container
|
|
171
|
+
onEventClick?: (event: CalendarEvent) => void, // HOST-ONLY (see below)
|
|
172
|
+
onViewChange?: (view: CalendarViewMode) => void // HOST-ONLY (see below)
|
|
129
173
|
}
|
|
130
174
|
```
|
|
131
175
|
|
|
176
|
+
There is deliberately **no authorable `events` key**: the renderer computes its
|
|
177
|
+
events from `data` plus the field-name keys, and drops an authored `events`
|
|
178
|
+
(objectui#4433). Nine formerly declared keys — `events`, `defaultView`,
|
|
179
|
+
`defaultDate`, `date`, `views`, `editable`, `onEventCreate`, `onEventUpdate`,
|
|
180
|
+
`onDateChange` — were retired in objectui#5667 because nothing read them on the
|
|
181
|
+
authored-node path and no measured app authors them. `onDateClick` is **not**
|
|
182
|
+
on this schema — it is a `CalendarViewProps` component prop (see
|
|
183
|
+
[Drag-and-Drop](#drag-and-drop) and [Click-to-Create](#click-to-create)).
|
|
184
|
+
|
|
185
|
+
> **The handlers are host-only.** `onEventClick` and `onViewChange` are
|
|
186
|
+
> forwarded to the component only when the value really is a function, which
|
|
187
|
+
> authored JSON can never produce — supply them from a React host
|
|
188
|
+
> (`<SchemaRenderer ... onEventClick={fn} />`). Authored as JSON strings they
|
|
189
|
+
> are dropped, same as absent.
|
|
190
|
+
|
|
132
191
|
### Calendar Event Structure
|
|
133
192
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
193
|
+
Events are not authored directly — the renderer computes one event per record
|
|
194
|
+
in the node's `data` array, reading the fields the field-name keys point at:
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
id: record.id // falls back to record._id, then the array index
|
|
198
|
+
title: record[titleField] // default field 'title'
|
|
199
|
+
start: record[startDateField] // default field 'start' (ISO datetime string)
|
|
200
|
+
end: record[endDateField] // default field 'end' (optional)
|
|
201
|
+
allDay: record[allDayField] // default field 'allDay'
|
|
202
|
+
color: record[colorField] // default field 'color'
|
|
203
|
+
data: record // the whole record rides along
|
|
144
204
|
```
|
|
145
205
|
|
|
206
|
+
`@object-ui/types` still exports the `CalendarEvent` interface — it is the
|
|
207
|
+
declared payload type of the host-only `onEventClick` callback.
|
|
208
|
+
|
|
146
209
|
## Examples
|
|
147
210
|
|
|
148
211
|
### Basic Calendar
|
|
@@ -150,7 +213,7 @@ interface CalendarEvent {
|
|
|
150
213
|
```typescript
|
|
151
214
|
const schema = {
|
|
152
215
|
type: 'calendar-view',
|
|
153
|
-
|
|
216
|
+
data: [
|
|
154
217
|
{
|
|
155
218
|
id: '1',
|
|
156
219
|
title: 'Product Launch',
|
|
@@ -169,6 +232,11 @@ const schema = {
|
|
|
169
232
|
};
|
|
170
233
|
```
|
|
171
234
|
|
|
235
|
+
The records above already use the default field names (`title`, `start`, `end`,
|
|
236
|
+
`color`), so no field-name keys are needed; point `titleField` /
|
|
237
|
+
`startDateField` / `endDateField` / `allDayField` / `colorField` at your own
|
|
238
|
+
fields when they differ.
|
|
239
|
+
|
|
172
240
|
### With ObjectQL Integration
|
|
173
241
|
|
|
174
242
|
```typescript
|
|
@@ -184,21 +252,28 @@ const schema = {
|
|
|
184
252
|
|
|
185
253
|
### Interactive Calendar
|
|
186
254
|
|
|
255
|
+
The handlers are host-only — a function can only come from a React host
|
|
256
|
+
building the node in code, never from authored JSON:
|
|
257
|
+
|
|
187
258
|
```typescript
|
|
188
259
|
const schema = {
|
|
189
260
|
type: 'calendar-view',
|
|
190
|
-
|
|
261
|
+
data: [],
|
|
191
262
|
onEventClick: (event) => {
|
|
192
263
|
console.log('Event clicked:', event);
|
|
193
264
|
// Open event details modal
|
|
194
265
|
},
|
|
195
|
-
|
|
196
|
-
console.log('
|
|
197
|
-
//
|
|
266
|
+
onViewChange: (view) => {
|
|
267
|
+
console.log('View changed:', view);
|
|
268
|
+
// React to the calendar switching between month/week/day
|
|
198
269
|
}
|
|
199
270
|
};
|
|
200
271
|
```
|
|
201
272
|
|
|
273
|
+
Authored JSON reacts to clicks through the node's action channel instead
|
|
274
|
+
(`allowCreate: true` dispatches `{ type: 'create' }`; event clicks dispatch
|
|
275
|
+
`{ type: 'event-click' }`).
|
|
276
|
+
|
|
202
277
|
## ObjectQL Integration
|
|
203
278
|
|
|
204
279
|
When using with ObjectStack, the calendar can automatically fetch and display events:
|
|
@@ -232,38 +307,48 @@ Style the calendar with Tailwind classes:
|
|
|
232
307
|
const schema = {
|
|
233
308
|
type: 'calendar-view',
|
|
234
309
|
className: 'border rounded-lg shadow-lg',
|
|
235
|
-
|
|
310
|
+
data: [...]
|
|
236
311
|
};
|
|
237
312
|
```
|
|
238
313
|
|
|
239
314
|
## TypeScript Support
|
|
240
315
|
|
|
241
|
-
|
|
242
|
-
|
|
316
|
+
The **authored** (JSON metadata) types live in `@object-ui/types`, not in this
|
|
317
|
+
package — this package imports them too, and does not re-export them:
|
|
243
318
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
title: 'Meeting',
|
|
247
|
-
start: '2024-01-15T10:00:00',
|
|
248
|
-
end: '2024-01-15T11:00:00'
|
|
249
|
-
};
|
|
319
|
+
```typescript
|
|
320
|
+
import type { CalendarViewSchema } from '@object-ui/types';
|
|
250
321
|
|
|
251
322
|
const schema: CalendarViewSchema = {
|
|
252
323
|
type: 'calendar-view',
|
|
253
|
-
|
|
324
|
+
data: [
|
|
325
|
+
{ id: '1', name: 'Meeting', begins: '2024-01-15T10:00:00', ends: '2024-01-15T11:00:00' }
|
|
326
|
+
],
|
|
327
|
+
titleField: 'name',
|
|
328
|
+
startDateField: 'begins',
|
|
329
|
+
endDateField: 'ends',
|
|
330
|
+
view: 'week',
|
|
331
|
+
allowCreate: true
|
|
254
332
|
};
|
|
255
333
|
```
|
|
256
334
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
335
|
+
> **Two calendar event types — pick by which side you are on.**
|
|
336
|
+
> `@object-ui/types` exports **`CalendarEvent`**, the AUTHORING event
|
|
337
|
+
> (`id: string`, `start` / `end` accept ISO strings with `end` required, plus
|
|
338
|
+
> `description`) — since objectui#5667 it is no longer part of the authored
|
|
339
|
+
> surface (a `calendar-view` node carries `data` records, not events; see
|
|
340
|
+
> [Calendar Event Structure](#calendar-event-structure)), but it remains the
|
|
341
|
+
> declared payload type of the host-only `onEventClick` callback. This package
|
|
342
|
+
> exports **`CalendarViewEvent`** (`CalendarViewProps['events']`), the
|
|
343
|
+
> `CalendarView` **component's runtime** type: `id: string | number` and
|
|
344
|
+
> `start: Date` / `end?: Date`. They are not interchangeable — neither is
|
|
345
|
+
> assignable to the other.
|
|
346
|
+
>
|
|
347
|
+
> Both were spelled `CalendarEvent` until objectui#5044, where IDE auto-import
|
|
348
|
+
> chose between them at random and the wrong pick failed as a remote `TS2322`
|
|
349
|
+
> about `Date`. This package still exports `CalendarEvent` as a **`@deprecated`
|
|
350
|
+
> alias of `CalendarViewEvent`**, so existing importers keep compiling; write
|
|
351
|
+
> `CalendarViewEvent` in new code.
|
|
267
352
|
|
|
268
353
|
## Links
|
|
269
354
|
|
package/dist/CalendarView.d.ts
CHANGED
|
@@ -21,7 +21,27 @@ declare function resolveEventColor(raw: string | undefined | null): {
|
|
|
21
21
|
className: string;
|
|
22
22
|
inlineColor?: string;
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* The `CalendarView` component's RUNTIME event: what the React component
|
|
26
|
+
* receives on its `events` prop, already parsed — `start` / `end` are real
|
|
27
|
+
* `Date` objects, and `id` may be the numeric key a data source returned.
|
|
28
|
+
*
|
|
29
|
+
* Renamed from `CalendarEvent` in objectui#5044, following the objectui#4650
|
|
30
|
+
* precedent (`ObjectCalendarProps` -> `ObjectCalendarComponentProps`).
|
|
31
|
+
* `@object-ui/types` owns `CalendarEvent`, where it is the AUTHORING event —
|
|
32
|
+
* `id: string`, `start` / `end` accepting ISO strings with `end` REQUIRED, plus
|
|
33
|
+
* a `description` this one does not have. The two are structurally
|
|
34
|
+
* incompatible in BOTH directions (`id` and `start` each conflict), so picking
|
|
35
|
+
* the wrong one out of IDE auto-import failed as a remote `TS2322` about
|
|
36
|
+
* `Date`, never as "you imported from the wrong package" — measured on
|
|
37
|
+
* `README.md`'s own example, which stayed uncompilable through objectui#5010's
|
|
38
|
+
* import-path fix because both names were real exports.
|
|
39
|
+
*
|
|
40
|
+
* `index.tsx` keeps a `@deprecated` `CalendarEvent` alias for this type, so
|
|
41
|
+
* existing importers keep compiling; the rename is what stops the collision,
|
|
42
|
+
* not a removal.
|
|
43
|
+
*/
|
|
44
|
+
export interface CalendarViewEvent {
|
|
25
45
|
id: string | number;
|
|
26
46
|
title: string;
|
|
27
47
|
start: Date;
|
|
@@ -31,16 +51,16 @@ export interface CalendarEvent {
|
|
|
31
51
|
data?: any;
|
|
32
52
|
}
|
|
33
53
|
export interface CalendarViewProps {
|
|
34
|
-
events?:
|
|
54
|
+
events?: CalendarViewEvent[];
|
|
35
55
|
view?: "month" | "week" | "day";
|
|
36
56
|
currentDate?: Date;
|
|
37
57
|
locale?: string;
|
|
38
|
-
onEventClick?: (event:
|
|
58
|
+
onEventClick?: (event: CalendarViewEvent) => void;
|
|
39
59
|
onDateClick?: (date: Date) => void;
|
|
40
60
|
onViewChange?: (view: "month" | "week" | "day") => void;
|
|
41
61
|
onNavigate?: (date: Date) => void;
|
|
42
62
|
onAddClick?: () => void;
|
|
43
|
-
onEventDrop?: (event:
|
|
63
|
+
onEventDrop?: (event: CalendarViewEvent, newStart: Date, newEnd?: Date) => void;
|
|
44
64
|
/**
|
|
45
65
|
* Fired in WeekView/DayView when the user drags across an empty area of
|
|
46
66
|
* the time grid to select a time range. The default ObjectCalendar
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarView.d.ts","sourceRoot":"","sources":["../src/CalendarView.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA0C9B;;;;;;;;;;GAUG;AACH,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAUtG;AAsBD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"CalendarView.d.ts","sourceRoot":"","sources":["../src/CalendarView.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA0C9B;;;;;;;;;;GAUG;AACH,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAUtG;AAsBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,CAAC,EAAE,IAAI,CAAA;IACV,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,GAAG,CAAA;CACX;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC5B,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAA;IAC/B,WAAW,CAAC,EAAE,IAAI,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAA;IACjD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAClC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,KAAK,IAAI,CAAA;IACvD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IACjC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;IAC/E;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,CAAA;IACpD;2EACuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iBAAS,YAAY,CAAC,EACpB,MAAW,EACX,IAAc,EACd,WAAiC,EACjC,MAAkB,EAClB,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,UAAU,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,WAAgB,EAChB,SAAS,GACV,EAAE,iBAAiB,qBA8OnB;AAmhCD,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,OAAO,EAAE,iBAAiB,IAAI,0BAA0B,EAAE,CAAA"}
|
package/dist/ObjectCalendar.d.ts
CHANGED
|
@@ -12,7 +12,23 @@ export interface CalendarSchema {
|
|
|
12
12
|
/** Initial view mode */
|
|
13
13
|
defaultView?: 'month' | 'week' | 'day';
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Props of the `ObjectCalendar` React component.
|
|
17
|
+
*
|
|
18
|
+
* Renamed off the bare `ObjectCalendarProps` (objectui#4650): from 17.0.0
|
|
19
|
+
* `@objectstack/spec/ui` owns that name, where it is the AUTHORED props
|
|
20
|
+
* document of the `object-calendar` element — `z.input<typeof
|
|
21
|
+
* ObjectCalendarPropsSchema>`, i.e. serialisable authoring keys only. This is
|
|
22
|
+
* the RENDERER's props: a live `dataSource`, records pre-fetched by a parent,
|
|
23
|
+
* and the host callbacks below, none of which can exist in authored metadata.
|
|
24
|
+
* Two layers under one word, resolved the way this repo already resolved it for
|
|
25
|
+
* `PageHeaderProps` -> `PageHeaderComponentProps` (app-shell) and the
|
|
26
|
+
* `Record*ComponentProps` family in `@object-ui/types`.
|
|
27
|
+
*
|
|
28
|
+
* The barrel keeps `ObjectCalendarProps` as a deprecated alias of this type, so
|
|
29
|
+
* no importer breaks. Tripwire: `__tests__/spec-symbol-4650.test.ts`.
|
|
30
|
+
*/
|
|
31
|
+
export interface ObjectCalendarComponentProps {
|
|
16
32
|
schema: ObjectGridSchema | CalendarSchema;
|
|
17
33
|
dataSource?: DataSource;
|
|
18
34
|
className?: string;
|
|
@@ -30,5 +46,5 @@ export interface ObjectCalendarProps {
|
|
|
30
46
|
onEventDrop?: (record: any, newStart: Date, newEnd?: Date) => void;
|
|
31
47
|
locale?: string;
|
|
32
48
|
}
|
|
33
|
-
export declare const ObjectCalendar: React.FC<
|
|
49
|
+
export declare const ObjectCalendar: React.FC<ObjectCalendarComponentProps>;
|
|
34
50
|
//# sourceMappingURL=ObjectCalendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectCalendar.d.ts","sourceRoot":"","sources":["../src/ObjectCalendar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAA4B,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ObjectCalendar.d.ts","sourceRoot":"","sources":["../src/ObjectCalendar.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAA4B,MAAM,kBAAkB,CAAC;AA8B/F,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,wBAAwB;IACxB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;CACxC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,gBAAgB,GAAG,cAAc,CAAC;IAC1C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6GAA6G;IAC7G,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,2FAA2F;IAC3F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;IACxD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAuDD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAgjBjE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ObjectCalendar,
|
|
2
|
+
import { ObjectCalendar, ObjectCalendarComponentProps } from './ObjectCalendar';
|
|
3
3
|
export { ObjectCalendar };
|
|
4
|
-
export type {
|
|
4
|
+
export type { ObjectCalendarComponentProps };
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `ObjectCalendarComponentProps`. Renamed in objectui#4650
|
|
7
|
+
* because `@objectstack/spec/ui` owns `ObjectCalendarProps` from 17.0.0, where
|
|
8
|
+
* it means the AUTHORED props document of the `object-calendar` element — not
|
|
9
|
+
* this component's props. The alias denotes the SAME type and is kept only so
|
|
10
|
+
* existing importers keep compiling.
|
|
11
|
+
*/
|
|
12
|
+
export type { ObjectCalendarComponentProps as ObjectCalendarProps } from './ObjectCalendar';
|
|
5
13
|
export { CalendarView } from './CalendarView';
|
|
6
|
-
export type { CalendarViewProps,
|
|
14
|
+
export type { CalendarViewProps, CalendarViewEvent } from './CalendarView';
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `CalendarViewEvent`. Renamed in objectui#5044 because
|
|
17
|
+
* `@object-ui/types` owns `CalendarEvent`, where it means the AUTHORING event
|
|
18
|
+
* (`id: string`, `start` / `end` accepting ISO strings with `end` required,
|
|
19
|
+
* plus `description`) — not this component's runtime event, whose `start` is a
|
|
20
|
+
* real `Date` and whose `id` may be a number. The two are structurally
|
|
21
|
+
* incompatible in both directions, so IDE auto-import picking the wrong one
|
|
22
|
+
* failed as a remote `TS2322`. The alias denotes the SAME type and is kept only
|
|
23
|
+
* so existing importers keep compiling.
|
|
24
|
+
*
|
|
25
|
+
* Spelled with its `from` clause for the same reason the
|
|
26
|
+
* `ObjectCalendarProps` alias above is (objectui#4650): a re-export with no
|
|
27
|
+
* module specifier is judged as its own declaration by
|
|
28
|
+
* `scripts/check-spec-symbol-derivation.mjs`.
|
|
29
|
+
*/
|
|
30
|
+
export type { CalendarViewEvent as CalendarEvent } from './CalendarView';
|
|
7
31
|
export declare const ObjectCalendarRenderer: React.FC<{
|
|
8
32
|
schema: any;
|
|
9
33
|
[key: string]: any;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAGrE,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,4BAA4B,EAAE,CAAC;AAE7C;;;;;;GAMG;AACH,YAAY,EAAE,4BAA4B,IAAI,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5F,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAE3E;;;;;;;;;;;;;;GAcG;AACH,YAAY,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGzE,OAAO,0BAA0B,CAAC;AAyLlC,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,MAAM,EAAE,GAAG,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAoDhF,CAAC"}
|