@seniorsistemas/angular-components 14.4.1 → 14.7.0
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 +414 -99
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/bignumber-input/index.d.ts +2 -0
- package/components/bignumber-input/number-input.directive.d.ts +22 -0
- package/components/bignumber-input/number-input.module.d.ts +2 -0
- package/components/dynamic-form/components/fields/bignumber/number-field.component.d.ts +16 -0
- package/components/dynamic-form/components/fields/currency/currency-field.component.d.ts +3 -0
- package/components/dynamic-form/components/fields/number/number-field.component.d.ts +3 -0
- package/components/dynamic-form/components/lookup/lookup.component.d.ts +3 -0
- package/components/dynamic-form/configurations/dynamic-type.d.ts +2 -1
- package/components/dynamic-form/configurations/field-type.d.ts +11 -1
- package/components/dynamic-form/configurations/fields/bignumber-field.d.ts +32 -0
- package/components/dynamic-form/configurations/fields/currency-field.d.ts +3 -0
- package/components/dynamic-form/configurations/fields/decimal-field.d.ts +6 -0
- package/components/dynamic-form/configurations/fields/number-field.d.ts +6 -0
- package/components/dynamic-form/configurations/form-field.d.ts +5 -1
- package/components/dynamic-form/index.d.ts +1 -0
- package/components/locale/pipes/localized-bignumber-impure.pipe.d.ts +6 -0
- package/components/locale/pipes/localized-bignumber.pipe.d.ts +9 -0
- package/components/locale/pipes/localized-currency-impure.pipe.d.ts +3 -0
- package/components/locale/pipes/localized-currency.pipe.d.ts +3 -0
- package/components/locale/pipes/localized-number.pipe.d.ts +3 -0
- package/components/number-input/number-input.directive.d.ts +6 -0
- package/components/number-input/number-input.module.d.ts +3 -0
- package/components/stats-card/stats-card.component.d.ts +2 -1
- package/esm2015/components/bignumber-input/index.js +3 -0
- package/esm2015/components/bignumber-input/number-input.directive.js +97 -0
- package/esm2015/components/bignumber-input/number-input.module.js +15 -0
- package/esm2015/components/dynamic-form/components/fields/bignumber/number-field.component.js +60 -0
- package/esm2015/components/dynamic-form/components/fields/currency/currency-field.component.js +4 -1
- package/esm2015/components/dynamic-form/components/fields/number/number-field.component.js +4 -1
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +13 -3
- package/esm2015/components/dynamic-form/configurations/dynamic-config.js +4 -1
- package/esm2015/components/dynamic-form/configurations/dynamic-type.js +2 -1
- package/esm2015/components/dynamic-form/configurations/field-type.js +11 -1
- package/esm2015/components/dynamic-form/configurations/fields/bignumber-field.js +22 -0
- package/esm2015/components/dynamic-form/configurations/fields/currency-field.js +4 -1
- package/esm2015/components/dynamic-form/configurations/fields/decimal-field.js +4 -1
- package/esm2015/components/dynamic-form/configurations/fields/number-field.js +4 -1
- package/esm2015/components/dynamic-form/configurations/form-field.js +4 -1
- package/esm2015/components/dynamic-form/dynamic-form.js +4 -1
- package/esm2015/components/dynamic-form/dynamic-form.module.js +6 -1
- package/esm2015/components/dynamic-form/index.js +2 -1
- package/esm2015/components/locale/locale.module.js +9 -1
- package/esm2015/components/locale/pipes/localized-bignumber-impure.pipe.js +16 -0
- package/esm2015/components/locale/pipes/localized-bignumber.pipe.js +38 -0
- package/esm2015/components/locale/pipes/localized-currency-impure.pipe.js +4 -1
- package/esm2015/components/locale/pipes/localized-currency.pipe.js +4 -1
- package/esm2015/components/locale/pipes/localized-number.pipe.js +4 -1
- package/esm2015/components/number-input/number-input.directive.js +7 -1
- package/esm2015/components/number-input/number-input.module.js +4 -1
- package/esm2015/components/stats-card/stats-card.component.js +21 -19
- package/esm2015/components/table/table-column/table-columns.component.js +3 -3
- package/esm2015/public-api.js +5 -1
- package/esm2015/seniorsistemas-angular-components.js +34 -31
- package/esm5/components/bignumber-input/index.js +3 -0
- package/esm5/components/bignumber-input/number-input.directive.js +101 -0
- package/esm5/components/bignumber-input/number-input.module.js +18 -0
- package/esm5/components/dynamic-form/components/fields/bignumber/number-field.component.js +68 -0
- package/esm5/components/dynamic-form/components/fields/currency/currency-field.component.js +4 -1
- package/esm5/components/dynamic-form/components/fields/number/number-field.component.js +4 -1
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +13 -3
- package/esm5/components/dynamic-form/configurations/dynamic-config.js +4 -1
- package/esm5/components/dynamic-form/configurations/dynamic-type.js +2 -1
- package/esm5/components/dynamic-form/configurations/field-type.js +11 -1
- package/esm5/components/dynamic-form/configurations/fields/bignumber-field.js +27 -0
- package/esm5/components/dynamic-form/configurations/fields/currency-field.js +4 -1
- package/esm5/components/dynamic-form/configurations/fields/decimal-field.js +4 -1
- package/esm5/components/dynamic-form/configurations/fields/number-field.js +4 -1
- package/esm5/components/dynamic-form/configurations/form-field.js +4 -1
- package/esm5/components/dynamic-form/dynamic-form.js +4 -1
- package/esm5/components/dynamic-form/dynamic-form.module.js +6 -1
- package/esm5/components/dynamic-form/index.js +2 -1
- package/esm5/components/locale/locale.module.js +9 -1
- package/esm5/components/locale/pipes/localized-bignumber-impure.pipe.js +21 -0
- package/esm5/components/locale/pipes/localized-bignumber.pipe.js +39 -0
- package/esm5/components/locale/pipes/localized-currency-impure.pipe.js +4 -1
- package/esm5/components/locale/pipes/localized-currency.pipe.js +4 -1
- package/esm5/components/locale/pipes/localized-number.pipe.js +4 -1
- package/esm5/components/number-input/number-input.directive.js +7 -1
- package/esm5/components/number-input/number-input.module.js +4 -1
- package/esm5/components/stats-card/stats-card.component.js +20 -19
- package/esm5/components/table/table-column/table-columns.component.js +3 -3
- package/esm5/public-api.js +5 -1
- package/esm5/seniorsistemas-angular-components.js +34 -31
- package/fesm2015/seniorsistemas-angular-components.js +345 -58
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +375 -65
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +3 -1
- package/public-api.d.ts +4 -0
- package/seniorsistemas-angular-components.d.ts +33 -30
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -13,9 +13,11 @@ import { trigger, state, style, transition, animate, group, query, animateChild
|
|
|
13
13
|
import { FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR, FormControl, FormGroup, NG_VALIDATORS, Validators, FormArray } from '@angular/forms';
|
|
14
14
|
import { HttpClient, HttpEventType, HttpClientModule } from '@angular/common/http';
|
|
15
15
|
import { Hotkey, HotkeysService, HotkeyModule } from 'angular2-hotkeys';
|
|
16
|
+
import BigNumber, { BigNumber as BigNumber$1 } from 'bignumber.js';
|
|
16
17
|
import { AutoComplete, AutoCompleteModule } from 'primeng/autocomplete';
|
|
17
18
|
import { Dialog, DialogModule } from 'primeng/dialog';
|
|
18
19
|
import { Table, TableService, RowToggler, TableModule as TableModule$1 } from 'primeng/table';
|
|
20
|
+
import { applyMask, AlignmentOptions, CurrencyMaskDirective as CurrencyMaskDirective$1 } from '@seniorsistemas/ng2-currency-mask';
|
|
19
21
|
import { user } from '@seniorsistemas/senior-platform-data';
|
|
20
22
|
import * as moment_ from 'moment';
|
|
21
23
|
import { CookieService } from 'ngx-cookie-service';
|
|
@@ -991,16 +993,26 @@ var FieldType;
|
|
|
991
993
|
FieldType["Chips"] = "Chips";
|
|
992
994
|
FieldType["Date"] = "Date";
|
|
993
995
|
FieldType["DateTime"] = "DateTime";
|
|
996
|
+
/**
|
|
997
|
+
* @deprecated Should use 'Number' instead
|
|
998
|
+
*/
|
|
994
999
|
FieldType["Double"] = "Double";
|
|
995
1000
|
FieldType["Enum"] = "Enum";
|
|
996
1001
|
FieldType["Blob"] = "Blob";
|
|
1002
|
+
/**
|
|
1003
|
+
* @deprecated Should use 'Number' instead
|
|
1004
|
+
*/
|
|
997
1005
|
FieldType["Integer"] = "Integer";
|
|
998
1006
|
FieldType["Lookup"] = "Lookup";
|
|
1007
|
+
/**
|
|
1008
|
+
* @deprecated Should use 'Number' instead
|
|
1009
|
+
*/
|
|
999
1010
|
FieldType["Money"] = "Money";
|
|
1000
1011
|
FieldType["Radio"] = "Radio";
|
|
1001
1012
|
FieldType["String"] = "String";
|
|
1002
1013
|
FieldType["Text"] = "Text";
|
|
1003
1014
|
FieldType["Time"] = "Time";
|
|
1015
|
+
FieldType["Number"] = "Number";
|
|
1004
1016
|
})(FieldType || (FieldType = {}));
|
|
1005
1017
|
|
|
1006
1018
|
var FieldSize = /** @class */ (function () {
|
|
@@ -1046,48 +1058,6 @@ var AutocompleteField = /** @class */ (function (_super) {
|
|
|
1046
1058
|
return AutocompleteField;
|
|
1047
1059
|
}(Field));
|
|
1048
1060
|
|
|
1049
|
-
var BlobField = /** @class */ (function (_super) {
|
|
1050
|
-
__extends(BlobField, _super);
|
|
1051
|
-
function BlobField(config) {
|
|
1052
|
-
var _this = _super.call(this, config) || this;
|
|
1053
|
-
_this.accept = config.accept;
|
|
1054
|
-
_this.files = config.files || [];
|
|
1055
|
-
_this.chooseLabel = config.chooseLabel;
|
|
1056
|
-
_this.removeLabel = config.removeLabel;
|
|
1057
|
-
_this.cancelLabel = config.cancelLabel;
|
|
1058
|
-
_this.successTooltip = config.successTooltip;
|
|
1059
|
-
_this.multiple = config.multiple;
|
|
1060
|
-
_this.onUploadFile = config.onUploadFile;
|
|
1061
|
-
_this.onRemoveFile = config.onRemoveFile;
|
|
1062
|
-
_this.onCancelUpload = config.onCancelUpload;
|
|
1063
|
-
_this.onDownloadFile = config.onDownloadFile;
|
|
1064
|
-
return _this;
|
|
1065
|
-
}
|
|
1066
|
-
return BlobField;
|
|
1067
|
-
}(Field));
|
|
1068
|
-
|
|
1069
|
-
var BooleanOptionsLabel = /** @class */ (function () {
|
|
1070
|
-
function BooleanOptionsLabel(config) {
|
|
1071
|
-
this.true = config.true;
|
|
1072
|
-
this.false = config.false;
|
|
1073
|
-
this.empty = config.empty;
|
|
1074
|
-
}
|
|
1075
|
-
return BooleanOptionsLabel;
|
|
1076
|
-
}());
|
|
1077
|
-
var BooleanField = /** @class */ (function (_super) {
|
|
1078
|
-
__extends(BooleanField, _super);
|
|
1079
|
-
function BooleanField(config) {
|
|
1080
|
-
var _this = _super.call(this, config) || this;
|
|
1081
|
-
_this.verticalAlignment = config.verticalAlignment;
|
|
1082
|
-
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
1083
|
-
_this.onBlur = config.onBlur;
|
|
1084
|
-
_this.onFocus = config.onFocus;
|
|
1085
|
-
_this.onClick = config.onClick;
|
|
1086
|
-
return _this;
|
|
1087
|
-
}
|
|
1088
|
-
return BooleanField;
|
|
1089
|
-
}(Field));
|
|
1090
|
-
|
|
1091
1061
|
var CalendarLocaleOptions = /** @class */ (function () {
|
|
1092
1062
|
function CalendarLocaleOptions(config) {
|
|
1093
1063
|
var _this = this;
|
|
@@ -1200,6 +1170,54 @@ var LocaleService = /** @class */ (function () {
|
|
|
1200
1170
|
return LocaleService;
|
|
1201
1171
|
}());
|
|
1202
1172
|
|
|
1173
|
+
var LocalizedBignumberPipe = /** @class */ (function () {
|
|
1174
|
+
function LocalizedBignumberPipe(localeService) {
|
|
1175
|
+
this.localeService = localeService;
|
|
1176
|
+
}
|
|
1177
|
+
LocalizedBignumberPipe.prototype.transform = function (value, options) {
|
|
1178
|
+
return value !== undefined && value !== null ? this.applyMask(value, options) : of(value);
|
|
1179
|
+
};
|
|
1180
|
+
LocalizedBignumberPipe.prototype.applyMask = function (value, options) {
|
|
1181
|
+
return this.localeService.get().pipe(map(function (localeConfig) {
|
|
1182
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1183
|
+
var configs = {
|
|
1184
|
+
prefix: (_c = (_a = options.prefix) !== null && _a !== void 0 ? _a : (_b = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _b === void 0 ? void 0 : _b.currencySymbol) !== null && _c !== void 0 ? _c : "R$",
|
|
1185
|
+
thousandsSeparator: (_f = (_d = options === null || options === void 0 ? void 0 : options.thousandsSeparator) !== null && _d !== void 0 ? _d : (_e = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _e === void 0 ? void 0 : _e.thousandsSeparator) !== null && _f !== void 0 ? _f : ".",
|
|
1186
|
+
decimalSeparator: (_j = (_g = options === null || options === void 0 ? void 0 : options.decimalSeparator) !== null && _g !== void 0 ? _g : (_h = localeConfig === null || localeConfig === void 0 ? void 0 : localeConfig.number) === null || _h === void 0 ? void 0 : _h.decimalSeparator) !== null && _j !== void 0 ? _j : ",",
|
|
1187
|
+
scale: (_k = options === null || options === void 0 ? void 0 : options.scale) !== null && _k !== void 0 ? _k : 2
|
|
1188
|
+
};
|
|
1189
|
+
var isNumber = !(new BigNumber(value).isNaN());
|
|
1190
|
+
return applyMask(value, configs, isNumber);
|
|
1191
|
+
}));
|
|
1192
|
+
};
|
|
1193
|
+
LocalizedBignumberPipe.ctorParameters = function () { return [
|
|
1194
|
+
{ type: LocaleService }
|
|
1195
|
+
]; };
|
|
1196
|
+
LocalizedBignumberPipe = __decorate([
|
|
1197
|
+
Pipe({
|
|
1198
|
+
name: "localizedBignumber",
|
|
1199
|
+
})
|
|
1200
|
+
], LocalizedBignumberPipe);
|
|
1201
|
+
return LocalizedBignumberPipe;
|
|
1202
|
+
}());
|
|
1203
|
+
|
|
1204
|
+
var LocalizedBignumberImpurePipe = /** @class */ (function (_super) {
|
|
1205
|
+
__extends(LocalizedBignumberImpurePipe, _super);
|
|
1206
|
+
function LocalizedBignumberImpurePipe() {
|
|
1207
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1208
|
+
}
|
|
1209
|
+
LocalizedBignumberImpurePipe.prototype.transform = function (value, options) {
|
|
1210
|
+
return _super.prototype.transform.call(this, value, options);
|
|
1211
|
+
};
|
|
1212
|
+
LocalizedBignumberImpurePipe = __decorate([
|
|
1213
|
+
Pipe({
|
|
1214
|
+
name: "localizedBignumberImpure",
|
|
1215
|
+
pure: false,
|
|
1216
|
+
})
|
|
1217
|
+
], LocalizedBignumberImpurePipe);
|
|
1218
|
+
return LocalizedBignumberImpurePipe;
|
|
1219
|
+
}(LocalizedBignumberPipe));
|
|
1220
|
+
|
|
1203
1221
|
var LocalizedCurrencyPipeOptions = /** @class */ (function (_super) {
|
|
1204
1222
|
__extends(LocalizedCurrencyPipeOptions, _super);
|
|
1205
1223
|
function LocalizedCurrencyPipeOptions(config) {
|
|
@@ -1210,6 +1228,9 @@ var LocalizedCurrencyPipeOptions = /** @class */ (function (_super) {
|
|
|
1210
1228
|
}
|
|
1211
1229
|
return LocalizedCurrencyPipeOptions;
|
|
1212
1230
|
}(NumberLocaleOptions));
|
|
1231
|
+
/**
|
|
1232
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
1233
|
+
*/
|
|
1213
1234
|
var LocalizedCurrencyPipe = /** @class */ (function () {
|
|
1214
1235
|
function LocalizedCurrencyPipe(localeService) {
|
|
1215
1236
|
this.localeService = localeService;
|
|
@@ -1248,6 +1269,9 @@ var LocalizedCurrencyPipe = /** @class */ (function () {
|
|
|
1248
1269
|
return LocalizedCurrencyPipe;
|
|
1249
1270
|
}());
|
|
1250
1271
|
|
|
1272
|
+
/**
|
|
1273
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
1274
|
+
*/
|
|
1251
1275
|
var LocalizedCurrencyImpurePipe = /** @class */ (function (_super) {
|
|
1252
1276
|
__extends(LocalizedCurrencyImpurePipe, _super);
|
|
1253
1277
|
function LocalizedCurrencyImpurePipe() {
|
|
@@ -1300,6 +1324,9 @@ var LocalizedDateImpurePipe = /** @class */ (function (_super) {
|
|
|
1300
1324
|
return LocalizedDateImpurePipe;
|
|
1301
1325
|
}(LocalizedDatePipe));
|
|
1302
1326
|
|
|
1327
|
+
/**
|
|
1328
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
1329
|
+
*/
|
|
1303
1330
|
var LocalizedNumberPipe = /** @class */ (function () {
|
|
1304
1331
|
function LocalizedNumberPipe(localeService) {
|
|
1305
1332
|
this.localeService = localeService;
|
|
@@ -1373,6 +1400,8 @@ var LocaleModule = /** @class */ (function () {
|
|
|
1373
1400
|
LocalizedCurrencyImpurePipe,
|
|
1374
1401
|
LocalizedDateImpurePipe,
|
|
1375
1402
|
LocalizedTimeImpurePipe,
|
|
1403
|
+
LocalizedBignumberPipe,
|
|
1404
|
+
LocalizedBignumberImpurePipe
|
|
1376
1405
|
],
|
|
1377
1406
|
};
|
|
1378
1407
|
};
|
|
@@ -1393,6 +1422,8 @@ var LocaleModule = /** @class */ (function () {
|
|
|
1393
1422
|
LocalizedCurrencyImpurePipe,
|
|
1394
1423
|
LocalizedDateImpurePipe,
|
|
1395
1424
|
LocalizedTimeImpurePipe,
|
|
1425
|
+
LocalizedBignumberPipe,
|
|
1426
|
+
LocalizedBignumberImpurePipe
|
|
1396
1427
|
],
|
|
1397
1428
|
declarations: [
|
|
1398
1429
|
LocalizedCurrencyPipe,
|
|
@@ -1402,12 +1433,78 @@ var LocaleModule = /** @class */ (function () {
|
|
|
1402
1433
|
LocalizedCurrencyImpurePipe,
|
|
1403
1434
|
LocalizedDateImpurePipe,
|
|
1404
1435
|
LocalizedTimeImpurePipe,
|
|
1436
|
+
LocalizedBignumberPipe,
|
|
1437
|
+
LocalizedBignumberImpurePipe
|
|
1405
1438
|
],
|
|
1406
1439
|
})
|
|
1407
1440
|
], LocaleModule);
|
|
1408
1441
|
return LocaleModule;
|
|
1409
1442
|
}());
|
|
1410
1443
|
|
|
1444
|
+
var BignumberField = /** @class */ (function (_super) {
|
|
1445
|
+
__extends(BignumberField, _super);
|
|
1446
|
+
function BignumberField(config) {
|
|
1447
|
+
var _a;
|
|
1448
|
+
var _this = _super.call(this, config) || this;
|
|
1449
|
+
_this.numberLocaleOptions = config.numberLocaleOptions || DEFAULT_NUMBER_LOCALE_OPTIONS;
|
|
1450
|
+
_this.browserAutocomplete = config.browserAutocomplete;
|
|
1451
|
+
_this.precision = config.precision;
|
|
1452
|
+
_this.scale = (_a = config.scale) !== null && _a !== void 0 ? _a : 2;
|
|
1453
|
+
_this.alignTo = _this.scale ? AlignmentOptions.RIGHT : AlignmentOptions.LEFT;
|
|
1454
|
+
_this.mask = config.mask;
|
|
1455
|
+
_this.leftAddon = config.leftAddon;
|
|
1456
|
+
_this.rightAddon = config.rightAddon;
|
|
1457
|
+
_this.onBlur = config.onBlur;
|
|
1458
|
+
_this.onFocus = config.onFocus;
|
|
1459
|
+
_this.onComplete = config.onComplete;
|
|
1460
|
+
_this.onInput = config.onInput;
|
|
1461
|
+
return _this;
|
|
1462
|
+
}
|
|
1463
|
+
return BignumberField;
|
|
1464
|
+
}(Field));
|
|
1465
|
+
|
|
1466
|
+
var BlobField = /** @class */ (function (_super) {
|
|
1467
|
+
__extends(BlobField, _super);
|
|
1468
|
+
function BlobField(config) {
|
|
1469
|
+
var _this = _super.call(this, config) || this;
|
|
1470
|
+
_this.accept = config.accept;
|
|
1471
|
+
_this.files = config.files || [];
|
|
1472
|
+
_this.chooseLabel = config.chooseLabel;
|
|
1473
|
+
_this.removeLabel = config.removeLabel;
|
|
1474
|
+
_this.cancelLabel = config.cancelLabel;
|
|
1475
|
+
_this.successTooltip = config.successTooltip;
|
|
1476
|
+
_this.multiple = config.multiple;
|
|
1477
|
+
_this.onUploadFile = config.onUploadFile;
|
|
1478
|
+
_this.onRemoveFile = config.onRemoveFile;
|
|
1479
|
+
_this.onCancelUpload = config.onCancelUpload;
|
|
1480
|
+
_this.onDownloadFile = config.onDownloadFile;
|
|
1481
|
+
return _this;
|
|
1482
|
+
}
|
|
1483
|
+
return BlobField;
|
|
1484
|
+
}(Field));
|
|
1485
|
+
|
|
1486
|
+
var BooleanOptionsLabel = /** @class */ (function () {
|
|
1487
|
+
function BooleanOptionsLabel(config) {
|
|
1488
|
+
this.true = config.true;
|
|
1489
|
+
this.false = config.false;
|
|
1490
|
+
this.empty = config.empty;
|
|
1491
|
+
}
|
|
1492
|
+
return BooleanOptionsLabel;
|
|
1493
|
+
}());
|
|
1494
|
+
var BooleanField = /** @class */ (function (_super) {
|
|
1495
|
+
__extends(BooleanField, _super);
|
|
1496
|
+
function BooleanField(config) {
|
|
1497
|
+
var _this = _super.call(this, config) || this;
|
|
1498
|
+
_this.verticalAlignment = config.verticalAlignment;
|
|
1499
|
+
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
1500
|
+
_this.onBlur = config.onBlur;
|
|
1501
|
+
_this.onFocus = config.onFocus;
|
|
1502
|
+
_this.onClick = config.onClick;
|
|
1503
|
+
return _this;
|
|
1504
|
+
}
|
|
1505
|
+
return BooleanField;
|
|
1506
|
+
}(Field));
|
|
1507
|
+
|
|
1411
1508
|
var CalendarField = /** @class */ (function (_super) {
|
|
1412
1509
|
__extends(CalendarField, _super);
|
|
1413
1510
|
function CalendarField(config) {
|
|
@@ -1448,11 +1545,17 @@ var ChipsField = /** @class */ (function (_super) {
|
|
|
1448
1545
|
return ChipsField;
|
|
1449
1546
|
}(Field));
|
|
1450
1547
|
|
|
1548
|
+
/**
|
|
1549
|
+
* @deprecated Should use 'AlignmentOptions' from @seniorsistemas/ng2-currency-mask instead
|
|
1550
|
+
*/
|
|
1451
1551
|
var NumberAlignmentOption;
|
|
1452
1552
|
(function (NumberAlignmentOption) {
|
|
1453
1553
|
NumberAlignmentOption["RIGHT"] = "right";
|
|
1454
1554
|
NumberAlignmentOption["LEFT"] = "left";
|
|
1455
1555
|
})(NumberAlignmentOption || (NumberAlignmentOption = {}));
|
|
1556
|
+
/**
|
|
1557
|
+
* @deprecated Should use BigNumberInput directive instead
|
|
1558
|
+
*/
|
|
1456
1559
|
var NumberInputDirective = /** @class */ (function (_super) {
|
|
1457
1560
|
__extends(NumberInputDirective, _super);
|
|
1458
1561
|
function NumberInputDirective() {
|
|
@@ -1566,6 +1669,9 @@ var NumberInputDirective = /** @class */ (function (_super) {
|
|
|
1566
1669
|
return NumberInputDirective;
|
|
1567
1670
|
}(CurrencyMaskDirective));
|
|
1568
1671
|
|
|
1672
|
+
/**
|
|
1673
|
+
* @deprecated Should use 'BignumberInputModule' instead
|
|
1674
|
+
*/
|
|
1569
1675
|
var NumberInputModule = /** @class */ (function () {
|
|
1570
1676
|
function NumberInputModule() {
|
|
1571
1677
|
}
|
|
@@ -1579,6 +1685,9 @@ var NumberInputModule = /** @class */ (function () {
|
|
|
1579
1685
|
return NumberInputModule;
|
|
1580
1686
|
}());
|
|
1581
1687
|
|
|
1688
|
+
/**
|
|
1689
|
+
* @deprecated Should use BignumberField instead
|
|
1690
|
+
*/
|
|
1582
1691
|
var NumberField = /** @class */ (function (_super) {
|
|
1583
1692
|
__extends(NumberField, _super);
|
|
1584
1693
|
function NumberField(config) {
|
|
@@ -1599,6 +1708,9 @@ var NumberField = /** @class */ (function (_super) {
|
|
|
1599
1708
|
return NumberField;
|
|
1600
1709
|
}(Field));
|
|
1601
1710
|
|
|
1711
|
+
/**
|
|
1712
|
+
* @deprecated Should use BignumberField instead
|
|
1713
|
+
*/
|
|
1602
1714
|
var DecimalField = /** @class */ (function (_super) {
|
|
1603
1715
|
__extends(DecimalField, _super);
|
|
1604
1716
|
function DecimalField(config) {
|
|
@@ -1611,6 +1723,9 @@ var DecimalField = /** @class */ (function (_super) {
|
|
|
1611
1723
|
return DecimalField;
|
|
1612
1724
|
}(NumberField));
|
|
1613
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* @deprecated Should use BignumberField instead
|
|
1728
|
+
*/
|
|
1614
1729
|
var CurrencyField = /** @class */ (function (_super) {
|
|
1615
1730
|
__extends(CurrencyField, _super);
|
|
1616
1731
|
function CurrencyField(config) {
|
|
@@ -1764,6 +1879,8 @@ var FormField = /** @class */ (function () {
|
|
|
1764
1879
|
return new NumberField(config);
|
|
1765
1880
|
case FieldType.Double:
|
|
1766
1881
|
return new DecimalField(config);
|
|
1882
|
+
case FieldType.Number:
|
|
1883
|
+
return new BignumberField(config);
|
|
1767
1884
|
case FieldType.String:
|
|
1768
1885
|
case FieldType.Binary:
|
|
1769
1886
|
return new TextField(config);
|
|
@@ -1976,7 +2093,7 @@ var LookupComponent = /** @class */ (function () {
|
|
|
1976
2093
|
return this.emptyFieldLabel;
|
|
1977
2094
|
};
|
|
1978
2095
|
LookupComponent.prototype.isNumber = function (obj, path) {
|
|
1979
|
-
return
|
|
2096
|
+
return !(new BigNumber(this.getFieldValue(obj, path)).isNaN());
|
|
1980
2097
|
};
|
|
1981
2098
|
LookupComponent.prototype.setHotkeys = function () {
|
|
1982
2099
|
var _this = this;
|
|
@@ -2018,6 +2135,15 @@ var LookupComponent = /** @class */ (function () {
|
|
|
2018
2135
|
LookupComponent.prototype.isFunction = function (value) {
|
|
2019
2136
|
return value instanceof Function;
|
|
2020
2137
|
};
|
|
2138
|
+
LookupComponent.prototype.getNumberMaskConfig = function (col) {
|
|
2139
|
+
var _a, _b, _c;
|
|
2140
|
+
return {
|
|
2141
|
+
scale: this.getScale(col.scale),
|
|
2142
|
+
decimalSeparator: (_a = col.numberLocaleOptions) === null || _a === void 0 ? void 0 : _a.decimalSeparator,
|
|
2143
|
+
thousandsSeparator: (_b = col.numberLocaleOptions) === null || _b === void 0 ? void 0 : _b.thousandsSeparator,
|
|
2144
|
+
prefix: (_c = col.numberLocaleOptions) === null || _c === void 0 ? void 0 : _c.currencySymbol
|
|
2145
|
+
};
|
|
2146
|
+
};
|
|
2021
2147
|
var LookupComponent_1;
|
|
2022
2148
|
LookupComponent.nextId = 0;
|
|
2023
2149
|
LookupComponent.ctorParameters = function () { return [
|
|
@@ -2152,7 +2278,7 @@ var LookupComponent = /** @class */ (function () {
|
|
|
2152
2278
|
LookupComponent = LookupComponent_1 = __decorate([
|
|
2153
2279
|
Component({
|
|
2154
2280
|
selector: "s-lookup",
|
|
2155
|
-
template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"true\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\"\n >\n </p-autoComplete>\n\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\"\n ></button>\n</div>\n\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog\n>\n <div *ngIf=\"dialogVisible\" class=\"s-lookup-modal-container\">\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter\"\n [@collapseContent]=\"collapsed ? {value: 'hidden', params: {transitionParams: transitionOptions }} : {value: 'visible', params: {transitionParams: transitionOptions}}\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form [formGroup]=\"formGroupDialog\" novalidate autocomplete=\"off\">\n <div *ngIf=\"!collapsed\"\n [@childCollapseContent]=\"collapsed ? {value: ':leave', params: {transitionParams: transitionOptions }} : {value: ':enter', params: {transitionParams: transitionOptions}}\"\n class=\"form-content\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form [fields]=\"searchFields\" [form]=\"formGroupDialog\"></s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel\"\n (onClick)=\"search()\"\n pTooltip=\"(ALT + SHIFT + F)\"\n showDelay=\"500\"\n ></s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel\"\n (onClick)=\"clear()\"\n priority=\"link\"\n pTooltip=\"(ALT + SHIFT + L)\"\n showDelay=\"500\"\n ></s-button>\n </div>\n </div>\n </div>\n </form> \n </div>\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button [id]=\"id + '-filter-toggle-button'\" type=\"button\" (click)=\"filterToggle()\">\n <span class=\"fa\" [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\"></span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div class=\"content\" [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\"\n ></s-empty-state>\n\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngIf=\"multiple\" style=\"width: 50px\" />\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngIf=\"multiple\" style=\"width: 50px\">\n <s-table-header-checkbox [useAllObject]=\"lookupRowProps ? false : true\" [rowProps]=\"lookupRowProps\"></s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\"\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon [field]=\"col.name\" *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-rowIndex=\"rowIndex\">\n <tr sNavigation [pSelectableRow]=\"rowData\" [pSelectableRowIndex]=\"rowIndex\">\n <td *ngIf=\"multiple\" style=\"width: 50px\" tabindex=\"0\">\n <p-tableCheckbox [value]=\"rowData\" [pSelectableRow]=\"rowData\"></p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\"\n >\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedNumber: getScale(col.scale) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedCurrency | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n pTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\"\n ></s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"hideDialog()\"\n pTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n ></s-button>\n </p-footer>\n</p-dialog>\n\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
|
|
2281
|
+
template: "<div [ngClass]=\"{ inputgroup: showSearch }\">\n <p-autoComplete\n #autocomplete\n [(ngModel)]=\"value\"\n [disabled]=\"disabled\"\n [dataKey]=\"dataKey\"\n [multiple]=\"multiple\"\n [inputId]=\"id + '-autocomplete'\"\n [forceSelection]=\"true\"\n [suggestions]=\"getLookupSuggestions()\"\n (completeMethod)=\"lazyLoadLookup($event)\"\n (onSelect)=\"onSelect.next($event)\"\n (onBlur)=\"onBlur.next($event)\"\n (onFocus)=\"onFocus.next($event)\"\n (onUnselect)=\"onUnselect.next($event)\"\n (onClear)=\"onClear.next($event)\"\n (onKeyUp)=\"onKeyUp.next($event)\"\n [field]=\"lookupDisplayField\"\n [emptyMessage]=\"lookupEmptyMessage\"\n [dropdown]=\"!showSearch\"\n [appendTo]=\"lookupAppendTo\"\n [placeholder]=\"placeholder || ' '\"\n [autoHighlight]=\"true\"\n inputStyleClass=\"mousetrap\"\n >\n </p-autoComplete>\n\n <button\n *ngIf=\"showSearch\"\n pButton\n type=\"button\"\n icon=\"fa fa-search\"\n class=\"button-addon\"\n [disabled]=\"disabled\"\n (click)=\"showDialog()\"\n ></button>\n</div>\n\n<p-dialog\n appendTo=\"body\"\n styleClass=\"s-lookup-modal\"\n [header]=\"searchTitle\"\n [(visible)]=\"dialogVisible\"\n [modal]=\"true\"\n (onHide)=\"hideDialog()\"\n [blockScroll]=\"true\"\n [focusOnShow]=\"true\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n #dialog\n>\n <div *ngIf=\"dialogVisible\" class=\"s-lookup-modal-container\">\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter\"\n [@collapseContent]=\"collapsed ? {value: 'hidden', params: {transitionParams: transitionOptions }} : {value: 'visible', params: {transitionParams: transitionOptions}}\"\n (@collapseContent.done)=\"onToggleDone()\">\n <form [formGroup]=\"formGroupDialog\" novalidate autocomplete=\"off\">\n <div *ngIf=\"!collapsed\"\n [@childCollapseContent]=\"collapsed ? {value: ':leave', params: {transitionParams: transitionOptions }} : {value: ':enter', params: {transitionParams: transitionOptions}}\"\n class=\"form-content\">\n <div class=\"filter-title sds-section-title\">{{ filterTitle }}</div>\n <div class=\"form-fields\">\n <s-dynamic-form [fields]=\"searchFields\" [form]=\"formGroupDialog\"></s-dynamic-form>\n </div>\n <div class=\"ui-g\">\n <div class=\"ui-g-12\">\n <s-button\n [id]=\"id + '-filter-button'\"\n type=\"submit\"\n [label]=\"filterLabel\"\n (onClick)=\"search()\"\n pTooltip=\"(ALT + SHIFT + F)\"\n showDelay=\"500\"\n ></s-button>\n <s-button\n [id]=\"id + '-clear-button'\"\n type=\"button\"\n [label]=\"clearLabel\"\n (onClick)=\"clear()\"\n priority=\"link\"\n pTooltip=\"(ALT + SHIFT + L)\"\n showDelay=\"500\"\n ></s-button>\n </div>\n </div>\n </div>\n </form> \n </div>\n <div *ngIf=\"searchFields && searchFields.length\" class=\"filter-toggle\">\n <div class=\"filter-toggle--start-border-mask\"></div>\n <button [id]=\"id + '-filter-toggle-button'\" type=\"button\" (click)=\"filterToggle()\">\n <span class=\"fa\" [ngClass]=\"{'fa-chevron-left': !collapsed, 'fa-chevron-right': collapsed}\"\n aria-hidden=\"true\"></span>\n </button>\n <div class=\"filter-toggle--end-border-mask\"></div>\n </div>\n <div class=\"content\" [ngClass]=\"{'empty-content': !searchTotalRecords && !loading}\">\n <s-empty-state\n [id]=\"id + '-empty-state'\"\n *ngIf=\"!searchTotalRecords && !loading\"\n [title]=\"searchEmptyTitle\"\n [description]=\"searchEmptyDescription\"\n iconClass=\"fa fa-search\"\n ></s-empty-state>\n\n <p-table\n [dataKey]=\"dataKey\"\n [value]=\"getGridData()\"\n [columns]=\"searchGridFields\"\n [lazy]=\"true\"\n [scrollable]=\"true\"\n [paginator]=\"true\"\n sortMode=\"multiple\"\n [totalRecords]=\"searchTotalRecords\"\n [rows]=\"10\"\n [selection]=\"selected\"\n (onLazyLoad)=\"lazyLoadGrid($event)\"\n *sLoadingState=\"loading\"\n [multiSortMeta]=\"multiSortMeta\"\n [attr.data-hidden]=\"!searchTotalRecords && !loading\"\n [selectionMode]=\"multiple ? 'multiple' : 'single'\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <ng-template pTemplate=\"colgroup\" let-columns>\n <colgroup>\n <col *ngIf=\"multiple\" style=\"width: 50px\" />\n <col *ngFor=\"let col of columns\" [style.width]=\"col.width\" />\n </colgroup>\n </ng-template>\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th *ngIf=\"multiple\" style=\"width: 50px\">\n <s-table-header-checkbox [useAllObject]=\"lookupRowProps ? false : true\" [rowProps]=\"lookupRowProps\"></s-table-header-checkbox>\n </th>\n <th\n [style.width]=\"col.width\"\n *ngFor=\"let col of columns\"\n [pSortableColumn]=\"col.name\"\n [pSortableColumnDisabled]=\"sortableColumnsDisabled?.includes(col.name)\"\n >\n <div class=\"senior-header\">\n <span class=\"senior-header-title\">{{ col.label }}</span>\n <p-sortIcon [field]=\"col.name\" *ngIf=\"!sortableColumnsDisabled?.includes(col.name)\"></p-sortIcon>\n </div>\n </th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns let-rowIndex=\"rowIndex\">\n <tr sNavigation [pSelectableRow]=\"rowData\" [pSelectableRowIndex]=\"rowIndex\">\n <td *ngIf=\"multiple\" style=\"width: 50px\" tabindex=\"0\">\n <p-tableCheckbox [value]=\"rowData\" [pSelectableRow]=\"rowData\"></p-tableCheckbox>\n </td>\n <td\n [style.width]=\"col['width']\"\n *ngFor=\"let col of searchGridFields\"\n [ngSwitch]=\"col.type\"\n tabindex=\"0\"\n >\n <ng-container *ngSwitchCase=\"'Boolean'\">\n <ng-container *ngIf=\"isBooleanValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getBooleanLabel(rowData, col.name, col.optionsLabel) }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Date'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate: \"L\" | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'DateTime'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedDate | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Time'\">\n <ng-container *ngIf=\"getFieldValue(rowData, col.name); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) | localizedTime | async }}</span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Double'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedNumber: getScale(col.scale) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Money'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedCurrency | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Number'\">\n <ng-container *ngIf=\"isNumber(rowData, col.name); else emptyTemplate\">\n <span> {{ getFieldValue(rowData, col.name) | localizedBignumber: getNumberMaskConfig(col) | async }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'Enum'\">\n <ng-container\n *ngIf=\"getLabelForValue(getFieldValue(rowData, col.name), col.options); else emptyTemplate\"\n >\n <span> {{ getLabelForValue(getFieldValue(rowData, col.name), col.options) }} </span>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <ng-container *ngIf=\"col.mask && col.mask()\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name))\">\n <span>{{ getFieldValue(rowData, col.name) | sMaskFormatter: col.mask() }}</span>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!(col.mask && col.mask())\">\n <ng-container *ngIf=\"(isNumber(rowData, col.name) || getFieldValue(rowData, col.name)); else emptyTemplate\">\n <span>{{ getFieldValue(rowData, col.name) }}</span>\n </ng-container>\n </ng-container>\n </ng-container>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"paginatorright\">\n <span [attr.data-hidden]=\"loading\">\n {{\n searchTotalRecordsLabel ||\n searchTotalRecords?.toString() + (searchTotalRecords === 1 ? recordLabel : recordsLabel)\n }}\n </span>\n </ng-template>\n </p-table>\n </div>\n </div>\n\n <p-footer>\n <s-button\n [id]=\"id + '-select-button'\"\n type=\"button\"\n [label]=\"selectLabel\"\n (onClick)=\"select()\"\n pTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n [disabled]=\"!selected?.length\"\n ></s-button>\n <s-button\n [id]=\"id + '-cancel-button'\"\n type=\"button\"\n priority=\"link\"\n [label]=\"cancelLabel\"\n (onClick)=\"hideDialog()\"\n pTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n ></s-button>\n </p-footer>\n</p-dialog>\n\n<ng-template #emptyTemplate>\n <span [ngClass]=\"'sds-empty-value'\">{{ emptyFieldLabel }}</span>\n</ng-template>\n",
|
|
2156
2282
|
providers: [
|
|
2157
2283
|
{
|
|
2158
2284
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -2208,6 +2334,7 @@ var DynamicType;
|
|
|
2208
2334
|
DynamicType["String"] = "String";
|
|
2209
2335
|
DynamicType["Text"] = "Text";
|
|
2210
2336
|
DynamicType["Time"] = "Time";
|
|
2337
|
+
DynamicType["Number"] = "Number";
|
|
2211
2338
|
})(DynamicType || (DynamicType = {}));
|
|
2212
2339
|
|
|
2213
2340
|
var Grid = /** @class */ (function () {
|
|
@@ -2275,6 +2402,8 @@ var DynamicConfig = /** @class */ (function () {
|
|
|
2275
2402
|
return new Fieldset(config);
|
|
2276
2403
|
case DynamicType.Integer:
|
|
2277
2404
|
return new NumberField(config);
|
|
2405
|
+
case DynamicType.Number:
|
|
2406
|
+
return new BignumberField(config);
|
|
2278
2407
|
case DynamicType.Lookup:
|
|
2279
2408
|
return new LookupField(config);
|
|
2280
2409
|
case DynamicType.Money:
|
|
@@ -3049,6 +3178,115 @@ var MaskFormatterModule = /** @class */ (function () {
|
|
|
3049
3178
|
return MaskFormatterModule;
|
|
3050
3179
|
}());
|
|
3051
3180
|
|
|
3181
|
+
var BignumberInputDirective = /** @class */ (function (_super) {
|
|
3182
|
+
__extends(BignumberInputDirective, _super);
|
|
3183
|
+
function BignumberInputDirective() {
|
|
3184
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3185
|
+
_this.precision = 15;
|
|
3186
|
+
_this.scale = 0;
|
|
3187
|
+
_this.decimalSeparator = ",";
|
|
3188
|
+
_this.thousandsSeparator = ".";
|
|
3189
|
+
_this.alignTo = AlignmentOptions.LEFT;
|
|
3190
|
+
_this.allowNegative = true;
|
|
3191
|
+
return _this;
|
|
3192
|
+
}
|
|
3193
|
+
BignumberInputDirective_1 = BignumberInputDirective;
|
|
3194
|
+
BignumberInputDirective.prototype.ngOnInit = function () {
|
|
3195
|
+
this.updateVariables();
|
|
3196
|
+
_super.prototype.ngOnInit.call(this);
|
|
3197
|
+
};
|
|
3198
|
+
BignumberInputDirective.prototype.ngOnChanges = function (changes) {
|
|
3199
|
+
var placeholderChange = changes.placeholder && changes.placeholder.currentValue;
|
|
3200
|
+
if (!placeholderChange && this.scale)
|
|
3201
|
+
this.placeholder = "0" + this.decimalSeparator + "".padEnd(this.scale, "0");
|
|
3202
|
+
if (changes.scale ||
|
|
3203
|
+
changes.decimalSeparator ||
|
|
3204
|
+
changes.thousandsSeparator ||
|
|
3205
|
+
changes.alignTo ||
|
|
3206
|
+
changes.precision ||
|
|
3207
|
+
changes.allowNegative) {
|
|
3208
|
+
this.updateVariables();
|
|
3209
|
+
}
|
|
3210
|
+
};
|
|
3211
|
+
/**
|
|
3212
|
+
* Update the options values according to the directive input values.
|
|
3213
|
+
*/
|
|
3214
|
+
BignumberInputDirective.prototype.updateVariables = function () {
|
|
3215
|
+
this.options = {
|
|
3216
|
+
align: this.alignTo,
|
|
3217
|
+
decimalSeparator: this.decimalSeparator,
|
|
3218
|
+
thousandsSeparator: this.thousandsSeparator,
|
|
3219
|
+
scale: this.scale || 0,
|
|
3220
|
+
prefix: "",
|
|
3221
|
+
suffix: "",
|
|
3222
|
+
allowNegative: this.allowNegative
|
|
3223
|
+
};
|
|
3224
|
+
this.calculateMaxLength();
|
|
3225
|
+
};
|
|
3226
|
+
/**
|
|
3227
|
+
* Responsible to calculate the field maximum length considering the separators.
|
|
3228
|
+
*/
|
|
3229
|
+
BignumberInputDirective.prototype.calculateMaxLength = function () {
|
|
3230
|
+
var decSepLength = this.decimalSeparator.length;
|
|
3231
|
+
var thoSepLength = this.thousandsSeparator.length;
|
|
3232
|
+
var maxLength = this.precision + (this.scale ? decSepLength : 0);
|
|
3233
|
+
maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
|
|
3234
|
+
this.maxLength = maxLength;
|
|
3235
|
+
};
|
|
3236
|
+
var BignumberInputDirective_1;
|
|
3237
|
+
__decorate([
|
|
3238
|
+
Input()
|
|
3239
|
+
], BignumberInputDirective.prototype, "precision", void 0);
|
|
3240
|
+
__decorate([
|
|
3241
|
+
Input()
|
|
3242
|
+
], BignumberInputDirective.prototype, "scale", void 0);
|
|
3243
|
+
__decorate([
|
|
3244
|
+
Input()
|
|
3245
|
+
], BignumberInputDirective.prototype, "decimalSeparator", void 0);
|
|
3246
|
+
__decorate([
|
|
3247
|
+
Input()
|
|
3248
|
+
], BignumberInputDirective.prototype, "thousandsSeparator", void 0);
|
|
3249
|
+
__decorate([
|
|
3250
|
+
Input()
|
|
3251
|
+
], BignumberInputDirective.prototype, "alignTo", void 0);
|
|
3252
|
+
__decorate([
|
|
3253
|
+
Input()
|
|
3254
|
+
], BignumberInputDirective.prototype, "allowNegative", void 0);
|
|
3255
|
+
__decorate([
|
|
3256
|
+
Input(),
|
|
3257
|
+
HostBinding("attr.placeholder")
|
|
3258
|
+
], BignumberInputDirective.prototype, "placeholder", void 0);
|
|
3259
|
+
__decorate([
|
|
3260
|
+
HostBinding("attr.maxLength")
|
|
3261
|
+
], BignumberInputDirective.prototype, "maxLength", void 0);
|
|
3262
|
+
BignumberInputDirective = BignumberInputDirective_1 = __decorate([
|
|
3263
|
+
Directive({
|
|
3264
|
+
selector: "input[sBignumberInput]",
|
|
3265
|
+
providers: [
|
|
3266
|
+
{
|
|
3267
|
+
provide: NG_VALUE_ACCESSOR,
|
|
3268
|
+
useExisting: forwardRef(function () { return BignumberInputDirective_1; }),
|
|
3269
|
+
multi: true,
|
|
3270
|
+
},
|
|
3271
|
+
],
|
|
3272
|
+
})
|
|
3273
|
+
], BignumberInputDirective);
|
|
3274
|
+
return BignumberInputDirective;
|
|
3275
|
+
}(CurrencyMaskDirective$1));
|
|
3276
|
+
|
|
3277
|
+
var BignumberInputModule = /** @class */ (function () {
|
|
3278
|
+
function BignumberInputModule() {
|
|
3279
|
+
}
|
|
3280
|
+
BignumberInputModule = __decorate([
|
|
3281
|
+
NgModule({
|
|
3282
|
+
imports: [CommonModule],
|
|
3283
|
+
declarations: [BignumberInputDirective],
|
|
3284
|
+
exports: [BignumberInputDirective],
|
|
3285
|
+
})
|
|
3286
|
+
], BignumberInputModule);
|
|
3287
|
+
return BignumberInputModule;
|
|
3288
|
+
}());
|
|
3289
|
+
|
|
3052
3290
|
var TableHeaderCheckboxComponent = /** @class */ (function () {
|
|
3053
3291
|
function TableHeaderCheckboxComponent(table, tableService) {
|
|
3054
3292
|
var _this = this;
|
|
@@ -3623,9 +3861,9 @@ var TableColumnsComponent = /** @class */ (function () {
|
|
|
3623
3861
|
], TableColumnsComponent.prototype, "locale", void 0);
|
|
3624
3862
|
TableColumnsComponent = __decorate([
|
|
3625
3863
|
Component({
|
|
3626
|
-
template: "\n<ng-template #columnsTemplate>\n <td *ngFor=\"let column of formattedColumns\" [ngStyle]=\"column.style\" (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\">\n\n <div *ngIf=\"column.type !== 'TOKENS' || !isArray(column.columnValue); else tokensTemplate\">\n\n <span *ngIf=\"column.type !== 'LINK'\" [pTooltip]=\"column.tooltip\" [escape]=\"false\" [ngClass]=\"column.badgeClass\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </span>\n\n <a *ngIf=\"column.type === 'LINK'\" [pTooltip]=\"column.tooltip\" [escape]=\"false\" (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </a>\n\n <ng-template #columnValueTemplate>\n <span *ngFor=\"let value of getSplittedString(column)\">\n <span [ngClass]=\"{ 'sds-
|
|
3864
|
+
template: "\n<ng-template #columnsTemplate>\n <td *ngFor=\"let column of formattedColumns\" [ngStyle]=\"column.style\" (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\">\n\n <div *ngIf=\"column.type !== 'TOKENS' || !isArray(column.columnValue); else tokensTemplate\">\n\n <span *ngIf=\"column.type !== 'LINK'\" [pTooltip]=\"column.tooltip\" [escape]=\"false\" [ngClass]=\"column.badgeClass\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </span>\n\n <a *ngIf=\"column.type === 'LINK'\" [pTooltip]=\"column.tooltip\" [escape]=\"false\" (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </a>\n\n <ng-template #columnValueTemplate>\n <span *ngFor=\"let value of getSplittedString(column)\">\n <span [ngClass]=\"{ 'sds-empty-value': value.isUninformed }\">{{value.value}}</span>\n <span>{{value.separator}}</span>\n </span>\n </ng-template>\n\n </div>\n\n <ng-template #tokensTemplate>\n <s-token-list\n [tokens]=\"column.columnValue\"\n [hidePointerEvents]=\"true\"\n >\n </s-token-list>\n </ng-template>\n\n </td>\n</ng-template>\n",
|
|
3627
3865
|
selector: "s-table-columns",
|
|
3628
|
-
styles: ["
|
|
3866
|
+
styles: [":host{display:none}"]
|
|
3629
3867
|
}),
|
|
3630
3868
|
__param(2, Inject("hostProjectConfigs"))
|
|
3631
3869
|
], TableColumnsComponent);
|
|
@@ -3798,6 +4036,9 @@ var BaseFieldComponent = /** @class */ (function () {
|
|
|
3798
4036
|
return BaseFieldComponent;
|
|
3799
4037
|
}());
|
|
3800
4038
|
|
|
4039
|
+
/**
|
|
4040
|
+
* @deprecated Should use bignumber instead
|
|
4041
|
+
*/
|
|
3801
4042
|
var CurrencyFieldComponent = /** @class */ (function (_super) {
|
|
3802
4043
|
__extends(CurrencyFieldComponent, _super);
|
|
3803
4044
|
function CurrencyFieldComponent() {
|
|
@@ -3853,6 +4094,9 @@ var LookupFieldComponent = /** @class */ (function () {
|
|
|
3853
4094
|
return LookupFieldComponent;
|
|
3854
4095
|
}());
|
|
3855
4096
|
|
|
4097
|
+
/**
|
|
4098
|
+
* @deprecated Should use bignumber instead
|
|
4099
|
+
*/
|
|
3856
4100
|
var NumberFieldComponent = /** @class */ (function (_super) {
|
|
3857
4101
|
__extends(NumberFieldComponent, _super);
|
|
3858
4102
|
function NumberFieldComponent() {
|
|
@@ -4176,6 +4420,67 @@ var StructureType;
|
|
|
4176
4420
|
StructureType["Section"] = "Section";
|
|
4177
4421
|
})(StructureType || (StructureType = {}));
|
|
4178
4422
|
|
|
4423
|
+
var BignumberFieldComponent = /** @class */ (function (_super) {
|
|
4424
|
+
__extends(BignumberFieldComponent, _super);
|
|
4425
|
+
function BignumberFieldComponent() {
|
|
4426
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
4427
|
+
_this.onInput = new EventEmitter();
|
|
4428
|
+
_this.onFocus = new EventEmitter();
|
|
4429
|
+
_this.onComplete = new EventEmitter();
|
|
4430
|
+
_this.ngUnsubscribe = new Subject();
|
|
4431
|
+
return _this;
|
|
4432
|
+
}
|
|
4433
|
+
BignumberFieldComponent.prototype.ngOnInit = function () {
|
|
4434
|
+
var _this = this;
|
|
4435
|
+
this.onFocus.pipe(takeUntil(this.ngUnsubscribe)).subscribe(function (event) {
|
|
4436
|
+
if (_this.field.onFocus)
|
|
4437
|
+
_this.field.onFocus(event);
|
|
4438
|
+
});
|
|
4439
|
+
this.onInput.pipe(takeUntil(this.ngUnsubscribe)).subscribe(function (event) {
|
|
4440
|
+
if (_this.field.onInput)
|
|
4441
|
+
_this.field.onInput(event);
|
|
4442
|
+
});
|
|
4443
|
+
this.onComplete.pipe(takeUntil(this.ngUnsubscribe)).subscribe(function (event) {
|
|
4444
|
+
if (_this.field.onComplete)
|
|
4445
|
+
_this.field.onComplete(event);
|
|
4446
|
+
});
|
|
4447
|
+
};
|
|
4448
|
+
BignumberFieldComponent.prototype.ngOnDestroy = function () {
|
|
4449
|
+
this.ngUnsubscribe.next();
|
|
4450
|
+
this.ngUnsubscribe.complete();
|
|
4451
|
+
};
|
|
4452
|
+
Object.defineProperty(BignumberFieldComponent.prototype, "fieldType", {
|
|
4453
|
+
get: function () {
|
|
4454
|
+
return FieldType;
|
|
4455
|
+
},
|
|
4456
|
+
enumerable: true,
|
|
4457
|
+
configurable: true
|
|
4458
|
+
});
|
|
4459
|
+
__decorate([
|
|
4460
|
+
Input()
|
|
4461
|
+
], BignumberFieldComponent.prototype, "field", void 0);
|
|
4462
|
+
__decorate([
|
|
4463
|
+
Input()
|
|
4464
|
+
], BignumberFieldComponent.prototype, "formControl", void 0);
|
|
4465
|
+
__decorate([
|
|
4466
|
+
Output()
|
|
4467
|
+
], BignumberFieldComponent.prototype, "onInput", void 0);
|
|
4468
|
+
__decorate([
|
|
4469
|
+
Output()
|
|
4470
|
+
], BignumberFieldComponent.prototype, "onFocus", void 0);
|
|
4471
|
+
__decorate([
|
|
4472
|
+
Output()
|
|
4473
|
+
], BignumberFieldComponent.prototype, "onComplete", void 0);
|
|
4474
|
+
BignumberFieldComponent = __decorate([
|
|
4475
|
+
Component({
|
|
4476
|
+
template: "<p-inputMask\n *ngIf=\"field.mask; else noMask\"\n type=\"text\"\n [inputId]=\"(field.id || field.name)\"\n [name]=\"field.name\"\n [mask]=\"isFunction(field.mask) ? field.mask() : field.mask\"\n [placeholder]=\"field.placeholder\"\n slotChar=\"_\"\n [pTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n styleClass=\"mousetrap\"\n (onBlur)=\"field.onBlur ? field.onBlur($event) : null\"\n (onFocus)=\"onFocus.next($event)\"\n (onComplete)=\"onComplete.next($event)\"\n (onInput)=\"onInput.next($event)\"\n [formControl]=\"formControl\"\n></p-inputMask>\n\n<ng-template #noMask>\n <ng-container>\n <div class=\"ui-inputgroup\">\n <ng-container *ngIf=\"field.leftAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.leftAddon.label\">{{field.leftAddon.label}}</span>\n <span *ngIf=\"!field.leftAddon.label\" [ngClass]=\"field.leftAddon.icon\"></span>\n </span>\n </ng-container>\n\n <input\n [id]=\"(field.id || field.name)\"\n type=\"text\"\n [name]=\"field.name\"\n sBignumberInput\n [precision]=\"isFunction(field.precision) ? trigger(field.precision) : field.precision\"\n [scale]=\"isFunction(field.scale) ? trigger(field.scale) : field.scale\"\n [decimalSeparator]=\"field.numberLocaleOptions.decimalSeparator\"\n [thousandsSeparator]=\"field.numberLocaleOptions.thousandsSeparator\"\n [alignTo]=\"field.alignTo\"\n [pTooltip]=\"field.tooltip\"\n tooltipPosition=\"top\"\n [placeholder]=\"field.placeholder\"\n [showDelay]=\"500\"\n pInputText\n [autocomplete]=\"field.browserAutocomplete ? 'on' : 'off'\"\n [ngClass]=\"'mousetrap'\"\n (blur)=\"field.onBlur ? field.onBlur($event) : null\"\n (focus)=\"onFocus.next($event)\"\n [formControl]=\"formControl\"\n />\n\n <ng-container *ngIf=\"field.rightAddon\">\n <span class=\"ui-inputgroup-addon\">\n <span *ngIf=\"field.rightAddon.label\">{{field.rightAddon.label}}</span>\n <span *ngIf=\"!field.rightAddon.label\" [ngClass]=\"field.rightAddon.icon\"></span>\n </span>\n </ng-container>\n </div>\n </ng-container>\n</ng-template>",
|
|
4477
|
+
encapsulation: ViewEncapsulation.None,
|
|
4478
|
+
styles: ["s-number-field.ng-dirty.ng-invalid .ui-inputtext{border-color:#c13018}s-number-field.ng-dirty.ng-invalid .ui-inputtext:hover{border-color:#e44328}"]
|
|
4479
|
+
})
|
|
4480
|
+
], BignumberFieldComponent);
|
|
4481
|
+
return BignumberFieldComponent;
|
|
4482
|
+
}(BaseFieldComponent));
|
|
4483
|
+
|
|
4179
4484
|
var DynamicForm = /** @class */ (function () {
|
|
4180
4485
|
function DynamicForm(_a) {
|
|
4181
4486
|
var group = _a.group, errorMessages = _a.errorMessages;
|
|
@@ -4240,6 +4545,8 @@ var DynamicField = /** @class */ (function (_super) {
|
|
|
4240
4545
|
case FieldType.Double:
|
|
4241
4546
|
case FieldType.Integer:
|
|
4242
4547
|
return NumberFieldComponent;
|
|
4548
|
+
case FieldType.Number:
|
|
4549
|
+
return BignumberFieldComponent;
|
|
4243
4550
|
case FieldType.Enum:
|
|
4244
4551
|
return SelectFieldComponent;
|
|
4245
4552
|
case FieldType.Lookup:
|
|
@@ -4414,6 +4721,7 @@ var DynamicFormModule = /** @class */ (function () {
|
|
|
4414
4721
|
InputMaskModule,
|
|
4415
4722
|
DropdownModule,
|
|
4416
4723
|
NumberInputModule,
|
|
4724
|
+
BignumberInputModule,
|
|
4417
4725
|
LocalizedNumberInputModule,
|
|
4418
4726
|
ControlErrorsModule,
|
|
4419
4727
|
LocaleModule,
|
|
@@ -4455,6 +4763,7 @@ var DynamicFormModule = /** @class */ (function () {
|
|
|
4455
4763
|
LookupComponent,
|
|
4456
4764
|
LookupFieldComponent,
|
|
4457
4765
|
NumberFieldComponent,
|
|
4766
|
+
BignumberFieldComponent,
|
|
4458
4767
|
RadioButtonComponent,
|
|
4459
4768
|
RowComponent,
|
|
4460
4769
|
SectionComponent,
|
|
@@ -4473,6 +4782,7 @@ var DynamicFormModule = /** @class */ (function () {
|
|
|
4473
4782
|
FileUploadComponent$1,
|
|
4474
4783
|
LookupFieldComponent,
|
|
4475
4784
|
NumberFieldComponent,
|
|
4785
|
+
BignumberFieldComponent,
|
|
4476
4786
|
RadioButtonComponent,
|
|
4477
4787
|
RowComponent,
|
|
4478
4788
|
SectionComponent,
|
|
@@ -6048,43 +6358,43 @@ var StatsCardComponent = /** @class */ (function () {
|
|
|
6048
6358
|
});
|
|
6049
6359
|
StatsCardComponent.prototype.updateDisplayValue = function () {
|
|
6050
6360
|
var _this = this;
|
|
6051
|
-
var previousRawValue =
|
|
6052
|
-
var rawValue =
|
|
6053
|
-
var
|
|
6054
|
-
var
|
|
6361
|
+
var previousRawValue = new BigNumber$1(this.previousValue.replace(/\D/g, ""));
|
|
6362
|
+
var rawValue = new BigNumber$1(this.value.replace(/\D/g, ""));
|
|
6363
|
+
var eachAnimationDuration = new BigNumber$1(this.ANIMATION_DURATION_MS).dividedBy(new BigNumber$1(this.STEP_DURATION_MS));
|
|
6364
|
+
var incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(eachAnimationDuration).dp(0, 7);
|
|
6365
|
+
var incremental = previousRawValue.isLessThan(rawValue);
|
|
6055
6366
|
clearInterval(this.intervalId);
|
|
6056
6367
|
this.displayValue = this.replaceNumericPositions(this.value);
|
|
6057
6368
|
var counter = previousRawValue;
|
|
6058
6369
|
this.intervalId = setInterval(function () {
|
|
6059
|
-
if (incremental && counter
|
|
6060
|
-
_this.displayValue = _this.replaceNumericPositions(_this.displayValue,
|
|
6061
|
-
counter
|
|
6370
|
+
if (incremental && counter.isLessThan(rawValue)) {
|
|
6371
|
+
_this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
|
|
6372
|
+
counter = counter.plus(incrementValue);
|
|
6062
6373
|
}
|
|
6063
|
-
else if (incremental) {
|
|
6064
|
-
_this.displayValue = _this.
|
|
6065
|
-
|
|
6374
|
+
else if (!incremental && counter.isGreaterThan(rawValue)) {
|
|
6375
|
+
_this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
|
|
6376
|
+
counter = counter.minus(incrementValue);
|
|
6066
6377
|
}
|
|
6067
|
-
else
|
|
6068
|
-
_this.displayValue = _this.replaceNumericPositions(_this.displayValue, String(counter));
|
|
6069
|
-
counter -= incrementValue;
|
|
6070
|
-
}
|
|
6071
|
-
else if (!incremental) {
|
|
6378
|
+
else {
|
|
6072
6379
|
_this.displayValue = _this.value;
|
|
6073
6380
|
clearInterval(_this.intervalId);
|
|
6074
6381
|
}
|
|
6075
6382
|
}, this.STEP_DURATION_MS);
|
|
6076
6383
|
};
|
|
6077
6384
|
StatsCardComponent.prototype.replaceNumericPositions = function (value, newValue) {
|
|
6078
|
-
if (newValue === void 0) { newValue = ""; }
|
|
6079
6385
|
var rawValue = value.replace(/[^\d]/g, "");
|
|
6080
|
-
var newValueString = newValue.
|
|
6386
|
+
var newValueString = newValue ? newValue.toString() : "";
|
|
6387
|
+
var formattedNewValue = newValueString
|
|
6388
|
+
.toString()
|
|
6389
|
+
.replace(/\D/g, "")
|
|
6390
|
+
.padStart(rawValue.length, "0");
|
|
6081
6391
|
var newValueIndex = 0;
|
|
6082
6392
|
return value
|
|
6083
6393
|
.split("")
|
|
6084
6394
|
.map(function (char) {
|
|
6085
6395
|
var number = Number(char);
|
|
6086
6396
|
if (number || char === "0")
|
|
6087
|
-
return
|
|
6397
|
+
return formattedNewValue[newValueIndex++];
|
|
6088
6398
|
return char;
|
|
6089
6399
|
})
|
|
6090
6400
|
.join("");
|
|
@@ -6668,5 +6978,5 @@ var AngularComponentsModule = /** @class */ (function () {
|
|
|
6668
6978
|
* Generated bundle index. Do not edit.
|
|
6669
6979
|
*/
|
|
6670
6980
|
|
|
6671
|
-
export { AngularComponentsModule, AutocompleteField, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TextAreaField, TextField, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa,
|
|
6981
|
+
export { AngularComponentsModule, AutocompleteField, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TextAreaField, TextField, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, DecimalField as ɵba, StructureModule as ɵbb, HeaderComponent as ɵbc, FooterComponent as ɵbd, InfoSignComponent as ɵbe, NumberLocaleOptions as ɵbf, ThumbnailService as ɵbg, InfiniteScrollModule as ɵbh, InfiniteScrollDirective as ɵbi, LocalizedBignumberImpurePipe as ɵc, TokenListModule as ɵd, TableColumnsComponent as ɵe, InfoSignModule as ɵf, AutocompleteFieldComponent as ɵg, BooleanFieldComponent as ɵh, CalendarFieldComponent as ɵi, ChipsFieldComponent as ɵj, CurrencyFieldComponent as ɵk, BaseFieldComponent as ɵl, DynamicFieldComponent as ɵm, DynamicFormDirective as ɵn, FieldsetComponent as ɵo, FileUploadComponent$1 as ɵp, LookupFieldComponent as ɵq, NumberFieldComponent as ɵr, BignumberFieldComponent as ɵs, RadioButtonComponent as ɵt, RowComponent as ɵu, SectionComponent as ɵv, SelectFieldComponent as ɵw, TextAreaFieldComponent as ɵx, TextFieldComponent as ɵy };
|
|
6672
6982
|
//# sourceMappingURL=seniorsistemas-angular-components.js.map
|