ywana-core8 0.1.38 → 0.1.40
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 -5
- 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 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +49 -5
- 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 +2 -3
- 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", {
|
@@ -2588,7 +2613,7 @@ var ForgetUserPasswordAction = function ForgetUserPasswordAction(props) {
|
|
2588
2613
|
});
|
2589
2614
|
}, function (error) {
|
2590
2615
|
site.notify({
|
2591
|
-
title: "
|
2616
|
+
title: "Error",
|
2592
2617
|
body: error.message,
|
2593
2618
|
type: "danger",
|
2594
2619
|
icon: "error"
|
@@ -2663,7 +2688,6 @@ var UnlockUserAction = function UnlockUserAction(props) {
|
|
2663
2688
|
}) : /*#__PURE__*/React__default["default"].createElement(Button, {
|
2664
2689
|
label: label,
|
2665
2690
|
action: execute,
|
2666
|
-
outlined: true,
|
2667
2691
|
className: ""
|
2668
2692
|
});
|
2669
2693
|
};
|
@@ -2744,6 +2768,24 @@ var ChangeUserPasswordAction = function ChangeUserPasswordAction(props) {
|
|
2744
2768
|
|
2745
2769
|
var _LOGIN_DICTIONARY;
|
2746
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
|
+
},
|
2747
2789
|
'Forgot Password': {
|
2748
2790
|
en: 'Forgot Password',
|
2749
2791
|
es: 'Olvidé mi contraseña',
|
@@ -7072,6 +7114,7 @@ var FieldEditor = function FieldEditor(_ref5) {
|
|
7072
7114
|
function renderField() {
|
7073
7115
|
var value1 = field.value || field.value === "" ? field.value : field["default"];
|
7074
7116
|
var isHidden = CHECK['isFunction'](hidden) ? hidden(field, value1) : hidden;
|
7117
|
+
var editable = field.editable === false ? false : true;
|
7075
7118
|
if (isHidden) {
|
7076
7119
|
return null;
|
7077
7120
|
} else {
|
@@ -7096,7 +7139,8 @@ var FieldEditor = function FieldEditor(_ref5) {
|
|
7096
7139
|
id: id,
|
7097
7140
|
label: label,
|
7098
7141
|
value: value1,
|
7099
|
-
onChange: change
|
7142
|
+
onChange: change,
|
7143
|
+
readOnly: !editable
|
7100
7144
|
});
|
7101
7145
|
case TYPES$1.NUMBER:
|
7102
7146
|
return /*#__PURE__*/React__default["default"].createElement(NumberEditor, {
|