Skip to content

Commit

Permalink
Replace packages/base & packages/drupal with mlf variant
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanMiu committed May 15, 2024
1 parent 7be4f70 commit 0cb3060
Show file tree
Hide file tree
Showing 80 changed files with 554 additions and 1,533 deletions.
12 changes: 4 additions & 8 deletions packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,30 @@
"antd": "^5.16.5",
"classnames": "^2.5.1",
"dom-serializer": "^2.0.0",
"friendly-challenge": "^0.9.15",
"html-react-parser": "^5.1.10",
"isomorphic-dompurify": "^2.7.0",
"lodash": "^4.17.21",
"next": "^13.5.6",
"next-auth": "4.24.7",
"next-drupal": "^1.6.0",
"pdfjs-dist": "3.4.120",
"yup": "^1.4.0"
"pdfjs-dist": "3.4.120"
},
"devDependencies": {
"@csstools/postcss-global-data": "^2.1.1",
"eslint-config-custom": "workspace:*",
"tsconfig": "workspace:*",
"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^15.0.5",
"@turbo/gen": "^1.13.3",
"@types/lodash": "^4.17.1",
"@types/node": "^20.12.7",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"eslint-config-custom": "workspace:*",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"postcss": "^8.4.38",
"postcss-preset-env": "^9.5.9",
"react": "^18.3.1",
"sass": "^1.75.0",
"tsconfig": "workspace:*",
"typescript": "5.4.5"
}
}
}
2 changes: 1 addition & 1 deletion packages/base/src/breakpoints.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import breakpoints from './styles/vars/breakpoints.module.scss'
import breakpoints from './styles/breakpoints.module.scss'

const baseBreakpoints = Object.fromEntries(
Object.entries(breakpoints).map(([k, v]) => [k, parseInt(v)]),
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/colors.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import colors from './styles/vars/colors.module.scss'
import colors from './styles/colors.module.scss'

export default colors
8 changes: 0 additions & 8 deletions packages/base/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
// Theme
export * from './theme/App/App'
export * from './theme/BackToTop/BackToTop'
export * from './theme/Layout/DefaultLayout'
// Utils
export * from './utils/BodyClassname/BodyClassname'
export * from './utils/Form/Field'
// Widgets
export * from './utils/Widgets/ActionWidget'
export * from './utils/Widgets/EmailWidget'
export * from './utils/Widgets/TextWidget'
export * from './utils/Widgets/TextareaWidget'
21 changes: 5 additions & 16 deletions packages/base/src/components/theme/Errors/Error.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { Col, Row } from 'antd'

import Error401 from './401'
import Error403 from './403'
import Error404 from './404'
Expand All @@ -20,20 +18,11 @@ export default function Error({ children, error }: any) {
return <Error500 />
default:
return statusCode ? (
<div className={`error-${statusCode}`}>
<Row align="middle" justify="center">
<Col>
<div className="global">
<h1>{statusCode}</h1>
<p>
{statusCode
? `An error occurred on server`
: 'An error occurred on client'}
</p>
</div>
</Col>
</Row>
</div>
<p>
{statusCode
? `An error ${statusCode} occurred on server`
: 'An error occurred on client'}
</p>
) : (
<ErrorBoundary>{children}</ErrorBoundary>
)
Expand Down
42 changes: 0 additions & 42 deletions packages/base/src/components/theme/Errors/WidgetError.tsx

This file was deleted.

48 changes: 0 additions & 48 deletions packages/base/src/components/utils/Form/Field.tsx

This file was deleted.

29 changes: 0 additions & 29 deletions packages/base/src/components/utils/Widgets/ActionWidget.tsx

This file was deleted.

58 changes: 0 additions & 58 deletions packages/base/src/components/utils/Widgets/CaptchaWidget.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions packages/base/src/components/utils/Widgets/EmailWidget.tsx

This file was deleted.

15 changes: 0 additions & 15 deletions packages/base/src/components/utils/Widgets/TextWidget.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions packages/base/src/components/utils/Widgets/TextareaWidget.tsx

This file was deleted.

10 changes: 0 additions & 10 deletions packages/base/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import type { ConfigRegistry } from './types'

import { validationsMapping } from './config/Validations'
import { defaultWidget, widgetsMapping } from './config/Widgets'

const registry: ConfigRegistry = {
apiHandlers: [],
validationsMapping: {
...validationsMapping,
},
widgets: {
defaultWidget,
...widgetsMapping,
},
}

export default registry
32 changes: 0 additions & 32 deletions packages/base/src/config/Validations.tsx

This file was deleted.

Loading

0 comments on commit 0cb3060

Please sign in to comment.