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.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", {
@@ -2581,7 +2606,7 @@
2581
2606
  });
2582
2607
  }, function (error) {
2583
2608
  site.notify({
2584
- title: "Errorrrrr",
2609
+ title: "Error",
2585
2610
  body: error.message,
2586
2611
  type: "danger",
2587
2612
  icon: "error"
@@ -2656,7 +2681,6 @@
2656
2681
  }) : /*#__PURE__*/React__default["default"].createElement(Button, {
2657
2682
  label: label,
2658
2683
  action: execute,
2659
- outlined: true,
2660
2684
  className: ""
2661
2685
  });
2662
2686
  };
@@ -2737,6 +2761,24 @@
2737
2761
 
2738
2762
  var _LOGIN_DICTIONARY;
2739
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
+ },
2740
2782
  'Forgot Password': {
2741
2783
  en: 'Forgot Password',
2742
2784
  es: 'Olvidé mi contraseña',
@@ -7065,6 +7107,7 @@
7065
7107
  function renderField() {
7066
7108
  var value1 = field.value || field.value === "" ? field.value : field["default"];
7067
7109
  var isHidden = CHECK['isFunction'](hidden) ? hidden(field, value1) : hidden;
7110
+ var editable = field.editable === false ? false : true;
7068
7111
  if (isHidden) {
7069
7112
  return null;
7070
7113
  } else {
@@ -7089,7 +7132,8 @@
7089
7132
  id: id,
7090
7133
  label: label,
7091
7134
  value: value1,
7092
- onChange: change
7135
+ onChange: change,
7136
+ readOnly: !editable
7093
7137
  });
7094
7138
  case TYPES$1.NUMBER:
7095
7139
  return /*#__PURE__*/React__default["default"].createElement(NumberEditor, {