skedyul 0.1.103 → 0.1.105

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/.build-stamp CHANGED
@@ -1 +1 @@
1
- 1769150392679
1
+ 1769221508711
package/dist/config.d.ts CHANGED
@@ -141,7 +141,7 @@ export interface WorkflowDefinition {
141
141
  actions: WorkflowAction[];
142
142
  }
143
143
  export type PageType = 'INSTANCE' | 'LIST';
144
- export type PageBlockType = 'form' | 'spreadsheet' | 'kanban' | 'calendar' | 'link' | 'list';
144
+ export type PageBlockType = 'form' | 'spreadsheet' | 'kanban' | 'calendar' | 'link' | 'list' | 'card';
145
145
  export type PageFieldType = 'STRING' | 'FILE' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'SELECT' | 'FORM' | 'RELATIONSHIP';
146
146
  export interface PageFieldSource {
147
147
  model: string;
@@ -163,6 +163,204 @@ export interface PageActionDefinition {
163
163
  /** Whether the action is hidden - boolean or Liquid template string */
164
164
  isHidden?: boolean | string;
165
165
  }
166
+ /** Base style props for FormV2 components */
167
+ export interface FormV2StyleProps {
168
+ id: string;
169
+ row: number;
170
+ col: number;
171
+ className?: string;
172
+ hidden?: boolean;
173
+ }
174
+ /** Button props for FieldSetting component */
175
+ export interface FieldSettingButtonProps {
176
+ label: string;
177
+ variant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
178
+ size?: 'default' | 'sm' | 'lg' | 'icon';
179
+ isLoading?: boolean;
180
+ isDisabled?: boolean;
181
+ }
182
+ /** Relationship extension for dynamic data loading */
183
+ export interface RelationshipExtension {
184
+ model: string;
185
+ }
186
+ /** Modal form definition for nested forms (handled by skedyul-web, not skedyul-ui) */
187
+ export interface ModalFormDefinition {
188
+ header: PageFormHeader;
189
+ handler: string;
190
+ fields: FormV2ComponentDefinition[];
191
+ layout: FormLayoutConfigDefinition;
192
+ actions: PageActionDefinition[];
193
+ }
194
+ /** Input component definition */
195
+ export interface InputComponentDefinition extends FormV2StyleProps {
196
+ component: 'Input';
197
+ props: {
198
+ label?: string;
199
+ placeholder?: string;
200
+ type?: 'text' | 'number' | 'email' | 'password' | 'tel' | 'url';
201
+ required?: boolean;
202
+ disabled?: boolean;
203
+ value?: string | number;
204
+ };
205
+ }
206
+ /** Textarea component definition */
207
+ export interface TextareaComponentDefinition extends FormV2StyleProps {
208
+ component: 'Textarea';
209
+ props: {
210
+ label?: string;
211
+ placeholder?: string;
212
+ required?: boolean;
213
+ disabled?: boolean;
214
+ value?: string;
215
+ };
216
+ }
217
+ /** Select component definition */
218
+ export interface SelectComponentDefinition extends FormV2StyleProps {
219
+ component: 'Select';
220
+ props: {
221
+ label?: string;
222
+ placeholder?: string;
223
+ items?: Array<{
224
+ value: string;
225
+ label: string;
226
+ }>;
227
+ value?: string;
228
+ isDisabled?: boolean;
229
+ };
230
+ /** For relationship-based selects */
231
+ relationship?: RelationshipExtension;
232
+ }
233
+ /** Combobox component definition */
234
+ export interface ComboboxComponentDefinition extends FormV2StyleProps {
235
+ component: 'Combobox';
236
+ props: {
237
+ label?: string;
238
+ placeholder?: string;
239
+ items?: Array<{
240
+ value: string;
241
+ label: string;
242
+ }>;
243
+ value?: string;
244
+ };
245
+ /** For relationship-based comboboxes */
246
+ relationship?: RelationshipExtension;
247
+ }
248
+ /** Checkbox component definition */
249
+ export interface CheckboxComponentDefinition extends FormV2StyleProps {
250
+ component: 'Checkbox';
251
+ props: {
252
+ label?: string;
253
+ checked?: boolean;
254
+ disabled?: boolean;
255
+ };
256
+ }
257
+ /** DatePicker component definition */
258
+ export interface DatePickerComponentDefinition extends FormV2StyleProps {
259
+ component: 'DatePicker';
260
+ props: {
261
+ label?: string;
262
+ value?: string | Date;
263
+ disabled?: boolean;
264
+ };
265
+ }
266
+ /** TimePicker component definition */
267
+ export interface TimePickerComponentDefinition extends FormV2StyleProps {
268
+ component: 'TimePicker';
269
+ props: {
270
+ label?: string;
271
+ value?: string;
272
+ disabled?: boolean;
273
+ };
274
+ }
275
+ /** FieldSetting component definition (button that can open modal) */
276
+ export interface FieldSettingComponentDefinition extends FormV2StyleProps {
277
+ component: 'FieldSetting';
278
+ props: {
279
+ label: string;
280
+ description?: string;
281
+ mode?: 'field' | 'setting';
282
+ button: FieldSettingButtonProps;
283
+ };
284
+ /** Nested modal form (handled by skedyul-web) */
285
+ modalForm?: ModalFormDefinition;
286
+ }
287
+ /** ImageSetting component definition */
288
+ export interface ImageSettingComponentDefinition extends FormV2StyleProps {
289
+ component: 'ImageSetting';
290
+ props: {
291
+ label?: string;
292
+ description?: string;
293
+ accept?: string;
294
+ };
295
+ }
296
+ /** List component definition */
297
+ export interface ListComponentDefinition extends FormV2StyleProps {
298
+ component: 'List';
299
+ props: {
300
+ items?: Array<{
301
+ id: string;
302
+ label: string;
303
+ description?: string;
304
+ }>;
305
+ emptyMessage?: string;
306
+ };
307
+ /** Model to fetch list items from */
308
+ model?: string;
309
+ labelField?: string;
310
+ descriptionField?: string;
311
+ icon?: string;
312
+ }
313
+ /** EmptyForm component definition */
314
+ export interface EmptyFormComponentDefinition extends FormV2StyleProps {
315
+ component: 'EmptyForm';
316
+ props: {
317
+ title?: string;
318
+ description?: string;
319
+ icon?: string;
320
+ };
321
+ }
322
+ /** Union of all FormV2 component definitions */
323
+ export type FormV2ComponentDefinition = InputComponentDefinition | TextareaComponentDefinition | SelectComponentDefinition | ComboboxComponentDefinition | CheckboxComponentDefinition | DatePickerComponentDefinition | TimePickerComponentDefinition | FieldSettingComponentDefinition | ImageSettingComponentDefinition | ListComponentDefinition | EmptyFormComponentDefinition;
324
+ /** Layout column definition */
325
+ export interface FormLayoutColumnDefinition {
326
+ field: string;
327
+ colSpan: number;
328
+ dataType?: string;
329
+ subQuery?: unknown;
330
+ }
331
+ /** Layout row definition */
332
+ export interface FormLayoutRowDefinition {
333
+ columns: FormLayoutColumnDefinition[];
334
+ }
335
+ /** FormLayoutConfig definition (mirrors skedyul-ui FormLayoutConfig) */
336
+ export interface FormLayoutConfigDefinition {
337
+ type: 'form';
338
+ rows: FormLayoutRowDefinition[];
339
+ }
340
+ /** FormV2 props definition */
341
+ export interface FormV2PropsDefinition {
342
+ formVersion: 'v2';
343
+ id?: string;
344
+ fields: FormV2ComponentDefinition[];
345
+ layout: FormLayoutConfigDefinition;
346
+ }
347
+ /** Card block header definition */
348
+ export interface CardBlockHeader {
349
+ title: string;
350
+ description?: string;
351
+ descriptionHref?: string;
352
+ }
353
+ /** Card block definition (CardV2-aligned) */
354
+ export interface CardBlockDefinition {
355
+ type: 'card';
356
+ /** Disable drag-and-drop in the form */
357
+ restructurable?: boolean;
358
+ header?: CardBlockHeader;
359
+ form: FormV2PropsDefinition;
360
+ actions?: PageActionDefinition[];
361
+ secondaryActions?: PageActionDefinition[];
362
+ primaryActions?: PageActionDefinition[];
363
+ }
166
364
  export interface PageFieldDefinition {
167
365
  handle: string;
168
366
  type: PageFieldType;
@@ -182,22 +380,30 @@ export interface PageFieldDefinition {
182
380
  /** Target internal model handle for RELATIONSHIP type fields */
183
381
  model?: string;
184
382
  }
185
- export interface PageBlockDefinition {
186
- type: PageBlockType;
383
+ /** Legacy form block definition */
384
+ export interface LegacyFormBlockDefinition {
385
+ type: 'form' | 'spreadsheet' | 'kanban' | 'calendar' | 'link';
187
386
  title?: string;
188
387
  fields?: PageFieldDefinition[];
189
388
  readonly?: boolean;
190
- /** For list block type: Model handle to fetch instances from */
191
- model?: string;
192
- /** For list block type: Field to use as the tile label */
389
+ }
390
+ /** List block definition */
391
+ export interface ListBlockDefinition {
392
+ type: 'list';
393
+ title?: string;
394
+ /** Model handle to fetch instances from */
395
+ model: string;
396
+ /** Field to use as the tile label */
193
397
  labelField?: string;
194
- /** For list block type: Field to use as the tile description */
398
+ /** Field to use as the tile description */
195
399
  descriptionField?: string;
196
- /** For list block type: Icon for each tile */
400
+ /** Icon for each tile */
197
401
  icon?: string;
198
- /** For list block type: Message when no items */
402
+ /** Message when no items */
199
403
  emptyMessage?: string;
200
404
  }
405
+ /** Union of all block types */
406
+ export type PageBlockDefinition = CardBlockDefinition | LegacyFormBlockDefinition | ListBlockDefinition;
201
407
  export interface PageInstanceFilter {
202
408
  model: string;
203
409
  where?: Record<string, unknown>;