@object-ui/plugin-gantt 17.5.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 CHANGED
@@ -1,5 +1,223 @@
1
1
  # @object-ui/plugin-gantt
2
2
 
3
+ ## 17.6.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 5edc0c5: `object-gantt` / `object-map` / `object-calendar` no longer drop a sort entry that omits `order`.
8
+
9
+ The three blocks each inlined a byte-identical private copy of the `sort` →
10
+ `$orderby` conversion. That copy required BOTH `field` and `order` on an array
11
+ entry and silently skipped any entry missing one, so a stored view sorting by
12
+ `[{ field: 'amount' }]` reached the wire with no ordering at all — the authored
13
+ sort key was lost, not applied. The same copy already treated the STRING
14
+ spelling `"amount"` as ascending, so this was an inconsistency between two
15
+ spellings of one thing rather than deliberate strictness.
16
+
17
+ All three now import the shared `convertSortToQueryParams` sink from
18
+ `@object-ui/core` (introduced by objectstack#7137, already used by
19
+ `object-timeline` and `record:line_items`), and the private copies are gone —
20
+ the sink is the repo's only definition. Two behavior changes come with it, both
21
+ of which make the blocks more faithful to what is already declared rather than
22
+ more tolerant:
23
+
24
+ - An array entry that omits `order` now orders ASCENDING instead of vanishing.
25
+ That is what `QueryParams.$orderby`'s own member shape
26
+ (`{ field: string; order?: 'asc' | 'desc' }`) says, and what
27
+ `@object-ui/data-objectstack`'s `serializeOrderBy` already did with a missing
28
+ direction.
29
+ - When nothing orderable was authored, the query now carries no `$orderby` at
30
+ all instead of an empty object. `{}` is truthy and meant "no ordering" only by
31
+ accident of the adapter's serializer.
32
+
33
+ Reachability, so the size of this is not overstated: `SortConfig.order` and
34
+ `ElementDataSourceSort.order` are REQUIRED in objectui's own types, so a typed
35
+ caller could never author the dropped shape. The affected surface is untyped
36
+ stored view metadata (`ElementSavedView` is a loose record by design) — which is
37
+ exactly where an order-less entry can arrive today.
38
+ - 6098ecd: plugin-gantt README: the `onTaskUpdate` drag example no longer writes blank dates on a progress drag.
39
+
40
+ `GanttViewProps.onTaskUpdate`'s second parameter is
41
+ `Partial< Pick< GanttTask, 'title' | 'start' | 'end' | 'progress' > >`
42
+ (`src/GanttView.tsx:345`), so the destructured `start` / `end` are
43
+ `Date | undefined`. The README's "Drag-and-drop rescheduling" example destructured
44
+ them and passed both straight to `save(...)`, under a comment asserting they are
45
+ always real `Date` objects. Both layers of that assertion were wrong.
46
+
47
+ The runtime half is the one that mattered. `onTaskUpdate` is the single exit for
48
+ every edit path, and the progress grip commits changes with **no** dates at all —
49
+ `commitTaskUpdates([{ task, changes: { progress: cur.value } }])`
50
+ (`src/GanttView.tsx:1335`), forwarded verbatim by `onTaskUpdate(task, changes)`
51
+ (`:1091`). A host that copied the example therefore called
52
+ `save(task.id, { start: undefined, end: undefined })` on every progress drag,
53
+ blanking the record's start and end dates. Drag is documented as opt-in via
54
+ `onTaskUpdate` alone and progress drag needs no extra switch, so the path was
55
+ reachable by default rather than a corner configuration.
56
+
57
+ The example now guards with `if (!start || !end) return;` and its comment states
58
+ the real shape — that only the keys an edit touched are present, and that the
59
+ progress grip sends just `{ progress }`. Documentation only; no renderer behavior
60
+ changed.
61
+ - bb3fab6: Docs only: `packages/plugin-gantt/README.md` no longer teaches two identifiers the
62
+ package does not export, nor a task shape it does not produce (objectui#5012).
63
+ Each README import was judged against the entry module's real export surface
64
+ (35 names, read from the build product's `dist/index.d.ts`), and every corrected
65
+ snippet was type-checked against that same build product:
66
+
67
+ - **`ganttComponents`** — taught as a components map to iterate over for "manual
68
+ registration" (`Object.entries(ganttComponents).forEach(...)`). It does not
69
+ exist anywhere in the package, so the snippet was `Object.entries(undefined)`:
70
+ a `TypeError` on the first line a reader copied. Registration is *only* the
71
+ side effect of importing the entry point, which runs the two
72
+ `ComponentRegistry.register(...)` calls in `src/index.tsx`. The section is
73
+ replaced by what actually happens: the schema types those calls claim
74
+ (`object-gantt` → `plugin-gantt:object-gantt`, `gantt` → `view:gantt`, both
75
+ with a bare-`type` fallback), the package's real export surface, and — for the
76
+ use case the old snippet was reaching for — registering the exported
77
+ `ObjectGanttRenderer` under a key of your own.
78
+
79
+ - **`GanttSchema`** — taught as the component schema type in the TypeScript
80
+ section. Pure fiction: zero hits in this package and in `@object-ui/types`
81
+ (a plain grep appears to find it only as a substring of `ObjectGanttSchema`;
82
+ under a word boundary it has no hits at all). The authored type does exist
83
+ under its real name, so the example is rewritten around it rather than
84
+ dropped: `ObjectGanttSchema` from `@object-ui/types`, which is
85
+ **record-driven** — `type: 'object-gantt'` plus an object name and the fields
86
+ to read. It never carried the `tasks` array the old snippet assigned to it.
87
+ No export was added to make the old name true.
88
+
89
+ - **`GanttTask`** — the one real name of the three, and the reason the section
90
+ still failed to compile. The documented shape had drifted from the exported
91
+ type on three counts: the label field is `title`, not `name`; `start`/`end`
92
+ are `Date` objects, not ISO strings; and `color` is a CSS color, not a
93
+ Tailwind class. Both the "Task Structure" reference block and the typed
94
+ example now match the exported declaration, and the reference block is pinned
95
+ against it in both assignment directions so a future drift fails a check
96
+ instead of compiling as an unrelated local interface.
97
+
98
+ No code, types or runtime behaviour change — the diff is one README and this
99
+ changeset. The correction reaches npm with the package's next publish, which is
100
+ why it declares a patch: `README.md` is in the package's published `files`.
101
+ - 449ffe8: Fix the `GanttViewMode` JSDoc to name all five granularities (objectui#5132).
102
+
103
+ The comment above `export type GanttViewMode` said "one column per day, week,
104
+ month, or quarter" while the type itself, `VIEW_MODES`, `NOMINAL_DAYS`
105
+ (`year: 365.25`), the column builder, the toolbar and the header-band logic
106
+ have honored a fifth member, `'year'`, all along — `'year'` was fully live,
107
+ just undocumented. Doc-only change, no behavior difference.
108
+ - Updated dependencies [88085e3]
109
+ - Updated dependencies [69251bf]
110
+ - Updated dependencies [57e668f]
111
+ - Updated dependencies [516663d]
112
+ - Updated dependencies [41ac1b7]
113
+ - Updated dependencies [1eaf0a1]
114
+ - Updated dependencies [7c297e3]
115
+ - Updated dependencies [a09bc33]
116
+ - Updated dependencies [460c4d0]
117
+ - Updated dependencies [0ae27f7]
118
+ - Updated dependencies [2533ec5]
119
+ - Updated dependencies [78c0f9a]
120
+ - Updated dependencies [bbe8b86]
121
+ - Updated dependencies [8477be5]
122
+ - Updated dependencies [279fb13]
123
+ - Updated dependencies [2e82ab2]
124
+ - Updated dependencies [ad07b65]
125
+ - Updated dependencies [41f498b]
126
+ - Updated dependencies [ef0d150]
127
+ - Updated dependencies [f34226e]
128
+ - Updated dependencies [564b605]
129
+ - Updated dependencies [e1d4251]
130
+ - Updated dependencies [40d3a33]
131
+ - Updated dependencies [8b9dc62]
132
+ - Updated dependencies [1184192]
133
+ - Updated dependencies [a2a9747]
134
+ - Updated dependencies [65e88e6]
135
+ - Updated dependencies [a1609a6]
136
+ - Updated dependencies [53f23bc]
137
+ - Updated dependencies [c4533dc]
138
+ - Updated dependencies [be60815]
139
+ - Updated dependencies [37f6844]
140
+ - Updated dependencies [93de4f6]
141
+ - Updated dependencies [2b50261]
142
+ - Updated dependencies [384f30d]
143
+ - Updated dependencies [ac600e5]
144
+ - Updated dependencies [97fba31]
145
+ - Updated dependencies [232f61a]
146
+ - Updated dependencies [d374caf]
147
+ - Updated dependencies [5673576]
148
+ - Updated dependencies [c1ef923]
149
+ - Updated dependencies [911ceaa]
150
+ - Updated dependencies [98eab36]
151
+ - Updated dependencies [af5e292]
152
+ - Updated dependencies [3fbbea1]
153
+ - Updated dependencies [0bffb18]
154
+ - Updated dependencies [800f455]
155
+ - Updated dependencies [5458414]
156
+ - Updated dependencies [3241559]
157
+ - Updated dependencies [7f96b10]
158
+ - Updated dependencies [167ec42]
159
+ - Updated dependencies [616a2a5]
160
+ - Updated dependencies [6c68b13]
161
+ - Updated dependencies [0046d8f]
162
+ - Updated dependencies [f1d4748]
163
+ - Updated dependencies [bea374e]
164
+ - Updated dependencies [b1119ec]
165
+ - Updated dependencies [5607092]
166
+ - Updated dependencies [9f23d2b]
167
+ - Updated dependencies [578e025]
168
+ - Updated dependencies [af025ee]
169
+ - Updated dependencies [d109a4d]
170
+ - Updated dependencies [598c89a]
171
+ - Updated dependencies [4a0bd17]
172
+ - Updated dependencies [b8b9af4]
173
+ - Updated dependencies [31676be]
174
+ - Updated dependencies [8c0d52e]
175
+ - Updated dependencies [aff10e2]
176
+ - Updated dependencies [70a774b]
177
+ - Updated dependencies [7dd93c0]
178
+ - Updated dependencies [229b17e]
179
+ - Updated dependencies [9ce096f]
180
+ - Updated dependencies [e05db88]
181
+ - Updated dependencies [7458a41]
182
+ - Updated dependencies [ad13d63]
183
+ - Updated dependencies [5ffcc14]
184
+ - Updated dependencies [d971e51]
185
+ - Updated dependencies [97abb24]
186
+ - Updated dependencies [deb157a]
187
+ - Updated dependencies [9c60144]
188
+ - Updated dependencies [e7747f1]
189
+ - Updated dependencies [d2ce342]
190
+ - Updated dependencies [9695da7]
191
+ - Updated dependencies [ac2f332]
192
+ - Updated dependencies [a777058]
193
+ - Updated dependencies [75444e3]
194
+ - Updated dependencies [58b8346]
195
+ - Updated dependencies [2d0bd16]
196
+ - Updated dependencies [a9e17b4]
197
+ - Updated dependencies [b8ce7dc]
198
+ - Updated dependencies [dad51e5]
199
+ - Updated dependencies [1c9c342]
200
+ - Updated dependencies [787c738]
201
+ - Updated dependencies [8396656]
202
+ - Updated dependencies [dbbd38a]
203
+ - Updated dependencies [8871c14]
204
+ - Updated dependencies [93fe362]
205
+ - Updated dependencies [dfc6975]
206
+ - Updated dependencies [3cf4de0]
207
+ - Updated dependencies [c9dc811]
208
+ - Updated dependencies [144ef9b]
209
+ - Updated dependencies [138ab04]
210
+ - Updated dependencies [a0b9e91]
211
+ - Updated dependencies [99bd015]
212
+ - Updated dependencies [21e4585]
213
+ - @object-ui/types@17.6.0
214
+ - @object-ui/fields@17.6.0
215
+ - @object-ui/i18n@17.6.0
216
+ - @object-ui/react@17.6.0
217
+ - @object-ui/plugin-detail@17.6.0
218
+ - @object-ui/components@17.6.0
219
+ - @object-ui/core@17.6.0
220
+
3
221
  ## 17.5.0
4
222
 
5
223
  ### Patch Changes