primitive-app 2.1.3 → 2.1.6
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/components/shared/DeleteConfirmationDialog.vue.d.ts +8 -2
- package/dist/components/shared/DeleteConfirmationDialog.vue.d.ts.map +1 -1
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/calendar/Calendar.vue.d.ts.map +1 -1
- package/dist/components/ui/dialog/DialogOverlay.vue.d.ts.map +1 -1
- package/dist/components/ui/native-select/NativeSelectOptGroup.vue.d.ts +4 -4
- package/dist/components/ui/native-select/NativeSelectOption.vue.d.ts +4 -4
- package/dist/dev-tools/blob-explorer/BlobDetailPanel.vue.d.ts +17 -0
- package/dist/dev-tools/blob-explorer/BlobDetailPanel.vue.d.ts.map +1 -0
- package/dist/dev-tools/blob-explorer/BlobExplorerDocumentSidebar.vue.d.ts +14 -0
- package/dist/dev-tools/blob-explorer/BlobExplorerDocumentSidebar.vue.d.ts.map +1 -0
- package/dist/dev-tools/blob-explorer/BlobExplorerIndex.vue.d.ts +4 -0
- package/dist/dev-tools/blob-explorer/BlobExplorerIndex.vue.d.ts.map +1 -0
- package/dist/dev-tools/blob-explorer/BlobTablePanel.vue.d.ts +30 -0
- package/dist/dev-tools/blob-explorer/BlobTablePanel.vue.d.ts.map +1 -0
- package/dist/dev-tools/blob-explorer/BlobUploadDialog.vue.d.ts +13 -0
- package/dist/dev-tools/blob-explorer/BlobUploadDialog.vue.d.ts.map +1 -0
- package/dist/dev-tools/blob-explorer/blobExplorerTypes.d.ts +17 -0
- package/dist/dev-tools/blob-explorer/blobExplorerTypes.d.ts.map +1 -0
- package/dist/dev-tools/blob-explorer/blobExplorerUtils.d.ts +11 -0
- package/dist/dev-tools/blob-explorer/blobExplorerUtils.d.ts.map +1 -0
- package/dist/dev-tools/blob-explorer/useBlobExplorer.d.ts +35 -0
- package/dist/dev-tools/blob-explorer/useBlobExplorer.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/DocumentExplorerIndex.vue.d.ts.map +1 -1
- package/dist/dev-tools/document-explorer/DocumentExplorerModel.vue.d.ts +4 -0
- package/dist/dev-tools/document-explorer/DocumentExplorerModel.vue.d.ts.map +1 -1
- package/dist/dev-tools/document-explorer/buildModelRegistry.d.ts +7 -0
- package/dist/dev-tools/document-explorer/buildModelRegistry.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/DocumentAliasesSection.vue.d.ts +8 -0
- package/dist/dev-tools/document-explorer/components/DocumentAliasesSection.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/DocumentListPanel.vue.d.ts +37 -0
- package/dist/dev-tools/document-explorer/components/DocumentListPanel.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/DocumentListSection.vue.d.ts +33 -0
- package/dist/dev-tools/document-explorer/components/DocumentListSection.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/DocumentPropertiesPanel.vue.d.ts +20 -0
- package/dist/dev-tools/document-explorer/components/DocumentPropertiesPanel.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/DocumentSharingSection.vue.d.ts +8 -0
- package/dist/dev-tools/document-explorer/components/DocumentSharingSection.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/{DocumentSidebar.vue.d.ts → components/DocumentSidebar.vue.d.ts} +2 -2
- package/dist/dev-tools/document-explorer/components/DocumentSidebar.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/DocumentTagsSection.vue.d.ts +16 -0
- package/dist/dev-tools/document-explorer/components/DocumentTagsSection.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/FilterBar.vue.d.ts +29 -0
- package/dist/dev-tools/document-explorer/components/FilterBar.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/InvitationPropertiesPanel.vue.d.ts +14 -0
- package/dist/dev-tools/document-explorer/components/InvitationPropertiesPanel.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/ModelHeader.vue.d.ts +29 -0
- package/dist/dev-tools/document-explorer/components/ModelHeader.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/ModelPaginationBar.vue.d.ts +16 -0
- package/dist/dev-tools/document-explorer/components/ModelPaginationBar.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/RecordFormFields.vue.d.ts +35 -0
- package/dist/dev-tools/document-explorer/components/RecordFormFields.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/components/RecordTable.vue.d.ts +35 -0
- package/dist/dev-tools/document-explorer/components/RecordTable.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/composables/useDevToolsToast.d.ts +12 -0
- package/dist/dev-tools/document-explorer/composables/useDevToolsToast.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/composables/useModelPagination.d.ts +35 -0
- package/dist/dev-tools/document-explorer/composables/useModelPagination.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/composables/useOptimisticList.d.ts +42 -0
- package/dist/dev-tools/document-explorer/composables/useOptimisticList.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/composables/useRecordCrud.d.ts +32 -0
- package/dist/dev-tools/document-explorer/composables/useRecordCrud.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/constants.d.ts +19 -0
- package/dist/dev-tools/document-explorer/constants.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/dialogs/CreateDocumentDialog.vue.d.ts +14 -0
- package/dist/dev-tools/document-explorer/dialogs/CreateDocumentDialog.vue.d.ts.map +1 -0
- package/dist/dev-tools/document-explorer/documentExplorerStore.d.ts +14 -2
- package/dist/dev-tools/document-explorer/documentExplorerStore.d.ts.map +1 -1
- package/dist/dev-tools/document-explorer/index.d.ts +5 -4
- package/dist/dev-tools/document-explorer/index.d.ts.map +1 -1
- package/dist/dev-tools/document-explorer/types.d.ts +86 -3
- package/dist/dev-tools/document-explorer/types.d.ts.map +1 -1
- package/dist/dev-tools/document-explorer/utils.d.ts +48 -1
- package/dist/dev-tools/document-explorer/utils.d.ts.map +1 -1
- package/dist/dev-tools/index.d.ts +7 -14
- package/dist/dev-tools/index.d.ts.map +1 -1
- package/dist/dev-tools/test-harness/TestRunner.vue.d.ts +0 -6
- package/dist/dev-tools/test-harness/TestRunner.vue.d.ts.map +1 -1
- package/dist/dev-tools/test-harness/lib.d.ts +4 -2
- package/dist/dev-tools/test-harness/lib.d.ts.map +1 -1
- package/dist/dev-tools/vite-plugin/DevToolsFloatingButton.vue.d.ts +2 -0
- package/dist/dev-tools/vite-plugin/DevToolsFloatingButton.vue.d.ts.map +1 -1
- package/dist/dev-tools/vite-plugin/DevToolsOverlay.vue.d.ts.map +1 -1
- package/dist/dev-tools/vite-plugin/DevToolsRoot.vue.d.ts +2 -0
- package/dist/dev-tools/vite-plugin/DevToolsRoot.vue.d.ts.map +1 -1
- package/dist/dev-tools/vite-plugin/index.cjs +12 -9
- package/dist/dev-tools/vite-plugin/index.js +36 -26
- package/dist/dev-tools/vite-plugin/plugin.d.ts +14 -0
- package/dist/dev-tools/vite-plugin/plugin.d.ts.map +1 -1
- package/dist/index.cjs +5 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15869 -19701
- package/dist/primitive-app.css +1 -0
- package/dist/services/JsBaoClientService.d.ts +77 -0
- package/dist/services/JsBaoClientService.d.ts.map +1 -1
- package/package.json +3 -2
- package/dist/dev-tools/document-explorer/DocumentSidebar.vue.d.ts.map +0 -1
- package/dist/dev-tools/document-explorer/dialogs/MassDeleteDocsDialog.vue.d.ts +0 -29
- package/dist/dev-tools/document-explorer/dialogs/MassDeleteDocsDialog.vue.d.ts.map +0 -1
- package/dist/dev-tools/document-explorer/dialogs/MassDeleteRecordsDialog.vue.d.ts +0 -32
- package/dist/dev-tools/document-explorer/dialogs/MassDeleteRecordsDialog.vue.d.ts.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ModelInfo } from "../types";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Currently selected model */
|
|
4
|
+
currentModel: ModelInfo | undefined;
|
|
5
|
+
/** Raw model name prop (used as fallback) */
|
|
6
|
+
modelName: string;
|
|
7
|
+
/** All registered models */
|
|
8
|
+
models: ModelInfo[];
|
|
9
|
+
/** Per-model record counts */
|
|
10
|
+
modelCounts: Record<string, number>;
|
|
11
|
+
/** Whether the user has write permission */
|
|
12
|
+
canWrite: boolean;
|
|
13
|
+
/** Number of selected records */
|
|
14
|
+
selectedCount: number;
|
|
15
|
+
}
|
|
16
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
17
|
+
"switch-model": (name: string) => any;
|
|
18
|
+
"open-create": () => any;
|
|
19
|
+
"clear-selection": () => any;
|
|
20
|
+
"open-bulk-delete": () => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
22
|
+
"onSwitch-model"?: ((name: string) => any) | undefined;
|
|
23
|
+
"onOpen-create"?: (() => any) | undefined;
|
|
24
|
+
"onClear-selection"?: (() => any) | undefined;
|
|
25
|
+
"onOpen-bulk-delete"?: (() => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const _default: typeof __VLS_export;
|
|
28
|
+
export default _default;
|
|
29
|
+
//# sourceMappingURL=ModelHeader.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelHeader.vue.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/components/ModelHeader.vue"],"names":[],"mappings":"AA0gBA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,UAAU,CAAC;AAGtD,UAAU,KAAK;IACb,+BAA+B;IAC/B,YAAY,EAAE,SAAS,GAAG,SAAS,CAAC;IACpC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,8BAA8B;IAC9B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAC;CACvB;AAoxBD,QAAA,MAAM,YAAY;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
currentPage: number;
|
|
3
|
+
totalCount: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
totalPages: number;
|
|
6
|
+
}
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"go-to-page": (page: number) => any;
|
|
9
|
+
"change-page-size": (size: number) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
11
|
+
"onGo-to-page"?: ((page: number) => any) | undefined;
|
|
12
|
+
"onChange-page-size"?: ((size: number) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
//# sourceMappingURL=ModelPaginationBar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelPaginationBar.vue.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/components/ModelPaginationBar.vue"],"names":[],"mappings":"AA+NA,UAAU,KAAK;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AA6UD,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ModelInfo } from "../types";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** The model info for field metadata */
|
|
4
|
+
modelInfo: ModelInfo;
|
|
5
|
+
/** Current form data (reactive object) */
|
|
6
|
+
formData: Record<string, unknown>;
|
|
7
|
+
/** Fields to display */
|
|
8
|
+
fields: string[];
|
|
9
|
+
/** Whether to exclude the ID field (for create dialogs) */
|
|
10
|
+
excludeId?: boolean;
|
|
11
|
+
/** Related model data for relationship dropdowns */
|
|
12
|
+
relatedModelData: Record<string, Record<string, unknown>[]>;
|
|
13
|
+
/** Set of fields in custom ID entry mode */
|
|
14
|
+
customIdFields: Set<string>;
|
|
15
|
+
/** Clipboard feedback - which ID was just copied */
|
|
16
|
+
copiedId?: string | null;
|
|
17
|
+
/** Prefix for input element IDs (e.g. 'edit' or 'create') */
|
|
18
|
+
idPrefix?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"update-field": (field: string, value: unknown) => any;
|
|
22
|
+
"copy-id": (text: string) => any;
|
|
23
|
+
"toggle-custom-id": (field: string, enabled: boolean) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
25
|
+
"onUpdate-field"?: ((field: string, value: unknown) => any) | undefined;
|
|
26
|
+
"onCopy-id"?: ((text: string) => any) | undefined;
|
|
27
|
+
"onToggle-custom-id"?: ((field: string, enabled: boolean) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
copiedId: string | null;
|
|
30
|
+
excludeId: boolean;
|
|
31
|
+
idPrefix: string;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
35
|
+
//# sourceMappingURL=RecordFormFields.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordFormFields.vue.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/components/RecordFormFields.vue"],"names":[],"mappings":"AAmhBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAY1C,UAAU,KAAK;IACb,wCAAwC;IACxC,SAAS,EAAE,SAAS,CAAC;IACrB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,wBAAwB;IACxB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAC5D,4CAA4C;IAC5C,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAy+BD,QAAA,MAAM,YAAY;;;;;;;;;cA5+BL,MAAM,GAAG,IAAI;eANZ,OAAO;cAQR,MAAM;6EA8+BjB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ModelInfo, SortField } from "../types";
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Records to display in the table */
|
|
4
|
+
records: Record<string, unknown>[];
|
|
5
|
+
/** Model metadata for field rendering */
|
|
6
|
+
modelInfo: ModelInfo;
|
|
7
|
+
/** Whether the user has write permission */
|
|
8
|
+
canWrite: boolean;
|
|
9
|
+
/** Whether to show hidden (underscore-prefixed) fields */
|
|
10
|
+
showHiddenFields: boolean;
|
|
11
|
+
/** Loaded data (keyed by table name) for field computation */
|
|
12
|
+
loadedData: Record<string, Record<string, unknown>[]>;
|
|
13
|
+
/** Active sort field (for column indicators) */
|
|
14
|
+
sorting: SortField | null;
|
|
15
|
+
/** Currently selected record IDs */
|
|
16
|
+
selectedRecordIds: Set<string>;
|
|
17
|
+
/** Record ID to highlight briefly (flash-then-fade after creation) */
|
|
18
|
+
highlightedRecordId?: string | null;
|
|
19
|
+
}
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
|
+
"edit-record": (record: Record<string, unknown>) => any;
|
|
22
|
+
"delete-record": (id: string) => any;
|
|
23
|
+
"toggle-column-sort": (field: string) => any;
|
|
24
|
+
"toggle-record-selection": (id: string) => any;
|
|
25
|
+
"toggle-select-all": () => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
27
|
+
"onEdit-record"?: ((record: Record<string, unknown>) => any) | undefined;
|
|
28
|
+
"onDelete-record"?: ((id: string) => any) | undefined;
|
|
29
|
+
"onToggle-column-sort"?: ((field: string) => any) | undefined;
|
|
30
|
+
"onToggle-record-selection"?: ((id: string) => any) | undefined;
|
|
31
|
+
"onToggle-select-all"?: (() => any) | undefined;
|
|
32
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const _default: typeof __VLS_export;
|
|
34
|
+
export default _default;
|
|
35
|
+
//# sourceMappingURL=RecordTable.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordTable.vue.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/components/RecordTable.vue"],"names":[],"mappings":"AAwbA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAYrD,UAAU,KAAK;IACb,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACnC,yCAAyC;IACzC,SAAS,EAAE,SAAS,CAAC;IACrB,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,0DAA0D;IAC1D,gBAAgB,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IACtD,gDAAgD;IAChD,OAAO,EAAE,SAAS,GAAG,IAAI,CAAC;IAC1B,oCAAoC;IACpC,iBAAiB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/B,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AA8uBD,QAAA,MAAM,YAAY;;;;;;;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Show an error toast with the given message. */
|
|
2
|
+
export declare function showErrorToast(message: string): void;
|
|
3
|
+
/** Show a success toast with the given message. */
|
|
4
|
+
export declare function showSuccessToast(message: string): void;
|
|
5
|
+
/** Show a warning toast with the given message. */
|
|
6
|
+
export declare function showWarningToast(message: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* Extract a user-friendly message from an error, suitable for toast display.
|
|
9
|
+
* Safely handles unknown caught values.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getErrorMessage(err: unknown): string;
|
|
12
|
+
//# sourceMappingURL=useDevToolsToast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDevToolsToast.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/composables/useDevToolsToast.ts"],"names":[],"mappings":"AASA,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED,mDAAmD;AACnD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED,mDAAmD;AACnD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAIpD"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
import type { ModelFilter, ModelInfo, ModelPaginationState, PaginatedQueryResult, SortField } from "../types";
|
|
3
|
+
export declare function useModelPagination(currentModel: Ref<ModelInfo | undefined>, documentId: Ref<string | null>, modelFilters: Ref<ModelFilter[]>, modelSorting: Ref<SortField | null>): {
|
|
4
|
+
records: Ref<Record<string, unknown>[], Record<string, unknown>[]>;
|
|
5
|
+
initialDataLoaded: Ref<boolean, boolean>;
|
|
6
|
+
paginationState: Ref<{
|
|
7
|
+
currentPage: number;
|
|
8
|
+
totalCount: number;
|
|
9
|
+
pageSize: number;
|
|
10
|
+
nextCursor: string | null;
|
|
11
|
+
prevCursor: string | null;
|
|
12
|
+
hasMore: boolean;
|
|
13
|
+
pageCursors: Map<number, string | null> & Omit<Map<number, string | null>, keyof Map<any, any>>;
|
|
14
|
+
}, ModelPaginationState | {
|
|
15
|
+
currentPage: number;
|
|
16
|
+
totalCount: number;
|
|
17
|
+
pageSize: number;
|
|
18
|
+
nextCursor: string | null;
|
|
19
|
+
prevCursor: string | null;
|
|
20
|
+
hasMore: boolean;
|
|
21
|
+
pageCursors: Map<number, string | null> & Omit<Map<number, string | null>, keyof Map<any, any>>;
|
|
22
|
+
}>;
|
|
23
|
+
pageSize: Ref<number, number>;
|
|
24
|
+
totalPages: import("vue").ComputedRef<number>;
|
|
25
|
+
visiblePageNumbers: import("vue").ComputedRef<number[]>;
|
|
26
|
+
loadModelData: (model: ModelInfo, page?: number, cursor?: string | null) => Promise<PaginatedQueryResult>;
|
|
27
|
+
loadInitialData: (targetPage?: number) => Promise<void>;
|
|
28
|
+
goToPage: (page: number) => Promise<void>;
|
|
29
|
+
goToPrevPage: () => Promise<void>;
|
|
30
|
+
goToNextPage: () => Promise<void>;
|
|
31
|
+
goToPageContainingRecord: (recordId: string) => Promise<boolean>;
|
|
32
|
+
handlePageSizeChange: (newSize: number) => Promise<void>;
|
|
33
|
+
reloadModelData: () => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=useModelPagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModelPagination.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/composables/useModelPagination.ts"],"names":[],"mappings":"AAOA,OAAO,EAAiB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACV,MAAM,UAAU,CAAC;AAWlB,wBAAgB,kBAAkB,CAChC,YAAY,EAAE,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,EACxC,UAAU,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAC9B,YAAY,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,EAChC,YAAY,EAAE,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;2BAwC1B,SAAS,0BAER,MAAM,GAAG,IAAI,KACpB,OAAO,CAAC,oBAAoB,CAAC;;qBAoFF,MAAM;;;yCAuFxB,MAAM,KACf,OAAO,CAAC,OAAO,CAAC;oCA9C0B,MAAM;;EAoGpD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optimistic List Update Composable
|
|
3
|
+
*
|
|
4
|
+
* Centralises the optimistic removal + rollback pattern used across the
|
|
5
|
+
* document explorer for delete, decline, leave, and similar operations.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* const { optimisticRemove, optimisticUpdate } = useOptimisticList(items, 'documentId');
|
|
9
|
+
* await optimisticRemove(targetId, async () => { ... server call ... });
|
|
10
|
+
*/
|
|
11
|
+
import type { Ref } from "vue";
|
|
12
|
+
export interface OptimisticListActions<T> {
|
|
13
|
+
/**
|
|
14
|
+
* Optimistically remove item(s) matching `key === value` from the list,
|
|
15
|
+
* execute the async operation, and rollback on failure.
|
|
16
|
+
*/
|
|
17
|
+
optimisticRemove(matchValue: string, operation: () => Promise<void>): Promise<{
|
|
18
|
+
success: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Optimistically remove multiple items from the list by key values,
|
|
22
|
+
* execute the async operation, and rollback any that failed.
|
|
23
|
+
*/
|
|
24
|
+
optimisticBulkRemove(matchValues: string[], operation: (ids: string[]) => Promise<string[]>): Promise<{
|
|
25
|
+
failedIds: string[];
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Optimistically update a field on an item, execute the async operation,
|
|
29
|
+
* and rollback on failure.
|
|
30
|
+
*/
|
|
31
|
+
optimisticFieldUpdate<K extends keyof T>(matchValue: string, field: K, newValue: T[K], operation: () => Promise<void>): Promise<{
|
|
32
|
+
success: boolean;
|
|
33
|
+
}>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create optimistic update helpers for a reactive list.
|
|
37
|
+
*
|
|
38
|
+
* @param list Reactive ref containing the array of items
|
|
39
|
+
* @param key Property name used to identify items (e.g. 'documentId')
|
|
40
|
+
*/
|
|
41
|
+
export declare function useOptimisticList<T extends Record<string, unknown>>(list: Ref<T[]>, key: keyof T & string): OptimisticListActions<T>;
|
|
42
|
+
//# sourceMappingURL=useOptimisticList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOptimisticList.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/composables/useOptimisticList.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B,MAAM,WAAW,qBAAqB,CAAC,CAAC;IACtC;;;OAGG;IACH,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC7B,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAEjC;;;OAGG;IACH,oBAAoB,CAClB,WAAW,EAAE,MAAM,EAAE,EACrB,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,GAC9C,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IAEpC;;;OAGG;IACH,qBAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,EACrC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,EACd,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAC7B,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,EACd,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,GACpB,qBAAqB,CAAC,CAAC,CAAC,CAoH1B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useRecordCrud - Composable for record CRUD operations in the Document Explorer.
|
|
3
|
+
*
|
|
4
|
+
* Encapsulates creating, editing, saving, and deleting records for a single model,
|
|
5
|
+
* including form state management, relationship data loading, and dialog control.
|
|
6
|
+
*/
|
|
7
|
+
import { type ComputedRef, type Ref } from "vue";
|
|
8
|
+
import type { ModelInfo } from "../types";
|
|
9
|
+
export declare function useRecordCrud(currentModel: Ref<ModelInfo | undefined>, documentId: Ref<string | null>, showHiddenFields: Ref<boolean>, loadedData: ComputedRef<Record<string, Record<string, unknown>[]>>, allModels: Ref<ModelInfo[]>): {
|
|
10
|
+
editDialogOpen: Ref<boolean, boolean>;
|
|
11
|
+
createDialogOpen: Ref<boolean, boolean>;
|
|
12
|
+
bulkDeleteDialogOpen: Ref<boolean, boolean>;
|
|
13
|
+
deleteRecordId: Ref<string | null, string | null>;
|
|
14
|
+
isDeleting: Ref<boolean, boolean>;
|
|
15
|
+
isCreating: Ref<boolean, boolean>;
|
|
16
|
+
editFormData: Ref<Record<string, unknown>, Record<string, unknown>>;
|
|
17
|
+
selectedRecord: Ref<Record<string, unknown> | null, Record<string, unknown> | null>;
|
|
18
|
+
relatedModelData: Ref<Record<string, Record<string, unknown>[]>, Record<string, Record<string, unknown>[]>>;
|
|
19
|
+
customIdFields: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
20
|
+
openEditDialog: (record: Record<string, unknown>) => void;
|
|
21
|
+
openCreateDialog: () => void;
|
|
22
|
+
handleSaveRecord: () => Promise<void>;
|
|
23
|
+
handleCreateRecord: () => Promise<string | null>;
|
|
24
|
+
handleDeleteRecord: () => Promise<void>;
|
|
25
|
+
handleBulkDeleteRecords: (selectedIds: Set<string>) => Promise<{
|
|
26
|
+
success: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
updateFormField: (field: string, value: unknown) => void;
|
|
29
|
+
handleToggleCustomId: (field: string, enabled: boolean) => void;
|
|
30
|
+
loadRelatedModelData: () => Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=useRecordCrud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRecordCrud.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/composables/useRecordCrud.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAO,KAAK,WAAW,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAM1C,wBAAgB,aAAa,CAC3B,YAAY,EAAE,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC,EACxC,UAAU,EAAE,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAC9B,gBAAgB,EAAE,GAAG,CAAC,OAAO,CAAC,EAC9B,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAClE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,CAAC;;;;;;;;;;;6BAaK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;8BA4FlB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;;2CAuE5C,GAAG,CAAC,MAAM,CAAC,KACvB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;6BA+BA,MAAM,SAAS,OAAO;kCAIjB,MAAM,WAAW,OAAO;;EAqE9D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants for the Document Explorer.
|
|
3
|
+
*
|
|
4
|
+
* Centralises magic strings (localStorage keys, etc.) that were
|
|
5
|
+
* previously scattered as inline string literals.
|
|
6
|
+
*/
|
|
7
|
+
/** Key for the selected document ID in the explorer store. */
|
|
8
|
+
export declare const STORAGE_KEY_SELECTED_DOC = "documentExplorer:selectedDocId";
|
|
9
|
+
/** Key for the selected model name in the explorer store. */
|
|
10
|
+
export declare const STORAGE_KEY_SELECTED_MODEL = "documentExplorer:selectedModel";
|
|
11
|
+
/** Key for the "show hidden fields" toggle in the explorer store. */
|
|
12
|
+
export declare const STORAGE_KEY_HIDDEN_FIELDS = "documentExplorer:showHiddenFields";
|
|
13
|
+
/** Key for the right panel collapsed state (shared between properties panels). */
|
|
14
|
+
export declare const STORAGE_KEY_RIGHT_PANEL_COLLAPSED = "devtools:rightPanelCollapsed";
|
|
15
|
+
/** Key for persisted page size preference. */
|
|
16
|
+
export declare const STORAGE_KEY_PAGE_SIZE = "primitive-doc-explorer-page-size";
|
|
17
|
+
/** Key for per-model view state (filters, sorts, page). */
|
|
18
|
+
export declare const STORAGE_KEY_MODEL_VIEW_STATE = "primitive-doc-explorer-model-view-state";
|
|
19
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/dev-tools/document-explorer/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,8DAA8D;AAC9D,eAAO,MAAM,wBAAwB,mCAAmC,CAAC;AAEzE,6DAA6D;AAC7D,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,sCAAsC,CAAC;AAE7E,kFAAkF;AAClF,eAAO,MAAM,iCAAiC,iCAAiC,CAAC;AAEhF,8CAA8C;AAC9C,eAAO,MAAM,qBAAqB,qCAAqC,CAAC;AAExE,2DAA2D;AAC3D,eAAO,MAAM,4BAA4B,4CACE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
open: boolean;
|
|
3
|
+
isCreating?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:open": (value: boolean) => any;
|
|
7
|
+
create: (title: string) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
9
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
10
|
+
onCreate?: ((title: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=CreateDocumentDialog.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateDocumentDialog.vue.d.ts","sourceRoot":"","sources":["../../../../src/dev-tools/document-explorer/dialogs/CreateDocumentDialog.vue"],"names":[],"mappings":"AAAA,UAsHU,KAAK;IACb,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAuLD,QAAA,MAAM,YAAY;;;;;;kFAGhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
export declare const useDocumentExplorerStore: import("pinia").StoreDefinition<"documentExplorer", Pick<{
|
|
10
10
|
showHiddenFields: import("vue").Ref<boolean, boolean>;
|
|
11
11
|
currentDocumentId: import("vue").Ref<string | null, string | null>;
|
|
12
|
+
currentModelName: import("vue").Ref<string | null, string | null>;
|
|
13
|
+
currentDocumentTitle: import("vue").Ref<string | null, string | null>;
|
|
12
14
|
currentDocumentMetadata: import("vue").ComputedRef<{
|
|
13
15
|
documentId: string;
|
|
14
16
|
} | null>;
|
|
@@ -16,10 +18,14 @@ export declare const useDocumentExplorerStore: import("pinia").StoreDefinition<"
|
|
|
16
18
|
openDocument: (documentId: string) => Promise<void>;
|
|
17
19
|
switchDocument: (documentId: string) => Promise<void>;
|
|
18
20
|
setCurrentDocumentId: (docId: string | null) => void;
|
|
21
|
+
setCurrentModelName: (modelName: string | null) => void;
|
|
22
|
+
setCurrentDocumentTitle: (title: string | null) => void;
|
|
19
23
|
reset: () => void;
|
|
20
|
-
}, "showHiddenFields" | "currentDocumentId" | "isDocumentReady">, Pick<{
|
|
24
|
+
}, "showHiddenFields" | "currentDocumentId" | "currentModelName" | "currentDocumentTitle" | "isDocumentReady">, Pick<{
|
|
21
25
|
showHiddenFields: import("vue").Ref<boolean, boolean>;
|
|
22
26
|
currentDocumentId: import("vue").Ref<string | null, string | null>;
|
|
27
|
+
currentModelName: import("vue").Ref<string | null, string | null>;
|
|
28
|
+
currentDocumentTitle: import("vue").Ref<string | null, string | null>;
|
|
23
29
|
currentDocumentMetadata: import("vue").ComputedRef<{
|
|
24
30
|
documentId: string;
|
|
25
31
|
} | null>;
|
|
@@ -27,10 +33,14 @@ export declare const useDocumentExplorerStore: import("pinia").StoreDefinition<"
|
|
|
27
33
|
openDocument: (documentId: string) => Promise<void>;
|
|
28
34
|
switchDocument: (documentId: string) => Promise<void>;
|
|
29
35
|
setCurrentDocumentId: (docId: string | null) => void;
|
|
36
|
+
setCurrentModelName: (modelName: string | null) => void;
|
|
37
|
+
setCurrentDocumentTitle: (title: string | null) => void;
|
|
30
38
|
reset: () => void;
|
|
31
39
|
}, "currentDocumentMetadata">, Pick<{
|
|
32
40
|
showHiddenFields: import("vue").Ref<boolean, boolean>;
|
|
33
41
|
currentDocumentId: import("vue").Ref<string | null, string | null>;
|
|
42
|
+
currentModelName: import("vue").Ref<string | null, string | null>;
|
|
43
|
+
currentDocumentTitle: import("vue").Ref<string | null, string | null>;
|
|
34
44
|
currentDocumentMetadata: import("vue").ComputedRef<{
|
|
35
45
|
documentId: string;
|
|
36
46
|
} | null>;
|
|
@@ -38,7 +48,9 @@ export declare const useDocumentExplorerStore: import("pinia").StoreDefinition<"
|
|
|
38
48
|
openDocument: (documentId: string) => Promise<void>;
|
|
39
49
|
switchDocument: (documentId: string) => Promise<void>;
|
|
40
50
|
setCurrentDocumentId: (docId: string | null) => void;
|
|
51
|
+
setCurrentModelName: (modelName: string | null) => void;
|
|
52
|
+
setCurrentDocumentTitle: (title: string | null) => void;
|
|
41
53
|
reset: () => void;
|
|
42
|
-
}, "reset" | "openDocument" | "switchDocument" | "setCurrentDocumentId">>;
|
|
54
|
+
}, "reset" | "openDocument" | "switchDocument" | "setCurrentDocumentId" | "setCurrentModelName" | "setCurrentDocumentTitle">>;
|
|
43
55
|
export { useDocumentExplorerStore as useDocumentDebuggerStore };
|
|
44
56
|
//# sourceMappingURL=documentExplorerStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentExplorerStore.d.ts","sourceRoot":"","sources":["../../../src/dev-tools/document-explorer/documentExplorerStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"documentExplorerStore.d.ts","sourceRoot":"","sources":["../../../src/dev-tools/document-explorer/documentExplorerStore.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;+BAoFK,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;iCAmDpB,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kCAI3B,MAAM,GAAG,IAAI;qCAQV,MAAM,GAAG,IAAI;qCAIb,MAAM,GAAG,IAAI;;;;;;;;;;;+BAnEb,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;iCAmDpB,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kCAI3B,MAAM,GAAG,IAAI;qCAQV,MAAM,GAAG,IAAI;qCAIb,MAAM,GAAG,IAAI;;;;;;;;;;;+BAnEb,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;iCAmDpB,MAAM,KAAG,OAAO,CAAC,IAAI,CAAC;kCAI3B,MAAM,GAAG,IAAI;qCAQV,MAAM,GAAG,IAAI;qCAIb,MAAM,GAAG,IAAI;;6HAkCrD,CAAC;AAGH,OAAO,EAAE,wBAAwB,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Document Explorer exports.
|
|
3
3
|
*/
|
|
4
|
-
export { default as MassDeleteDocsDialog } from "./dialogs/MassDeleteDocsDialog.vue";
|
|
5
|
-
export { default as MassDeleteRecordsDialog } from "./dialogs/MassDeleteRecordsDialog.vue";
|
|
6
4
|
export { default as DocumentExplorerIndex } from "./DocumentExplorerIndex.vue";
|
|
7
5
|
export { default as DocumentExplorerModel } from "./DocumentExplorerModel.vue";
|
|
8
|
-
export { default as
|
|
6
|
+
export { default as DocumentListPanel } from "./components/DocumentListPanel.vue";
|
|
7
|
+
export { default as DocumentPropertiesPanel } from "./components/DocumentPropertiesPanel.vue";
|
|
8
|
+
export { default as DocumentSidebar } from "./components/DocumentSidebar.vue";
|
|
9
|
+
export { default as CreateDocumentDialog } from "./dialogs/CreateDocumentDialog.vue";
|
|
9
10
|
export { useDocumentDebuggerStore, useDocumentExplorerStore, } from "./documentExplorerStore";
|
|
10
|
-
export type { FieldInfo, FieldSchemaInfo, FilterMode, ModelFilter, ModelInfo, ModelPaginationState, ModelSortState, PageData, PaginatedQueryResult, RelationshipConfig, SortDirection, SortField, UniqueConstraintConfig, } from "./types";
|
|
11
|
+
export type { AliasInfo, DocumentInfoWithRoot, FieldInfo, FieldSchemaInfo, FilterMode, InvitationEntry, MethodInfo, ModelFilter, ModelInfo, ModelPaginationState, ModelSortState, PageData, PaginatedQueryResult, PendingInvitation, PermissionEntry, RelationshipConfig, SortDirection, SortField, UniqueConstraintConfig, } from "./types";
|
|
11
12
|
export * from "./utils";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dev-tools/document-explorer/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dev-tools/document-explorer/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAG/E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAG9E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAGrF,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAGjC,YAAY,EACV,SAAS,EACT,oBAAoB,EACpB,SAAS,EACT,eAAe,EACf,UAAU,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,cAAc,EACd,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAGjB,cAAc,SAAS,CAAC"}
|
|
@@ -23,22 +23,51 @@ export interface FieldInfo {
|
|
|
23
23
|
hidden?: boolean;
|
|
24
24
|
schema?: FieldSchemaInfo;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Minimal instance interface for js-bao model records used by the document explorer.
|
|
28
|
+
* Covers the instance methods/properties we access (save, delete, id, field access).
|
|
29
|
+
*/
|
|
30
|
+
export interface BaoModelInstance {
|
|
31
|
+
id: string;
|
|
32
|
+
save(options?: Record<string, unknown>): Promise<void>;
|
|
33
|
+
delete(): Promise<void>;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Minimal static interface for js-bao model classes used by the document explorer.
|
|
38
|
+
* Covers the static methods we call (count, query, find, subscribe) without
|
|
39
|
+
* importing the full js-bao type surface.
|
|
40
|
+
*/
|
|
41
|
+
export interface BaoModelStatic {
|
|
42
|
+
new (data?: Record<string, unknown>): BaoModelInstance;
|
|
43
|
+
count(query: Record<string, unknown>, options?: Record<string, unknown>): Promise<number>;
|
|
44
|
+
query(query: Record<string, unknown>, options?: Record<string, unknown>): Promise<{
|
|
45
|
+
data: BaoModelInstance[];
|
|
46
|
+
hasMore?: boolean;
|
|
47
|
+
nextCursor?: string;
|
|
48
|
+
prevCursor?: string;
|
|
49
|
+
}>;
|
|
50
|
+
find(id: string): Promise<BaoModelInstance | null>;
|
|
51
|
+
subscribe(cb: () => void): () => void;
|
|
52
|
+
}
|
|
26
53
|
export interface ModelInfo {
|
|
27
54
|
name: string;
|
|
28
|
-
modelClass:
|
|
55
|
+
modelClass: BaoModelStatic;
|
|
29
56
|
tableName: string;
|
|
30
57
|
fields: string[];
|
|
31
58
|
fieldInfo: Map<string, FieldInfo>;
|
|
32
59
|
relationships?: Record<string, RelationshipConfig>;
|
|
33
60
|
uniqueConstraints?: UniqueConstraintConfig[];
|
|
61
|
+
/** Relative source file path (e.g. "src/models/Task.ts") for display in dev tools */
|
|
62
|
+
sourcePath?: string;
|
|
34
63
|
}
|
|
35
64
|
export type SortDirection = 1 | -1;
|
|
36
65
|
export interface SortField {
|
|
37
66
|
field: string;
|
|
38
67
|
direction: SortDirection;
|
|
39
68
|
}
|
|
40
|
-
export type ModelSortState = SortField
|
|
41
|
-
export type FilterMode = "equals" | "not_equals" | "contains" | "not_contains" | "in" | "not_in" | "starts_with" | "ends_with" | "gt" | "gte" | "lt" | "lte";
|
|
69
|
+
export type ModelSortState = SortField | null;
|
|
70
|
+
export type FilterMode = "equals" | "not_equals" | "is_null" | "is_not_null" | "contains" | "not_contains" | "in" | "not_in" | "starts_with" | "ends_with" | "gt" | "gte" | "lt" | "lte";
|
|
42
71
|
export interface ModelFilter {
|
|
43
72
|
id: string;
|
|
44
73
|
field: string;
|
|
@@ -64,4 +93,58 @@ export interface PaginatedQueryResult {
|
|
|
64
93
|
nextCursor: string | null;
|
|
65
94
|
prevCursor: string | null;
|
|
66
95
|
}
|
|
96
|
+
export interface DocumentInfoWithRoot {
|
|
97
|
+
documentId: string;
|
|
98
|
+
title: string;
|
|
99
|
+
permission?: string;
|
|
100
|
+
createdAt?: string;
|
|
101
|
+
createdBy?: string;
|
|
102
|
+
lastModified?: string;
|
|
103
|
+
isRoot: boolean;
|
|
104
|
+
tags?: string[];
|
|
105
|
+
}
|
|
106
|
+
export interface PendingInvitation {
|
|
107
|
+
invitationId: string;
|
|
108
|
+
documentId: string;
|
|
109
|
+
email: string;
|
|
110
|
+
permission: string;
|
|
111
|
+
invitedBy: string;
|
|
112
|
+
invitedAt: string;
|
|
113
|
+
expiresAt?: string;
|
|
114
|
+
accepted: boolean;
|
|
115
|
+
acceptedAt?: string;
|
|
116
|
+
title?: string;
|
|
117
|
+
document?: {
|
|
118
|
+
documentId?: string;
|
|
119
|
+
title?: string;
|
|
120
|
+
tags?: string[];
|
|
121
|
+
createdAt?: string;
|
|
122
|
+
lastModified?: string;
|
|
123
|
+
createdBy?: string;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export interface PermissionEntry {
|
|
127
|
+
userId: string;
|
|
128
|
+
email: string;
|
|
129
|
+
name: string;
|
|
130
|
+
permission: string;
|
|
131
|
+
grantedAt: string;
|
|
132
|
+
}
|
|
133
|
+
export interface InvitationEntry {
|
|
134
|
+
invitationId: string;
|
|
135
|
+
email: string;
|
|
136
|
+
permission: string;
|
|
137
|
+
invitedBy: string;
|
|
138
|
+
invitedAt: string;
|
|
139
|
+
accepted: boolean;
|
|
140
|
+
}
|
|
141
|
+
export interface AliasInfo {
|
|
142
|
+
aliasKey: string;
|
|
143
|
+
scope: string;
|
|
144
|
+
}
|
|
145
|
+
export interface MethodInfo {
|
|
146
|
+
name: string;
|
|
147
|
+
type: "method" | "getter" | "setter" | "static-method" | "static-property";
|
|
148
|
+
signature?: string;
|
|
149
|
+
}
|
|
67
150
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/dev-tools/document-explorer/types.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,kBAAkB;IACjC,IAA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AE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAGD,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAGD,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAGD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,eAAe,GAAG,iBAAiB,CAAC;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import type { FieldSchemaInfo, FilterMode, ModelFilter, ModelInfo, SortDirection, SortField } from "./types";
|
|
2
2
|
export declare function safeJsonStringify(value: unknown, indent?: number): string;
|
|
3
3
|
export declare function fuzzyMatch(text: string, query: string): boolean;
|
|
4
|
+
export declare function filterModeHasValue(mode: FilterMode): boolean;
|
|
4
5
|
export declare function applyFilterToRecord(record: Record<string, unknown>, filter: ModelFilter): boolean;
|
|
5
6
|
export declare function getFilterModeLabel(mode: FilterMode): string;
|
|
7
|
+
/**
|
|
8
|
+
* Return the list of filter modes applicable to a given field,
|
|
9
|
+
* resolved from the model schema (or falling back to all modes).
|
|
10
|
+
*/
|
|
11
|
+
export declare function getFilterModesForField(modelInfo: ModelInfo, fieldName: string): FilterMode[];
|
|
12
|
+
/**
|
|
13
|
+
* Return a sensible default filter mode for a given field type.
|
|
14
|
+
* - string → "contains"
|
|
15
|
+
* - id/number/date → "equals"
|
|
16
|
+
* - boolean → "equals"
|
|
17
|
+
* - stringset → "contains"
|
|
18
|
+
*/
|
|
19
|
+
export declare function getDefaultFilterMode(modelInfo: ModelInfo, fieldName: string): FilterMode;
|
|
6
20
|
export declare function getFieldType(value: unknown): string;
|
|
7
21
|
export declare function getModelFields(modelInfo: ModelInfo, loadedData: Record<string, Record<string, unknown>[]>, includeHidden?: boolean): string[];
|
|
8
22
|
export declare function getFieldRelationship(modelInfo: ModelInfo, fieldName: string): {
|
|
@@ -14,10 +28,17 @@ export declare function isJsonField(value: unknown): boolean;
|
|
|
14
28
|
export declare function generateFilterId(): string;
|
|
15
29
|
export declare function filterToJsBaoQuery(filter: ModelFilter): Record<string, unknown>;
|
|
16
30
|
export declare function filtersToJsBaoQuery(filters: ModelFilter[]): Record<string, unknown>;
|
|
31
|
+
export declare const DEFAULT_PAGE_SIZE = 25;
|
|
32
|
+
export declare const PAGE_SIZE_OPTIONS: readonly [10, 25, 50, 100];
|
|
33
|
+
/** Read the persisted page size from localStorage (falls back to DEFAULT_PAGE_SIZE). */
|
|
34
|
+
export declare function getPersistedPageSize(): number;
|
|
35
|
+
/** Persist the chosen page size to localStorage. */
|
|
36
|
+
export declare function setPersistedPageSize(size: number): void;
|
|
17
37
|
export declare const PAGE_SIZE = 25;
|
|
18
38
|
export declare function getFieldSchemaInfo(modelInfo: ModelInfo, fieldName: string): FieldSchemaInfo | undefined;
|
|
19
39
|
export declare function isStringSetField(modelInfo: ModelInfo, fieldName: string): boolean;
|
|
20
40
|
export declare function isDateField(modelInfo: ModelInfo, fieldName: string): boolean;
|
|
41
|
+
export declare function isNumberField(modelInfo: ModelInfo, fieldName: string): boolean;
|
|
21
42
|
export declare function isBooleanField(modelInfo: ModelInfo, fieldName: string): boolean;
|
|
22
43
|
export declare function stringSetToArray(value: unknown): string[];
|
|
23
44
|
export declare function isIndexedField(modelInfo: ModelInfo, fieldName: string): boolean;
|
|
@@ -25,7 +46,7 @@ export declare function getFieldSchemaType(modelInfo: ModelInfo, fieldName: stri
|
|
|
25
46
|
export declare function formatStringSetValue(value: unknown): string;
|
|
26
47
|
export declare function formatDateValue(value: unknown): string;
|
|
27
48
|
export declare function getFieldDisplayValue(modelInfo: ModelInfo, fieldName: string, value: unknown): string;
|
|
28
|
-
export declare function sortFieldsToJsBaoSort(
|
|
49
|
+
export declare function sortFieldsToJsBaoSort(sortField: SortField | null): Record<string, number>;
|
|
29
50
|
export declare function getSortDirectionLabel(direction: SortDirection): string;
|
|
30
51
|
export declare function getSortDirectionSymbol(direction: SortDirection): string;
|
|
31
52
|
export declare function toggleSortDirection(direction: SortDirection): SortDirection;
|
|
@@ -35,4 +56,30 @@ export declare function wouldViolateUniqueConstraint(modelInfo: ModelInfo, exist
|
|
|
35
56
|
existingRecord?: Record<string, unknown>;
|
|
36
57
|
};
|
|
37
58
|
export declare function generateUniqueConstraintValues(modelInfo: ModelInfo, existingRecords: Record<string, unknown>[], baseData: Record<string, unknown>, attemptIndex: number): Record<string, unknown>;
|
|
59
|
+
/** Serialisable snapshot of a model's view state (filters, sorts, page). */
|
|
60
|
+
export interface PersistedModelViewState {
|
|
61
|
+
page: number;
|
|
62
|
+
filters: {
|
|
63
|
+
id: string;
|
|
64
|
+
field: string;
|
|
65
|
+
mode: string;
|
|
66
|
+
value: string;
|
|
67
|
+
}[];
|
|
68
|
+
sorts: {
|
|
69
|
+
field: string;
|
|
70
|
+
direction: number;
|
|
71
|
+
} | null;
|
|
72
|
+
}
|
|
73
|
+
/** Get persisted view state for a single model (returns undefined if none). */
|
|
74
|
+
export declare function getPersistedModelViewState(modelName: string): PersistedModelViewState | undefined;
|
|
75
|
+
/** Persist view state for a single model (merges into existing map). */
|
|
76
|
+
export declare function setPersistedModelViewState(modelName: string, state: PersistedModelViewState): void;
|
|
77
|
+
/** Remove persisted view state for a single model. */
|
|
78
|
+
export declare function clearPersistedModelViewState(modelName: string): void;
|
|
79
|
+
/** Human-readable label for a document permission level. */
|
|
80
|
+
export declare function getPermissionLabel(permission?: string): string;
|
|
81
|
+
/** CSS class string for a permission badge. */
|
|
82
|
+
export declare function getPermissionClass(permission?: string): string;
|
|
83
|
+
/** Whether the permission level represents an owner/admin. */
|
|
84
|
+
export declare function isOwnerPermission(permission?: string): boolean;
|
|
38
85
|
//# sourceMappingURL=utils.d.ts.map
|