@wavemaker/angular-codegen 11.0.0-next.72008 → 11.0.0-next.72011
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.
- angular-codegen/angular-app/package.json +1 -1
- angular-codegen/angular-app/src/assets/styles/css/wm-style.css +1 -1
- angular-codegen/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.eot +0 -0
- angular-codegen/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.ttf +0 -0
- angular-codegen/angular-app/src/assets/styles/fonts/wm-streamline-light-icon.woff +0 -0
- angular-codegen/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.eot +0 -0
- angular-codegen/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.ttf +0 -0
- angular-codegen/angular-app/src/assets/styles/fonts/wm-streamline-regular-icon.woff +0 -0
- angular-codegen/dependencies/transpilation-mobile.cjs.js +47 -4
- angular-codegen/dependencies/transpilation-web.cjs.js +47 -4
- angular-codegen/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -41205,6 +41205,16 @@ class PaginationService {
|
|
|
41205
41205
|
*/
|
|
41206
41206
|
updateFieldsOnPagination(parent, newVal) {
|
|
41207
41207
|
let fieldDefs = parent.widgetType === 'wm-table' ? parent.gridData : parent.fieldDefs;
|
|
41208
|
+
// remove the deleted row from the list
|
|
41209
|
+
if (parent.widgetType === 'wm-table' && (parent.gridOptions.isNavTypeScrollOrOndemand()) && parent.gridOptions.deletedRowIndex !== -1) {
|
|
41210
|
+
fieldDefs.splice(parent.gridOptions.deletedRowIndex, 1);
|
|
41211
|
+
parent.gridOptions.setDeletedRowIndex(-1);
|
|
41212
|
+
}
|
|
41213
|
+
// reset fieldDefs if last action performed is search or sort
|
|
41214
|
+
if (parent.widgetType === 'wm-table' && (parent.gridOptions.isNavTypeScrollOrOndemand()) && parent.gridOptions.lastActionPerformed === parent.gridOptions.ACTIONS.SEARCH_OR_SORT) {
|
|
41215
|
+
fieldDefs = [];
|
|
41216
|
+
parent.gridOptions.setCurrentPage(1);
|
|
41217
|
+
}
|
|
41208
41218
|
let currentPage = parent.currentPage;
|
|
41209
41219
|
const dataNavigator = parent.dataNavigator;
|
|
41210
41220
|
const pagesize = parent.pagesize;
|
|
@@ -41225,11 +41235,11 @@ class PaginationService {
|
|
|
41225
41235
|
newVal = [];
|
|
41226
41236
|
}
|
|
41227
41237
|
else if (dataNavigator.dataSize < currentPage * pagesize) {
|
|
41228
|
-
// if number of elements added to
|
|
41238
|
+
// if number of elements added to dataNavigator is less than product of currentPage and pageSize we only add elements extra elements added
|
|
41229
41239
|
itemsLength = dataNavigator.dataSize - fieldDefs.length;
|
|
41230
41240
|
}
|
|
41231
41241
|
else {
|
|
41232
|
-
// if number of elements added to
|
|
41242
|
+
// if number of elements added to dataNavigator is greater than product of currentPage and pageSize we add elements the extra elements in newVal
|
|
41233
41243
|
itemsLength = currentPage * pagesize - fieldDefs.length;
|
|
41234
41244
|
currentPage++;
|
|
41235
41245
|
}
|
|
@@ -41242,9 +41252,36 @@ class PaginationService {
|
|
|
41242
41252
|
}
|
|
41243
41253
|
newVal = itemsToPush;
|
|
41244
41254
|
}
|
|
41245
|
-
|
|
41255
|
+
// Add unique records to fieldDefs
|
|
41256
|
+
if (parent.widgetType === 'wm-table' && (parent.gridOptions.lastActionPerformed === parent.gridOptions.ACTIONS.DELETE || parent.gridOptions.lastActionPerformed === parent.gridOptions.ACTIONS.EDIT)) {
|
|
41257
|
+
fieldDefs = this.getUniqueRecordsInFieldDef(fieldDefs, newVal);
|
|
41258
|
+
}
|
|
41259
|
+
else {
|
|
41260
|
+
fieldDefs = [...fieldDefs, ...newVal];
|
|
41261
|
+
}
|
|
41246
41262
|
return [fieldDefs, currentPage];
|
|
41247
41263
|
}
|
|
41264
|
+
// Add the unique records to fieldDefs
|
|
41265
|
+
getUniqueRecordsInFieldDef(fieldDefs, newVal) {
|
|
41266
|
+
let flag = false;
|
|
41267
|
+
if (!fieldDefs.length) {
|
|
41268
|
+
fieldDefs = newVal;
|
|
41269
|
+
}
|
|
41270
|
+
else {
|
|
41271
|
+
newVal.forEach(function (newObj) {
|
|
41272
|
+
flag = false;
|
|
41273
|
+
fieldDefs.forEach(function (obj) {
|
|
41274
|
+
if (_.isEqual(newObj, obj)) {
|
|
41275
|
+
flag = true;
|
|
41276
|
+
}
|
|
41277
|
+
});
|
|
41278
|
+
if (flag === false) {
|
|
41279
|
+
fieldDefs.push(newObj);
|
|
41280
|
+
}
|
|
41281
|
+
});
|
|
41282
|
+
}
|
|
41283
|
+
return fieldDefs;
|
|
41284
|
+
}
|
|
41248
41285
|
/**
|
|
41249
41286
|
* @description
|
|
41250
41287
|
* This function registers scroll events on the scrollable el, if the page doesn't have a scroll el then wheel event is registered on the requested node
|
|
@@ -41287,6 +41324,9 @@ class PaginationService {
|
|
|
41287
41324
|
let scrollTop;
|
|
41288
41325
|
// scrollingElement is undefined for IE, safari. use body as target Element
|
|
41289
41326
|
target = target === document ? (target.scrollingElement || document.body) : target;
|
|
41327
|
+
if (parent.widgetType === 'wm-table' && parent.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
41328
|
+
evt.stopPropagation();
|
|
41329
|
+
}
|
|
41290
41330
|
clientHeight = target.clientHeight;
|
|
41291
41331
|
totalHeight = target.scrollHeight;
|
|
41292
41332
|
scrollTop = target === document.body ? $(window).scrollTop() : target.scrollTop;
|
|
@@ -41301,6 +41341,9 @@ class PaginationService {
|
|
|
41301
41341
|
else {
|
|
41302
41342
|
// if there is no scrollable element register wheel event on ul element
|
|
41303
41343
|
$rootEl.on('wheel.scroll_evt', e => {
|
|
41344
|
+
if (parent.widgetType === 'wm-table' && parent.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
41345
|
+
e.stopPropagation();
|
|
41346
|
+
}
|
|
41304
41347
|
if (e.originalEvent.deltaY > 0) {
|
|
41305
41348
|
$rootEl.off('wheel.scroll_evt');
|
|
41306
41349
|
this.debouncedFetchNextDatasetOnScroll(dataNavigator, debounceNum, parent)();
|
|
@@ -42381,7 +42424,7 @@ var search_build$1 = /*#__PURE__*/Object.freeze({
|
|
|
42381
42424
|
const tagName$1m = 'div';
|
|
42382
42425
|
register('wm-tree', () => {
|
|
42383
42426
|
return {
|
|
42384
|
-
pre: attrs => `<${tagName$1m} wmTree
|
|
42427
|
+
pre: attrs => `<${tagName$1m} wmTree ${getAttrMarkup(attrs)}>`,
|
|
42385
42428
|
post: () => `</${tagName$1m}>`
|
|
42386
42429
|
};
|
|
42387
42430
|
});
|
|
@@ -41205,6 +41205,16 @@ class PaginationService {
|
|
|
41205
41205
|
*/
|
|
41206
41206
|
updateFieldsOnPagination(parent, newVal) {
|
|
41207
41207
|
let fieldDefs = parent.widgetType === 'wm-table' ? parent.gridData : parent.fieldDefs;
|
|
41208
|
+
// remove the deleted row from the list
|
|
41209
|
+
if (parent.widgetType === 'wm-table' && (parent.gridOptions.isNavTypeScrollOrOndemand()) && parent.gridOptions.deletedRowIndex !== -1) {
|
|
41210
|
+
fieldDefs.splice(parent.gridOptions.deletedRowIndex, 1);
|
|
41211
|
+
parent.gridOptions.setDeletedRowIndex(-1);
|
|
41212
|
+
}
|
|
41213
|
+
// reset fieldDefs if last action performed is search or sort
|
|
41214
|
+
if (parent.widgetType === 'wm-table' && (parent.gridOptions.isNavTypeScrollOrOndemand()) && parent.gridOptions.lastActionPerformed === parent.gridOptions.ACTIONS.SEARCH_OR_SORT) {
|
|
41215
|
+
fieldDefs = [];
|
|
41216
|
+
parent.gridOptions.setCurrentPage(1);
|
|
41217
|
+
}
|
|
41208
41218
|
let currentPage = parent.currentPage;
|
|
41209
41219
|
const dataNavigator = parent.dataNavigator;
|
|
41210
41220
|
const pagesize = parent.pagesize;
|
|
@@ -41225,11 +41235,11 @@ class PaginationService {
|
|
|
41225
41235
|
newVal = [];
|
|
41226
41236
|
}
|
|
41227
41237
|
else if (dataNavigator.dataSize < currentPage * pagesize) {
|
|
41228
|
-
// if number of elements added to
|
|
41238
|
+
// if number of elements added to dataNavigator is less than product of currentPage and pageSize we only add elements extra elements added
|
|
41229
41239
|
itemsLength = dataNavigator.dataSize - fieldDefs.length;
|
|
41230
41240
|
}
|
|
41231
41241
|
else {
|
|
41232
|
-
// if number of elements added to
|
|
41242
|
+
// if number of elements added to dataNavigator is greater than product of currentPage and pageSize we add elements the extra elements in newVal
|
|
41233
41243
|
itemsLength = currentPage * pagesize - fieldDefs.length;
|
|
41234
41244
|
currentPage++;
|
|
41235
41245
|
}
|
|
@@ -41242,9 +41252,36 @@ class PaginationService {
|
|
|
41242
41252
|
}
|
|
41243
41253
|
newVal = itemsToPush;
|
|
41244
41254
|
}
|
|
41245
|
-
|
|
41255
|
+
// Add unique records to fieldDefs
|
|
41256
|
+
if (parent.widgetType === 'wm-table' && (parent.gridOptions.lastActionPerformed === parent.gridOptions.ACTIONS.DELETE || parent.gridOptions.lastActionPerformed === parent.gridOptions.ACTIONS.EDIT)) {
|
|
41257
|
+
fieldDefs = this.getUniqueRecordsInFieldDef(fieldDefs, newVal);
|
|
41258
|
+
}
|
|
41259
|
+
else {
|
|
41260
|
+
fieldDefs = [...fieldDefs, ...newVal];
|
|
41261
|
+
}
|
|
41246
41262
|
return [fieldDefs, currentPage];
|
|
41247
41263
|
}
|
|
41264
|
+
// Add the unique records to fieldDefs
|
|
41265
|
+
getUniqueRecordsInFieldDef(fieldDefs, newVal) {
|
|
41266
|
+
let flag = false;
|
|
41267
|
+
if (!fieldDefs.length) {
|
|
41268
|
+
fieldDefs = newVal;
|
|
41269
|
+
}
|
|
41270
|
+
else {
|
|
41271
|
+
newVal.forEach(function (newObj) {
|
|
41272
|
+
flag = false;
|
|
41273
|
+
fieldDefs.forEach(function (obj) {
|
|
41274
|
+
if (_.isEqual(newObj, obj)) {
|
|
41275
|
+
flag = true;
|
|
41276
|
+
}
|
|
41277
|
+
});
|
|
41278
|
+
if (flag === false) {
|
|
41279
|
+
fieldDefs.push(newObj);
|
|
41280
|
+
}
|
|
41281
|
+
});
|
|
41282
|
+
}
|
|
41283
|
+
return fieldDefs;
|
|
41284
|
+
}
|
|
41248
41285
|
/**
|
|
41249
41286
|
* @description
|
|
41250
41287
|
* This function registers scroll events on the scrollable el, if the page doesn't have a scroll el then wheel event is registered on the requested node
|
|
@@ -41287,6 +41324,9 @@ class PaginationService {
|
|
|
41287
41324
|
let scrollTop;
|
|
41288
41325
|
// scrollingElement is undefined for IE, safari. use body as target Element
|
|
41289
41326
|
target = target === document ? (target.scrollingElement || document.body) : target;
|
|
41327
|
+
if (parent.widgetType === 'wm-table' && parent.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
41328
|
+
evt.stopPropagation();
|
|
41329
|
+
}
|
|
41290
41330
|
clientHeight = target.clientHeight;
|
|
41291
41331
|
totalHeight = target.scrollHeight;
|
|
41292
41332
|
scrollTop = target === document.body ? $(window).scrollTop() : target.scrollTop;
|
|
@@ -41301,6 +41341,9 @@ class PaginationService {
|
|
|
41301
41341
|
else {
|
|
41302
41342
|
// if there is no scrollable element register wheel event on ul element
|
|
41303
41343
|
$rootEl.on('wheel.scroll_evt', e => {
|
|
41344
|
+
if (parent.widgetType === 'wm-table' && parent.gridOptions.isNavTypeScrollOrOndemand()) {
|
|
41345
|
+
e.stopPropagation();
|
|
41346
|
+
}
|
|
41304
41347
|
if (e.originalEvent.deltaY > 0) {
|
|
41305
41348
|
$rootEl.off('wheel.scroll_evt');
|
|
41306
41349
|
this.debouncedFetchNextDatasetOnScroll(dataNavigator, debounceNum, parent)();
|
|
@@ -42381,7 +42424,7 @@ var search_build$1 = /*#__PURE__*/Object.freeze({
|
|
|
42381
42424
|
const tagName$1m = 'div';
|
|
42382
42425
|
register('wm-tree', () => {
|
|
42383
42426
|
return {
|
|
42384
|
-
pre: attrs => `<${tagName$1m} wmTree
|
|
42427
|
+
pre: attrs => `<${tagName$1m} wmTree ${getAttrMarkup(attrs)}>`,
|
|
42385
42428
|
post: () => `</${tagName$1m}>`
|
|
42386
42429
|
};
|
|
42387
42430
|
});
|