ywana-core8 0.1.37 → 0.1.39
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 +49 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +49 -7
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +49 -7
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +2 -1
- package/src/html/checkbox.css +4 -0
- package/src/html/checkbox.js +38 -8
- package/src/widgets/login/actions.js +3 -5
- package/src/widgets/login/dictionary.js +20 -0
package/dist/index.cjs
CHANGED
@@ -492,6 +492,8 @@ var CheckBox = function CheckBox(props) {
|
|
492
492
|
label = props.label,
|
493
493
|
placeholder = props.placeholder,
|
494
494
|
value = props.value,
|
495
|
+
_props$readOnly = props.readOnly,
|
496
|
+
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
495
497
|
onChange = props.onChange;
|
496
498
|
function change(event) {
|
497
499
|
event.stopPropagation();
|
@@ -501,6 +503,27 @@ var CheckBox = function CheckBox(props) {
|
|
501
503
|
}
|
502
504
|
var labelTxt = /*#__PURE__*/React__default["default"].createElement(Text$1, null, label);
|
503
505
|
var placeholderTxt = /*#__PURE__*/React__default["default"].createElement(Text$1, null, placeholder);
|
506
|
+
if (readOnly === true) {
|
507
|
+
return value === true ? /*#__PURE__*/React__default["default"].createElement("div", {
|
508
|
+
className: "checkbox",
|
509
|
+
key: id + "1"
|
510
|
+
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
511
|
+
id: id,
|
512
|
+
icon: "check",
|
513
|
+
size: "small"
|
514
|
+
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
515
|
+
className: "checkmark"
|
516
|
+
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
517
|
+
htmlFor: id
|
518
|
+
}, labelTxt)) : /*#__PURE__*/React__default["default"].createElement("div", {
|
519
|
+
className: "checkbox",
|
520
|
+
key: id + "0"
|
521
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
522
|
+
className: "checkmark"
|
523
|
+
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
524
|
+
htmlFor: id
|
525
|
+
}, labelTxt));
|
526
|
+
}
|
504
527
|
return value === true ? /*#__PURE__*/React__default["default"].createElement("div", {
|
505
528
|
className: "checkbox",
|
506
529
|
key: id + "1"
|
@@ -510,7 +533,8 @@ var CheckBox = function CheckBox(props) {
|
|
510
533
|
placeholder: placeholderTxt,
|
511
534
|
checked: true,
|
512
535
|
value: value,
|
513
|
-
onChange: change
|
536
|
+
onChange: change,
|
537
|
+
readOnly: true
|
514
538
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
515
539
|
className: "checkmark"
|
516
540
|
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
@@ -523,7 +547,8 @@ var CheckBox = function CheckBox(props) {
|
|
523
547
|
type: "checkbox",
|
524
548
|
placeholder: placeholderTxt,
|
525
549
|
value: value,
|
526
|
-
onChange: change
|
550
|
+
onChange: change,
|
551
|
+
readOnly: true
|
527
552
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
528
553
|
className: "checkmark"
|
529
554
|
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
@@ -2580,7 +2605,6 @@ var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
|
|
2580
2605
|
var _temp = _catch$7(function () {
|
2581
2606
|
var email = user.email;
|
2582
2607
|
return Promise.resolve(onOK(email)).then(function () {
|
2583
|
-
if (onSuccess) onSuccess();
|
2584
2608
|
site.notify({
|
2585
2609
|
title: /*#__PURE__*/React__default["default"].createElement(Text$1, null, "Forgot Password"),
|
2586
2610
|
body: /*#__PURE__*/React__default["default"].createElement(Text$1, null, "Check your email to reset your password"),
|
@@ -2607,8 +2631,7 @@ var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
|
|
2607
2631
|
icon = _props$icon === void 0 ? false : _props$icon,
|
2608
2632
|
_props$label = props.label,
|
2609
2633
|
label = _props$label === void 0 ? "Reset Password" : _props$label,
|
2610
|
-
onOK = props.onOK
|
2611
|
-
onSuccess = props.onSuccess;
|
2634
|
+
onOK = props.onOK;
|
2612
2635
|
return icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
2613
2636
|
icon: "mail_lock",
|
2614
2637
|
clickable: true,
|
@@ -2665,7 +2688,6 @@ var UnlockUserAction = function UnlockUserAction(props) {
|
|
2665
2688
|
}) : /*#__PURE__*/React__default["default"].createElement(Button, {
|
2666
2689
|
label: label,
|
2667
2690
|
action: execute,
|
2668
|
-
outlined: true,
|
2669
2691
|
className: ""
|
2670
2692
|
});
|
2671
2693
|
};
|
@@ -2746,6 +2768,24 @@ var ChangeUserPasswordAction = function ChangeUserPasswordAction(props) {
|
|
2746
2768
|
|
2747
2769
|
var _LOGIN_DICTIONARY;
|
2748
2770
|
var LOGIN_DICTIONARY = (_LOGIN_DICTIONARY = {
|
2771
|
+
'New Password': {
|
2772
|
+
en: 'New Password',
|
2773
|
+
es: 'Nueva Contraseña',
|
2774
|
+
de: 'Neues Passwort',
|
2775
|
+
pt: 'Nova Senha',
|
2776
|
+
ca: 'Nova Contrasenya',
|
2777
|
+
it: 'Nuova Password',
|
2778
|
+
fr: 'Nouveau mot de passe'
|
2779
|
+
},
|
2780
|
+
'Confirm New Password': {
|
2781
|
+
en: 'Confirm New Password',
|
2782
|
+
es: 'Confirmar Nueva Contraseña',
|
2783
|
+
de: 'Bestätigen Sie das neue Passwort',
|
2784
|
+
pt: 'Confirmar Nova Senha',
|
2785
|
+
ca: 'Confirma la nova contrasenya',
|
2786
|
+
it: 'Conferma la nuova password',
|
2787
|
+
fr: 'Confirmer le nouveau mot de passe'
|
2788
|
+
},
|
2749
2789
|
'Forgot Password': {
|
2750
2790
|
en: 'Forgot Password',
|
2751
2791
|
es: 'Olvidé mi contraseña',
|
@@ -7074,6 +7114,7 @@ var FieldEditor = function FieldEditor(_ref5) {
|
|
7074
7114
|
function renderField() {
|
7075
7115
|
var value1 = field.value || field.value === "" ? field.value : field["default"];
|
7076
7116
|
var isHidden = CHECK['isFunction'](hidden) ? hidden(field, value1) : hidden;
|
7117
|
+
var editable = field.editable === false ? false : true;
|
7077
7118
|
if (isHidden) {
|
7078
7119
|
return null;
|
7079
7120
|
} else {
|
@@ -7098,7 +7139,8 @@ var FieldEditor = function FieldEditor(_ref5) {
|
|
7098
7139
|
id: id,
|
7099
7140
|
label: label,
|
7100
7141
|
value: value1,
|
7101
|
-
onChange: change
|
7142
|
+
onChange: change,
|
7143
|
+
readOnly: editable
|
7102
7144
|
});
|
7103
7145
|
case TYPES$1.NUMBER:
|
7104
7146
|
return /*#__PURE__*/React__default["default"].createElement(NumberEditor, {
|