Skip to content

Commit 175fb35

Browse files
AliKdhim87Yolijn
authored andcommitted
fix: supports the openform HTML with nl-design-system
1 parent ddc7c7e commit 175fb35

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

.changeset/small-seals-type.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@frameless/pdc-frontend": patch
3+
---
4+
5+
Render de Open Formulieren HTML met NL Design System CSS componenten.

apps/pdc-frontend/package.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,22 @@
5454
"devDependencies": {
5555
"@graphql-codegen/cli": "5.0.2",
5656
"@graphql-codegen/client-preset": "4.1.0",
57+
"@testing-library/jest-dom": "6.4.5",
58+
"@testing-library/react": "15.0.7",
59+
"@types/jest": "29.5.12",
5760
"@types/lodash.mergewith": "4.6.9",
5861
"@utrecht/focus-ring-css": "1.1.0",
5962
"@utrecht/form-label-css": "1.1.0",
60-
"@utrecht/table-css": "1.4.0",
6163
"@utrecht/spotlight-section-css": "1.6.0",
6264
"@utrecht/multiline-data-css": "1.1.0",
6365
"@utrecht/textbox-css": "1.2.0",
64-
"eslint-config-next": "13.2.4",
6566
"eslint": "8.35.0",
66-
"sass": "1.63.6",
67-
"wait-on": "7.2.0",
67+
"eslint-config-next": "13.2.4",
6868
"jest": "29.7.0",
6969
"jest-environment-jsdom": "29.7.0",
70-
"@testing-library/react": "15.0.7",
71-
"@testing-library/jest-dom": "6.4.5",
70+
"sass": "1.63.6",
7271
"ts-node": "10.9.2",
73-
"@types/jest": "29.5.12"
72+
"wait-on": "7.2.0"
7473
},
7574
"repository": {
7675
"type": "git+ssh",

apps/pdc-frontend/src/components/OpenFormsEmbed/OpenFormsEmbed.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import "~@utrecht/multiline-data-css/src/mixin";
22
@import "~@utrecht/form-label-css/src/mixin";
33
@import "~@utrecht/textbox-css/src/mixin";
4-
@import "~@utrecht/table-css/src/html/mixin";
54
@import "~@utrecht/spotlight-section-css/src/mixin";
65

76
:root {
@@ -69,10 +68,6 @@
6968
flex: 1 1;
7069
}
7170

72-
.openforms-body .openforms-body--wysiwyg {
73-
@include utrecht-html-table;
74-
}
75-
7671
.openforms-formio-content {
7772
&--info {
7873
--of-formio-content-info-border-inline-start-style: none;

apps/pdc-frontend/src/components/OpenFormsEmbed/OpenFormsEmbed.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React, { type ReactNode, useId } from 'react';
22
import { OpenFormsScript } from './OpenFormsScript';
33
import '@open-formulieren/sdk/styles.css';
4+
import '@utrecht/component-library-css/dist/html.css';
45
import './OpenFormsEmbed.scss';
6+
import { RichText } from '../index';
57

68
export type OpenFormsEmbedProps = {
79
nonce: string;
@@ -17,12 +19,14 @@ export const OpenFormsEmbed = ({ nonce, basePath, slug, apiUrl, sdkUrl, cssUrl,
1719
const id = useId();
1820

1921
return (
20-
<>
21-
<div id={id} data-base-url={apiUrl} data-form-id={slug} data-base-path={basePath}>
22-
{fallback}
23-
</div>
24-
<link rel="stylesheet" nonce={nonce} href={cssUrl} />
25-
<OpenFormsScript targetId={id} nonce={nonce} src={sdkUrl} />
26-
</>
22+
<div className="utrecht-html">
23+
<RichText>
24+
<div id={id} data-base-url={apiUrl} data-form-id={slug} data-base-path={basePath}>
25+
{fallback}
26+
</div>
27+
<link rel="stylesheet" nonce={nonce} href={cssUrl} />
28+
<OpenFormsScript targetId={id} nonce={nonce} src={sdkUrl} />
29+
</RichText>
30+
</div>
2731
);
2832
};

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8345,11 +8345,6 @@
83458345
resolved "https://registry.yarnpkg.com/@utrecht/spotlight-section-css/-/spotlight-section-css-1.6.0.tgz#4966e3e6eba2eda10d2dd357bc12f65455de221e"
83468346
integrity sha512-dUKcskHCIbzbJKjsd591ogKqfbQeoDVgOnNUZcT80hz3Fdj+84/axQF4ZccuxyhJ7oRNdJlr2wnx9BzvkQCfJg==
83478347

8348-
"@utrecht/table-css@1.4.0":
8349-
version "1.4.0"
8350-
resolved "https://registry.yarnpkg.com/@utrecht/table-css/-/table-css-1.4.0.tgz#fc675468cd887f301af895f72f26cc4d69fd857d"
8351-
integrity sha512-D2JvmGY9uf2/N/wiq4XbX5/9Gz5iTIsjiJF4huFmP+XRB7zzSwPTWgC/AdQWtIUiYlWQMFvvB6bOMtCIUq9eKA==
8352-
83538348
"@utrecht/textbox-css@1.2.0":
83548349
version "1.2.0"
83558350
resolved "https://registry.yarnpkg.com/@utrecht/textbox-css/-/textbox-css-1.2.0.tgz#41be4783d178ab227b9bd188253407a688e69226"

0 commit comments

Comments
 (0)