@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
|
@@ -7116,7 +7116,8 @@
|
|
|
7116
7116
|
return path.split(".").reduce(function (result, prop) { return (result[prop] === undefined ? "" : result[prop]); }, obj);
|
|
7117
7117
|
};
|
|
7118
7118
|
LookupComponent.prototype.getBadgeFromValue = function (value, options) {
|
|
7119
|
-
|
|
7119
|
+
var _a;
|
|
7120
|
+
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;
|
|
7120
7121
|
};
|
|
7121
7122
|
LookupComponent.prototype.getLabelForValue = function (value, options) {
|
|
7122
7123
|
if (!options)
|
|
@@ -9780,6 +9781,7 @@
|
|
|
9780
9781
|
calendar: __assign(__assign({}, this.localeService.getLocaleOptions().calendar), { dateFormat: convertToMomentDateFormat(this.localeService.getLocaleOptions().calendar.dateFormat) }),
|
|
9781
9782
|
number: __assign(__assign({}, this.localeService.getLocaleOptions().number), { scale: 0 }),
|
|
9782
9783
|
};
|
|
9784
|
+
this.cellsData = [];
|
|
9783
9785
|
this.formattedColumns = [];
|
|
9784
9786
|
}
|
|
9785
9787
|
TableColumnsComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -9792,7 +9794,7 @@
|
|
|
9792
9794
|
TableColumnsComponent.prototype.isArray = function (value) {
|
|
9793
9795
|
return Array.isArray(value);
|
|
9794
9796
|
};
|
|
9795
|
-
TableColumnsComponent.prototype.
|
|
9797
|
+
TableColumnsComponent.prototype.getCellData = function (column) {
|
|
9796
9798
|
var columnValue = column.columnValue, separator = column.separator, uninformed = column.uninformed;
|
|
9797
9799
|
if (typeof columnValue === "string") {
|
|
9798
9800
|
var splittedString_1 = columnValue.split(separator);
|
|
@@ -9801,7 +9803,7 @@
|
|
|
9801
9803
|
return {
|
|
9802
9804
|
value: string,
|
|
9803
9805
|
isUninformed: string === uninformed,
|
|
9804
|
-
separator: !isLastIndex ? separator :
|
|
9806
|
+
separator: !isLastIndex ? separator : null,
|
|
9805
9807
|
};
|
|
9806
9808
|
});
|
|
9807
9809
|
}
|
|
@@ -9823,8 +9825,8 @@
|
|
|
9823
9825
|
var columns = ((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue) || this.columns;
|
|
9824
9826
|
var rowValue = ((_b = changes.rowValue) === null || _b === void 0 ? void 0 : _b.currentValue) || this.rowValue;
|
|
9825
9827
|
var locale = ((_c = changes.locale) === null || _c === void 0 ? void 0 : _c.currentValue) || this.locale;
|
|
9826
|
-
this.formattedColumns =
|
|
9827
|
-
|
|
9828
|
+
this.formattedColumns = columns.map(function (column) { return _this.getColumnValue(column, rowValue, locale); });
|
|
9829
|
+
this.cellsData = this.formattedColumns.map(function (column) { return _this.getCellData(column); });
|
|
9828
9830
|
this.viewContainerRef.createEmbeddedView(this.columnsTemplate);
|
|
9829
9831
|
};
|
|
9830
9832
|
TableColumnsComponent.prototype.getColumnSeparator = function (column) {
|
|
@@ -10014,7 +10016,7 @@
|
|
|
10014
10016
|
], TableColumnsComponent.prototype, "locale", void 0);
|
|
10015
10017
|
TableColumnsComponent = __decorate([
|
|
10016
10018
|
core.Component({
|
|
10017
|
-
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 <
|
|
10019
|
+
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",
|
|
10018
10020
|
selector: "s-table-columns",
|
|
10019
10021
|
styles: [":host{display:none}"]
|
|
10020
10022
|
}),
|
|
@@ -17762,11 +17764,16 @@
|
|
|
17762
17764
|
this.collapsable = false;
|
|
17763
17765
|
this.collapsed = false;
|
|
17764
17766
|
this.severity = exports.EnumSeverity.Default;
|
|
17767
|
+
this.collapsedChange = new core.EventEmitter();
|
|
17765
17768
|
this.EnumSeverity = exports.EnumSeverity;
|
|
17766
17769
|
}
|
|
17767
17770
|
PanelComponent.prototype.ngAfterContentInit = function () {
|
|
17768
17771
|
this._getTemplates();
|
|
17769
17772
|
};
|
|
17773
|
+
PanelComponent.prototype.toggleCollapsed = function () {
|
|
17774
|
+
this.collapsed = !this.collapsed;
|
|
17775
|
+
this.collapsedChange.emit(this.collapsed);
|
|
17776
|
+
};
|
|
17770
17777
|
PanelComponent.prototype._getCustomTemplate = function (type) {
|
|
17771
17778
|
var _a;
|
|
17772
17779
|
return (_a = this.templates.find(function (template) { return template.type === type; })) === null || _a === void 0 ? void 0 : _a.template;
|
|
@@ -17803,10 +17810,13 @@
|
|
|
17803
17810
|
__decorate([
|
|
17804
17811
|
core.Input()
|
|
17805
17812
|
], PanelComponent.prototype, "borderButtonOptions", void 0);
|
|
17813
|
+
__decorate([
|
|
17814
|
+
core.Output()
|
|
17815
|
+
], PanelComponent.prototype, "collapsedChange", void 0);
|
|
17806
17816
|
PanelComponent = __decorate([
|
|
17807
17817
|
core.Component({
|
|
17808
17818
|
selector: "s-panel",
|
|
17809
|
-
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)=\"
|
|
17819
|
+
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>",
|
|
17810
17820
|
animations: [
|
|
17811
17821
|
animations.trigger("BorderButtonAnimation", [
|
|
17812
17822
|
animations.transition(":enter", [
|