@seniorsistemas/angular-components 17.7.11 → 17.8.1
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 +87 -17
- 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/alert/alert.component.d.ts +13 -0
- package/components/alert/alert.module.d.ts +2 -0
- package/components/alert/index.d.ts +2 -0
- package/components/index.d.ts +1 -0
- package/components/table/table-column/models/column.interface.d.ts +1 -0
- package/components/table/table-column/table-columns.component.d.ts +7 -6
- package/esm2015/components/alert/alert.component.js +47 -0
- package/esm2015/components/alert/alert.module.js +15 -0
- package/esm2015/components/alert/index.js +3 -0
- package/esm2015/components/index.js +2 -1
- package/esm2015/components/table/table-column/models/column.interface.js +1 -1
- package/esm2015/components/table/table-column/table-columns.component.js +24 -18
- package/esm5/components/alert/alert.component.js +52 -0
- package/esm5/components/alert/alert.module.js +18 -0
- package/esm5/components/alert/index.js +3 -0
- package/esm5/components/index.js +2 -1
- package/esm5/components/table/table-column/models/column.interface.js +1 -1
- package/esm5/components/table/table-column/table-columns.component.js +24 -18
- package/fesm2015/seniorsistemas-angular-components.js +78 -18
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +86 -18
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -928,6 +928,68 @@
|
|
|
928
928
|
return AccordionModule;
|
|
929
929
|
}());
|
|
930
930
|
|
|
931
|
+
var AlertComponent = /** @class */ (function () {
|
|
932
|
+
function AlertComponent() {
|
|
933
|
+
this.severity = "info";
|
|
934
|
+
this.closable = true;
|
|
935
|
+
this.close = new core.EventEmitter();
|
|
936
|
+
this._isOpen = true;
|
|
937
|
+
}
|
|
938
|
+
Object.defineProperty(AlertComponent.prototype, "isOpen", {
|
|
939
|
+
get: function () {
|
|
940
|
+
return this._isOpen;
|
|
941
|
+
},
|
|
942
|
+
enumerable: true,
|
|
943
|
+
configurable: true
|
|
944
|
+
});
|
|
945
|
+
AlertComponent.prototype.closeAlert = function () {
|
|
946
|
+
this._isOpen = false;
|
|
947
|
+
};
|
|
948
|
+
AlertComponent.prototype.showAlert = function () {
|
|
949
|
+
this._isOpen = true;
|
|
950
|
+
};
|
|
951
|
+
AlertComponent.prototype.onClose = function () {
|
|
952
|
+
this.close.emit();
|
|
953
|
+
this.closeAlert();
|
|
954
|
+
};
|
|
955
|
+
__decorate([
|
|
956
|
+
core.Input()
|
|
957
|
+
], AlertComponent.prototype, "severity", void 0);
|
|
958
|
+
__decorate([
|
|
959
|
+
core.Input()
|
|
960
|
+
], AlertComponent.prototype, "summary", void 0);
|
|
961
|
+
__decorate([
|
|
962
|
+
core.Input()
|
|
963
|
+
], AlertComponent.prototype, "detail", void 0);
|
|
964
|
+
__decorate([
|
|
965
|
+
core.Input()
|
|
966
|
+
], AlertComponent.prototype, "closable", void 0);
|
|
967
|
+
__decorate([
|
|
968
|
+
core.Output()
|
|
969
|
+
], AlertComponent.prototype, "close", void 0);
|
|
970
|
+
AlertComponent = __decorate([
|
|
971
|
+
core.Component({
|
|
972
|
+
selector: "s-alert",
|
|
973
|
+
template: "<div class=\"alert\" [ngClass]=\"{\n 'alert--info': severity === 'info',\n 'alert--success': severity === 'success',\n 'alert--warning': severity === 'warning',\n 'alert--error': severity === 'error'\n}\">\n <div class=\"content\">\n <div class=\"icon-container\">\n <i class=\"fas fa-info\" [ngClass]=\"{\n 'fa-info': severity === 'info',\n 'fa-check': severity === 'success',\n 'fa-exclamation-triangle': severity === 'warning',\n 'fa-times': severity === 'error'\n }\"></i>\n </div>\n <div class=\"text-container\">\n <div class=\"text\">\n <span *ngIf=\"summary\" class=\"summary\">{{ summary }}</span>\n <span *ngIf=\"detail\" class=\"detail\">{{ detail }}</span>\n </div>\n </div>\n </div>\n <button *ngIf=\"closable\" class=\"close-option\" (click)=\"onClose()\">\n <i class=\"fas fa-times\"></i>\n </button>\n</div>",
|
|
974
|
+
styles: [".alert{-ms-flex-align:center;align-items:center;background-color:#f1f7f8;border-left:4px solid #428bca;border-radius:4px;box-shadow:1px 1px 2px rgba(0,0,0,.2);display:-ms-flexbox;display:flex;gap:16px;-ms-flex-pack:justify;justify-content:space-between;margin:8px;padding:12px 16px}.alert .content{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:16px}.alert .content .icon-container{-ms-flex-align:center;align-items:center;background-color:#428bca;border-radius:50%;color:#fff;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0;height:40px;-ms-flex-pack:center;justify-content:center;width:40px}.alert .content .text-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px}.alert .content .text-container .text{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start}.alert .content .text-container .text .detail,.alert .content .text-container .text .summary{color:#212533;font-family:\"Open Sans\",sans-serif;font-size:14px}.alert .content .text-container .text .summary{font-weight:700}.alert .close-option{background-color:transparent;border:none;color:#212533;cursor:pointer;font-size:16px;padding:4px}.alert--info{background-color:#f1f7f8;border-color:#428bca}.alert--info .content .icon-container{background-color:#428bca;color:#fff}.alert--success{background-color:#e0f0f0;border-color:#0c9348}.alert--success .content .icon-container{background-color:#0c9348;color:#fff}.alert--warning{background-color:#fef4e3;border-color:#fcbf10}.alert--warning .content .icon-container{background-color:#fcbf10;color:#212533}.alert--error{background-color:#fef0f0;border-color:#c13018}.alert--error .content .icon-container{background-color:#c13018;color:#fff}"]
|
|
975
|
+
})
|
|
976
|
+
], AlertComponent);
|
|
977
|
+
return AlertComponent;
|
|
978
|
+
}());
|
|
979
|
+
|
|
980
|
+
var AlertModule = /** @class */ (function () {
|
|
981
|
+
function AlertModule() {
|
|
982
|
+
}
|
|
983
|
+
AlertModule = __decorate([
|
|
984
|
+
core.NgModule({
|
|
985
|
+
imports: [common.CommonModule],
|
|
986
|
+
declarations: [AlertComponent],
|
|
987
|
+
exports: [AlertComponent],
|
|
988
|
+
})
|
|
989
|
+
], AlertModule);
|
|
990
|
+
return AlertModule;
|
|
991
|
+
}());
|
|
992
|
+
|
|
931
993
|
// Lembrar que toda vez que for adicionada uma cor nova, ser criada a referência no `EnumBadgeColors`
|
|
932
994
|
// do s-table-columns.
|
|
933
995
|
|
|
@@ -8225,8 +8287,29 @@
|
|
|
8225
8287
|
}
|
|
8226
8288
|
TableColumnsComponent.prototype.ngOnChanges = function (changes) {
|
|
8227
8289
|
this.validateComponentAttributes(changes);
|
|
8290
|
+
if (changes.columns && changes.columns.currentValue !== changes.columns.previousValue) {
|
|
8291
|
+
this.columns = this.sortColumnsBySequence(changes.columns.currentValue);
|
|
8292
|
+
}
|
|
8228
8293
|
this.createColumnsTemplate(changes);
|
|
8229
8294
|
};
|
|
8295
|
+
TableColumnsComponent.prototype.isArray = function (value) {
|
|
8296
|
+
return Array.isArray(value);
|
|
8297
|
+
};
|
|
8298
|
+
TableColumnsComponent.prototype.getSplittedString = function (column) {
|
|
8299
|
+
var columnValue = column.columnValue, separator = column.separator, uninformed = column.uninformed;
|
|
8300
|
+
if (typeof columnValue === "string") {
|
|
8301
|
+
var splittedString_1 = columnValue.split(separator);
|
|
8302
|
+
return splittedString_1.map(function (string, index) {
|
|
8303
|
+
var isLastIndex = splittedString_1.length - 1 === index;
|
|
8304
|
+
return {
|
|
8305
|
+
value: string,
|
|
8306
|
+
isUninformed: string === uninformed,
|
|
8307
|
+
separator: !isLastIndex ? separator : ""
|
|
8308
|
+
};
|
|
8309
|
+
});
|
|
8310
|
+
}
|
|
8311
|
+
return null;
|
|
8312
|
+
};
|
|
8230
8313
|
TableColumnsComponent.prototype.validateComponentAttributes = function (changes) {
|
|
8231
8314
|
var _a, _b, _c;
|
|
8232
8315
|
if (!this.columns && !((_a = changes.columns) === null || _a === void 0 ? void 0 : _a.currentValue)) {
|
|
@@ -8408,23 +8491,8 @@
|
|
|
8408
8491
|
TableColumnsComponent.prototype.isLabelObjectArray = function (values) {
|
|
8409
8492
|
return values.filter(function (value) { return (value === null || value === void 0 ? void 0 : value.label) !== null && (value === null || value === void 0 ? void 0 : value.label) !== undefined; }).length === values.length;
|
|
8410
8493
|
};
|
|
8411
|
-
TableColumnsComponent.prototype.
|
|
8412
|
-
return
|
|
8413
|
-
};
|
|
8414
|
-
TableColumnsComponent.prototype.getSplittedString = function (column) {
|
|
8415
|
-
var columnValue = column.columnValue, separator = column.separator, uninformed = column.uninformed;
|
|
8416
|
-
if (typeof columnValue === "string") {
|
|
8417
|
-
var splittedString_1 = columnValue.split(separator);
|
|
8418
|
-
return splittedString_1.map(function (string, index) {
|
|
8419
|
-
var isLastIndex = splittedString_1.length - 1 === index;
|
|
8420
|
-
return {
|
|
8421
|
-
value: string,
|
|
8422
|
-
isUninformed: string === uninformed,
|
|
8423
|
-
separator: !isLastIndex ? separator : ""
|
|
8424
|
-
};
|
|
8425
|
-
});
|
|
8426
|
-
}
|
|
8427
|
-
return null;
|
|
8494
|
+
TableColumnsComponent.prototype.sortColumnsBySequence = function (columns) {
|
|
8495
|
+
return columns.sort(function (a, b) { return a.sequence - b.sequence; });
|
|
8428
8496
|
};
|
|
8429
8497
|
TableColumnsComponent.ctorParameters = function () { return [
|
|
8430
8498
|
{ type: core.ViewContainerRef },
|
|
@@ -17930,6 +17998,8 @@
|
|
|
17930
17998
|
exports.AccordionComponent = AccordionComponent;
|
|
17931
17999
|
exports.AccordionModule = AccordionModule;
|
|
17932
18000
|
exports.AccordionPanelComponent = AccordionPanelComponent;
|
|
18001
|
+
exports.AlertComponent = AlertComponent;
|
|
18002
|
+
exports.AlertModule = AlertModule;
|
|
17933
18003
|
exports.AngularComponentsModule = AngularComponentsModule;
|
|
17934
18004
|
exports.AutocompleteField = AutocompleteField;
|
|
17935
18005
|
exports.BadgeComponent = BadgeComponent;
|