@lideralia/alife-uikit 1.1.372 → 1.1.375

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.
@@ -41,9 +41,10 @@ var Textarea = function Textarea(props) {
41
41
  iconRightAction = props.iconRightAction,
42
42
  typeAction = props.typeAction,
43
43
  defaultValue = props.defaultValue,
44
+ maxLength = props.maxLength,
44
45
  counter = props.counter;
45
46
 
46
- var _useState = (0, _react.useState)(MAX_COUNTER),
47
+ var _useState = (0, _react.useState)(maxLength),
47
48
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
48
49
  numCounter = _useState2[0],
49
50
  setNumCounter = _useState2[1];
@@ -61,10 +62,10 @@ var Textarea = function Textarea(props) {
61
62
  var _TextareaEditableRef$ = TextareaEditableRef.current,
62
63
  id = _TextareaEditableRef$.id,
63
64
  value = _TextareaEditableRef$.value;
64
- var largeChars = MAX_COUNTER - value.length;
65
+ var largeChars = maxLength - value.length;
65
66
  var currentLength = (_TextareaEditableRef$2 = TextareaEditableRef.current.value) === null || _TextareaEditableRef$2 === void 0 ? void 0 : _TextareaEditableRef$2.length;
66
67
 
67
- if (counter && currentLength > MAX_COUNTER) {
68
+ if (counter && currentLength > maxLength) {
68
69
  setCountError(true);
69
70
  } else {
70
71
  setCountError(false);
@@ -98,7 +99,7 @@ var Textarea = function Textarea(props) {
98
99
  contentEditable: !disabled,
99
100
  ref: TextareaEditableRef,
100
101
  isLoading: isLoading,
101
- length: counter && MAX_COUNTER,
102
+ length: counter && maxLength,
102
103
  placeholder: placeholderMessage,
103
104
  disabled: disabled,
104
105
  onKeyUp: function onKeyUp() {
@@ -54,7 +54,9 @@ var Header = function Header(_ref, props) {
54
54
  adminLineLabel = _ref.adminLineLabel,
55
55
  noAdminLineLabel = _ref.noAdminLineLabel,
56
56
  shareCopy = _ref.shareCopy,
57
- eventAction = _ref.eventAction;
57
+ eventAction = _ref.eventAction,
58
+ paramsLiveChat = _ref.paramsLiveChat,
59
+ allowShowLiveChat = _ref.allowShowLiveChat;
58
60
 
59
61
  var _useState = (0, _react.useState)(false),
60
62
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -118,14 +120,15 @@ var Header = function Header(_ref, props) {
118
120
  alignItems: "center",
119
121
  justifyContent: "space-between",
120
122
  "data-testid": "test-Header"
121
- }, props), _react.default.createElement(_reactLivechat.default, {
123
+ }, props), allowShowLiveChat && _react.default.createElement(_reactLivechat.default, {
122
124
  onChatLoaded: function onChatLoaded(ref) {
123
125
  return setLiveChat(ref);
124
126
  },
125
127
  license: 13369755,
126
128
  onMessage: function onMessage(notification) {
127
129
  return captureNotification(notification);
128
- }
130
+ },
131
+ params: paramsLiveChat
129
132
  }), _react.default.createElement(_Layout.Box, {
130
133
  onClick: function onClick() {
131
134
  return goToHome();
@@ -299,5 +302,7 @@ Header.defaultProps = {
299
302
  adminLineLabel: null,
300
303
  noAdminLineLabel: null,
301
304
  shareCopy: null,
302
- eventAction: null
305
+ eventAction: null,
306
+ paramsLiveChat: null,
307
+ allowShowLiveChat: true
303
308
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lideralia/alife-uikit",
3
- "version": "1.1.372",
3
+ "version": "1.1.375",
4
4
  "description": "Librería y documentación de componentes, basada en el Design System de Alife.",
5
5
  "homepage": "https://github.com/lideralia/alife-frontend-components#readme",
6
6
  "bugs": {