ywana-core8 0.1.43 → 0.1.45
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.cjs +40 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +40 -13
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +40 -13
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/widgets/login/dictionary.js +10 -0
- package/src/widgets/upload/Upload.test.js +1 -1
- package/src/widgets/upload/UploadArea.css +6 -0
- package/src/widgets/upload/UploadArea.js +9 -6
- package/src/widgets/upload/UploadDialog.js +2 -2
- package/src/widgets/upload/Uploader.js +4 -4
package/dist/index.umd.js
CHANGED
@@ -2770,6 +2770,15 @@
|
|
2770
2770
|
it: 'Nuova Password',
|
2771
2771
|
fr: 'Nouveau mot de passe'
|
2772
2772
|
},
|
2773
|
+
'Current Password': {
|
2774
|
+
en: 'Current Password',
|
2775
|
+
es: 'Contraseña Actual',
|
2776
|
+
de: 'Aktuelles Passwort',
|
2777
|
+
pt: 'Senha Atual',
|
2778
|
+
ca: 'Contrasenya Actual',
|
2779
|
+
it: 'Password Corrente',
|
2780
|
+
fr: 'Mot de passe actuel'
|
2781
|
+
},
|
2773
2782
|
'Confirm New Password': {
|
2774
2783
|
en: 'Confirm New Password',
|
2775
2784
|
es: 'Confirmar Nueva Contraseña',
|
@@ -4144,8 +4153,11 @@
|
|
4144
4153
|
* Upload Area
|
4145
4154
|
*/
|
4146
4155
|
var UploadArea = function UploadArea(props) {
|
4147
|
-
var
|
4148
|
-
|
4156
|
+
var icon = props.icon,
|
4157
|
+
_props$label = props.label,
|
4158
|
+
label = _props$label === void 0 ? 'Add file or drop file here...' : _props$label,
|
4159
|
+
_props$disabled = props.disabled,
|
4160
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
4149
4161
|
var areaElement = React.useRef();
|
4150
4162
|
var _useState = React.useState(false),
|
4151
4163
|
drag = _useState[0],
|
@@ -4157,19 +4169,24 @@
|
|
4157
4169
|
}
|
4158
4170
|
}, []);
|
4159
4171
|
var onDragOver = function onDragOver() {
|
4172
|
+
if (disabled) return;
|
4160
4173
|
setDrag(true);
|
4161
4174
|
};
|
4162
4175
|
var onDragLeave = function onDragLeave() {
|
4176
|
+
if (disabled) return;
|
4163
4177
|
setDrag(false);
|
4164
4178
|
};
|
4165
4179
|
var dragging = drag === true ? 'drag-over' : '';
|
4180
|
+
var disabledStyle = disabled === true ? 'disabled' : '';
|
4166
4181
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
4167
|
-
className: "upload-area6 " + dragging,
|
4182
|
+
className: "upload-area6 " + dragging + " " + disabledStyle,
|
4168
4183
|
onDragOver: onDragOver,
|
4169
4184
|
onDragLeave: onDragLeave,
|
4170
4185
|
ref: areaElement
|
4171
4186
|
}, /*#__PURE__*/React__default["default"].createElement(UploadIcon, {
|
4172
|
-
|
4187
|
+
icon: icon,
|
4188
|
+
resumable: resumable,
|
4189
|
+
disabled: disabled
|
4173
4190
|
}), /*#__PURE__*/React__default["default"].createElement("label", null, label));
|
4174
4191
|
};
|
4175
4192
|
|
@@ -4179,7 +4196,9 @@
|
|
4179
4196
|
var UploadIcon = function UploadIcon(_ref) {
|
4180
4197
|
var _ref$icon = _ref.icon,
|
4181
4198
|
icon = _ref$icon === void 0 ? "folder_open" : _ref$icon,
|
4182
|
-
resumable = _ref.resumable
|
4199
|
+
resumable = _ref.resumable,
|
4200
|
+
_ref$disabled = _ref.disabled,
|
4201
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
4183
4202
|
var iconElement = React.useRef();
|
4184
4203
|
React.useEffect(function () {
|
4185
4204
|
if (resumable && iconElement.current) {
|
@@ -4191,7 +4210,8 @@
|
|
4191
4210
|
ref: iconElement
|
4192
4211
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
4193
4212
|
icon: icon,
|
4194
|
-
clickable: true
|
4213
|
+
clickable: true,
|
4214
|
+
disabled: disabled
|
4195
4215
|
}));
|
4196
4216
|
};
|
4197
4217
|
|
@@ -4265,7 +4285,9 @@
|
|
4265
4285
|
onProgress = _ref.onProgress,
|
4266
4286
|
onSuccess = _ref.onSuccess,
|
4267
4287
|
onError = _ref.onError,
|
4268
|
-
onComplete = _ref.onComplete
|
4288
|
+
onComplete = _ref.onComplete,
|
4289
|
+
_ref$disabled = _ref.disabled,
|
4290
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
4269
4291
|
var resumable = React.useMemo(function () {
|
4270
4292
|
var config = {
|
4271
4293
|
target: target,
|
@@ -4322,18 +4344,21 @@
|
|
4322
4344
|
return /*#__PURE__*/React__default["default"].createElement(UploadArea, {
|
4323
4345
|
resumable: resumable,
|
4324
4346
|
icon: icon,
|
4325
|
-
label: label
|
4347
|
+
label: label,
|
4348
|
+
disabled: disabled
|
4326
4349
|
});
|
4327
4350
|
case "icon":
|
4328
4351
|
return /*#__PURE__*/React__default["default"].createElement(UploadIcon, {
|
4329
4352
|
resumable: resumable,
|
4330
|
-
icon: icon
|
4353
|
+
icon: icon,
|
4354
|
+
disabled: disabled
|
4331
4355
|
});
|
4332
4356
|
default:
|
4333
4357
|
return /*#__PURE__*/React__default["default"].createElement(UploadArea, {
|
4334
4358
|
resumable: resumable,
|
4335
4359
|
icon: icon,
|
4336
|
-
label: label
|
4360
|
+
label: label,
|
4361
|
+
disabled: disabled
|
4337
4362
|
});
|
4338
4363
|
}
|
4339
4364
|
}
|
@@ -4356,7 +4381,8 @@
|
|
4356
4381
|
onClose = _ref.onClose,
|
4357
4382
|
children = _ref.children,
|
4358
4383
|
className = _ref.className,
|
4359
|
-
disabled = _ref.disabled,
|
4384
|
+
_ref$disabled = _ref.disabled,
|
4385
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
4360
4386
|
onCanClose = _ref.onCanClose,
|
4361
4387
|
_ref$overlayCanClose = _ref.overlayCanClose,
|
4362
4388
|
overlayCanClose = _ref$overlayCanClose === void 0 ? true : _ref$overlayCanClose;
|
@@ -4393,12 +4419,13 @@
|
|
4393
4419
|
actions: actions,
|
4394
4420
|
className: className,
|
4395
4421
|
overlayCanClose: overlayCanClose
|
4396
|
-
},
|
4422
|
+
}, /*#__PURE__*/React__default["default"].createElement(Uploader, {
|
4397
4423
|
label: label,
|
4398
4424
|
accept: accept,
|
4399
4425
|
target: target,
|
4400
4426
|
onSuccess: success,
|
4401
|
-
onComplete: complete
|
4427
|
+
onComplete: complete,
|
4428
|
+
disabled: disabled
|
4402
4429
|
}), children);
|
4403
4430
|
};
|
4404
4431
|
|