@panneau/action-upload 4.0.39 → 4.0.40-alpha.3
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 +120 -46
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,53 +1,127 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
|
-
import { useCallback } from 'react';
|
|
1
|
+
import { c } from 'react/compiler-runtime';
|
|
4
2
|
import { FormattedMessage } from 'react-intl';
|
|
5
3
|
import { useFieldsComponentsManager } 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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
6
|
+
function UploadAction(t0) {
|
|
7
|
+
const $ = c(28);
|
|
8
|
+
let props;
|
|
9
|
+
let t1;
|
|
10
|
+
let t10;
|
|
11
|
+
let t2;
|
|
12
|
+
let t3;
|
|
13
|
+
let t4;
|
|
14
|
+
let t5;
|
|
15
|
+
let t6;
|
|
16
|
+
let t7;
|
|
17
|
+
let t8;
|
|
18
|
+
let t9;
|
|
19
|
+
if ($[0] !== t0) {
|
|
20
|
+
({
|
|
21
|
+
endpoint: t1,
|
|
22
|
+
action: t2,
|
|
23
|
+
label: t3,
|
|
24
|
+
value: t4,
|
|
25
|
+
icon: t5,
|
|
26
|
+
theme: t6,
|
|
27
|
+
disabled: t7,
|
|
28
|
+
onConfirmed: t8,
|
|
29
|
+
fieldComponent: t9,
|
|
30
|
+
className: t10,
|
|
31
|
+
...props
|
|
32
|
+
} = t0);
|
|
33
|
+
$[0] = t0;
|
|
34
|
+
$[1] = props;
|
|
35
|
+
$[2] = t1;
|
|
36
|
+
$[3] = t10;
|
|
37
|
+
$[4] = t2;
|
|
38
|
+
$[5] = t3;
|
|
39
|
+
$[6] = t4;
|
|
40
|
+
$[7] = t5;
|
|
41
|
+
$[8] = t6;
|
|
42
|
+
$[9] = t7;
|
|
43
|
+
$[10] = t8;
|
|
44
|
+
$[11] = t9;
|
|
45
|
+
} else {
|
|
46
|
+
props = $[1];
|
|
47
|
+
t1 = $[2];
|
|
48
|
+
t10 = $[3];
|
|
49
|
+
t2 = $[4];
|
|
50
|
+
t3 = $[5];
|
|
51
|
+
t4 = $[6];
|
|
52
|
+
t5 = $[7];
|
|
53
|
+
t6 = $[8];
|
|
54
|
+
t7 = $[9];
|
|
55
|
+
t8 = $[10];
|
|
56
|
+
t9 = $[11];
|
|
57
|
+
}
|
|
58
|
+
const label = t3 === undefined ? null : t3;
|
|
59
|
+
const icon = t5 === undefined ? "upload" : t5;
|
|
60
|
+
const theme = t6 === undefined ? "primary" : t6;
|
|
61
|
+
const disabled = t7 === undefined ? false : t7;
|
|
62
|
+
const onConfirmed = t8 === undefined ? null : t8;
|
|
63
|
+
const fieldComponent = t9 === undefined ? "upload" : t9;
|
|
64
|
+
const className = t10 === undefined ? null : t10;
|
|
65
|
+
const FieldComponents = useFieldsComponentsManager();
|
|
66
|
+
let t11;
|
|
67
|
+
if ($[12] !== FieldComponents || $[13] !== fieldComponent) {
|
|
68
|
+
t11 = FieldComponents.getComponent(fieldComponent);
|
|
69
|
+
$[12] = FieldComponents;
|
|
70
|
+
$[13] = fieldComponent;
|
|
71
|
+
$[14] = t11;
|
|
72
|
+
} else {
|
|
73
|
+
t11 = $[14];
|
|
74
|
+
}
|
|
75
|
+
const FieldComponent = t11;
|
|
76
|
+
let t12;
|
|
77
|
+
if ($[15] !== onConfirmed) {
|
|
78
|
+
t12 = data => {
|
|
79
|
+
if (onConfirmed !== null) {
|
|
80
|
+
onConfirmed(data);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
$[15] = onConfirmed;
|
|
84
|
+
$[16] = t12;
|
|
85
|
+
} else {
|
|
86
|
+
t12 = $[16];
|
|
87
|
+
}
|
|
88
|
+
const onComplete = t12;
|
|
89
|
+
let t13;
|
|
90
|
+
if ($[17] !== label) {
|
|
91
|
+
t13 = label || /*#__PURE__*/jsx(FormattedMessage, {
|
|
92
|
+
id: "eL+nIp"
|
|
93
|
+
});
|
|
94
|
+
$[17] = label;
|
|
95
|
+
$[18] = t13;
|
|
96
|
+
} else {
|
|
97
|
+
t13 = $[18];
|
|
98
|
+
}
|
|
99
|
+
let t14;
|
|
100
|
+
if ($[19] !== FieldComponent || $[20] !== className || $[21] !== disabled || $[22] !== icon || $[23] !== onComplete || $[24] !== props || $[25] !== t13 || $[26] !== theme) {
|
|
101
|
+
t14 = /*#__PURE__*/jsx(FieldComponent, {
|
|
102
|
+
withButton: true,
|
|
103
|
+
outline: false,
|
|
104
|
+
theme: theme,
|
|
105
|
+
addButtonIcon: icon,
|
|
106
|
+
addButtonLabel: t13,
|
|
107
|
+
onChange: onComplete,
|
|
108
|
+
disabled: disabled,
|
|
109
|
+
className: className,
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
$[19] = FieldComponent;
|
|
113
|
+
$[20] = className;
|
|
114
|
+
$[21] = disabled;
|
|
115
|
+
$[22] = icon;
|
|
116
|
+
$[23] = onComplete;
|
|
117
|
+
$[24] = props;
|
|
118
|
+
$[25] = t13;
|
|
119
|
+
$[26] = theme;
|
|
120
|
+
$[27] = t14;
|
|
121
|
+
} else {
|
|
122
|
+
t14 = $[27];
|
|
123
|
+
}
|
|
124
|
+
return t14;
|
|
51
125
|
}
|
|
52
126
|
|
|
53
127
|
export { UploadAction as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panneau/action-upload",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.40-alpha.3",
|
|
4
4
|
"description": "Upload action",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@babel/runtime": "^7.28.6",
|
|
55
|
-
"@panneau/core": "^4.0.
|
|
56
|
-
"@panneau/element-button": "^4.0.
|
|
57
|
-
"@panneau/field-upload": "^4.0.
|
|
58
|
-
"@panneau/themes": "^4.0.
|
|
55
|
+
"@panneau/core": "^4.0.40-alpha.3",
|
|
56
|
+
"@panneau/element-button": "^4.0.40-alpha.3",
|
|
57
|
+
"@panneau/field-upload": "^4.0.40-alpha.3",
|
|
58
|
+
"@panneau/themes": "^4.0.40-alpha.3",
|
|
59
59
|
"classnames": "^2.5.1",
|
|
60
60
|
"react-intl": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^10.0.0"
|
|
61
61
|
},
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "1735964a2702ae0480b642225286e4184f36680d"
|
|
66
66
|
}
|