@chobantonov/jsonforms-react-antd-webcomponent 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +86 -2
- package/dist/JsonFormsAntdElement.d.ts +26 -0
- package/dist/index.d.ts +3 -0
- package/dist/jsonforms-react-antd.js +1 -0
- package/dist/register.d.ts +1 -0
- package/dist/register.js +6 -0
- package/dist/register.js.map +1 -0
- package/dist/renderers.d.ts +2 -0
- package/dist/src-BFTWxxIf.mjs +202 -0
- package/dist/src-BFTWxxIf.mjs.map +1 -0
- package/dist/standalone/AgGridControlRenderer.impl-BZS8_ocu-B7smOgCn.mjs +39186 -0
- package/dist/standalone/AgGridControlRenderer.impl-BZS8_ocu-B7smOgCn.mjs.map +1 -0
- package/dist/standalone/DynamicJSXRenderer-DyB3ZpZV-DwdyKIB1.mjs +14894 -0
- package/dist/standalone/DynamicJSXRenderer-DyB3ZpZV-DwdyKIB1.mjs.map +1 -0
- package/dist/standalone/MarkupLabelRenderer.impl-CWfdcUuH-D5lfFu1i.mjs +12 -0
- package/dist/standalone/MarkupLabelRenderer.impl-CWfdcUuH-D5lfFu1i.mjs.map +1 -0
- package/dist/standalone/MonacoControlRenderer.impl-CyjMHbOd-CQ8xjLar.mjs +774 -0
- package/dist/standalone/MonacoControlRenderer.impl-CyjMHbOd-CQ8xjLar.mjs.map +1 -0
- package/dist/standalone/RactiveTemplate-Cat7CxUp-BXSHwrZ1.mjs +8028 -0
- package/dist/standalone/RactiveTemplate-Cat7CxUp-BXSHwrZ1.mjs.map +1 -0
- package/dist/standalone/bg-peTJz2yn.mjs +54 -0
- package/dist/standalone/bg-peTJz2yn.mjs.map +1 -0
- package/dist/standalone/bg_BG-B44LSCyD.mjs +222 -0
- package/dist/standalone/bg_BG-B44LSCyD.mjs.map +1 -0
- package/dist/standalone/celTemplate-D_AGhaIL-RG6XN-Eu.mjs +137 -0
- package/dist/standalone/celTemplate-D_AGhaIL-RG6XN-Eu.mjs.map +1 -0
- package/dist/standalone/common-BEnIxhFt.mjs +18 -0
- package/dist/standalone/common-BEnIxhFt.mjs.map +1 -0
- package/dist/standalone/dayjs.min-adoc_mEQ.mjs +300 -0
- package/dist/standalone/dayjs.min-adoc_mEQ.mjs.map +1 -0
- package/dist/standalone/dynamicCel.esm-DGWfIAPF.mjs +43 -0
- package/dist/standalone/dynamicCel.esm-DGWfIAPF.mjs.map +1 -0
- package/dist/standalone/en-D7K60EG2.mjs +25 -0
- package/dist/standalone/en-D7K60EG2.mjs.map +1 -0
- package/dist/standalone/en_US-Bk9ytucu.mjs +223 -0
- package/dist/standalone/en_US-Bk9ytucu.mjs.map +1 -0
- package/dist/standalone/es-BToyXotK.mjs +51 -0
- package/dist/standalone/es-BToyXotK.mjs.map +1 -0
- package/dist/standalone/es_ES-n86UqGMA.mjs +245 -0
- package/dist/standalone/es_ES-n86UqGMA.mjs.map +1 -0
- package/dist/standalone/fr-DlN8a0TJ.mjs +52 -0
- package/dist/standalone/fr-DlN8a0TJ.mjs.map +1 -0
- package/dist/standalone/fr_FR-BNIh97oT.mjs +223 -0
- package/dist/standalone/fr_FR-BNIh97oT.mjs.map +1 -0
- package/dist/standalone/index.js +56734 -0
- package/dist/standalone/index.js.map +1 -0
- package/dist/standalone/it-0HHNpxpp.mjs +51 -0
- package/dist/standalone/it-0HHNpxpp.mjs.map +1 -0
- package/dist/standalone/it_IT-COjke9P6.mjs +245 -0
- package/dist/standalone/it_IT-COjke9P6.mjs.map +1 -0
- package/dist/standalone/ja-CqnjT8BB.mjs +57 -0
- package/dist/standalone/ja-CqnjT8BB.mjs.map +1 -0
- package/dist/standalone/ja_JP-DA4GA8OS.mjs +248 -0
- package/dist/standalone/ja_JP-DA4GA8OS.mjs.map +1 -0
- package/dist/standalone/jsonforms-react-extended.esm-CQmkt5NG.mjs +13673 -0
- package/dist/standalone/jsonforms-react-extended.esm-CQmkt5NG.mjs.map +1 -0
- package/dist/standalone/lib-0rajvaUg.mjs +3170 -0
- package/dist/standalone/lib-0rajvaUg.mjs.map +1 -0
- package/dist/standalone/markdown-C_y73Q0w-CfLH-8Sz.mjs +3061 -0
- package/dist/standalone/markdown-C_y73Q0w-CfLH-8Sz.mjs.map +1 -0
- package/dist/standalone/nl-CFqJarW7.mjs +52 -0
- package/dist/standalone/nl-CFqJarW7.mjs.map +1 -0
- package/dist/standalone/nl_NL-4FmulTf3.mjs +222 -0
- package/dist/standalone/nl_NL-4FmulTf3.mjs.map +1 -0
- package/dist/standalone/objectSpread2-C50HRvBU.mjs +71 -0
- package/dist/standalone/pl-Du1zDNA_.mjs +71 -0
- package/dist/standalone/pl-Du1zDNA_.mjs.map +1 -0
- package/dist/standalone/pl_PL-CBfuF99B.mjs +248 -0
- package/dist/standalone/pl_PL-CBfuF99B.mjs.map +1 -0
- package/dist/standalone/plainRecord.esm-BR1q_7e9.mjs +30 -0
- package/dist/standalone/plainRecord.esm-BR1q_7e9.mjs.map +1 -0
- package/dist/standalone/pt-Dg1pEKF5.mjs +52 -0
- package/dist/standalone/pt-Dg1pEKF5.mjs.map +1 -0
- package/dist/standalone/pt_PT--r6dtf89.mjs +268 -0
- package/dist/standalone/pt_PT--r6dtf89.mjs.map +1 -0
- package/dist/standalone/react-dom-Slk9aa5V.mjs +5644 -0
- package/dist/standalone/react-dom-Slk9aa5V.mjs.map +1 -0
- package/dist/standalone/rolldown-runtime-DUcC5eAW.mjs +26 -0
- package/dist/standalone/rowDetail.esm-Ce56gyeo.mjs +770 -0
- package/dist/standalone/rowDetail.esm-Ce56gyeo.mjs.map +1 -0
- package/dist/standalone/ru-CeNU1BY9.mjs +74 -0
- package/dist/standalone/ru-CeNU1BY9.mjs.map +1 -0
- package/dist/standalone/ru_RU-CIRMzMfd.mjs +245 -0
- package/dist/standalone/ru_RU-CIRMzMfd.mjs.map +1 -0
- package/dist/standalone/tr-Demj1YNf.mjs +51 -0
- package/dist/standalone/tr-Demj1YNf.mjs.map +1 -0
- package/dist/standalone/tr_TR-DOU85NN8.mjs +245 -0
- package/dist/standalone/tr_TR-DOU85NN8.mjs.map +1 -0
- package/dist/standalone/uk-Dq-ndPcu.mjs +67 -0
- package/dist/standalone/uk-Dq-ndPcu.mjs.map +1 -0
- package/dist/standalone/uk_UA-_65wU-M8.mjs +245 -0
- package/dist/standalone/uk_UA-_65wU-M8.mjs.map +1 -0
- package/dist/standalone/zh-cn-DteM8IK0.mjs +60 -0
- package/dist/standalone/zh-cn-DteM8IK0.mjs.map +1 -0
- package/dist/standalone/zh_CN-BaFiZ2OD.mjs +226 -0
- package/dist/standalone/zh_CN-BaFiZ2OD.mjs.map +1 -0
- package/package.json +62 -3
- package/src/JsonFormsAntdElement.tsx +327 -0
- package/src/index.tsx +4 -0
- package/src/register.ts +5 -0
- package/src/renderers.ts +20 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Krasimir Chobantonov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,87 @@
|
|
|
1
|
-
#
|
|
1
|
+
# React Ant Design Web Component
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`<jsonforms-react-antd>` includes the Ant Design base and extended renderer
|
|
4
|
+
registries. Its browser distribution is `dist/standalone/`: a registration
|
|
5
|
+
module and supporting chunks that load directly in a plain HTML page.
|
|
6
|
+
|
|
7
|
+
## Plain HTML and self-hosting
|
|
8
|
+
|
|
9
|
+
Run `pnpm run wc:antd:build` from the workspace root. Copy the entire
|
|
10
|
+
`dist/standalone/` directory to your web server. Serve it over HTTP(S), then
|
|
11
|
+
load `index.js` as a module:
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<!doctype html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="utf-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
19
|
+
<title>Ant Design JSON Forms</title>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<jsonforms-react-antd id="form"></jsonforms-react-antd>
|
|
23
|
+
<pre id="result"></pre>
|
|
24
|
+
<script type="module" src="./standalone/index.js"></script>
|
|
25
|
+
<script type="module">
|
|
26
|
+
await customElements.whenDefined('jsonforms-react-antd');
|
|
27
|
+
const form = document.getElementById('form');
|
|
28
|
+
form.addEventListener('change', (event) => {
|
|
29
|
+
if (event instanceof CustomEvent) {
|
|
30
|
+
document.getElementById('result').textContent = JSON.stringify(
|
|
31
|
+
event.detail.data,
|
|
32
|
+
null,
|
|
33
|
+
2,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
form.schema = {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: { name: { type: 'string' } },
|
|
40
|
+
};
|
|
41
|
+
form.uischema = { type: 'Control', scope: '#/properties/name' };
|
|
42
|
+
form.data = { name: 'Ada' };
|
|
43
|
+
</script>
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The module registers the custom element automatically. Keep its supporting
|
|
49
|
+
chunks beside `index.js`; the bundle loads them by relative URL when needed.
|
|
50
|
+
|
|
51
|
+
## npm CDN after publication
|
|
52
|
+
|
|
53
|
+
Once a version is published to npm, replace `VERSION` with that exact version
|
|
54
|
+
and use **one** of these script tags in place of the local `src` above:
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<script
|
|
58
|
+
type="module"
|
|
59
|
+
src="https://cdn.jsdelivr.net/npm/@chobantonov/jsonforms-react-antd-webcomponent@VERSION/dist/standalone/index.js"
|
|
60
|
+
></script>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Or use UNPKG:
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<script
|
|
67
|
+
type="module"
|
|
68
|
+
src="https://unpkg.com/@chobantonov/jsonforms-react-antd-webcomponent@VERSION/dist/standalone/index.js"
|
|
69
|
+
></script>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Neither React Web Component package is currently on public npm, so those URLs
|
|
73
|
+
are templates, not live examples. The existing `dist/register.js` and
|
|
74
|
+
`dist/jsonforms-react-antd.js` are application-bundler modules with bare package
|
|
75
|
+
imports; they cannot be loaded directly from a plain HTML page through a file
|
|
76
|
+
CDN. [UNPKG](https://unpkg.com/) and [jsDelivr](https://www.jsdelivr.com/documentation)
|
|
77
|
+
serve published npm files by version and path.
|
|
78
|
+
|
|
79
|
+
## Application bundlers
|
|
80
|
+
|
|
81
|
+
In a TypeScript application, import `registerJsonFormsAntd` from
|
|
82
|
+
`@chobantonov/jsonforms-react-antd-webcomponent` and call it before creating
|
|
83
|
+
the element. The app's bundler resolves its React, Ant Design, and JSON Forms
|
|
84
|
+
peer dependencies. The element accepts `schema`, `uischema`, `data`, `config`,
|
|
85
|
+
and `external` as JavaScript properties or JSON string attributes. It emits
|
|
86
|
+
`change` and `handle-action` events. See the
|
|
87
|
+
[dynamic UI guide](../../docs/dynamic-ui.md) for overlay configuration.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FormElement, type FormElementState } from '@chobantonov/jsonforms-react-renderer-common/webcomponent/element';
|
|
2
|
+
import { type AjvLocalizers } from '@chobantonov/jsonforms-react-antd-extended-renderers';
|
|
3
|
+
import { createTranslator, parseBoolean, parseJson, parseMode, type JsonInput } from '@chobantonov/jsonforms-react-renderer-common/webcomponent/input';
|
|
4
|
+
export { createTranslator, parseBoolean, parseJson, parseMode };
|
|
5
|
+
export type { JsonInput };
|
|
6
|
+
export declare const JSON_FORMS_ANTD_TAG = "jsonforms-react-antd";
|
|
7
|
+
export declare const setAjvLocalizers: (localizers: AjvLocalizers | undefined) => void;
|
|
8
|
+
export declare class JsonFormsAntdElement extends FormElement {
|
|
9
|
+
static get observedAttributes(): string[];
|
|
10
|
+
private root?;
|
|
11
|
+
private ajv;
|
|
12
|
+
readonly errorStore: import("@chobantonov/jsonforms-react-extended-renderers").AdditionalErrorStore;
|
|
13
|
+
private colorScheme?;
|
|
14
|
+
private renderQueued;
|
|
15
|
+
private connectionVersion;
|
|
16
|
+
protected state: FormElementState;
|
|
17
|
+
constructor();
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
private handleColorSchemeChange;
|
|
21
|
+
protected setValue(name: string, value: JsonInput): void;
|
|
22
|
+
private scheduleRender;
|
|
23
|
+
private dispatch;
|
|
24
|
+
private render;
|
|
25
|
+
}
|
|
26
|
+
export declare const registerJsonFormsAntd: (tagName?: string) => CustomElementConstructor;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as JSON_FORMS_ANTD_TAG, r as JsonFormsAntdElement, t as TRUST_DYNAMIC_FUNCTIONS, u as antdWebcomponentCells, d as antdWebcomponentRenderers, i as createTranslator, a as parseBoolean, o as parseJson, s as parseMode, c as registerJsonFormsAntd, l as setAjvLocalizers } from "./src-BFTWxxIf.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index';
|
package/dist/register.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, i as r, l as i, n as a, o, r as s, s as c, t as l, u } from "./src-BFTWxxIf.mjs";
|
|
2
|
+
// src/register.ts
|
|
3
|
+
t();
|
|
4
|
+
export { a as JSON_FORMS_ANTD_TAG, s as JsonFormsAntdElement, l as TRUST_DYNAMIC_FUNCTIONS, u as antdWebcomponentCells, n as antdWebcomponentRenderers, r as createTranslator, e as parseBoolean, o as parseJson, c as parseMode, t as registerJsonFormsAntd, i as setAjvLocalizers };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=register.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","names":["parseBoolean","registerJsonFormsAntd","antdWebcomponentRenderers","createTranslator","setAjvLocalizers","JSON_FORMS_ANTD_TAG","JsonFormsAntdElement","parseMode","TRUST_DYNAMIC_FUNCTIONS","antdWebcomponentCells","parseJson"],"sources":["../src/register.ts"],"sourcesContent":["import { registerJsonFormsAntd } from './index';\n\nregisterJsonFormsAntd();\n\nexport * from './index';\n"],"mappings":";;AAEAC,EAAsB"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { defaultTranslator as e } from "@jsonforms/core";
|
|
2
|
+
import { FormElement as t, formAttributes as n } from "@chobantonov/jsonforms-react-renderer-common/webcomponent/element";
|
|
3
|
+
import { ExtendedJsonForms as r, TRUST_DYNAMIC_FUNCTIONS as i, antdExtendedCells as a, antdExtendedRenderers as o, createAdditionalErrorStore as s, createAjvErrorTranslator as c, createFormsAjv as l } from "@chobantonov/jsonforms-react-antd-extended-renderers";
|
|
4
|
+
import { antdCells as u, antdRenderers as d, useAntdLocale as f } from "@chobantonov/jsonforms-react-antd-renderers";
|
|
5
|
+
import { ConfigProvider as p, Form as m, theme as h } from "antd";
|
|
6
|
+
import "react";
|
|
7
|
+
import { createRoot as g } from "react-dom/client";
|
|
8
|
+
import { StyleProvider as _ } from "@ant-design/cssinjs";
|
|
9
|
+
import { createTranslator as v, parseBoolean as y, parseJson as b, parseMode as x } from "@chobantonov/jsonforms-react-renderer-common/webcomponent/input";
|
|
10
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
11
|
+
// src/renderers.ts
|
|
12
|
+
var w = [...d, ...o], T = [...u, ...a];
|
|
13
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js
|
|
14
|
+
function E(e, t) {
|
|
15
|
+
if (e == null) return {};
|
|
16
|
+
var n = {};
|
|
17
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
18
|
+
if (t.includes(r)) continue;
|
|
19
|
+
n[r] = e[r];
|
|
20
|
+
}
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutProperties.js
|
|
24
|
+
function D(e, t) {
|
|
25
|
+
if (e == null) return {};
|
|
26
|
+
var n, r, i = E(e, t);
|
|
27
|
+
if (Object.getOwnPropertySymbols) {
|
|
28
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
29
|
+
for (r = 0; r < a.length; r++) n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (i[n] = e[n]);
|
|
30
|
+
}
|
|
31
|
+
return i;
|
|
32
|
+
}
|
|
33
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
|
|
34
|
+
function O(e) {
|
|
35
|
+
"@babel/helpers - typeof";
|
|
36
|
+
return O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
37
|
+
return typeof e;
|
|
38
|
+
} : function(e) {
|
|
39
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
40
|
+
}, O(e);
|
|
41
|
+
}
|
|
42
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
|
|
43
|
+
function k(e, t) {
|
|
44
|
+
if (O(e) != "object" || !e) return e;
|
|
45
|
+
var n = e[Symbol.toPrimitive];
|
|
46
|
+
if (n !== void 0) {
|
|
47
|
+
var r = n.call(e, t || "default");
|
|
48
|
+
if (O(r) != "object") return r;
|
|
49
|
+
throw TypeError("@@toPrimitive must return a primitive value.");
|
|
50
|
+
}
|
|
51
|
+
return (t === "string" ? String : Number)(e);
|
|
52
|
+
}
|
|
53
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
|
|
54
|
+
function A(e) {
|
|
55
|
+
var t = k(e, "string");
|
|
56
|
+
return O(t) == "symbol" ? t : t + "";
|
|
57
|
+
}
|
|
58
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
|
|
59
|
+
function j(e, t, n) {
|
|
60
|
+
return (t = A(t)) in e ? Object.defineProperty(e, t, {
|
|
61
|
+
value: n,
|
|
62
|
+
enumerable: !0,
|
|
63
|
+
configurable: !0,
|
|
64
|
+
writable: !0
|
|
65
|
+
}) : e[t] = n, e;
|
|
66
|
+
}
|
|
67
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectSpread2.js
|
|
68
|
+
function M(e, t) {
|
|
69
|
+
var n = Object.keys(e);
|
|
70
|
+
if (Object.getOwnPropertySymbols) {
|
|
71
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
72
|
+
t && (r = r.filter(function(t) {
|
|
73
|
+
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
74
|
+
})), n.push.apply(n, r);
|
|
75
|
+
}
|
|
76
|
+
return n;
|
|
77
|
+
}
|
|
78
|
+
function N(e) {
|
|
79
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
80
|
+
var n = arguments[t] == null ? {} : arguments[t];
|
|
81
|
+
t % 2 ? M(Object(n), !0).forEach(function(t) {
|
|
82
|
+
j(e, t, n[t]);
|
|
83
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : M(Object(n)).forEach(function(t) {
|
|
84
|
+
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
return e;
|
|
88
|
+
}
|
|
89
|
+
// src/JsonFormsAntdElement.tsx
|
|
90
|
+
var P = ["localeTag", "children"], F = "jsonforms-react-antd", I = (e) => {
|
|
91
|
+
let { localeTag: t, children: n } = e, r = D(e, P);
|
|
92
|
+
return /* @__PURE__ */ S(p, N(N({}, r), {}, {
|
|
93
|
+
locale: f(t),
|
|
94
|
+
children: n
|
|
95
|
+
}));
|
|
96
|
+
}, L, R = (e) => {
|
|
97
|
+
L = e;
|
|
98
|
+
}, z = class extends t {
|
|
99
|
+
static get observedAttributes() {
|
|
100
|
+
return n;
|
|
101
|
+
}
|
|
102
|
+
constructor() {
|
|
103
|
+
super(), j(this, "root", void 0), j(this, "ajv", l({ i18n: () => ({
|
|
104
|
+
locale: this.state.locale,
|
|
105
|
+
translate: this.state.translations ? v(this.state.translations, this.state.locale) : e
|
|
106
|
+
}) })), j(this, "errorStore", s()), j(this, "colorScheme", void 0), j(this, "renderQueued", !1), j(this, "connectionVersion", 0), j(this, "state", {
|
|
107
|
+
validationMode: "ValidateAndShow",
|
|
108
|
+
locale: "en",
|
|
109
|
+
mode: "system",
|
|
110
|
+
readonly: !1,
|
|
111
|
+
customStyle: ""
|
|
112
|
+
}), j(this, "handleColorSchemeChange", () => this.scheduleRender()), this.attachShadow({ mode: "open" });
|
|
113
|
+
}
|
|
114
|
+
connectedCallback() {
|
|
115
|
+
this.shadowRoot && (this.connectionVersion += 1, this.root != null || (this.root = g(this.shadowRoot)), this.colorScheme = window.matchMedia("(prefers-color-scheme: dark)"), this.colorScheme.addEventListener("change", this.handleColorSchemeChange), this.scheduleRender());
|
|
116
|
+
}
|
|
117
|
+
disconnectedCallback() {
|
|
118
|
+
var e;
|
|
119
|
+
let t = ++this.connectionVersion, n = this.root;
|
|
120
|
+
(e = this.colorScheme) == null || e.removeEventListener("change", this.handleColorSchemeChange), this.colorScheme = void 0, queueMicrotask(() => {
|
|
121
|
+
this.isConnected || t !== this.connectionVersion || n !== this.root || (n == null || n.unmount(), n === this.root && (this.root = void 0));
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
setValue(e, t) {
|
|
125
|
+
let n = e.replace(/-([a-z])/g, (e, t) => t.toUpperCase());
|
|
126
|
+
this.state = N(N({}, this.state), {}, { [n]: t }), this.scheduleRender();
|
|
127
|
+
}
|
|
128
|
+
scheduleRender() {
|
|
129
|
+
this.renderQueued || (this.renderQueued = !0, queueMicrotask(() => {
|
|
130
|
+
this.renderQueued = !1, this.isConnected && this.render();
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
dispatch(e, t) {
|
|
134
|
+
this.dispatchEvent(new CustomEvent(e, {
|
|
135
|
+
detail: t,
|
|
136
|
+
bubbles: !0,
|
|
137
|
+
composed: !0
|
|
138
|
+
}));
|
|
139
|
+
}
|
|
140
|
+
render() {
|
|
141
|
+
var e, t, n, i, a, o, s, l;
|
|
142
|
+
if (!this.root) return;
|
|
143
|
+
let u = this.readFormInput();
|
|
144
|
+
if (!u) return;
|
|
145
|
+
let { schema: d, data: f } = u, p = (e = y(this.state.readonly)) != null && e, g = x(this.state.mode), E = (t = y(this.state.dark)) == null ? g === "dark" || g === "system" && !!((n = this.colorScheme) != null && n.matches) : t, D = (i = y(this.state.rtl)) != null && i, O = b(this.state.config), k = this.state.translations ? v(this.state.translations, this.state.locale) : void 0, A = L ? c(L, () => this.state.locale) : void 0, j = (a = b(this.state.rendererSettings)) == null ? {} : a;
|
|
146
|
+
this.root.render(/* @__PURE__ */ S(_, {
|
|
147
|
+
container: (o = this.shadowRoot) == null ? void 0 : o,
|
|
148
|
+
children: /* @__PURE__ */ S(I, {
|
|
149
|
+
localeTag: this.state.locale,
|
|
150
|
+
direction: D ? "rtl" : "ltr",
|
|
151
|
+
getPopupContainer: () => {
|
|
152
|
+
var e, t;
|
|
153
|
+
return (e = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".jsonforms-react-antd")) == null ? this : e;
|
|
154
|
+
},
|
|
155
|
+
theme: { algorithm: E ? h.darkAlgorithm : h.defaultAlgorithm },
|
|
156
|
+
children: /* @__PURE__ */ C("div", {
|
|
157
|
+
className: E ? "jsonforms-react-antd dark" : "jsonforms-react-antd",
|
|
158
|
+
dir: D ? "rtl" : "ltr",
|
|
159
|
+
children: [
|
|
160
|
+
/* @__PURE__ */ S("style", { children: `
|
|
161
|
+
:host { display: block; color-scheme: ${E ? "dark" : "light"}; }
|
|
162
|
+
.jsonforms-react-antd { box-sizing: border-box; min-width: 0; color-scheme: light; background: #fff; color: rgba(0, 0, 0, 0.88); }
|
|
163
|
+
.jsonforms-react-antd.dark { color-scheme: dark; background: #141414; color: rgba(255, 255, 255, 0.88); }
|
|
164
|
+
${(s = this.state.customStyle) == null ? "" : s}
|
|
165
|
+
` }),
|
|
166
|
+
/* @__PURE__ */ S("slot", { name: "styles" }),
|
|
167
|
+
/* @__PURE__ */ S("slot", { name: "form-header" }),
|
|
168
|
+
/* @__PURE__ */ S(m, {
|
|
169
|
+
layout: "vertical",
|
|
170
|
+
variant: (l = j.inputVariant) == null ? "outlined" : l,
|
|
171
|
+
children: /* @__PURE__ */ S(r, {
|
|
172
|
+
external: b(this.state.external),
|
|
173
|
+
store: this.errorStore,
|
|
174
|
+
onAction: (e) => this.dispatch("handle-action", e),
|
|
175
|
+
data: f,
|
|
176
|
+
schema: d,
|
|
177
|
+
uischema: b(this.state.uischema),
|
|
178
|
+
uischemas: b(this.state.uischemas),
|
|
179
|
+
config: N(N({}, O), {}, { readonly: p }),
|
|
180
|
+
readonly: p,
|
|
181
|
+
validationMode: this.state.validationMode,
|
|
182
|
+
i18n: N({
|
|
183
|
+
locale: this.state.locale,
|
|
184
|
+
translate: k
|
|
185
|
+
}, A ? { translateError: A } : {}),
|
|
186
|
+
additionalErrors: b(this.state.additionalErrors),
|
|
187
|
+
ajv: this.ajv,
|
|
188
|
+
renderers: w,
|
|
189
|
+
cells: T,
|
|
190
|
+
onChange: (e) => this.dispatch("change", e)
|
|
191
|
+
})
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ S("slot", { name: "form-footer" })
|
|
194
|
+
]
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
}, B = (e = F) => customElements.get(e) || (customElements.define(e, z), z);
|
|
200
|
+
export { y as a, B as c, w as d, v as i, R as l, F as n, b as o, z as r, x as s, i as t, T as u };
|
|
201
|
+
|
|
202
|
+
//# sourceMappingURL=src-BFTWxxIf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"src-BFTWxxIf.mjs","names":["antdTheme","antdWebcomponentRenderers","antdRenderers","antdExtendedRenderers","antdWebcomponentCells","antdCells","antdExtendedCells","_objectWithoutPropertiesLoose","r","t","n","e","_objectWithoutProperties","o","s","_typeof","toPrimitive","i","toPropertyKey","_defineProperty","ownKeys","_objectSpread2","_excluded","JSON_FORMS_ANTD_TAG","LocalizedConfigProvider","_ref","rest","ConfigProvider","useAntdLocale","localeTag","ajvLocalizers","setAjvLocalizers","localizers","JsonFormsAntdElement","FormElement","formAttributes","createFormsAjv","createTranslator","defaultTranslator","createAdditionalErrorStore","createRoot","_this$colorScheme","connectionVersion","root","key","name","char","value","_parseBoolean","_parseBoolean2","_this$colorScheme2","_parseBoolean3","_parseJson","_this$shadowRoot","_this$state$customSty","_rendererSettings$inp","input","readonly","parseBoolean","selectedMode","parseMode","dark","rtl","config","parseJson","translate","translateError","createAjvErrorTranslator","rendererSettings","StyleProvider","_this$shadowRoot$quer","_this$shadowRoot2","theme","Form","ExtendedJsonForms","event","registerJsonFormsAntd","tagName","TRUST_DYNAMIC_FUNCTIONS"],"sources":["../src/renderers.ts","../src/JsonFormsAntdElement.tsx"],"sourcesContent":["import {\n antdCells,\n antdRenderers,\n} from '@chobantonov/jsonforms-react-antd-renderers';\nimport {\n antdExtendedCells,\n antdExtendedRenderers,\n} from '@chobantonov/jsonforms-react-antd-extended-renderers';\n\nexport const antdWebcomponentRenderers = [\n ...antdRenderers,\n ...antdExtendedRenderers,\n];\n/*\n The extended cells are concatenated, not omitted: a column whose schema says\n `format: \"color\"` or `format: \"duration\"` would otherwise fall back to a\n plain text cell, because both controls exist only in the renderer registry\n and array columns dispatch through the cells registry.\n*/\nexport const antdWebcomponentCells = [...antdCells, ...antdExtendedCells];\n","import { defaultTranslator } from '@jsonforms/core';\nimport {\n FormElement,\n formAttributes,\n type FormElementState,\n} from '@chobantonov/jsonforms-react-renderer-common/webcomponent/element';\nimport {\n ExtendedJsonForms,\n createAdditionalErrorStore,\n createFormsAjv,\n createAjvErrorTranslator,\n type AjvLocalizers,\n} from '@chobantonov/jsonforms-react-antd-extended-renderers';\nimport { antdWebcomponentCells, antdWebcomponentRenderers } from './renderers';\nimport { ConfigProvider, Form, InputProps, theme as antdTheme } from 'antd';\nimport { useAntdLocale } from '@chobantonov/jsonforms-react-antd-renderers';\nimport React from 'react';\nimport { createRoot, Root } from 'react-dom/client';\nimport { StyleProvider } from '@ant-design/cssinjs';\nimport {\n createTranslator,\n parseBoolean,\n parseJson,\n parseMode,\n type JsonInput,\n} from '@chobantonov/jsonforms-react-renderer-common/webcomponent/input';\n\nexport { createTranslator, parseBoolean, parseJson, parseMode };\nexport type { JsonInput };\n\nexport const JSON_FORMS_ANTD_TAG = 'jsonforms-react-antd';\n\n/**\n * `ConfigProvider`, told which language it is in.\n *\n * antd owns a second set of strings the form never authors - month names,\n * \"Today\", \"OK\", a select's empty text - and they stay English unless its\n * locale is set. The locale is fetched as its own chunk on first use, so a\n * build carries every supported language without shipping them all.\n *\n * `locale` being undefined is antd's own default, which is English. That is\n * what a tag this build does not carry falls back to, and a form in English\n * chrome is a better outcome than one that will not render.\n */\nconst LocalizedConfigProvider = ({\n localeTag,\n children,\n ...rest\n}: Omit<React.ComponentProps<typeof ConfigProvider>, 'locale'> & {\n localeTag?: string;\n}) => (\n <ConfigProvider {...rest} locale={useAntdLocale(localeTag)}>\n {children}\n </ConfigProvider>\n);\n\n/**\n * Ajv's **own** message localizers, off by default.\n *\n * `ajv-i18n` ships around twenty languages, and importing them is a fixed cost\n * a distributed web component should not pay for a form that never changes\n * locale. Schema-authored `errorMessage` text is translated regardless,\n * through the element's own `translations` - that needs no locale data.\n *\n * A host that wants \"must be >= 5\" in its language opts in at startup, before\n * any element is upgraded:\n *\n * ```ts\n * import { setAjvLocalizers } from '@chobantonov/jsonforms-react-antd-webcomponent';\n * import { ajvLocalizers } from '@chobantonov/jsonforms-react-extended-renderers/ajv-localizers';\n *\n * setAjvLocalizers(ajvLocalizers);\n * ```\n *\n * or carries only what it ships, which is the point of the option:\n *\n * ```ts\n * setAjvLocalizers({ bg: localizeBg });\n * ```\n *\n * Read through a getter by the validator, so setting it after an element has\n * been created still takes effect on the next validation.\n */\nlet ajvLocalizers: AjvLocalizers | undefined;\n\nexport const setAjvLocalizers = (localizers: AjvLocalizers | undefined) => {\n ajvLocalizers = localizers;\n};\n\nexport class JsonFormsAntdElement extends FormElement {\n static get observedAttributes() {\n return formAttributes;\n }\n\n private root?: Root;\n /*\n Per element, not per render: Ajv caches compiled schemas, and a fresh\n instance each paint would recompile the whole schema on every keystroke.\n */\n private ajv = createFormsAjv({\n /*\n A getter, read at validation time: one element outlives many locales,\n and the validator is created once per element (below), so capturing the\n state here would freeze whichever locale happened to be set first.\n\n This localizes **schema-authored** `errorMessage` text, which costs\n nothing to carry. Ajv's *own* messages (\"must be >= 5\") stay English\n unless the host also supplies `localizers` - that import pulls every\n language `ajv-i18n` ships, which a distributed bundle should opt into\n rather than inherit. See `setAjvLocalizers` below.\n */\n i18n: () => ({\n locale: this.state.locale,\n translate: this.state.translations\n ? createTranslator(this.state.translations, this.state.locale)\n : defaultTranslator,\n }),\n /*\n Deliberately absent from here in the common case: Ajv's own messages are\n localized at render time instead (see `translateError` below), because\n core does not revalidate on a locale change and a message produced\n during validation would stay in the previous language.\n */\n });\n /*\n Per element, like the validator: a store is the identity errors are\n published against, and it outlives every render of this element.\n */\n readonly errorStore = createAdditionalErrorStore();\n private colorScheme?: MediaQueryList;\n private renderQueued = false;\n private connectionVersion = 0;\n protected state: FormElementState = {\n validationMode: 'ValidateAndShow',\n locale: 'en',\n mode: 'system',\n readonly: false,\n customStyle: '',\n };\n\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n\n connectedCallback() {\n if (!this.shadowRoot) return;\n this.connectionVersion += 1;\n this.root ??= createRoot(this.shadowRoot);\n this.colorScheme = window.matchMedia('(prefers-color-scheme: dark)');\n this.colorScheme.addEventListener('change', this.handleColorSchemeChange);\n this.scheduleRender();\n }\n\n disconnectedCallback() {\n const connectionVersion = ++this.connectionVersion;\n const root = this.root;\n this.colorScheme?.removeEventListener(\n 'change',\n this.handleColorSchemeChange,\n );\n this.colorScheme = undefined;\n\n queueMicrotask(() => {\n if (\n this.isConnected ||\n connectionVersion !== this.connectionVersion ||\n root !== this.root\n ) {\n return;\n }\n root?.unmount();\n if (root === this.root) this.root = undefined;\n });\n }\n\n private handleColorSchemeChange = () => this.scheduleRender();\n\n protected setValue(name: string, value: JsonInput) {\n const key = name.replace(/-([a-z])/g, (_, char) => char.toUpperCase());\n this.state = {\n ...this.state,\n [key]: value,\n };\n this.scheduleRender();\n }\n\n private scheduleRender() {\n if (this.renderQueued) return;\n this.renderQueued = true;\n queueMicrotask(() => {\n this.renderQueued = false;\n if (this.isConnected) this.render();\n });\n }\n\n private dispatch(name: string, detail: unknown) {\n this.dispatchEvent(\n new CustomEvent(name, {\n detail,\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n private render() {\n if (!this.root) return;\n\n const input = this.readFormInput();\n if (!input) return;\n const { schema, data } = input;\n\n const readonly = parseBoolean(this.state.readonly) ?? false;\n const selectedMode = parseMode(this.state.mode);\n const dark =\n parseBoolean(this.state.dark) ??\n (selectedMode === 'dark' ||\n (selectedMode === 'system' && Boolean(this.colorScheme?.matches)));\n const rtl = parseBoolean(this.state.rtl) ?? false;\n const config = parseJson(this.state.config) as\n | Record<string, unknown>\n | undefined;\n const translate = this.state.translations\n ? createTranslator(this.state.translations, this.state.locale)\n : undefined;\n /*\n Only when the host has opted into locale data; without it core's default\n translator applies, which leaves Ajv's English wording alone.\n */\n const translateError = ajvLocalizers\n ? createAjvErrorTranslator(ajvLocalizers, () => this.state.locale)\n : undefined;\n const rendererSettings =\n (parseJson(this.state.rendererSettings) as Record<string, unknown>) ?? {};\n\n this.root.render(\n <StyleProvider container={this.shadowRoot ?? undefined}>\n <LocalizedConfigProvider\n localeTag={this.state.locale}\n direction={rtl ? 'rtl' : 'ltr'}\n getPopupContainer={() =>\n (this.shadowRoot?.querySelector(\n '.jsonforms-react-antd',\n ) as HTMLElement | null) ?? this\n }\n theme={{\n algorithm: dark\n ? antdTheme.darkAlgorithm\n : antdTheme.defaultAlgorithm,\n }}\n >\n <div\n className={\n dark ? 'jsonforms-react-antd dark' : 'jsonforms-react-antd'\n }\n dir={rtl ? 'rtl' : 'ltr'}\n >\n <style>{`\n :host { display: block; color-scheme: ${dark ? 'dark' : 'light'}; }\n .jsonforms-react-antd { box-sizing: border-box; min-width: 0; color-scheme: light; background: #fff; color: rgba(0, 0, 0, 0.88); }\n .jsonforms-react-antd.dark { color-scheme: dark; background: #141414; color: rgba(255, 255, 255, 0.88); }\n ${this.state.customStyle ?? ''}\n `}</style>\n <slot name='styles' />\n <slot name='form-header' />\n <Form\n layout='vertical'\n variant={\n (rendererSettings.inputVariant ??\n 'outlined') as InputProps['variant']\n }\n >\n {/*\n `ExtendedJsonForms` rather than `JsonForms`: it installs the\n additional-error store - the middleware and the prop, which\n only work together - and provides the action handler. Without\n it the Monaco control's `propagateErrors` would publish into\n nothing, and an element's own `additionalErrors` attribute is\n merged rather than replaced.\n */}\n <ExtendedJsonForms\n external={\n parseJson(this.state.external) as\n | Readonly<Record<string, unknown>>\n | undefined\n }\n store={this.errorStore}\n onAction={(event) => this.dispatch('handle-action', event)}\n data={data}\n schema={schema}\n uischema={parseJson(this.state.uischema)}\n uischemas={parseJson(this.state.uischemas) as any}\n config={{\n ...config,\n readonly,\n }}\n readonly={readonly}\n validationMode={this.state.validationMode}\n i18n={{\n locale: this.state.locale,\n translate,\n ...(translateError ? { translateError } : {}),\n }}\n additionalErrors={parseJson(this.state.additionalErrors) as any}\n ajv={this.ajv}\n renderers={antdWebcomponentRenderers}\n cells={antdWebcomponentCells}\n onChange={(event) => this.dispatch('change', event)}\n />\n </Form>\n <slot name='form-footer' />\n </div>\n </LocalizedConfigProvider>\n </StyleProvider>,\n );\n }\n}\n\nexport const registerJsonFormsAntd = (\n tagName = JSON_FORMS_ANTD_TAG,\n): CustomElementConstructor => {\n const existing = customElements.get(tagName);\n if (existing) return existing;\n customElements.define(tagName, JsonFormsAntdElement);\n return JsonFormsAntdElement;\n};\n"],"mappings":";;;;;;;;;;;AASA,IAAaC,IAA4B,CACvC,GAAGC,GACH,GAAGC,CACL,GAOaC,IAAwB,CAAC,GAAGC,GAAW,GAAGC,CAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC0BtE,IAAAgB,IAAA,CAAA,aACA,UAAA,GAhBWC,IAAsB,wBAc7BC,KAA2B,MAO/B;CAP+B,IAAA,EAC/B,cACA,gBAAAC,GACGC,IAAAd,EAAAa,GAAAH,CAAA;CAIH,OAAA,kBAACK,GAAAN,EAAAA,EAAA,CAAA,GAAmBK,CAAA,GAAA,CAAA,GA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