@wavemaker/app-ng-runtime 11.15.2-rc.64737 → 11.15.4-rc.250
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.
- package/components/base/bundles/index.umd.js +4 -1
- package/components/base/esm2022/widgets/common/base/base-field-validations.mjs +5 -2
- package/components/base/fesm2022/index.mjs +4 -1
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/data/form/bundles/index.umd.js +4 -1
- package/components/data/form/esm2022/form.component.mjs +5 -2
- package/components/data/form/fesm2022/index.mjs +4 -1
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/bundles/index.umd.js +31 -4
- package/components/data/pagination/esm2022/pagination.component.mjs +33 -6
- package/components/data/pagination/fesm2022/index.mjs +32 -5
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/pagination.component.d.ts +5 -0
- package/components/data/table/bundles/index.umd.js +37 -4
- package/components/data/table/esm2022/table-filter.directive.mjs +29 -5
- package/components/data/table/esm2022/table.component.mjs +10 -1
- package/components/data/table/fesm2022/index.mjs +37 -4
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/table.component.d.ts +1 -0
- package/components/input/epoch/base-date-time/bundles/index.umd.js +7 -2
- package/components/input/epoch/base-date-time/esm2022/base-date-time.component.mjs +8 -3
- package/components/input/epoch/base-date-time/fesm2022/index.mjs +7 -2
- package/components/input/epoch/base-date-time/fesm2022/index.mjs.map +1 -1
- package/components/input/epoch/time/bundles/index.umd.js +4 -0
- package/components/input/epoch/time/esm2022/time.component.mjs +5 -1
- package/components/input/epoch/time/fesm2022/index.mjs +4 -0
- package/components/input/epoch/time/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/bundles/index.umd.js +18 -11
- package/components/input/rating/esm2022/rating.component.mjs +19 -12
- package/components/input/rating/fesm2022/index.mjs +18 -11
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/rating.component.d.ts +3 -1
- package/components/input/slider/bundles/index.umd.js +3 -9
- package/components/input/slider/esm2022/slider.component.mjs +5 -11
- package/components/input/slider/fesm2022/index.mjs +4 -10
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/core/bundles/index.umd.js +22 -0
- package/core/esm2022/public_api.mjs +2 -2
- package/core/esm2022/utils/utils.mjs +21 -1
- package/core/fesm2022/index.mjs +22 -1
- package/core/fesm2022/index.mjs.map +1 -1
- package/core/public_api.d.ts +1 -1
- package/core/utils/utils.d.ts +1 -0
- package/locales/moment-timezone/moment-timezone-with-data.js +5 -5
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/esm2022/components/app-component/app.component.mjs +1 -1
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/variables/bundles/index.umd.js +25 -3
- package/variables/esm2022/util/variable/variables.utils.mjs +26 -4
- package/variables/fesm2022/index.mjs +25 -3
- package/variables/fesm2022/index.mjs.map +1 -1
|
@@ -1342,6 +1342,7 @@ class TableComponent extends StylableComponent {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
if (newVal) {
|
|
1344
1344
|
this.populateGridData(newVal);
|
|
1345
|
+
this.refreshRowFilterDataFromDataset();
|
|
1345
1346
|
}
|
|
1346
1347
|
// when select widget options are loaded in search filter then initializing it
|
|
1347
1348
|
const widgetState = this.statePersistence.getWidgetState(this);
|
|
@@ -2139,6 +2140,14 @@ class TableComponent extends StylableComponent {
|
|
|
2139
2140
|
triggerFn(col.onDataSourceChange && col.onDataSourceChange.bind(col));
|
|
2140
2141
|
});
|
|
2141
2142
|
}
|
|
2143
|
+
refreshRowFilterDataFromDataset() {
|
|
2144
|
+
if (this.filtermode !== 'multicolumn') {
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
this.fieldDefs.forEach(col => {
|
|
2148
|
+
triggerFn(col.loadFilterData && col.loadFilterData.bind(col));
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2142
2151
|
clearActionRowVars() {
|
|
2143
2152
|
this.actionRowIndex = undefined;
|
|
2144
2153
|
this.actionRowPage = undefined;
|
|
@@ -3225,9 +3234,15 @@ class TableFilterSortDirective {
|
|
|
3225
3234
|
}
|
|
3226
3235
|
// Function that checks if a given string is a valid date and returns the timestamp if it is, or NaN if it's not.
|
|
3227
3236
|
parseDateString(dateString) {
|
|
3237
|
+
if (typeof dateString !== 'string') {
|
|
3238
|
+
return NaN;
|
|
3239
|
+
}
|
|
3240
|
+
const trimmed = dateString.trim();
|
|
3241
|
+
if (!trimmed) {
|
|
3242
|
+
return NaN;
|
|
3243
|
+
}
|
|
3228
3244
|
const timestamp = Date.parse(dateString);
|
|
3229
3245
|
// handling case when string starts with string and end with number
|
|
3230
|
-
const trimmed = dateString.trim();
|
|
3231
3246
|
const monthRegex = /\b(?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)?|May|Jun(?:e)?|Jul(?:y)?|Aug(?:ust)?|Sep(?:t(?:ember)?)?|Oct(?:ober)?|Nov(?:ember)?|Dec(?:ember)?)\b/i;
|
|
3232
3247
|
if (/^[A-Za-z]+/.test(trimmed) && /\d+$/.test(trimmed) && !monthRegex.test(trimmed)) {
|
|
3233
3248
|
return NaN;
|
|
@@ -3244,20 +3259,38 @@ class TableFilterSortDirective {
|
|
|
3244
3259
|
// Returns data sorted using sortObj
|
|
3245
3260
|
getSortResult(data, sortObj) {
|
|
3246
3261
|
if (sortObj && sortObj.direction) {
|
|
3247
|
-
const
|
|
3262
|
+
const sampleItem = find(data, (item) => {
|
|
3263
|
+
const v = get(item, sortObj.field);
|
|
3264
|
+
return typeof v === 'string' && !!v.trim();
|
|
3265
|
+
});
|
|
3266
|
+
const fieldValue = sampleItem ? get(sampleItem, sortObj.field) : undefined;
|
|
3248
3267
|
const isValidDateString = typeof fieldValue === 'string' ? this.parseDateString(fieldValue) : NaN;
|
|
3249
3268
|
if (!isNaN(isValidDateString)) { // if the field is a date string
|
|
3250
|
-
data = orderBy(data, [
|
|
3269
|
+
data = orderBy(data, [
|
|
3270
|
+
(item) => {
|
|
3271
|
+
const v = get(item, sortObj.field);
|
|
3272
|
+
return v === null || v === undefined || v === '' ? 1 : 0;
|
|
3273
|
+
},
|
|
3274
|
+
(item) => {
|
|
3275
|
+
const ts = this.parseDateString(get(item, sortObj.field));
|
|
3276
|
+
return isNaN(ts) ? 1 : 0;
|
|
3277
|
+
},
|
|
3278
|
+
(item) => this.parseDateString(get(item, sortObj.field))
|
|
3279
|
+
], ['asc', 'asc', sortObj.direction]);
|
|
3251
3280
|
}
|
|
3252
3281
|
else if (sortObj.sortBy ? this.table.columns[sortObj.sortBy]?.caseinsensitive : this.table.columns[sortObj.field]?.caseinsensitive) {
|
|
3253
3282
|
//Fix for [WMS-27505]: Added case-insensitive sorting so that uppercase and lowercase letters are treated the same when sorting.
|
|
3254
3283
|
data = orderBy(data, [
|
|
3284
|
+
(item) => {
|
|
3285
|
+
const val = get(item, sortObj.field);
|
|
3286
|
+
return val === null || val === undefined || val === '' ? 1 : 0;
|
|
3287
|
+
},
|
|
3255
3288
|
(item) => {
|
|
3256
3289
|
const val = get(item, sortObj.field);
|
|
3257
3290
|
return typeof val === 'string' ? val.toLowerCase() : val;
|
|
3258
3291
|
},
|
|
3259
3292
|
(item) => get(item, sortObj.field) // fallback to original value
|
|
3260
|
-
], [sortObj.direction, sortObj.direction]);
|
|
3293
|
+
], ['asc', sortObj.direction, sortObj.direction]);
|
|
3261
3294
|
}
|
|
3262
3295
|
else {
|
|
3263
3296
|
data = orderBy(data, sortObj.field, sortObj.direction);
|