@wavemaker/app-runtime-wm-build 11.3.3-next.25051 → 11.3.3-next.25053
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.
- app-runtime-wm-build/package.json +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.js +23 -7
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +27 -3
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +23 -7
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +27 -3
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +15 -15
|
@@ -166185,12 +166185,11 @@ $.widget("wm.datatable", {
|
|
|
166185
166185
|
}
|
|
166186
166186
|
},
|
|
166187
166187
|
_getGridTemplate: function() {
|
|
166188
|
-
var self = this, preparedData, $tbody,
|
|
166188
|
+
var self = this, preparedData, $tbody, pageStartIndex = self.getPageStartIndex(), startRowIndex = self.options.startRowIndex, isScrollorOnDemand = self.options.isNavTypeScrollOrOndemand();
|
|
166189
166189
|
if (isScrollorOnDemand) {
|
|
166190
166190
|
$tbody = this.gridElement;
|
|
166191
166191
|
} else {
|
|
166192
|
-
|
|
166193
|
-
$tbody = tbodyExists > 0 ? this.gridElement.find("tbody:first") : this.gridElement.empty();
|
|
166192
|
+
$tbody = this.gridElement.empty();
|
|
166194
166193
|
}
|
|
166195
166194
|
if (isScrollorOnDemand) {
|
|
166196
166195
|
this._handleCRUDForInfiniteScroll($tbody);
|
|
@@ -166908,6 +166907,9 @@ $.widget("wm.datatable", {
|
|
|
166908
166907
|
break;
|
|
166909
166908
|
|
|
166910
166909
|
case "data":
|
|
166910
|
+
if (!this.isResetSortIconsDone) {
|
|
166911
|
+
this.setSortIconDefault();
|
|
166912
|
+
}
|
|
166911
166913
|
this.refreshGridData();
|
|
166912
166914
|
break;
|
|
166913
166915
|
|
|
@@ -167666,6 +167668,7 @@ $.widget("wm.datatable", {
|
|
|
167666
167668
|
}));
|
|
167667
167669
|
},
|
|
167668
167670
|
resetSortIcons: function($el) {
|
|
167671
|
+
this.isResetSortIconsDone = true;
|
|
167669
167672
|
var $sortContainer;
|
|
167670
167673
|
if (!$el && this.gridHeaderElement) {
|
|
167671
167674
|
$sortContainer = this.gridHeaderElement.find(".sort-buttons-container.active");
|
|
@@ -167674,12 +167677,22 @@ $.widget("wm.datatable", {
|
|
|
167674
167677
|
}
|
|
167675
167678
|
$el.removeClass("desc asc").removeClass(this.options.cssClassNames.descIcon).removeClass(this.options.cssClassNames.ascIcon);
|
|
167676
167679
|
},
|
|
167680
|
+
setSortIconDefault: function() {
|
|
167681
|
+
const sortInfo = this.options.sortInfo, $e = this.tableContainer, $th = $e.find("[data-col-field='" + sortInfo.field + "']"), $sortContainer = $th.find(".sort-buttons-container"), $sortIcon = $sortContainer.find("i.sort-icon"), direction = sortInfo.direction;
|
|
167682
|
+
if (direction === "asc") {
|
|
167683
|
+
$sortIcon.addClass(direction + " " + this.options.cssClassNames.ascIcon);
|
|
167684
|
+
$sortContainer.addClass("active");
|
|
167685
|
+
} else if (direction === "desc") {
|
|
167686
|
+
$sortIcon.addClass(direction + " " + this.options.cssClassNames.descIcon);
|
|
167687
|
+
$sortContainer.addClass("active");
|
|
167688
|
+
}
|
|
167689
|
+
},
|
|
167677
167690
|
sortHandler: function(e) {
|
|
167678
167691
|
e.stopImmediatePropagation();
|
|
167679
167692
|
if ($(e.target).hasClass("header-data") && this.options.enableColumnSelection) {
|
|
167680
167693
|
this.headerClickHandler(e);
|
|
167681
167694
|
}
|
|
167682
|
-
var $e = $(e.target), $th = $e.closest("th.app-datagrid-header-cell"), id = $th.attr("data-col-id"), $sortContainer = $th.find(".sort-buttons-container"), $sortIcon = $sortContainer.find("i.sort-icon"), direction = $sortIcon.hasClass("asc") ? "desc" :
|
|
167695
|
+
var $e = $(e.target), $th = $e.closest("th.app-datagrid-header-cell"), id = $th.attr("data-col-id"), $sortContainer = $th.find(".sort-buttons-container"), $sortIcon = $sortContainer.find("i.sort-icon"), direction = $sortIcon.hasClass("asc") ? "desc" : "asc", sortInfo = this.options.sortInfo, $previousSortMarker = this.gridHeaderElement.find(".sort-buttons-container.active"), field = $th.attr("data-col-field"), $previousSortedColumn, $previousSortIcon, colId, colDef;
|
|
167683
167696
|
this.resetSortIcons($sortIcon);
|
|
167684
167697
|
$sortIcon.addClass(direction);
|
|
167685
167698
|
if (direction === "asc") {
|
|
@@ -168150,6 +168163,9 @@ $.widget("wm.datatable", {
|
|
|
168150
168163
|
}
|
|
168151
168164
|
});
|
|
168152
168165
|
}
|
|
168166
|
+
if (!this.isResetSortIconsDone) {
|
|
168167
|
+
this.setSortIconDefault();
|
|
168168
|
+
}
|
|
168153
168169
|
},
|
|
168154
168170
|
addOrRemoveScroll: function() {
|
|
168155
168171
|
var gridContent = this.gridContainer.find("tbody"), gridHeader = this.gridContainer.find(".table-header");
|
|
@@ -184186,7 +184202,7 @@ window.requestAnimationFrame = function() {
|
|
|
184186
184202
|
_.forEach(options.filterFields, (function(value, key) {
|
|
184187
184203
|
value.fieldName = key;
|
|
184188
184204
|
value.type = _util_variable_live_variable_utils__WEBPACK_IMPORTED_MODULE_3__.LiveVariableUtils.getFieldType(columnName, variable, key);
|
|
184189
|
-
if (value.filterCondition === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_5__.DB_CONSTANTS.DATABASE_MATCH_MODES
|
|
184205
|
+
if (value.filterCondition === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_5__.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase() || value.filterCondition === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_5__.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase()) {
|
|
184190
184206
|
value.value = value.value.split(",");
|
|
184191
184207
|
}
|
|
184192
184208
|
filterFields.push(value);
|
|
@@ -187525,7 +187541,7 @@ window.requestAnimationFrame = function() {
|
|
|
187525
187541
|
if (_.includes(_constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_RANGE_MATCH_MODES, filterCondition)) {
|
|
187526
187542
|
return filterCondition;
|
|
187527
187543
|
}
|
|
187528
|
-
return _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_MATCH_MODES
|
|
187544
|
+
return _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_MATCH_MODES["exact"];
|
|
187529
187545
|
};
|
|
187530
187546
|
LiveVariableUtils.getFilterOption = function(variable, fieldOptions, options) {
|
|
187531
187547
|
var attributeName, fieldValue = fieldOptions.value, filterOption, filterCondition;
|
|
@@ -187719,7 +187735,7 @@ window.requestAnimationFrame = function() {
|
|
|
187719
187735
|
LiveVariableUtils.processFilterFields(rule.rules, variable, options);
|
|
187720
187736
|
} else {
|
|
187721
187737
|
if (!_.isNull(rule.target)) {
|
|
187722
|
-
var value = rule.matchMode.toLowerCase() === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase() ? _.isArray(rule.value) ? rule.value : [ rule.value, rule.secondvalue ] : rule.matchMode.toLowerCase() === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_MATCH_MODES
|
|
187738
|
+
var value = rule.matchMode.toLowerCase() === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_MATCH_MODES.between.toLowerCase() ? _.isArray(rule.value) ? rule.value : [ rule.value, rule.secondvalue ] : rule.matchMode.toLowerCase() === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_MATCH_MODES.in.toLowerCase() || rule.matchMode.toLowerCase() === _constants_variables_constants__WEBPACK_IMPORTED_MODULE_1__.DB_CONSTANTS.DATABASE_MATCH_MODES.notin.toLowerCase() ? _.isArray(rule.value) ? rule.value : rule.value ? rule.value.split(",").map((function(val) {
|
|
187723
187739
|
return val.trim();
|
|
187724
187740
|
})) : "" : rule.value;
|
|
187725
187741
|
rules[index] = LiveVariableUtils.getFilterOption(variable, {
|