@driveflux/ui 1.4.2 → 1.5.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.
|
@@ -129,7 +129,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
129
129
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
130
130
|
}
|
|
131
131
|
function _ts_generator(thisArg, body) {
|
|
132
|
-
var f, y, t,
|
|
132
|
+
var f, y, t, _ = {
|
|
133
133
|
label: 0,
|
|
134
134
|
sent: function() {
|
|
135
135
|
if (t[0] & 1) throw t[1];
|
|
@@ -137,12 +137,8 @@ function _ts_generator(thisArg, body) {
|
|
|
137
137
|
},
|
|
138
138
|
trys: [],
|
|
139
139
|
ops: []
|
|
140
|
-
};
|
|
141
|
-
return g = {
|
|
142
|
-
next: verb(0),
|
|
143
|
-
"throw": verb(1),
|
|
144
|
-
"return": verb(2)
|
|
145
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
140
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
141
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
146
142
|
return this;
|
|
147
143
|
}), g;
|
|
148
144
|
function verb(n) {
|
|
@@ -155,7 +151,7 @@ function _ts_generator(thisArg, body) {
|
|
|
155
151
|
}
|
|
156
152
|
function step(op) {
|
|
157
153
|
if (f) throw new TypeError("Generator is already executing.");
|
|
158
|
-
while(_)try {
|
|
154
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
159
155
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
160
156
|
if (y = 0, t) op = [
|
|
161
157
|
op[0] & 2,
|
|
@@ -237,73 +233,77 @@ var StandardModalContent = function(_param) {
|
|
|
237
233
|
var Content = modalContentConfig.content;
|
|
238
234
|
var _useState = _sliced_to_array(useState(false), 2), isSaving = _useState[0], setIsSaving = _useState[1];
|
|
239
235
|
var modalState = useEnhancedModal().modalState;
|
|
240
|
-
var handleOK = useCallback(
|
|
241
|
-
return
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
236
|
+
var handleOK = useCallback(function() {
|
|
237
|
+
return _async_to_generator(function() {
|
|
238
|
+
return _ts_generator(this, function(_state) {
|
|
239
|
+
switch(_state.label){
|
|
240
|
+
case 0:
|
|
241
|
+
setIsSaving(true);
|
|
242
|
+
if (!modalContentConfig.onOk) return [
|
|
243
|
+
3,
|
|
244
|
+
4
|
|
245
|
+
];
|
|
246
|
+
_state.label = 1;
|
|
247
|
+
case 1:
|
|
248
|
+
_state.trys.push([
|
|
249
|
+
1,
|
|
250
|
+
,
|
|
251
|
+
3,
|
|
252
|
+
4
|
|
253
|
+
]);
|
|
254
|
+
return [
|
|
255
|
+
4,
|
|
256
|
+
modalContentConfig.onOk(modalState)
|
|
257
|
+
];
|
|
258
|
+
case 2:
|
|
259
|
+
_state.sent();
|
|
260
|
+
return [
|
|
261
|
+
3,
|
|
262
|
+
4
|
|
263
|
+
];
|
|
264
|
+
case 3:
|
|
265
|
+
setIsSaving(false);
|
|
266
|
+
return [
|
|
267
|
+
7
|
|
268
|
+
];
|
|
269
|
+
case 4:
|
|
270
|
+
close();
|
|
271
|
+
return [
|
|
272
|
+
2
|
|
273
|
+
];
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
})();
|
|
277
|
+
}, [
|
|
280
278
|
modalContentConfig.onOk,
|
|
281
279
|
close,
|
|
282
280
|
modalState
|
|
283
281
|
]);
|
|
284
|
-
var handleCancel = useCallback(
|
|
285
|
-
return
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
282
|
+
var handleCancel = useCallback(function() {
|
|
283
|
+
return _async_to_generator(function() {
|
|
284
|
+
return _ts_generator(this, function(_state) {
|
|
285
|
+
switch(_state.label){
|
|
286
|
+
case 0:
|
|
287
|
+
if (!modalContentConfig.onCancel) return [
|
|
288
|
+
3,
|
|
289
|
+
2
|
|
290
|
+
];
|
|
291
|
+
return [
|
|
292
|
+
4,
|
|
293
|
+
modalContentConfig.onCancel()
|
|
294
|
+
];
|
|
295
|
+
case 1:
|
|
296
|
+
_state.sent();
|
|
297
|
+
_state.label = 2;
|
|
298
|
+
case 2:
|
|
299
|
+
close();
|
|
300
|
+
return [
|
|
301
|
+
2
|
|
302
|
+
];
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
})();
|
|
306
|
+
}, [
|
|
307
307
|
modalContentConfig.onCancel,
|
|
308
308
|
close
|
|
309
309
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -36,32 +36,32 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@chakra-ui/react": "^2.10.
|
|
40
|
-
"@driveflux/icons": "1.
|
|
41
|
-
"@driveflux/singleton": "1.
|
|
42
|
-
"@emotion/react": "^11.
|
|
43
|
-
"@emotion/styled": "^11.
|
|
44
|
-
"framer-motion": "^
|
|
39
|
+
"@chakra-ui/react": "^2.10.7",
|
|
40
|
+
"@driveflux/icons": "1.5.0",
|
|
41
|
+
"@driveflux/singleton": "1.7.0",
|
|
42
|
+
"@emotion/react": "^11.14.0",
|
|
43
|
+
"@emotion/styled": "^11.14.0",
|
|
44
|
+
"framer-motion": "^12.10.1",
|
|
45
45
|
"lodash": "^4.17.21"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@driveflux/fab": "2.
|
|
49
|
-
"@driveflux/problem": "4.
|
|
50
|
-
"@driveflux/result": "4.
|
|
51
|
-
"@driveflux/tsconfig": "1.
|
|
52
|
-
"@swc/cli": "0.
|
|
53
|
-
"@swc/core": "1.
|
|
54
|
-
"@types/lodash": "^4.17.
|
|
55
|
-
"@types/node": "^22.
|
|
56
|
-
"@types/react": "^
|
|
48
|
+
"@driveflux/fab": "2.5.0",
|
|
49
|
+
"@driveflux/problem": "4.5.0",
|
|
50
|
+
"@driveflux/result": "4.5.0",
|
|
51
|
+
"@driveflux/tsconfig": "1.4.0",
|
|
52
|
+
"@swc/cli": "0.7.5",
|
|
53
|
+
"@swc/core": "1.11.24",
|
|
54
|
+
"@types/lodash": "^4.17.16",
|
|
55
|
+
"@types/node": "^22.15.16",
|
|
56
|
+
"@types/react": "^19.1.3",
|
|
57
57
|
"del-cli": "^6.0.0",
|
|
58
|
-
"type-fest": "^4.
|
|
59
|
-
"typescript": "^5.
|
|
58
|
+
"type-fest": "^4.41.0",
|
|
59
|
+
"typescript": "^5.8.3"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"next": "15.
|
|
63
|
-
"react": "
|
|
64
|
-
"swr": "^2.
|
|
62
|
+
"next": "15.3.2",
|
|
63
|
+
"react": "19.1.0",
|
|
64
|
+
"swr": "^2.3.3"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "fab",
|