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.cjs
CHANGED
@@ -2777,6 +2777,15 @@ var LOGIN_DICTIONARY = (_LOGIN_DICTIONARY = {
|
|
2777
2777
|
it: 'Nuova Password',
|
2778
2778
|
fr: 'Nouveau mot de passe'
|
2779
2779
|
},
|
2780
|
+
'Current Password': {
|
2781
|
+
en: 'Current Password',
|
2782
|
+
es: 'Contraseña Actual',
|
2783
|
+
de: 'Aktuelles Passwort',
|
2784
|
+
pt: 'Senha Atual',
|
2785
|
+
ca: 'Contrasenya Actual',
|
2786
|
+
it: 'Password Corrente',
|
2787
|
+
fr: 'Mot de passe actuel'
|
2788
|
+
},
|
2780
2789
|
'Confirm New Password': {
|
2781
2790
|
en: 'Confirm New Password',
|
2782
2791
|
es: 'Confirmar Nueva Contraseña',
|
@@ -4151,8 +4160,11 @@ var EventCard = function EventCard(props) {
|
|
4151
4160
|
* Upload Area
|
4152
4161
|
*/
|
4153
4162
|
var UploadArea = function UploadArea(props) {
|
4154
|
-
var
|
4155
|
-
|
4163
|
+
var icon = props.icon,
|
4164
|
+
_props$label = props.label,
|
4165
|
+
label = _props$label === void 0 ? 'Add file or drop file here...' : _props$label,
|
4166
|
+
_props$disabled = props.disabled,
|
4167
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
4156
4168
|
var areaElement = React.useRef();
|
4157
4169
|
var _useState = React.useState(false),
|
4158
4170
|
drag = _useState[0],
|
@@ -4164,19 +4176,24 @@ var UploadArea = function UploadArea(props) {
|
|
4164
4176
|
}
|
4165
4177
|
}, []);
|
4166
4178
|
var onDragOver = function onDragOver() {
|
4179
|
+
if (disabled) return;
|
4167
4180
|
setDrag(true);
|
4168
4181
|
};
|
4169
4182
|
var onDragLeave = function onDragLeave() {
|
4183
|
+
if (disabled) return;
|
4170
4184
|
setDrag(false);
|
4171
4185
|
};
|
4172
4186
|
var dragging = drag === true ? 'drag-over' : '';
|
4187
|
+
var disabledStyle = disabled === true ? 'disabled' : '';
|
4173
4188
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
4174
|
-
className: "upload-area6 " + dragging,
|
4189
|
+
className: "upload-area6 " + dragging + " " + disabledStyle,
|
4175
4190
|
onDragOver: onDragOver,
|
4176
4191
|
onDragLeave: onDragLeave,
|
4177
4192
|
ref: areaElement
|
4178
4193
|
}, /*#__PURE__*/React__default["default"].createElement(UploadIcon, {
|
4179
|
-
|
4194
|
+
icon: icon,
|
4195
|
+
resumable: resumable,
|
4196
|
+
disabled: disabled
|
4180
4197
|
}), /*#__PURE__*/React__default["default"].createElement("label", null, label));
|
4181
4198
|
};
|
4182
4199
|
|
@@ -4186,7 +4203,9 @@ var UploadArea = function UploadArea(props) {
|
|
4186
4203
|
var UploadIcon = function UploadIcon(_ref) {
|
4187
4204
|
var _ref$icon = _ref.icon,
|
4188
4205
|
icon = _ref$icon === void 0 ? "folder_open" : _ref$icon,
|
4189
|
-
resumable = _ref.resumable
|
4206
|
+
resumable = _ref.resumable,
|
4207
|
+
_ref$disabled = _ref.disabled,
|
4208
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
4190
4209
|
var iconElement = React.useRef();
|
4191
4210
|
React.useEffect(function () {
|
4192
4211
|
if (resumable && iconElement.current) {
|
@@ -4198,7 +4217,8 @@ var UploadIcon = function UploadIcon(_ref) {
|
|
4198
4217
|
ref: iconElement
|
4199
4218
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
4200
4219
|
icon: icon,
|
4201
|
-
clickable: true
|
4220
|
+
clickable: true,
|
4221
|
+
disabled: disabled
|
4202
4222
|
}));
|
4203
4223
|
};
|
4204
4224
|
|
@@ -4272,7 +4292,9 @@ var Uploader = function Uploader(_ref) {
|
|
4272
4292
|
onProgress = _ref.onProgress,
|
4273
4293
|
onSuccess = _ref.onSuccess,
|
4274
4294
|
onError = _ref.onError,
|
4275
|
-
onComplete = _ref.onComplete
|
4295
|
+
onComplete = _ref.onComplete,
|
4296
|
+
_ref$disabled = _ref.disabled,
|
4297
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
4276
4298
|
var resumable = React.useMemo(function () {
|
4277
4299
|
var config = {
|
4278
4300
|
target: target,
|
@@ -4329,18 +4351,21 @@ var Uploader = function Uploader(_ref) {
|
|
4329
4351
|
return /*#__PURE__*/React__default["default"].createElement(UploadArea, {
|
4330
4352
|
resumable: resumable,
|
4331
4353
|
icon: icon,
|
4332
|
-
label: label
|
4354
|
+
label: label,
|
4355
|
+
disabled: disabled
|
4333
4356
|
});
|
4334
4357
|
case "icon":
|
4335
4358
|
return /*#__PURE__*/React__default["default"].createElement(UploadIcon, {
|
4336
4359
|
resumable: resumable,
|
4337
|
-
icon: icon
|
4360
|
+
icon: icon,
|
4361
|
+
disabled: disabled
|
4338
4362
|
});
|
4339
4363
|
default:
|
4340
4364
|
return /*#__PURE__*/React__default["default"].createElement(UploadArea, {
|
4341
4365
|
resumable: resumable,
|
4342
4366
|
icon: icon,
|
4343
|
-
label: label
|
4367
|
+
label: label,
|
4368
|
+
disabled: disabled
|
4344
4369
|
});
|
4345
4370
|
}
|
4346
4371
|
}
|
@@ -4363,7 +4388,8 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
4363
4388
|
onClose = _ref.onClose,
|
4364
4389
|
children = _ref.children,
|
4365
4390
|
className = _ref.className,
|
4366
|
-
disabled = _ref.disabled,
|
4391
|
+
_ref$disabled = _ref.disabled,
|
4392
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
4367
4393
|
onCanClose = _ref.onCanClose,
|
4368
4394
|
_ref$overlayCanClose = _ref.overlayCanClose,
|
4369
4395
|
overlayCanClose = _ref$overlayCanClose === void 0 ? true : _ref$overlayCanClose;
|
@@ -4400,12 +4426,13 @@ var UploadDialog = function UploadDialog(_ref) {
|
|
4400
4426
|
actions: actions,
|
4401
4427
|
className: className,
|
4402
4428
|
overlayCanClose: overlayCanClose
|
4403
|
-
},
|
4429
|
+
}, /*#__PURE__*/React__default["default"].createElement(Uploader, {
|
4404
4430
|
label: label,
|
4405
4431
|
accept: accept,
|
4406
4432
|
target: target,
|
4407
4433
|
onSuccess: success,
|
4408
|
-
onComplete: complete
|
4434
|
+
onComplete: complete,
|
4435
|
+
disabled: disabled
|
4409
4436
|
}), children);
|
4410
4437
|
};
|
4411
4438
|
|