Skip to content

Commit

Permalink
Merge pull request #3 from slub/feature/31-05-24-monorepo
Browse files Browse the repository at this point in the history
Feature/31 05 24 monorepo
  • Loading branch information
bastiion authored May 31, 2024
2 parents ce2e742 + 42c448c commit a7f1738
Show file tree
Hide file tree
Showing 160 changed files with 1,468 additions and 1,946 deletions.
1 change: 1 addition & 0 deletions apps/exhibition-live/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const config: StorybookConfig = {
stories: [
"../components/**/*.mdx",
"../components/**/*.stories.@(js|jsx|ts|tsx)",
"../../../packages/**/*.stories.@(js|jsx|ts|tsx)",
],

addons: [
Expand Down
10 changes: 6 additions & 4 deletions apps/exhibition-live/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import theme from "../components/theme/berry-theme";
import { CssBaseline, ThemeProvider } from "@mui/material";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { QueryClient, QueryClientProvider } from "@slub/edb-state-hooks";

import { BASE_IRI, PUBLIC_BASE_PATH } from "../components/config";
import { AdbProvider, store } from "@slub/edb-state-hooks";
import { EntityDetailModal } from "../components/form/show";
import { EditEntityModal } from "../components/form/edit/EditEntityModal";
import { EntityDetailModal } from "@slub/edb-advanced-components";
import { Provider } from "react-redux";
import { AppRouterContext } from "next/dist/shared/lib/app-router-context.shared-runtime";
import SemanticJsonForm from "../components/form/SemanticJsonForm";
import { exhibitionConfig } from "../components/config/exhibitionAppConfig";
import { SemanticJsonFormNoOps } from "@slub/edb-linked-data-renderer";
import { SimilarityFinder } from "../components/form/SimilarityFinder";

export const parameters = {
nextRouter: {
Expand Down Expand Up @@ -60,7 +61,8 @@ export const withMuiTheme = (Story) => {
components={{
EntityDetailModal: EntityDetailModal,
EditEntityModal: EditEntityModal,
SemanticJsonForm: SemanticJsonForm,
SemanticJsonForm: SemanticJsonFormNoOps,
SimilarityFinder: SimilarityFinder,
}}
useRouterHook={useRouterMock}
>
Expand Down
163 changes: 0 additions & 163 deletions apps/exhibition-live/components/config/LobidMaping.stories.tsx

This file was deleted.

1 change: 0 additions & 1 deletion apps/exhibition-live/components/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from "./lobidMappings";
export * from "./primaryFields";
export * from "./permissions";
export * from "./typeIRIToTypeName";
export * from "./schema";
export * from "./rendererRegistry";
export * from "./primaryFieldsRegistry";
export * from "./makeDefaultUiSchemaForAllDefinitions";
48 changes: 26 additions & 22 deletions apps/exhibition-live/components/config/rendererRegistry.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { materialRenderers } from "@jsonforms/material-renderers";
import MaterialCustomAnyOfRenderer, {
materialCustomAnyOfControlTester,
} from "../renderer/MaterialCustomAnyOfRenderer";
import {
MaterialBooleanControl,
materialRenderers,
} from "@jsonforms/material-renderers";
import {
and,
isObjectArray,
Expand All @@ -12,27 +12,31 @@ import {
scopeEndsWith,
UISchemaElement,
} from "@jsonforms/core";
import ImageRenderer from "../renderer/ImageRenderer";
import AutoIdentifierRenderer from "../renderer/AutoIdentifierRenderer";
import TypeOfRenderer from "../renderer/TypeOfRenderer";
import { JSONSchema7 } from "json-schema";
import MaterialArrayOfLinkedItemRenderer from "../renderer/MaterialArrayOfLinkedItemRenderer";
import { materialArrayLayoutChipsTester } from "../renderer";
import MaterialArrayOfLinkedItemChipsRenderer from "../renderer/MaterialArrayOfLinkedItemChipsRenderer";
import { isEmpty } from "lodash";
import InlineCondensedSemanticFormsRenderer from "../renderer/InlineCondensedSemanticFormsRenderer";
import InlineDropdownRenderer from "../renderer/InlineDropdownRenderer";
import MaterialLinkedObjectRenderer, {
materialLinkedObjectControlTester,
} from "../renderer/MaterialLinkedObjectRenderer";
import AdbSpecialDateRenderer, {
adbSpecialDateControlTester,
} from "../renderer/AdbSpecialDateRenderer";
import MaterialBooleanControl, {
materialBooleanControlTester,
} from "../renderer/MaterialBooleanControl";
import { withJsonFormsControlProps } from "@jsonforms/react";
import { MarkdownTextFieldRendererComponent } from "@slub/edb-markdown-renderer";
import {
materialCustomAnyOfControlTester,
MaterialCustomAnyOfRenderer,
} from "@slub/edb-layout-renderer";
import {
adbSpecialDateControlTester,
AdbSpecialDateRenderer,
AutoIdentifierRenderer,
ImageRenderer,
materialBooleanControlTester,
TypeOfRenderer,
} from "@slub/edb-basic-renderer";
import {
InlineCondensedSemanticFormsRenderer,
InlineDropdownRenderer,
materialArrayChipsLayoutTester,
MaterialArrayOfLinkedItemChipsRenderer,
MaterialArrayOfLinkedItemRenderer,
materialLinkedObjectControlTester,
MaterialLinkedObjectRenderer,
} from "@slub/edb-linked-data-renderer";

export const rendererRegistry: JsonFormsRendererRegistryEntry[] = [
...materialRenderers,
Expand Down Expand Up @@ -75,7 +79,7 @@ export const rendererRegistry: JsonFormsRendererRegistryEntry[] = [
renderer: MaterialArrayOfLinkedItemRenderer,
},
{
tester: materialArrayLayoutChipsTester,
tester: materialArrayChipsLayoutTester,
renderer: MaterialArrayOfLinkedItemChipsRenderer,
},
{
Expand Down
3 changes: 0 additions & 3 deletions apps/exhibition-live/components/config/schema.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/exhibition-live/components/config/uischemata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const uischemata = {
Location: LocationUISchema,
Person: PersonUISchema,
Place: PlaceUISchema,
Tag: TagUISchema,
//Tag: TagUISchema,
SeriesType: SeriesTypeUISchema,
Workplace: WorkplaceUISchema,
ExhibitionSeries: ExhibitionSeriesUISchema,
Expand Down
20 changes: 3 additions & 17 deletions apps/exhibition-live/components/content/list/TypedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ import {
NoteAdd,
OpenInNew,
} from "@mui/icons-material";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { SemanticFormsModal } from "../../renderer/SemanticFormsModal";
import { useMutation, useQuery, useQueryClient } from "@slub/edb-state-hooks";
import NiceModal from "@ebay/nice-modal-react";
import { useSnackbar } from "notistack";
import { JsonSchema } from "@jsonforms/core";
import Button from "@mui/material/Button";
import { download, generateCsv, mkConfig } from "export-to-csv";
import { useSettings, useExtendedSchema } from "@slub/edb-state-hooks";
Expand Down Expand Up @@ -307,8 +305,9 @@ export const TypedList = ({ typeName }: Props) => {
type: "moveToTrash",
}).then(async () => {
enqueueSnackbar("About to move to trash", { variant: "info" });
return await moveToTrashAsync(id);
await moveToTrashAsync(id);
enqueueSnackbar("Moved to trash", { variant: "success" });
return;
});
},
[moveToTrashAsync, enqueueSnackbar],
Expand Down Expand Up @@ -475,19 +474,6 @@ export const TypedList = ({ typeName }: Props) => {
localization,
rowCount: resultList.length,
enableRowActions: true,
renderCreateRowDialogContent: ({ table, row }) => {
return (
<SemanticFormsModal
open={true}
askClose={() => table.setCreatingRow(row)}
schema={extendedSchema as JsonSchema}
entityIRI={createEntityIRI(uuidv4())}
typeIRI={typeIRI}
>
<MRT_EditActionButtons variant="text" table={table} row={row} />
</SemanticFormsModal>
);
},
renderTopToolbarCustomActions: ({ table }) => (
<Box sx={{ display: "flex", gap: "1rem" }}>
<Button
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import get from "lodash/get";
import { JSONSchema7, JSONSchema7Definition } from "json-schema";
import { MRT_ColumnDef, MRT_TableInstance } from "material-react-table";
import { OverflowContainer, OverflowChip } from "../../lists";
import { OverflowContainer, OverflowChip } from "@slub/edb-basic-components";
import { Avatar, Box, Checkbox, Grid, Link, Typography } from "@mui/material";
import isNil from "lodash/isNil";
import maxBy from "lodash/maxBy";
Expand Down
2 changes: 1 addition & 1 deletion apps/exhibition-live/components/content/main/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from "@mui/material";
import Grid2 from "@mui/material/Unstable_Grid2";
import { TrendingDown, TrendingUp } from "@mui/icons-material";
import { useQuery } from "@tanstack/react-query";
import { useQuery } from "@slub/edb-state-hooks";
import { useAdbContext, useGlobalCRUDOptions } from "@slub/edb-state-hooks";
import { SELECT } from "@tpluscode/sparql-builder";
import { orderBy } from "lodash";
Expand Down
2 changes: 1 addition & 1 deletion apps/exhibition-live/components/content/main/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import IconButton from "@mui/material/IconButton";
import SearchIcon from "@mui/icons-material/Search";
import { ParentSize } from "@visx/responsive";
import { useCallback, useMemo, useState } from "react";
import { useQuery } from "@tanstack/react-query";
import { useQuery } from "@slub/edb-state-hooks";
import { useAdbContext, useGlobalCRUDOptions } from "@slub/edb-state-hooks";
import { SELECT } from "@tpluscode/sparql-builder";
import df from "@rdfjs/data-model";
Expand Down
6 changes: 3 additions & 3 deletions apps/exhibition-live/components/content/main/TypedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Box, Grid } from "@mui/material";
import { JSONSchema7 } from "json-schema";
import React, { useCallback, useMemo, useState } from "react";

import { materialCategorizationStepperLayoutWithPortal } from "../../renderer/MaterialCategorizationStepperLayoutWithPortal";
import {
useAdbContext,
useFormEditor,
Expand All @@ -12,10 +11,11 @@ import {
useSettings,
} from "@slub/edb-state-hooks";
import { encodeIRI, irisToData } from "@slub/edb-ui-utils";
import NewSemanticJsonForm from "../../form/SemanticJsonForm";
import { EntityDetailElement } from "../../form/show";
import NewSemanticJsonForm from "../../form/SemanticJsonFormOperational";
import { useFormDataStore, useExtendedSchema } from "@slub/edb-state-hooks";
import { useCRUDWithQueryClient } from "@slub/edb-state-hooks";
import { EntityDetailElement } from "@slub/edb-advanced-components";
import { materialCategorizationStepperLayoutWithPortal } from "@slub/edb-layout-renderer";

type Props = {
children: React.ReactChild;
Expand Down
Loading

0 comments on commit a7f1738

Please sign in to comment.