@panneau/field-display 4.0.38 → 4.0.40-alpha.1
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/index.js +57 -19
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,26 +1,64 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
4
2
|
import classNames from 'classnames';
|
|
5
3
|
import { useDisplaysComponentsManager } from '@panneau/core/contexts';
|
|
6
4
|
import { jsx } from 'react/jsx-runtime';
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
6
|
+
function DisplayField(t0) {
|
|
7
|
+
const $ = c(13);
|
|
8
|
+
let props;
|
|
9
|
+
let t1;
|
|
10
|
+
let t2;
|
|
11
|
+
let t3;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({
|
|
14
|
+
value: t1,
|
|
15
|
+
display: t2,
|
|
16
|
+
className: t3,
|
|
17
|
+
...props
|
|
18
|
+
} = t0);
|
|
19
|
+
$[0] = t0;
|
|
20
|
+
$[1] = props;
|
|
21
|
+
$[2] = t1;
|
|
22
|
+
$[3] = t2;
|
|
23
|
+
$[4] = t3;
|
|
24
|
+
} else {
|
|
25
|
+
props = $[1];
|
|
26
|
+
t1 = $[2];
|
|
27
|
+
t2 = $[3];
|
|
28
|
+
t3 = $[4];
|
|
29
|
+
}
|
|
30
|
+
const value = t1 === undefined ? null : t1;
|
|
31
|
+
const display = t2 === undefined ? null : t2;
|
|
32
|
+
const className = t3 === undefined ? null : t3;
|
|
33
|
+
const displays = useDisplaysComponentsManager();
|
|
34
|
+
let t4;
|
|
35
|
+
if ($[5] !== display || $[6] !== displays) {
|
|
36
|
+
t4 = displays.getComponent(display) || null;
|
|
37
|
+
$[5] = display;
|
|
38
|
+
$[6] = displays;
|
|
39
|
+
$[7] = t4;
|
|
40
|
+
} else {
|
|
41
|
+
t4 = $[7];
|
|
42
|
+
}
|
|
43
|
+
const Component = t4;
|
|
44
|
+
let t5;
|
|
45
|
+
if ($[8] !== Component || $[9] !== className || $[10] !== props || $[11] !== value) {
|
|
46
|
+
t5 = value !== null && Component !== null ? /*#__PURE__*/jsx(Component, {
|
|
47
|
+
className: classNames([{
|
|
48
|
+
[className]: className !== null
|
|
49
|
+
}]),
|
|
50
|
+
...props,
|
|
51
|
+
value: value
|
|
52
|
+
}) : null;
|
|
53
|
+
$[8] = Component;
|
|
54
|
+
$[9] = className;
|
|
55
|
+
$[10] = props;
|
|
56
|
+
$[11] = value;
|
|
57
|
+
$[12] = t5;
|
|
58
|
+
} else {
|
|
59
|
+
t5 = $[12];
|
|
60
|
+
}
|
|
61
|
+
return t5;
|
|
24
62
|
}
|
|
25
63
|
|
|
26
64
|
var definition = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/field-display",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.40-alpha.1",
|
|
4
4
|
"description": "A field rendering a display",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@babel/runtime": "^7.28.6",
|
|
55
|
-
"@panneau/core": "^4.0.
|
|
56
|
-
"@panneau/themes": "^4.0.
|
|
55
|
+
"@panneau/core": "^4.0.40-alpha.1",
|
|
56
|
+
"@panneau/themes": "^4.0.40-alpha.1",
|
|
57
57
|
"classnames": "^2.5.1"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "66520f92373b3aa371222b354d60ed3cf3d20c96"
|
|
63
63
|
}
|