@dosgato/templating 0.0.137 → 0.0.139

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.
@@ -217,8 +217,11 @@ export interface APIDataTemplate<DataType extends DataData = any> extends APITem
217
217
  * Whatever is returned from this function will be further processed to fit well in a path -
218
218
  * i.e. lower-cased and non-word characters replaced by a dash. If there is a duplicate data
219
219
  * entry in the same folder, it will be automatically numerated.
220
+ *
221
+ * If you return undefined or an empty string, the name `item-1` will be used, which will
222
+ * then be numerated as necessary.
220
223
  */
221
- computeName: (data: DataType) => string;
224
+ computeName: (data: DataType) => string | undefined;
222
225
  }
223
226
  export type APIAnyTemplate = APIComponentTemplate | APIPageTemplate | APIDataTemplate;
224
227
  /**
@@ -111,8 +111,10 @@ export interface UITemplate extends UITemplateBase {
111
111
  }
112
112
  export interface UITemplateData extends UITemplateBase {
113
113
  /**
114
- * Without configuration, only data entry names and modified dates are shown
115
- * in the list view. Use this to configure your own set of columns.
114
+ * Add extra columns between name and published status.
115
+ *
116
+ * Without configuration, only data entry name, published status, and modified info
117
+ * is shown in the list view.
116
118
  */
117
119
  columns?: {
118
120
  /**
@@ -131,6 +133,18 @@ export interface UITemplateData extends UITemplateBase {
131
133
  * An icon for the cell in all regular rows (not the header).
132
134
  */
133
135
  icon?: (data: DataData) => IconOrSVG;
136
+ /**
137
+ * Set a fixed width for this column
138
+ *
139
+ * For example, "50px", "12em", or "10vw"
140
+ */
141
+ fixed?: string;
142
+ /**
143
+ * Set a dynamic width for this column as a ratio of the name column
144
+ *
145
+ * For example, 0.5 = half the name column, 2 = double the name column
146
+ */
147
+ grow?: number;
134
148
  }[];
135
149
  }
136
150
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "0.0.137",
3
+ "version": "0.0.139",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {