@nebula.js/sn-action-button 1.6.0 → 1.10.1
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.
|
|
3
|
-
* Copyright (c)
|
|
2
|
+
* @nebula.js/sn-action-button v1.10.1
|
|
3
|
+
* Copyright (c) 2022 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -967,6 +967,42 @@ var actions = [{
|
|
|
967
967
|
}));
|
|
968
968
|
},
|
|
969
969
|
requiredInput: ['variable', 'value']
|
|
970
|
+
}, {
|
|
971
|
+
value: 'doReload',
|
|
972
|
+
translation: 'Object.ActionButton.DoReload',
|
|
973
|
+
group: 'reload',
|
|
974
|
+
getActionCall: function getActionCall(_ref38) {
|
|
975
|
+
var app = _ref38.app,
|
|
976
|
+
partial = _ref38.partial;
|
|
977
|
+
return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
|
|
978
|
+
var e;
|
|
979
|
+
return regeneratorRuntime.wrap(function _callee20$(_context20) {
|
|
980
|
+
while (1) {
|
|
981
|
+
switch (_context20.prev = _context20.next) {
|
|
982
|
+
case 0:
|
|
983
|
+
_context20.next = 2;
|
|
984
|
+
return app.doReload(0, !!partial, false);
|
|
985
|
+
|
|
986
|
+
case 2:
|
|
987
|
+
e = _context20.sent;
|
|
988
|
+
|
|
989
|
+
if (!e) {
|
|
990
|
+
_context20.next = 6;
|
|
991
|
+
break;
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
_context20.next = 6;
|
|
995
|
+
return app.doSave();
|
|
996
|
+
|
|
997
|
+
case 6:
|
|
998
|
+
case "end":
|
|
999
|
+
return _context20.stop();
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}, _callee20);
|
|
1003
|
+
}));
|
|
1004
|
+
},
|
|
1005
|
+
requiredInput: ['partial']
|
|
970
1006
|
}];
|
|
971
1007
|
function checkShowAction(data, field) {
|
|
972
1008
|
var act = actions.find(function (action) {
|
|
@@ -975,6 +1011,26 @@ function checkShowAction(data, field) {
|
|
|
975
1011
|
return act && act.requiredInput && act.requiredInput.indexOf(field) !== -1;
|
|
976
1012
|
}
|
|
977
1013
|
|
|
1014
|
+
function evaluateCondition(condition) {
|
|
1015
|
+
// case condition is commented
|
|
1016
|
+
if (condition && condition.length >= 2 && condition[0] === '/' && condition[1] === '/') {
|
|
1017
|
+
return true;
|
|
1018
|
+
} // convert to numeric with -1 (true) as the default
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
var condVal = condition ? +condition : -1; // handle the string 'true' as true and all other strings as false
|
|
1022
|
+
|
|
1023
|
+
if (Number.isNaN(+condVal)) {
|
|
1024
|
+
return condition.toLowerCase() === 'true';
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
return condVal !== 0;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
var Util = {
|
|
1031
|
+
evaluateCondition: evaluateCondition
|
|
1032
|
+
};
|
|
1033
|
+
|
|
978
1034
|
var inIframe = function inIframe() {
|
|
979
1035
|
try {
|
|
980
1036
|
return window.self !== window.top;
|
|
@@ -1011,6 +1067,37 @@ var getOrderedSheets = /*#__PURE__*/function () {
|
|
|
1011
1067
|
return _ref.apply(this, arguments);
|
|
1012
1068
|
};
|
|
1013
1069
|
}();
|
|
1070
|
+
var getOrderedVisibleSheet = /*#__PURE__*/function () {
|
|
1071
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(app) {
|
|
1072
|
+
var sheets, visibleSheets;
|
|
1073
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
1074
|
+
while (1) {
|
|
1075
|
+
switch (_context2.prev = _context2.next) {
|
|
1076
|
+
case 0:
|
|
1077
|
+
_context2.next = 2;
|
|
1078
|
+
return app.getSheetList();
|
|
1079
|
+
|
|
1080
|
+
case 2:
|
|
1081
|
+
sheets = _context2.sent;
|
|
1082
|
+
visibleSheets = sheets.filter(function (sheet) {
|
|
1083
|
+
return Util.evaluateCondition(sheet.qData.showCondition);
|
|
1084
|
+
});
|
|
1085
|
+
return _context2.abrupt("return", visibleSheets.sort(function (current, next) {
|
|
1086
|
+
return current.qData.rank - next.qData.rank;
|
|
1087
|
+
}));
|
|
1088
|
+
|
|
1089
|
+
case 5:
|
|
1090
|
+
case "end":
|
|
1091
|
+
return _context2.stop();
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}, _callee2);
|
|
1095
|
+
}));
|
|
1096
|
+
|
|
1097
|
+
return function getOrderedVisibleSheet(_x2) {
|
|
1098
|
+
return _ref2.apply(this, arguments);
|
|
1099
|
+
};
|
|
1100
|
+
}();
|
|
1014
1101
|
var navigationActions = [{
|
|
1015
1102
|
translation: 'Object.ActionButton.NoNavigation',
|
|
1016
1103
|
value: 'none'
|
|
@@ -1018,25 +1105,25 @@ var navigationActions = [{
|
|
|
1018
1105
|
translation: 'Object.ActionButton.GoToNextSheet',
|
|
1019
1106
|
value: 'nextSheet',
|
|
1020
1107
|
navigationCall: function () {
|
|
1021
|
-
var _navigationCall = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1108
|
+
var _navigationCall = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(_ref3) {
|
|
1022
1109
|
var senseNavigation;
|
|
1023
|
-
return regeneratorRuntime.wrap(function
|
|
1110
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
1024
1111
|
while (1) {
|
|
1025
|
-
switch (
|
|
1112
|
+
switch (_context3.prev = _context3.next) {
|
|
1026
1113
|
case 0:
|
|
1027
|
-
senseNavigation =
|
|
1028
|
-
|
|
1114
|
+
senseNavigation = _ref3.senseNavigation;
|
|
1115
|
+
_context3.next = 3;
|
|
1029
1116
|
return senseNavigation.nextSheet();
|
|
1030
1117
|
|
|
1031
1118
|
case 3:
|
|
1032
1119
|
case "end":
|
|
1033
|
-
return
|
|
1120
|
+
return _context3.stop();
|
|
1034
1121
|
}
|
|
1035
1122
|
}
|
|
1036
|
-
},
|
|
1123
|
+
}, _callee3);
|
|
1037
1124
|
}));
|
|
1038
1125
|
|
|
1039
|
-
function navigationCall(
|
|
1126
|
+
function navigationCall(_x3) {
|
|
1040
1127
|
return _navigationCall.apply(this, arguments);
|
|
1041
1128
|
}
|
|
1042
1129
|
|
|
@@ -1047,25 +1134,25 @@ var navigationActions = [{
|
|
|
1047
1134
|
translation: 'Object.ActionButton.GoToPreviousSheet',
|
|
1048
1135
|
value: 'prevSheet',
|
|
1049
1136
|
navigationCall: function () {
|
|
1050
|
-
var _navigationCall2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1137
|
+
var _navigationCall2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(_ref4) {
|
|
1051
1138
|
var senseNavigation;
|
|
1052
|
-
return regeneratorRuntime.wrap(function
|
|
1139
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
1053
1140
|
while (1) {
|
|
1054
|
-
switch (
|
|
1141
|
+
switch (_context4.prev = _context4.next) {
|
|
1055
1142
|
case 0:
|
|
1056
|
-
senseNavigation =
|
|
1057
|
-
|
|
1143
|
+
senseNavigation = _ref4.senseNavigation;
|
|
1144
|
+
_context4.next = 3;
|
|
1058
1145
|
return senseNavigation.prevSheet();
|
|
1059
1146
|
|
|
1060
1147
|
case 3:
|
|
1061
1148
|
case "end":
|
|
1062
|
-
return
|
|
1149
|
+
return _context4.stop();
|
|
1063
1150
|
}
|
|
1064
1151
|
}
|
|
1065
|
-
},
|
|
1152
|
+
}, _callee4);
|
|
1066
1153
|
}));
|
|
1067
1154
|
|
|
1068
|
-
function navigationCall(
|
|
1155
|
+
function navigationCall(_x4) {
|
|
1069
1156
|
return _navigationCall2.apply(this, arguments);
|
|
1070
1157
|
}
|
|
1071
1158
|
|
|
@@ -1076,30 +1163,48 @@ var navigationActions = [{
|
|
|
1076
1163
|
translation: 'Object.ActionButton.GoToLastSheet',
|
|
1077
1164
|
value: 'lastSheet',
|
|
1078
1165
|
navigationCall: function () {
|
|
1079
|
-
var _navigationCall3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1080
|
-
var app, senseNavigation, sheets;
|
|
1081
|
-
return regeneratorRuntime.wrap(function
|
|
1166
|
+
var _navigationCall3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(_ref5) {
|
|
1167
|
+
var app, enableSheetShow, senseNavigation, sheets;
|
|
1168
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
1082
1169
|
while (1) {
|
|
1083
|
-
switch (
|
|
1170
|
+
switch (_context5.prev = _context5.next) {
|
|
1084
1171
|
case 0:
|
|
1085
|
-
app =
|
|
1086
|
-
|
|
1172
|
+
app = _ref5.app, enableSheetShow = _ref5.enableSheetShow, senseNavigation = _ref5.senseNavigation;
|
|
1173
|
+
|
|
1174
|
+
if (!enableSheetShow) {
|
|
1175
|
+
_context5.next = 7;
|
|
1176
|
+
break;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
_context5.next = 4;
|
|
1180
|
+
return getOrderedVisibleSheet(app);
|
|
1181
|
+
|
|
1182
|
+
case 4:
|
|
1183
|
+
_context5.t0 = _context5.sent;
|
|
1184
|
+
_context5.next = 10;
|
|
1185
|
+
break;
|
|
1186
|
+
|
|
1187
|
+
case 7:
|
|
1188
|
+
_context5.next = 9;
|
|
1087
1189
|
return getOrderedSheets(app);
|
|
1088
1190
|
|
|
1089
|
-
case
|
|
1090
|
-
|
|
1091
|
-
|
|
1191
|
+
case 9:
|
|
1192
|
+
_context5.t0 = _context5.sent;
|
|
1193
|
+
|
|
1194
|
+
case 10:
|
|
1195
|
+
sheets = _context5.t0;
|
|
1196
|
+
_context5.next = 13;
|
|
1092
1197
|
return senseNavigation.goToSheet(sheets[sheets.length - 1].qInfo.qId);
|
|
1093
1198
|
|
|
1094
|
-
case
|
|
1199
|
+
case 13:
|
|
1095
1200
|
case "end":
|
|
1096
|
-
return
|
|
1201
|
+
return _context5.stop();
|
|
1097
1202
|
}
|
|
1098
1203
|
}
|
|
1099
|
-
},
|
|
1204
|
+
}, _callee5);
|
|
1100
1205
|
}));
|
|
1101
1206
|
|
|
1102
|
-
function navigationCall(
|
|
1207
|
+
function navigationCall(_x5) {
|
|
1103
1208
|
return _navigationCall3.apply(this, arguments);
|
|
1104
1209
|
}
|
|
1105
1210
|
|
|
@@ -1110,30 +1215,48 @@ var navigationActions = [{
|
|
|
1110
1215
|
translation: 'Object.ActionButton.GoToFirstSheet',
|
|
1111
1216
|
value: 'firstSheet',
|
|
1112
1217
|
navigationCall: function () {
|
|
1113
|
-
var _navigationCall4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1114
|
-
var app, senseNavigation, sheets;
|
|
1115
|
-
return regeneratorRuntime.wrap(function
|
|
1218
|
+
var _navigationCall4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(_ref6) {
|
|
1219
|
+
var app, enableSheetShow, senseNavigation, sheets;
|
|
1220
|
+
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
1116
1221
|
while (1) {
|
|
1117
|
-
switch (
|
|
1222
|
+
switch (_context6.prev = _context6.next) {
|
|
1118
1223
|
case 0:
|
|
1119
|
-
app =
|
|
1120
|
-
|
|
1224
|
+
app = _ref6.app, enableSheetShow = _ref6.enableSheetShow, senseNavigation = _ref6.senseNavigation;
|
|
1225
|
+
|
|
1226
|
+
if (!enableSheetShow) {
|
|
1227
|
+
_context6.next = 7;
|
|
1228
|
+
break;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
_context6.next = 4;
|
|
1232
|
+
return getOrderedVisibleSheet(app);
|
|
1233
|
+
|
|
1234
|
+
case 4:
|
|
1235
|
+
_context6.t0 = _context6.sent;
|
|
1236
|
+
_context6.next = 10;
|
|
1237
|
+
break;
|
|
1238
|
+
|
|
1239
|
+
case 7:
|
|
1240
|
+
_context6.next = 9;
|
|
1121
1241
|
return getOrderedSheets(app);
|
|
1122
1242
|
|
|
1123
|
-
case
|
|
1124
|
-
|
|
1125
|
-
|
|
1243
|
+
case 9:
|
|
1244
|
+
_context6.t0 = _context6.sent;
|
|
1245
|
+
|
|
1246
|
+
case 10:
|
|
1247
|
+
sheets = _context6.t0;
|
|
1248
|
+
_context6.next = 13;
|
|
1126
1249
|
return senseNavigation.goToSheet(sheets[0].qInfo.qId);
|
|
1127
1250
|
|
|
1128
|
-
case
|
|
1251
|
+
case 13:
|
|
1129
1252
|
case "end":
|
|
1130
|
-
return
|
|
1253
|
+
return _context6.stop();
|
|
1131
1254
|
}
|
|
1132
1255
|
}
|
|
1133
|
-
},
|
|
1256
|
+
}, _callee6);
|
|
1134
1257
|
}));
|
|
1135
1258
|
|
|
1136
|
-
function navigationCall(
|
|
1259
|
+
function navigationCall(_x6) {
|
|
1137
1260
|
return _navigationCall4.apply(this, arguments);
|
|
1138
1261
|
}
|
|
1139
1262
|
|
|
@@ -1144,32 +1267,32 @@ var navigationActions = [{
|
|
|
1144
1267
|
translation: 'Object.ActionButton.GoToASheet',
|
|
1145
1268
|
value: 'goToSheet',
|
|
1146
1269
|
navigationCall: function () {
|
|
1147
|
-
var _navigationCall5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1270
|
+
var _navigationCall5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(_ref7) {
|
|
1148
1271
|
var senseNavigation, sheet;
|
|
1149
|
-
return regeneratorRuntime.wrap(function
|
|
1272
|
+
return regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
1150
1273
|
while (1) {
|
|
1151
|
-
switch (
|
|
1274
|
+
switch (_context7.prev = _context7.next) {
|
|
1152
1275
|
case 0:
|
|
1153
|
-
senseNavigation =
|
|
1154
|
-
|
|
1276
|
+
senseNavigation = _ref7.senseNavigation, sheet = _ref7.sheet;
|
|
1277
|
+
_context7.t0 = sheet;
|
|
1155
1278
|
|
|
1156
|
-
if (!
|
|
1157
|
-
|
|
1279
|
+
if (!_context7.t0) {
|
|
1280
|
+
_context7.next = 5;
|
|
1158
1281
|
break;
|
|
1159
1282
|
}
|
|
1160
1283
|
|
|
1161
|
-
|
|
1284
|
+
_context7.next = 5;
|
|
1162
1285
|
return senseNavigation.goToSheet(sheet);
|
|
1163
1286
|
|
|
1164
1287
|
case 5:
|
|
1165
1288
|
case "end":
|
|
1166
|
-
return
|
|
1289
|
+
return _context7.stop();
|
|
1167
1290
|
}
|
|
1168
1291
|
}
|
|
1169
|
-
},
|
|
1292
|
+
}, _callee7);
|
|
1170
1293
|
}));
|
|
1171
1294
|
|
|
1172
|
-
function navigationCall(
|
|
1295
|
+
function navigationCall(_x7) {
|
|
1173
1296
|
return _navigationCall5.apply(this, arguments);
|
|
1174
1297
|
}
|
|
1175
1298
|
|
|
@@ -1181,32 +1304,32 @@ var navigationActions = [{
|
|
|
1181
1304
|
translation: 'Object.ActionButton.GoToSheetById',
|
|
1182
1305
|
value: 'goToSheetById',
|
|
1183
1306
|
navigationCall: function () {
|
|
1184
|
-
var _navigationCall6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1307
|
+
var _navigationCall6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(_ref8) {
|
|
1185
1308
|
var senseNavigation, sheet;
|
|
1186
|
-
return regeneratorRuntime.wrap(function
|
|
1309
|
+
return regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
1187
1310
|
while (1) {
|
|
1188
|
-
switch (
|
|
1311
|
+
switch (_context8.prev = _context8.next) {
|
|
1189
1312
|
case 0:
|
|
1190
|
-
senseNavigation =
|
|
1191
|
-
|
|
1313
|
+
senseNavigation = _ref8.senseNavigation, sheet = _ref8.sheet;
|
|
1314
|
+
_context8.t0 = sheet;
|
|
1192
1315
|
|
|
1193
|
-
if (!
|
|
1194
|
-
|
|
1316
|
+
if (!_context8.t0) {
|
|
1317
|
+
_context8.next = 5;
|
|
1195
1318
|
break;
|
|
1196
1319
|
}
|
|
1197
1320
|
|
|
1198
|
-
|
|
1321
|
+
_context8.next = 5;
|
|
1199
1322
|
return senseNavigation.goToSheet(sheet);
|
|
1200
1323
|
|
|
1201
1324
|
case 5:
|
|
1202
1325
|
case "end":
|
|
1203
|
-
return
|
|
1326
|
+
return _context8.stop();
|
|
1204
1327
|
}
|
|
1205
1328
|
}
|
|
1206
|
-
},
|
|
1329
|
+
}, _callee8);
|
|
1207
1330
|
}));
|
|
1208
1331
|
|
|
1209
|
-
function navigationCall(
|
|
1332
|
+
function navigationCall(_x8) {
|
|
1210
1333
|
return _navigationCall6.apply(this, arguments);
|
|
1211
1334
|
}
|
|
1212
1335
|
|
|
@@ -1218,32 +1341,32 @@ var navigationActions = [{
|
|
|
1218
1341
|
translation: 'Object.ActionButton.GoToStory',
|
|
1219
1342
|
value: 'goToStory',
|
|
1220
1343
|
navigationCall: function () {
|
|
1221
|
-
var _navigationCall7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1344
|
+
var _navigationCall7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9(_ref9) {
|
|
1222
1345
|
var senseNavigation, story;
|
|
1223
|
-
return regeneratorRuntime.wrap(function
|
|
1346
|
+
return regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
1224
1347
|
while (1) {
|
|
1225
|
-
switch (
|
|
1348
|
+
switch (_context9.prev = _context9.next) {
|
|
1226
1349
|
case 0:
|
|
1227
|
-
senseNavigation =
|
|
1228
|
-
|
|
1350
|
+
senseNavigation = _ref9.senseNavigation, story = _ref9.story;
|
|
1351
|
+
_context9.t0 = story;
|
|
1229
1352
|
|
|
1230
|
-
if (!
|
|
1231
|
-
|
|
1353
|
+
if (!_context9.t0) {
|
|
1354
|
+
_context9.next = 5;
|
|
1232
1355
|
break;
|
|
1233
1356
|
}
|
|
1234
1357
|
|
|
1235
|
-
|
|
1358
|
+
_context9.next = 5;
|
|
1236
1359
|
return senseNavigation.goToStory(story);
|
|
1237
1360
|
|
|
1238
1361
|
case 5:
|
|
1239
1362
|
case "end":
|
|
1240
|
-
return
|
|
1363
|
+
return _context9.stop();
|
|
1241
1364
|
}
|
|
1242
1365
|
}
|
|
1243
|
-
},
|
|
1366
|
+
}, _callee9);
|
|
1244
1367
|
}));
|
|
1245
1368
|
|
|
1246
|
-
function navigationCall(
|
|
1369
|
+
function navigationCall(_x9) {
|
|
1247
1370
|
return _navigationCall7.apply(this, arguments);
|
|
1248
1371
|
}
|
|
1249
1372
|
|
|
@@ -1254,13 +1377,13 @@ var navigationActions = [{
|
|
|
1254
1377
|
translation: 'Object.ActionButton.OpenWebsiteEmail',
|
|
1255
1378
|
value: 'openWebsite',
|
|
1256
1379
|
navigationCall: function () {
|
|
1257
|
-
var _navigationCall8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
1380
|
+
var _navigationCall8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(_ref10) {
|
|
1258
1381
|
var websiteUrl, sameWindow, url, target;
|
|
1259
|
-
return regeneratorRuntime.wrap(function
|
|
1382
|
+
return regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
1260
1383
|
while (1) {
|
|
1261
|
-
switch (
|
|
1384
|
+
switch (_context10.prev = _context10.next) {
|
|
1262
1385
|
case 0:
|
|
1263
|
-
websiteUrl =
|
|
1386
|
+
websiteUrl = _ref10.websiteUrl, sameWindow = _ref10.sameWindow;
|
|
1264
1387
|
|
|
1265
1388
|
try {
|
|
1266
1389
|
if (websiteUrl) {
|
|
@@ -1278,13 +1401,13 @@ var navigationActions = [{
|
|
|
1278
1401
|
|
|
1279
1402
|
case 2:
|
|
1280
1403
|
case "end":
|
|
1281
|
-
return
|
|
1404
|
+
return _context10.stop();
|
|
1282
1405
|
}
|
|
1283
1406
|
}
|
|
1284
|
-
},
|
|
1407
|
+
}, _callee10);
|
|
1285
1408
|
}));
|
|
1286
1409
|
|
|
1287
|
-
function navigationCall(
|
|
1410
|
+
function navigationCall(_x10) {
|
|
1288
1411
|
return _navigationCall8.apply(this, arguments);
|
|
1289
1412
|
}
|
|
1290
1413
|
|
|
@@ -1350,7 +1473,7 @@ function convertAction(action, newProperties) {
|
|
|
1350
1473
|
break;
|
|
1351
1474
|
|
|
1352
1475
|
case 'selectAndLockField':
|
|
1353
|
-
newProperties.actions.push(_objectSpread2({}, newAction, {
|
|
1476
|
+
newProperties.actions.push(_objectSpread2(_objectSpread2({}, newAction), {}, {
|
|
1354
1477
|
cId: null,
|
|
1355
1478
|
actionType: 'selectMatchingValues'
|
|
1356
1479
|
}));
|
|
@@ -2086,7 +2209,8 @@ var toggleOptions = [{
|
|
|
2086
2209
|
translation: 'properties.off'
|
|
2087
2210
|
}];
|
|
2088
2211
|
function ext(_ref) {
|
|
2089
|
-
var translator = _ref.translator
|
|
2212
|
+
var translator = _ref.translator,
|
|
2213
|
+
enableReloadAction = _ref.enableReloadAction;
|
|
2090
2214
|
return {
|
|
2091
2215
|
definition: {
|
|
2092
2216
|
type: 'items',
|
|
@@ -2132,7 +2256,11 @@ function ext(_ref) {
|
|
|
2132
2256
|
component: 'expression-with-dropdown',
|
|
2133
2257
|
translation: 'Object.ActionButton.Action',
|
|
2134
2258
|
defaultValue: '',
|
|
2135
|
-
options:
|
|
2259
|
+
options: function options() {
|
|
2260
|
+
return actions.filter(function (a) {
|
|
2261
|
+
return enableReloadAction || a.value !== 'doReload';
|
|
2262
|
+
});
|
|
2263
|
+
},
|
|
2136
2264
|
dropdownOnly: true
|
|
2137
2265
|
},
|
|
2138
2266
|
bookmark: {
|
|
@@ -2296,6 +2424,15 @@ function ext(_ref) {
|
|
|
2296
2424
|
show: function show(data) {
|
|
2297
2425
|
return checkShowAction(data, 'value');
|
|
2298
2426
|
}
|
|
2427
|
+
},
|
|
2428
|
+
partial: {
|
|
2429
|
+
type: 'boolean',
|
|
2430
|
+
ref: 'partial',
|
|
2431
|
+
translation: 'Object.ActionButton.Partial',
|
|
2432
|
+
defaultValue: false,
|
|
2433
|
+
show: function show(data) {
|
|
2434
|
+
return checkShowAction(data, 'partial');
|
|
2435
|
+
}
|
|
2299
2436
|
}
|
|
2300
2437
|
}
|
|
2301
2438
|
},
|
|
@@ -2344,7 +2481,8 @@ function ext(_ref) {
|
|
|
2344
2481
|
return _context4.abrupt("return", sheets.map(function (sheet) {
|
|
2345
2482
|
return {
|
|
2346
2483
|
value: sheet.qInfo.qId,
|
|
2347
|
-
label: sheet.qMeta.title
|
|
2484
|
+
label: sheet.qMeta.title,
|
|
2485
|
+
showCondition: sheet.qData.showCondition
|
|
2348
2486
|
};
|
|
2349
2487
|
}));
|
|
2350
2488
|
|
|
@@ -2817,7 +2955,8 @@ function ext(_ref) {
|
|
|
2817
2955
|
export: !1,
|
|
2818
2956
|
exportData: !1,
|
|
2819
2957
|
snapshot: !1,
|
|
2820
|
-
viewData: !1
|
|
2958
|
+
viewData: !1,
|
|
2959
|
+
quickMobile: !0
|
|
2821
2960
|
}
|
|
2822
2961
|
};
|
|
2823
2962
|
}
|
|
@@ -3703,7 +3842,7 @@ var styleFormatter = {
|
|
|
3703
3842
|
disabled = _ref2.disabled,
|
|
3704
3843
|
theme = _ref2.theme,
|
|
3705
3844
|
element = _ref2.element;
|
|
3706
|
-
var styles = 'width: 100%;height: 100%;transition: transform .1s ease-in-out;';
|
|
3845
|
+
var styles = 'width: 100%;height: 100%;transition: transform .1s ease-in-out;position: absolute;bottom: 0;left: 0; top: 0;right: 0;margin: auto;';
|
|
3707
3846
|
var font = style.font,
|
|
3708
3847
|
background = style.background,
|
|
3709
3848
|
border = style.border;
|
|
@@ -3862,7 +4001,8 @@ function renderButton(_ref2) {
|
|
|
3862
4001
|
app = _ref2.app,
|
|
3863
4002
|
constraints = _ref2.constraints,
|
|
3864
4003
|
senseNavigation = _ref2.senseNavigation,
|
|
3865
|
-
element = _ref2.element
|
|
4004
|
+
element = _ref2.element,
|
|
4005
|
+
enableSheetShow = _ref2.enableSheetShow;
|
|
3866
4006
|
var isSense = !!senseNavigation;
|
|
3867
4007
|
var button = element.firstElementChild;
|
|
3868
4008
|
var style = layout.style,
|
|
@@ -3927,6 +4067,7 @@ function renderButton(_ref2) {
|
|
|
3927
4067
|
_context2.next = 13;
|
|
3928
4068
|
return navigationObject.navigationCall(_objectSpread2({
|
|
3929
4069
|
app: app,
|
|
4070
|
+
enableSheetShow: enableSheetShow,
|
|
3930
4071
|
senseNavigation: senseNavigation
|
|
3931
4072
|
}, navigation));
|
|
3932
4073
|
|
|
@@ -3981,8 +4122,12 @@ function renderButton(_ref2) {
|
|
|
3981
4122
|
|
|
3982
4123
|
function supernova(env) {
|
|
3983
4124
|
var sense = env.sense,
|
|
3984
|
-
translator = env.translator
|
|
4125
|
+
translator = env.translator,
|
|
4126
|
+
flags = env.flags;
|
|
3985
4127
|
var senseNavigation = sense && sense.navigation;
|
|
4128
|
+
var isEnabled = flags.isEnabled;
|
|
4129
|
+
var enableSheetShow = isEnabled('SHEET_SHOW_CONDITION');
|
|
4130
|
+
var enableReloadAction = isEnabled('ACTION_BUTTON_RELOAD');
|
|
3986
4131
|
properties.style.label = sense ? translator.get('Object.ActionButton') : 'Button';
|
|
3987
4132
|
return {
|
|
3988
4133
|
qae: {
|
|
@@ -4006,7 +4151,8 @@ function supernova(env) {
|
|
|
4006
4151
|
constraints: constraints,
|
|
4007
4152
|
theme: theme,
|
|
4008
4153
|
app: app,
|
|
4009
|
-
senseNavigation: senseNavigation
|
|
4154
|
+
senseNavigation: senseNavigation,
|
|
4155
|
+
enableSheetShow: enableSheetShow
|
|
4010
4156
|
});
|
|
4011
4157
|
useEffect(function () {
|
|
4012
4158
|
return function () {
|
|
@@ -4015,7 +4161,8 @@ function supernova(env) {
|
|
|
4015
4161
|
}, [element]);
|
|
4016
4162
|
},
|
|
4017
4163
|
ext: ext({
|
|
4018
|
-
translator: translator
|
|
4164
|
+
translator: translator,
|
|
4165
|
+
enableReloadAction: enableReloadAction
|
|
4019
4166
|
})
|
|
4020
4167
|
};
|
|
4021
4168
|
}
|