@giteeteam/apps-team-components 1.3.0 → 1.3.2-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/README.md +0 -3
- package/dist/components/common/overflow-tooltip/BaseOverflowTooltip.js +1 -1
- package/dist/components/common/overflow-tooltip/OverflowTooltip.js +1 -1
- package/dist/components/common/overflow-tooltip/SimpleOverflowToolTip.js +3 -3
- package/dist/components/common/user-field/UserAvatar.js +2 -2
- package/dist/components/default-empty-icon/config.js +3 -2
- package/dist/components/fields/ancestor/utils.js +12 -1
- package/dist/components/fields/cascade/utils.js +2 -1
- package/dist/components/fields/dropdown/BaseField.js +4 -4
- package/dist/components/fields/dropdown/ReadView.js +1 -1
- package/dist/components/fields/dropdown/hook.js +1 -1
- package/dist/components/fields/item-type/ItemTypeIcon.js +5 -1
- package/dist/components/fields/status/Cell.js +2 -2
- package/dist/components/fields/status/ReadView.js +2 -2
- package/dist/components/fields/status/SelectFlowHandler.js +6 -6
- package/dist/components/fields/status/Transition.js +1 -1
- package/dist/components/fields/status/TransitionButton.js +2 -2
- package/dist/components/fields/status/TransitionPanel.js +1 -1
- package/dist/components/fields/status/View.js +1 -1
- package/dist/components/fields/status/style/index.js +27 -1
- package/dist/components/fields/user-group/ReadView.js +6 -2
- package/dist/components/filters/filter-search/utils.js +5 -2
- package/dist/components/table-components/EditTableCell.js +1 -1
- package/dist/icons/empty-icon/data-empty.png.js +3 -0
- package/dist/icons/empty-icon/forbidden.png.js +3 -0
- package/dist/icons/empty-icon/index.js +8 -0
- package/dist/icons/empty-icon/load-error.png.js +3 -0
- package/dist/icons/empty-icon/not-found.png.js +3 -0
- package/dist/icons/empty-icon/workspace-empty.svg.js +239 -0
- package/dist/icons/index.js +17 -17
- package/dist/icons/svg/ArrowBack.svg.js +16 -2
- package/dist/icons/svg/Done.svg.js +16 -2
- package/dist/icons/svg/DottedCircle.svg.js +14 -2
- package/dist/icons/svg/HollowCircle.svg.js +14 -2
- package/dist/icons/svg/Search.svg.js +16 -2
- package/dist/icons/svg/Workflow.svg.js +14 -2
- package/dist/lib/array.js +44 -2
- package/dist/lib/config.js +3 -3
- package/dist/lib/dataType.js +5 -1
- package/dist/lib/date.js +48 -3
- package/dist/lib/error/index.js +2 -0
- package/dist/lib/error/utils.js +17 -2
- package/dist/lib/fetch.js +41 -6
- package/dist/lib/icons/utils.js +3 -1
- package/dist/lib/path.js +1 -1
- package/dist/lib/storage.js +38 -1
- package/dist/lib/workflow.js +2 -0
- package/dist/style/common.js +16 -1
- package/package.json +2 -1
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
var _defs, _g;
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
var SvgWorkspaceEmpty = function SvgWorkspaceEmpty(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
9
|
+
width: 400,
|
|
10
|
+
height: 115
|
|
11
|
+
}, props), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("rect", {
|
|
12
|
+
id: "b",
|
|
13
|
+
width: 400,
|
|
14
|
+
height: 115,
|
|
15
|
+
x: 0,
|
|
16
|
+
y: 0,
|
|
17
|
+
rx: 4
|
|
18
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
19
|
+
id: "d",
|
|
20
|
+
width: 400,
|
|
21
|
+
height: 115,
|
|
22
|
+
x: 0,
|
|
23
|
+
y: 0,
|
|
24
|
+
rx: 4
|
|
25
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
26
|
+
id: "f",
|
|
27
|
+
width: 400,
|
|
28
|
+
height: 115,
|
|
29
|
+
x: 0,
|
|
30
|
+
y: 0,
|
|
31
|
+
rx: 4
|
|
32
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
33
|
+
id: "h",
|
|
34
|
+
width: 48,
|
|
35
|
+
height: 48,
|
|
36
|
+
x: 0,
|
|
37
|
+
y: 0,
|
|
38
|
+
rx: 4
|
|
39
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
40
|
+
id: "j",
|
|
41
|
+
width: 48,
|
|
42
|
+
height: 48,
|
|
43
|
+
x: 0,
|
|
44
|
+
y: 0,
|
|
45
|
+
rx: 4
|
|
46
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
47
|
+
id: "l",
|
|
48
|
+
width: 48,
|
|
49
|
+
height: 48,
|
|
50
|
+
x: 0,
|
|
51
|
+
y: 0,
|
|
52
|
+
rx: 4
|
|
53
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
54
|
+
id: "n",
|
|
55
|
+
width: 48,
|
|
56
|
+
height: 48,
|
|
57
|
+
x: 0,
|
|
58
|
+
y: 0,
|
|
59
|
+
rx: 4
|
|
60
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
61
|
+
id: "p",
|
|
62
|
+
width: 400,
|
|
63
|
+
height: 115,
|
|
64
|
+
x: 0,
|
|
65
|
+
y: 0,
|
|
66
|
+
rx: 4
|
|
67
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
68
|
+
id: "r",
|
|
69
|
+
width: 400,
|
|
70
|
+
height: 115,
|
|
71
|
+
x: 0,
|
|
72
|
+
y: 0,
|
|
73
|
+
rx: 4
|
|
74
|
+
}), /*#__PURE__*/React.createElement("rect", {
|
|
75
|
+
id: "t",
|
|
76
|
+
width: 400,
|
|
77
|
+
height: 115,
|
|
78
|
+
x: 0,
|
|
79
|
+
y: 0,
|
|
80
|
+
rx: 4
|
|
81
|
+
}), /*#__PURE__*/React.createElement("linearGradient", {
|
|
82
|
+
id: "a",
|
|
83
|
+
x1: "47.482%",
|
|
84
|
+
x2: "100%",
|
|
85
|
+
y1: "49.542%",
|
|
86
|
+
y2: "54.133%"
|
|
87
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
88
|
+
offset: "0%",
|
|
89
|
+
stopColor: "#FBFBFC"
|
|
90
|
+
}), /*#__PURE__*/React.createElement("stop", {
|
|
91
|
+
offset: "100%",
|
|
92
|
+
stopColor: "#F5F6F8"
|
|
93
|
+
})))), _g || (_g = /*#__PURE__*/React.createElement("g", {
|
|
94
|
+
fill: "none",
|
|
95
|
+
fillRule: "evenodd"
|
|
96
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
97
|
+
width: 400,
|
|
98
|
+
height: 115,
|
|
99
|
+
fill: "url(#a)",
|
|
100
|
+
fillRule: "nonzero",
|
|
101
|
+
rx: 4
|
|
102
|
+
}), /*#__PURE__*/React.createElement("mask", {
|
|
103
|
+
id: "c",
|
|
104
|
+
fill: "#fff"
|
|
105
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
106
|
+
xlinkHref: "#b"
|
|
107
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
108
|
+
fill: "#091940",
|
|
109
|
+
fillOpacity: 0.02,
|
|
110
|
+
fillRule: "nonzero",
|
|
111
|
+
d: "M292.599 17.703a10.9 10.9 0 0 1 6.728 1.935l31.82 22.09 36.187-13.688c5.626-2.128 11.917.714 14.051 6.348.85 2.243.937 4.703.25 7l-11.118 37.086 24.234 30.23c3.768 4.701 3.02 11.564-1.672 15.33a10.88 10.88 0 0 1-6.575 2.39l-38.69.832-21.209 32.371c-3.298 5.034-10.051 6.433-15.085 3.126a10.92 10.92 0 0 1-4.312-5.522l-12.795-36.572-37.342-10.225c-5.807-1.59-9.232-7.587-7.651-13.396a10.9 10.9 0 0 1 3.91-5.804l30.783-23.435-1.87-38.69c-.292-6.016 4.345-11.122 10.356-11.406",
|
|
112
|
+
mask: "url(#c)"
|
|
113
|
+
}), /*#__PURE__*/React.createElement("mask", {
|
|
114
|
+
id: "e",
|
|
115
|
+
fill: "#fff"
|
|
116
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
117
|
+
xlinkHref: "#d"
|
|
118
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
119
|
+
fill: "#091940",
|
|
120
|
+
fillOpacity: 0.02,
|
|
121
|
+
fillRule: "nonzero",
|
|
122
|
+
d: "M159.68-70.548a10.9 10.9 0 0 1 2.275 6.621l.157 38.736 31.968 21.79c4.97 3.389 6.25 10.172 2.86 15.152a10.9 10.9 0 0 1-5.592 4.219l-36.756 12.164-10.863 37.192c-1.69 5.783-7.74 9.106-13.516 7.423a10.88 10.88 0 0 1-5.73-4.015L101.61 37.517 62.93 38.712c-6.015.186-11.035-4.544-11.213-10.564a10.92 10.92 0 0 1 2.05-6.7L76.385-10.01 63.342-46.463c-2.028-5.668.92-11.914 6.585-13.951a10.9 10.9 0 0 1 6.997-.127l36.853 11.775 30.62-23.724c4.762-3.689 11.604-2.82 15.284 1.942",
|
|
123
|
+
mask: "url(#e)",
|
|
124
|
+
opacity: 0.803
|
|
125
|
+
}), /*#__PURE__*/React.createElement("mask", {
|
|
126
|
+
id: "g",
|
|
127
|
+
fill: "#fff"
|
|
128
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
129
|
+
xlinkHref: "#f"
|
|
130
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
131
|
+
mask: "url(#g)",
|
|
132
|
+
opacity: 0.9
|
|
133
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
134
|
+
width: 48,
|
|
135
|
+
height: 48,
|
|
136
|
+
fill: "#B0D6FF",
|
|
137
|
+
rx: 4,
|
|
138
|
+
transform: "translate(24 18)"
|
|
139
|
+
}), /*#__PURE__*/React.createElement("g", {
|
|
140
|
+
transform: "translate(24 18)"
|
|
141
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
|
142
|
+
id: "i",
|
|
143
|
+
fill: "#fff"
|
|
144
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
145
|
+
xlinkHref: "#h"
|
|
146
|
+
})), /*#__PURE__*/React.createElement("rect", {
|
|
147
|
+
width: 13,
|
|
148
|
+
height: 4,
|
|
149
|
+
x: 4,
|
|
150
|
+
y: 39,
|
|
151
|
+
fill: "#3683FF",
|
|
152
|
+
mask: "url(#i)",
|
|
153
|
+
rx: 2
|
|
154
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
155
|
+
transform: "translate(24 18)"
|
|
156
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
|
157
|
+
id: "k",
|
|
158
|
+
fill: "#fff"
|
|
159
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
160
|
+
xlinkHref: "#j"
|
|
161
|
+
})), /*#__PURE__*/React.createElement("rect", {
|
|
162
|
+
width: 13,
|
|
163
|
+
height: 4,
|
|
164
|
+
x: 4,
|
|
165
|
+
y: 32,
|
|
166
|
+
fill: "#87BDFF",
|
|
167
|
+
mask: "url(#k)",
|
|
168
|
+
rx: 2
|
|
169
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
170
|
+
transform: "translate(24 18)"
|
|
171
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
|
172
|
+
id: "m",
|
|
173
|
+
fill: "#fff"
|
|
174
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
175
|
+
xlinkHref: "#l"
|
|
176
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
177
|
+
fillRule: "nonzero",
|
|
178
|
+
mask: "url(#m)"
|
|
179
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
180
|
+
fill: "#FFBF36",
|
|
181
|
+
d: "M47.036 3.336a3 3 0 0 1 .753 1.774l.793 10.626 9.203 5.371a3 3 0 0 1-.375 5.367l-9.861 4.038-2.265 10.413a3 3 0 0 1-5.22 1.301l-6.888-8.13-10.602 1.064a3 3 0 0 1-2.851-4.563l5.604-9.063-4.289-9.754a3 3 0 0 1 3.459-4.122l10.351 2.53L42.8 3.093a3 3 0 0 1 4.236.242"
|
|
182
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
183
|
+
fill: "#FFE136",
|
|
184
|
+
d: "M44.036.336a3 3 0 0 1 .753 1.774l.793 10.626 9.203 5.371a3 3 0 0 1-.375 5.367l-9.861 4.038-2.265 10.413a3 3 0 0 1-5.22 1.301l-6.888-8.13-10.602 1.064a3 3 0 0 1-2.851-4.563l5.604-9.063-4.289-9.754a3 3 0 0 1 3.459-4.122l10.351 2.53L39.8.093a3 3 0 0 1 4.236.242"
|
|
185
|
+
}))), /*#__PURE__*/React.createElement("g", {
|
|
186
|
+
transform: "translate(24 18)"
|
|
187
|
+
}, /*#__PURE__*/React.createElement("mask", {
|
|
188
|
+
id: "o",
|
|
189
|
+
fill: "#fff"
|
|
190
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
191
|
+
xlinkHref: "#n"
|
|
192
|
+
})), /*#__PURE__*/React.createElement("text", {
|
|
193
|
+
fill: "#FFF",
|
|
194
|
+
fillRule: "nonzero",
|
|
195
|
+
stroke: "#FFF",
|
|
196
|
+
strokeWidth: 0.3,
|
|
197
|
+
fontFamily: "BebasKai, Bebas Kai",
|
|
198
|
+
fontSize: 13,
|
|
199
|
+
mask: "url(#o)"
|
|
200
|
+
}, /*#__PURE__*/React.createElement("tspan", {
|
|
201
|
+
x: 6.165,
|
|
202
|
+
y: 24.244
|
|
203
|
+
}, "collect")))), /*#__PURE__*/React.createElement("mask", {
|
|
204
|
+
id: "q",
|
|
205
|
+
fill: "#fff"
|
|
206
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
207
|
+
xlinkHref: "#p"
|
|
208
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
209
|
+
fill: "#091940",
|
|
210
|
+
fillOpacity: 0.04,
|
|
211
|
+
fillRule: "nonzero",
|
|
212
|
+
d: "M24 80h352v1H24z",
|
|
213
|
+
mask: "url(#q)"
|
|
214
|
+
}), /*#__PURE__*/React.createElement("mask", {
|
|
215
|
+
id: "s",
|
|
216
|
+
fill: "#fff"
|
|
217
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
218
|
+
xlinkHref: "#r"
|
|
219
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
220
|
+
fill: "#B5BAC5",
|
|
221
|
+
fillRule: "nonzero",
|
|
222
|
+
mask: "url(#s)"
|
|
223
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
224
|
+
d: "M50.204 93.432v.852h3.024V102h.972v-7.716h3.024v-.852zM58.292 93.432V102h6.276v-.852h-5.292v-3.144h4.8v-.852h-4.8v-2.868h5.088v-.852zM68.444 93.432 65.072 102h1.056l.912-2.4h3.936l.912 2.4h1.068l-3.372-8.568zm-1.092 5.34 1.644-4.284h.048l1.62 4.284zM73.82 93.432V102h.984v-6.816h.036L77.804 102h.888l2.964-6.816h.036V102h.984v-8.568h-1.224l-3.18 7.308h-.036l-3.192-7.308z"
|
|
225
|
+
})), /*#__PURE__*/React.createElement("mask", {
|
|
226
|
+
id: "u",
|
|
227
|
+
fill: "#fff"
|
|
228
|
+
}, /*#__PURE__*/React.createElement("use", {
|
|
229
|
+
xlinkHref: "#t"
|
|
230
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
231
|
+
mask: "url(#u)"
|
|
232
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
233
|
+
fill: "#DADDE3",
|
|
234
|
+
fillRule: "nonzero",
|
|
235
|
+
d: "M31.079 106.304a8.8 8.8 0 0 0 2.807.495l-.016 1.2h-.035a10 10 0 0 1-3.154-.563zm6.658-.334.51 1.086a10 10 0 0 1-3.117.88l-.134-1.192a8.7 8.7 0 0 0 2.74-.774m-9.98-1.767a8.8 8.8 0 0 0 2.31 1.672l-.536 1.073a10 10 0 0 1-2.624-1.9zm13.074-.655.931.757a10 10 0 0 1-2.422 2.151l-.642-1.014a8.9 8.9 0 0 0 2.133-1.894m-15.153-2.678c.312.904.77 1.75 1.355 2.507l-.95.734a10 10 0 0 1-1.54-2.85zm16.889-.849 1.168.275a10 10 0 0 1-1.245 2.99l-1.018-.635a8.7 8.7 0 0 0 1.095-2.63M34 93.017a3.147 3.147 0 0 1 2.032 5.55l-.042.035-.033.026a4.71 4.71 0 0 1 2.702 3.59l.008.062.008.06a.569.569 0 0 1-1.13.137 3.572 3.572 0 0 0-7.091.005.569.569 0 0 1-1.13-.136 4.71 4.71 0 0 1 2.66-3.691l.059-.027-.033-.027a3.14 3.14 0 0 1-1.155-2.326l-.001-.056v-.055A3.147 3.147 0 0 1 34 93.017m-9.93 3.79 1.192.142a9 9 0 0 0 .123 2.856l-1.175.244a10 10 0 0 1-.14-3.242m19.692-.984a10 10 0 0 1 .182 3.24l-1.193-.126a9 9 0 0 0-.16-2.853zM34 94.155a2.01 2.01 0 1 0 0 4.018 2.01 2.01 0 0 0 0-4.018m-8.42-1.551 1.01.648a8.7 8.7 0 0 0-1.13 2.615l-1.164-.29a10 10 0 0 1 1.283-2.973m16.258-.815a10 10 0 0 1 1.576 2.83l-1.13.405a8.8 8.8 0 0 0-1.386-2.49zM28.77 89.475l.628 1.022a8.9 8.9 0 0 0-2.157 1.866l-.921-.769a10 10 0 0 1 2.45-2.12m9.581-.48a10 10 0 0 1 2.649 1.864l-.84.857a8.8 8.8 0 0 0-2.332-1.642zm-5.351-.946.118 1.194a8.7 8.7 0 0 0-2.751.739l-.496-1.093c.97-.44 2.023-.73 3.129-.84M34 88c1.118 0 2.193.183 3.197.522l-.384 1.137A8.8 8.8 0 0 0 34 89.2z"
|
|
236
|
+
})))));
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export { SvgWorkspaceEmpty as default };
|
package/dist/icons/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import React__default from 'react';
|
|
3
3
|
import AntdIcon from '@ant-design/icons';
|
|
4
4
|
export { default } from '@ant-design/icons';
|
|
5
5
|
import { ClassNames } from '@emotion/react';
|
|
6
6
|
import useAntdConfig from '../lib/hooks/useAntdConfig.js';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
7
|
+
import SvgArrowBack from './svg/ArrowBack.svg.js';
|
|
8
|
+
import SvgDone from './svg/Done.svg.js';
|
|
9
|
+
import SvgDottedCircle from './svg/DottedCircle.svg.js';
|
|
10
|
+
import SvgHollowCircle from './svg/HollowCircle.svg.js';
|
|
11
|
+
import SvgSearch from './svg/Search.svg.js';
|
|
12
|
+
import SvgWorkflow from './svg/Workflow.svg.js';
|
|
13
|
+
import { rotateStyle, proximaSingleColor } from './style/index.js';
|
|
14
14
|
import IconFont from './SyncIconFont.js';
|
|
15
15
|
|
|
16
16
|
const ROTATE_ICONS = {
|
|
@@ -280,24 +280,24 @@ const MULTI_COLOR_KEYS = [
|
|
|
280
280
|
'AttachmentProducts',
|
|
281
281
|
];
|
|
282
282
|
const HollowCircleIcon = props => {
|
|
283
|
-
return jsx(AntdIcon, { ...props, component:
|
|
283
|
+
return jsx(AntdIcon, { ...props, component: SvgHollowCircle });
|
|
284
284
|
};
|
|
285
285
|
const WorkflowIcon = props => {
|
|
286
|
-
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component:
|
|
286
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: SvgWorkflow });
|
|
287
287
|
};
|
|
288
288
|
const DottedCircleIcon = props => {
|
|
289
|
-
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component:
|
|
289
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: SvgDottedCircle });
|
|
290
290
|
};
|
|
291
291
|
const ArrowBackIcon = props => {
|
|
292
|
-
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component:
|
|
292
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: SvgArrowBack });
|
|
293
293
|
};
|
|
294
294
|
const SearchIcon = props => {
|
|
295
|
-
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component:
|
|
295
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: SvgSearch });
|
|
296
296
|
};
|
|
297
297
|
const DoneIcon = props => {
|
|
298
|
-
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component:
|
|
298
|
+
return jsx(AntdIcon, { ...props, style: { fontSize: 10, width: 10, marginLeft: 2 }, component: SvgDone });
|
|
299
299
|
};
|
|
300
|
-
const CustomIconFont =
|
|
300
|
+
const CustomIconFont = React__default.memo(props => {
|
|
301
301
|
const { type, ...restProps } = props;
|
|
302
302
|
if (SIMPLE_COLOR_KEYS.includes(type)) {
|
|
303
303
|
return jsx(SingleColorIcon, { ...props, type: type });
|
|
@@ -309,7 +309,7 @@ const SingleColorIcon = ({ type, ...props }) => {
|
|
|
309
309
|
const { antPrefix } = useAntdConfig();
|
|
310
310
|
return (jsx(ClassNames, { children: ({ css, cx }) => (jsx("i", { ...props, className: cx('icon', css(proximaSingleColor(antPrefix)), `proxima-single-color-${type}`, props.className) })) }));
|
|
311
311
|
};
|
|
312
|
-
[...MULTI_COLOR_KEYS, ...SIMPLE_COLOR_KEYS, ...Object.keys(ROTATE_ICONS)].reduce((res, key) => {
|
|
312
|
+
const Icons = [...MULTI_COLOR_KEYS, ...SIMPLE_COLOR_KEYS, ...Object.keys(ROTATE_ICONS)].reduce((res, key) => {
|
|
313
313
|
res[key] = ({ className, ...props }) => {
|
|
314
314
|
return (jsx(ClassNames, { children: ({ cx, css }) => {
|
|
315
315
|
var _a;
|
|
@@ -319,4 +319,4 @@ const SingleColorIcon = ({ type, ...props }) => {
|
|
|
319
319
|
return res;
|
|
320
320
|
}, {});
|
|
321
321
|
|
|
322
|
-
export { ArrowBackIcon, CustomIconFont, DoneIcon, DottedCircleIcon, HollowCircleIcon, IconFont, MULTI_COLOR_KEYS, ROTATE_ICONS, SIMPLE_COLOR_KEYS, SearchIcon, SingleColorIcon, WorkflowIcon };
|
|
322
|
+
export { ArrowBackIcon, CustomIconFont, DoneIcon, DottedCircleIcon, HollowCircleIcon, IconFont, Icons, MULTI_COLOR_KEYS, ROTATE_ICONS, SIMPLE_COLOR_KEYS, SearchIcon, SingleColorIcon, WorkflowIcon };
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
var SvgArrowBack = function SvgArrowBack(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: 200,
|
|
9
|
+
height: 200,
|
|
10
|
+
className: "icon",
|
|
11
|
+
viewBox: "0 0 1024 1024"
|
|
12
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
13
|
+
d: "m521.856 137.984 2.24 2.24a38.4 38.4 0 0 1 0 54.272l-275.2 275.2h624.64a41.6 41.6 0 1 1 0 83.2H247.488l276.608 276.672a38.4 38.4 0 0 1 4.48 48.96l-4.48 5.312-2.24 2.304-5.312 4.416a38.4 38.4 0 0 1-43.712 0l-5.312-4.48-343.872-343.936a38.27 38.27 0 0 1-11.136-23.872v-12.48a38.27 38.27 0 0 1 11.136-23.872L467.52 137.984a38.4 38.4 0 0 1 54.336 0"
|
|
14
|
+
})));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { SvgArrowBack as default };
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
var SvgDone = function SvgDone(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: 200,
|
|
9
|
+
height: 200,
|
|
10
|
+
className: "icon",
|
|
11
|
+
viewBox: "0 0 1024 1024"
|
|
12
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
13
|
+
d: "M380.352 842.176 74.688 536.896a38.4 38.4 0 0 1-.064-54.272l2.048-2.048a38.464 38.464 0 0 1 54.272 0l275.328 274.88 482.816-575.36a38.4 38.4 0 0 1 54.144-4.736l2.432 2.112a38.4 38.4 0 0 1 4.736 54.08L440.32 839.488a38.34 38.34 0 0 1-29.376 13.696h-6.72a38.34 38.34 0 0 1-23.872-11.008"
|
|
14
|
+
})));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { SvgDone as default };
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
var SvgDottedCircle = function SvgDottedCircle(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
className: "icon",
|
|
9
|
+
viewBox: "0 0 1024 1024"
|
|
10
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "M681.92 995.136 648 898.496a408.5 408.5 0 0 1-130.24 23.04l-6.912.064h-4.16l-1.28 102.4H512c59.52 0 116.736-10.176 169.92-28.864M243.84 821.632l-67.072 77.376a511.7 511.7 0 0 0 153.152 91.648l36.48-95.68a409.3 409.3 0 0 1-122.56-73.344m709.503-49.92-88.192-52.032a412.2 412.2 0 0 1-92.927 108.672l65.151 78.976a514.6 514.6 0 0 0 115.968-135.68zM107.392 576 6.208 591.872c9.472 60.416 29.44 117.312 58.112 168.768l89.472-49.856A406.1 406.1 0 0 1 107.392 576m916.607-64c0-29.44-2.496-58.24-7.232-86.208L915.84 442.88a413 413 0 0 1-.896 143.36l100.736 18.304A518.5 518.5 0 0 0 1024 512M74.176 246.4a508.8 508.8 0 0 0-64.64 166.4l100.544 19.776a406.4 406.4 0 0 1 51.584-132.928L74.24 246.4zm882.303 11.328a514.4 514.4 0 0 0-114.304-137.087l-66.111 78.272a412 412 0 0 1 91.583 109.76zm-608-231.04A511 511 0 0 0 192 112.386l64 79.872a408.6 408.6 0 0 1 125.249-68.544l-32.704-97.024zM512 .002v102.4c48.64 0 96 8.448 140.609 24.768l35.2-96.192A511 511 0 0 0 512 0"
|
|
12
|
+
})));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { SvgDottedCircle as default };
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
var SvgHollowCircle = function SvgHollowCircle(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
xmlSpace: "preserve",
|
|
9
|
+
viewBox: "0 0 10 10"
|
|
10
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "M5 0C2.2 0 0 2.2 0 5s2.2 5 5 5 5-2.2 5-5-2.2-5-5-5m0 8C3.3 8 2 6.7 2 5s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3"
|
|
12
|
+
})));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { SvgHollowCircle as default };
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
var SvgSearch = function SvgSearch(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
width: 200,
|
|
9
|
+
height: 200,
|
|
10
|
+
className: "icon",
|
|
11
|
+
viewBox: "0 0 1024 1024"
|
|
12
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
13
|
+
d: "M457.6 112a345.6 345.6 0 0 1 270.08 561.28l173.056 173.184a38.4 38.4 0 0 1-48.96 58.752l-5.312-4.48L673.28 727.68A345.6 345.6 0 1 1 457.6 112m0 76.8a268.8 268.8 0 1 0 186.944 461.952 18 18 0 0 1 2.816-3.392l3.392-2.816A268.8 268.8 0 0 0 457.6 188.8"
|
|
14
|
+
})));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { SvgSearch as default };
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _path;
|
|
4
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
5
|
+
var SvgWorkflow = function SvgWorkflow(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
xmlSpace: "preserve",
|
|
9
|
+
viewBox: "0 0 128 128"
|
|
10
|
+
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
11
|
+
d: "M111.4 88.1c-7.5 0-14.46 4.82-16.61 11.79H38.03c-8.57 0-15.53-6.97-15.53-15.53 0-8.57 6.97-14.99 15.53-14.99h52.49c14.46 0 26.25-11.79 26.25-26.25s-11.79-26.25-26.25-26.25H33.75C31.61 9.91 25.18 5.09 17.14 5.09 8.04 5.09 0 13.12 0 22.23s8.04 17.14 17.14 17.14c7.5 0 14.46-4.82 16.61-11.79h56.23c8.57 0 15.53 6.97 15.53 15.53s-6.42 15.53-14.99 15.53h-52.5c-14.46 0-26.25 11.79-26.25 26.25s11.79 26.25 26.25 26.25h56.23c2.14 6.97 8.57 11.79 16.61 11.79 9.64 0 17.14-8.04 17.14-17.14s-7.49-17.69-16.6-17.69M17.15 29.18c-3.22 0-6.42-3.22-6.42-6.97s3.22-6.42 6.42-6.42 6.42 3.22 6.42 6.42-2.67 6.97-6.42 6.97m94.25 83.03c-3.75 0-6.42-3.22-6.42-6.42 0-3.21 3.22-6.42 6.42-6.42 3.21 0 6.42 3.22 6.42 6.42.01 3.2-3.2 6.42-6.42 6.42"
|
|
12
|
+
})));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { SvgWorkflow as default };
|
package/dist/lib/array.js
CHANGED
|
@@ -1,5 +1,47 @@
|
|
|
1
|
-
import { isArray } from 'lodash-es';
|
|
1
|
+
import { difference, get, isArray } from 'lodash-es';
|
|
2
2
|
|
|
3
|
+
const arrayDiff = (origin, target) => {
|
|
4
|
+
const remove = difference(origin, target);
|
|
5
|
+
const insert = difference(target, origin);
|
|
6
|
+
return { insert, remove };
|
|
7
|
+
};
|
|
8
|
+
const serializationArrayByKey = (list, keyPath) => {
|
|
9
|
+
if (!list) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return list.reduce((prev, current) => {
|
|
13
|
+
const currentId = get(current, keyPath);
|
|
14
|
+
return {
|
|
15
|
+
...prev,
|
|
16
|
+
[currentId]: (prev[currentId] || []).concat([current]),
|
|
17
|
+
};
|
|
18
|
+
}, {});
|
|
19
|
+
};
|
|
20
|
+
const createHash = () => {
|
|
21
|
+
return performance.now();
|
|
22
|
+
};
|
|
23
|
+
function parseArray(str) {
|
|
24
|
+
if (!str) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(str)) {
|
|
28
|
+
return str;
|
|
29
|
+
}
|
|
30
|
+
if (typeof str === 'string') {
|
|
31
|
+
let result = [];
|
|
32
|
+
try {
|
|
33
|
+
result = str
|
|
34
|
+
.split(',')
|
|
35
|
+
.map(item => item.trim())
|
|
36
|
+
.filter(item => !!item);
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
console.error('...parseArray error', str, error);
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
3
45
|
const getArrayValue = (value) => { var _a; return (_a = (isArray(value) ? value : [value])) === null || _a === void 0 ? void 0 : _a.filter(Boolean); };
|
|
4
46
|
|
|
5
|
-
export { getArrayValue };
|
|
47
|
+
export { arrayDiff, createHash, getArrayValue, parseArray, serializationArrayByKey };
|
package/dist/lib/config.js
CHANGED
|
@@ -12,8 +12,8 @@ const getUserConfig = () => {
|
|
|
12
12
|
}
|
|
13
13
|
return {};
|
|
14
14
|
};
|
|
15
|
-
getPublicRuntimeConfig() || {};
|
|
16
|
-
getUserConfig();
|
|
15
|
+
const publicRuntimeConfig = getPublicRuntimeConfig() || {};
|
|
16
|
+
const userConfig = getUserConfig();
|
|
17
17
|
function getAcceptLanguageHeader(locale) {
|
|
18
18
|
switch (locale) {
|
|
19
19
|
case 'zh-CN':
|
|
@@ -44,4 +44,4 @@ const getQiankunConfig = () => {
|
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export { getAcceptLanguageHeader, getPublicRuntimeConfig, getQiankunConfig, getUserConfig };
|
|
47
|
+
export { getAcceptLanguageHeader, getPublicRuntimeConfig, getQiankunConfig, getUserConfig, publicRuntimeConfig, userConfig };
|
package/dist/lib/dataType.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { isNil } from 'lodash-es';
|
|
2
2
|
|
|
3
|
+
const toNumber = (num, defaultNum = 0) => {
|
|
4
|
+
const number = Number(num);
|
|
5
|
+
return isNaN(number) ? defaultNum : number;
|
|
6
|
+
};
|
|
3
7
|
const toBoolean = (flag, defaultFlag = true) => {
|
|
4
8
|
if (isNil(flag))
|
|
5
9
|
return defaultFlag;
|
|
@@ -12,4 +16,4 @@ const toBoolean = (flag, defaultFlag = true) => {
|
|
|
12
16
|
return defaultFlag;
|
|
13
17
|
};
|
|
14
18
|
|
|
15
|
-
export { toBoolean };
|
|
19
|
+
export { toBoolean, toNumber };
|
package/dist/lib/date.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import 'lodash-es';
|
|
1
|
+
import { isNumber, isNaN } from 'lodash-es';
|
|
2
2
|
import './dayjs.js';
|
|
3
|
-
import { DATE_FORMAT, DATE_TYPE } from './global.js';
|
|
3
|
+
import { DATE_FORMAT, DATE_TYPE, FIELD_TYPE_KEY_MAPPINGS } from './global.js';
|
|
4
4
|
import { i18n } from './i18n.js';
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
6
|
|
|
@@ -19,6 +19,31 @@ const getDateType = (pickerType) => {
|
|
|
19
19
|
return DATE_FORMAT.DATE;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
+
const getDateTypeName = (dateType) => i18n.t(`date.${dateType}`);
|
|
23
|
+
const getStartOfDayUnix = (date) => {
|
|
24
|
+
return dayjs(date).startOf('day').valueOf();
|
|
25
|
+
};
|
|
26
|
+
const getStartOfDayToDate = (date) => {
|
|
27
|
+
return dayjs(date).startOf('day').toDate();
|
|
28
|
+
};
|
|
29
|
+
const getEndOfDayUnix = (date) => {
|
|
30
|
+
return dayjs(date).endOf('day').valueOf();
|
|
31
|
+
};
|
|
32
|
+
const getEndOfDayToDate = (date) => {
|
|
33
|
+
return dayjs(date).endOf('day').toDate();
|
|
34
|
+
};
|
|
35
|
+
const getStartOfWeekUnix = (date) => {
|
|
36
|
+
return dayjs(date).startOf('week').valueOf();
|
|
37
|
+
};
|
|
38
|
+
const getEndOfWeekUnix = (date) => {
|
|
39
|
+
return dayjs(date).endOf('week').valueOf();
|
|
40
|
+
};
|
|
41
|
+
const getStartOfMonthUnix = (date) => {
|
|
42
|
+
return dayjs(date).startOf('month').valueOf();
|
|
43
|
+
};
|
|
44
|
+
const getEndOfMonthUnix = (date) => {
|
|
45
|
+
return dayjs(date).endOf('month').valueOf();
|
|
46
|
+
};
|
|
22
47
|
const getFormat = (date, format) => {
|
|
23
48
|
return dayjs(date).format(format);
|
|
24
49
|
};
|
|
@@ -30,5 +55,25 @@ var DateTypeEnum;
|
|
|
30
55
|
DateTypeEnum["month"] = "month";
|
|
31
56
|
DateTypeEnum["year"] = "year";
|
|
32
57
|
})(DateTypeEnum || (DateTypeEnum = {}));
|
|
58
|
+
const isDate = (key) => {
|
|
59
|
+
return [FIELD_TYPE_KEY_MAPPINGS.CreatedAt, FIELD_TYPE_KEY_MAPPINGS.UpdatedAt, FIELD_TYPE_KEY_MAPPINGS.Date].includes(key);
|
|
60
|
+
};
|
|
61
|
+
const dateToMillisecond = (date, days) => {
|
|
62
|
+
return getStartOfDayUnix(date.subtract(days, 'day'));
|
|
63
|
+
};
|
|
64
|
+
const countDuration = (stoppedAt, startedAt) => {
|
|
65
|
+
const duration = dayjs(stoppedAt).diff(startedAt, 'ms');
|
|
66
|
+
return isNumber(duration) ? duration / 1000 : 0;
|
|
67
|
+
};
|
|
68
|
+
const getMonthEndDate = (time, format = '-') => {
|
|
69
|
+
var _a;
|
|
70
|
+
const [year, month, date] = time.split(format);
|
|
71
|
+
const endMonthDate = (_a = new Date(+year, +month, 0)) === null || _a === void 0 ? void 0 : _a.getDate();
|
|
72
|
+
if (isNaN(endMonthDate)) {
|
|
73
|
+
throw new TypeError(i18n.t('date.invalidate'));
|
|
74
|
+
}
|
|
75
|
+
const isEqualMonth = +date <= endMonthDate;
|
|
76
|
+
return [endMonthDate, isEqualMonth];
|
|
77
|
+
};
|
|
33
78
|
|
|
34
|
-
export { DateTypeEnum, getDateType, getFormat };
|
|
79
|
+
export { DateTypeEnum, countDuration, dateToMillisecond, getDateType, getDateTypeName, getEndOfDayToDate, getEndOfDayUnix, getEndOfMonthUnix, getEndOfWeekUnix, getFormat, getMonthEndDate, getStartOfDayToDate, getStartOfDayUnix, getStartOfMonthUnix, getStartOfWeekUnix, isDate };
|
package/dist/lib/error/utils.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
import 'lodash-es';
|
|
1
|
+
import { isEmpty } from 'lodash-es';
|
|
2
2
|
|
|
3
|
+
const LOGIN_PAGE_URL = '/login';
|
|
4
|
+
const REDIRECT_API = '/frame';
|
|
5
|
+
const getRedirectURI = (errorPageURL, baseAPI = LOGIN_PAGE_URL) => {
|
|
6
|
+
const redirectApi = new URL(baseAPI, errorPageURL);
|
|
7
|
+
redirectApi.searchParams.append('redirect_uri', errorPageURL);
|
|
8
|
+
return encodeURIComponent(redirectApi.toString());
|
|
9
|
+
};
|
|
10
|
+
const getRedirectURL = (redirectConfig, errorPageURL) => {
|
|
11
|
+
if (isEmpty(redirectConfig))
|
|
12
|
+
return LOGIN_PAGE_URL;
|
|
13
|
+
if ((redirectConfig === null || redirectConfig === void 0 ? void 0 : redirectConfig.enabled) !== 'true')
|
|
14
|
+
return LOGIN_PAGE_URL;
|
|
15
|
+
const redirectUri = getRedirectURI(errorPageURL);
|
|
16
|
+
return redirectUri;
|
|
17
|
+
};
|
|
3
18
|
const getKeycloakErrorMsg = errorData => {
|
|
4
19
|
if (!(errorData === null || errorData === void 0 ? void 0 : errorData.error_description) || !(errorData === null || errorData === void 0 ? void 0 : errorData.error))
|
|
5
20
|
return null;
|
|
@@ -35,4 +50,4 @@ const getErrorMessage = (errorData, defaultMsg = '请求失败.') => {
|
|
|
35
50
|
return errorMessage;
|
|
36
51
|
};
|
|
37
52
|
|
|
38
|
-
export { getErrorMessage, getKeycloakErrorMsg, getNormalErrorMsg, getParseErrorMsg };
|
|
53
|
+
export { LOGIN_PAGE_URL, REDIRECT_API, getErrorMessage, getKeycloakErrorMsg, getNormalErrorMsg, getParseErrorMsg, getRedirectURI, getRedirectURL };
|