@wavemaker/app-ng-runtime 11.4.0-next.28151 → 11.4.0-next.28701
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-ng-runtime/build-task/bundles/index.umd.js +1 -1
- app-ng-runtime/build-task/bundles/index.umd.js.map +1 -1
- app-ng-runtime/build-task/esm2015/data/form/form-field/form-field.build.js +2 -2
- app-ng-runtime/build-task/fesm2015/index.js +1 -1
- app-ng-runtime/build-task/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/base/bundles/index.umd.js +23 -1
- app-ng-runtime/components/base/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/base/esm2015/public_api.js +2 -2
- app-ng-runtime/components/base/esm2015/utils/widget-utils.js +16 -1
- app-ng-runtime/components/base/esm2015/widgets/common/base/base-field-validations.js +3 -2
- app-ng-runtime/components/base/esm2015/widgets/common/dialog/dialog.service.js +7 -1
- app-ng-runtime/components/base/fesm2015/index.js +23 -2
- app-ng-runtime/components/base/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/base/index.metadata.json +1 -1
- app-ng-runtime/components/base/public_api.d.ts +1 -1
- app-ng-runtime/components/base/utils/widget-utils.d.ts +7 -0
- app-ng-runtime/components/data/form/bundles/index.umd.js +37 -13
- app-ng-runtime/components/data/form/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/form/esm2015/form-field/form-field.directive.js +26 -7
- app-ng-runtime/components/data/form/esm2015/form.component.js +10 -5
- app-ng-runtime/components/data/form/fesm2015/index.js +34 -10
- app-ng-runtime/components/data/form/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/form/index.metadata.json +1 -1
- app-ng-runtime/components/data/list/bundles/index.umd.js +2 -2
- app-ng-runtime/components/data/list/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/list/esm2015/list.component.js +3 -3
- app-ng-runtime/components/data/list/fesm2015/index.js +2 -2
- app-ng-runtime/components/data/list/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/list/index.metadata.json +1 -1
- app-ng-runtime/components/data/list/list.component.d.ts +1 -1
- app-ng-runtime/components/data/pagination/bundles/index.umd.js +1 -1
- app-ng-runtime/components/data/pagination/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/pagination/esm2015/pagination.component.js +2 -2
- app-ng-runtime/components/data/pagination/fesm2015/index.js +1 -1
- app-ng-runtime/components/data/pagination/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/table/bundles/index.umd.js +57 -12
- app-ng-runtime/components/data/table/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/data/table/esm2015/table.component.js +56 -13
- app-ng-runtime/components/data/table/esm2015/table.props.js +3 -1
- app-ng-runtime/components/data/table/fesm2015/index.js +57 -12
- app-ng-runtime/components/data/table/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/data/table/index.metadata.json +1 -1
- app-ng-runtime/components/data/table/table.component.d.ts +9 -0
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js +5 -0
- app-ng-runtime/components/dialogs/default/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/dialogs/default/esm2015/base-dialog.js +7 -2
- app-ng-runtime/components/dialogs/default/fesm2015/index.js +6 -1
- app-ng-runtime/components/dialogs/default/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/input/epoch/base-date-time.component.d.ts +1 -0
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +13 -7
- app-ng-runtime/components/input/epoch/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/input/epoch/esm2015/base-date-time.component.js +13 -7
- app-ng-runtime/components/input/epoch/esm2015/date/date.component.js +2 -2
- app-ng-runtime/components/input/epoch/fesm2015/index.js +13 -7
- app-ng-runtime/components/input/epoch/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/input/epoch/index.metadata.json +1 -1
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js +25 -19
- app-ng-runtime/components/navigation/menu/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/navigation/menu/esm2015/menu-dropdown-item/menu-dropdown-item.component.js +15 -5
- app-ng-runtime/components/navigation/menu/esm2015/menu.component.js +14 -19
- app-ng-runtime/components/navigation/menu/fesm2015/index.js +25 -20
- app-ng-runtime/components/navigation/menu/fesm2015/index.js.map +1 -1
- app-ng-runtime/components/navigation/menu/index.metadata.json +1 -1
- app-ng-runtime/components/navigation/menu/menu-dropdown-item/menu-dropdown-item.component.d.ts +7 -4
- app-ng-runtime/components/navigation/menu/menu.component.d.ts +3 -7
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js +3 -0
- app-ng-runtime/components/navigation/popover/bundles/index.umd.js.map +1 -1
- app-ng-runtime/components/navigation/popover/esm2015/popover.component.js +4 -1
- app-ng-runtime/components/navigation/popover/fesm2015/index.js +3 -0
- app-ng-runtime/components/navigation/popover/fesm2015/index.js.map +1 -1
- app-ng-runtime/core/bundles/index.umd.js +7 -1
- app-ng-runtime/core/bundles/index.umd.js.map +1 -1
- app-ng-runtime/core/esm2015/services/pagination.service.js +8 -2
- app-ng-runtime/core/fesm2015/index.js +7 -1
- app-ng-runtime/core/fesm2015/index.js.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +63 -13
app-ng-runtime/package.json
CHANGED
|
@@ -534,11 +534,18 @@ $.widget('wm.datatable', {
|
|
|
534
534
|
|
|
535
535
|
/* Returns the tbody markup. */
|
|
536
536
|
_getGridTemplate: function () {
|
|
537
|
+
|
|
537
538
|
var self = this, preparedData,$tbody,pageStartIndex = self.getPageStartIndex(),
|
|
538
539
|
startRowIndex = self.options.startRowIndex,
|
|
539
540
|
isScrollorOnDemand = self.options.isNavTypeScrollOrOndemand();
|
|
540
541
|
if(isScrollorOnDemand) {
|
|
541
542
|
$tbody = this.gridElement;
|
|
543
|
+
if(this.renderTableOnViewLess) {
|
|
544
|
+
$tbody = this.gridElement.empty();
|
|
545
|
+
this.hideLoadingIndicator();
|
|
546
|
+
// this.addNavigationControls();
|
|
547
|
+
this.renderTableOnViewLess = false;
|
|
548
|
+
}
|
|
542
549
|
} else {
|
|
543
550
|
$tbody = this.gridElement.empty();
|
|
544
551
|
}
|
|
@@ -1101,25 +1108,52 @@ $.widget('wm.datatable', {
|
|
|
1101
1108
|
},
|
|
1102
1109
|
|
|
1103
1110
|
/* Inserts a load more button at the end of the table when the pagination selected is on demand */
|
|
1104
|
-
addLoadMoreBtn : function (onDemandMsg, loadingdatamsg, cb) {
|
|
1111
|
+
addLoadMoreBtn : function (onDemandMsg, loadingdatamsg, cb, infScroll) {
|
|
1105
1112
|
// Show Load more button only if it not the last page
|
|
1106
|
-
|
|
1113
|
+
var $btnEl;
|
|
1114
|
+
if (!this.options.isLastPage || infScroll) {
|
|
1107
1115
|
var self = this;
|
|
1108
1116
|
var $parenEl = $('<div class="on-demand-datagrid"><a class="app-button btn btn-block on-demand-load-btn"></a></div>');
|
|
1109
|
-
|
|
1117
|
+
$btnEl = $parenEl.find('a');
|
|
1110
1118
|
$btnEl.append(onDemandMsg);
|
|
1111
1119
|
// Adding load more button in case of on demand pagination
|
|
1112
1120
|
this.element.find('.app-grid-header-inner').append($parenEl);
|
|
1121
|
+
if(infScroll) {
|
|
1122
|
+
if(this.element.find('.on-demand-load-btn').length) {
|
|
1123
|
+
this.element.find('.on-demand-load-btn').text(this.options.viewlessmessage);
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1113
1127
|
// Adding click event to the button
|
|
1114
1128
|
$btnEl.on('click', function (e) {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1129
|
+
// when the button is clicked, hide the button and show loading indicator
|
|
1130
|
+
var lastPage = (self.options.getCurrentPage() == self.options.getPageCount());
|
|
1131
|
+
if(!lastPage) {
|
|
1118
1132
|
self.showLoadingIndicator(loadingdatamsg, false);
|
|
1133
|
+
}
|
|
1134
|
+
if(!self.options.showviewlessbutton){
|
|
1135
|
+
$btnEl.hide();
|
|
1136
|
+
}
|
|
1137
|
+
if(infScroll) {
|
|
1138
|
+
if(lastPage) {
|
|
1139
|
+
self.element.find('.on-demand-datagrid').remove();
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
// Fix for [WMS-23839] refresh data when clicked on View less button
|
|
1143
|
+
if (lastPage && self.options.showviewlessbutton) {
|
|
1144
|
+
$btnEl.hide();
|
|
1145
|
+
self.renderTableOnViewLess = true;
|
|
1146
|
+
self.renderPaginationOnViewLess = true;
|
|
1147
|
+
self.options.enableNavigation();
|
|
1148
|
+
self._renderGrid();
|
|
1149
|
+
}
|
|
1150
|
+
if (cb && typeof cb === 'function') {
|
|
1119
1151
|
cb(e);
|
|
1120
1152
|
}
|
|
1153
|
+
|
|
1121
1154
|
});
|
|
1122
1155
|
}
|
|
1156
|
+
|
|
1123
1157
|
},
|
|
1124
1158
|
|
|
1125
1159
|
/* Shows loading indicator when clicked on load more button or in case of infinite scroll event is triggered */
|
|
@@ -1152,10 +1186,19 @@ $.widget('wm.datatable', {
|
|
|
1152
1186
|
if (!showLoadBtn && !infScroll) {
|
|
1153
1187
|
// In case of on demand pagination, when the next page is not disabled hide the individual elements
|
|
1154
1188
|
this.element.find('.loading-data-msg').hide();
|
|
1189
|
+
this.element.find('.on-demand-load-btn').text(this.options.ondemandmessage);
|
|
1155
1190
|
this.element.find('.on-demand-load-btn').show();
|
|
1191
|
+
} else if((this.options.getCurrentPage() == this.options.getPageCount()) && this.options.showviewlessbutton) {
|
|
1192
|
+
this.element.find('.on-demand-load-btn').show().text(this.options.viewlessmessage);
|
|
1193
|
+
this.element.find('.loading-data-msg').hide();
|
|
1194
|
+
if(infScroll) {
|
|
1195
|
+
if(!this.element.find('.on-demand-load-btn').length) {
|
|
1196
|
+
this.options.addLoadMoreBtn();
|
|
1197
|
+
}
|
|
1198
|
+
this.element.find('.loading-data-msg').hide();
|
|
1199
|
+
}
|
|
1156
1200
|
} else {
|
|
1157
|
-
|
|
1158
|
-
this.element.find('.on-demand-datagrid').hide();
|
|
1201
|
+
this.element.find('.on-demand-datagrid').hide();
|
|
1159
1202
|
}
|
|
1160
1203
|
},
|
|
1161
1204
|
|
|
@@ -3085,6 +3128,7 @@ $.widget('wm.datatable', {
|
|
|
3085
3128
|
// initally append tbody to gridElement
|
|
3086
3129
|
this.gridElement.append($htm);
|
|
3087
3130
|
}
|
|
3131
|
+
|
|
3088
3132
|
} else {
|
|
3089
3133
|
var templates = this._getGridTemplate();
|
|
3090
3134
|
$htm = $(templates);
|
|
@@ -3096,7 +3140,9 @@ $.widget('wm.datatable', {
|
|
|
3096
3140
|
if (this.options.summaryRow) {
|
|
3097
3141
|
var $summaryRowHtm = $(this._getSummaryRowTemplate());
|
|
3098
3142
|
this.tableContainer.find('tfoot').remove();
|
|
3099
|
-
this.
|
|
3143
|
+
if (this.options.data.length){
|
|
3144
|
+
this.tableContainer.append($summaryRowHtm);
|
|
3145
|
+
}
|
|
3100
3146
|
}
|
|
3101
3147
|
// Set proper data status messages after the grid is rendered.
|
|
3102
3148
|
if (!this.options.data.length && this.dataStatus.state === 'nodata') {
|
|
@@ -3107,7 +3153,7 @@ $.widget('wm.datatable', {
|
|
|
3107
3153
|
this.setStatus(this.dataStatus.state, this.dataStatus.message, isCreated);
|
|
3108
3154
|
}
|
|
3109
3155
|
this.gridBody = this.gridElement.find('tbody');
|
|
3110
|
-
this.gridFooter = this.
|
|
3156
|
+
this.gridFooter = this.tableContainer.find('tfoot');
|
|
3111
3157
|
this._findAndReplaceCompiledTemplates();
|
|
3112
3158
|
this.options.clearRowActions();
|
|
3113
3159
|
// attach event handlers
|
|
@@ -3195,13 +3241,16 @@ $.widget('wm.datatable', {
|
|
|
3195
3241
|
this._toggleSpacingClasses('condensed');
|
|
3196
3242
|
}
|
|
3197
3243
|
this._renderGrid(isCreated);
|
|
3244
|
+
this.addNavigationControls();
|
|
3245
|
+
},
|
|
3246
|
+
addNavigationControls: function() {
|
|
3198
3247
|
/**
|
|
3199
3248
|
* bind on demand / scroll events to the table in case of dynamictable in render fn
|
|
3200
3249
|
* Render is called everytime when there is a change in dataset and the previously binded events are lost
|
|
3201
3250
|
*/
|
|
3202
3251
|
if (this.options.isdynamictable) {
|
|
3203
|
-
|
|
3204
|
-
if (this.options.navigation === 'On-Demand' && !this.element.find('.on-demand-datagrid').length) {
|
|
3252
|
+
this.element.find('.on-demand-datagrid').remove();
|
|
3253
|
+
if (this.options.navigation === 'On-Demand' && (!this.element.find('.on-demand-datagrid').length)) {
|
|
3205
3254
|
this.options.addLoadMoreBtn();
|
|
3206
3255
|
} else if (this.options.navigation === 'Scroll') {
|
|
3207
3256
|
this.options.bindScrollEvt();
|
|
@@ -3221,7 +3270,8 @@ $.widget('wm.datatable', {
|
|
|
3221
3270
|
if (state === 'ready') {
|
|
3222
3271
|
this.dataStatusContainer.hide();
|
|
3223
3272
|
} else {
|
|
3224
|
-
|
|
3273
|
+
// [WMS-23839] always show load more btn if show view less btn is true
|
|
3274
|
+
if (this.options.isNavTypeScrollOrOndemand() && (state === 'nodata' || ((this.options.getCurrentPage() == this.options.getPageCount()) && !this.options.showviewlessbutton))) {
|
|
3225
3275
|
this.element.find('.on-demand-datagrid a').hide();
|
|
3226
3276
|
}
|
|
3227
3277
|
this.dataStatusContainer.show();
|