@infuro/cms-core 1.0.24 → 1.0.25

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/admin.d.cts CHANGED
@@ -121,15 +121,28 @@ type CrudFilterOption = {
121
121
  value: string;
122
122
  label: string;
123
123
  };
124
+ type CrudFilterFieldType = "select" | "dateRange" | "text" | "number" | "multiSelect";
124
125
  type CrudFilterItem = {
125
126
  param: string;
126
127
  label: string;
127
- type: 'select' | 'dateRange' | 'text';
128
+ type: CrudFilterFieldType;
128
129
  options?: CrudFilterOption[];
129
130
  /** When set, merge runtime options from relation list fetch (id → label). */
130
131
  relationApi?: string;
131
132
  relationLabelField?: string;
132
133
  relationValueField?: string;
134
+ /**
135
+ * For `dateRange`: URL query keys (default `${param}From` / `${param}To`, e.g. `createdAtFrom`).
136
+ * Use explicit `dateFrom` / `dateTo` when `param` is `date` (legacy lists).
137
+ */
138
+ fromParam?: string;
139
+ toParam?: string;
140
+ /**
141
+ * For `number` filters: query keys for range (defaults `${param}Min`, `${param}Max`).
142
+ * List handlers must read these keys if server-side filtering is required.
143
+ */
144
+ minParam?: string;
145
+ maxParam?: string;
133
146
  };
134
147
 
135
148
  declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, manageUserGroups, }: {
@@ -156,15 +169,21 @@ type CreateEditFormProps = {
156
169
  apiEndpoint: string;
157
170
  columns: any[];
158
171
  existingData?: Record<string, unknown> | null;
172
+ /** When creating: pre-fill the modal from this row (POST only; omit `id` in payload). */
173
+ duplicateSeed?: Record<string, unknown> | null;
159
174
  };
160
- declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
175
+ declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, duplicateSeed, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
161
176
 
162
- declare function FormBuilder({ formId }: {
177
+ declare function FormBuilder({ formId, duplicateFromId, }: {
163
178
  formId?: string;
179
+ /** When creating (`!formId`), load this id and clone into a new form. */
180
+ duplicateFromId?: string;
164
181
  }): react_jsx_runtime.JSX.Element;
165
182
 
166
- declare function BlogEditor({ existingBlog }: {
183
+ declare function BlogEditor({ existingBlog, duplicateSource, }: {
167
184
  existingBlog?: any;
185
+ /** Loaded row to copy into a new post (save always POSTs). */
186
+ duplicateSource?: any;
168
187
  }): react_jsx_runtime.JSX.Element;
169
188
 
170
189
  interface AnalyticsChartProps {
package/dist/admin.d.ts CHANGED
@@ -121,15 +121,28 @@ type CrudFilterOption = {
121
121
  value: string;
122
122
  label: string;
123
123
  };
124
+ type CrudFilterFieldType = "select" | "dateRange" | "text" | "number" | "multiSelect";
124
125
  type CrudFilterItem = {
125
126
  param: string;
126
127
  label: string;
127
- type: 'select' | 'dateRange' | 'text';
128
+ type: CrudFilterFieldType;
128
129
  options?: CrudFilterOption[];
129
130
  /** When set, merge runtime options from relation list fetch (id → label). */
130
131
  relationApi?: string;
131
132
  relationLabelField?: string;
132
133
  relationValueField?: string;
134
+ /**
135
+ * For `dateRange`: URL query keys (default `${param}From` / `${param}To`, e.g. `createdAtFrom`).
136
+ * Use explicit `dateFrom` / `dateTo` when `param` is `date` (legacy lists).
137
+ */
138
+ fromParam?: string;
139
+ toParam?: string;
140
+ /**
141
+ * For `number` filters: query keys for range (defaults `${param}Min`, `${param}Max`).
142
+ * List handlers must read these keys if server-side filtering is required.
143
+ */
144
+ minParam?: string;
145
+ maxParam?: string;
133
146
  };
134
147
 
135
148
  declare function AdminCRUD({ title, apiEndpoint, columns, addEditPageUrl, customViewPageUrl, defaultSortField, defaultSortOrder, filters, filterColumns, extraListParams, manageUserGroups, }: {
@@ -156,15 +169,21 @@ type CreateEditFormProps = {
156
169
  apiEndpoint: string;
157
170
  columns: any[];
158
171
  existingData?: Record<string, unknown> | null;
172
+ /** When creating: pre-fill the modal from this row (POST only; omit `id` in payload). */
173
+ duplicateSeed?: Record<string, unknown> | null;
159
174
  };
160
- declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
175
+ declare function CreateEditForm({ isOpen, onClose, onSaveSuccess, apiEndpoint, columns, existingData, duplicateSeed, }: CreateEditFormProps): react_jsx_runtime.JSX.Element | null;
161
176
 
162
- declare function FormBuilder({ formId }: {
177
+ declare function FormBuilder({ formId, duplicateFromId, }: {
163
178
  formId?: string;
179
+ /** When creating (`!formId`), load this id and clone into a new form. */
180
+ duplicateFromId?: string;
164
181
  }): react_jsx_runtime.JSX.Element;
165
182
 
166
- declare function BlogEditor({ existingBlog }: {
183
+ declare function BlogEditor({ existingBlog, duplicateSource, }: {
167
184
  existingBlog?: any;
185
+ /** Loaded row to copy into a new post (save always POSTs). */
186
+ duplicateSource?: any;
168
187
  }): react_jsx_runtime.JSX.Element;
169
188
 
170
189
  interface AnalyticsChartProps {