@seniorsistemas/angular-components 17.30.0-bugfix-sds-382-6e8be459 → 17.30.0-bugfix-sds-397-667ade0d
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 +48 -33
- 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/object-card/object-card.component.d.ts +6 -5
- package/components/utils/breakpoints.d.ts +7 -7
- package/esm2015/components/object-card/object-card.component.js +37 -33
- package/esm2015/components/table/table-paging/table-paging.component.js +3 -3
- package/esm2015/components/utils/breakpoints.js +1 -1
- package/esm5/components/object-card/object-card.component.js +49 -34
- package/esm5/components/table/table-paging/table-paging.component.js +3 -3
- package/esm5/components/utils/breakpoints.js +1 -1
- package/fesm2015/seniorsistemas-angular-components.js +37 -33
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +48 -33
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -10597,7 +10597,7 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
10597
10597
|
});
|
|
10598
10598
|
};
|
|
10599
10599
|
TablePagingComponent.prototype.getCurrentPageRowsToExport = function (columns) {
|
|
10600
|
-
var tableData = this.table.value;
|
|
10600
|
+
var tableData = __spread(this.table.value);
|
|
10601
10601
|
if (this.loadCurrentPageRecords) {
|
|
10602
10602
|
tableData = this.loadCurrentPageRecords();
|
|
10603
10603
|
}
|
|
@@ -10606,7 +10606,7 @@ var TablePagingComponent = /** @class */ (function () {
|
|
|
10606
10606
|
return this.mapColumnsTranslations(columns, tableData);
|
|
10607
10607
|
};
|
|
10608
10608
|
TablePagingComponent.prototype.getSelectedRowsToExport = function (columns) {
|
|
10609
|
-
var tableData = this.table.selection;
|
|
10609
|
+
var tableData = __spread(this.table.selection);
|
|
10610
10610
|
if (this.loadSelectedRecords) {
|
|
10611
10611
|
tableData = this.loadSelectedRecords();
|
|
10612
10612
|
}
|
|
@@ -19147,7 +19147,8 @@ var ObjectCardMainComponent = /** @class */ (function () {
|
|
|
19147
19147
|
}());
|
|
19148
19148
|
|
|
19149
19149
|
var ObjectCardComponent = /** @class */ (function () {
|
|
19150
|
-
function ObjectCardComponent() {
|
|
19150
|
+
function ObjectCardComponent(elementRef) {
|
|
19151
|
+
this.elementRef = elementRef;
|
|
19151
19152
|
this.id = "s-object-card-" + ObjectCardComponent_1.nextId++;
|
|
19152
19153
|
this.expanded = false;
|
|
19153
19154
|
this.expandTooltip = "Abrir painel";
|
|
@@ -19159,36 +19160,43 @@ var ObjectCardComponent = /** @class */ (function () {
|
|
|
19159
19160
|
this.EnumSeverity = EnumSeverity;
|
|
19160
19161
|
}
|
|
19161
19162
|
ObjectCardComponent_1 = ObjectCardComponent;
|
|
19163
|
+
ObjectCardComponent.prototype.ngAfterViewInit = function () {
|
|
19164
|
+
};
|
|
19162
19165
|
ObjectCardComponent.prototype.ngAfterContentChecked = function () {
|
|
19163
19166
|
this.update();
|
|
19164
19167
|
};
|
|
19165
19168
|
ObjectCardComponent.prototype.update = function () {
|
|
19169
|
+
var e_1, _a;
|
|
19166
19170
|
var windowWidth = window.innerWidth;
|
|
19167
|
-
var containerWidth = this.
|
|
19168
|
-
var mainFieldWidth =
|
|
19169
|
-
var remainingSpace = containerWidth - mainFieldWidth;
|
|
19171
|
+
var containerWidth = this.elementRef.nativeElement.offsetWidth;
|
|
19172
|
+
var mainFieldWidth = containerWidth * 0.3 > 260 ? containerWidth * 0.3 : 260;
|
|
19170
19173
|
var fieldsMinWidth = this.fieldsMinWidth;
|
|
19171
|
-
var expandIconWidth =
|
|
19172
|
-
var
|
|
19173
|
-
|
|
19174
|
-
|
|
19175
|
-
|
|
19176
|
-
|
|
19177
|
-
|
|
19174
|
+
var expandIconWidth = 50;
|
|
19175
|
+
var fieldElementList = this.elementRef.nativeElement.getElementsByClassName("s-object-card-field");
|
|
19176
|
+
try {
|
|
19177
|
+
for (var fieldElementList_1 = __values(fieldElementList), fieldElementList_1_1 = fieldElementList_1.next(); !fieldElementList_1_1.done; fieldElementList_1_1 = fieldElementList_1.next()) {
|
|
19178
|
+
var element = fieldElementList_1_1.value;
|
|
19179
|
+
element.style.minWidth = this.fieldsMinWidth + "px";
|
|
19180
|
+
}
|
|
19178
19181
|
}
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19182
|
-
|
|
19183
|
-
|
|
19182
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
19183
|
+
finally {
|
|
19184
|
+
try {
|
|
19185
|
+
if (fieldElementList_1_1 && !fieldElementList_1_1.done && (_a = fieldElementList_1.return)) _a.call(fieldElementList_1);
|
|
19186
|
+
}
|
|
19187
|
+
finally { if (e_1) throw e_1.error; }
|
|
19184
19188
|
}
|
|
19185
|
-
|
|
19186
|
-
|
|
19189
|
+
var maxFieldQtd;
|
|
19190
|
+
if (windowWidth <= Breakpoints.SM_MAX)
|
|
19191
|
+
maxFieldQtd = 0;
|
|
19192
|
+
else
|
|
19193
|
+
maxFieldQtd = Math.floor((containerWidth - mainFieldWidth) / fieldsMinWidth);
|
|
19194
|
+
if (maxFieldQtd && maxFieldQtd < this.fields.length) {
|
|
19195
|
+
maxFieldQtd = Math.floor((containerWidth - mainFieldWidth - expandIconWidth) / fieldsMinWidth);
|
|
19187
19196
|
}
|
|
19188
19197
|
this.maxVisibleFields = maxFieldQtd;
|
|
19189
|
-
if (maxFieldQtd >= this.fields.length && this.expanded)
|
|
19198
|
+
if (maxFieldQtd >= this.fields.length && this.expanded)
|
|
19190
19199
|
this.collapse();
|
|
19191
|
-
}
|
|
19192
19200
|
};
|
|
19193
19201
|
ObjectCardComponent.prototype.toggle = function () {
|
|
19194
19202
|
this.expanded ? this.collapse() : this.expand();
|
|
@@ -19201,8 +19209,24 @@ var ObjectCardComponent = /** @class */ (function () {
|
|
|
19201
19209
|
this.expanded = false;
|
|
19202
19210
|
this.expandedChange.emit(this.expanded);
|
|
19203
19211
|
};
|
|
19212
|
+
ObjectCardComponent.prototype.getExpandedFieldWidth = function () {
|
|
19213
|
+
var containerWidth = this.elementRef.nativeElement.offsetWidth;
|
|
19214
|
+
var fieldsPerRow;
|
|
19215
|
+
if (containerWidth <= Breakpoints.SM_MAX)
|
|
19216
|
+
fieldsPerRow = 1;
|
|
19217
|
+
else if (containerWidth <= Breakpoints.MD_MAX)
|
|
19218
|
+
fieldsPerRow = 2;
|
|
19219
|
+
else if (containerWidth <= Breakpoints.LG_MAX)
|
|
19220
|
+
fieldsPerRow = 4;
|
|
19221
|
+
else
|
|
19222
|
+
fieldsPerRow = 6;
|
|
19223
|
+
return 12 / fieldsPerRow;
|
|
19224
|
+
};
|
|
19204
19225
|
var ObjectCardComponent_1;
|
|
19205
19226
|
ObjectCardComponent.nextId = 0;
|
|
19227
|
+
ObjectCardComponent.ctorParameters = function () { return [
|
|
19228
|
+
{ type: ElementRef }
|
|
19229
|
+
]; };
|
|
19206
19230
|
__decorate([
|
|
19207
19231
|
Input()
|
|
19208
19232
|
], ObjectCardComponent.prototype, "id", void 0);
|
|
@@ -19233,19 +19257,10 @@ var ObjectCardComponent = /** @class */ (function () {
|
|
|
19233
19257
|
__decorate([
|
|
19234
19258
|
Input()
|
|
19235
19259
|
], ObjectCardComponent.prototype, "borderButtonOptions", void 0);
|
|
19236
|
-
__decorate([
|
|
19237
|
-
ViewChild('contentContainer', { static: true })
|
|
19238
|
-
], ObjectCardComponent.prototype, "container", void 0);
|
|
19239
|
-
__decorate([
|
|
19240
|
-
ViewChild('cardMainContainer', { static: true })
|
|
19241
|
-
], ObjectCardComponent.prototype, "cardMainContainer", void 0);
|
|
19242
|
-
__decorate([
|
|
19243
|
-
ViewChild('iconContainer', { static: true })
|
|
19244
|
-
], ObjectCardComponent.prototype, "iconContainer", void 0);
|
|
19245
19260
|
ObjectCardComponent = ObjectCardComponent_1 = __decorate([
|
|
19246
19261
|
Component({
|
|
19247
19262
|
selector: "s-object-card",
|
|
19248
|
-
template: "<div [id]=\"id\" class=\"container\">\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"object-card__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n\n <div\n [id]=\"id + '-main-container'\"\n class=\"main-container\"\n
|
|
19263
|
+
template: "<div [id]=\"id\" class=\"container\">\n <s-border-button\n *ngIf=\"\n borderButtonOptions?.visible\n ? borderButtonOptions?.visible(severity)\n : false\n \"\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"object-card__border-button\"\n [@BorderButtonAnimation]\n ></s-border-button>\n\n <div\n [id]=\"id + '-main-container'\"\n class=\"main-container\"\n [ngClass]=\"{\n 'with-hidden-fields': fields.length > maxVisibleFields,\n 'with-visible-fields': fields.length && maxVisibleFields,\n 'main-container--severity-default': severity === EnumSeverity.Default,\n 'main-container--severity-info': severity === EnumSeverity.Info,\n 'main-container--severity-warn': severity === EnumSeverity.Warn,\n 'main-container--severity-error': severity === EnumSeverity.Error,\n 'main-container--severity-success': severity == EnumSeverity.Success\n }\"\n >\n <div class=\"object-content\">\n <div class=\"s-object-card-main\"><ng-content select=\"s-object-card-main\"></ng-content></div>\n\n <div class=\"divider\" *ngIf=\"maxVisibleFields && fields.length\"></div>\n\n <div *ngFor=\"let field of (fields.toArray() | slice: 0:maxVisibleFields)\" class=\"s-object-card-field\">\n <ng-container *ngTemplateOutlet=\"field.content\"></ng-container>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expand-icon-container'\"\n class=\"expand-icon-container\"\n (click)=\"toggle()\"\n [pTooltip]=\"expanded ? collapseTooltip : expandTooltip\"\n tooltipPosition=\"top\"\n [showDelay]=\"500\"\n >\n <span [id]=\"id + '-expand-icon'\" class=\"expand-icon fa\" [ngClass]=\"{ 'fa-minus': expanded, 'fa-plus': !expanded }\"></span>\n </div>\n </div>\n\n <div\n [id]=\"id + '-expandable-container'\"\n [@expandableContent]=\"expanded\"\n class=\"expandable-container\"\n [ngClass]=\"{\n 'expandable-container--severity-default':\n severity === EnumSeverity.Default,\n 'expandable-container--severity-info': severity === EnumSeverity.Info,\n 'expandable-container--severity-warn': severity === EnumSeverity.Warn,\n 'expandable-container--severity-error': severity === EnumSeverity.Error,\n 'expandable-container--severity-success':\n severity == EnumSeverity.Success\n }\"\n >\n <div class=\"ui-g ui-g-12\">\n <ng-container\n *ngFor=\"\n let field of fields.toArray()\n | slice : maxVisibleFields : fields.length\n \"\n >\n <div class=\"ui-g-{{ getExpandedFieldWidth() }}\">\n <div class=\"s-object-card-field\">\n <ng-container\n *ngTemplateOutlet=\"field.content\"\n ></ng-container>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n",
|
|
19249
19264
|
animations: [
|
|
19250
19265
|
trigger("expandableContent", [
|
|
19251
19266
|
state("*", style$7({
|
|
@@ -19271,7 +19286,7 @@ var ObjectCardComponent = /** @class */ (function () {
|
|
|
19271
19286
|
]),
|
|
19272
19287
|
]),
|
|
19273
19288
|
],
|
|
19274
|
-
styles: [":host{display:block}
|
|
19289
|
+
styles: [":host{display:block}.container{margin-bottom:20px;position:relative}.main-container{display:-ms-flexbox;display:flex}.expandable-container,.main-container{background-color:#fff;border:1px solid #ccc;position:relative;overflow:hidden;width:100%}.expandable-container--severity-default{border-color:#ccc;border-top:initial}.expandable-container--severity-info{transition:border-color .5s;border-color:#428bca;border-top:initial}.expandable-container--severity-warn{transition:border-color .5s;border-color:#f8931f;border-top:initial}.expandable-container--severity-error{transition:border-color .5s;border-color:#c13018;border-top:initial}.expandable-container--severity-success{transition:border-color .5s;border-color:#0c9348;border-top:initial}.main-container--severity-default{border-color:#ccc}.main-container--severity-info{transition:border-color .5s;border-color:#428bca}.main-container--severity-warn{transition:border-color .5s;border-color:#f8931f}.main-container--severity-error{transition:border-color .5s;border-color:#c13018}.main-container--severity-success{transition:border-color .5s;border-color:#0c9348}.object-card__border-button{position:absolute;top:-13px;right:15px;z-index:1}.expandable-container{border-top:none;box-shadow:inset 0 6px 4px -4px #ddd;margin-top:-1px}.expand-icon-container{display:none;text-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;width:25px;position:absolute;right:15px;height:25px;top:calc(50% - 12px)}.expand-icon{-ms-flex:1;flex:1}.object-content{display:-ms-flexbox;display:flex;width:100%}.s-object-card-main{-ms-flex-negative:0;flex-shrink:0;-ms-flex-positive:1;flex-grow:1;overflow:hidden;padding:15px}.main-container.with-visible-fields .s-object-card-main{max-width:30%}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.main-container.with-visible-fields .s-object-card-main{width:20%}}.s-object-card-field{overflow:hidden;height:100%}.main-container .s-object-card-field{padding:15px}.main-container .divider{width:1px;-ms-flex-negative:0;flex-shrink:0;background-color:#ccc;margin:15px -1px 15px 0}.main-container.with-hidden-fields .object-content{width:calc(100% - 35px)}.main-container.with-hidden-fields .expand-icon-container{display:-ms-flexbox;display:flex}::ng-deep .object-card-button{padding-left:0!important;padding-right:10px!important;border:none!important;height:auto!important;min-width:auto!important;text-align:left!important}@media (max-width:767px){.s-object-card-main{max-width:calc(100% - 50px)}}"]
|
|
19275
19290
|
})
|
|
19276
19291
|
], ObjectCardComponent);
|
|
19277
19292
|
return ObjectCardComponent;
|