@firecms/core 3.0.0-canary.190 → 3.0.0-canary.192
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/core/EntityEditView.d.ts +1 -2
- package/dist/core/EntityEditViewFormActions.d.ts +2 -0
- package/dist/core/SideDialogs.d.ts +4 -2
- package/dist/{core → form}/EntityForm.d.ts +6 -4
- package/dist/form/EntityFormActions.d.ts +16 -0
- package/dist/form/index.d.ts +16 -16
- package/dist/index.es.js +2391 -2292
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +2783 -2684
- package/dist/index.umd.js.map +1 -1
- package/dist/types/fields.d.ts +0 -6
- package/package.json +5 -5
- package/src/components/EntityCollectionTable/internal/popup_field/PopupFormField.tsx +2 -10
- package/src/core/EntityEditView.tsx +14 -85
- package/src/core/EntityEditViewFormActions.tsx +198 -0
- package/src/core/EntitySidePanel.tsx +8 -1
- package/src/core/SideDialogs.tsx +16 -12
- package/src/{core → form}/EntityForm.tsx +37 -243
- package/src/form/EntityFormActions.tsx +168 -0
- package/src/form/index.tsx +16 -32
- package/src/internal/useBuildSideEntityController.tsx +0 -52
- package/src/types/fields.tsx +0 -7
package/src/form/index.tsx
CHANGED
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import { MultiSelectFieldBinding } from "./field_bindings/MultiSelectFieldBinding";
|
|
3
|
-
import { ArrayOfReferencesFieldBinding } from "./field_bindings/ArrayOfReferencesFieldBinding";
|
|
4
|
-
import { StorageUploadFieldBinding } from "./field_bindings/StorageUploadFieldBinding";
|
|
5
|
-
import { TextFieldBinding } from "./field_bindings/TextFieldBinding";
|
|
6
|
-
import { SwitchFieldBinding } from "./field_bindings/SwitchFieldBinding";
|
|
7
|
-
import { DateTimeFieldBinding } from "./field_bindings/DateTimeFieldBinding";
|
|
8
|
-
import { ReferenceFieldBinding } from "./field_bindings/ReferenceFieldBinding";
|
|
9
|
-
import { MapFieldBinding } from "./field_bindings/MapFieldBinding";
|
|
10
|
-
import { KeyValueFieldBinding } from "./field_bindings/KeyValueFieldBinding";
|
|
11
|
-
import { RepeatFieldBinding } from "./field_bindings/RepeatFieldBinding";
|
|
12
|
-
import { BlockFieldBinding } from "./field_bindings/BlockFieldBinding";
|
|
13
|
-
import { ReadOnlyFieldBinding } from "./field_bindings/ReadOnlyFieldBinding";
|
|
14
|
-
import { MarkdownEditorFieldBinding } from "./field_bindings/MarkdownEditorFieldBinding";
|
|
15
|
-
import { ArrayCustomShapedFieldBinding } from "./field_bindings/ArrayCustomShapedFieldBinding";
|
|
1
|
+
export * from "./EntityForm";
|
|
16
2
|
|
|
17
|
-
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
TextFieldBinding
|
|
33
|
-
};
|
|
3
|
+
export { SelectFieldBinding } from "./field_bindings/SelectFieldBinding";
|
|
4
|
+
export { MultiSelectFieldBinding } from "./field_bindings/MultiSelectFieldBinding";
|
|
5
|
+
export { ArrayOfReferencesFieldBinding } from "./field_bindings/ArrayOfReferencesFieldBinding";
|
|
6
|
+
export { StorageUploadFieldBinding } from "./field_bindings/StorageUploadFieldBinding";
|
|
7
|
+
export { TextFieldBinding } from "./field_bindings/TextFieldBinding";
|
|
8
|
+
export { SwitchFieldBinding } from "./field_bindings/SwitchFieldBinding";
|
|
9
|
+
export { DateTimeFieldBinding } from "./field_bindings/DateTimeFieldBinding";
|
|
10
|
+
export { ReferenceFieldBinding } from "./field_bindings/ReferenceFieldBinding";
|
|
11
|
+
export { MapFieldBinding } from "./field_bindings/MapFieldBinding";
|
|
12
|
+
export { KeyValueFieldBinding } from "./field_bindings/KeyValueFieldBinding";
|
|
13
|
+
export { RepeatFieldBinding } from "./field_bindings/RepeatFieldBinding";
|
|
14
|
+
export { BlockFieldBinding } from "./field_bindings/BlockFieldBinding";
|
|
15
|
+
export { ReadOnlyFieldBinding } from "./field_bindings/ReadOnlyFieldBinding";
|
|
16
|
+
export { MarkdownEditorFieldBinding } from "./field_bindings/MarkdownEditorFieldBinding";
|
|
17
|
+
export { ArrayCustomShapedFieldBinding } from "./field_bindings/ArrayCustomShapedFieldBinding";
|
|
34
18
|
|
|
35
19
|
export * from "./components";
|
|
36
20
|
|
|
@@ -244,58 +244,6 @@ export function buildSidePanelsFromUrl(path: string, collections: EntityCollecti
|
|
|
244
244
|
return sidePanel ? [sidePanel] : [];
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
-
// export function buildSidePanelsFromUrl(path: string, collections: EntityCollection[], newFlag: boolean): EntitySidePanelProps<any>[] {
|
|
248
|
-
//
|
|
249
|
-
// const navigationViewsForPath: NavigationViewInternal<any>[] = getNavigationEntriesFromPathInternal({
|
|
250
|
-
// path,
|
|
251
|
-
// collections
|
|
252
|
-
// });
|
|
253
|
-
//
|
|
254
|
-
// const sidePanels: EntitySidePanelProps<any>[] = [];
|
|
255
|
-
// let lastCollectionPath = "";
|
|
256
|
-
// for (let i = 0; i < navigationViewsForPath.length; i++) {
|
|
257
|
-
// const navigationEntry = navigationViewsForPath[i];
|
|
258
|
-
//
|
|
259
|
-
// if (navigationEntry.type === "collection") {
|
|
260
|
-
// lastCollectionPath = navigationEntry.path;
|
|
261
|
-
// }
|
|
262
|
-
//
|
|
263
|
-
// if (i > 0) { // the first collection is handled by the main navigation
|
|
264
|
-
// const previousEntry = navigationViewsForPath[i - 1];
|
|
265
|
-
// if (navigationEntry.type === "entity") {
|
|
266
|
-
// sidePanels.push({
|
|
267
|
-
// path: navigationEntry.path,
|
|
268
|
-
// entityId: navigationEntry.entityId,
|
|
269
|
-
// copy: false,
|
|
270
|
-
// width: navigationEntry.parentCollection?.sideDialogWidth
|
|
271
|
-
// }
|
|
272
|
-
// );
|
|
273
|
-
// } else if (navigationEntry.type === "custom_view") {
|
|
274
|
-
// if (previousEntry.type === "entity") {
|
|
275
|
-
// const lastSidePanel: EntitySidePanelProps<any> = sidePanels[sidePanels.length - 1];
|
|
276
|
-
// if (lastSidePanel)
|
|
277
|
-
// lastSidePanel.selectedTab = navigationEntry.view.key;
|
|
278
|
-
// }
|
|
279
|
-
// } else if (navigationEntry.type === "collection") {
|
|
280
|
-
// if (previousEntry.type === "entity") {
|
|
281
|
-
// const lastSidePanel: EntitySidePanelProps<any> = sidePanels[sidePanels.length - 1];
|
|
282
|
-
// if (lastSidePanel)
|
|
283
|
-
// lastSidePanel.selectedTab = navigationEntry.collection.id ?? navigationEntry.collection.path;
|
|
284
|
-
// }
|
|
285
|
-
// }
|
|
286
|
-
// }
|
|
287
|
-
//
|
|
288
|
-
// }
|
|
289
|
-
//
|
|
290
|
-
// if (newFlag) {
|
|
291
|
-
// sidePanels.push({
|
|
292
|
-
// path: lastCollectionPath,
|
|
293
|
-
// copy: false
|
|
294
|
-
// });
|
|
295
|
-
// }
|
|
296
|
-
//
|
|
297
|
-
// return sidePanels;
|
|
298
|
-
// }
|
|
299
247
|
|
|
300
248
|
const propsToSidePanel = (props: EntitySidePanelProps,
|
|
301
249
|
buildUrlCollectionPath: (path: string) => string,
|
package/src/types/fields.tsx
CHANGED
|
@@ -170,13 +170,6 @@ export interface FormContext<M extends Record<string, any> = any> {
|
|
|
170
170
|
|
|
171
171
|
openEntityMode: "side_panel" | "full_screen";
|
|
172
172
|
|
|
173
|
-
/**
|
|
174
|
-
* If pending close is set to true, the form will close when the user
|
|
175
|
-
* saves the entity
|
|
176
|
-
* @param pendingClose
|
|
177
|
-
*/
|
|
178
|
-
setPendingClose?: (pendingClose: boolean) => void;
|
|
179
|
-
|
|
180
173
|
/**
|
|
181
174
|
* This is the underlying formex controller that powers the form
|
|
182
175
|
*/
|