@thebes/cadmea 1.1.1 → 1.2.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.
@@ -1,5 +1,5 @@
1
- import { JSX } from "solid-js";
2
1
  import { CollectionConfig, EditRef } from "@thebes/cadmus/cms";
2
+ import { JSX } from "solid-js";
3
3
  import { ImageCrop, ImageHotspot } from "@thebes/cadmus/storage";
4
4
 
5
5
  //#region src/capabilities.d.ts
@@ -107,11 +107,10 @@ interface CollectionEditProps {
107
107
  url: string;
108
108
  }>;
109
109
  /**
110
- * Options for `relationship` fields (hasMany:false only — see
111
- * RelationshipFieldConfig's `hasMany` caveat), keyed by the field's
112
- * `relationTo` collection slug. `CollectionEdit` can't query another
113
- * collection itself, so the consuming route fetches the related rows
114
- * and passes them in.
110
+ * Options for `relationship` fields (both single and `hasMany`), keyed by
111
+ * the field's `relationTo` collection slug. `CollectionEdit` can't query
112
+ * another collection itself, so the consuming route fetches the related
113
+ * rows and passes them in; the field renders them as a searchable combobox.
115
114
  */
116
115
  relationshipOptions?: Partial<Record<string, RelationshipOption[]>>;
117
116
  /**
@@ -140,10 +139,11 @@ interface CollectionEditProps {
140
139
  declare function CollectionEdit(props: CollectionEditProps): JSX.Element;
141
140
  //#endregion
142
141
  //#region src/CollectionList.d.ts
142
+ type Row = Record<string, unknown>;
143
143
  interface CollectionListProps {
144
144
  config: CollectionConfig;
145
- rows: Record<string, unknown>[];
146
- onRowClick?: (row: Record<string, unknown>) => void;
145
+ rows: Row[];
146
+ onRowClick?: (row: Row) => void;
147
147
  /**
148
148
  * 1-based current page. Omit (along with `pageSize`) to render without
149
149
  * the pagination bar entirely — list views with no `find()` paging