@seniorsistemas/angular-components 17.2.15 → 17.2.17
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/bundles/seniorsistemas-angular-components.umd.js +46 -34
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +13 -3
- package/esm2015/components/table/table-paging/table-paging.component.js +8 -7
- package/esm2015/locale/fallback.js +2 -2
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +13 -3
- package/esm5/components/table/table-paging/table-paging.component.js +8 -7
- package/esm5/locale/fallback.js +2 -2
- package/fesm2015/seniorsistemas-angular-components.js +46 -34
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +46 -34
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -3284,8 +3284,18 @@ let LookupComponent = LookupComponent_1 = class LookupComponent {
|
|
|
3284
3284
|
});
|
|
3285
3285
|
}
|
|
3286
3286
|
printRecordTotalizer() {
|
|
3287
|
-
|
|
3288
|
-
|
|
3287
|
+
if (this.searchTotalRecordsLabel) {
|
|
3288
|
+
return this.searchTotalRecordsLabel;
|
|
3289
|
+
}
|
|
3290
|
+
const recordLabel = this.recordLabel
|
|
3291
|
+
? `${this.searchTotalRecords} ${this.recordLabel}`
|
|
3292
|
+
: this.translateService.instant("platform.angular_components.total_record", { count: this.searchTotalRecords });
|
|
3293
|
+
const recordsLabel = this.recordsLabel
|
|
3294
|
+
? `${this.searchTotalRecords} ${this.recordsLabel}`
|
|
3295
|
+
: this.translateService.instant("platform.angular_components.total_records", { count: this.searchTotalRecords });
|
|
3296
|
+
return this.searchTotalRecords === 1
|
|
3297
|
+
? recordLabel
|
|
3298
|
+
: recordsLabel;
|
|
3289
3299
|
}
|
|
3290
3300
|
_convertToMomentHourFormat(hourFormat, format) {
|
|
3291
3301
|
if (format === "dd/mm/yy") { // valor padrão para o format.
|
|
@@ -6139,7 +6149,6 @@ TokenListModule = __decorate([
|
|
|
6139
6149
|
})
|
|
6140
6150
|
], TokenListModule);
|
|
6141
6151
|
|
|
6142
|
-
const moment$5 = moment_;
|
|
6143
6152
|
let TablePagingComponent = class TablePagingComponent {
|
|
6144
6153
|
constructor(translate, hostProjectConfigs) {
|
|
6145
6154
|
this.translate = translate;
|
|
@@ -6296,10 +6305,13 @@ let TablePagingComponent = class TablePagingComponent {
|
|
|
6296
6305
|
.replace(/^_/, '');
|
|
6297
6306
|
}
|
|
6298
6307
|
getExportFileName() {
|
|
6299
|
-
var _a;
|
|
6300
|
-
const
|
|
6301
|
-
const
|
|
6302
|
-
|
|
6308
|
+
var _a, _b;
|
|
6309
|
+
const lang = (_a = this.translate.currentLang) !== null && _a !== void 0 ? _a : "pt-BR";
|
|
6310
|
+
const date = new Date();
|
|
6311
|
+
const fileName = (_b = this.exportFileName) !== null && _b !== void 0 ? _b : "download";
|
|
6312
|
+
const formattedDate = date.toLocaleDateString(lang).replace("_", "-");
|
|
6313
|
+
const formattedTime = date.toLocaleTimeString(lang).replace(" ", "-");
|
|
6314
|
+
return `${fileName}_${formattedDate}_${formattedTime}`;
|
|
6303
6315
|
}
|
|
6304
6316
|
exportCurrentPage() {
|
|
6305
6317
|
this.validateComponent();
|
|
@@ -7748,7 +7760,7 @@ var CustomFieldType;
|
|
|
7748
7760
|
CustomFieldType["Any"] = "Any";
|
|
7749
7761
|
CustomFieldType["Enum"] = "Enum";
|
|
7750
7762
|
})(CustomFieldType || (CustomFieldType = {}));
|
|
7751
|
-
const moment$
|
|
7763
|
+
const moment$5 = moment_; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
|
|
7752
7764
|
let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponent {
|
|
7753
7765
|
constructor(customFieldsService, localeService, sanitizer, translateService, controlContainer) {
|
|
7754
7766
|
this.customFieldsService = customFieldsService;
|
|
@@ -7934,16 +7946,16 @@ let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponen
|
|
|
7934
7946
|
return;
|
|
7935
7947
|
switch (type) {
|
|
7936
7948
|
case FieldType.Date:
|
|
7937
|
-
parsedValues[name] = moment$
|
|
7949
|
+
parsedValues[name] = moment$5(value).toDate();
|
|
7938
7950
|
break;
|
|
7939
7951
|
case FieldType.DateTime:
|
|
7940
|
-
parsedValues[name] = moment$
|
|
7952
|
+
parsedValues[name] = moment$5(value).toDate();
|
|
7941
7953
|
break;
|
|
7942
7954
|
case FieldType.LocalDateTime:
|
|
7943
|
-
parsedValues[name] = moment$
|
|
7955
|
+
parsedValues[name] = moment$5(value, "YYYY-MM-DD[T]HH:mm:ss.SSS").toDate();
|
|
7944
7956
|
break;
|
|
7945
7957
|
case FieldType.Time:
|
|
7946
|
-
parsedValues[name] = moment$
|
|
7958
|
+
parsedValues[name] = moment$5(value, "HH:mm:ss").toDate();
|
|
7947
7959
|
break;
|
|
7948
7960
|
}
|
|
7949
7961
|
});
|
|
@@ -7974,16 +7986,16 @@ let CustomFieldsComponent = CustomFieldsComponent_1 = class CustomFieldsComponen
|
|
|
7974
7986
|
value = new BigNumber(value).toFixed(scale).toString();
|
|
7975
7987
|
break;
|
|
7976
7988
|
case FieldType.Date:
|
|
7977
|
-
value = moment$
|
|
7989
|
+
value = moment$5(value).format("YYYY-MM-DD");
|
|
7978
7990
|
break;
|
|
7979
7991
|
case FieldType.DateTime:
|
|
7980
|
-
value = moment$
|
|
7992
|
+
value = moment$5(value).format();
|
|
7981
7993
|
break;
|
|
7982
7994
|
case FieldType.LocalDateTime:
|
|
7983
|
-
value = moment$
|
|
7995
|
+
value = moment$5(value).format("YYYY-MM-DD[T]HH:mm:ss.SSS");
|
|
7984
7996
|
break;
|
|
7985
7997
|
case FieldType.Time:
|
|
7986
|
-
value = moment$
|
|
7998
|
+
value = moment$5(value).format("HH:mm:ss");
|
|
7987
7999
|
break;
|
|
7988
8000
|
}
|
|
7989
8001
|
}
|
|
@@ -8376,7 +8388,7 @@ EditableOverlayModule = __decorate([
|
|
|
8376
8388
|
})
|
|
8377
8389
|
], EditableOverlayModule);
|
|
8378
8390
|
|
|
8379
|
-
const moment$
|
|
8391
|
+
const moment$6 = moment_;
|
|
8380
8392
|
const YEAR = "year";
|
|
8381
8393
|
const MONTH = "month";
|
|
8382
8394
|
const DAY = "day";
|
|
@@ -8386,19 +8398,19 @@ const SECOND = "second";
|
|
|
8386
8398
|
const MILLISECOND = "millisecond";
|
|
8387
8399
|
class DateUtils {
|
|
8388
8400
|
static parse(date) {
|
|
8389
|
-
return moment$
|
|
8401
|
+
return moment$6(date).toDate();
|
|
8390
8402
|
}
|
|
8391
8403
|
static toString(date, with_time = false) {
|
|
8392
|
-
let result = with_time ? moment$
|
|
8404
|
+
let result = with_time ? moment$6(date, "YYYY-MM-DD hh:mm:ss.SSS") : moment$6(date, "YYYY-MM-DD");
|
|
8393
8405
|
return result.toString();
|
|
8394
8406
|
}
|
|
8395
8407
|
static format(date, formatString = "YYYY-MM-DD HH:mm:ss.SSS", lang = "en") {
|
|
8396
|
-
const monthName = moment$
|
|
8408
|
+
const monthName = moment$6(date)
|
|
8397
8409
|
.locale(lang)
|
|
8398
8410
|
.startOf("month")
|
|
8399
8411
|
.format("MMMM");
|
|
8400
8412
|
const monthNameCapitalized = monthName.charAt(0).toUpperCase() + monthName.slice(1);
|
|
8401
|
-
const dateToFormat = moment$
|
|
8413
|
+
const dateToFormat = moment$6(date).locale(lang);
|
|
8402
8414
|
const format_map = {
|
|
8403
8415
|
YYYY: dateToFormat.format("YYYY"),
|
|
8404
8416
|
MM: dateToFormat.format("MM"),
|
|
@@ -8428,13 +8440,13 @@ class DateUtils {
|
|
|
8428
8440
|
return str;
|
|
8429
8441
|
}
|
|
8430
8442
|
static diff(fistDate, secondDate, scale) {
|
|
8431
|
-
const milliseconds = moment$
|
|
8432
|
-
const seconds = moment$
|
|
8433
|
-
const minutes = moment$
|
|
8434
|
-
const hours = moment$
|
|
8435
|
-
const days = moment$
|
|
8436
|
-
const months = moment$
|
|
8437
|
-
const years = moment$
|
|
8443
|
+
const milliseconds = moment$6(fistDate).diff(secondDate, MILLISECOND);
|
|
8444
|
+
const seconds = moment$6(fistDate).diff(secondDate, SECOND);
|
|
8445
|
+
const minutes = moment$6(fistDate).diff(secondDate, MINUTE);
|
|
8446
|
+
const hours = moment$6(fistDate).diff(secondDate, HOUR);
|
|
8447
|
+
const days = moment$6(fistDate).diff(secondDate, DAY);
|
|
8448
|
+
const months = moment$6(fistDate).diff(secondDate, MONTH);
|
|
8449
|
+
const years = moment$6(fistDate).diff(secondDate, YEAR);
|
|
8438
8450
|
if (!scale.endsWith("s")) {
|
|
8439
8451
|
scale += "s";
|
|
8440
8452
|
}
|
|
@@ -8449,14 +8461,14 @@ class DateUtils {
|
|
|
8449
8461
|
}[scale]);
|
|
8450
8462
|
}
|
|
8451
8463
|
static today() {
|
|
8452
|
-
const dateStr = moment$
|
|
8464
|
+
const dateStr = moment$6().format("YYY-MM-DD");
|
|
8453
8465
|
return new Date(dateStr);
|
|
8454
8466
|
}
|
|
8455
8467
|
static now() {
|
|
8456
|
-
return moment$
|
|
8468
|
+
return moment$6().toDate();
|
|
8457
8469
|
}
|
|
8458
8470
|
static add(date, quantity, scale) {
|
|
8459
|
-
return moment$
|
|
8471
|
+
return moment$6(date).add(quantity, scale).toDate();
|
|
8460
8472
|
}
|
|
8461
8473
|
static startOf(date, scale) {
|
|
8462
8474
|
const scores = {
|
|
@@ -8484,7 +8496,7 @@ class DateUtils {
|
|
|
8484
8496
|
return new Date(vals[0], vals[1], vals[2], vals[3], vals[4], vals[5], vals[6]);
|
|
8485
8497
|
}
|
|
8486
8498
|
static clone(date) {
|
|
8487
|
-
return moment$
|
|
8499
|
+
return moment$6(date).toDate();
|
|
8488
8500
|
}
|
|
8489
8501
|
static getDateValues(date) {
|
|
8490
8502
|
return [
|
|
@@ -8498,7 +8510,7 @@ class DateUtils {
|
|
|
8498
8510
|
];
|
|
8499
8511
|
}
|
|
8500
8512
|
static getDaysInMonth(date) {
|
|
8501
|
-
return moment$
|
|
8513
|
+
return moment$6(date, "YYYY-MM").daysInMonth();
|
|
8502
8514
|
}
|
|
8503
8515
|
}
|
|
8504
8516
|
|
|
@@ -14708,7 +14720,7 @@ const fallback = {
|
|
|
14708
14720
|
"platform.angular_components.not_informed": "Não informado",
|
|
14709
14721
|
"platform.angular_components.advanced_search": "Pesquisa avançada",
|
|
14710
14722
|
"platform.angular_components.no_records_found": "Nenhum registro encontrado",
|
|
14711
|
-
"platform.angular_components.total_record": "{{ count }}
|
|
14723
|
+
"platform.angular_components.total_record": "{{ count }} registro encontrado",
|
|
14712
14724
|
"platform.angular_components.total_records": "{{ count }} registros encontrados",
|
|
14713
14725
|
"platform.angular_components.total_records_selected": "{0} registros selecionados",
|
|
14714
14726
|
"platform.angular_components.country_name_br": "Brasil",
|