@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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('primeng/breadcrumb'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('primeng/tieredmenu'), require('primeng/tooltip'), require('primeng/dom'), require('primeng/calendar'), require('@angular/animations'), require('@angular/forms'), require('@angular/common/http'), require('angular2-hotkeys'), require('primeng/autocomplete'), require('primeng/dialog'), require('primeng/table'), require('@seniorsistemas/senior-platform-data'), require('moment'), require('ngx-cookie-service'), require('ng2-currency-mask'), require('primeng/button'), require('primeng/checkbox'), require('primeng/chips'), require('primeng/dropdown'), require('primeng/fieldset'), require('primeng/inputmask'), require('primeng/inputtext'), require('primeng/inputtextarea'), require('primeng/keyfilter'), require('primeng/multiselect'), require('primeng/panel'), require('primeng/radiobutton'), require('@angular/platform-browser'), require('primeng/progressbar'), require('@ngx-translate/core'), require('cropperjs'), require('element-resize-detector'), require('@angular/cdk/a11y'), require('primeng/scrollpanel'), require('primeng/sidebar')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@seniorsistemas/angular-components', ['exports', '@angular/core', '@angular/common', 'primeng/breadcrumb', '@angular/router', 'rxjs', 'rxjs/operators', 'primeng/tieredmenu', 'primeng/tooltip', 'primeng/dom', 'primeng/calendar', '@angular/animations', '@angular/forms', '@angular/common/http', 'angular2-hotkeys', 'primeng/autocomplete', 'primeng/dialog', 'primeng/table', '@seniorsistemas/senior-platform-data', 'moment', 'ngx-cookie-service', 'ng2-currency-mask', 'primeng/button', 'primeng/checkbox', 'primeng/chips', 'primeng/dropdown', 'primeng/fieldset', 'primeng/inputmask', 'primeng/inputtext', 'primeng/inputtextarea', 'primeng/keyfilter', 'primeng/multiselect', 'primeng/panel', 'primeng/radiobutton', '@angular/platform-browser', 'primeng/progressbar', '@ngx-translate/core', 'cropperjs', 'element-resize-detector', '@angular/cdk/a11y', 'primeng/scrollpanel', 'primeng/sidebar'], factory) :
|
|
4
|
-
(global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['angular-components'] = {}), global.ng.core, global.ng.common, global.breadcrumb, global.ng.router, global.rxjs, global.rxjs.operators, global.tieredmenu, global.tooltip, global.dom, global.calendar, global.ng.animations, global.ng.forms, global.ng.common.http, global.angular2Hotkeys, global.autocomplete, global.dialog, global.table, global.seniorPlatformData, global.moment_, global.ngxCookieService, global.ng2CurrencyMask, global.button, global.checkbox, global.chips, global.dropdown, global.fieldset, global.inputmask, global.inputtext, global.inputtextarea, global.keyfilter, global.multiselect, global.panel, global.radiobutton, global.ng.platformBrowser, global.progressbar, global.core$1, global.Cropper, global.elementResizeDetectorMaker_, global.ng.cdk.a11y, global.scrollpanel, global.sidebar));
|
|
5
|
-
}(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, tieredmenu, tooltip, dom, calendar, animations, forms, http, angular2Hotkeys, autocomplete, dialog, table, seniorPlatformData, moment_, ngxCookieService, ng2CurrencyMask, button, checkbox, chips, dropdown, fieldset, inputmask, inputtext, inputtextarea, keyfilter, multiselect, panel, radiobutton, platformBrowser, progressbar, core$1, Cropper, elementResizeDetectorMaker_, a11y, scrollpanel, sidebar) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('primeng/breadcrumb'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('primeng/tieredmenu'), require('primeng/tooltip'), require('primeng/dom'), require('primeng/calendar'), require('@angular/animations'), require('@angular/forms'), require('@angular/common/http'), require('angular2-hotkeys'), require('bignumber.js'), require('primeng/autocomplete'), require('primeng/dialog'), require('primeng/table'), require('@seniorsistemas/ng2-currency-mask'), require('@seniorsistemas/senior-platform-data'), require('moment'), require('ngx-cookie-service'), require('ng2-currency-mask'), require('primeng/button'), require('primeng/checkbox'), require('primeng/chips'), require('primeng/dropdown'), require('primeng/fieldset'), require('primeng/inputmask'), require('primeng/inputtext'), require('primeng/inputtextarea'), require('primeng/keyfilter'), require('primeng/multiselect'), require('primeng/panel'), require('primeng/radiobutton'), require('@angular/platform-browser'), require('primeng/progressbar'), require('@ngx-translate/core'), require('cropperjs'), require('element-resize-detector'), require('@angular/cdk/a11y'), require('primeng/scrollpanel'), require('primeng/sidebar')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@seniorsistemas/angular-components', ['exports', '@angular/core', '@angular/common', 'primeng/breadcrumb', '@angular/router', 'rxjs', 'rxjs/operators', 'primeng/tieredmenu', 'primeng/tooltip', 'primeng/dom', 'primeng/calendar', '@angular/animations', '@angular/forms', '@angular/common/http', 'angular2-hotkeys', 'bignumber.js', 'primeng/autocomplete', 'primeng/dialog', 'primeng/table', '@seniorsistemas/ng2-currency-mask', '@seniorsistemas/senior-platform-data', 'moment', 'ngx-cookie-service', 'ng2-currency-mask', 'primeng/button', 'primeng/checkbox', 'primeng/chips', 'primeng/dropdown', 'primeng/fieldset', 'primeng/inputmask', 'primeng/inputtext', 'primeng/inputtextarea', 'primeng/keyfilter', 'primeng/multiselect', 'primeng/panel', 'primeng/radiobutton', '@angular/platform-browser', 'primeng/progressbar', '@ngx-translate/core', 'cropperjs', 'element-resize-detector', '@angular/cdk/a11y', 'primeng/scrollpanel', 'primeng/sidebar'], factory) :
|
|
4
|
+
(global = global || self, factory((global.seniorsistemas = global.seniorsistemas || {}, global.seniorsistemas['angular-components'] = {}), global.ng.core, global.ng.common, global.breadcrumb, global.ng.router, global.rxjs, global.rxjs.operators, global.tieredmenu, global.tooltip, global.dom, global.calendar, global.ng.animations, global.ng.forms, global.ng.common.http, global.angular2Hotkeys, global.BigNumber, global.autocomplete, global.dialog, global.table, global.ng2CurrencyMask, global.seniorPlatformData, global.moment_, global.ngxCookieService, global.ng2CurrencyMask$1, global.button, global.checkbox, global.chips, global.dropdown, global.fieldset, global.inputmask, global.inputtext, global.inputtextarea, global.keyfilter, global.multiselect, global.panel, global.radiobutton, global.ng.platformBrowser, global.progressbar, global.core$1, global.Cropper, global.elementResizeDetectorMaker_, global.ng.cdk.a11y, global.scrollpanel, global.sidebar));
|
|
5
|
+
}(this, (function (exports, core, common, breadcrumb, router, rxjs, operators, tieredmenu, tooltip, dom, calendar, animations, forms, http, angular2Hotkeys, BigNumber, autocomplete, dialog, table, ng2CurrencyMask, seniorPlatformData, moment_, ngxCookieService, ng2CurrencyMask$1, button, checkbox, chips, dropdown, fieldset, inputmask, inputtext, inputtextarea, keyfilter, multiselect, panel, radiobutton, platformBrowser, progressbar, core$1, Cropper, elementResizeDetectorMaker_, a11y, scrollpanel, sidebar) { 'use strict';
|
|
6
6
|
|
|
7
|
+
var BigNumber__default = 'default' in BigNumber ? BigNumber['default'] : BigNumber;
|
|
7
8
|
Cropper = Cropper && Object.prototype.hasOwnProperty.call(Cropper, 'default') ? Cropper['default'] : Cropper;
|
|
8
9
|
|
|
9
10
|
/*! *****************************************************************************
|
|
@@ -1175,16 +1176,26 @@
|
|
|
1175
1176
|
FieldType["Chips"] = "Chips";
|
|
1176
1177
|
FieldType["Date"] = "Date";
|
|
1177
1178
|
FieldType["DateTime"] = "DateTime";
|
|
1179
|
+
/**
|
|
1180
|
+
* @deprecated Should use 'Number' instead
|
|
1181
|
+
*/
|
|
1178
1182
|
FieldType["Double"] = "Double";
|
|
1179
1183
|
FieldType["Enum"] = "Enum";
|
|
1180
1184
|
FieldType["Blob"] = "Blob";
|
|
1185
|
+
/**
|
|
1186
|
+
* @deprecated Should use 'Number' instead
|
|
1187
|
+
*/
|
|
1181
1188
|
FieldType["Integer"] = "Integer";
|
|
1182
1189
|
FieldType["Lookup"] = "Lookup";
|
|
1190
|
+
/**
|
|
1191
|
+
* @deprecated Should use 'Number' instead
|
|
1192
|
+
*/
|
|
1183
1193
|
FieldType["Money"] = "Money";
|
|
1184
1194
|
FieldType["Radio"] = "Radio";
|
|
1185
1195
|
FieldType["String"] = "String";
|
|
1186
1196
|
FieldType["Text"] = "Text";
|
|
1187
1197
|
FieldType["Time"] = "Time";
|
|
1198
|
+
FieldType["Number"] = "Number";
|
|
1188
1199
|
})(exports.FieldType || (exports.FieldType = {}));
|
|
1189
1200
|
|
|
1190
1201
|
var FieldSize = /** @class */ (function () {
|
|
@@ -1230,48 +1241,6 @@
|
|
|
1230
1241
|
return AutocompleteField;
|
|
1231
1242
|
}(Field));
|
|
1232
1243
|
|
|
1233
|
-
var BlobField = /** @class */ (function (_super) {
|
|
1234
|
-
__extends(BlobField, _super);
|
|
1235
|
-
function BlobField(config) {
|
|
1236
|
-
var _this = _super.call(this, config) || this;
|
|
1237
|
-
_this.accept = config.accept;
|
|
1238
|
-
_this.files = config.files || [];
|
|
1239
|
-
_this.chooseLabel = config.chooseLabel;
|
|
1240
|
-
_this.removeLabel = config.removeLabel;
|
|
1241
|
-
_this.cancelLabel = config.cancelLabel;
|
|
1242
|
-
_this.successTooltip = config.successTooltip;
|
|
1243
|
-
_this.multiple = config.multiple;
|
|
1244
|
-
_this.onUploadFile = config.onUploadFile;
|
|
1245
|
-
_this.onRemoveFile = config.onRemoveFile;
|
|
1246
|
-
_this.onCancelUpload = config.onCancelUpload;
|
|
1247
|
-
_this.onDownloadFile = config.onDownloadFile;
|
|
1248
|
-
return _this;
|
|
1249
|
-
}
|
|
1250
|
-
return BlobField;
|
|
1251
|
-
}(Field));
|
|
1252
|
-
|
|
1253
|
-
var BooleanOptionsLabel = /** @class */ (function () {
|
|
1254
|
-
function BooleanOptionsLabel(config) {
|
|
1255
|
-
this.true = config.true;
|
|
1256
|
-
this.false = config.false;
|
|
1257
|
-
this.empty = config.empty;
|
|
1258
|
-
}
|
|
1259
|
-
return BooleanOptionsLabel;
|
|
1260
|
-
}());
|
|
1261
|
-
var BooleanField = /** @class */ (function (_super) {
|
|
1262
|
-
__extends(BooleanField, _super);
|
|
1263
|
-
function BooleanField(config) {
|
|
1264
|
-
var _this = _super.call(this, config) || this;
|
|
1265
|
-
_this.verticalAlignment = config.verticalAlignment;
|
|
1266
|
-
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
1267
|
-
_this.onBlur = config.onBlur;
|
|
1268
|
-
_this.onFocus = config.onFocus;
|
|
1269
|
-
_this.onClick = config.onClick;
|
|
1270
|
-
return _this;
|
|
1271
|
-
}
|
|
1272
|
-
return BooleanField;
|
|
1273
|
-
}(Field));
|
|
1274
|
-
|
|
1275
1244
|
var CalendarLocaleOptions = /** @class */ (function () {
|
|
1276
1245
|
function CalendarLocaleOptions(config) {
|
|
1277
1246
|
var _this = this;
|
|
@@ -1384,6 +1353,54 @@
|
|
|
1384
1353
|
return LocaleService;
|
|
1385
1354
|
}());
|
|
1386
1355
|
|
|
1356
|
+
var LocalizedBignumberPipe = /** @class */ (function () {
|
|
1357
|
+
function LocalizedBignumberPipe(localeService) {
|
|
1358
|
+
this.localeService = localeService;
|
|
1359
|
+
}
|
|
1360
|
+
LocalizedBignumberPipe.prototype.transform = function (value, options) {
|
|
1361
|
+
return value !== undefined && value !== null ? this.applyMask(value, options) : rxjs.of(value);
|
|
1362
|
+
};
|
|
1363
|
+
LocalizedBignumberPipe.prototype.applyMask = function (value, options) {
|
|
1364
|
+
return this.localeService.get().pipe(operators.map(function (localeConfig) {
|
|
1365
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
1366
|
+
var configs = {
|
|
1367
|
+
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$",
|
|
1368
|
+
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 : ".",
|
|
1369
|
+
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 : ",",
|
|
1370
|
+
scale: (_k = options === null || options === void 0 ? void 0 : options.scale) !== null && _k !== void 0 ? _k : 2
|
|
1371
|
+
};
|
|
1372
|
+
var isNumber = !(new BigNumber__default(value).isNaN());
|
|
1373
|
+
return ng2CurrencyMask.applyMask(value, configs, isNumber);
|
|
1374
|
+
}));
|
|
1375
|
+
};
|
|
1376
|
+
LocalizedBignumberPipe.ctorParameters = function () { return [
|
|
1377
|
+
{ type: LocaleService }
|
|
1378
|
+
]; };
|
|
1379
|
+
LocalizedBignumberPipe = __decorate([
|
|
1380
|
+
core.Pipe({
|
|
1381
|
+
name: "localizedBignumber",
|
|
1382
|
+
})
|
|
1383
|
+
], LocalizedBignumberPipe);
|
|
1384
|
+
return LocalizedBignumberPipe;
|
|
1385
|
+
}());
|
|
1386
|
+
|
|
1387
|
+
var LocalizedBignumberImpurePipe = /** @class */ (function (_super) {
|
|
1388
|
+
__extends(LocalizedBignumberImpurePipe, _super);
|
|
1389
|
+
function LocalizedBignumberImpurePipe() {
|
|
1390
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1391
|
+
}
|
|
1392
|
+
LocalizedBignumberImpurePipe.prototype.transform = function (value, options) {
|
|
1393
|
+
return _super.prototype.transform.call(this, value, options);
|
|
1394
|
+
};
|
|
1395
|
+
LocalizedBignumberImpurePipe = __decorate([
|
|
1396
|
+
core.Pipe({
|
|
1397
|
+
name: "localizedBignumberImpure",
|
|
1398
|
+
pure: false,
|
|
1399
|
+
})
|
|
1400
|
+
], LocalizedBignumberImpurePipe);
|
|
1401
|
+
return LocalizedBignumberImpurePipe;
|
|
1402
|
+
}(LocalizedBignumberPipe));
|
|
1403
|
+
|
|
1387
1404
|
var LocalizedCurrencyPipeOptions = /** @class */ (function (_super) {
|
|
1388
1405
|
__extends(LocalizedCurrencyPipeOptions, _super);
|
|
1389
1406
|
function LocalizedCurrencyPipeOptions(config) {
|
|
@@ -1394,6 +1411,9 @@
|
|
|
1394
1411
|
}
|
|
1395
1412
|
return LocalizedCurrencyPipeOptions;
|
|
1396
1413
|
}(NumberLocaleOptions));
|
|
1414
|
+
/**
|
|
1415
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
1416
|
+
*/
|
|
1397
1417
|
var LocalizedCurrencyPipe = /** @class */ (function () {
|
|
1398
1418
|
function LocalizedCurrencyPipe(localeService) {
|
|
1399
1419
|
this.localeService = localeService;
|
|
@@ -1432,6 +1452,9 @@
|
|
|
1432
1452
|
return LocalizedCurrencyPipe;
|
|
1433
1453
|
}());
|
|
1434
1454
|
|
|
1455
|
+
/**
|
|
1456
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
1457
|
+
*/
|
|
1435
1458
|
var LocalizedCurrencyImpurePipe = /** @class */ (function (_super) {
|
|
1436
1459
|
__extends(LocalizedCurrencyImpurePipe, _super);
|
|
1437
1460
|
function LocalizedCurrencyImpurePipe() {
|
|
@@ -1484,6 +1507,9 @@
|
|
|
1484
1507
|
return LocalizedDateImpurePipe;
|
|
1485
1508
|
}(LocalizedDatePipe));
|
|
1486
1509
|
|
|
1510
|
+
/**
|
|
1511
|
+
* @deprecated Should use localizedBignumberPipe instead
|
|
1512
|
+
*/
|
|
1487
1513
|
var LocalizedNumberPipe = /** @class */ (function () {
|
|
1488
1514
|
function LocalizedNumberPipe(localeService) {
|
|
1489
1515
|
this.localeService = localeService;
|
|
@@ -1557,6 +1583,8 @@
|
|
|
1557
1583
|
LocalizedCurrencyImpurePipe,
|
|
1558
1584
|
LocalizedDateImpurePipe,
|
|
1559
1585
|
LocalizedTimeImpurePipe,
|
|
1586
|
+
LocalizedBignumberPipe,
|
|
1587
|
+
LocalizedBignumberImpurePipe
|
|
1560
1588
|
],
|
|
1561
1589
|
};
|
|
1562
1590
|
};
|
|
@@ -1577,6 +1605,8 @@
|
|
|
1577
1605
|
LocalizedCurrencyImpurePipe,
|
|
1578
1606
|
LocalizedDateImpurePipe,
|
|
1579
1607
|
LocalizedTimeImpurePipe,
|
|
1608
|
+
LocalizedBignumberPipe,
|
|
1609
|
+
LocalizedBignumberImpurePipe
|
|
1580
1610
|
],
|
|
1581
1611
|
declarations: [
|
|
1582
1612
|
LocalizedCurrencyPipe,
|
|
@@ -1586,12 +1616,78 @@
|
|
|
1586
1616
|
LocalizedCurrencyImpurePipe,
|
|
1587
1617
|
LocalizedDateImpurePipe,
|
|
1588
1618
|
LocalizedTimeImpurePipe,
|
|
1619
|
+
LocalizedBignumberPipe,
|
|
1620
|
+
LocalizedBignumberImpurePipe
|
|
1589
1621
|
],
|
|
1590
1622
|
})
|
|
1591
1623
|
], LocaleModule);
|
|
1592
1624
|
return LocaleModule;
|
|
1593
1625
|
}());
|
|
1594
1626
|
|
|
1627
|
+
var BignumberField = /** @class */ (function (_super) {
|
|
1628
|
+
__extends(BignumberField, _super);
|
|
1629
|
+
function BignumberField(config) {
|
|
1630
|
+
var _a;
|
|
1631
|
+
var _this = _super.call(this, config) || this;
|
|
1632
|
+
_this.numberLocaleOptions = config.numberLocaleOptions || DEFAULT_NUMBER_LOCALE_OPTIONS;
|
|
1633
|
+
_this.browserAutocomplete = config.browserAutocomplete;
|
|
1634
|
+
_this.precision = config.precision;
|
|
1635
|
+
_this.scale = (_a = config.scale) !== null && _a !== void 0 ? _a : 2;
|
|
1636
|
+
_this.alignTo = _this.scale ? ng2CurrencyMask.AlignmentOptions.RIGHT : ng2CurrencyMask.AlignmentOptions.LEFT;
|
|
1637
|
+
_this.mask = config.mask;
|
|
1638
|
+
_this.leftAddon = config.leftAddon;
|
|
1639
|
+
_this.rightAddon = config.rightAddon;
|
|
1640
|
+
_this.onBlur = config.onBlur;
|
|
1641
|
+
_this.onFocus = config.onFocus;
|
|
1642
|
+
_this.onComplete = config.onComplete;
|
|
1643
|
+
_this.onInput = config.onInput;
|
|
1644
|
+
return _this;
|
|
1645
|
+
}
|
|
1646
|
+
return BignumberField;
|
|
1647
|
+
}(Field));
|
|
1648
|
+
|
|
1649
|
+
var BlobField = /** @class */ (function (_super) {
|
|
1650
|
+
__extends(BlobField, _super);
|
|
1651
|
+
function BlobField(config) {
|
|
1652
|
+
var _this = _super.call(this, config) || this;
|
|
1653
|
+
_this.accept = config.accept;
|
|
1654
|
+
_this.files = config.files || [];
|
|
1655
|
+
_this.chooseLabel = config.chooseLabel;
|
|
1656
|
+
_this.removeLabel = config.removeLabel;
|
|
1657
|
+
_this.cancelLabel = config.cancelLabel;
|
|
1658
|
+
_this.successTooltip = config.successTooltip;
|
|
1659
|
+
_this.multiple = config.multiple;
|
|
1660
|
+
_this.onUploadFile = config.onUploadFile;
|
|
1661
|
+
_this.onRemoveFile = config.onRemoveFile;
|
|
1662
|
+
_this.onCancelUpload = config.onCancelUpload;
|
|
1663
|
+
_this.onDownloadFile = config.onDownloadFile;
|
|
1664
|
+
return _this;
|
|
1665
|
+
}
|
|
1666
|
+
return BlobField;
|
|
1667
|
+
}(Field));
|
|
1668
|
+
|
|
1669
|
+
var BooleanOptionsLabel = /** @class */ (function () {
|
|
1670
|
+
function BooleanOptionsLabel(config) {
|
|
1671
|
+
this.true = config.true;
|
|
1672
|
+
this.false = config.false;
|
|
1673
|
+
this.empty = config.empty;
|
|
1674
|
+
}
|
|
1675
|
+
return BooleanOptionsLabel;
|
|
1676
|
+
}());
|
|
1677
|
+
var BooleanField = /** @class */ (function (_super) {
|
|
1678
|
+
__extends(BooleanField, _super);
|
|
1679
|
+
function BooleanField(config) {
|
|
1680
|
+
var _this = _super.call(this, config) || this;
|
|
1681
|
+
_this.verticalAlignment = config.verticalAlignment;
|
|
1682
|
+
_this.optionsLabel = new BooleanOptionsLabel(config.optionsLabel);
|
|
1683
|
+
_this.onBlur = config.onBlur;
|
|
1684
|
+
_this.onFocus = config.onFocus;
|
|
1685
|
+
_this.onClick = config.onClick;
|
|
1686
|
+
return _this;
|
|
1687
|
+
}
|
|
1688
|
+
return BooleanField;
|
|
1689
|
+
}(Field));
|
|
1690
|
+
|
|
1595
1691
|
var CalendarField = /** @class */ (function (_super) {
|
|
1596
1692
|
__extends(CalendarField, _super);
|
|
1597
1693
|
function CalendarField(config) {
|
|
@@ -1632,11 +1728,17 @@
|
|
|
1632
1728
|
return ChipsField;
|
|
1633
1729
|
}(Field));
|
|
1634
1730
|
|
|
1731
|
+
/**
|
|
1732
|
+
* @deprecated Should use 'AlignmentOptions' from @seniorsistemas/ng2-currency-mask instead
|
|
1733
|
+
*/
|
|
1635
1734
|
|
|
1636
1735
|
(function (NumberAlignmentOption) {
|
|
1637
1736
|
NumberAlignmentOption["RIGHT"] = "right";
|
|
1638
1737
|
NumberAlignmentOption["LEFT"] = "left";
|
|
1639
1738
|
})(exports.NumberAlignmentOption || (exports.NumberAlignmentOption = {}));
|
|
1739
|
+
/**
|
|
1740
|
+
* @deprecated Should use BigNumberInput directive instead
|
|
1741
|
+
*/
|
|
1640
1742
|
var NumberInputDirective = /** @class */ (function (_super) {
|
|
1641
1743
|
__extends(NumberInputDirective, _super);
|
|
1642
1744
|
function NumberInputDirective() {
|
|
@@ -1748,8 +1850,11 @@
|
|
|
1748
1850
|
})
|
|
1749
1851
|
], NumberInputDirective);
|
|
1750
1852
|
return NumberInputDirective;
|
|
1751
|
-
}(ng2CurrencyMask.CurrencyMaskDirective));
|
|
1853
|
+
}(ng2CurrencyMask$1.CurrencyMaskDirective));
|
|
1752
1854
|
|
|
1855
|
+
/**
|
|
1856
|
+
* @deprecated Should use 'BignumberInputModule' instead
|
|
1857
|
+
*/
|
|
1753
1858
|
var NumberInputModule = /** @class */ (function () {
|
|
1754
1859
|
function NumberInputModule() {
|
|
1755
1860
|
}
|
|
@@ -1763,6 +1868,9 @@
|
|
|
1763
1868
|
return NumberInputModule;
|
|
1764
1869
|
}());
|
|
1765
1870
|
|
|
1871
|
+
/**
|
|
1872
|
+
* @deprecated Should use BignumberField instead
|
|
1873
|
+
*/
|
|
1766
1874
|
var NumberField = /** @class */ (function (_super) {
|
|
1767
1875
|
__extends(NumberField, _super);
|
|
1768
1876
|
function NumberField(config) {
|
|
@@ -1783,6 +1891,9 @@
|
|
|
1783
1891
|
return NumberField;
|
|
1784
1892
|
}(Field));
|
|
1785
1893
|
|
|
1894
|
+
/**
|
|
1895
|
+
* @deprecated Should use BignumberField instead
|
|
1896
|
+
*/
|
|
1786
1897
|
var DecimalField = /** @class */ (function (_super) {
|
|
1787
1898
|
__extends(DecimalField, _super);
|
|
1788
1899
|
function DecimalField(config) {
|
|
@@ -1795,6 +1906,9 @@
|
|
|
1795
1906
|
return DecimalField;
|
|
1796
1907
|
}(NumberField));
|
|
1797
1908
|
|
|
1909
|
+
/**
|
|
1910
|
+
* @deprecated Should use BignumberField instead
|
|
1911
|
+
*/
|
|
1798
1912
|
var CurrencyField = /** @class */ (function (_super) {
|
|
1799
1913
|
__extends(CurrencyField, _super);
|
|
1800
1914
|
function CurrencyField(config) {
|
|
@@ -1948,6 +2062,8 @@
|
|
|
1948
2062
|
return new NumberField(config);
|
|
1949
2063
|
case exports.FieldType.Double:
|
|
1950
2064
|
return new DecimalField(config);
|
|
2065
|
+
case exports.FieldType.Number:
|
|
2066
|
+
return new BignumberField(config);
|
|
1951
2067
|
case exports.FieldType.String:
|
|
1952
2068
|
case exports.FieldType.Binary:
|
|
1953
2069
|
return new TextField(config);
|
|
@@ -2160,7 +2276,7 @@
|
|
|
2160
2276
|
return this.emptyFieldLabel;
|
|
2161
2277
|
};
|
|
2162
2278
|
LookupComponent.prototype.isNumber = function (obj, path) {
|
|
2163
|
-
return
|
|
2279
|
+
return !(new BigNumber__default(this.getFieldValue(obj, path)).isNaN());
|
|
2164
2280
|
};
|
|
2165
2281
|
LookupComponent.prototype.setHotkeys = function () {
|
|
2166
2282
|
var _this = this;
|
|
@@ -2202,6 +2318,15 @@
|
|
|
2202
2318
|
LookupComponent.prototype.isFunction = function (value) {
|
|
2203
2319
|
return value instanceof Function;
|
|
2204
2320
|
};
|
|
2321
|
+
LookupComponent.prototype.getNumberMaskConfig = function (col) {
|
|
2322
|
+
var _a, _b, _c;
|
|
2323
|
+
return {
|
|
2324
|
+
scale: this.getScale(col.scale),
|
|
2325
|
+
decimalSeparator: (_a = col.numberLocaleOptions) === null || _a === void 0 ? void 0 : _a.decimalSeparator,
|
|
2326
|
+
thousandsSeparator: (_b = col.numberLocaleOptions) === null || _b === void 0 ? void 0 : _b.thousandsSeparator,
|
|
2327
|
+
prefix: (_c = col.numberLocaleOptions) === null || _c === void 0 ? void 0 : _c.currencySymbol
|
|
2328
|
+
};
|
|
2329
|
+
};
|
|
2205
2330
|
var LookupComponent_1;
|
|
2206
2331
|
LookupComponent.nextId = 0;
|
|
2207
2332
|
LookupComponent.ctorParameters = function () { return [
|
|
@@ -2336,7 +2461,7 @@
|
|
|
2336
2461
|
LookupComponent = LookupComponent_1 = __decorate([
|
|
2337
2462
|
core.Component({
|
|
2338
2463
|
selector: "s-lookup",
|
|
2339
|
-
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",
|
|
2464
|
+
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",
|
|
2340
2465
|
providers: [
|
|
2341
2466
|
{
|
|
2342
2467
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -2392,6 +2517,7 @@
|
|
|
2392
2517
|
DynamicType["String"] = "String";
|
|
2393
2518
|
DynamicType["Text"] = "Text";
|
|
2394
2519
|
DynamicType["Time"] = "Time";
|
|
2520
|
+
DynamicType["Number"] = "Number";
|
|
2395
2521
|
})(exports.DynamicType || (exports.DynamicType = {}));
|
|
2396
2522
|
|
|
2397
2523
|
var Grid = /** @class */ (function () {
|
|
@@ -2459,6 +2585,8 @@
|
|
|
2459
2585
|
return new Fieldset(config);
|
|
2460
2586
|
case exports.DynamicType.Integer:
|
|
2461
2587
|
return new NumberField(config);
|
|
2588
|
+
case exports.DynamicType.Number:
|
|
2589
|
+
return new BignumberField(config);
|
|
2462
2590
|
case exports.DynamicType.Lookup:
|
|
2463
2591
|
return new LookupField(config);
|
|
2464
2592
|
case exports.DynamicType.Money:
|
|
@@ -3233,6 +3361,115 @@
|
|
|
3233
3361
|
return MaskFormatterModule;
|
|
3234
3362
|
}());
|
|
3235
3363
|
|
|
3364
|
+
var BignumberInputDirective = /** @class */ (function (_super) {
|
|
3365
|
+
__extends(BignumberInputDirective, _super);
|
|
3366
|
+
function BignumberInputDirective() {
|
|
3367
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
3368
|
+
_this.precision = 15;
|
|
3369
|
+
_this.scale = 0;
|
|
3370
|
+
_this.decimalSeparator = ",";
|
|
3371
|
+
_this.thousandsSeparator = ".";
|
|
3372
|
+
_this.alignTo = ng2CurrencyMask.AlignmentOptions.LEFT;
|
|
3373
|
+
_this.allowNegative = true;
|
|
3374
|
+
return _this;
|
|
3375
|
+
}
|
|
3376
|
+
BignumberInputDirective_1 = BignumberInputDirective;
|
|
3377
|
+
BignumberInputDirective.prototype.ngOnInit = function () {
|
|
3378
|
+
this.updateVariables();
|
|
3379
|
+
_super.prototype.ngOnInit.call(this);
|
|
3380
|
+
};
|
|
3381
|
+
BignumberInputDirective.prototype.ngOnChanges = function (changes) {
|
|
3382
|
+
var placeholderChange = changes.placeholder && changes.placeholder.currentValue;
|
|
3383
|
+
if (!placeholderChange && this.scale)
|
|
3384
|
+
this.placeholder = "0" + this.decimalSeparator + "".padEnd(this.scale, "0");
|
|
3385
|
+
if (changes.scale ||
|
|
3386
|
+
changes.decimalSeparator ||
|
|
3387
|
+
changes.thousandsSeparator ||
|
|
3388
|
+
changes.alignTo ||
|
|
3389
|
+
changes.precision ||
|
|
3390
|
+
changes.allowNegative) {
|
|
3391
|
+
this.updateVariables();
|
|
3392
|
+
}
|
|
3393
|
+
};
|
|
3394
|
+
/**
|
|
3395
|
+
* Update the options values according to the directive input values.
|
|
3396
|
+
*/
|
|
3397
|
+
BignumberInputDirective.prototype.updateVariables = function () {
|
|
3398
|
+
this.options = {
|
|
3399
|
+
align: this.alignTo,
|
|
3400
|
+
decimalSeparator: this.decimalSeparator,
|
|
3401
|
+
thousandsSeparator: this.thousandsSeparator,
|
|
3402
|
+
scale: this.scale || 0,
|
|
3403
|
+
prefix: "",
|
|
3404
|
+
suffix: "",
|
|
3405
|
+
allowNegative: this.allowNegative
|
|
3406
|
+
};
|
|
3407
|
+
this.calculateMaxLength();
|
|
3408
|
+
};
|
|
3409
|
+
/**
|
|
3410
|
+
* Responsible to calculate the field maximum length considering the separators.
|
|
3411
|
+
*/
|
|
3412
|
+
BignumberInputDirective.prototype.calculateMaxLength = function () {
|
|
3413
|
+
var decSepLength = this.decimalSeparator.length;
|
|
3414
|
+
var thoSepLength = this.thousandsSeparator.length;
|
|
3415
|
+
var maxLength = this.precision + (this.scale ? decSepLength : 0);
|
|
3416
|
+
maxLength += Math.ceil((this.precision - (this.scale ? this.scale : 0)) / 3 - 1) * thoSepLength;
|
|
3417
|
+
this.maxLength = maxLength;
|
|
3418
|
+
};
|
|
3419
|
+
var BignumberInputDirective_1;
|
|
3420
|
+
__decorate([
|
|
3421
|
+
core.Input()
|
|
3422
|
+
], BignumberInputDirective.prototype, "precision", void 0);
|
|
3423
|
+
__decorate([
|
|
3424
|
+
core.Input()
|
|
3425
|
+
], BignumberInputDirective.prototype, "scale", void 0);
|
|
3426
|
+
__decorate([
|
|
3427
|
+
core.Input()
|
|
3428
|
+
], BignumberInputDirective.prototype, "decimalSeparator", void 0);
|
|
3429
|
+
__decorate([
|
|
3430
|
+
core.Input()
|
|
3431
|
+
], BignumberInputDirective.prototype, "thousandsSeparator", void 0);
|
|
3432
|
+
__decorate([
|
|
3433
|
+
core.Input()
|
|
3434
|
+
], BignumberInputDirective.prototype, "alignTo", void 0);
|
|
3435
|
+
__decorate([
|
|
3436
|
+
core.Input()
|
|
3437
|
+
], BignumberInputDirective.prototype, "allowNegative", void 0);
|
|
3438
|
+
__decorate([
|
|
3439
|
+
core.Input(),
|
|
3440
|
+
core.HostBinding("attr.placeholder")
|
|
3441
|
+
], BignumberInputDirective.prototype, "placeholder", void 0);
|
|
3442
|
+
__decorate([
|
|
3443
|
+
core.HostBinding("attr.maxLength")
|
|
3444
|
+
], BignumberInputDirective.prototype, "maxLength", void 0);
|
|
3445
|
+
BignumberInputDirective = BignumberInputDirective_1 = __decorate([
|
|
3446
|
+
core.Directive({
|
|
3447
|
+
selector: "input[sBignumberInput]",
|
|
3448
|
+
providers: [
|
|
3449
|
+
{
|
|
3450
|
+
provide: forms.NG_VALUE_ACCESSOR,
|
|
3451
|
+
useExisting: core.forwardRef(function () { return BignumberInputDirective_1; }),
|
|
3452
|
+
multi: true,
|
|
3453
|
+
},
|
|
3454
|
+
],
|
|
3455
|
+
})
|
|
3456
|
+
], BignumberInputDirective);
|
|
3457
|
+
return BignumberInputDirective;
|
|
3458
|
+
}(ng2CurrencyMask.CurrencyMaskDirective));
|
|
3459
|
+
|
|
3460
|
+
var BignumberInputModule = /** @class */ (function () {
|
|
3461
|
+
function BignumberInputModule() {
|
|
3462
|
+
}
|
|
3463
|
+
BignumberInputModule = __decorate([
|
|
3464
|
+
core.NgModule({
|
|
3465
|
+
imports: [common.CommonModule],
|
|
3466
|
+
declarations: [BignumberInputDirective],
|
|
3467
|
+
exports: [BignumberInputDirective],
|
|
3468
|
+
})
|
|
3469
|
+
], BignumberInputModule);
|
|
3470
|
+
return BignumberInputModule;
|
|
3471
|
+
}());
|
|
3472
|
+
|
|
3236
3473
|
var TableHeaderCheckboxComponent = /** @class */ (function () {
|
|
3237
3474
|
function TableHeaderCheckboxComponent(table, tableService) {
|
|
3238
3475
|
var _this = this;
|
|
@@ -3807,9 +4044,9 @@
|
|
|
3807
4044
|
], TableColumnsComponent.prototype, "locale", void 0);
|
|
3808
4045
|
TableColumnsComponent = __decorate([
|
|
3809
4046
|
core.Component({
|
|
3810
|
-
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-
|
|
4047
|
+
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",
|
|
3811
4048
|
selector: "s-table-columns",
|
|
3812
|
-
styles: ["
|
|
4049
|
+
styles: [":host{display:none}"]
|
|
3813
4050
|
}),
|
|
3814
4051
|
__param(2, core.Inject("hostProjectConfigs"))
|
|
3815
4052
|
], TableColumnsComponent);
|
|
@@ -3982,6 +4219,9 @@
|
|
|
3982
4219
|
return BaseFieldComponent;
|
|
3983
4220
|
}());
|
|
3984
4221
|
|
|
4222
|
+
/**
|
|
4223
|
+
* @deprecated Should use bignumber instead
|
|
4224
|
+
*/
|
|
3985
4225
|
var CurrencyFieldComponent = /** @class */ (function (_super) {
|
|
3986
4226
|
__extends(CurrencyFieldComponent, _super);
|
|
3987
4227
|
function CurrencyFieldComponent() {
|
|
@@ -4037,6 +4277,9 @@
|
|
|
4037
4277
|
return LookupFieldComponent;
|
|
4038
4278
|
}());
|
|
4039
4279
|
|
|
4280
|
+
/**
|
|
4281
|
+
* @deprecated Should use bignumber instead
|
|
4282
|
+
*/
|
|
4040
4283
|
var NumberFieldComponent = /** @class */ (function (_super) {
|
|
4041
4284
|
__extends(NumberFieldComponent, _super);
|
|
4042
4285
|
function NumberFieldComponent() {
|
|
@@ -4360,6 +4603,67 @@
|
|
|
4360
4603
|
StructureType["Section"] = "Section";
|
|
4361
4604
|
})(StructureType || (StructureType = {}));
|
|
4362
4605
|
|
|
4606
|
+
var BignumberFieldComponent = /** @class */ (function (_super) {
|
|
4607
|
+
__extends(BignumberFieldComponent, _super);
|
|
4608
|
+
function BignumberFieldComponent() {
|
|
4609
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
4610
|
+
_this.onInput = new core.EventEmitter();
|
|
4611
|
+
_this.onFocus = new core.EventEmitter();
|
|
4612
|
+
_this.onComplete = new core.EventEmitter();
|
|
4613
|
+
_this.ngUnsubscribe = new rxjs.Subject();
|
|
4614
|
+
return _this;
|
|
4615
|
+
}
|
|
4616
|
+
BignumberFieldComponent.prototype.ngOnInit = function () {
|
|
4617
|
+
var _this = this;
|
|
4618
|
+
this.onFocus.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (event) {
|
|
4619
|
+
if (_this.field.onFocus)
|
|
4620
|
+
_this.field.onFocus(event);
|
|
4621
|
+
});
|
|
4622
|
+
this.onInput.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (event) {
|
|
4623
|
+
if (_this.field.onInput)
|
|
4624
|
+
_this.field.onInput(event);
|
|
4625
|
+
});
|
|
4626
|
+
this.onComplete.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function (event) {
|
|
4627
|
+
if (_this.field.onComplete)
|
|
4628
|
+
_this.field.onComplete(event);
|
|
4629
|
+
});
|
|
4630
|
+
};
|
|
4631
|
+
BignumberFieldComponent.prototype.ngOnDestroy = function () {
|
|
4632
|
+
this.ngUnsubscribe.next();
|
|
4633
|
+
this.ngUnsubscribe.complete();
|
|
4634
|
+
};
|
|
4635
|
+
Object.defineProperty(BignumberFieldComponent.prototype, "fieldType", {
|
|
4636
|
+
get: function () {
|
|
4637
|
+
return exports.FieldType;
|
|
4638
|
+
},
|
|
4639
|
+
enumerable: true,
|
|
4640
|
+
configurable: true
|
|
4641
|
+
});
|
|
4642
|
+
__decorate([
|
|
4643
|
+
core.Input()
|
|
4644
|
+
], BignumberFieldComponent.prototype, "field", void 0);
|
|
4645
|
+
__decorate([
|
|
4646
|
+
core.Input()
|
|
4647
|
+
], BignumberFieldComponent.prototype, "formControl", void 0);
|
|
4648
|
+
__decorate([
|
|
4649
|
+
core.Output()
|
|
4650
|
+
], BignumberFieldComponent.prototype, "onInput", void 0);
|
|
4651
|
+
__decorate([
|
|
4652
|
+
core.Output()
|
|
4653
|
+
], BignumberFieldComponent.prototype, "onFocus", void 0);
|
|
4654
|
+
__decorate([
|
|
4655
|
+
core.Output()
|
|
4656
|
+
], BignumberFieldComponent.prototype, "onComplete", void 0);
|
|
4657
|
+
BignumberFieldComponent = __decorate([
|
|
4658
|
+
core.Component({
|
|
4659
|
+
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>",
|
|
4660
|
+
encapsulation: core.ViewEncapsulation.None,
|
|
4661
|
+
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}"]
|
|
4662
|
+
})
|
|
4663
|
+
], BignumberFieldComponent);
|
|
4664
|
+
return BignumberFieldComponent;
|
|
4665
|
+
}(BaseFieldComponent));
|
|
4666
|
+
|
|
4363
4667
|
var DynamicForm = /** @class */ (function () {
|
|
4364
4668
|
function DynamicForm(_a) {
|
|
4365
4669
|
var group = _a.group, errorMessages = _a.errorMessages;
|
|
@@ -4424,6 +4728,8 @@
|
|
|
4424
4728
|
case exports.FieldType.Double:
|
|
4425
4729
|
case exports.FieldType.Integer:
|
|
4426
4730
|
return NumberFieldComponent;
|
|
4731
|
+
case exports.FieldType.Number:
|
|
4732
|
+
return BignumberFieldComponent;
|
|
4427
4733
|
case exports.FieldType.Enum:
|
|
4428
4734
|
return SelectFieldComponent;
|
|
4429
4735
|
case exports.FieldType.Lookup:
|
|
@@ -4598,6 +4904,7 @@
|
|
|
4598
4904
|
inputmask.InputMaskModule,
|
|
4599
4905
|
dropdown.DropdownModule,
|
|
4600
4906
|
NumberInputModule,
|
|
4907
|
+
BignumberInputModule,
|
|
4601
4908
|
LocalizedNumberInputModule,
|
|
4602
4909
|
ControlErrorsModule,
|
|
4603
4910
|
LocaleModule,
|
|
@@ -4639,6 +4946,7 @@
|
|
|
4639
4946
|
LookupComponent,
|
|
4640
4947
|
LookupFieldComponent,
|
|
4641
4948
|
NumberFieldComponent,
|
|
4949
|
+
BignumberFieldComponent,
|
|
4642
4950
|
RadioButtonComponent,
|
|
4643
4951
|
RowComponent,
|
|
4644
4952
|
SectionComponent,
|
|
@@ -4657,6 +4965,7 @@
|
|
|
4657
4965
|
FileUploadComponent$1,
|
|
4658
4966
|
LookupFieldComponent,
|
|
4659
4967
|
NumberFieldComponent,
|
|
4968
|
+
BignumberFieldComponent,
|
|
4660
4969
|
RadioButtonComponent,
|
|
4661
4970
|
RowComponent,
|
|
4662
4971
|
SectionComponent,
|
|
@@ -6232,43 +6541,43 @@
|
|
|
6232
6541
|
});
|
|
6233
6542
|
StatsCardComponent.prototype.updateDisplayValue = function () {
|
|
6234
6543
|
var _this = this;
|
|
6235
|
-
var previousRawValue =
|
|
6236
|
-
var rawValue =
|
|
6237
|
-
var
|
|
6238
|
-
var
|
|
6544
|
+
var previousRawValue = new BigNumber.BigNumber(this.previousValue.replace(/\D/g, ""));
|
|
6545
|
+
var rawValue = new BigNumber.BigNumber(this.value.replace(/\D/g, ""));
|
|
6546
|
+
var eachAnimationDuration = new BigNumber.BigNumber(this.ANIMATION_DURATION_MS).dividedBy(new BigNumber.BigNumber(this.STEP_DURATION_MS));
|
|
6547
|
+
var incrementValue = rawValue.minus(previousRawValue).absoluteValue().dividedBy(eachAnimationDuration).dp(0, 7);
|
|
6548
|
+
var incremental = previousRawValue.isLessThan(rawValue);
|
|
6239
6549
|
clearInterval(this.intervalId);
|
|
6240
6550
|
this.displayValue = this.replaceNumericPositions(this.value);
|
|
6241
6551
|
var counter = previousRawValue;
|
|
6242
6552
|
this.intervalId = setInterval(function () {
|
|
6243
|
-
if (incremental && counter
|
|
6244
|
-
_this.displayValue = _this.replaceNumericPositions(_this.displayValue,
|
|
6245
|
-
counter
|
|
6553
|
+
if (incremental && counter.isLessThan(rawValue)) {
|
|
6554
|
+
_this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
|
|
6555
|
+
counter = counter.plus(incrementValue);
|
|
6246
6556
|
}
|
|
6247
|
-
else if (incremental) {
|
|
6248
|
-
_this.displayValue = _this.
|
|
6249
|
-
|
|
6557
|
+
else if (!incremental && counter.isGreaterThan(rawValue)) {
|
|
6558
|
+
_this.displayValue = _this.replaceNumericPositions(_this.displayValue, counter);
|
|
6559
|
+
counter = counter.minus(incrementValue);
|
|
6250
6560
|
}
|
|
6251
|
-
else
|
|
6252
|
-
_this.displayValue = _this.replaceNumericPositions(_this.displayValue, String(counter));
|
|
6253
|
-
counter -= incrementValue;
|
|
6254
|
-
}
|
|
6255
|
-
else if (!incremental) {
|
|
6561
|
+
else {
|
|
6256
6562
|
_this.displayValue = _this.value;
|
|
6257
6563
|
clearInterval(_this.intervalId);
|
|
6258
6564
|
}
|
|
6259
6565
|
}, this.STEP_DURATION_MS);
|
|
6260
6566
|
};
|
|
6261
6567
|
StatsCardComponent.prototype.replaceNumericPositions = function (value, newValue) {
|
|
6262
|
-
if (newValue === void 0) { newValue = ""; }
|
|
6263
6568
|
var rawValue = value.replace(/[^\d]/g, "");
|
|
6264
|
-
var newValueString = newValue.
|
|
6569
|
+
var newValueString = newValue ? newValue.toString() : "";
|
|
6570
|
+
var formattedNewValue = newValueString
|
|
6571
|
+
.toString()
|
|
6572
|
+
.replace(/\D/g, "")
|
|
6573
|
+
.padStart(rawValue.length, "0");
|
|
6265
6574
|
var newValueIndex = 0;
|
|
6266
6575
|
return value
|
|
6267
6576
|
.split("")
|
|
6268
6577
|
.map(function (char) {
|
|
6269
6578
|
var number = Number(char);
|
|
6270
6579
|
if (number || char === "0")
|
|
6271
|
-
return
|
|
6580
|
+
return formattedNewValue[newValueIndex++];
|
|
6272
6581
|
return char;
|
|
6273
6582
|
})
|
|
6274
6583
|
.join("");
|
|
@@ -6850,6 +7159,9 @@
|
|
|
6850
7159
|
|
|
6851
7160
|
exports.AngularComponentsModule = AngularComponentsModule;
|
|
6852
7161
|
exports.AutocompleteField = AutocompleteField;
|
|
7162
|
+
exports.BignumberField = BignumberField;
|
|
7163
|
+
exports.BignumberInputDirective = BignumberInputDirective;
|
|
7164
|
+
exports.BignumberInputModule = BignumberInputModule;
|
|
6853
7165
|
exports.BooleanField = BooleanField;
|
|
6854
7166
|
exports.BooleanOptionsLabel = BooleanOptionsLabel;
|
|
6855
7167
|
exports.BreadcrumbComponent = BreadcrumbComponent;
|
|
@@ -6952,36 +7264,39 @@
|
|
|
6952
7264
|
exports.TokenListComponent = TokenListComponent;
|
|
6953
7265
|
exports.TokenListModule = TokenListModule;
|
|
6954
7266
|
exports.ɵa = LocalizedCurrencyImpurePipe;
|
|
6955
|
-
exports.ɵb =
|
|
6956
|
-
exports.ɵba =
|
|
6957
|
-
exports.ɵbb =
|
|
6958
|
-
exports.ɵbc =
|
|
6959
|
-
exports.ɵbd =
|
|
6960
|
-
exports.ɵbe =
|
|
6961
|
-
exports.ɵbf =
|
|
6962
|
-
exports.ɵ
|
|
6963
|
-
exports.ɵ
|
|
6964
|
-
exports.ɵ
|
|
6965
|
-
exports.ɵ
|
|
6966
|
-
exports.ɵ
|
|
6967
|
-
exports.ɵ
|
|
6968
|
-
exports.ɵ
|
|
6969
|
-
exports.ɵ
|
|
6970
|
-
exports.ɵ
|
|
6971
|
-
exports.ɵ
|
|
6972
|
-
exports.ɵ
|
|
6973
|
-
exports.ɵ
|
|
6974
|
-
exports.ɵ
|
|
6975
|
-
exports.ɵ
|
|
6976
|
-
exports.ɵ
|
|
6977
|
-
exports.ɵ
|
|
6978
|
-
exports.ɵ
|
|
6979
|
-
exports.ɵ
|
|
6980
|
-
exports.ɵ
|
|
6981
|
-
exports.ɵ
|
|
6982
|
-
exports.ɵ
|
|
6983
|
-
exports.ɵ
|
|
6984
|
-
exports.ɵ
|
|
7267
|
+
exports.ɵb = LocalizedBignumberPipe;
|
|
7268
|
+
exports.ɵba = DecimalField;
|
|
7269
|
+
exports.ɵbb = StructureModule;
|
|
7270
|
+
exports.ɵbc = HeaderComponent;
|
|
7271
|
+
exports.ɵbd = FooterComponent;
|
|
7272
|
+
exports.ɵbe = InfoSignComponent;
|
|
7273
|
+
exports.ɵbf = NumberLocaleOptions;
|
|
7274
|
+
exports.ɵbg = ThumbnailService;
|
|
7275
|
+
exports.ɵbh = InfiniteScrollModule;
|
|
7276
|
+
exports.ɵbi = InfiniteScrollDirective;
|
|
7277
|
+
exports.ɵc = LocalizedBignumberImpurePipe;
|
|
7278
|
+
exports.ɵd = TokenListModule;
|
|
7279
|
+
exports.ɵe = TableColumnsComponent;
|
|
7280
|
+
exports.ɵf = InfoSignModule;
|
|
7281
|
+
exports.ɵg = AutocompleteFieldComponent;
|
|
7282
|
+
exports.ɵh = BooleanFieldComponent;
|
|
7283
|
+
exports.ɵi = CalendarFieldComponent;
|
|
7284
|
+
exports.ɵj = ChipsFieldComponent;
|
|
7285
|
+
exports.ɵk = CurrencyFieldComponent;
|
|
7286
|
+
exports.ɵl = BaseFieldComponent;
|
|
7287
|
+
exports.ɵm = DynamicFieldComponent;
|
|
7288
|
+
exports.ɵn = DynamicFormDirective;
|
|
7289
|
+
exports.ɵo = FieldsetComponent;
|
|
7290
|
+
exports.ɵp = FileUploadComponent$1;
|
|
7291
|
+
exports.ɵq = LookupFieldComponent;
|
|
7292
|
+
exports.ɵr = NumberFieldComponent;
|
|
7293
|
+
exports.ɵs = BignumberFieldComponent;
|
|
7294
|
+
exports.ɵt = RadioButtonComponent;
|
|
7295
|
+
exports.ɵu = RowComponent;
|
|
7296
|
+
exports.ɵv = SectionComponent;
|
|
7297
|
+
exports.ɵw = SelectFieldComponent;
|
|
7298
|
+
exports.ɵx = TextAreaFieldComponent;
|
|
7299
|
+
exports.ɵy = TextFieldComponent;
|
|
6985
7300
|
|
|
6986
7301
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6987
7302
|
|