@object-ui/plugin-calendar 17.7.0 → 18.0.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 +495 -0
- package/README.md +46 -9
- package/dist/CalendarView.d.ts.map +1 -1
- package/dist/ObjectCalendar.d.ts +31 -2
- package/dist/ObjectCalendar.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +615 -525
- package/dist/index.umd.cjs +1 -1
- package/dist/visibleDays.d.ts +19 -0
- package/dist/visibleDays.d.ts.map +1 -0
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,500 @@
|
|
|
1
1
|
# @object-ui/plugin-calendar
|
|
2
2
|
|
|
3
|
+
## 18.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 6f3299f: objectui moves to major 18, following `@objectstack/*` from 17 to 18 (objectui#12334). objectui's major is not a count of its own breaking changes: it tracks the major of the `@objectstack/spec` its packages depend on, so that the same major means compatible across the two projects. These packages already declare `@objectstack/*` on the 18 line (objectui#12030), so every package in the fixed release group crosses to 18 together. It is the one `major` that rule admits: objectui's own breaking changes ship as `minor`, described in their entries.
|
|
8
|
+
|
|
9
|
+
The 18 line is released from Changesets pre mode on the `next` tag (`.changeset/pre.json`), as `@objectstack/*` 18 is: these releases are `18.0.0-next.N` on the npm `next` dist-tag, and they do not move `latest`. The first `18.0.0` on `latest` comes when `@objectstack` 18 is generally available and this repository leaves pre mode.
|
|
10
|
+
|
|
11
|
+
What a consumer must do to take it is in the `@objectstack/*` 18 entry of this release (objectui#12030): move its own `@objectstack/*` packages to the 18 line at the same time.
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 9ca3cac: The calendar and the timeline start the week on the first day of the week of the user's locale (objectui#11675), instead of a fixed Sunday (calendar) and a fixed Monday (timeline). Under `en-US` both start on Sunday; under `en-GB` or `zh-CN` both start on Monday; under `ar-EG` both start on Saturday. There is no separate week-start setting: the first day comes from the locale the dates are already formatted with.
|
|
16
|
+
|
|
17
|
+
- **`@object-ui/i18n` exports `firstDayOfWeek(locale)` and its `WeekdayIndex` type.** It returns the first day of the week for a BCP-47 tag, numbered as `Date.prototype.getDay` numbers weekdays (0 is Sunday), which is also what react-day-picker's `weekStartsOn` takes. It reads the engine's `Intl.Locale` week info (`getWeekInfo()`, else the `weekInfo` accessor), including a `-u-fw-` keyword on the tag. Where the engine has neither, it reads CLDR's first-day table by the tag's region, or the region CLDR's likely subtags give it (`en` reads `US`, `zh` reads `CN`), and a region the table does not list reads Monday, CLDR's world default. A malformed tag throws the same `RangeError` that formatting a date with it would.
|
|
18
|
+
- **The calendar's weeks start on the locale's first day.** `CalendarView` (and `object-calendar` through it) reads the first day from its `locale` prop, else the display locale, and the month grid's rows, its weekday heads, the week view's columns, the header's week range, the day a span that wraps into a new row shows its title on, and the header's date popover all start there. The popover used to take date-fns's own week start for the tag, which is not CLDR's for every tag (date-fns reads `es-MX` as `es`, a Monday start, where CLDR starts Mexico's week on Sunday) and which read Sunday until the date-fns locale had loaded.
|
|
19
|
+
- **The object timeline's "This week" and "Next week" start on the display locale's first day.** The bucket bounds are also stepped on the local calendar now, so across a DST change the day after it is "Tomorrow" again, and the first day of next week no longer falls into "This week".
|
|
20
|
+
|
|
21
|
+
A host that relied on the calendar always starting on Sunday, or on the timeline's week always starting on Monday, now sees the locale's first day. The gantt variant's `week` axis is unchanged: it still counts plan weeks from the axis's first day.
|
|
22
|
+
- 16c8810: A calendar view in a list draws every record of the days it shows, not the first 100 records of the object (objectui#12081 item 2).
|
|
23
|
+
|
|
24
|
+
A list view's calendar used to draw the rows of the list's one unpaged fetch: the first 100 records of the object, with no date condition. A month holding more than 100 matching records was drawn from whichever 100 came first, and the rest never appeared. The only sign was the list's "Showing first 100 records" note. Measured on a contracts calendar with 122 records: up to 22 were never drawn.
|
|
25
|
+
|
|
26
|
+
- **The list fetches the calendar's visible days.** The query selects the days on the calendar's start field, or, with an end field bound, every span that touches those days. It also selects the records with no start date, which the calendar counts as unscheduled. The view's own filter, the filter panel, the user filters and the search still narrow it.
|
|
27
|
+
- **It walks the window in steps of the fetch batch.** Every request asks for at most 100 records, the same batch as before. The list keeps asking until the window is exhausted, so every record of the month is drawn. It stops at the platform's non-grid ceiling of 2,000 records. It then draws the first 2,000 and shows a note under the calendar naming both numbers, the note the standalone calendar already shows. The "Showing first 100 records" note no longer appears on a calendar.
|
|
28
|
+
- **A declared page size no longer sizes a calendar's fetch.** On a calendar with a start date bound, every step is the fetch batch, whatever `pagination.pageSize` the view declares. A declared size still sizes the window of every other view, and of a calendar with no start date bound.
|
|
29
|
+
- **The rows-per-page picker is no longer offered on such a calendar.** A page size changes nothing it draws. The other views that offer it keep it.
|
|
30
|
+
- **Moving to another month fetches that month.** A move inside the window already fetched, such as switching to a week of the same month, fetches nothing. The calendar keeps drawing while the next window loads, and keeps the month it moved to.
|
|
31
|
+
- **Unchanged:** the grid's paging and its requests, every other view's one fetch batch, and a calendar with no start date bound. A calendar rendered on its own, outside a list, still fetches as before.
|
|
32
|
+
|
|
33
|
+
**Clause-②: yes (widening)** — `ObjectCalendarComponentProps` gains one optional member, `onVisibleRangeChange?: (range: { start: Date; end: Date }) => void`. `ObjectCalendar` calls it on mount and whenever navigation or a view change moves the days it draws. `start` is local midnight of the first day drawn and `end` local midnight of the day after the last. The `object-calendar` renderer forwards it from a host, like the other callbacks, only when the value is a function. Nothing else on either package entry changes: no export is added or removed, no existing member changes type, and no locale key is added.
|
|
34
|
+
- ee47071: Calendar quick-create no longer offers a dialog that cannot succeed. On an object with a required field it cannot fill, an empty-day click opens the full create form with the clicked day already set (objectui#12291).
|
|
35
|
+
|
|
36
|
+
The quick-create dialog asks for a title only. Its write fills the date fields and, for the other required fields, a declared default, a select's first option, `false` for a boolean or `0` for a number. A required field outside that set, such as the required `project` lookup on the stock `showcase_task`, was left empty, and the create was refused with 400 "Project is required" while the dialog offered no Project input.
|
|
37
|
+
|
|
38
|
+
- **`@object-ui/plugin-calendar`.** Before the dialog is offered, the calendar checks the object's required fields against what its write can fill. The check and the write read one statement of that set. A required field the server fills on insert (declared `readonly` or `system`, or an `autonumber`) does not count. Where every required field can be filled, the dialog is unchanged. Where one cannot, the empty-day click, or a range drag in the week and day grids, calls the declared `onEdit` prop with a new record (no `id`) that carries the date values the dialog would have written. The host then opens its full create form with them. `ListView` already passes its `onEdit` down to the calendar, and in the console that is the handler that opens the record form. With no `onEdit`, the gesture offers nothing on such an object. A caller-supplied `onDateClick` still takes precedence, and the `calendarQuickCreate` permission row still gates both paths. The dialog gets no lookup picker, and no lookup value is guessed.
|
|
39
|
+
- **`@object-ui/app-shell`.** The console's record-form handler already treated a record with no id as a new one. It now opens the create form pre-filled with the values such a record carries. The record-form overlay gets them as its initial values, carried in the state of the history entry that opens it, so Back and a refresh keep them. A page-mode object (`editMode: 'page'`) gets them as the query-string prefill its create page already reads. `onEdit(null)` (the list's New) and a record with an id behave as before.
|
|
40
|
+
|
|
41
|
+
No export, prop or type member is added, and no language-pack key or URL parameter. `ObjectCalendarComponentProps.onEdit` was already declared and forwarded; the calendar did not call it until now.
|
|
42
|
+
- f62b6ff: Resolve `@objectstack/*` `18.0.0-next.2` (objectui#12626).
|
|
43
|
+
|
|
44
|
+
The console and the runner bundle `18.0.0-next.2`. `@object-ui/types` and `@object-ui/app-shell` now declare `@objectstack/spec` `^18.0.0-next.2`; the other packages keep `^18.0.0-next.1`, which already admits it.
|
|
45
|
+
|
|
46
|
+
**The record dialog opens bounded on desktop for every object.** A create, edit or child record dialog on an object with many fields used to open as a 95vw task canvas. `@objectstack/spec` `18.0.0-next.2` derives a bounded modal for it on desktop and keeps the full-screen sheet on a phone, and the console now takes that answer directly.
|
|
47
|
+
|
|
48
|
+
**Accept sets that narrow with it.** `@object-ui/types` validates a page through the spec's own page checks, so its faces (`safeValidateSchema` and `StrictAnyComponentSchema`) now refuse what `18.0.0-next.2` refuses. Each was accepted before:
|
|
49
|
+
|
|
50
|
+
- On a `kind: 'full'` page, a region whose `name` the page's `template` does not place (with the default template: anything but `header`, `sidebar`, `main`, `aside` and `footer`), and a second region for a slot another region already fills. The renderer stacked such a region under `main` at full width. Rename it to a slot the template places, or choose the `dashboard` template, which lays every other region out as a grid cell.
|
|
51
|
+
- `isDefault: true` on a page whose `type` is its page kind (`record`, `home` or `utility`) unless it is a `record` page bound to an `object`. Delete the key; an app's landing page is its first navigation item.
|
|
52
|
+
- 26323c4: Resolve `@objectstack/*` `18.0.0-next.3` (objectui#12873).
|
|
53
|
+
|
|
54
|
+
The console and the runner bundle `18.0.0-next.3`. Every package keeps its `@objectstack/*` range (`^18.0.0-next.1`, or `^18.0.0-next.2` for `@object-ui/types` and `@object-ui/components`), which already admits it, except `@object-ui/app-shell` (objectui#12943) and `@object-ui/plugin-detail` (objectui#12946), which declare `^18.0.0-next.3`.
|
|
55
|
+
|
|
56
|
+
**An accept set that narrows with it.** `@object-ui/types` validates a `page:header` node's `properties` through the spec's own `page:header` row, so its faces (`safeValidateSchema` and `StrictAnyComponentSchema`) now refuse `showStar`, which `18.0.0-next.3` retires: the follow star it switched on is not drawn by any renderer. It was accepted before. Delete the key.
|
|
57
|
+
|
|
58
|
+
**A type that widens with it.** `SelectOptionBase`, and the field and form option types built on it, take the spec's select option by reference, so they now carry its optional `kind` (`'open' | 'won' | 'lost'`), the lifecycle category `18.0.0-next.3` adds. The spec takes it on a single-value `select` or `radio` field's options and requires it on every option of the field an object's `stageField` names.
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- 5af42db: Five write affordances that read no grant at all now read the affordance-to-grant
|
|
63
|
+
map, so a caller without the grant is no longer offered a write the server then
|
|
64
|
+
refuses (objectui#12082, the card's remainder).
|
|
65
|
+
|
|
66
|
+
- **`object-view`'s New** (the toolbar button of the SDUI `object-view` node)
|
|
67
|
+
reads the `listNew` row, as the console's list pages already did: the
|
|
68
|
+
object's policy, the effective API operation set and the caller's create
|
|
69
|
+
grant, on top of the node's `showCreate` / `operations.create` toggles.
|
|
70
|
+
- **The calendar's quick-create** (an empty-day click, or a time-range drag in
|
|
71
|
+
the week / day grid) reads the new `calendarQuickCreate` row, and
|
|
72
|
+
**drag-to-reschedule** reads the new `calendarReschedule` row. A closed row
|
|
73
|
+
withholds the handler the calendar grid draws the affordance from: no dialog
|
|
74
|
+
on a day click, no range drag, no draggable event. A host-supplied
|
|
75
|
+
`onDateClick` / `onEventDrop` is handed through unchanged.
|
|
76
|
+
- **The kanban card move** reads the new `kanbanCardMove` row. A closed row
|
|
77
|
+
draws the cards as not movable and hands the board no mover, so no drop
|
|
78
|
+
reaches the write.
|
|
79
|
+
- **A line-items panel's add and remove** (`record:line_items`) read the
|
|
80
|
+
`relatedNew` and `relatedRowDelete` rows on the CHILD object, the same rows a
|
|
81
|
+
related list reads for the same two writes. Add covers the Add button, the
|
|
82
|
+
entry row and Duplicate; remove covers the per-row Remove.
|
|
83
|
+
|
|
84
|
+
With no permission provider mounted every one of them reads open, as before.
|
|
85
|
+
|
|
86
|
+
**Clause-②: yes (widening).** `AFFORDANCE_GRANTS`, exported from
|
|
87
|
+
`@object-ui/core`, gains three rows: `calendarQuickCreate` (create),
|
|
88
|
+
`calendarReschedule` (update) and `kanbanCardMove` (update), and with them the
|
|
89
|
+
`ConsoleAffordance` union that `resolveAffordance` accepts. Nothing is removed or
|
|
90
|
+
renamed. The other four packages change behaviour only.
|
|
91
|
+
- 524136e: The view-level `provider: 'api'` data source is no longer read anywhere in objectui (objectui#12325). `@objectstack/spec` retires it (objectstack#23082, ADR-0049): a view binds its object (`provider: 'object'`) or static rows (`provider: 'value'`), and a metadata-declared API call is the page element's `dataSource` binding.
|
|
92
|
+
|
|
93
|
+
Breaking, declared as `minor` per the version-alignment rule:
|
|
94
|
+
|
|
95
|
+
- **`resolveDataSource`** (`@object-ui/core`) has no `api` arm. A block that still says `provider: 'api'` is an unknown provider and gets an unknown provider's answer (the fallback DataSource, else `null`); no `ApiDataSource` is built from its `read` / `write`. `ResolveDataSourceOptions` loses `fetch` and `defaultHeaders`, which only that arm read.
|
|
96
|
+
- **`ViewDataProvider`** (`@object-ui/core`) has no `api` arm: such a config resolves with `Unknown data provider: api`. `ViewDataConfig` and `ResolvedData.provider` drop `'api'`, and `DataFetcher.fetchUrl`, which only that arm called, is removed.
|
|
97
|
+
- **`useViewData`** (`@object-ui/react`) no longer keys on or threads anything for an `api` block.
|
|
98
|
+
- **`ObjectGantt`** reads no `api` block: its `read` URL is never requested, and the chart answers it like any unknown provider. `ObjectCalendar` and `ObjectMap` drop their `api` branches, which only warned "not yet implemented".
|
|
99
|
+
- **`ListView`** no longer stands down for a gantt view with an `api` block: it fetches the bound object like any other list.
|
|
100
|
+
|
|
101
|
+
Unchanged: `ApiDataSource` stays a class for code that constructs it from an `ApiDataSourceConfig`, so the console's approvals inbox reads exactly as before.
|
|
102
|
+
- d75f212: Published text no longer teaches the retired view-level `provider: 'api'` data source (objectui#12364). A view binds `provider: 'object'` or `provider: 'value'`; a metadata-declared API call is the page element's `dataSource` binding. Text only: no schema accepts or refuses anything new, and no renderer behaves differently.
|
|
103
|
+
|
|
104
|
+
- **`@object-ui/types`:** the `object-tree` `data` description drops the `api` provider from the providers it names.
|
|
105
|
+
- **`@object-ui/plugin-grid` / `@object-ui/plugin-map`:** the `data` input descriptions drop the `api` provider.
|
|
106
|
+
- **`@object-ui/plugin-calendar` / `@object-ui/plugin-gantt` / `@object-ui/plugin-map`:** the error thrown when no `DataSource` is available now reads `DataSource required for the object provider` (was `DataSource required for object/api providers`). It fires in exactly the same conditions as before.
|
|
107
|
+
- **`@object-ui/react` / `@object-ui/auth`:** the README and docblocks describe `SchemaRendererProvider`'s `apiFetch` as what it is now: the host's authenticated fetch the renderers use for their own reads of the host's API (chart metadata, dataset dimension labels, record-permission probes). It is not a channel for a view's data source.
|
|
108
|
+
- **`@object-ui/app-shell`:** comment wording only in `ConsoleShell`, `useConsoleActionRuntime` and `ObjectView` (these comments ship in the built JS): no behaviour change.
|
|
109
|
+
- **`@object-ui/core`:** docblock wording only on `normalizeListViewSchema` and `resolveRecordSourceObjectName` (these ship in `dist/*.d.ts` and the built JS): no behaviour change.
|
|
110
|
+
- 1e6d83b: Data-bound blocks title their "data source could not be resolved" panel in the page's language (objectui#12920, the family of objectui#12910). The panel shows when a block's `dataSource.view` names a view its object does not have. Each block's title now reads `@object-ui/i18n` through `useObjectTranslation`, with the `en` pack's value as the inline default, so a page with no `I18nProvider` draws the same English it drew before.
|
|
111
|
+
|
|
112
|
+
- **Plugin blocks.** `object-calendar`, `object-chart`, `object-metric`, `object-pivot`, `detail-view`, `record:related_list`, `object-form`, `embeddable-form`, `object-master-detail-form`, `record:line_items`, `object-gantt`, `object-grid`, `object-kanban`, `list-view`, `object-map` and `object-timeline` read one `element.KIND.sourceUnresolved` key per block kind. `object-metric` reads `element.number.sourceUnresolved`, the key `element:number` already reads for the same sentence. The three forms share `element.form.sourceUnresolved`. `record:related_list`'s panel for a failed `parentDataSource` read reads `element.relatedList.parentUnreadable` ("This related list’s parent record could not be read").
|
|
113
|
+
- **`@object-ui/react` panel defaults.** `ElementDataSourceErrorPanel` with no `title` reads `element.component.sourceUnresolved`, and `NoDataSourcePanel` with no `title` reads `element.component.noDataSource`. A passed `title` still wins, an empty string included. Props and markup do not change.
|
|
114
|
+
|
|
115
|
+
Clause-②: yes
|
|
116
|
+
|
|
117
|
+
The new keys in `@object-ui/i18n` widen its exported `TranslationKeys`. No prop, input or export of these packages changes.
|
|
118
|
+
- 3cec090: The calendar header's date title no longer clips at phone widths (objectui#13149). At 390px the day view's title was cut by the container edge ("Tuesday, October 20, 2") with no ellipsis. The title and its button can now shrink and truncate with an ellipsis, the button's tooltip holds the full date, and below the `sm` breakpoint the header shows a short form of the same locale-aware format ("Tue, Oct 20" in the day view, "Oct 18 - Oct 24" in the week view, "Oct 2026" in the month view). From `sm` up the full title is unchanged.
|
|
119
|
+
|
|
120
|
+
Nothing is added to the package entry: no export, prop, type member or language-pack key.
|
|
121
|
+
- d7e9e9a: feat(types)!: `object-grid` `operations` and the `object-grid` / `object-kanban` / `object-calendar` `filter` follow the `@objectstack/spec` 17.7.0 rows (objectui#6152, round 8)
|
|
122
|
+
|
|
123
|
+
Clause-②: no
|
|
124
|
+
|
|
125
|
+
**Narrowed (breaking).** `@objectstack/spec` 17.7.0 types `object-grid`'s `operations` as the
|
|
126
|
+
strict `{ create?, update?, delete?, export? }` block, refusing `read` and `import` by name, and
|
|
127
|
+
the `filter` of `object-grid`, `object-kanban` and `object-calendar` as the `ViewFilterRule` array
|
|
128
|
+
`[{ field, operator, value }, ...]`, refusing the MongoDB-style record and the AST tuple array.
|
|
129
|
+
`@object-ui/types` now says the same, with no alias window:
|
|
130
|
+
|
|
131
|
+
- `ObjectGridSchema.operations` takes the row's block by reference. `read` and `import` are
|
|
132
|
+
`?: never` on the interface and refused by name at their own path on the flat zod
|
|
133
|
+
`ObjectGridSchema`: no `object-grid` code reads either. The flat mirror is the source of an
|
|
134
|
+
`object-view`'s `table` slot, so `table.operations.read` / `.import` are refused there too, and
|
|
135
|
+
the `read` refusal names the view-level spelling, `navigation: { mode: 'none' }` or the view's
|
|
136
|
+
own `operations: { read: false }`.
|
|
137
|
+
- `ObjectGridSchema.filter`, `ObjectKanbanSchema.filter` and `ObjectCalendarSchema.filter` take
|
|
138
|
+
their row's own member by reference, on the interface and on the zod mirror. They were `any[]`
|
|
139
|
+
and `z.array(z.any())`, so `filter: [['status', '=', 'open']]` type-checked and parsed. It is now
|
|
140
|
+
refused, on an authored `object-kanban` / `object-calendar` node and in an `object-view`'s
|
|
141
|
+
`table` slot; respell it `filter: [{ field: 'status', operator: 'equals', value: 'open' }]`.
|
|
142
|
+
|
|
143
|
+
What did not move: an `object-view`'s own `operations.read` (the protocol has no `object-view`
|
|
144
|
+
row, and `ObjectView` reads it as its row-click gate), and the renderers' reads. `ObjectGrid`
|
|
145
|
+
still lowers an AST array, and the board and the calendar still hand whatever `filter` reaches
|
|
146
|
+
the node to `$filter`, because hosts compose that form at runtime.
|
|
147
|
+
|
|
148
|
+
- `@object-ui/plugin-view`: the grid node `ObjectView` composes no longer carries the view's
|
|
149
|
+
`read` toggle in its `operations` block; the view keeps reading it.
|
|
150
|
+
- `@object-ui/plugin-grid`, `@object-ui/plugin-kanban`, `@object-ui/plugin-calendar`: the
|
|
151
|
+
registrations' `filter` inputs describe the `ViewFilterRule` array, and the grid's `operations`
|
|
152
|
+
input names the four toggles.
|
|
153
|
+
- `@object-ui/console`: the registry parity pins' prose stops calling these rows `z.unknown()`.
|
|
154
|
+
- Updated dependencies [18d7b48]
|
|
155
|
+
- Updated dependencies [172acc3]
|
|
156
|
+
- Updated dependencies [f0496bd]
|
|
157
|
+
- Updated dependencies [c4c506b]
|
|
158
|
+
- Updated dependencies [9db9ff3]
|
|
159
|
+
- Updated dependencies [c096f03]
|
|
160
|
+
- Updated dependencies [d92b2a1]
|
|
161
|
+
- Updated dependencies [92f4e2b]
|
|
162
|
+
- Updated dependencies [b10c68e]
|
|
163
|
+
- Updated dependencies [bdc9049]
|
|
164
|
+
- Updated dependencies [b61c116]
|
|
165
|
+
- Updated dependencies [e8c0b96]
|
|
166
|
+
- Updated dependencies [b92329c]
|
|
167
|
+
- Updated dependencies [2e818d0]
|
|
168
|
+
- Updated dependencies [fd060f0]
|
|
169
|
+
- Updated dependencies [fd060f0]
|
|
170
|
+
- Updated dependencies [8b14aec]
|
|
171
|
+
- Updated dependencies [2abec3a]
|
|
172
|
+
- Updated dependencies [4c127cd]
|
|
173
|
+
- Updated dependencies [9dfaca6]
|
|
174
|
+
- Updated dependencies [76993f8]
|
|
175
|
+
- Updated dependencies [c000398]
|
|
176
|
+
- Updated dependencies [73b5d77]
|
|
177
|
+
- Updated dependencies [7b17705]
|
|
178
|
+
- Updated dependencies [fc3c2cc]
|
|
179
|
+
- Updated dependencies [f9f4a62]
|
|
180
|
+
- Updated dependencies [848ba0e]
|
|
181
|
+
- Updated dependencies [57d82cb]
|
|
182
|
+
- Updated dependencies [de96f3d]
|
|
183
|
+
- Updated dependencies [9ca3cac]
|
|
184
|
+
- Updated dependencies [c910630]
|
|
185
|
+
- Updated dependencies [ce464d9]
|
|
186
|
+
- Updated dependencies [e6dcd85]
|
|
187
|
+
- Updated dependencies [96fcf30]
|
|
188
|
+
- Updated dependencies [7a2c60b]
|
|
189
|
+
- Updated dependencies [7300fca]
|
|
190
|
+
- Updated dependencies [834c559]
|
|
191
|
+
- Updated dependencies [22b503c]
|
|
192
|
+
- Updated dependencies [9fc68aa]
|
|
193
|
+
- Updated dependencies [d50f724]
|
|
194
|
+
- Updated dependencies [17acfbb]
|
|
195
|
+
- Updated dependencies [6be0f7a]
|
|
196
|
+
- Updated dependencies [4590363]
|
|
197
|
+
- Updated dependencies [89cc738]
|
|
198
|
+
- Updated dependencies [c0862c1]
|
|
199
|
+
- Updated dependencies [c0862c1]
|
|
200
|
+
- Updated dependencies [c0862c1]
|
|
201
|
+
- Updated dependencies [c0862c1]
|
|
202
|
+
- Updated dependencies [c0862c1]
|
|
203
|
+
- Updated dependencies [c0862c1]
|
|
204
|
+
- Updated dependencies [ded4494]
|
|
205
|
+
- Updated dependencies [d172f63]
|
|
206
|
+
- Updated dependencies [885a96f]
|
|
207
|
+
- Updated dependencies [4c0de52]
|
|
208
|
+
- Updated dependencies [a80fef7]
|
|
209
|
+
- Updated dependencies [3bf8894]
|
|
210
|
+
- Updated dependencies [72167a9]
|
|
211
|
+
- Updated dependencies [e06365c]
|
|
212
|
+
- Updated dependencies [1e1f09e]
|
|
213
|
+
- Updated dependencies [455c646]
|
|
214
|
+
- Updated dependencies [f34e877]
|
|
215
|
+
- Updated dependencies [f34e877]
|
|
216
|
+
- Updated dependencies [f34e877]
|
|
217
|
+
- Updated dependencies [9844bbf]
|
|
218
|
+
- Updated dependencies [cef0eee]
|
|
219
|
+
- Updated dependencies [7ebff39]
|
|
220
|
+
- Updated dependencies [054fd84]
|
|
221
|
+
- Updated dependencies [5275d1f]
|
|
222
|
+
- Updated dependencies [7241a81]
|
|
223
|
+
- Updated dependencies [74add0c]
|
|
224
|
+
- Updated dependencies [aaba865]
|
|
225
|
+
- Updated dependencies [f1781be]
|
|
226
|
+
- Updated dependencies [fbad078]
|
|
227
|
+
- Updated dependencies [45d5853]
|
|
228
|
+
- Updated dependencies [4f4fc03]
|
|
229
|
+
- Updated dependencies [2312bd9]
|
|
230
|
+
- Updated dependencies [6d5eb34]
|
|
231
|
+
- Updated dependencies [c5406c2]
|
|
232
|
+
- Updated dependencies [c5406c2]
|
|
233
|
+
- Updated dependencies [d99b731]
|
|
234
|
+
- Updated dependencies [2571a3e]
|
|
235
|
+
- Updated dependencies [a368ccb]
|
|
236
|
+
- Updated dependencies [2a48bd4]
|
|
237
|
+
- Updated dependencies [8a55f0c]
|
|
238
|
+
- Updated dependencies [c7b30bd]
|
|
239
|
+
- Updated dependencies [e391f87]
|
|
240
|
+
- Updated dependencies [20c6d35]
|
|
241
|
+
- Updated dependencies [417e245]
|
|
242
|
+
- Updated dependencies [69bca0a]
|
|
243
|
+
- Updated dependencies [023f00d]
|
|
244
|
+
- Updated dependencies [158c75d]
|
|
245
|
+
- Updated dependencies [7525045]
|
|
246
|
+
- Updated dependencies [5af42db]
|
|
247
|
+
- Updated dependencies [ce991bd]
|
|
248
|
+
- Updated dependencies [3c0f806]
|
|
249
|
+
- Updated dependencies [1071393]
|
|
250
|
+
- Updated dependencies [5f75cfa]
|
|
251
|
+
- Updated dependencies [1d1cfe0]
|
|
252
|
+
- Updated dependencies [6757a93]
|
|
253
|
+
- Updated dependencies [b7cd5c8]
|
|
254
|
+
- Updated dependencies [5330038]
|
|
255
|
+
- Updated dependencies [c9fc10b]
|
|
256
|
+
- Updated dependencies [dc6d28e]
|
|
257
|
+
- Updated dependencies [c0c2f79]
|
|
258
|
+
- Updated dependencies [0665c3b]
|
|
259
|
+
- Updated dependencies [d2500d8]
|
|
260
|
+
- Updated dependencies [a7d4920]
|
|
261
|
+
- Updated dependencies [e723f58]
|
|
262
|
+
- Updated dependencies [82bb1d5]
|
|
263
|
+
- Updated dependencies [f3d5408]
|
|
264
|
+
- Updated dependencies [b231607]
|
|
265
|
+
- Updated dependencies [b231607]
|
|
266
|
+
- Updated dependencies [466a219]
|
|
267
|
+
- Updated dependencies [466a219]
|
|
268
|
+
- Updated dependencies [6fb281d]
|
|
269
|
+
- Updated dependencies [54159d3]
|
|
270
|
+
- Updated dependencies [fa778e6]
|
|
271
|
+
- Updated dependencies [334f0cf]
|
|
272
|
+
- Updated dependencies [c08c933]
|
|
273
|
+
- Updated dependencies [92f979d]
|
|
274
|
+
- Updated dependencies [c4dd707]
|
|
275
|
+
- Updated dependencies [c4dd707]
|
|
276
|
+
- Updated dependencies [7578323]
|
|
277
|
+
- Updated dependencies [38bb373]
|
|
278
|
+
- Updated dependencies [803f678]
|
|
279
|
+
- Updated dependencies [923504f]
|
|
280
|
+
- Updated dependencies [5c2982a]
|
|
281
|
+
- Updated dependencies [0cd322d]
|
|
282
|
+
- Updated dependencies [97e7d4e]
|
|
283
|
+
- Updated dependencies [10aba37]
|
|
284
|
+
- Updated dependencies [10aba37]
|
|
285
|
+
- Updated dependencies [5d3f437]
|
|
286
|
+
- Updated dependencies [51c661e]
|
|
287
|
+
- Updated dependencies [7af0ab3]
|
|
288
|
+
- Updated dependencies [b434f5f]
|
|
289
|
+
- Updated dependencies [9f282ef]
|
|
290
|
+
- Updated dependencies [fd4872f]
|
|
291
|
+
- Updated dependencies [f0532d8]
|
|
292
|
+
- Updated dependencies [cea429b]
|
|
293
|
+
- Updated dependencies [3092aca]
|
|
294
|
+
- Updated dependencies [82e5f53]
|
|
295
|
+
- Updated dependencies [d81e460]
|
|
296
|
+
- Updated dependencies [8106db1]
|
|
297
|
+
- Updated dependencies [068a540]
|
|
298
|
+
- Updated dependencies [ca45c6d]
|
|
299
|
+
- Updated dependencies [093d55b]
|
|
300
|
+
- Updated dependencies [b64fda3]
|
|
301
|
+
- Updated dependencies [28ebfb5]
|
|
302
|
+
- Updated dependencies [a8051d6]
|
|
303
|
+
- Updated dependencies [72594f2]
|
|
304
|
+
- Updated dependencies [524136e]
|
|
305
|
+
- Updated dependencies [2b06a91]
|
|
306
|
+
- Updated dependencies [6f3299f]
|
|
307
|
+
- Updated dependencies [065a1cf]
|
|
308
|
+
- Updated dependencies [f2b17c6]
|
|
309
|
+
- Updated dependencies [52d6194]
|
|
310
|
+
- Updated dependencies [23bf859]
|
|
311
|
+
- Updated dependencies [1c72d77]
|
|
312
|
+
- Updated dependencies [2b4d3f1]
|
|
313
|
+
- Updated dependencies [d75f212]
|
|
314
|
+
- Updated dependencies [37db09f]
|
|
315
|
+
- Updated dependencies [ff9df88]
|
|
316
|
+
- Updated dependencies [70e843f]
|
|
317
|
+
- Updated dependencies [caac3b2]
|
|
318
|
+
- Updated dependencies [a2225f9]
|
|
319
|
+
- Updated dependencies [5c4deb5]
|
|
320
|
+
- Updated dependencies [a8e5b73]
|
|
321
|
+
- Updated dependencies [9782cb2]
|
|
322
|
+
- Updated dependencies [3e2394d]
|
|
323
|
+
- Updated dependencies [d9d9d98]
|
|
324
|
+
- Updated dependencies [c950345]
|
|
325
|
+
- Updated dependencies [21f9577]
|
|
326
|
+
- Updated dependencies [044f231]
|
|
327
|
+
- Updated dependencies [f8267df]
|
|
328
|
+
- Updated dependencies [023087f]
|
|
329
|
+
- Updated dependencies [9b82ced]
|
|
330
|
+
- Updated dependencies [3821a3a]
|
|
331
|
+
- Updated dependencies [3eb3ec1]
|
|
332
|
+
- Updated dependencies [92c2a69]
|
|
333
|
+
- Updated dependencies [518a8e3]
|
|
334
|
+
- Updated dependencies [165f8ff]
|
|
335
|
+
- Updated dependencies [646caea]
|
|
336
|
+
- Updated dependencies [1ffd6a2]
|
|
337
|
+
- Updated dependencies [5f8ecf6]
|
|
338
|
+
- Updated dependencies [6f5dc6b]
|
|
339
|
+
- Updated dependencies [8ed7e5a]
|
|
340
|
+
- Updated dependencies [6c4d00d]
|
|
341
|
+
- Updated dependencies [db8ce2f]
|
|
342
|
+
- Updated dependencies [726d8c9]
|
|
343
|
+
- Updated dependencies [f0e760a]
|
|
344
|
+
- Updated dependencies [a5bb7ac]
|
|
345
|
+
- Updated dependencies [f78efdd]
|
|
346
|
+
- Updated dependencies [8a8bcf3]
|
|
347
|
+
- Updated dependencies [f74638c]
|
|
348
|
+
- Updated dependencies [ef71a09]
|
|
349
|
+
- Updated dependencies [8614705]
|
|
350
|
+
- Updated dependencies [619e3f7]
|
|
351
|
+
- Updated dependencies [ca7a4c3]
|
|
352
|
+
- Updated dependencies [c9e6742]
|
|
353
|
+
- Updated dependencies [4be76e0]
|
|
354
|
+
- Updated dependencies [f62b6ff]
|
|
355
|
+
- Updated dependencies [608033b]
|
|
356
|
+
- Updated dependencies [611566b]
|
|
357
|
+
- Updated dependencies [efa9cb4]
|
|
358
|
+
- Updated dependencies [d66d7e8]
|
|
359
|
+
- Updated dependencies [15d8ca6]
|
|
360
|
+
- Updated dependencies [378896d]
|
|
361
|
+
- Updated dependencies [9d857c9]
|
|
362
|
+
- Updated dependencies [670ea10]
|
|
363
|
+
- Updated dependencies [ff215d9]
|
|
364
|
+
- Updated dependencies [71243db]
|
|
365
|
+
- Updated dependencies [e219a3d]
|
|
366
|
+
- Updated dependencies [a8add5c]
|
|
367
|
+
- Updated dependencies [33ee9de]
|
|
368
|
+
- Updated dependencies [4839f5c]
|
|
369
|
+
- Updated dependencies [a23e804]
|
|
370
|
+
- Updated dependencies [c7462e7]
|
|
371
|
+
- Updated dependencies [36e2f7b]
|
|
372
|
+
- Updated dependencies [263e9dd]
|
|
373
|
+
- Updated dependencies [360e27a]
|
|
374
|
+
- Updated dependencies [ac59073]
|
|
375
|
+
- Updated dependencies [44cb469]
|
|
376
|
+
- Updated dependencies [e058d76]
|
|
377
|
+
- Updated dependencies [464ae62]
|
|
378
|
+
- Updated dependencies [c999d4c]
|
|
379
|
+
- Updated dependencies [8df2608]
|
|
380
|
+
- Updated dependencies [8df2608]
|
|
381
|
+
- Updated dependencies [5483297]
|
|
382
|
+
- Updated dependencies [ed43c79]
|
|
383
|
+
- Updated dependencies [6367bfe]
|
|
384
|
+
- Updated dependencies [260ef71]
|
|
385
|
+
- Updated dependencies [655e897]
|
|
386
|
+
- Updated dependencies [655e897]
|
|
387
|
+
- Updated dependencies [020d178]
|
|
388
|
+
- Updated dependencies [8d80845]
|
|
389
|
+
- Updated dependencies [69a408f]
|
|
390
|
+
- Updated dependencies [1aa622a]
|
|
391
|
+
- Updated dependencies [d2b21a1]
|
|
392
|
+
- Updated dependencies [6e4f144]
|
|
393
|
+
- Updated dependencies [5ff64ef]
|
|
394
|
+
- Updated dependencies [64acb7e]
|
|
395
|
+
- Updated dependencies [4ff5b6b]
|
|
396
|
+
- Updated dependencies [473e5a0]
|
|
397
|
+
- Updated dependencies [b279016]
|
|
398
|
+
- Updated dependencies [bb6c38c]
|
|
399
|
+
- Updated dependencies [15b1065]
|
|
400
|
+
- Updated dependencies [26323c4]
|
|
401
|
+
- Updated dependencies [9753811]
|
|
402
|
+
- Updated dependencies [2727527]
|
|
403
|
+
- Updated dependencies [3da39ae]
|
|
404
|
+
- Updated dependencies [bc281f4]
|
|
405
|
+
- Updated dependencies [d637be3]
|
|
406
|
+
- Updated dependencies [8392f74]
|
|
407
|
+
- Updated dependencies [2cfdc99]
|
|
408
|
+
- Updated dependencies [2cfdc99]
|
|
409
|
+
- Updated dependencies [1e6d83b]
|
|
410
|
+
- Updated dependencies [1e6d83b]
|
|
411
|
+
- Updated dependencies [6058bf8]
|
|
412
|
+
- Updated dependencies [c219165]
|
|
413
|
+
- Updated dependencies [79cb8c0]
|
|
414
|
+
- Updated dependencies [a7ae252]
|
|
415
|
+
- Updated dependencies [fb501bc]
|
|
416
|
+
- Updated dependencies [03f1d65]
|
|
417
|
+
- Updated dependencies [30083da]
|
|
418
|
+
- Updated dependencies [7f9cc37]
|
|
419
|
+
- Updated dependencies [025130c]
|
|
420
|
+
- Updated dependencies [76f91f8]
|
|
421
|
+
- Updated dependencies [ea34d9b]
|
|
422
|
+
- Updated dependencies [8aa8e3e]
|
|
423
|
+
- Updated dependencies [024b7b6]
|
|
424
|
+
- Updated dependencies [cb80001]
|
|
425
|
+
- Updated dependencies [bcd9717]
|
|
426
|
+
- Updated dependencies [909c64e]
|
|
427
|
+
- Updated dependencies [9e7e1a5]
|
|
428
|
+
- Updated dependencies [1d3da6c]
|
|
429
|
+
- Updated dependencies [0d97642]
|
|
430
|
+
- Updated dependencies [2493e85]
|
|
431
|
+
- Updated dependencies [d0b9648]
|
|
432
|
+
- Updated dependencies [46dbf32]
|
|
433
|
+
- Updated dependencies [a928aaa]
|
|
434
|
+
- Updated dependencies [47508f3]
|
|
435
|
+
- Updated dependencies [61ed5ad]
|
|
436
|
+
- Updated dependencies [1b94d50]
|
|
437
|
+
- Updated dependencies [6f877f1]
|
|
438
|
+
- Updated dependencies [988aa9f]
|
|
439
|
+
- Updated dependencies [50ba1bb]
|
|
440
|
+
- Updated dependencies [1ce0711]
|
|
441
|
+
- Updated dependencies [fb85637]
|
|
442
|
+
- Updated dependencies [9f1dd79]
|
|
443
|
+
- Updated dependencies [df71568]
|
|
444
|
+
- Updated dependencies [d11174a]
|
|
445
|
+
- Updated dependencies [4c68855]
|
|
446
|
+
- Updated dependencies [2d8a8b7]
|
|
447
|
+
- Updated dependencies [cbac9d7]
|
|
448
|
+
- Updated dependencies [9eb1479]
|
|
449
|
+
- Updated dependencies [74e37aa]
|
|
450
|
+
- Updated dependencies [961b69f]
|
|
451
|
+
- Updated dependencies [52907d7]
|
|
452
|
+
- Updated dependencies [f466b0a]
|
|
453
|
+
- Updated dependencies [673a71c]
|
|
454
|
+
- Updated dependencies [616df65]
|
|
455
|
+
- Updated dependencies [58798ec]
|
|
456
|
+
- Updated dependencies [8803ca5]
|
|
457
|
+
- Updated dependencies [e70c21d]
|
|
458
|
+
- Updated dependencies [4b92c5a]
|
|
459
|
+
- Updated dependencies [06be396]
|
|
460
|
+
- Updated dependencies [3650d94]
|
|
461
|
+
- Updated dependencies [7c05f21]
|
|
462
|
+
- Updated dependencies [8cd4db4]
|
|
463
|
+
- Updated dependencies [daeb77f]
|
|
464
|
+
- Updated dependencies [eb4552e]
|
|
465
|
+
- Updated dependencies [3c3115e]
|
|
466
|
+
- Updated dependencies [55e90fd]
|
|
467
|
+
- Updated dependencies [9b75509]
|
|
468
|
+
- Updated dependencies [b13ea3c]
|
|
469
|
+
- Updated dependencies [d7e9e9a]
|
|
470
|
+
- Updated dependencies [cf62edf]
|
|
471
|
+
- Updated dependencies [0253416]
|
|
472
|
+
- Updated dependencies [5d77c09]
|
|
473
|
+
- Updated dependencies [3fd8625]
|
|
474
|
+
- Updated dependencies [1473757]
|
|
475
|
+
- Updated dependencies [d73d987]
|
|
476
|
+
- Updated dependencies [12ff256]
|
|
477
|
+
- Updated dependencies [26b0bd2]
|
|
478
|
+
- Updated dependencies [26b0bd2]
|
|
479
|
+
- Updated dependencies [d328698]
|
|
480
|
+
- Updated dependencies [d328698]
|
|
481
|
+
- Updated dependencies [b4e0787]
|
|
482
|
+
- Updated dependencies [088e0f7]
|
|
483
|
+
- Updated dependencies [78b07f4]
|
|
484
|
+
- Updated dependencies [f962cdc]
|
|
485
|
+
- Updated dependencies [b403bb3]
|
|
486
|
+
- Updated dependencies [8a25fee]
|
|
487
|
+
- Updated dependencies [4016370]
|
|
488
|
+
- Updated dependencies [12dc7b4]
|
|
489
|
+
- @object-ui/types@18.0.0
|
|
490
|
+
- @object-ui/components@18.0.0
|
|
491
|
+
- @object-ui/core@18.0.0
|
|
492
|
+
- @object-ui/i18n@18.0.0
|
|
493
|
+
- @object-ui/react@18.0.0
|
|
494
|
+
- @object-ui/plugin-detail@18.0.0
|
|
495
|
+
- @object-ui/permissions@18.0.0
|
|
496
|
+
- @object-ui/mobile@18.0.0
|
|
497
|
+
|
|
3
498
|
## 17.7.0
|
|
4
499
|
|
|
5
500
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -19,6 +19,11 @@ Calendar view plugins for Object UI - includes both ObjectQL-integrated and stan
|
|
|
19
19
|
option.
|
|
20
20
|
- **ObjectQL Integration** - Connect to ObjectStack data sources
|
|
21
21
|
- **Standalone Mode** - Use with static data or custom backends
|
|
22
|
+
- **Locale week start** - Every week starts on the first day of the week
|
|
23
|
+
of the calendar's locale (the `locale` prop, else the display locale):
|
|
24
|
+
Sunday under `en-US`, Monday under `en-GB` or `zh-CN`. The month grid,
|
|
25
|
+
its weekday heads, the week view's columns, the header's week range and
|
|
26
|
+
the date popover all start on that day.
|
|
22
27
|
- **Responsive** - Mobile-friendly calendar layouts
|
|
23
28
|
- **Customizable** - Tailwind CSS styling support
|
|
24
29
|
|
|
@@ -72,6 +77,32 @@ The new record is optimistically inserted into local state so it
|
|
|
72
77
|
appears immediately. To override (e.g. open your own create form), pass
|
|
73
78
|
`onDateClick={(day) => …}` — the default behaviour is skipped.
|
|
74
79
|
|
|
80
|
+
The dialog is offered only where that payload can succeed. If the object
|
|
81
|
+
has a required field outside the set above (a required lookup, a required
|
|
82
|
+
text field other than the title), the click — or a range drag in the
|
|
83
|
+
week/day grid — opens the host's full create form instead: the calendar
|
|
84
|
+
calls `onEdit` with a new record (no `id`) carrying the date values, e.g.
|
|
85
|
+
`onEdit({ due_date: '2026-10-20' })`, and the host pre-fills its create form
|
|
86
|
+
with them. The console does this already. Without an `onEdit`, the gesture
|
|
87
|
+
offers nothing on such an object. Required fields the server fills on insert
|
|
88
|
+
(`readonly`, `system`, `autonumber`) do not count.
|
|
89
|
+
|
|
90
|
+
## Reporting the visible days
|
|
91
|
+
|
|
92
|
+
A host that fetches the calendar's records for it, and hands them over as
|
|
93
|
+
`data`, can fetch only the days on screen. `ObjectCalendar` reports them
|
|
94
|
+
through `onVisibleRangeChange={({ start, end }) => …}`: once on mount, and
|
|
95
|
+
again whenever navigation or a view change moves them. `start` is local
|
|
96
|
+
midnight of the first day drawn and `end` local midnight of the day after the
|
|
97
|
+
last, so the range is half-open. In the month view it covers the whole
|
|
98
|
+
six-week grid, including the leading and trailing days of the neighbouring
|
|
99
|
+
months, under the locale's first day of the week; in the week view it is the
|
|
100
|
+
week, and in the day view the day. An unchanged range is not reported again.
|
|
101
|
+
|
|
102
|
+
`ListView` (`@object-ui/plugin-list`) uses it to fetch a calendar view's
|
|
103
|
+
visible days instead of one batch of the object (objectui#12081). Like the
|
|
104
|
+
other host callbacks, it is forwarded only when the value is a function.
|
|
105
|
+
|
|
75
106
|
## Installation
|
|
76
107
|
|
|
77
108
|
```bash
|
|
@@ -194,10 +225,16 @@ const backwards: CalendarViewNode = shipped;
|
|
|
194
225
|
|
|
195
226
|
> **What those two assignments do and do not buy.** They check every key's
|
|
196
227
|
> **type**, in both directions. They do **not** check a key's **spelling**:
|
|
197
|
-
>
|
|
198
|
-
>
|
|
199
|
-
>
|
|
200
|
-
>
|
|
228
|
+
> both assign a declared variable, not a fresh object literal, and TypeScript
|
|
229
|
+
> runs its excess-property check only on a fresh literal. So a key renamed in
|
|
230
|
+
> the listing is an extra optional member on one side and simply absent on the
|
|
231
|
+
> other, and both assignments still compile. A fresh literal IS checked:
|
|
232
|
+
> `CalendarViewSchema` extends `BaseSchema`, which carries no index signature
|
|
233
|
+
> since objectui#8347, so
|
|
234
|
+
> `const node: CalendarViewSchema = { type: 'calendar-view', titleFieldd: 'name' }`
|
|
235
|
+
> is a compile error. Metadata that arrives as data is a question for the zod
|
|
236
|
+
> faces (the strict `StrictAnyComponentSchema` refuses an unknown key), not for
|
|
237
|
+
> TypeScript.
|
|
201
238
|
|
|
202
239
|
There is deliberately **no authorable `events` key**: the renderer computes its
|
|
203
240
|
events from `data` plus the field-name keys, and drops an authored `events`
|
|
@@ -297,11 +334,11 @@ import type { ObjectCalendarSchema } from '@object-ui/types';
|
|
|
297
334
|
// What this annotation buys, and what it does not - measured, objectui#7925.
|
|
298
335
|
// It type-checks the VALUES of the declared keys: `defaultView: 'agenda'` and
|
|
299
336
|
// `calendar: { titleField: 42 }` are both compile errors, and
|
|
300
|
-
// `check:doc-snippets` re-runs that check on every commit.
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
//
|
|
337
|
+
// `check:doc-snippets` re-runs that check on every commit. Top-level key NAMES
|
|
338
|
+
// are checked too since objectui#8347 removed `BaseSchema`'s `[key: string]: any`,
|
|
339
|
+
// and since objectui#6152 so are the key names inside the `calendar` block: its
|
|
340
|
+
// type is the spec's strict `object-calendar` slot, so a misspelt key there, or
|
|
341
|
+
// a block without `startDateField`, is a compile error as well as a parse error.
|
|
305
342
|
const schema: ObjectCalendarSchema = {
|
|
306
343
|
type: 'object-calendar',
|
|
307
344
|
objectName: 'events',
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"CalendarView.d.ts","sourceRoot":"","sources":["../src/CalendarView.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2C9B;;;;;;;;;;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;AAoCD;;;;;;;;;;;;;;;;;;;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,qBA0SnB;AAsnCD,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,OAAO,EAAE,iBAAiB,IAAI,0BAA0B,EAAE,CAAA"}
|
package/dist/ObjectCalendar.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ import { ObjectCalendarSchema, DataSource } from '@object-ui/types';
|
|
|
13
13
|
* fifteen.
|
|
14
14
|
*
|
|
15
15
|
* ⚠️ But the cast count is NOT twelve, and an earlier cut of this comment said
|
|
16
|
-
* it was. `ObjectGridSchema`
|
|
17
|
-
* the UNION the five `CalendarSchema`-only keys resolved through that index
|
|
16
|
+
* it was. `ObjectGridSchema` carried `BaseSchema`'s `[key: string]: any` (until
|
|
17
|
+
* objectui#8347), so on the UNION the five `CalendarSchema`-only keys resolved through that index
|
|
18
18
|
* signature and compiled with no cast at all. The checker on the union itself:
|
|
19
19
|
* DECLARED 8 of 15 (`colorField` `dateField` `defaultView` `endField` `filter`
|
|
20
20
|
* `objectName` `sort` `titleField`), NOT declared 7 (`allDayField` `calendar`
|
|
@@ -88,10 +88,39 @@ export interface ObjectCalendarComponentProps {
|
|
|
88
88
|
*/
|
|
89
89
|
onRowClick?: (record: any, event?: any) => void;
|
|
90
90
|
onDateClick?: (date: Date) => void;
|
|
91
|
+
/**
|
|
92
|
+
* The host's record form, opened on `record`. This component calls it for
|
|
93
|
+
* one gesture (objectui#12291): an empty-day click, or a range drag in the
|
|
94
|
+
* week / day grid, on an object with a required field quick-create cannot
|
|
95
|
+
* fill (`requiredFieldsQuickCreateCannotFill`). Quick-create could not
|
|
96
|
+
* succeed there, so the gesture hands the day to the host's full create
|
|
97
|
+
* form instead of offering the dialog: `record` is then a NEW record — it
|
|
98
|
+
* carries no `id` — whose keys are the date fields the click sets, written
|
|
99
|
+
* in their stored form, and the host pre-fills its create form with them.
|
|
100
|
+
* The console's handler already reads a record without an id as a new one.
|
|
101
|
+
* With no `onEdit`, that gesture offers nothing on such an object.
|
|
102
|
+
*/
|
|
91
103
|
onEdit?: (record: any) => void;
|
|
92
104
|
onDelete?: (record: any) => void;
|
|
93
105
|
onNavigate?: (date: Date) => void;
|
|
94
106
|
onViewChange?: (view: 'month' | 'week' | 'day') => void;
|
|
107
|
+
/**
|
|
108
|
+
* The days the calendar draws, reported to a host that fetches its records
|
|
109
|
+
* for it (objectui#12081): on mount, and again whenever navigation or a view
|
|
110
|
+
* change moves them. `start` is local midnight of the first day on screen and
|
|
111
|
+
* `end` local midnight of the day after the last, so the range is half-open.
|
|
112
|
+
*
|
|
113
|
+
* This is the channel `ListView` windows its calendar fetch through: the
|
|
114
|
+
* calendar alone knows which days it draws (the month grid's leading and
|
|
115
|
+
* trailing days, the locale's first day of the week, the phone's day view),
|
|
116
|
+
* so the host is told rather than left to infer them from `onNavigate` and
|
|
117
|
+
* `onViewChange`, neither of which fires for the state the calendar opens
|
|
118
|
+
* on.
|
|
119
|
+
*/
|
|
120
|
+
onVisibleRangeChange?: (range: {
|
|
121
|
+
start: Date;
|
|
122
|
+
end: Date;
|
|
123
|
+
}) => void;
|
|
95
124
|
onEventDrop?: (record: any, newStart: Date, newEnd?: Date) => void;
|
|
96
125
|
locale?: string;
|
|
97
126
|
}
|