@compill/admin 1.0.103 → 1.0.104
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/index.d.ts +50 -50
- package/dist/index.js +50 -50
- package/dist/lib/buttons/InvalidateButton.d.ts +1 -1
- package/dist/lib/buttons/InvalidateButton.js +1 -1
- package/dist/lib/buttons/PublishButton.js +1 -1
- package/dist/lib/buttons/UpdateButton.js +1 -1
- package/dist/lib/buttons/ViewButton.d.ts +1 -1
- package/dist/lib/buttons/ViewButton.js +1 -1
- package/dist/lib/json/DetailsView.d.ts +1 -1
- package/dist/lib/json/DetailsView.js +6 -6
- package/dist/lib/json/EditItemView.d.ts +1 -1
- package/dist/lib/json/EditItemView.js +1 -1
- package/dist/lib/json/MultiQueryWrapper.d.ts +1 -1
- package/dist/lib/json/MultiQueryWrapper.js +1 -1
- package/dist/lib/json/QueryWrapper.d.ts +1 -1
- package/dist/lib/json/QueryWrapper.js +1 -1
- package/dist/lib/json/ScreenRenderer.d.ts +1 -1
- package/dist/lib/json/ScreenRenderer.js +5 -5
- package/dist/lib/json/ScreenTopBar.d.ts +2 -2
- package/dist/lib/json/ScreenTopBar.js +6 -6
- package/dist/lib/json/TabbedView.d.ts +1 -1
- package/dist/lib/json/TabbedView.js +3 -3
- package/dist/lib/json/dialog/DialogRenderer.d.ts +3 -3
- package/dist/lib/json/dialog/DialogRenderer.js +3 -3
- package/dist/lib/json/dialog/MultiQueryWrapperDialog.d.ts +1 -1
- package/dist/lib/json/dialog/MultiQueryWrapperDialog.js +1 -1
- package/dist/lib/json/dialog/QueryWrapperDialog.d.ts +2 -2
- package/dist/lib/json/dialog/QueryWrapperDialog.js +1 -1
- package/dist/lib/json/table/RefreshButton.js +1 -1
- package/dist/lib/json/table/TableRowActionsView.d.ts +1 -1
- package/dist/lib/json/table/TableRowActionsView.js +1 -1
- package/dist/lib/json/table/TableView.d.ts +1 -1
- package/dist/lib/json/table/TableView.js +13 -13
- package/dist/lib/json/table/TableViewContext.d.ts +1 -1
- package/dist/lib/json/table/TableViewContext.js +2 -2
- package/dist/lib/json/table/useTableProps.d.ts +1 -1
- package/dist/lib/json/table/useTableProps.js +2 -2
- package/dist/lib/json/types/DetailsView.d.ts +1 -1
- package/dist/lib/json/types/EditItemDialog.d.ts +1 -1
- package/dist/lib/json/types/MultiQueryWrapper.d.ts +3 -3
- package/dist/lib/json/types/MultiQueryWrapperDialog.d.ts +1 -1
- package/dist/lib/json/types/QueryWrapper.d.ts +3 -3
- package/dist/lib/json/types/QueryWrapperDialog.d.ts +1 -1
- package/dist/lib/json/types/ScreenConfig.d.ts +6 -6
- package/dist/lib/json/types/TabbedView.d.ts +5 -5
- package/dist/lib/json/types/TableView.d.ts +4 -4
- package/dist/lib/layout/AdminLayout.d.ts +1 -1
- package/dist/lib/layout/AdminLayout.js +2 -2
- package/dist/lib/layout/ButtonBar.d.ts +1 -1
- package/dist/lib/layout/ButtonBar.js +1 -1
- package/dist/lib/layout/Sidebar.d.ts +1 -1
- package/dist/lib/layout/Sidebar.js +2 -2
- package/dist/lib/layout/menu/Menu.d.ts +1 -1
- package/dist/lib/layout/menu/Menu.js +2 -2
- package/dist/lib/layout/menu/MenuItem.d.ts +1 -1
- package/dist/lib/layout/menu/MenuItem.js +2 -2
- package/dist/lib/layout/menu/NextMenuItem.d.ts +1 -1
- package/dist/lib/layout/menu/NextMenuItem.js +2 -2
- package/dist/lib/layout/menu/UserBlock.d.ts +1 -1
- package/dist/lib/page/PageContentEditor.js +1 -1
- package/dist/lib/page/PageQueryStateContainer.js +1 -1
- package/dist/lib/page/PageSidebarSection.js +1 -1
- package/dist/lib/page/PageTopBar.d.ts +1 -1
- package/dist/lib/page/PageTopBar.js +2 -2
- package/dist/lib/table/TableColumnButton.js +1 -1
- package/dist/lib/table/TableContainer.js +1 -1
- package/dist/lib/table/TableCreateButton.d.ts +1 -1
- package/dist/lib/table/TableCreateButton.js +1 -1
- package/dist/lib/table/TableFilters.js +1 -1
- package/dist/lib/table/TableMassActions.d.ts +1 -1
- package/dist/lib/table/TableMassActions.js +1 -1
- package/dist/lib/table/TableRowActionBar.js +4 -4
- package/dist/lib/table/TableRowActionDialogButton.d.ts +1 -1
- package/dist/lib/table/TableRowActionDialogButton.js +1 -1
- package/dist/lib/table/TableRowDeleteButton.d.ts +1 -1
- package/dist/lib/table/TableRowDeleteButton.js +1 -1
- package/dist/lib/table/TableRowEditButton.d.ts +1 -1
- package/dist/lib/table/TableRowEditButton.js +1 -1
- package/dist/lib/table/TableRowNavigateButton.js +1 -1
- package/dist/lib/table/TableRowPublishPostButton.js +1 -1
- package/dist/lib/table/TableRowViewButton.js +1 -1
- package/dist/lib/table/TableTopBar.d.ts +1 -1
- package/dist/lib/table/TableTopBar.js +1 -1
- package/package.json +17 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
export * from "./lib/SectionTitle";
|
|
2
|
-
export * from "./lib/breadcrumbs/BreadCrumbs";
|
|
3
|
-
export * from "./lib/buttons/DialogButton";
|
|
4
|
-
export * from "./lib/buttons/InvalidateButton";
|
|
5
|
-
export * from "./lib/buttons/NavigateButton";
|
|
6
|
-
export * from "./lib/buttons/PublishButton";
|
|
7
|
-
export * from "./lib/buttons/UpdateButton";
|
|
8
|
-
export * from "./lib/buttons/ViewButton";
|
|
9
|
-
export * from "./lib/cells/OrderCell";
|
|
10
|
-
export * from "./lib/json/ScreenRenderer";
|
|
11
|
-
export * from "./lib/json/dialog/ItemEditDialog";
|
|
12
|
-
export * from "./lib/json/dialog/ItemDeleteDialog";
|
|
13
|
-
export * from "./lib/json/types/DetailsView";
|
|
14
|
-
export * from "./lib/json/types/EditItemDialog";
|
|
15
|
-
export * from "./lib/json/types/MultiQueryWrapper";
|
|
16
|
-
export * from "./lib/json/types/QueryWrapper";
|
|
17
|
-
export * from "./lib/json/types/QueryWrapperDialog";
|
|
18
|
-
export * from "./lib/json/types/ScreenConfig";
|
|
19
|
-
export * from "./lib/json/types/TabbedView";
|
|
20
|
-
export * from "./lib/json/types/TableView";
|
|
21
|
-
export * from "./lib/layout/AdminLayout";
|
|
22
|
-
export * from "./lib/layout/ButtonBar";
|
|
23
|
-
export * from "./lib/layout/menu/Menu";
|
|
24
|
-
export * from "./lib/layout/menu/MenuConfig";
|
|
25
|
-
export * from "./lib/modal/AttachDialog";
|
|
26
|
-
export * from "./lib/modal/FormActionDialog";
|
|
27
|
-
export * from "./lib/page/PageContainer";
|
|
28
|
-
export * from "./lib/page/PageContentEditor";
|
|
29
|
-
export * from "./lib/page/PageMain";
|
|
30
|
-
export * from "./lib/page/PageQueryStateContainer";
|
|
31
|
-
export * from "./lib/page/PageSectionTitle";
|
|
32
|
-
export * from "./lib/page/PageSidebar";
|
|
33
|
-
export * from "./lib/page/PageSidebarSection";
|
|
34
|
-
export * from "./lib/page/PageStateContainer";
|
|
35
|
-
export * from "./lib/page/PageSubSectionTitle";
|
|
36
|
-
export * from "./lib/page/PageTitle";
|
|
37
|
-
export * from "./lib/page/PageTopBar";
|
|
38
|
-
export * from "./lib/status/StatusBadge";
|
|
39
|
-
export * from "./lib/table/TableContainer";
|
|
40
|
-
export * from "./lib/table/TableCreateButton";
|
|
41
|
-
export * from "./lib/table/TableFilterButton";
|
|
42
|
-
export * from "./lib/table/TableRowActionBar";
|
|
43
|
-
export * from "./lib/table/TableRowActionButton";
|
|
44
|
-
export * from "./lib/table/TableRowActionDialogButton";
|
|
45
|
-
export * from "./lib/table/TableRowDeleteButton";
|
|
46
|
-
export * from "./lib/table/TableRowEditButton";
|
|
47
|
-
export * from "./lib/table/TableRowNavigateButton";
|
|
48
|
-
export * from "./lib/table/TableRowPublishPostButton";
|
|
49
|
-
export * from "./lib/table/TableRowViewButton";
|
|
50
|
-
export * from "./lib/table/TableTopBar";
|
|
1
|
+
export * from "./lib/SectionTitle.js";
|
|
2
|
+
export * from "./lib/breadcrumbs/BreadCrumbs.js";
|
|
3
|
+
export * from "./lib/buttons/DialogButton.js";
|
|
4
|
+
export * from "./lib/buttons/InvalidateButton.js";
|
|
5
|
+
export * from "./lib/buttons/NavigateButton.js";
|
|
6
|
+
export * from "./lib/buttons/PublishButton.js";
|
|
7
|
+
export * from "./lib/buttons/UpdateButton.js";
|
|
8
|
+
export * from "./lib/buttons/ViewButton.js";
|
|
9
|
+
export * from "./lib/cells/OrderCell.js";
|
|
10
|
+
export * from "./lib/json/ScreenRenderer.js";
|
|
11
|
+
export * from "./lib/json/dialog/ItemEditDialog.js";
|
|
12
|
+
export * from "./lib/json/dialog/ItemDeleteDialog.js";
|
|
13
|
+
export * from "./lib/json/types/DetailsView.js";
|
|
14
|
+
export * from "./lib/json/types/EditItemDialog.js";
|
|
15
|
+
export * from "./lib/json/types/MultiQueryWrapper.js";
|
|
16
|
+
export * from "./lib/json/types/QueryWrapper.js";
|
|
17
|
+
export * from "./lib/json/types/QueryWrapperDialog.js";
|
|
18
|
+
export * from "./lib/json/types/ScreenConfig.js";
|
|
19
|
+
export * from "./lib/json/types/TabbedView.js";
|
|
20
|
+
export * from "./lib/json/types/TableView.js";
|
|
21
|
+
export * from "./lib/layout/AdminLayout.js";
|
|
22
|
+
export * from "./lib/layout/ButtonBar.js";
|
|
23
|
+
export * from "./lib/layout/menu/Menu.js";
|
|
24
|
+
export * from "./lib/layout/menu/MenuConfig.js";
|
|
25
|
+
export * from "./lib/modal/AttachDialog.js";
|
|
26
|
+
export * from "./lib/modal/FormActionDialog.js";
|
|
27
|
+
export * from "./lib/page/PageContainer.js";
|
|
28
|
+
export * from "./lib/page/PageContentEditor.js";
|
|
29
|
+
export * from "./lib/page/PageMain.js";
|
|
30
|
+
export * from "./lib/page/PageQueryStateContainer.js";
|
|
31
|
+
export * from "./lib/page/PageSectionTitle.js";
|
|
32
|
+
export * from "./lib/page/PageSidebar.js";
|
|
33
|
+
export * from "./lib/page/PageSidebarSection.js";
|
|
34
|
+
export * from "./lib/page/PageStateContainer.js";
|
|
35
|
+
export * from "./lib/page/PageSubSectionTitle.js";
|
|
36
|
+
export * from "./lib/page/PageTitle.js";
|
|
37
|
+
export * from "./lib/page/PageTopBar.js";
|
|
38
|
+
export * from "./lib/status/StatusBadge.js";
|
|
39
|
+
export * from "./lib/table/TableContainer.js";
|
|
40
|
+
export * from "./lib/table/TableCreateButton.js";
|
|
41
|
+
export * from "./lib/table/TableFilterButton.js";
|
|
42
|
+
export * from "./lib/table/TableRowActionBar.js";
|
|
43
|
+
export * from "./lib/table/TableRowActionButton.js";
|
|
44
|
+
export * from "./lib/table/TableRowActionDialogButton.js";
|
|
45
|
+
export * from "./lib/table/TableRowDeleteButton.js";
|
|
46
|
+
export * from "./lib/table/TableRowEditButton.js";
|
|
47
|
+
export * from "./lib/table/TableRowNavigateButton.js";
|
|
48
|
+
export * from "./lib/table/TableRowPublishPostButton.js";
|
|
49
|
+
export * from "./lib/table/TableRowViewButton.js";
|
|
50
|
+
export * from "./lib/table/TableTopBar.js";
|
package/dist/index.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
export * from "./lib/SectionTitle";
|
|
2
|
-
export * from "./lib/breadcrumbs/BreadCrumbs";
|
|
3
|
-
export * from "./lib/buttons/DialogButton";
|
|
4
|
-
export * from "./lib/buttons/InvalidateButton";
|
|
5
|
-
export * from "./lib/buttons/NavigateButton";
|
|
6
|
-
export * from "./lib/buttons/PublishButton";
|
|
7
|
-
export * from "./lib/buttons/UpdateButton";
|
|
8
|
-
export * from "./lib/buttons/ViewButton";
|
|
9
|
-
export * from "./lib/cells/OrderCell";
|
|
10
|
-
export * from "./lib/json/ScreenRenderer";
|
|
11
|
-
export * from "./lib/json/dialog/ItemEditDialog";
|
|
12
|
-
export * from "./lib/json/dialog/ItemDeleteDialog";
|
|
13
|
-
export * from "./lib/json/types/DetailsView";
|
|
14
|
-
export * from "./lib/json/types/EditItemDialog";
|
|
15
|
-
export * from "./lib/json/types/MultiQueryWrapper";
|
|
16
|
-
export * from "./lib/json/types/QueryWrapper";
|
|
17
|
-
export * from "./lib/json/types/QueryWrapperDialog";
|
|
18
|
-
export * from "./lib/json/types/ScreenConfig";
|
|
19
|
-
export * from "./lib/json/types/TabbedView";
|
|
20
|
-
export * from "./lib/json/types/TableView";
|
|
21
|
-
export * from "./lib/layout/AdminLayout";
|
|
22
|
-
export * from "./lib/layout/ButtonBar";
|
|
23
|
-
export * from "./lib/layout/menu/Menu";
|
|
24
|
-
export * from "./lib/layout/menu/MenuConfig";
|
|
25
|
-
export * from "./lib/modal/AttachDialog";
|
|
26
|
-
export * from "./lib/modal/FormActionDialog";
|
|
27
|
-
export * from "./lib/page/PageContainer";
|
|
28
|
-
export * from "./lib/page/PageContentEditor";
|
|
29
|
-
export * from "./lib/page/PageMain";
|
|
30
|
-
export * from "./lib/page/PageQueryStateContainer";
|
|
31
|
-
export * from "./lib/page/PageSectionTitle";
|
|
32
|
-
export * from "./lib/page/PageSidebar";
|
|
33
|
-
export * from "./lib/page/PageSidebarSection";
|
|
34
|
-
export * from "./lib/page/PageStateContainer";
|
|
35
|
-
export * from "./lib/page/PageSubSectionTitle";
|
|
36
|
-
export * from "./lib/page/PageTitle";
|
|
37
|
-
export * from "./lib/page/PageTopBar";
|
|
38
|
-
export * from "./lib/status/StatusBadge";
|
|
39
|
-
export * from "./lib/table/TableContainer";
|
|
40
|
-
export * from "./lib/table/TableCreateButton";
|
|
41
|
-
export * from "./lib/table/TableFilterButton";
|
|
42
|
-
export * from "./lib/table/TableRowActionBar";
|
|
43
|
-
export * from "./lib/table/TableRowActionButton";
|
|
44
|
-
export * from "./lib/table/TableRowActionDialogButton";
|
|
45
|
-
export * from "./lib/table/TableRowDeleteButton";
|
|
46
|
-
export * from "./lib/table/TableRowEditButton";
|
|
47
|
-
export * from "./lib/table/TableRowNavigateButton";
|
|
48
|
-
export * from "./lib/table/TableRowPublishPostButton";
|
|
49
|
-
export * from "./lib/table/TableRowViewButton";
|
|
50
|
-
export * from "./lib/table/TableTopBar";
|
|
1
|
+
export * from "./lib/SectionTitle.js";
|
|
2
|
+
export * from "./lib/breadcrumbs/BreadCrumbs.js";
|
|
3
|
+
export * from "./lib/buttons/DialogButton.js";
|
|
4
|
+
export * from "./lib/buttons/InvalidateButton.js";
|
|
5
|
+
export * from "./lib/buttons/NavigateButton.js";
|
|
6
|
+
export * from "./lib/buttons/PublishButton.js";
|
|
7
|
+
export * from "./lib/buttons/UpdateButton.js";
|
|
8
|
+
export * from "./lib/buttons/ViewButton.js";
|
|
9
|
+
export * from "./lib/cells/OrderCell.js";
|
|
10
|
+
export * from "./lib/json/ScreenRenderer.js";
|
|
11
|
+
export * from "./lib/json/dialog/ItemEditDialog.js";
|
|
12
|
+
export * from "./lib/json/dialog/ItemDeleteDialog.js";
|
|
13
|
+
export * from "./lib/json/types/DetailsView.js";
|
|
14
|
+
export * from "./lib/json/types/EditItemDialog.js";
|
|
15
|
+
export * from "./lib/json/types/MultiQueryWrapper.js";
|
|
16
|
+
export * from "./lib/json/types/QueryWrapper.js";
|
|
17
|
+
export * from "./lib/json/types/QueryWrapperDialog.js";
|
|
18
|
+
export * from "./lib/json/types/ScreenConfig.js";
|
|
19
|
+
export * from "./lib/json/types/TabbedView.js";
|
|
20
|
+
export * from "./lib/json/types/TableView.js";
|
|
21
|
+
export * from "./lib/layout/AdminLayout.js";
|
|
22
|
+
export * from "./lib/layout/ButtonBar.js";
|
|
23
|
+
export * from "./lib/layout/menu/Menu.js";
|
|
24
|
+
export * from "./lib/layout/menu/MenuConfig.js";
|
|
25
|
+
export * from "./lib/modal/AttachDialog.js";
|
|
26
|
+
export * from "./lib/modal/FormActionDialog.js";
|
|
27
|
+
export * from "./lib/page/PageContainer.js";
|
|
28
|
+
export * from "./lib/page/PageContentEditor.js";
|
|
29
|
+
export * from "./lib/page/PageMain.js";
|
|
30
|
+
export * from "./lib/page/PageQueryStateContainer.js";
|
|
31
|
+
export * from "./lib/page/PageSectionTitle.js";
|
|
32
|
+
export * from "./lib/page/PageSidebar.js";
|
|
33
|
+
export * from "./lib/page/PageSidebarSection.js";
|
|
34
|
+
export * from "./lib/page/PageStateContainer.js";
|
|
35
|
+
export * from "./lib/page/PageSubSectionTitle.js";
|
|
36
|
+
export * from "./lib/page/PageTitle.js";
|
|
37
|
+
export * from "./lib/page/PageTopBar.js";
|
|
38
|
+
export * from "./lib/status/StatusBadge.js";
|
|
39
|
+
export * from "./lib/table/TableContainer.js";
|
|
40
|
+
export * from "./lib/table/TableCreateButton.js";
|
|
41
|
+
export * from "./lib/table/TableFilterButton.js";
|
|
42
|
+
export * from "./lib/table/TableRowActionBar.js";
|
|
43
|
+
export * from "./lib/table/TableRowActionButton.js";
|
|
44
|
+
export * from "./lib/table/TableRowActionDialogButton.js";
|
|
45
|
+
export * from "./lib/table/TableRowDeleteButton.js";
|
|
46
|
+
export * from "./lib/table/TableRowEditButton.js";
|
|
47
|
+
export * from "./lib/table/TableRowNavigateButton.js";
|
|
48
|
+
export * from "./lib/table/TableRowPublishPostButton.js";
|
|
49
|
+
export * from "./lib/table/TableRowViewButton.js";
|
|
50
|
+
export * from "./lib/table/TableTopBar.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
|
2
2
|
import { INVALIDATE_API } from "@compill/admin-api";
|
|
3
3
|
import { useApiMutation, useMutate } from "@compill/api";
|
|
4
4
|
import { mdiDatabaseRefreshOutline } from "@mdi/js";
|
|
5
|
-
import { ButtonBarButton } from "../layout/ButtonBar";
|
|
5
|
+
import { ButtonBarButton } from "../layout/ButtonBar.js";
|
|
6
6
|
export function InvalidateButton({ pathOrPermalink, ...props }) {
|
|
7
7
|
const api = INVALIDATE_API.new(pathOrPermalink);
|
|
8
8
|
const mutation = useApiMutation(api.invalidate, api.queryKey);
|
|
@@ -3,7 +3,7 @@ import { useInvalidateMutation } from "@compill/api";
|
|
|
3
3
|
import { mdiEye, mdiEyeOff } from "@mdi/js";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { toast } from "react-toastify";
|
|
6
|
-
import { ButtonBarButton } from "../layout/ButtonBar";
|
|
6
|
+
import { ButtonBarButton } from "../layout/ButtonBar.js";
|
|
7
7
|
export function PublishButton({ status, queryId, api, ...props }) {
|
|
8
8
|
const isDraft = status == "draft";
|
|
9
9
|
const mutation = useInvalidateMutation(isDraft ? api.publish : api.unpublish, api.queryKey, queryId, { networkMode: "always" });
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
|
2
2
|
import { mdiCloudUpload } from "@mdi/js";
|
|
3
3
|
import { useFormikContext } from "formik";
|
|
4
4
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
5
|
-
import { ButtonBarSubmitButton } from "../layout/ButtonBar";
|
|
5
|
+
import { ButtonBarSubmitButton } from "../layout/ButtonBar.js";
|
|
6
6
|
export function UpdateButton({ ...props }) {
|
|
7
7
|
const { dirty, handleSubmit } = useFormikContext() ?? { dirty: false, handleSubmit: undefined, values: {} };
|
|
8
8
|
useHotkeys('ctrl+s', () => { if (dirty && !props.disabled)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
2
|
import { mdiOpenInNew } from "@mdi/js";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ButtonBarButton } from "../layout/ButtonBar";
|
|
4
|
+
import { ButtonBarButton } from "../layout/ButtonBar.js";
|
|
5
5
|
export function ViewButton({ label, path, icon, ...props }) {
|
|
6
6
|
const openPage = React.useCallback(() => {
|
|
7
7
|
window.open(path, '_blank');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SoperioComponent } from "@soperio/react";
|
|
2
|
-
import { DetailsViewConfig } from "./types/DetailsView";
|
|
2
|
+
import { DetailsViewConfig } from "./types/DetailsView.js";
|
|
3
3
|
export declare function DetailsView({ queryField, api, useNextRouter, processInput, screen, tabbed, ...props }: DetailsViewConfig & {
|
|
4
4
|
tabbed?: boolean;
|
|
5
5
|
} & SoperioComponent): JSX.Element;
|
|
@@ -4,12 +4,12 @@ import { FormProvider, FormRenderer, TextArea } from "@compill/form";
|
|
|
4
4
|
import { runIfFn } from "@soperio/react";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { useParams } from "react-router-dom";
|
|
7
|
-
import { PageContainer } from "../page/PageContainer";
|
|
8
|
-
import { PageContentEditor } from "../page/PageContentEditor";
|
|
9
|
-
import { PageQueryStateContainer } from "../page/PageQueryStateContainer";
|
|
10
|
-
import { PageSidebar } from "../page/PageSidebar";
|
|
11
|
-
import { PageSidebarSection } from "../page/PageSidebarSection";
|
|
12
|
-
import { ScreenTopBar } from "./ScreenTopBar";
|
|
7
|
+
import { PageContainer } from "../page/PageContainer.js";
|
|
8
|
+
import { PageContentEditor } from "../page/PageContentEditor.js";
|
|
9
|
+
import { PageQueryStateContainer } from "../page/PageQueryStateContainer.js";
|
|
10
|
+
import { PageSidebar } from "../page/PageSidebar.js";
|
|
11
|
+
import { PageSidebarSection } from "../page/PageSidebarSection.js";
|
|
12
|
+
import { ScreenTopBar } from "./ScreenTopBar.js";
|
|
13
13
|
import { useRouter } from "next/router";
|
|
14
14
|
import { useInvalidatePage } from "@compill/admin-api";
|
|
15
15
|
function useQueryField(queryField, useNextRouter) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ItemEditDialogProps } from "./dialog/ItemEditDialog";
|
|
1
|
+
import { ItemEditDialogProps } from "./dialog/ItemEditDialog.js";
|
|
2
2
|
export declare function EditItemView({ initialValues, ...props }: Omit<ItemEditDialogProps, "show">): JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
2
|
import { runIfFn } from "@soperio/react";
|
|
3
|
-
import { ItemEditDialog } from "./dialog/ItemEditDialog";
|
|
3
|
+
import { ItemEditDialog } from "./dialog/ItemEditDialog.js";
|
|
4
4
|
export function EditItemView({ initialValues, ...props }) {
|
|
5
5
|
return (_jsx(ItemEditDialog, { ...props, initialValues: runIfFn(initialValues, null), show: true }));
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MultiQueryWrapperConfig } from "./types/MultiQueryWrapper";
|
|
1
|
+
import { MultiQueryWrapperConfig } from "./types/MultiQueryWrapper.js";
|
|
2
2
|
import { SoperioComponent } from "@soperio/react";
|
|
3
3
|
export declare function MultiQueryWrapper({ queries, config, tabbed, ...props }: Omit<MultiQueryWrapperConfig, "type"> & {
|
|
4
4
|
tabbed?: boolean;
|
|
@@ -3,7 +3,7 @@ import { useApiQueries } from "@compill/api";
|
|
|
3
3
|
import { useQueryClient } from "@tanstack/react-query";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { useParams } from "react-router-dom";
|
|
6
|
-
import { ScreenRenderer } from "./ScreenRenderer";
|
|
6
|
+
import { ScreenRenderer } from "./ScreenRenderer.js";
|
|
7
7
|
import { isFunction, runIfFn } from "@soperio/react";
|
|
8
8
|
import { QueryLoadingState, RetryOnError } from "@compill/components";
|
|
9
9
|
function useQueries(queries) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryWrapperConfig } from "./types/QueryWrapper";
|
|
1
|
+
import { QueryWrapperConfig } from "./types/QueryWrapper.js";
|
|
2
2
|
import { SoperioComponent } from "@soperio/react";
|
|
3
3
|
import { CRUD_MODEL } from "@compill/api";
|
|
4
4
|
export declare function QueryWrapper<T extends CRUD_MODEL, U>({ api, queryField, fn, transformFn, config, tabbed, ...props }: Omit<QueryWrapperConfig<T, U>, "type"> & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { ScreenRenderer } from "./ScreenRenderer";
|
|
3
|
+
import { ScreenRenderer } from "./ScreenRenderer.js";
|
|
4
4
|
import { isFunction, runIfFn } from "@soperio/react";
|
|
5
5
|
import { useParams } from "react-router-dom";
|
|
6
6
|
import { useApiQuery } from "@compill/api";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "@soperio/jsx-runtime";
|
|
2
|
-
import { DetailsView } from "./DetailsView";
|
|
3
|
-
import { QueryWrapper } from "./QueryWrapper";
|
|
4
|
-
import { TabbedView } from "./TabbedView";
|
|
5
|
-
import { TableView } from "./table/TableView";
|
|
6
|
-
import { MultiQueryWrapper } from "./MultiQueryWrapper";
|
|
2
|
+
import { DetailsView } from "./DetailsView.js";
|
|
3
|
+
import { QueryWrapper } from "./QueryWrapper.js";
|
|
4
|
+
import { TabbedView } from "./TabbedView.js";
|
|
5
|
+
import { TableView } from "./table/TableView.js";
|
|
6
|
+
import { MultiQueryWrapper } from "./MultiQueryWrapper.js";
|
|
7
7
|
export function ScreenRenderer({ config, tabbed, ...props }) {
|
|
8
8
|
if (config.type === "table")
|
|
9
9
|
return _jsx(TableView, { ...config, ...props });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API } from "@compill/admin-api";
|
|
2
|
-
import { Breadcrumb } from "../breadcrumbs/BreadCrumbs";
|
|
3
|
-
import { DetailViewButton } from "./types/DetailsView";
|
|
2
|
+
import { Breadcrumb } from "../breadcrumbs/BreadCrumbs.js";
|
|
3
|
+
import { DetailViewButton } from "./types/DetailsView.js";
|
|
4
4
|
import { CRUDAPI } from "@compill/api";
|
|
5
5
|
interface ScreenTopBarProps {
|
|
6
6
|
tabbed?: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
2
|
import { API } from "@compill/admin-api";
|
|
3
|
-
import { InvalidateButton } from "../buttons/InvalidateButton";
|
|
4
|
-
import { PublishButton } from "../buttons/PublishButton";
|
|
5
|
-
import { UpdateButton } from "../buttons/UpdateButton";
|
|
6
|
-
import { ViewButton } from "../buttons/ViewButton";
|
|
7
|
-
import { PageTopBar, PageTopBarToolbar } from "../page/PageTopBar";
|
|
3
|
+
import { InvalidateButton } from "../buttons/InvalidateButton.js";
|
|
4
|
+
import { PublishButton } from "../buttons/PublishButton.js";
|
|
5
|
+
import { UpdateButton } from "../buttons/UpdateButton.js";
|
|
6
|
+
import { ViewButton } from "../buttons/ViewButton.js";
|
|
7
|
+
import { PageTopBar, PageTopBarToolbar } from "../page/PageTopBar.js";
|
|
8
8
|
import React from "react";
|
|
9
|
-
import { ButtonBar } from "../layout/ButtonBar";
|
|
9
|
+
import { ButtonBar } from "../layout/ButtonBar.js";
|
|
10
10
|
export function ScreenTopBar({ tabbed, breadcrumbs, api, item, isLoading, buttonBar, trackingRef }) {
|
|
11
11
|
return (_jsxs(_Fragment, { children: [tabbed &&
|
|
12
12
|
(_jsx(PageTopBarToolbar, { trackingRef: trackingRef, children: _jsx(Buttons, { api: api, item: item, isLoading: isLoading, buttonBar: buttonBar }) })), !tabbed &&
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TabbedViewConfig } from "./types/TabbedView";
|
|
1
|
+
import { TabbedViewConfig } from "./types/TabbedView.js";
|
|
2
2
|
import { SoperioComponent } from "@soperio/react";
|
|
3
3
|
export declare function TabbedView({ queryField, api, screen, ...props }: TabbedViewConfig & SoperioComponent): JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
2
|
import { useParams } from "react-router-dom";
|
|
3
|
-
import { PageQueryStateContainer } from "../page/PageQueryStateContainer";
|
|
4
|
-
import { PageTabbedTopBar, PageTabbedTopBarProvider } from "../page/PageTopBar";
|
|
3
|
+
import { PageQueryStateContainer } from "../page/PageQueryStateContainer.js";
|
|
4
|
+
import { PageTabbedTopBar, PageTabbedTopBarProvider } from "../page/PageTopBar.js";
|
|
5
5
|
import { TabContainer } from "@compill/components";
|
|
6
6
|
import { runIfFn } from "@soperio/react";
|
|
7
|
-
import { ScreenRenderer } from "./ScreenRenderer";
|
|
7
|
+
import { ScreenRenderer } from "./ScreenRenderer.js";
|
|
8
8
|
export function TabbedView({ queryField, api, screen, ...props }) {
|
|
9
9
|
const { [queryField]: id } = useParams();
|
|
10
10
|
return (_jsx(PageQueryStateContainer, { queryId: id, api: api, apiFn: "get", p: "5", children: (city) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EditItemDialogConfig } from "../types/EditItemDialog";
|
|
2
|
-
import { QueryWrapperDialogConfig } from "../types/QueryWrapperDialog";
|
|
3
|
-
import { MultiQueryWrapperDialogConfig } from "../types/MultiQueryWrapperDialog";
|
|
1
|
+
import { EditItemDialogConfig } from "../types/EditItemDialog.js";
|
|
2
|
+
import { QueryWrapperDialogConfig } from "../types/QueryWrapperDialog.js";
|
|
3
|
+
import { MultiQueryWrapperDialogConfig } from "../types/MultiQueryWrapperDialog.js";
|
|
4
4
|
interface DialogRendererProps {
|
|
5
5
|
config: EditItemDialogConfig | QueryWrapperDialogConfig<any> | MultiQueryWrapperDialogConfig;
|
|
6
6
|
onClose: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
|
-
import { ItemEditDialog } from "./ItemEditDialog";
|
|
3
|
-
import { QueryWrapperDialog } from "./QueryWrapperDialog";
|
|
4
|
-
import { MultiQueryWrapperDialog } from "./MultiQueryWrapperDialog";
|
|
2
|
+
import { ItemEditDialog } from "./ItemEditDialog.js";
|
|
3
|
+
import { QueryWrapperDialog } from "./QueryWrapperDialog.js";
|
|
4
|
+
import { MultiQueryWrapperDialog } from "./MultiQueryWrapperDialog.js";
|
|
5
5
|
export function DialogRenderer({ config, onClose, invalidateQueryKey, queryId }) {
|
|
6
6
|
const { type, ...props } = config;
|
|
7
7
|
if (config.type === "dialog")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MultiQueryWrapperDialogConfig } from "../types/MultiQueryWrapperDialog";
|
|
1
|
+
import { MultiQueryWrapperDialogConfig } from "../types/MultiQueryWrapperDialog.js";
|
|
2
2
|
export type MultiQueryWrapperDialogProps = Omit<MultiQueryWrapperDialogConfig, "type"> & {
|
|
3
3
|
queryId?: string;
|
|
4
4
|
onClose: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
2
|
import { useApiQueries } from "@compill/api";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ItemEditDialog } from "./ItemEditDialog";
|
|
4
|
+
import { ItemEditDialog } from "./ItemEditDialog.js";
|
|
5
5
|
export function MultiQueryWrapperDialog({ queries, config, onClose, queryId, invalidateQueryKey }) {
|
|
6
6
|
const { data, isFetching, isError } = useApiQueries(queries.map(q => ({
|
|
7
7
|
queryKey: q.api.queryKey,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CRUDAPI, CRUD_MODEL } from "@compill/api";
|
|
2
|
-
import { QueryWrapperDialogConfig } from "../types/QueryWrapperDialog";
|
|
3
|
-
import { EditItemDialogConfig } from "../types/EditItemDialog";
|
|
2
|
+
import { QueryWrapperDialogConfig } from "../types/QueryWrapperDialog.js";
|
|
3
|
+
import { EditItemDialogConfig } from "../types/EditItemDialog.js";
|
|
4
4
|
export type QueryWrapperDialogProps<T extends CRUD_MODEL, U> = Omit<QueryWrapperDialogConfig<T, U>, "type"> & {
|
|
5
5
|
api: CRUDAPI<any>;
|
|
6
6
|
fn: "get" | "getTransformed" | "getAll" | "getAllTransformed";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
2
2
|
import { useApiQuery } from "@compill/api";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { ItemEditDialog } from "./ItemEditDialog";
|
|
4
|
+
import { ItemEditDialog } from "./ItemEditDialog.js";
|
|
5
5
|
export function QueryWrapperDialog({ api, fn, transformFn, config, onClose, queryId, invalidateQueryKey }) {
|
|
6
6
|
const { data, isFetching } = useApiQuery(api.queryKey, fn === "get" || fn === "getTransformed" ? api.get : api.getAll, undefined, { retryOnMount: false, refetchOnMount: false, refetchOnWindowFocus: false });
|
|
7
7
|
const transformedData = React.useMemo(() => {
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "@soperio/jsx-runtime";
|
|
|
2
2
|
import { useInvalidateQuery } from "@compill/api";
|
|
3
3
|
import { mdiRefresh } from "@mdi/js";
|
|
4
4
|
import { Icon } from "@valerya/ui";
|
|
5
|
-
import { ButtonBarButton } from "../../layout/ButtonBar";
|
|
5
|
+
import { ButtonBarButton } from "../../layout/ButtonBar.js";
|
|
6
6
|
import { useHotkeys } from "react-hotkeys-hook";
|
|
7
7
|
export function RefreshButton({ queryKey }) {
|
|
8
8
|
const invalidate = useInvalidateQuery(queryKey);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@soperio/jsx-runtime";
|
|
2
2
|
import { mdiDelete, mdiEye, mdiOpenInNew, mdiPencil } from "@mdi/js";
|
|
3
3
|
import { Icon } from "@valerya/ui";
|
|
4
|
-
import { TableRowPublishPostButton } from "./TableRowPublishPostButton";
|
|
4
|
+
import { TableRowPublishPostButton } from "./TableRowPublishPostButton.js";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { TableRowActionButton } from "@compill/admin";
|
|
7
7
|
import { runIfFn } from "@soperio/react";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SoperioComponent } from "@soperio/react";
|
|
2
|
-
import { TableViewConfig } from "../types/TableView";
|
|
2
|
+
import { TableViewConfig } from "../types/TableView.js";
|
|
3
3
|
export declare function TableView({ queryField, title, subtitle, screen, ...props }: Omit<TableViewConfig, "type"> & SoperioComponent): JSX.Element;
|
|
@@ -3,19 +3,19 @@ import { Table, useTableContext } from "@compill/table";
|
|
|
3
3
|
import { isFunction, runIfFn } from "@soperio/react";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { useParams } from "react-router-dom";
|
|
6
|
-
import { InvalidateButton } from "../../buttons/InvalidateButton";
|
|
7
|
-
import { PageContainer } from "../../page/PageContainer";
|
|
8
|
-
import { TableContainer } from "../../table/TableContainer";
|
|
9
|
-
import { TableCreateButton } from "../../table/TableCreateButton";
|
|
10
|
-
import { TableFilterButton } from "../../table/TableFilterButton";
|
|
11
|
-
import { TableTopBar } from "../../table/TableTopBar";
|
|
12
|
-
import { ButtonBar } from "../../layout/ButtonBar";
|
|
13
|
-
import { TableFilters } from "../../table/TableFilters";
|
|
14
|
-
import { TableMassActions } from "../../table/TableMassActions";
|
|
15
|
-
import { DialogRenderer } from "../dialog/DialogRenderer";
|
|
16
|
-
import { RefreshButton } from "./RefreshButton";
|
|
17
|
-
import { TableViewProvider, useTableViewContext } from "./TableViewContext";
|
|
18
|
-
import { useTableProps } from "./useTableProps";
|
|
6
|
+
import { InvalidateButton } from "../../buttons/InvalidateButton.js";
|
|
7
|
+
import { PageContainer } from "../../page/PageContainer.js";
|
|
8
|
+
import { TableContainer } from "../../table/TableContainer.js";
|
|
9
|
+
import { TableCreateButton } from "../../table/TableCreateButton.js";
|
|
10
|
+
import { TableFilterButton } from "../../table/TableFilterButton.js";
|
|
11
|
+
import { TableTopBar } from "../../table/TableTopBar.js";
|
|
12
|
+
import { ButtonBar } from "../../layout/ButtonBar.js";
|
|
13
|
+
import { TableFilters } from "../../table/TableFilters.js";
|
|
14
|
+
import { TableMassActions } from "../../table/TableMassActions.js";
|
|
15
|
+
import { DialogRenderer } from "../dialog/DialogRenderer.js";
|
|
16
|
+
import { RefreshButton } from "./RefreshButton.js";
|
|
17
|
+
import { TableViewProvider, useTableViewContext } from "./TableViewContext.js";
|
|
18
|
+
import { useTableProps } from "./useTableProps.js";
|
|
19
19
|
function useId(queryField) {
|
|
20
20
|
const params = useParams();
|
|
21
21
|
if (queryField === undefined)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TableRowAction, TableViewDeleteItem, TableViewEditView } from "../types/TableView";
|
|
2
|
+
import { TableRowAction, TableViewDeleteItem, TableViewEditView } from "../types/TableView.js";
|
|
3
3
|
type TableViewContextProps = {
|
|
4
4
|
onAction: (action: TableRowAction, item: any) => void;
|
|
5
5
|
dialog?: React.ReactNode;
|
|
@@ -3,8 +3,8 @@ import { useOpenLink } from "@compill/hooks";
|
|
|
3
3
|
import { createContext, runIfFn } from "@soperio/react";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { useNavigate } from "react-router-dom";
|
|
6
|
-
import { DialogRenderer } from "../dialog/DialogRenderer";
|
|
7
|
-
import { ItemDeleteDialog } from "../dialog/ItemDeleteDialog";
|
|
6
|
+
import { DialogRenderer } from "../dialog/DialogRenderer.js";
|
|
7
|
+
import { ItemDeleteDialog } from "../dialog/ItemDeleteDialog.js";
|
|
8
8
|
import { AppEnv } from "@compill/env";
|
|
9
9
|
const [provider, useContext] = createContext();
|
|
10
10
|
function TableViewProvider({ editView, deleteItem, queryKey, children }) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { API } from "@compill/admin-api";
|
|
2
|
-
import { TableRowAction, TableViewTable } from "../types/TableView";
|
|
2
|
+
import { TableRowAction, TableViewTable } from "../types/TableView.js";
|
|
3
3
|
export declare function useTableProps(api: API<any>, table: TableViewTable, rowActions?: TableRowAction[] | ((item?: any) => TableRowAction[]), queryParams?: any): any;
|
|
@@ -4,8 +4,8 @@ import { runIfFn } from "@soperio/react";
|
|
|
4
4
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
5
5
|
import React from "react";
|
|
6
6
|
import { useNavigate } from "react-router-dom";
|
|
7
|
-
import { TableRowActionsView } from "./TableRowActionsView";
|
|
8
|
-
import { useTableViewContext } from "./TableViewContext";
|
|
7
|
+
import { TableRowActionsView } from "./TableRowActionsView.js";
|
|
8
|
+
import { useTableViewContext } from "./TableViewContext.js";
|
|
9
9
|
import { useRouter } from "next/router";
|
|
10
10
|
import { AppEnv } from "@compill/env";
|
|
11
11
|
export function useTableProps(api, table, rowActions, queryParams) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { API } from "@compill/admin-api";
|
|
2
2
|
import * as Yup from "yup";
|
|
3
|
-
import { Breadcrumb } from "../../breadcrumbs/BreadCrumbs";
|
|
3
|
+
import { Breadcrumb } from "../../breadcrumbs/BreadCrumbs.js";
|
|
4
4
|
import { FormRendererConfig } from "@compill/form";
|
|
5
5
|
import { CRUDAPI } from "@compill/api";
|
|
6
6
|
export type DetailsViewConfig<T = any> = {
|