@rebasepro/cms 0.20.0 → 0.21.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.
- package/dist/{CollectionEditorDialog-DQjLtp1W.js → CollectionEditorDialog-C-A_NCKB.js} +15 -14
- package/dist/CollectionEditorDialog-C-A_NCKB.js.map +1 -0
- package/dist/JsonPreviewBinding-v0w3H0fp.js +35 -0
- package/dist/JsonPreviewBinding-v0w3H0fp.js.map +1 -0
- package/dist/{PropertyEditView-BMCCD2OI.js → PropertyEditView-Dv7496fx.js} +2 -57
- package/dist/{PropertyEditView-BMCCD2OI.js.map → PropertyEditView-Dv7496fx.js.map} +1 -1
- package/dist/{RouterCollectionsStudioView-DwsbIAqr.js → RouterCollectionsStudioView-DuDFEYuL.js} +4 -4
- package/dist/{RouterCollectionsStudioView-DwsbIAqr.js.map → RouterCollectionsStudioView-DuDFEYuL.js.map} +1 -1
- package/dist/collection_editor/ui/collection_editor/templates/blog_template.d.ts +126 -2
- package/dist/collection_editor/ui/collection_editor/templates/pages_template.d.ts +201 -2
- package/dist/collection_editor/ui/collection_editor/templates/products_template.d.ts +92 -2
- package/dist/collection_editor/ui/collection_editor/templates/users_template.d.ts +43 -2
- package/dist/collection_editor_ui.js +4 -4
- package/dist/components/CollectionViewBinding/CollectionViewStartActions.d.ts +6 -2
- package/dist/components/CollectionViewBinding/EntityCardBinding.d.ts +11 -1
- package/dist/components/DeleteEntityDialog.d.ts +11 -3
- package/dist/data_export/export/ExportCollectionAction.d.ts +1 -1
- package/dist/data_export/export/fetch_export_data.d.ts +10 -16
- package/dist/editor/editor.d.ts +1 -6
- package/dist/editor.js +1 -1
- package/dist/editor.js.map +1 -1
- package/dist/{export-DJoGYb89.js → export-DtSmLT6u.js} +54 -42
- package/dist/export-DtSmLT6u.js.map +1 -0
- package/dist/form/EntityForm.d.ts +1 -1
- package/dist/{history-BBpsdTrJ.js → history-C6kUDQ3f.js} +2 -2
- package/dist/{history-BBpsdTrJ.js.map → history-C6kUDQ3f.js.map} +1 -1
- package/dist/{import-C4VQ0rwO.js → import-BciQBH5t.js} +2 -2
- package/dist/{import-C4VQ0rwO.js.map → import-BciQBH5t.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/selection/SelectionMenu.d.ts +27 -0
- package/dist/selection/index.d.ts +2 -0
- package/dist/selection/resolve_selection.d.ts +62 -0
- package/dist/types/components/EntityFormProps.d.ts +13 -0
- package/dist/util/entity_pages.d.ts +36 -0
- package/dist/util/map_with_concurrency.d.ts +16 -0
- package/dist/{util-4oPxPkbp.js → util-h6jhiiBE.js} +674 -195
- package/dist/util-h6jhiiBE.js.map +1 -0
- package/package.json +9 -9
- package/dist/CollectionEditorDialog-DQjLtp1W.js.map +0 -1
- package/dist/export-DJoGYb89.js.map +0 -1
- package/dist/util-4oPxPkbp.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { User } from "@rebasepro/types";
|
|
3
3
|
import { CollectionActionsProps, AdminCollection } from "@rebasepro/cms-types";
|
|
4
|
-
export declare function ExportCollectionAction<M extends Record<string, unknown>, USER extends User>({ collection, path, collectionEntitiesCount, onAnalyticsEvent, exportAllowed, notAllowedView }: CollectionActionsProps<M, USER, AdminCollection<M>> & {
|
|
4
|
+
export declare function ExportCollectionAction<M extends Record<string, unknown>, USER extends User>({ collection, path, collectionEntitiesCount, selectionController, tableController, onAnalyticsEvent, exportAllowed, notAllowedView }: CollectionActionsProps<M, USER, AdminCollection<M>> & {
|
|
5
5
|
exportAllowed?: (props: {
|
|
6
6
|
collectionEntitiesCount: number;
|
|
7
7
|
path: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Entity, FindParams
|
|
1
|
+
import { Entity, FindParams } from "@rebasepro/types";
|
|
2
|
+
import { EntityPageAccessor } from "../../util/entity_pages.js";
|
|
2
3
|
/**
|
|
3
4
|
* Rows asked for per request.
|
|
4
5
|
*
|
|
@@ -19,9 +20,7 @@ export declare const EXPORT_PAGE_SIZE = 500;
|
|
|
19
20
|
export declare const MAX_EXPORT_ROWS = 100000;
|
|
20
21
|
export interface FetchAllForExportParams<M extends Record<string, unknown>> {
|
|
21
22
|
/** The collection accessor to read through — `dataClient.collection(path)`. */
|
|
22
|
-
accessor:
|
|
23
|
-
find(params?: FindParams<M>): Promise<FindResponse<M>>;
|
|
24
|
-
};
|
|
23
|
+
accessor: EntityPageAccessor<M>;
|
|
25
24
|
/** Query to export. The window (`limit` / `offset` / `page`) is owned by the walk. */
|
|
26
25
|
params?: Omit<FindParams<M>, "limit" | "offset" | "page">;
|
|
27
26
|
pageSize?: number;
|
|
@@ -30,19 +29,14 @@ export interface FetchAllForExportParams<M extends Record<string, unknown>> {
|
|
|
30
29
|
onProgress?: (loaded: number, total: number | undefined) => void;
|
|
31
30
|
}
|
|
32
31
|
/**
|
|
33
|
-
* Read **every** row matching a query,
|
|
32
|
+
* Read **every** row matching a query, for an export file.
|
|
34
33
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
34
|
+
* The export used to hand back the 50 rows an unwindowed `find({})` resolves to
|
|
35
|
+
* as `<collection>.csv`, with nothing saying it was a sample, next to a dialog
|
|
36
|
+
* warning that the collection had 100 000 documents. The walk is in
|
|
37
|
+
* {@link walkEntityPages}; what belongs to export is the ceiling — an export is
|
|
38
|
+
* built in memory and handed to a Blob — and what to say on hitting it.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
41
|
-
* by an empty page otherwise — never by comparing a page's length against the
|
|
42
|
-
* requested limit, since a final page that happens to be exactly full is
|
|
43
|
-
* indistinguishable that way and a walk that stops there drops rows.
|
|
44
|
-
*
|
|
45
|
-
* @throws When more than `maxRows` rows match. A truncated export is worse than
|
|
46
|
-
* no export: it is indistinguishable from a complete one.
|
|
40
|
+
* @throws When more than `maxRows` rows match.
|
|
47
41
|
*/
|
|
48
42
|
export declare function fetchAllEntitiesForExport<M extends Record<string, unknown>>({ accessor, params, pageSize, maxRows, onProgress }: FetchAllForExportParams<M>): Promise<Entity<M>[]>;
|
package/dist/editor/editor.d.ts
CHANGED
|
@@ -5,10 +5,6 @@ export type CustomEditorComponent = {
|
|
|
5
5
|
name: string;
|
|
6
6
|
component: React.FC;
|
|
7
7
|
};
|
|
8
|
-
export interface MarkdownEditorConfig {
|
|
9
|
-
html?: boolean;
|
|
10
|
-
transformPastedText?: boolean;
|
|
11
|
-
}
|
|
12
8
|
export type RichTextEditorTextSize = "sm" | "base" | "lg";
|
|
13
9
|
export type RichTextEditorProps = {
|
|
14
10
|
content?: JSONContent | string;
|
|
@@ -25,6 +21,5 @@ export type RichTextEditorProps = {
|
|
|
25
21
|
aiController?: EditorAIController;
|
|
26
22
|
customComponents?: CustomEditorComponent[];
|
|
27
23
|
disabled?: boolean;
|
|
28
|
-
markdownConfig?: MarkdownEditorConfig;
|
|
29
24
|
};
|
|
30
|
-
export declare const RichTextEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, disabled
|
|
25
|
+
export declare const RichTextEditor: ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize, highlight, handleImageUpload, aiController, disabled }: RichTextEditorProps) => React.JSX.Element;
|
package/dist/editor.js
CHANGED
|
@@ -2687,7 +2687,7 @@ var proseClasses = {
|
|
|
2687
2687
|
"base": "prose-base",
|
|
2688
2688
|
"lg": "prose-lg"
|
|
2689
2689
|
};
|
|
2690
|
-
var RichTextEditor = ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize = "base", highlight, handleImageUpload, aiController, disabled
|
|
2690
|
+
var RichTextEditor = ({ content, onJsonContentChange, onHtmlContentChange, onMarkdownContentChange, version, textSize = "base", highlight, handleImageUpload, aiController, disabled }) => {
|
|
2691
2691
|
const { t } = useTranslation();
|
|
2692
2692
|
const [openNode, setOpenNode] = useState(false);
|
|
2693
2693
|
const [openLink, setOpenLink] = useState(false);
|