@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
|
@@ -6519,7 +6519,8 @@ let LookupComponent = LookupComponent_1 = class LookupComponent {
|
|
|
6519
6519
|
return path.split(".").reduce((result, prop) => (result[prop] === undefined ? "" : result[prop]), obj);
|
|
6520
6520
|
}
|
|
6521
6521
|
getBadgeFromValue(value, options) {
|
|
6522
|
-
|
|
6522
|
+
var _a;
|
|
6523
|
+
return (_a = options === null || options === void 0 ? void 0 : options.find((opt) => opt.value === value)) === null || _a === void 0 ? void 0 : _a.badge;
|
|
6523
6524
|
}
|
|
6524
6525
|
getLabelForValue(value, options) {
|
|
6525
6526
|
if (!options)
|
|
@@ -9005,6 +9006,7 @@ let TableColumnsComponent = class TableColumnsComponent {
|
|
|
9005
9006
|
calendar: Object.assign(Object.assign({}, this.localeService.getLocaleOptions().calendar), { dateFormat: convertToMomentDateFormat(this.localeService.getLocaleOptions().calendar.dateFormat) }),
|
|
9006
9007
|
number: Object.assign(Object.assign({}, this.localeService.getLocaleOptions().number), { scale: 0 }),
|
|
9007
9008
|
};
|
|
9009
|
+
this.cellsData = [];
|
|
9008
9010
|
this.formattedColumns = [];
|
|
9009
9011
|
}
|
|
9010
9012
|
ngOnChanges(changes) {
|
|
@@ -9017,7 +9019,7 @@ let TableColumnsComponent = class TableColumnsComponent {
|
|
|
9017
9019
|
isArray(value) {
|
|
9018
9020
|
return Array.isArray(value);
|
|
9019
9021
|
}
|
|
9020
|
-
|
|
9022
|
+
getCellData(column) {
|
|
9021
9023
|
const { columnValue, separator, uninformed } = column;
|
|
9022
9024
|
if (typeof columnValue === "string") {
|
|
9023
9025
|
const splittedString = columnValue.split(separator);
|
|
@@ -9026,7 +9028,7 @@ let TableColumnsComponent = class TableColumnsComponent {
|
|
|
9026
9028
|
return {
|
|
9027
9029
|
value: string,
|
|
9028
9030
|
isUninformed: string === uninformed,
|
|
9029
|
-
separator: !isLastIndex ? separator :
|
|
9031
|
+
separator: !isLastIndex ? separator : null,
|
|
9030
9032
|
};
|
|
9031
9033
|
});
|
|
9032
9034
|
}
|
|
@@ -9047,8 +9049,8 @@ let TableColumnsComponent = class TableColumnsComponent {
|
|
|
9047
9049
|
const columns = ((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue) || this.columns;
|
|
9048
9050
|
const rowValue = ((_b = changes.rowValue) === null || _b === void 0 ? void 0 : _b.currentValue) || this.rowValue;
|
|
9049
9051
|
const locale = ((_c = changes.locale) === null || _c === void 0 ? void 0 : _c.currentValue) || this.locale;
|
|
9050
|
-
this.formattedColumns =
|
|
9051
|
-
|
|
9052
|
+
this.formattedColumns = columns.map(column => this.getColumnValue(column, rowValue, locale));
|
|
9053
|
+
this.cellsData = this.formattedColumns.map(column => this.getCellData(column));
|
|
9052
9054
|
this.viewContainerRef.createEmbeddedView(this.columnsTemplate);
|
|
9053
9055
|
}
|
|
9054
9056
|
getColumnSeparator(column) {
|
|
@@ -9238,7 +9240,7 @@ __decorate([
|
|
|
9238
9240
|
], TableColumnsComponent.prototype, "locale", void 0);
|
|
9239
9241
|
TableColumnsComponent = __decorate([
|
|
9240
9242
|
Component({
|
|
9241
|
-
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 <
|
|
9243
|
+
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",
|
|
9242
9244
|
selector: "s-table-columns",
|
|
9243
9245
|
styles: [":host{display:none}"]
|
|
9244
9246
|
}),
|
|
@@ -16458,11 +16460,16 @@ let PanelComponent = class PanelComponent {
|
|
|
16458
16460
|
this.collapsable = false;
|
|
16459
16461
|
this.collapsed = false;
|
|
16460
16462
|
this.severity = EnumSeverity.Default;
|
|
16463
|
+
this.collapsedChange = new EventEmitter();
|
|
16461
16464
|
this.EnumSeverity = EnumSeverity;
|
|
16462
16465
|
}
|
|
16463
16466
|
ngAfterContentInit() {
|
|
16464
16467
|
this._getTemplates();
|
|
16465
16468
|
}
|
|
16469
|
+
toggleCollapsed() {
|
|
16470
|
+
this.collapsed = !this.collapsed;
|
|
16471
|
+
this.collapsedChange.emit(this.collapsed);
|
|
16472
|
+
}
|
|
16466
16473
|
_getCustomTemplate(type) {
|
|
16467
16474
|
var _a;
|
|
16468
16475
|
return (_a = this.templates.find((template) => template.type === type)) === null || _a === void 0 ? void 0 : _a.template;
|
|
@@ -16500,10 +16507,13 @@ __decorate([
|
|
|
16500
16507
|
__decorate([
|
|
16501
16508
|
Input()
|
|
16502
16509
|
], PanelComponent.prototype, "borderButtonOptions", void 0);
|
|
16510
|
+
__decorate([
|
|
16511
|
+
Output()
|
|
16512
|
+
], PanelComponent.prototype, "collapsedChange", void 0);
|
|
16503
16513
|
PanelComponent = __decorate([
|
|
16504
16514
|
Component({
|
|
16505
16515
|
selector: "s-panel",
|
|
16506
|
-
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)=\"
|
|
16516
|
+
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>",
|
|
16507
16517
|
animations: [
|
|
16508
16518
|
trigger("BorderButtonAnimation", [
|
|
16509
16519
|
transition(":enter", [
|