@seniorsistemas/angular-components 17.15.3 → 17.15.5
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 +17 -7
- 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/panel/panel.component.d.ts +3 -1
- package/components/table/table-column/table-columns.component.d.ts +8 -5
- package/esm2015/components/dynamic-form/components/lookup/lookup.component.js +3 -2
- package/esm2015/components/panel/panel.component.js +11 -3
- package/esm2015/components/table/table-column/table-columns.component.js +7 -6
- package/esm5/components/dynamic-form/components/lookup/lookup.component.js +3 -2
- package/esm5/components/panel/panel.component.js +11 -3
- package/esm5/components/table/table-column/table-columns.component.js +7 -6
- package/fesm2015/seniorsistemas-angular-components.js +17 -7
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +17 -7
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -6971,7 +6971,8 @@ var LookupComponent = /** @class */ (function () {
|
|
|
6971
6971
|
return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
|
|
6972
6972
|
};
|
|
6973
6973
|
LookupComponent.prototype.getBadgeFromValue = function (value, options) {
|
|
6974
|
-
|
|
6974
|
+
var _a;
|
|
6975
|
+
return (_a = options === null || options === void 0 ? void 0 : options.find(function (opt) { return opt.value === value; })) === null || _a === void 0 ? void 0 : _a.badge;
|
|
6975
6976
|
};
|
|
6976
6977
|
LookupComponent.prototype.getLabelForValue = function (value, options) {
|
|
6977
6978
|
if (!options)
|
|
@@ -9635,6 +9636,7 @@ var TableColumnsComponent = /** @class */ (function () {
|
|
|
9635
9636
|
calendar: __assign(__assign({}, this.localeService.getLocaleOptions().calendar), { dateFormat: convertToMomentDateFormat(this.localeService.getLocaleOptions().calendar.dateFormat) }),
|
|
9636
9637
|
number: __assign(__assign({}, this.localeService.getLocaleOptions().number), { scale: 0 }),
|
|
9637
9638
|
};
|
|
9639
|
+
this.cellsData = [];
|
|
9638
9640
|
this.formattedColumns = [];
|
|
9639
9641
|
}
|
|
9640
9642
|
TableColumnsComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -9647,7 +9649,7 @@ var TableColumnsComponent = /** @class */ (function () {
|
|
|
9647
9649
|
TableColumnsComponent.prototype.isArray = function (value) {
|
|
9648
9650
|
return Array.isArray(value);
|
|
9649
9651
|
};
|
|
9650
|
-
TableColumnsComponent.prototype.
|
|
9652
|
+
TableColumnsComponent.prototype.getCellData = function (column) {
|
|
9651
9653
|
var columnValue = column.columnValue, separator = column.separator, uninformed = column.uninformed;
|
|
9652
9654
|
if (typeof columnValue === "string") {
|
|
9653
9655
|
var splittedString_1 = columnValue.split(separator);
|
|
@@ -9656,7 +9658,7 @@ var TableColumnsComponent = /** @class */ (function () {
|
|
|
9656
9658
|
return {
|
|
9657
9659
|
value: string,
|
|
9658
9660
|
isUninformed: string === uninformed,
|
|
9659
|
-
separator: !isLastIndex ? separator :
|
|
9661
|
+
separator: !isLastIndex ? separator : null,
|
|
9660
9662
|
};
|
|
9661
9663
|
});
|
|
9662
9664
|
}
|
|
@@ -9678,8 +9680,8 @@ var TableColumnsComponent = /** @class */ (function () {
|
|
|
9678
9680
|
var columns = ((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue) || this.columns;
|
|
9679
9681
|
var rowValue = ((_b = changes.rowValue) === null || _b === void 0 ? void 0 : _b.currentValue) || this.rowValue;
|
|
9680
9682
|
var locale = ((_c = changes.locale) === null || _c === void 0 ? void 0 : _c.currentValue) || this.locale;
|
|
9681
|
-
this.formattedColumns =
|
|
9682
|
-
|
|
9683
|
+
this.formattedColumns = columns.map(function (column) { return _this.getColumnValue(column, rowValue, locale); });
|
|
9684
|
+
this.cellsData = this.formattedColumns.map(function (column) { return _this.getCellData(column); });
|
|
9683
9685
|
this.viewContainerRef.createEmbeddedView(this.columnsTemplate);
|
|
9684
9686
|
};
|
|
9685
9687
|
TableColumnsComponent.prototype.getColumnSeparator = function (column) {
|
|
@@ -9869,7 +9871,7 @@ var TableColumnsComponent = /** @class */ (function () {
|
|
|
9869
9871
|
], TableColumnsComponent.prototype, "locale", void 0);
|
|
9870
9872
|
TableColumnsComponent = __decorate([
|
|
9871
9873
|
Component({
|
|
9872
|
-
template: "<ng-template #columnsTemplate>\n <td\n *ngFor=\"let column of formattedColumns\"\n [ngStyle]=\"column.style\"\n (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\"\n >\n <div *ngIf=\"column.type !== 'TOKENS' || !isArray(column.columnValue); else tokensTemplate\">\n <span *ngIf=\"column.type !== 'LINK'\" [sTooltip]=\"column.tooltip\" [escape]=\"false\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container>\n </span>\n\n <
|
|
9874
|
+
template: "<ng-template #columnsTemplate>\n <td\n *ngFor=\"let column of formattedColumns; let i = index\"\n [ngStyle]=\"column.style\"\n (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\"\n >\n <div *ngIf=\"column.type !== 'TOKENS' || !isArray(column.columnValue); else tokensTemplate\">\n <span *ngIf=\"column.type !== 'LINK'\" [sTooltip]=\"column.tooltip\" [escape]=\"false\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container>\n </span>\n\n <ng-container *ngIf=\"column.type === 'LINK'\">\n <span *ngIf=\"cellsData[i][0].isUninformed; else anchorTemplate\" class=\"sds-empty-value\">{{ cellsData[i][0].value }}</span>\n\n <ng-template #anchorTemplate>\n <a [sTooltip]=\"column.tooltip\" [escape]=\"false\" (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container>\n </a>\n </ng-template>\n </ng-container>\n\n <ng-template #columnValueTemplate>\n <ng-container *ngFor=\"let cellData of cellsData[i]\">\n <span *ngIf=\"cellData.isUninformed; else isInformedTemplate\" class=\"sds-empty-value\">{{ cellData.value }}</span>\n\n <ng-template #isInformedTemplate>\n <s-badge\n *ngIf=\"column.badgeConfigs; else withoutBadgeTemplate\"\n [sTooltip]=\"column.tooltip\"\n [color]=\"column.badgeConfigs.color\"\n [text]=\"cellData.value\"\n ></s-badge>\n\n <ng-template #withoutBadgeTemplate>\n <span>{{ cellData.value }}</span>\n </ng-template>\n </ng-template>\n\n <span *ngIf=\"cellData.separator\">{{ cellData.separator }}</span>\n </ng-container>\n\n <ng-container *ngIf=\"!!column.infoSign\">\n <span *sInfoSign=\"column.infoSign\"></span>\n </ng-container>\n </ng-template>\n </div>\n\n <ng-template #tokensTemplate>\n <s-token-list [tokens]=\"column.columnValue\" [hidePointerEvents]=\"true\"></s-token-list>\n\n <ng-container *ngIf=\"!!column.infoSign\">\n <span *sInfoSign=\"column.infoSign\"></span>\n </ng-container>\n </ng-template>\n </td>\n</ng-template>\n",
|
|
9873
9875
|
selector: "s-table-columns",
|
|
9874
9876
|
styles: [":host{display:none}"]
|
|
9875
9877
|
}),
|
|
@@ -17617,11 +17619,16 @@ var PanelComponent = /** @class */ (function () {
|
|
|
17617
17619
|
this.collapsable = false;
|
|
17618
17620
|
this.collapsed = false;
|
|
17619
17621
|
this.severity = EnumSeverity.Default;
|
|
17622
|
+
this.collapsedChange = new EventEmitter();
|
|
17620
17623
|
this.EnumSeverity = EnumSeverity;
|
|
17621
17624
|
}
|
|
17622
17625
|
PanelComponent.prototype.ngAfterContentInit = function () {
|
|
17623
17626
|
this._getTemplates();
|
|
17624
17627
|
};
|
|
17628
|
+
PanelComponent.prototype.toggleCollapsed = function () {
|
|
17629
|
+
this.collapsed = !this.collapsed;
|
|
17630
|
+
this.collapsedChange.emit(this.collapsed);
|
|
17631
|
+
};
|
|
17625
17632
|
PanelComponent.prototype._getCustomTemplate = function (type) {
|
|
17626
17633
|
var _a;
|
|
17627
17634
|
return (_a = this.templates.find(function (template) { return template.type === type; })) === null || _a === void 0 ? void 0 : _a.template;
|
|
@@ -17658,10 +17665,13 @@ var PanelComponent = /** @class */ (function () {
|
|
|
17658
17665
|
__decorate([
|
|
17659
17666
|
Input()
|
|
17660
17667
|
], PanelComponent.prototype, "borderButtonOptions", void 0);
|
|
17668
|
+
__decorate([
|
|
17669
|
+
Output()
|
|
17670
|
+
], PanelComponent.prototype, "collapsedChange", void 0);
|
|
17661
17671
|
PanelComponent = __decorate([
|
|
17662
17672
|
Component({
|
|
17663
17673
|
selector: "s-panel",
|
|
17664
|
-
template: "<div\n class=\"panel\"\n [ngClass]=\"{\n 'panel--success': severity === EnumSeverity.Success,\n 'panel--info': severity === EnumSeverity.Info,\n 'panel--warn': severity === EnumSeverity.Warn,\n 'panel--error': severity === EnumSeverity.Error,\n 'panel--collapsed': collapsed\n }\">\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n\n <div class=\"header\">\n <ng-container *ngIf=\"headerTemplate; then customHeaderTemplate; else simpleHeaderTemplate\"></ng-container>\n <ng-template #customHeaderTemplate>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #simpleHeaderTemplate>\n <span>{{ header }}</span>\n </ng-template>\n\n <button\n *ngIf=\"collapsable\"\n class=\"collapse-button fas\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed\n }\"\n (click)=\"
|
|
17674
|
+
template: "<div\n class=\"panel\"\n [ngClass]=\"{\n 'panel--success': severity === EnumSeverity.Success,\n 'panel--info': severity === EnumSeverity.Info,\n 'panel--warn': severity === EnumSeverity.Warn,\n 'panel--error': severity === EnumSeverity.Error,\n 'panel--collapsed': collapsed\n }\">\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n\n <div class=\"header\">\n <ng-container *ngIf=\"headerTemplate; then customHeaderTemplate; else simpleHeaderTemplate\"></ng-container>\n <ng-template #customHeaderTemplate>\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n </ng-template>\n <ng-template #simpleHeaderTemplate>\n <span>{{ header }}</span>\n </ng-template>\n\n <button\n *ngIf=\"collapsable\"\n class=\"collapse-button fas\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed\n }\"\n (click)=\"toggleCollapsed()\">\n </button>\n </div>\n <div *ngIf=\"!collapsable || !collapsed\" class=\"panel-content\">\n <div class=\"body\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"bodyTemplate\"></ng-container>\n </div>\n <div *ngIf=\"footerTemplate\" class=\"footer\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n </div>\n</div>",
|
|
17665
17675
|
animations: [
|
|
17666
17676
|
trigger("BorderButtonAnimation", [
|
|
17667
17677
|
transition(":enter", [
|