versacall-dashboards-library-react 2.0.37 → 2.0.38

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.
@@ -57,6 +57,7 @@ function DashboardsCellGlobalActions(props) {
57
57
  classes = props.classes,
58
58
  images = props.images,
59
59
  dashboards = props.dashboards,
60
+ variables = props.variables,
60
61
  updateAction = props.updateAction,
61
62
  action = props.action;
62
63
 
@@ -119,6 +120,10 @@ function DashboardsCellGlobalActions(props) {
119
120
  fullWidth: true,
120
121
  select: true
121
122
  }, /*#__PURE__*/_react.default.createElement("option", {
123
+ value: "text"
124
+ }, intl.formatMessage({
125
+ id: '__text'
126
+ })), /*#__PURE__*/_react.default.createElement("option", {
122
127
  value: "url"
123
128
  }, intl.formatMessage({
124
129
  id: '__url'
@@ -133,7 +138,25 @@ function DashboardsCellGlobalActions(props) {
133
138
  })))), /*#__PURE__*/_react.default.createElement(_Grid.default, {
134
139
  xs: 10,
135
140
  item: true
136
- }, action.type === 'url' && /*#__PURE__*/_react.default.createElement(_TextField.default, {
141
+ }, action.type === 'text' && /*#__PURE__*/_react.default.createElement(_versacallCoreLibraryReact.CoreTextField, {
142
+ id: "name",
143
+ value: action.value,
144
+ options: variables,
145
+ label: intl.formatMessage({
146
+ id: '__text'
147
+ }),
148
+ InputLabelProps: {
149
+ shrink: true
150
+ },
151
+ updateValue: eventValue => updateAction(_objectSpread(_objectSpread({}, action), {}, {
152
+ value: eventValue
153
+ })),
154
+ selectOption: eventOption => updateAction(_objectSpread(_objectSpread({}, action), {}, {
155
+ value: "~".concat(eventOption.name)
156
+ })),
157
+ fullWidth: true,
158
+ multiline: true
159
+ }), action.type === 'url' && /*#__PURE__*/_react.default.createElement(_TextField.default, {
137
160
  id: "url",
138
161
  variant: "outlined",
139
162
  value: action.value,
@@ -206,10 +229,12 @@ DashboardsCellGlobalActions.propTypes = {
206
229
  classes: _propTypes.default.shape().isRequired,
207
230
  updateAction: _propTypes.default.func.isRequired,
208
231
  images: _propTypes.default.arrayOf(_propTypes.default.shape()),
209
- dashboards: _propTypes.default.arrayOf(_propTypes.default.shape())
232
+ dashboards: _propTypes.default.arrayOf(_propTypes.default.shape()),
233
+ variables: _propTypes.default.arrayOf(_propTypes.default.shape())
210
234
  };
211
235
  DashboardsCellGlobalActions.defaultProps = {
212
236
  images: [],
237
+ variables: [],
213
238
  dashboards: []
214
239
  };
215
240
 
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "versacall": {
3
3
  "title": "Versacall Dashboards Library React",
4
4
  "applicationType": "react-library",
5
- "build": 37
5
+ "build": 38
6
6
  },
7
7
  "name": "versacall-dashboards-library-react",
8
- "version": "2.0.37",
8
+ "version": "2.0.38",
9
9
  "description": "Versacall Dashboards Library",
10
10
  "main": "dist/index.js",
11
11
  "module": "dist/index.js",