@nebula.js/sn-action-button 1.14.3 → 1.14.4

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.
@@ -1,6 +1,6 @@
1
1
  /*
2
- * @nebula.js/sn-action-button v1.14.3
3
- * Copyright (c) 2021 QlikTech International AB
2
+ * @nebula.js/sn-action-button v1.14.4
3
+ * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
@@ -1027,7 +1027,7 @@ var actions = [{
1027
1027
  automation = _ref40.automation,
1028
1028
  automationPostData = _ref40.automationPostData;
1029
1029
  return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21() {
1030
- var itemInfo, autoInfo, executePath, inputBlocks, newDate, bmkProp, bmk;
1030
+ var itemInfo, autoInfo, executePath, inputBlock, newDate, bmkProp, bmk;
1031
1031
  return regeneratorRuntime.wrap(function _callee21$(_context21) {
1032
1032
  while (1) {
1033
1033
  switch (_context21.prev = _context21.next) {
@@ -1064,20 +1064,20 @@ var actions = [{
1064
1064
  return fetch("../api/v1/automations/".concat(itemInfo.resourceId, "/blocks")).then(function (response) {
1065
1065
  return response.json();
1066
1066
  }).then(function (blocks) {
1067
- var items;
1067
+ var item;
1068
1068
 
1069
1069
  for (var i = 0; i < blocks.blocks.length; i++) {
1070
1070
  if (blocks.blocks[i].displayName === 'Inputs') {
1071
- items = blocks.blocks[i].form;
1071
+ item = blocks.blocks[i];
1072
1072
  break;
1073
1073
  }
1074
1074
  }
1075
1075
 
1076
- return items;
1076
+ return item.form[0].label.toLowerCase();
1077
1077
  });
1078
1078
 
1079
1079
  case 13:
1080
- inputBlocks = _context21.sent;
1080
+ inputBlock = _context21.sent;
1081
1081
  newDate = new Date();
1082
1082
  bmkProp = {
1083
1083
  qProp: {
@@ -1104,7 +1104,7 @@ var actions = [{
1104
1104
 
1105
1105
  case 18:
1106
1106
  bmk = _context21.sent;
1107
- executePath = "".concat(executePath, "&").concat(inputBlocks[0].label.toLowerCase(), "=").concat(encodeURIComponent(app.id), "&").concat(inputBlocks[1].label.toLowerCase(), "=").concat(bmk);
1107
+ executePath = "".concat(executePath, "&").concat(inputBlock, "=").concat(bmk);
1108
1108
 
1109
1109
  case 20:
1110
1110
  _context21.next = 22;
@@ -2497,10 +2497,9 @@ function ext(_ref) {
2497
2497
  // item to select the automation for the button to trigger
2498
2498
  automation: {
2499
2499
  type: 'string',
2500
- component: 'expression-with-dropdown',
2500
+ component: 'dropdown',
2501
2501
  translation: 'Object.ActionButton.Automation',
2502
2502
  ref: 'automation',
2503
- dropdownOnly: true,
2504
2503
  options: function () {
2505
2504
  var _options4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4() {
2506
2505
  var automations;
@@ -3960,7 +3959,7 @@ var styleFormatter = {
3960
3959
  disabled = _ref2.disabled,
3961
3960
  theme = _ref2.theme,
3962
3961
  element = _ref2.element;
3963
- var styles = 'width: 100%;height: 100%;transition: transform .1s ease-in-out;position: absolute;';
3962
+ var styles = 'width: 100%;height: 100%;transition: transform .1s ease-in-out;position: absolute;bottom: 0;left: 0; top: 0;right: 0;margin: auto;';
3964
3963
  var font = style.font,
3965
3964
  background = style.background,
3966
3965
  border = style.border;