@seniorsistemas/angular-components 17.8.14 → 17.9.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 +86 -39
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/locale/pipes/numeric.pipe.d.ts +1 -1
- package/components/locale/services/numeric.service.d.ts +2 -2
- package/components/table/table-column/models/column.interface.d.ts +1 -0
- package/components/table/table-column/table-columns.component.d.ts +3 -1
- package/components/tiered-menu/tiered-menu.directive.d.ts +1 -0
- package/esm2015/components/locale/pipes/numeric.pipe.js +2 -2
- package/esm2015/components/locale/services/numeric.service.js +8 -5
- package/esm2015/components/navigation-button/navigation-button.component.js +17 -9
- package/esm2015/components/table/table-column/models/column.interface.js +1 -1
- package/esm2015/components/table/table-column/table-columns.component.js +34 -29
- package/esm2015/components/tiered-menu/tiered-menu.directive.js +7 -2
- package/esm2015/utils/currency/currency.service.js +29 -0
- package/esm2015/utils/currency/index.js +2 -0
- package/esm2015/utils/index.js +2 -1
- package/esm5/components/locale/pipes/numeric.pipe.js +2 -2
- package/esm5/components/locale/services/numeric.service.js +8 -5
- package/esm5/components/navigation-button/navigation-button.component.js +17 -9
- package/esm5/components/table/table-column/models/column.interface.js +1 -1
- package/esm5/components/table/table-column/table-columns.component.js +31 -26
- package/esm5/components/tiered-menu/tiered-menu.directive.js +8 -2
- package/esm5/utils/currency/currency.service.js +31 -0
- package/esm5/utils/currency/index.js +2 -0
- package/esm5/utils/index.js +2 -1
- package/fesm2015/seniorsistemas-angular-components.js +86 -43
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +86 -40
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
- package/utils/currency/currency.service.d.ts +8 -0
- package/utils/currency/index.d.ts +1 -0
- package/utils/index.d.ts +1 -0
|
@@ -7309,14 +7309,17 @@
|
|
|
7309
7309
|
* Documentation is available at {@link https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat Intl.NumberFormatOptions}.
|
|
7310
7310
|
*
|
|
7311
7311
|
* @param {number | string | BigNumber} value The value to be formatted.
|
|
7312
|
-
* @param
|
|
7312
|
+
* @param options Locale and numberFormatOptions that overwrites the default Intl.NumberFormatOptions.
|
|
7313
7313
|
* @return `string` The formatted value.
|
|
7314
7314
|
*/
|
|
7315
7315
|
NumericService.prototype.instant = function (value, options) {
|
|
7316
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
7317
|
-
options = __assign(__assign({}, options), { locale: (_c = (_a = options === null || options === void 0 ? void 0 : options.locale) !== null && _a !== void 0 ? _a : (_b = this.localeService.getLocaleOptions()) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : "pt-BR",
|
|
7316
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
7317
|
+
options = __assign(__assign({}, options), { locale: (_c = (_a = options === null || options === void 0 ? void 0 : options.locale) !== null && _a !== void 0 ? _a : (_b = this.localeService.getLocaleOptions()) === null || _b === void 0 ? void 0 : _b.locale) !== null && _c !== void 0 ? _c : "pt-BR", numberFormatOptions: __assign(__assign({}, options === null || options === void 0 ? void 0 : options.numberFormatOptions), { currency: ((_d = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _d === void 0 ? void 0 : _d.style) === "currency" ? ((_f = (_e = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _e === void 0 ? void 0 : _e.currency) !== null && _f !== void 0 ? _f : "BRL") : undefined, currencyDisplay: ((_g = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _g === void 0 ? void 0 : _g.style) === "currency"
|
|
7318
|
+
? ((_j = (_h = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _h === void 0 ? void 0 : _h.currencyDisplay) !== null && _j !== void 0 ? _j : "narrowSymbol")
|
|
7319
|
+
: undefined, minimumFractionDigits: (_l = (_k = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _k === void 0 ? void 0 : _k.minimumFractionDigits) !== null && _l !== void 0 ? _l : 2, maximumFractionDigits: (_o = (_m = options === null || options === void 0 ? void 0 : options.numberFormatOptions) === null || _m === void 0 ? void 0 : _m.maximumFractionDigits) !== null && _o !== void 0 ? _o : 2 }) });
|
|
7320
|
+
options.numberFormatOptions["trailingZeroDisplay"] = "stripIfInteger";
|
|
7318
7321
|
// From https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
|
|
7319
|
-
return new Intl.NumberFormat(options.locale, options.
|
|
7322
|
+
return new Intl.NumberFormat(options.locale, options.numberFormatOptions).format(this.getType(value) === "number" || this.getType(value) === "string" ? value : value.toString());
|
|
7320
7323
|
};
|
|
7321
7324
|
NumericService.prototype.getType = function (value) {
|
|
7322
7325
|
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
|
|
@@ -7371,7 +7374,7 @@
|
|
|
7371
7374
|
: this.localeService.getLocale().pipe(operators.map(function (locale) {
|
|
7372
7375
|
return _this.numericService.instant(value, {
|
|
7373
7376
|
locale: locale,
|
|
7374
|
-
|
|
7377
|
+
numberFormatOptions: options === null || options === void 0 ? void 0 : options.numberFormatOptions,
|
|
7375
7378
|
});
|
|
7376
7379
|
}));
|
|
7377
7380
|
};
|
|
@@ -8341,14 +8344,15 @@
|
|
|
8341
8344
|
|
|
8342
8345
|
var moment$4 = moment_;
|
|
8343
8346
|
var TableColumnsComponent = /** @class */ (function () {
|
|
8344
|
-
function TableColumnsComponent(localeService, viewContainerRef, translate, hostProjectConfigs) {
|
|
8347
|
+
function TableColumnsComponent(localeService, viewContainerRef, translate, numericService, hostProjectConfigs) {
|
|
8345
8348
|
this.localeService = localeService;
|
|
8346
8349
|
this.viewContainerRef = viewContainerRef;
|
|
8347
8350
|
this.translate = translate;
|
|
8351
|
+
this.numericService = numericService;
|
|
8348
8352
|
this.hostProjectConfigs = hostProjectConfigs;
|
|
8349
8353
|
this.locale = {
|
|
8350
8354
|
calendar: __assign(__assign({}, this.localeService.getLocaleOptions().calendar), { dateFormat: convertToMomentDateFormat(this.localeService.getLocaleOptions().calendar.dateFormat) }),
|
|
8351
|
-
number: __assign(__assign({}, this.localeService.getLocaleOptions().number), { scale: 0 })
|
|
8355
|
+
number: __assign(__assign({}, this.localeService.getLocaleOptions().number), { scale: 0 }),
|
|
8352
8356
|
};
|
|
8353
8357
|
this.formattedColumns = [];
|
|
8354
8358
|
}
|
|
@@ -8371,7 +8375,7 @@
|
|
|
8371
8375
|
return {
|
|
8372
8376
|
value: string,
|
|
8373
8377
|
isUninformed: string === uninformed,
|
|
8374
|
-
separator: !isLastIndex ? separator : ""
|
|
8378
|
+
separator: !isLastIndex ? separator : "",
|
|
8375
8379
|
};
|
|
8376
8380
|
});
|
|
8377
8381
|
}
|
|
@@ -8404,10 +8408,10 @@
|
|
|
8404
8408
|
return column.prefix ? column.prefix : this.hostProjectConfigs.domain + "." + this.hostProjectConfigs.service + ".";
|
|
8405
8409
|
};
|
|
8406
8410
|
TableColumnsComponent.prototype.isAttributeValueInvalid = function (attributeValue) {
|
|
8407
|
-
return attributeValue === null ||
|
|
8411
|
+
return (attributeValue === null ||
|
|
8408
8412
|
attributeValue === undefined ||
|
|
8409
8413
|
(this.isArray(attributeValue) && !attributeValue.length) ||
|
|
8410
|
-
(typeof attributeValue ===
|
|
8414
|
+
(typeof attributeValue === "string" && attributeValue.trim() === ""));
|
|
8411
8415
|
};
|
|
8412
8416
|
TableColumnsComponent.prototype.getFormattedColumnValue = function (column, columnValue, unifiedColumnValues, uninformedText, uninformedNumber) {
|
|
8413
8417
|
if (uninformedNumber === column.attributes.length) {
|
|
@@ -8420,13 +8424,9 @@
|
|
|
8420
8424
|
};
|
|
8421
8425
|
TableColumnsComponent.prototype.getAttributeValue = function (attribute, rowValue) {
|
|
8422
8426
|
var attributeValue;
|
|
8423
|
-
attribute
|
|
8424
|
-
.split("/")
|
|
8425
|
-
.forEach(function (value) {
|
|
8427
|
+
attribute.split("/").forEach(function (value) {
|
|
8426
8428
|
if (!attributeValue) {
|
|
8427
|
-
value
|
|
8428
|
-
.split(".")
|
|
8429
|
-
.forEach(function (val, i) {
|
|
8429
|
+
value.split(".").forEach(function (val, i) {
|
|
8430
8430
|
if (!rowValue) {
|
|
8431
8431
|
return;
|
|
8432
8432
|
}
|
|
@@ -8444,9 +8444,7 @@
|
|
|
8444
8444
|
return attributeValue;
|
|
8445
8445
|
};
|
|
8446
8446
|
TableColumnsComponent.prototype.getNumberConfigs = function (column) {
|
|
8447
|
-
return __assign(__assign({}, this.locale.number), { scale: column.scale !== null && column.scale !== undefined
|
|
8448
|
-
? this.getColumnScale(column.scale)
|
|
8449
|
-
: this.locale.number.scale, prefix: this.locale.number.currencySymbol + " " });
|
|
8447
|
+
return __assign(__assign({}, this.locale.number), { scale: column.scale !== null && column.scale !== undefined ? this.getColumnScale(column.scale) : this.locale.number.scale, prefix: this.locale.number.currencySymbol + " " });
|
|
8450
8448
|
};
|
|
8451
8449
|
TableColumnsComponent.prototype.getDateFormat = function (column, locale) {
|
|
8452
8450
|
return column.dateFormat ? column.dateFormat : locale.calendar.dateFormat;
|
|
@@ -8458,8 +8456,8 @@
|
|
|
8458
8456
|
var separator = this.getColumnSeparator(column);
|
|
8459
8457
|
var uninformed = this.translate.instant(prefix + "empty_label");
|
|
8460
8458
|
var style = column.style;
|
|
8461
|
-
var columnValue = column.attributes
|
|
8462
|
-
|
|
8459
|
+
var columnValue = column.attributes.map(function (attribute) {
|
|
8460
|
+
var _a, _b;
|
|
8463
8461
|
var attributeValue = _this.getAttributeValue(attribute, rowValue);
|
|
8464
8462
|
if (_this.isAttributeValueInvalid(attributeValue)) {
|
|
8465
8463
|
return uninformed;
|
|
@@ -8469,7 +8467,10 @@
|
|
|
8469
8467
|
case exports.EnumColumnFieldType.ENUM:
|
|
8470
8468
|
return _this.translate.instant(column.enumPrefix + attributeValue.toString().toLowerCase());
|
|
8471
8469
|
case exports.EnumColumnFieldType.CURRENCY:
|
|
8472
|
-
return
|
|
8470
|
+
return ((_a = attributeValue === null || attributeValue === void 0 ? void 0 : attributeValue.options) === null || _a === void 0 ? void 0 : _a.numberFormatOptions) ? _this.numericService.instant(attributeValue.value, {
|
|
8471
|
+
numberFormatOptions: attributeValue.options.numberFormatOptions,
|
|
8472
|
+
})
|
|
8473
|
+
: ng2CurrencyMask.applyMask(attributeValue, numberConfigs, _this.isNumber(attributeValue));
|
|
8473
8474
|
case exports.EnumColumnFieldType.DATE:
|
|
8474
8475
|
var dateFormat = _this.getDateFormat(column, locale);
|
|
8475
8476
|
return moment$4(attributeValue).format(dateFormat);
|
|
@@ -8478,7 +8479,14 @@
|
|
|
8478
8479
|
return _this.translate.instant(prefix + value);
|
|
8479
8480
|
case exports.EnumColumnFieldType.NUMBER:
|
|
8480
8481
|
numberConfigs.prefix = "";
|
|
8481
|
-
return
|
|
8482
|
+
return ((_b = attributeValue === null || attributeValue === void 0 ? void 0 : attributeValue.options) === null || _b === void 0 ? void 0 : _b.numberFormatOptions) ? _this.numericService.instant(attributeValue.value, {
|
|
8483
|
+
numberFormatOptions: attributeValue.options.numberFormatOptions,
|
|
8484
|
+
})
|
|
8485
|
+
: column.numberFormatOptions
|
|
8486
|
+
? _this.numericService.instant(attributeValue, {
|
|
8487
|
+
numberFormatOptions: column.numberFormatOptions,
|
|
8488
|
+
})
|
|
8489
|
+
: ng2CurrencyMask.applyMask(attributeValue, numberConfigs, _this.isNumber(attributeValue));
|
|
8482
8490
|
case exports.EnumColumnFieldType.TOKENS:
|
|
8483
8491
|
return _this.getTokens(attributeValue);
|
|
8484
8492
|
default:
|
|
@@ -8486,9 +8494,7 @@
|
|
|
8486
8494
|
}
|
|
8487
8495
|
});
|
|
8488
8496
|
var unifiedColumnValues = columnValue.join(separator);
|
|
8489
|
-
var uninformedNumber = unifiedColumnValues
|
|
8490
|
-
.split(separator)
|
|
8491
|
-
.filter(function (value) { return value === uninformed; }).length;
|
|
8497
|
+
var uninformedNumber = unifiedColumnValues.split(separator).filter(function (value) { return value === uninformed; }).length;
|
|
8492
8498
|
var formattedColumnValue = this.getFormattedColumnValue(column, columnValue, unifiedColumnValues, uninformed, uninformedNumber);
|
|
8493
8499
|
return {
|
|
8494
8500
|
style: style,
|
|
@@ -8500,7 +8506,7 @@
|
|
|
8500
8506
|
tooltip: this.getColumnTooltip(column.tooltip),
|
|
8501
8507
|
infoSign: this.getColumnInfoSign(column.infoSign),
|
|
8502
8508
|
onLinkClick: column.onLinkClick,
|
|
8503
|
-
onColumnClick: column.onColumnClick
|
|
8509
|
+
onColumnClick: column.onColumnClick,
|
|
8504
8510
|
};
|
|
8505
8511
|
};
|
|
8506
8512
|
TableColumnsComponent.prototype.getColumnScale = function (scale) {
|
|
@@ -8528,7 +8534,7 @@
|
|
|
8528
8534
|
return "";
|
|
8529
8535
|
};
|
|
8530
8536
|
TableColumnsComponent.prototype.isNumber = function (value) {
|
|
8531
|
-
return !
|
|
8537
|
+
return !new BigNumber__default(value).isNaN();
|
|
8532
8538
|
};
|
|
8533
8539
|
TableColumnsComponent.prototype.getTokens = function (values) {
|
|
8534
8540
|
if (!this.isArray(values)) {
|
|
@@ -8545,7 +8551,7 @@
|
|
|
8545
8551
|
.map(function (value) {
|
|
8546
8552
|
var label = typeof value === "symbol" ? value.toString() : "" + value;
|
|
8547
8553
|
return {
|
|
8548
|
-
label: label
|
|
8554
|
+
label: label,
|
|
8549
8555
|
};
|
|
8550
8556
|
});
|
|
8551
8557
|
};
|
|
@@ -8565,6 +8571,7 @@
|
|
|
8565
8571
|
{ type: LocaleService },
|
|
8566
8572
|
{ type: core.ViewContainerRef },
|
|
8567
8573
|
{ type: core$1.TranslateService },
|
|
8574
|
+
{ type: NumericService },
|
|
8568
8575
|
{ type: undefined, decorators: [{ type: core.Inject, args: [HostProjectConfigsInjectionToken,] }] }
|
|
8569
8576
|
]; };
|
|
8570
8577
|
__decorate([
|
|
@@ -8585,7 +8592,7 @@
|
|
|
8585
8592
|
selector: "s-table-columns",
|
|
8586
8593
|
styles: [":host{display:none}"]
|
|
8587
8594
|
}),
|
|
8588
|
-
__param(
|
|
8595
|
+
__param(4, core.Inject(HostProjectConfigsInjectionToken))
|
|
8589
8596
|
], TableColumnsComponent);
|
|
8590
8597
|
return TableColumnsComponent;
|
|
8591
8598
|
}());
|
|
@@ -14950,11 +14957,11 @@
|
|
|
14950
14957
|
var previous = this.steps[this.currentIndex];
|
|
14951
14958
|
if (this.currentIndex < this.steps.length - 1) {
|
|
14952
14959
|
this.currentIndex++;
|
|
14960
|
+
var current = this.steps[this.currentIndex];
|
|
14961
|
+
this._onChange && this._onChange(current.value);
|
|
14962
|
+
this.stepChanged.emit({ previous: previous, current: current });
|
|
14953
14963
|
}
|
|
14954
|
-
var current = this.steps[this.currentIndex];
|
|
14955
14964
|
this._onTouched && this._onTouched();
|
|
14956
|
-
this._onChange && this._onChange(current.value);
|
|
14957
|
-
this.stepChanged.emit({ previous: previous, current: current });
|
|
14958
14965
|
};
|
|
14959
14966
|
NavigationButtonComponent.prototype.onPrevious = function () {
|
|
14960
14967
|
if (this.isDisabled)
|
|
@@ -14962,18 +14969,26 @@
|
|
|
14962
14969
|
var previous = this.steps[this.currentIndex];
|
|
14963
14970
|
if (this.currentIndex > 0) {
|
|
14964
14971
|
this.currentIndex--;
|
|
14972
|
+
var current = this.steps[this.currentIndex];
|
|
14973
|
+
this._onChange && this._onChange(current.value);
|
|
14974
|
+
this.stepChanged.emit({ previous: previous, current: current });
|
|
14965
14975
|
}
|
|
14966
|
-
var current = this.steps[this.currentIndex];
|
|
14967
14976
|
this._onTouched && this._onTouched();
|
|
14968
|
-
this._onChange && this._onChange(current.value);
|
|
14969
|
-
this.stepChanged.emit({ previous: previous, current: current });
|
|
14970
14977
|
};
|
|
14971
14978
|
NavigationButtonComponent.prototype._createTieredMenuItems = function () {
|
|
14972
14979
|
var _this = this;
|
|
14973
14980
|
this.steps.forEach(function (step) {
|
|
14974
14981
|
_this.tieredMenuItems.push({
|
|
14975
14982
|
label: step.label,
|
|
14976
|
-
command: function () {
|
|
14983
|
+
command: function () {
|
|
14984
|
+
var index = _this.steps.findIndex(function (s) { return s === step; });
|
|
14985
|
+
if (_this.currentIndex !== index) {
|
|
14986
|
+
_this._onChange && _this._onChange(step.value);
|
|
14987
|
+
_this.stepChanged.emit({ previous: _this.steps[_this.currentIndex], current: step });
|
|
14988
|
+
_this.currentIndex = index;
|
|
14989
|
+
}
|
|
14990
|
+
_this._onTouched && _this._onTouched();
|
|
14991
|
+
},
|
|
14977
14992
|
});
|
|
14978
14993
|
});
|
|
14979
14994
|
};
|
|
@@ -14999,7 +15014,7 @@
|
|
|
14999
15014
|
NavigationButtonComponent = NavigationButtonComponent_1 = __decorate([
|
|
15000
15015
|
core.Component({
|
|
15001
15016
|
selector: "s-navigation-button",
|
|
15002
|
-
template: "<div class=\"navigation-button\" [ngClass]=\"{ 'navigation-button--disabled': isDisabled}\">\n <button\n class=\"option option--previous\"\n [ngClass]=\"{ 'option--disabled': currentIndex === 0 }\"\n (click)=\"onPrevious()\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n\n <ng-container *ngIf=\"steps[currentIndex].tooltip || tooltip; then tooltipBlock; else noTooltipBlock\"></ng-container>\n\n <ng-template #tooltipBlock>\n <button\n [sTooltip]=\"steps[currentIndex].tooltip || tooltip\"\n class=\"step\"\n sTieredMenu [items]=\"tieredMenuItems\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <ng-template #noTooltipBlock>\n <button class=\"step\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <button\n class=\"option option--next\"\n [ngClass]=\"{ 'option--disabled': currentIndex === steps.length - 1 }\"\n (click)=\"onNext()\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n</div>\n",
|
|
15017
|
+
template: "<div class=\"navigation-button\" [ngClass]=\"{ 'navigation-button--disabled': isDisabled}\">\n <button\n class=\"option option--previous\"\n [ngClass]=\"{ 'option--disabled': currentIndex === 0 }\"\n (click)=\"onPrevious()\">\n <i class=\"fas fa-chevron-left\"></i>\n </button>\n\n <ng-container *ngIf=\"steps[currentIndex].tooltip || tooltip; then tooltipBlock; else noTooltipBlock\"></ng-container>\n\n <ng-template #tooltipBlock>\n <button\n [sTooltip]=\"steps[currentIndex].tooltip || tooltip\"\n class=\"step\"\n sTieredMenu [items]=\"tieredMenuItems\"\n [focusedItem]=\"tieredMenuItems[currentIndex]\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <ng-template #noTooltipBlock>\n <button class=\"step\">\n {{ steps[currentIndex].label }}\n </button>\n </ng-template>\n\n <button\n class=\"option option--next\"\n [ngClass]=\"{ 'option--disabled': currentIndex === steps.length - 1 }\"\n (click)=\"onNext()\">\n <i class=\"fas fa-chevron-right\"></i>\n </button>\n</div>\n",
|
|
15003
15018
|
providers: [
|
|
15004
15019
|
{
|
|
15005
15020
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
@@ -15632,6 +15647,7 @@
|
|
|
15632
15647
|
this._tieredMenuGlobalService = _tieredMenuGlobalService;
|
|
15633
15648
|
this._changeDetectorRef = _changeDetectorRef;
|
|
15634
15649
|
this.items = [];
|
|
15650
|
+
this.focusedItem = undefined;
|
|
15635
15651
|
this.triggerEvent = "click";
|
|
15636
15652
|
this._componentRef = null;
|
|
15637
15653
|
this._isNested = false;
|
|
@@ -15786,9 +15802,11 @@
|
|
|
15786
15802
|
this._destroy();
|
|
15787
15803
|
};
|
|
15788
15804
|
TieredMenuDirective.prototype._updateServiceItems = function () {
|
|
15805
|
+
var _this = this;
|
|
15806
|
+
var _a;
|
|
15789
15807
|
this._tieredMenuService.items = this._tieredMenuService.normalizeData(this.items);
|
|
15790
15808
|
this._tieredMenuService.currentItems = this._tieredMenuService.items;
|
|
15791
|
-
this._tieredMenuService.currentItem = this._tieredMenuService.items[0];
|
|
15809
|
+
this._tieredMenuService.currentItem = (_a = this._tieredMenuService.items.find(function (i) { var _a; return i.label === ((_a = _this.focusedItem) === null || _a === void 0 ? void 0 : _a.label); })) !== null && _a !== void 0 ? _a : this._tieredMenuService.items[0];
|
|
15792
15810
|
};
|
|
15793
15811
|
TieredMenuDirective.ctorParameters = function () { return [
|
|
15794
15812
|
{ type: core.ElementRef },
|
|
@@ -15803,6 +15821,9 @@
|
|
|
15803
15821
|
__decorate([
|
|
15804
15822
|
core.Input()
|
|
15805
15823
|
], TieredMenuDirective.prototype, "items", void 0);
|
|
15824
|
+
__decorate([
|
|
15825
|
+
core.Input()
|
|
15826
|
+
], TieredMenuDirective.prototype, "focusedItem", void 0);
|
|
15806
15827
|
__decorate([
|
|
15807
15828
|
core.Input()
|
|
15808
15829
|
], TieredMenuDirective.prototype, "triggerEvent", void 0);
|
|
@@ -17992,6 +18013,31 @@
|
|
|
17992
18013
|
return WorkspaceSwitchModule;
|
|
17993
18014
|
}());
|
|
17994
18015
|
|
|
18016
|
+
var CurrencyService = /** @class */ (function () {
|
|
18017
|
+
function CurrencyService(localeService) {
|
|
18018
|
+
this.localeService = localeService;
|
|
18019
|
+
}
|
|
18020
|
+
CurrencyService.prototype.getCurrencySymbol = function (_a) {
|
|
18021
|
+
var currency = _a.currency;
|
|
18022
|
+
var _b, _c;
|
|
18023
|
+
var numberFormat = new Intl.NumberFormat(this.localeService.getLocaleOptions().locale, {
|
|
18024
|
+
style: "currency",
|
|
18025
|
+
currency: currency !== null && currency !== void 0 ? currency : "BRL",
|
|
18026
|
+
currencyDisplay: 'narrowSymbol',
|
|
18027
|
+
maximumFractionDigits: 5,
|
|
18028
|
+
});
|
|
18029
|
+
return (_c = (_b = numberFormat.formatToParts(1).find(function (x) { return x.type === "currency"; })) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : "";
|
|
18030
|
+
};
|
|
18031
|
+
CurrencyService.ctorParameters = function () { return [
|
|
18032
|
+
{ type: LocaleService }
|
|
18033
|
+
]; };
|
|
18034
|
+
CurrencyService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function CurrencyService_Factory() { return new CurrencyService(core["ɵɵinject"](LocaleService)); }, token: CurrencyService, providedIn: "root" });
|
|
18035
|
+
CurrencyService = __decorate([
|
|
18036
|
+
core.Injectable({ providedIn: "root" })
|
|
18037
|
+
], CurrencyService);
|
|
18038
|
+
return CurrencyService;
|
|
18039
|
+
}());
|
|
18040
|
+
|
|
17995
18041
|
var fallback = {
|
|
17996
18042
|
"platform.angular_components.drag_your_photo_or": "Arraste sua foto ou",
|
|
17997
18043
|
"platform.angular_components.select_a_file": "selecione um arquivo",
|
|
@@ -18342,6 +18388,7 @@
|
|
|
18342
18388
|
exports.CountryPhonePickerComponent = CountryPhonePickerComponent;
|
|
18343
18389
|
exports.CountryPhonePickerModule = CountryPhonePickerModule;
|
|
18344
18390
|
exports.CurrencyField = CurrencyField;
|
|
18391
|
+
exports.CurrencyService = CurrencyService;
|
|
18345
18392
|
exports.CustomFieldsComponent = CustomFieldsComponent;
|
|
18346
18393
|
exports.CustomFieldsModule = CustomFieldsModule;
|
|
18347
18394
|
exports.CustomFieldsService = CustomFieldsService;
|