@entryscape/rdforms 10.9.4 → 10.10.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/dist/rdforms.bmd.js +10 -10
- package/dist/rdforms.bootstrap.js +17 -17
- package/dist/rdforms.jquery.js +9 -9
- package/dist/rdforms.node.js +5 -5
- package/dist/rdforms.react.js +44 -42
- package/package.json +3 -3
- package/src/view/jquery/text.js +1 -1
- package/src/view/react/Wrappers.js +8 -3
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"application profile",
|
|
9
9
|
"linked data"
|
|
10
10
|
],
|
|
11
|
-
"version": "10.
|
|
11
|
+
"version": "10.10.0",
|
|
12
12
|
"main": "dist/rdforms.node.js",
|
|
13
13
|
"browser": "dist/rdforms.react.js",
|
|
14
14
|
"module": "main.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"nls-loader": "https://bitbucket.org/metasolutions/nls-loader#master",
|
|
41
41
|
"node-fetch": "^2.6.0",
|
|
42
42
|
"popper.js": "^1.12.9",
|
|
43
|
-
"react": "^
|
|
44
|
-
"react-dom": "^
|
|
43
|
+
"react": "^18.2.0",
|
|
44
|
+
"react-dom": "^18.2.0",
|
|
45
45
|
"react-hooks-lib": "^0.1.5",
|
|
46
46
|
"regenerator-runtime": "^0.13.2",
|
|
47
47
|
"select2": "4.0.8",
|
package/src/view/jquery/text.js
CHANGED
|
@@ -121,7 +121,7 @@ presenters.itemtype('text').datatype('xsd:duration').register((fieldDiv, binding
|
|
|
121
121
|
const bundle = context.view.messages;
|
|
122
122
|
const node = jquery('<div>').appendTo(fieldDiv)[0];
|
|
123
123
|
['years', 'months', 'days', 'hours', 'minutes'].forEach((key) => {
|
|
124
|
-
if (data.hasOwnProperty(key)) {
|
|
124
|
+
if (data.hasOwnProperty(key) && data[key] !== 0) {
|
|
125
125
|
jquery(`<span class="durationLabel">${bundle[`duration_${key}`]}:</span><span class="durationValue">${data[key]}</span>`)
|
|
126
126
|
.appendTo(node);
|
|
127
127
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { createRoot } from 'react-dom/client';
|
|
3
3
|
import Presenter from '../Presenter';
|
|
4
4
|
import Editor from '../Editor';
|
|
5
5
|
import ValidationPresenter from '../ValidationPresenter';
|
|
@@ -12,7 +12,8 @@ const fixIt = (Cls) => {
|
|
|
12
12
|
if (!this.initiatedAlready && this.domNode.parent instanceof Node) {
|
|
13
13
|
// eslint-disable-next-line no-unused-vars
|
|
14
14
|
const Cmp = this.domNode.component;
|
|
15
|
-
|
|
15
|
+
const root = createRoot(this.domNode.parent);
|
|
16
|
+
root.render(<Cmp></Cmp>);
|
|
16
17
|
}
|
|
17
18
|
this.initiatedAlready = true;
|
|
18
19
|
}
|
|
@@ -33,4 +34,8 @@ const ReactEditor = fixIt(Editor);
|
|
|
33
34
|
const ReactPresenter = fixIt(Presenter);
|
|
34
35
|
const ReactValidationPresenter = fixIt(ValidationPresenter);
|
|
35
36
|
|
|
36
|
-
export {
|
|
37
|
+
export {
|
|
38
|
+
ReactEditor as Editor,
|
|
39
|
+
ReactPresenter as Presenter,
|
|
40
|
+
ReactValidationPresenter as ValidationPresenter,
|
|
41
|
+
};
|