@seniorsistemas/angular-components 14.3.12 → 14.4.0
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 +146 -84
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/table/table-column/models/column-values.interface.d.ts +4 -1
- package/components/table/table-column/models/enum-column-field-type.d.ts +2 -1
- package/components/table/table-column/table-columns.component.d.ts +10 -0
- package/components/token-list/token-list.component.d.ts +2 -1
- package/esm2015/components/table/table-column/models/column-values.interface.js +1 -1
- package/esm2015/components/table/table-column/models/enum-column-field-type.js +2 -1
- package/esm2015/components/table/table-column/table-columns.component.js +63 -8
- package/esm2015/components/table/table.module.js +4 -2
- package/esm2015/components/token-list/token-list.component.js +7 -3
- package/esm2015/seniorsistemas-angular-components.js +31 -30
- package/esm5/components/table/table-column/models/column-values.interface.js +1 -1
- package/esm5/components/table/table-column/models/enum-column-field-type.js +2 -1
- package/esm5/components/table/table-column/table-columns.component.js +62 -7
- package/esm5/components/table/table.module.js +4 -2
- package/esm5/components/token-list/token-list.component.js +7 -3
- package/esm5/seniorsistemas-angular-components.js +31 -30
- package/fesm2015/seniorsistemas-angular-components.js +113 -52
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +117 -56
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.d.ts +30 -29
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -3576,6 +3576,7 @@
|
|
|
3576
3576
|
EnumColumnFieldType["ENUM"] = "ENUM";
|
|
3577
3577
|
EnumColumnFieldType["LOOKUP"] = "LOOKUP";
|
|
3578
3578
|
EnumColumnFieldType["LINK"] = "LINK";
|
|
3579
|
+
EnumColumnFieldType["TOKENS"] = "TOKENS";
|
|
3579
3580
|
})(exports.EnumColumnFieldType || (exports.EnumColumnFieldType = {}));
|
|
3580
3581
|
|
|
3581
3582
|
|
|
@@ -3650,7 +3651,7 @@
|
|
|
3650
3651
|
});
|
|
3651
3652
|
}
|
|
3652
3653
|
});
|
|
3653
|
-
if (attributeValue === null || attributeValue === undefined) {
|
|
3654
|
+
if (attributeValue === null || attributeValue === undefined || (_this.isArray(attributeValue) && !attributeValue.length)) {
|
|
3654
3655
|
return uninformed;
|
|
3655
3656
|
}
|
|
3656
3657
|
else {
|
|
@@ -3674,19 +3675,31 @@
|
|
|
3674
3675
|
return attributeValue;
|
|
3675
3676
|
case exports.EnumColumnFieldType.NUMBER:
|
|
3676
3677
|
return _this.applyMask(attributeValue, numberConfigs, false);
|
|
3678
|
+
case exports.EnumColumnFieldType.TOKENS:
|
|
3679
|
+
return _this.getTokens(attributeValue);
|
|
3677
3680
|
}
|
|
3678
3681
|
}
|
|
3679
|
-
})
|
|
3680
|
-
var
|
|
3682
|
+
});
|
|
3683
|
+
var unifiedColumnValues = columnValue.join(separator);
|
|
3684
|
+
var uninformedNumber = unifiedColumnValues
|
|
3681
3685
|
.split(separator)
|
|
3682
3686
|
.filter(function (value) { return value === uninformed; }).length;
|
|
3687
|
+
var formattedColumnValue;
|
|
3683
3688
|
if (uninformedNumber === column.attributes.length) {
|
|
3684
|
-
|
|
3689
|
+
formattedColumnValue = uninformed;
|
|
3690
|
+
}
|
|
3691
|
+
else if (column.type === exports.EnumColumnFieldType.TOKENS) {
|
|
3692
|
+
formattedColumnValue = [].concat.apply([], columnValue.filter(function (values) { return values !== uninformed; }));
|
|
3693
|
+
}
|
|
3694
|
+
else {
|
|
3695
|
+
formattedColumnValue = unifiedColumnValues;
|
|
3685
3696
|
}
|
|
3686
3697
|
return {
|
|
3687
3698
|
style: style,
|
|
3688
|
-
columnValue:
|
|
3699
|
+
columnValue: formattedColumnValue,
|
|
3689
3700
|
badgeClass: badgeClass,
|
|
3701
|
+
separator: separator,
|
|
3702
|
+
uninformed: uninformed,
|
|
3690
3703
|
type: column.type,
|
|
3691
3704
|
tooltip: this.getColumnTooltip(column.tooltip),
|
|
3692
3705
|
onLinkClick: column.onLinkClick,
|
|
@@ -3732,6 +3745,49 @@
|
|
|
3732
3745
|
var operator = rawValue.includes("-") && !isZero ? "-" : "";
|
|
3733
3746
|
return "" + operator + currencySymbol + " " + newValue;
|
|
3734
3747
|
};
|
|
3748
|
+
TableColumnsComponent.prototype.getTokens = function (values) {
|
|
3749
|
+
if (!this.isArray(values))
|
|
3750
|
+
throw new Error("To use tokens an array must be informed");
|
|
3751
|
+
// tslint:disable-next-line: max-line-length
|
|
3752
|
+
if (!this.isValidTokenArray(values))
|
|
3753
|
+
throw new Error("Not a valid token array. Token array must be a primitive values array or an objects with label attribute array");
|
|
3754
|
+
if (this.isLabelObjectArray(values))
|
|
3755
|
+
return values;
|
|
3756
|
+
return values
|
|
3757
|
+
.filter(function (value) { return value !== undefined && value !== null; })
|
|
3758
|
+
.map(function (value) {
|
|
3759
|
+
var label = typeof value === "symbol" ? value.toString() : "" + value;
|
|
3760
|
+
return {
|
|
3761
|
+
label: label
|
|
3762
|
+
};
|
|
3763
|
+
});
|
|
3764
|
+
};
|
|
3765
|
+
TableColumnsComponent.prototype.isValidTokenArray = function (values) {
|
|
3766
|
+
return this.isPrimitiveValuesArray(values) || this.isLabelObjectArray(values);
|
|
3767
|
+
};
|
|
3768
|
+
TableColumnsComponent.prototype.isPrimitiveValuesArray = function (values) {
|
|
3769
|
+
return values.filter(function (value) { return value !== Object(value); }).length === values.length;
|
|
3770
|
+
};
|
|
3771
|
+
TableColumnsComponent.prototype.isLabelObjectArray = function (values) {
|
|
3772
|
+
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;
|
|
3773
|
+
};
|
|
3774
|
+
TableColumnsComponent.prototype.isArray = function (value) {
|
|
3775
|
+
return Array.isArray(value);
|
|
3776
|
+
};
|
|
3777
|
+
TableColumnsComponent.prototype.getSplittedString = function (column) {
|
|
3778
|
+
var columnValue = column.columnValue, separator = column.separator, uninformed = column.uninformed;
|
|
3779
|
+
if (typeof columnValue === "string") {
|
|
3780
|
+
var splittedString_1 = columnValue.split(separator);
|
|
3781
|
+
return splittedString_1.map(function (string, index) {
|
|
3782
|
+
var isLastIndex = splittedString_1.length - 1 === index;
|
|
3783
|
+
return {
|
|
3784
|
+
value: string,
|
|
3785
|
+
isUninformed: string === uninformed,
|
|
3786
|
+
separator: !isLastIndex ? separator : ""
|
|
3787
|
+
};
|
|
3788
|
+
});
|
|
3789
|
+
}
|
|
3790
|
+
};
|
|
3735
3791
|
TableColumnsComponent.ctorParameters = function () { return [
|
|
3736
3792
|
{ type: core.ViewContainerRef },
|
|
3737
3793
|
{ type: core$1.TranslateService },
|
|
@@ -3751,7 +3807,7 @@
|
|
|
3751
3807
|
], TableColumnsComponent.prototype, "locale", void 0);
|
|
3752
3808
|
TableColumnsComponent = __decorate([
|
|
3753
3809
|
core.Component({
|
|
3754
|
-
template: "\n<ng-template #columnsTemplate>\n <td *ngFor=\"let column of formattedColumns\" [ngStyle]=\"column.style\" (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\">\n <span *ngIf=\"column.type !== 'LINK'\" [pTooltip]=\"column.tooltip\" [escape]=\"false\" [ngClass]=\"column.badgeClass\">
|
|
3810
|
+
template: "\n<ng-template #columnsTemplate>\n <td *ngFor=\"let column of formattedColumns\" [ngStyle]=\"column.style\" (click)=\"column.onColumnClick ? column.onColumnClick(rowValue) : null\">\n\n <div *ngIf=\"column.type !== 'TOKENS' || !isArray(column.columnValue); else tokensTemplate\">\n\n <span *ngIf=\"column.type !== 'LINK'\" [pTooltip]=\"column.tooltip\" [escape]=\"false\" [ngClass]=\"column.badgeClass\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </span>\n\n <a *ngIf=\"column.type === 'LINK'\" [pTooltip]=\"column.tooltip\" [escape]=\"false\" (click)=\"column.onLinkClick ? column.onLinkClick(rowValue) : null\">\n <ng-container *ngTemplateOutlet=\"columnValueTemplate\"></ng-container> \n </a>\n\n <ng-template #columnValueTemplate>\n <span *ngFor=\"let value of getSplittedString(column)\">\n <span [ngClass]=\"{ 'sds-pale-text': value.isUninformed }\">{{value.value}}</span>\n <span>{{value.separator}}</span>\n </span>\n </ng-template>\n\n </div>\n\n <ng-template #tokensTemplate>\n <s-token-list\n [tokens]=\"column.columnValue\"\n [hidePointerEvents]=\"true\"\n >\n </s-token-list>\n </ng-template>\n\n </td>\n</ng-template>\n",
|
|
3755
3811
|
selector: "s-table-columns",
|
|
3756
3812
|
styles: [":host { display: none; }"]
|
|
3757
3813
|
}),
|
|
@@ -3760,6 +3816,58 @@
|
|
|
3760
3816
|
return TableColumnsComponent;
|
|
3761
3817
|
}());
|
|
3762
3818
|
|
|
3819
|
+
var TokenListComponent = /** @class */ (function () {
|
|
3820
|
+
function TokenListComponent() {
|
|
3821
|
+
this.id = "s-token-list-" + TokenListComponent_1.nextId++;
|
|
3822
|
+
this.removableTokens = false;
|
|
3823
|
+
this.hidePointerEvents = false;
|
|
3824
|
+
this.tokenSelected = new core.EventEmitter();
|
|
3825
|
+
this.tokenRemoved = new core.EventEmitter();
|
|
3826
|
+
}
|
|
3827
|
+
TokenListComponent_1 = TokenListComponent;
|
|
3828
|
+
var TokenListComponent_1;
|
|
3829
|
+
TokenListComponent.nextId = 0;
|
|
3830
|
+
__decorate([
|
|
3831
|
+
core.Input()
|
|
3832
|
+
], TokenListComponent.prototype, "id", void 0);
|
|
3833
|
+
__decorate([
|
|
3834
|
+
core.Input()
|
|
3835
|
+
], TokenListComponent.prototype, "tokens", void 0);
|
|
3836
|
+
__decorate([
|
|
3837
|
+
core.Input()
|
|
3838
|
+
], TokenListComponent.prototype, "removableTokens", void 0);
|
|
3839
|
+
__decorate([
|
|
3840
|
+
core.Input()
|
|
3841
|
+
], TokenListComponent.prototype, "hidePointerEvents", void 0);
|
|
3842
|
+
__decorate([
|
|
3843
|
+
core.Output()
|
|
3844
|
+
], TokenListComponent.prototype, "tokenSelected", void 0);
|
|
3845
|
+
__decorate([
|
|
3846
|
+
core.Output()
|
|
3847
|
+
], TokenListComponent.prototype, "tokenRemoved", void 0);
|
|
3848
|
+
TokenListComponent = TokenListComponent_1 = __decorate([
|
|
3849
|
+
core.Component({
|
|
3850
|
+
selector: "s-token-list",
|
|
3851
|
+
template: "<div [id]=\"id\" class=\"token-list\">\n <ng-container *ngFor=\"let token of tokens\">\n <span [id]=\"token.id\" class=\"sds-token\" [ngClass]=\"{ 'noPointerEvents': hidePointerEvents }\">\n <a [id]=\"(token.id || 'token') + '-label'\" (click)=\"tokenSelected.next(token)\">{{token.label}}</a>\n <span [id]=\"token.id + '-remove'\" class=\"sds-token-icon fa fa-fw fa-close\" *ngIf=\"removableTokens\" (click)=\"tokenRemoved.next(token)\"></span>\n </span>\n </ng-container>\n</div>",
|
|
3852
|
+
styles: ["a,a:focus,a:hover{text-decoration:none;color:#333}.token-list{display:inline-block;vertical-align:middle;padding-left:10px;padding-right:10px}.noPointerEvents{pointer-events:none}"]
|
|
3853
|
+
})
|
|
3854
|
+
], TokenListComponent);
|
|
3855
|
+
return TokenListComponent;
|
|
3856
|
+
}());
|
|
3857
|
+
|
|
3858
|
+
var TokenListModule = /** @class */ (function () {
|
|
3859
|
+
function TokenListModule() {
|
|
3860
|
+
}
|
|
3861
|
+
TokenListModule = __decorate([
|
|
3862
|
+
core.NgModule({
|
|
3863
|
+
imports: [common.CommonModule],
|
|
3864
|
+
declarations: [TokenListComponent],
|
|
3865
|
+
exports: [TokenListComponent],
|
|
3866
|
+
})
|
|
3867
|
+
], TokenListModule);
|
|
3868
|
+
return TokenListModule;
|
|
3869
|
+
}());
|
|
3870
|
+
|
|
3763
3871
|
var TableModule = /** @class */ (function () {
|
|
3764
3872
|
function TableModule() {
|
|
3765
3873
|
}
|
|
@@ -3767,7 +3875,8 @@
|
|
|
3767
3875
|
core.NgModule({
|
|
3768
3876
|
imports: [
|
|
3769
3877
|
common.CommonModule,
|
|
3770
|
-
tooltip.TooltipModule
|
|
3878
|
+
tooltip.TooltipModule,
|
|
3879
|
+
TokenListModule
|
|
3771
3880
|
],
|
|
3772
3881
|
exports: [
|
|
3773
3882
|
RowTogllerDirective,
|
|
@@ -6421,54 +6530,6 @@
|
|
|
6421
6530
|
return TileModule;
|
|
6422
6531
|
}());
|
|
6423
6532
|
|
|
6424
|
-
var TokenListComponent = /** @class */ (function () {
|
|
6425
|
-
function TokenListComponent() {
|
|
6426
|
-
this.id = "s-token-list-" + TokenListComponent_1.nextId++;
|
|
6427
|
-
this.removableTokens = false;
|
|
6428
|
-
this.tokenSelected = new core.EventEmitter();
|
|
6429
|
-
this.tokenRemoved = new core.EventEmitter();
|
|
6430
|
-
}
|
|
6431
|
-
TokenListComponent_1 = TokenListComponent;
|
|
6432
|
-
var TokenListComponent_1;
|
|
6433
|
-
TokenListComponent.nextId = 0;
|
|
6434
|
-
__decorate([
|
|
6435
|
-
core.Input()
|
|
6436
|
-
], TokenListComponent.prototype, "id", void 0);
|
|
6437
|
-
__decorate([
|
|
6438
|
-
core.Input()
|
|
6439
|
-
], TokenListComponent.prototype, "tokens", void 0);
|
|
6440
|
-
__decorate([
|
|
6441
|
-
core.Input()
|
|
6442
|
-
], TokenListComponent.prototype, "removableTokens", void 0);
|
|
6443
|
-
__decorate([
|
|
6444
|
-
core.Output()
|
|
6445
|
-
], TokenListComponent.prototype, "tokenSelected", void 0);
|
|
6446
|
-
__decorate([
|
|
6447
|
-
core.Output()
|
|
6448
|
-
], TokenListComponent.prototype, "tokenRemoved", void 0);
|
|
6449
|
-
TokenListComponent = TokenListComponent_1 = __decorate([
|
|
6450
|
-
core.Component({
|
|
6451
|
-
selector: "s-token-list",
|
|
6452
|
-
template: "<div [id]=\"id\" class=\"token-list\">\n <ng-container *ngFor=\"let token of tokens\">\n <span [id]=\"token.id\" class=\"sds-token\">\n <a [id]=\"token.id + '-label'\" (click)=\"tokenSelected.next(token)\">{{token.label}}</a>\n <span [id]=\"token.id + '-remove'\" class=\"sds-token-icon fa fa-fw fa-close\" *ngIf=\"removableTokens\" (click)=\"tokenRemoved.next(token)\"></span>\n </span>\n </ng-container>\n</div>",
|
|
6453
|
-
styles: ["a,a:focus,a:hover{text-decoration:none;color:#333}.token-list{display:inline-block;vertical-align:middle;padding-left:10px;padding-right:10px}"]
|
|
6454
|
-
})
|
|
6455
|
-
], TokenListComponent);
|
|
6456
|
-
return TokenListComponent;
|
|
6457
|
-
}());
|
|
6458
|
-
|
|
6459
|
-
var TokenListModule = /** @class */ (function () {
|
|
6460
|
-
function TokenListModule() {
|
|
6461
|
-
}
|
|
6462
|
-
TokenListModule = __decorate([
|
|
6463
|
-
core.NgModule({
|
|
6464
|
-
imports: [common.CommonModule],
|
|
6465
|
-
declarations: [TokenListComponent],
|
|
6466
|
-
exports: [TokenListComponent],
|
|
6467
|
-
})
|
|
6468
|
-
], TokenListModule);
|
|
6469
|
-
return TokenListModule;
|
|
6470
|
-
}());
|
|
6471
|
-
|
|
6472
6533
|
|
|
6473
6534
|
(function (GlobalSearchSizeEnum) {
|
|
6474
6535
|
GlobalSearchSizeEnum["STANDARD"] = "STANDARD";
|
|
@@ -6891,35 +6952,36 @@
|
|
|
6891
6952
|
exports.TokenListComponent = TokenListComponent;
|
|
6892
6953
|
exports.TokenListModule = TokenListModule;
|
|
6893
6954
|
exports.ɵa = LocalizedCurrencyImpurePipe;
|
|
6894
|
-
exports.ɵb =
|
|
6895
|
-
exports.ɵba =
|
|
6896
|
-
exports.ɵbb =
|
|
6897
|
-
exports.ɵbc =
|
|
6898
|
-
exports.ɵbd =
|
|
6899
|
-
exports.ɵbe =
|
|
6900
|
-
exports.ɵ
|
|
6901
|
-
exports.ɵ
|
|
6902
|
-
exports.ɵ
|
|
6903
|
-
exports.ɵ
|
|
6904
|
-
exports.ɵ
|
|
6905
|
-
exports.ɵ
|
|
6906
|
-
exports.ɵ
|
|
6907
|
-
exports.ɵ
|
|
6908
|
-
exports.ɵ
|
|
6909
|
-
exports.ɵ
|
|
6910
|
-
exports.ɵ
|
|
6911
|
-
exports.ɵ
|
|
6912
|
-
exports.ɵ
|
|
6913
|
-
exports.ɵ
|
|
6914
|
-
exports.ɵ
|
|
6915
|
-
exports.ɵ
|
|
6916
|
-
exports.ɵ
|
|
6917
|
-
exports.ɵ
|
|
6918
|
-
exports.ɵ
|
|
6919
|
-
exports.ɵ
|
|
6920
|
-
exports.ɵ
|
|
6921
|
-
exports.ɵ
|
|
6922
|
-
exports.ɵ
|
|
6955
|
+
exports.ɵb = TokenListModule;
|
|
6956
|
+
exports.ɵba = FooterComponent;
|
|
6957
|
+
exports.ɵbb = InfoSignComponent;
|
|
6958
|
+
exports.ɵbc = NumberLocaleOptions;
|
|
6959
|
+
exports.ɵbd = ThumbnailService;
|
|
6960
|
+
exports.ɵbe = InfiniteScrollModule;
|
|
6961
|
+
exports.ɵbf = InfiniteScrollDirective;
|
|
6962
|
+
exports.ɵc = TableColumnsComponent;
|
|
6963
|
+
exports.ɵd = InfoSignModule;
|
|
6964
|
+
exports.ɵe = AutocompleteFieldComponent;
|
|
6965
|
+
exports.ɵf = BooleanFieldComponent;
|
|
6966
|
+
exports.ɵg = CalendarFieldComponent;
|
|
6967
|
+
exports.ɵh = ChipsFieldComponent;
|
|
6968
|
+
exports.ɵi = CurrencyFieldComponent;
|
|
6969
|
+
exports.ɵj = BaseFieldComponent;
|
|
6970
|
+
exports.ɵk = DynamicFieldComponent;
|
|
6971
|
+
exports.ɵl = DynamicFormDirective;
|
|
6972
|
+
exports.ɵm = FieldsetComponent;
|
|
6973
|
+
exports.ɵn = FileUploadComponent$1;
|
|
6974
|
+
exports.ɵo = LookupFieldComponent;
|
|
6975
|
+
exports.ɵp = NumberFieldComponent;
|
|
6976
|
+
exports.ɵq = RadioButtonComponent;
|
|
6977
|
+
exports.ɵr = RowComponent;
|
|
6978
|
+
exports.ɵs = SectionComponent;
|
|
6979
|
+
exports.ɵt = SelectFieldComponent;
|
|
6980
|
+
exports.ɵu = TextAreaFieldComponent;
|
|
6981
|
+
exports.ɵv = TextFieldComponent;
|
|
6982
|
+
exports.ɵx = DecimalField;
|
|
6983
|
+
exports.ɵy = StructureModule;
|
|
6984
|
+
exports.ɵz = HeaderComponent;
|
|
6923
6985
|
|
|
6924
6986
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6925
6987
|
|