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