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.umd.js CHANGED
@@ -485,6 +485,8 @@
485
485
  label = props.label,
486
486
  placeholder = props.placeholder,
487
487
  value = props.value,
488
+ _props$readOnly = props.readOnly,
489
+ readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
488
490
  onChange = props.onChange;
489
491
  function change(event) {
490
492
  event.stopPropagation();
@@ -494,6 +496,27 @@
494
496
  }
495
497
  var labelTxt = /*#__PURE__*/React__default["default"].createElement(Text$1, null, label);
496
498
  var placeholderTxt = /*#__PURE__*/React__default["default"].createElement(Text$1, null, placeholder);
499
+ if (readOnly === true) {
500
+ return value === true ? /*#__PURE__*/React__default["default"].createElement("div", {
501
+ className: "checkbox",
502
+ key: id + "1"
503
+ }, /*#__PURE__*/React__default["default"].createElement(Icon, {
504
+ id: id,
505
+ icon: "check",
506
+ size: "small"
507
+ }), /*#__PURE__*/React__default["default"].createElement("span", {
508
+ className: "checkmark"
509
+ }), /*#__PURE__*/React__default["default"].createElement("label", {
510
+ htmlFor: id
511
+ }, labelTxt)) : /*#__PURE__*/React__default["default"].createElement("div", {
512
+ className: "checkbox",
513
+ key: id + "0"
514
+ }, /*#__PURE__*/React__default["default"].createElement("span", {
515
+ className: "checkmark"
516
+ }), /*#__PURE__*/React__default["default"].createElement("label", {
517
+ htmlFor: id
518
+ }, labelTxt));
519
+ }
497
520
  return value === true ? /*#__PURE__*/React__default["default"].createElement("div", {
498
521
  className: "checkbox",
499
522
  key: id + "1"
@@ -503,7 +526,8 @@
503
526
  placeholder: placeholderTxt,
504
527
  checked: true,
505
528
  value: value,
506
- onChange: change
529
+ onChange: change,
530
+ readOnly: true
507
531
  }), /*#__PURE__*/React__default["default"].createElement("span", {
508
532
  className: "checkmark"
509
533
  }), /*#__PURE__*/React__default["default"].createElement("label", {
@@ -516,7 +540,8 @@
516
540
  type: "checkbox",
517
541
  placeholder: placeholderTxt,
518
542
  value: value,
519
- onChange: change
543
+ onChange: change,
544
+ readOnly: true
520
545
  }), /*#__PURE__*/React__default["default"].createElement("span", {
521
546
  className: "checkmark"
522
547
  }), /*#__PURE__*/React__default["default"].createElement("label", {
@@ -2573,7 +2598,6 @@
2573
2598
  var _temp = _catch$7(function () {
2574
2599
  var email = user.email;
2575
2600
  return Promise.resolve(onOK(email)).then(function () {
2576
- if (onSuccess) onSuccess();
2577
2601
  site.notify({
2578
2602
  title: /*#__PURE__*/React__default["default"].createElement(Text$1, null, "Forgot Password"),
2579
2603
  body: /*#__PURE__*/React__default["default"].createElement(Text$1, null, "Check your email to reset your password"),
@@ -2600,8 +2624,7 @@
2600
2624
  icon = _props$icon === void 0 ? false : _props$icon,
2601
2625
  _props$label = props.label,
2602
2626
  label = _props$label === void 0 ? "Reset Password" : _props$label,
2603
- onOK = props.onOK,
2604
- onSuccess = props.onSuccess;
2627
+ onOK = props.onOK;
2605
2628
  return icon ? /*#__PURE__*/React__default["default"].createElement(Icon, {
2606
2629
  icon: "mail_lock",
2607
2630
  clickable: true,
@@ -2658,7 +2681,6 @@
2658
2681
  }) : /*#__PURE__*/React__default["default"].createElement(Button, {
2659
2682
  label: label,
2660
2683
  action: execute,
2661
- outlined: true,
2662
2684
  className: ""
2663
2685
  });
2664
2686
  };
@@ -2739,6 +2761,24 @@
2739
2761
 
2740
2762
  var _LOGIN_DICTIONARY;
2741
2763
  var LOGIN_DICTIONARY = (_LOGIN_DICTIONARY = {
2764
+ 'New Password': {
2765
+ en: 'New Password',
2766
+ es: 'Nueva Contraseña',
2767
+ de: 'Neues Passwort',
2768
+ pt: 'Nova Senha',
2769
+ ca: 'Nova Contrasenya',
2770
+ it: 'Nuova Password',
2771
+ fr: 'Nouveau mot de passe'
2772
+ },
2773
+ 'Confirm New Password': {
2774
+ en: 'Confirm New Password',
2775
+ es: 'Confirmar Nueva Contraseña',
2776
+ de: 'Bestätigen Sie das neue Passwort',
2777
+ pt: 'Confirmar Nova Senha',
2778
+ ca: 'Confirma la nova contrasenya',
2779
+ it: 'Conferma la nuova password',
2780
+ fr: 'Confirmer le nouveau mot de passe'
2781
+ },
2742
2782
  'Forgot Password': {
2743
2783
  en: 'Forgot Password',
2744
2784
  es: 'Olvidé mi contraseña',
@@ -7067,6 +7107,7 @@
7067
7107
  function renderField() {
7068
7108
  var value1 = field.value || field.value === "" ? field.value : field["default"];
7069
7109
  var isHidden = CHECK['isFunction'](hidden) ? hidden(field, value1) : hidden;
7110
+ var editable = field.editable === false ? false : true;
7070
7111
  if (isHidden) {
7071
7112
  return null;
7072
7113
  } else {
@@ -7091,7 +7132,8 @@
7091
7132
  id: id,
7092
7133
  label: label,
7093
7134
  value: value1,
7094
- onChange: change
7135
+ onChange: change,
7136
+ readOnly: editable
7095
7137
  });
7096
7138
  case TYPES$1.NUMBER:
7097
7139
  return /*#__PURE__*/React__default["default"].createElement(NumberEditor, {