ngx-vector-components 3.1.0 → 3.3.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/CHANGELOG.md +21 -0
- package/assets/styles/_primeng-custom-theme.scss +10 -0
- package/esm2020/lib/components/fields/data-table/data-table.component.mjs +28 -21
- package/esm2020/lib/components/fields/dropdown-field/dropdown-field.component.mjs +9 -4
- package/esm2020/lib/components/fields/filters/filters.component.mjs +3 -3
- package/esm2020/lib/models/data-table.model.mjs +2 -1
- package/esm2020/lib/utils/mask.util.mjs +3 -3
- package/fesm2015/ngx-vector-components.mjs +40 -27
- package/fesm2015/ngx-vector-components.mjs.map +1 -1
- package/fesm2020/ngx-vector-components.mjs +40 -27
- package/fesm2020/ngx-vector-components.mjs.map +1 -1
- package/lib/components/fields/data-table/data-table.component.d.ts +2 -1
- package/lib/components/fields/dropdown-field/dropdown-field.component.d.ts +2 -1
- package/lib/components/fields/filters/filters.component.d.ts +1 -0
- package/lib/models/data-table.model.d.ts +4 -1
- package/package.json +1 -1
|
@@ -6,5 +6,6 @@ export var TableColumnType;
|
|
|
6
6
|
TableColumnType["ENUM"] = "ENUM";
|
|
7
7
|
TableColumnType["STATUS_BADGE"] = "STATUS_BADGE";
|
|
8
8
|
TableColumnType["ACTIVE_BOOLEAN_BADGE"] = "ACTIVE_BOOLEAN_BADGE";
|
|
9
|
+
TableColumnType["BUTTON"] = "BUTTON";
|
|
9
10
|
})(TableColumnType || (TableColumnType = {}));
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS10YWJsZS5tb2RlbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC12ZWN0b3ItY29tcG9uZW50cy9zcmMvbGliL21vZGVscy9kYXRhLXRhYmxlLm1vZGVsL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dGlvbj86IEZ1bmN0aW9uO1xyXG4gIGljb24/OiBzdHJpbmc7XHJcbn07XHJcblxyXG5leHBvcnQgdHlwZSBEYXRhVGFibGVMYXp5TG9hZEV2ZW50ID0ge1xyXG4gIHN0YXJ0OiBudW1iZXI7XHJcbiAgbGVuZ3RoOiBudW1iZXI7XHJcbiAgZHJhdzogbnVtYmVyO1xyXG4gIG9yZGVyOiB7IGNvbHVtbjogbnVtYmVyOyBkaXI6ICdhc2MnIHwgJ2Rlc2MnIH1bXTtcclxuICBjb2x1bW5zOiB7XHJcbiAgICBkYXRhOiBzdHJpbmc7XHJcbiAgICBuYW1lOiBzdHJpbmc7XHJcbiAgICBvcmRlcmFibGU6IGJvb2xlYW47XHJcbiAgICBzZWFyY2g6IHsgdmFsdWU6IHN0cmluZzsgcmVnZXg6IGJvb2xlYW4gfTtcclxuICAgIHNlYXJjaGFibGU6IGJvb2xlYW47XHJcbiAgfVtdO1xyXG4gIHNlYXJjaDogeyB2YWx1ZTogc3RyaW5nOyByZWdleDogYm9vbGVhbiB9O1xyXG59O1xyXG4iXX0=
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const CPF_PATTERN = '###.###.###-##';
|
|
2
2
|
const CNPJ_PATTERN = '##.###.###/####-##';
|
|
3
|
-
const BOLETO_PATTERN = '#####.##### #####.###### #####.###### # ##############';
|
|
3
|
+
const BOLETO_PATTERN = '#####.##### #####.###### #####.###### # ############## #';
|
|
4
4
|
const POSTALCODE_PATTERN = '#####-###';
|
|
5
5
|
const CELLPHONE_PATTERN = '(##) #####-####';
|
|
6
6
|
const PHONE_PATTERN = '(##) ####-####';
|
|
@@ -42,8 +42,8 @@ export class MaskUtil {
|
|
|
42
42
|
}
|
|
43
43
|
MaskUtil.CPF_TEXT_FIELD_PATTERN = '999.999.999-99';
|
|
44
44
|
MaskUtil.CNPJ_TEXT_FIELD_PATTERN = '99.999.999/9999-99';
|
|
45
|
-
MaskUtil.BOLETO_TEXT_FIELD_PATTERN = '99999.99999 99999.999999 99999.999999 9 99999999999999';
|
|
45
|
+
MaskUtil.BOLETO_TEXT_FIELD_PATTERN = '99999.99999 99999.999999 99999.999999 9 99999999999999 9';
|
|
46
46
|
MaskUtil.CELLPHONE_TEXT_FIELD_PATTERN = '(99) 99999-9999';
|
|
47
47
|
MaskUtil.PHONE_TEXT_FIELD_PATTERN = '(99) 9999-9999';
|
|
48
48
|
MaskUtil.POSTALCODE_TEXT_FIELD_PATTERN = '99999-999';
|
|
49
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzay51dGlsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvdXRpbHMvbWFzay51dGlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sV0FBVyxHQUFHLGdCQUFnQixDQUFDO0FBQ3JDLE1BQU0sWUFBWSxHQUFHLG9CQUFvQixDQUFDO0FBQzFDLE1BQU0sY0FBYyxHQUFHLDBEQUEwRCxDQUFDO0FBQ2xGLE1BQU0sa0JBQWtCLEdBQUcsV0FBVyxDQUFDO0FBQ3ZDLE1BQU0saUJBQWlCLEdBQUcsaUJBQWlCLENBQUM7QUFDNUMsTUFBTSxhQUFhLEdBQUcsZ0JBQWdCLENBQUM7QUFFdkMsTUFBTSxPQUFPLFFBQVE7SUFRWixNQUFNLENBQUMsY0FBYyxDQUFDLFdBQW1CO1FBQzlDLElBQUksQ0FBQyxXQUFXLEVBQUU7WUFDaEIsT0FBTyxFQUFFLENBQUM7U0FDWDtRQUVELElBQUksV0FBVyxDQUFDLE1BQU0sS0FBSyxFQUFFLEVBQUU7WUFDN0IsT0FBTyxJQUFJLENBQUMsWUFBWSxDQUFDLFdBQVcsRUFBRSxXQUFXLENBQUMs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HVybiB0aGlzLmRvTWFza1N0cmluZyhzdHJpbmdWYWx1ZSwgQk9MRVRPX1BBVFRFUk4pO1xyXG4gIH1cclxuXHJcbiAgcHVibGljIHN0YXRpYyBmb3JtYXRQaG9uZShzdHJpbmdWYWx1ZTogc3RyaW5nKSB7XHJcbiAgICBpZiAoIXN0cmluZ1ZhbHVlKSB7XHJcbiAgICAgIHJldHVybiAnJztcclxuICAgIH1cclxuXHJcbiAgICBpZiAoc3RyaW5nVmFsdWUubGVuZ3RoID09PSAxMSkge1xyXG4gICAgICByZXR1cm4gdGhpcy5kb01hc2tTdHJpbmcoc3RyaW5nVmFsdWUsIENFTExQSE9ORV9QQVRURVJOKTtcclxuICAgIH0gZWxzZSBpZiAoc3RyaW5nVmFsdWUubGVuZ3RoID09PSAxMCkge1xyXG4gICAgICByZXR1cm4gdGhpcy5kb01hc2tTdHJpbmcoc3RyaW5nVmFsdWUsIFBIT05FX1BBVFRFUk4pO1xyXG4gICAgfVxyXG5cclxuICAgIHJldHVybiBzdHJpbmdWYWx1ZTtcclxuICB9XHJcblxyXG4gIHByaXZhdGUgc3RhdGljIGRvTWFza1N0cmluZyhzdHI6IHN0cmluZywgcGF0dGVybjogc3RyaW5nKSB7XHJcbiAgICBsZXQgaSA9IDA7XHJcbiAgICByZXR1cm4gcGF0dGVybi5yZXBsYWNlKC8jL2csICgpID0+IHN0cltpKytdKTtcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -100,6 +100,7 @@ var TableColumnType;
|
|
|
100
100
|
TableColumnType["ENUM"] = "ENUM";
|
|
101
101
|
TableColumnType["STATUS_BADGE"] = "STATUS_BADGE";
|
|
102
102
|
TableColumnType["ACTIVE_BOOLEAN_BADGE"] = "ACTIVE_BOOLEAN_BADGE";
|
|
103
|
+
TableColumnType["BUTTON"] = "BUTTON";
|
|
103
104
|
})(TableColumnType || (TableColumnType = {}));
|
|
104
105
|
|
|
105
106
|
var DocumentType;
|
|
@@ -318,7 +319,7 @@ class FileUtil {
|
|
|
318
319
|
|
|
319
320
|
const CPF_PATTERN = '###.###.###-##';
|
|
320
321
|
const CNPJ_PATTERN = '##.###.###/####-##';
|
|
321
|
-
const BOLETO_PATTERN = '#####.##### #####.###### #####.###### # ##############';
|
|
322
|
+
const BOLETO_PATTERN = '#####.##### #####.###### #####.###### # ############## #';
|
|
322
323
|
const POSTALCODE_PATTERN = '#####-###';
|
|
323
324
|
const CELLPHONE_PATTERN = '(##) #####-####';
|
|
324
325
|
const PHONE_PATTERN = '(##) ####-####';
|
|
@@ -360,7 +361,7 @@ class MaskUtil {
|
|
|
360
361
|
}
|
|
361
362
|
MaskUtil.CPF_TEXT_FIELD_PATTERN = '999.999.999-99';
|
|
362
363
|
MaskUtil.CNPJ_TEXT_FIELD_PATTERN = '99.999.999/9999-99';
|
|
363
|
-
MaskUtil.BOLETO_TEXT_FIELD_PATTERN = '99999.99999 99999.999999 99999.999999 9 99999999999999';
|
|
364
|
+
MaskUtil.BOLETO_TEXT_FIELD_PATTERN = '99999.99999 99999.999999 99999.999999 9 99999999999999 9';
|
|
364
365
|
MaskUtil.CELLPHONE_TEXT_FIELD_PATTERN = '(99) 99999-9999';
|
|
365
366
|
MaskUtil.PHONE_TEXT_FIELD_PATTERN = '(99) 9999-9999';
|
|
366
367
|
MaskUtil.POSTALCODE_TEXT_FIELD_PATTERN = '99999-999';
|
|
@@ -1892,6 +1893,7 @@ class DropdownFieldComponent {
|
|
|
1892
1893
|
this.label = '';
|
|
1893
1894
|
this.paged = true;
|
|
1894
1895
|
this.hiddenErrorMessage = false;
|
|
1896
|
+
this.minLengthToService = 0;
|
|
1895
1897
|
this.onFocus = new EventEmitter();
|
|
1896
1898
|
this.isLoading = false;
|
|
1897
1899
|
this.pagedSuggestions = [];
|
|
@@ -1952,11 +1954,13 @@ class DropdownFieldComponent {
|
|
|
1952
1954
|
this.currentSearchQuery = ($event === null || $event === void 0 ? void 0 : $event.query.toUpperCase()) || '';
|
|
1953
1955
|
this.currentScrollPage = -1;
|
|
1954
1956
|
this.currentScrollIndex = 0;
|
|
1955
|
-
this.
|
|
1957
|
+
if (this.currentSearchQuery.length >= this.minLengthToService) {
|
|
1958
|
+
this.pageResults();
|
|
1959
|
+
}
|
|
1956
1960
|
}
|
|
1957
1961
|
onOpenAutocompletePanel() {
|
|
1958
1962
|
const autocompletePanel = document.querySelector('.p-autocomplete-panel');
|
|
1959
|
-
if (autocompletePanel && this.paged) {
|
|
1963
|
+
if (autocompletePanel && this.paged && this.currentSearchQuery.length >= this.minLengthToService) {
|
|
1960
1964
|
this.unlistenAutocompleteVirtualScroll = this.renderer.listen(autocompletePanel, 'scroll', (event) => {
|
|
1961
1965
|
if (event.target.scrollHeight - event.target.clientHeight === Math.round(event.target.scrollTop)) {
|
|
1962
1966
|
this.pageResults();
|
|
@@ -2023,7 +2027,7 @@ class DropdownFieldComponent {
|
|
|
2023
2027
|
}
|
|
2024
2028
|
}
|
|
2025
2029
|
DropdownFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DropdownFieldComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
2026
|
-
DropdownFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: DropdownFieldComponent, selector: "vector-dropdown-field", inputs: { options: "options", isRequired: "isRequired", control: "control", label: "label", service: "service", paged: "paged", buttonAction: "buttonAction", dependencies: "dependencies", hiddenErrorMessage: "hiddenErrorMessage", dynamicFilters: "dynamicFilters" }, outputs: { onFocus: "onFocus" }, ngImport: i0, template: "<div class=\"relative\">\r\n <div class=\"input-container\">\r\n <div class=\"input-inner-container\">\r\n <p-dropdown\r\n *ngIf=\"dynamicFilters\"\r\n ppendTo=\"body\"\r\n optionLabel=\"name\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDynamicFilter\"\r\n [options]=\"dynamicFilters\"\r\n >\r\n </p-dropdown>\r\n <p-autoComplete\r\n appendTo=\"body\"\r\n field=\"name\"\r\n dataKey=\"code\"\r\n [forceSelection]=\"true\"\r\n [dropdown]=\"true\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [suggestions]=\"pagedSuggestions\"\r\n [dropdownIcon]=\"dynamicFilters ? 'pi pi-search' : 'pi pi-chevron-down'\"\r\n (completeMethod)=\"search($event)\"\r\n (onShow)=\"onOpenAutocompletePanel()\"\r\n (onHide)=\"onHideAutocompletePanel()\"\r\n (onFocus)=\"onFocus.emit($event)\"\r\n >\r\n </p-autoComplete>\r\n </div>\r\n <vector-button\r\n *ngIf=\"buttonAction\"\r\n [label]=\"buttonAction.label\"\r\n [disabled]=\"!control.value\"\r\n (onClick)=\"buttonAction.onClick(control.value)\"\r\n ></vector-button>\r\n </div>\r\n <vector-field-error-message *ngIf=\"!hiddenErrorMessage\" [control]=\"control\"></vector-field-error-message>\r\n</div>\r\n", styles: [".input-container{display:flex;align-items:flex-end;width:100%}@media (max-width: 575px){.input-container{align-items:flex-start;flex-direction:column}}.input-container p-autoComplete{flex:1}@media (max-width: 575px){.input-container p-autoComplete{width:100%}}.input-container vector-button{margin-left:15px}@media (max-width: 575px){.input-container vector-button{margin-left:0;margin-top:10px;width:100%}}.input-container p-dropdown{margin-right:-5px;width:150px}@media (max-width: 575px){.input-container p-dropdown{width:100px}}.input-container .input-inner-container{display:flex;width:100%}\n"], components: [{ type: i1$6.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i2$6.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }, { type: ButtonComponent, selector: "vector-button", inputs: ["disabled", "label", "type", "leftIcon", "rightIcon", "noShadow", "style"], outputs: ["onClick"] }, { type: FieldErrorMessageComponent, selector: "vector-field-error-message", inputs: ["control"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
2030
|
+
DropdownFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: DropdownFieldComponent, selector: "vector-dropdown-field", inputs: { options: "options", isRequired: "isRequired", control: "control", label: "label", service: "service", paged: "paged", buttonAction: "buttonAction", dependencies: "dependencies", hiddenErrorMessage: "hiddenErrorMessage", dynamicFilters: "dynamicFilters", minLengthToService: "minLengthToService" }, outputs: { onFocus: "onFocus" }, ngImport: i0, template: "<div class=\"relative\">\r\n <div class=\"input-container\">\r\n <div class=\"input-inner-container\">\r\n <p-dropdown\r\n *ngIf=\"dynamicFilters\"\r\n ppendTo=\"body\"\r\n optionLabel=\"name\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDynamicFilter\"\r\n [options]=\"dynamicFilters\"\r\n >\r\n </p-dropdown>\r\n <p-autoComplete\r\n appendTo=\"body\"\r\n field=\"name\"\r\n dataKey=\"code\"\r\n [forceSelection]=\"true\"\r\n [dropdown]=\"true\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [suggestions]=\"pagedSuggestions\"\r\n [dropdownIcon]=\"dynamicFilters ? 'pi pi-search' : 'pi pi-chevron-down'\"\r\n (completeMethod)=\"search($event)\"\r\n (onShow)=\"onOpenAutocompletePanel()\"\r\n (onHide)=\"onHideAutocompletePanel()\"\r\n (onFocus)=\"onFocus.emit($event)\"\r\n >\r\n </p-autoComplete>\r\n </div>\r\n <vector-button\r\n *ngIf=\"buttonAction\"\r\n [label]=\"buttonAction.label\"\r\n [disabled]=\"!control.value\"\r\n (onClick)=\"buttonAction.onClick(control.value)\"\r\n ></vector-button>\r\n </div>\r\n <vector-field-error-message *ngIf=\"!hiddenErrorMessage\" [control]=\"control\"></vector-field-error-message>\r\n</div>\r\n", styles: [".input-container{display:flex;align-items:flex-end;width:100%}@media (max-width: 575px){.input-container{align-items:flex-start;flex-direction:column}}.input-container p-autoComplete{flex:1}@media (max-width: 575px){.input-container p-autoComplete{width:100%}}.input-container vector-button{margin-left:15px}@media (max-width: 575px){.input-container vector-button{margin-left:0;margin-top:10px;width:100%}}.input-container p-dropdown{margin-right:-5px;width:150px}@media (max-width: 575px){.input-container p-dropdown{width:100px}}.input-container .input-inner-container{display:flex;width:100%}\n"], components: [{ type: i1$6.Dropdown, selector: "p-dropdown", inputs: ["scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "selectId", "dataKey", "filterBy", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "virtualScroll", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "disabled", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear"] }, { type: i2$6.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "virtualScroll", "itemSize", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "field", "scrollHeight", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "suggestions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide"] }, { type: ButtonComponent, selector: "vector-button", inputs: ["disabled", "label", "type", "leftIcon", "rightIcon", "noShadow", "style"], outputs: ["onClick"] }, { type: FieldErrorMessageComponent, selector: "vector-field-error-message", inputs: ["control"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2$4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i2$4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
2027
2031
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DropdownFieldComponent, decorators: [{
|
|
2028
2032
|
type: Component,
|
|
2029
2033
|
args: [{ selector: 'vector-dropdown-field', template: "<div class=\"relative\">\r\n <div class=\"input-container\">\r\n <div class=\"input-inner-container\">\r\n <p-dropdown\r\n *ngIf=\"dynamicFilters\"\r\n ppendTo=\"body\"\r\n optionLabel=\"name\"\r\n optionValue=\"code\"\r\n [(ngModel)]=\"selectedDynamicFilter\"\r\n [options]=\"dynamicFilters\"\r\n >\r\n </p-dropdown>\r\n <p-autoComplete\r\n appendTo=\"body\"\r\n field=\"name\"\r\n dataKey=\"code\"\r\n [forceSelection]=\"true\"\r\n [dropdown]=\"true\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [suggestions]=\"pagedSuggestions\"\r\n [dropdownIcon]=\"dynamicFilters ? 'pi pi-search' : 'pi pi-chevron-down'\"\r\n (completeMethod)=\"search($event)\"\r\n (onShow)=\"onOpenAutocompletePanel()\"\r\n (onHide)=\"onHideAutocompletePanel()\"\r\n (onFocus)=\"onFocus.emit($event)\"\r\n >\r\n </p-autoComplete>\r\n </div>\r\n <vector-button\r\n *ngIf=\"buttonAction\"\r\n [label]=\"buttonAction.label\"\r\n [disabled]=\"!control.value\"\r\n (onClick)=\"buttonAction.onClick(control.value)\"\r\n ></vector-button>\r\n </div>\r\n <vector-field-error-message *ngIf=\"!hiddenErrorMessage\" [control]=\"control\"></vector-field-error-message>\r\n</div>\r\n", styles: [".input-container{display:flex;align-items:flex-end;width:100%}@media (max-width: 575px){.input-container{align-items:flex-start;flex-direction:column}}.input-container p-autoComplete{flex:1}@media (max-width: 575px){.input-container p-autoComplete{width:100%}}.input-container vector-button{margin-left:15px}@media (max-width: 575px){.input-container vector-button{margin-left:0;margin-top:10px;width:100%}}.input-container p-dropdown{margin-right:-5px;width:150px}@media (max-width: 575px){.input-container p-dropdown{width:100px}}.input-container .input-inner-container{display:flex;width:100%}\n"] }]
|
|
@@ -2047,6 +2051,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
2047
2051
|
type: Input
|
|
2048
2052
|
}], dynamicFilters: [{
|
|
2049
2053
|
type: Input
|
|
2054
|
+
}], minLengthToService: [{
|
|
2055
|
+
type: Input
|
|
2050
2056
|
}], onFocus: [{
|
|
2051
2057
|
type: Output
|
|
2052
2058
|
}] } });
|
|
@@ -2185,10 +2191,10 @@ class FiltersComponent {
|
|
|
2185
2191
|
}
|
|
2186
2192
|
}
|
|
2187
2193
|
FiltersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: FiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2188
|
-
FiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: FiltersComponent, selector: "vector-filters", inputs: { fields: "fields" }, outputs: { onSearch: "onSearch" }, ngImport: i0, template: "<div class=\"grid filter-container\" [ngClass]=\"{ 'display-none': hideFilters }\" [formGroup]=\"formGroup\">\r\n <div *ngFor=\"let field of fields | notHidden\" class=\"field col-12 sm:col-8 {{ getGridClass(field) }}\">\r\n <label>{{ field.label }}</label>\r\n <vector-text-field\r\n *ngIf=\"isTextFieldType(field)\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [mask]=\"field.mask\"\r\n [label]=\"field.placeholder\"\r\n [isRequired]=\"field.required\"\r\n [numeric]=\"field.type === fieldTypes.NUMBER\"\r\n ></vector-text-field>\r\n <vector-dropdown-field\r\n *ngIf=\"field.type === fieldTypes.DROPDOWN || field.type === fieldTypes.DYNAMIC_DROPDOWN\"\r\n [dynamicFilters]=\"field.filterTypes\"\r\n [options]=\"field.options || []\"\r\n [service]=\"field.service\"\r\n [isRequired]=\"field.required\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [paged]=\"false\"\r\n [dependencies]=\"getFieldDependencies(field)\"\r\n ></vector-dropdown-field>\r\n <vector-currency-field\r\n *ngIf=\"field.type === fieldTypes.CURRENCY\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [outlined]=\"true\"\r\n ></vector-currency-field>\r\n <vector-calendar-field\r\n *ngIf=\"field.type === fieldTypes.DATE\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [isRequired]=\"field.required\"\r\n [label]=\"field.placeholder || ''\"\r\n ></vector-calendar-field>\r\n <vector-select-button-field\r\n *ngIf=\"field.type === fieldTypes.SELECT_BUTTON\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [options]=\"field.options\"\r\n >\r\n </vector-select-button-field>\r\n </div>\r\n <div class=\"search-button sm:col-4\">\r\n <vector-button\r\n label=\"Pesquisar\"\r\n (click)=\"search()\"\r\n [disabled]=\"!formGroup.valid\"\r\n style=\"float: right; width: 150px\"\r\n ></vector-button>\r\n </div>\r\n</div>\r\n", styles: [".filter-container{align-items:center}.filter-container .field{display:flex;flex-direction:column}.filter-container .search-button{flex:1;padding-right:7px}@media (min-width: 768px){.filter-container .search-button{padding-top:36px}}.display-none{display:none!important}\n"], components: [{ type: TextFieldComponent, selector: "vector-text-field", inputs: ["isRequired", "label", "maxlength", "isPassword", "numeric", "decimal", "onlyText", "alphaNumeric", "mask", "autoClear", "rightIcon", "centered", "enableDocumentTypeChoice", "hiddenErrorMessage", "control"], outputs: ["blurEvent", "enterKeyPress", "focusEvent", "onDocumentTypeChange"] }, { type: DropdownFieldComponent, selector: "vector-dropdown-field", inputs: ["options", "isRequired", "control", "label", "service", "paged", "buttonAction", "dependencies", "hiddenErrorMessage", "dynamicFilters"], outputs: ["onFocus"] }, { type: CurrencyFieldComponent, selector: "vector-currency-field", inputs: ["minValue", "maxValue", "placeholder", "control", "outlined", "rounded", "label", "isBankingField"] }, { type: CalendarComponent, selector: "vector-calendar-field", inputs: ["isRequired", "control", "label", "showCalendarOnFocus", "min", "max", "disabledDates", "disabled", "defaultDate", "hiddenErrorMessage"] }, { type: SelectButtonFieldComponent, selector: "vector-select-button-field", inputs: ["options", "control"] }, { type: ButtonComponent, selector: "vector-button", inputs: ["disabled", "label", "type", "leftIcon", "rightIcon", "noShadow", "style"], outputs: ["onClick"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "notHidden": NotHiddenPipe } });
|
|
2194
|
+
FiltersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: FiltersComponent, selector: "vector-filters", inputs: { fields: "fields" }, outputs: { onSearch: "onSearch" }, ngImport: i0, template: "<div class=\"grid filter-container\" [ngClass]=\"{ 'display-none': hideFilters }\" [formGroup]=\"formGroup\">\r\n <div *ngFor=\"let field of fields | notHidden\" class=\"field col-12 sm:col-8 {{ getGridClass(field) }}\">\r\n <label>{{ field.label }}</label>\r\n <vector-text-field\r\n *ngIf=\"isTextFieldType(field)\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [mask]=\"field.mask\"\r\n [label]=\"field.placeholder\"\r\n [isRequired]=\"field.required\"\r\n [numeric]=\"field.type === fieldTypes.NUMBER\"\r\n ></vector-text-field>\r\n <vector-dropdown-field\r\n *ngIf=\"field.type === fieldTypes.DROPDOWN || field.type === fieldTypes.DYNAMIC_DROPDOWN\"\r\n [dynamicFilters]=\"field.filterTypes\"\r\n [options]=\"field.options || []\"\r\n [service]=\"field.service\"\r\n [isRequired]=\"field.required\"\r\n [minLengthToService]=\"field.minLengthToService\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [paged]=\"false\"\r\n [dependencies]=\"getFieldDependencies(field)\"\r\n ></vector-dropdown-field>\r\n <vector-currency-field\r\n *ngIf=\"field.type === fieldTypes.CURRENCY\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [outlined]=\"true\"\r\n ></vector-currency-field>\r\n <vector-calendar-field\r\n *ngIf=\"field.type === fieldTypes.DATE\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [isRequired]=\"field.required\"\r\n [label]=\"field.placeholder || ''\"\r\n ></vector-calendar-field>\r\n <vector-select-button-field\r\n *ngIf=\"field.type === fieldTypes.SELECT_BUTTON\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [options]=\"field.options\"\r\n >\r\n </vector-select-button-field>\r\n </div>\r\n <div class=\"search-button sm:col-4\">\r\n <vector-button\r\n label=\"Pesquisar\"\r\n (click)=\"search()\"\r\n [disabled]=\"!formGroup.valid\"\r\n style=\"float: right; width: 150px\"\r\n ></vector-button>\r\n </div>\r\n</div>\r\n", styles: [".filter-container{align-items:center}.filter-container .field{display:flex;flex-direction:column}.filter-container .search-button{flex:1;padding-right:7px}@media (min-width: 768px){.filter-container .search-button{padding-top:36px}}.display-none{display:none!important}\n"], components: [{ type: TextFieldComponent, selector: "vector-text-field", inputs: ["isRequired", "label", "maxlength", "isPassword", "numeric", "decimal", "onlyText", "alphaNumeric", "mask", "autoClear", "rightIcon", "centered", "enableDocumentTypeChoice", "hiddenErrorMessage", "control"], outputs: ["blurEvent", "enterKeyPress", "focusEvent", "onDocumentTypeChange"] }, { type: DropdownFieldComponent, selector: "vector-dropdown-field", inputs: ["options", "isRequired", "control", "label", "service", "paged", "buttonAction", "dependencies", "hiddenErrorMessage", "dynamicFilters", "minLengthToService"], outputs: ["onFocus"] }, { type: CurrencyFieldComponent, selector: "vector-currency-field", inputs: ["minValue", "maxValue", "placeholder", "control", "outlined", "rounded", "label", "isBankingField"] }, { type: CalendarComponent, selector: "vector-calendar-field", inputs: ["isRequired", "control", "label", "showCalendarOnFocus", "min", "max", "disabledDates", "disabled", "defaultDate", "hiddenErrorMessage"] }, { type: SelectButtonFieldComponent, selector: "vector-select-button-field", inputs: ["options", "control"] }, { type: ButtonComponent, selector: "vector-button", inputs: ["disabled", "label", "type", "leftIcon", "rightIcon", "noShadow", "style"], outputs: ["onClick"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2$4.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "notHidden": NotHiddenPipe } });
|
|
2189
2195
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: FiltersComponent, decorators: [{
|
|
2190
2196
|
type: Component,
|
|
2191
|
-
args: [{ selector: 'vector-filters', template: "<div class=\"grid filter-container\" [ngClass]=\"{ 'display-none': hideFilters }\" [formGroup]=\"formGroup\">\r\n <div *ngFor=\"let field of fields | notHidden\" class=\"field col-12 sm:col-8 {{ getGridClass(field) }}\">\r\n <label>{{ field.label }}</label>\r\n <vector-text-field\r\n *ngIf=\"isTextFieldType(field)\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [mask]=\"field.mask\"\r\n [label]=\"field.placeholder\"\r\n [isRequired]=\"field.required\"\r\n [numeric]=\"field.type === fieldTypes.NUMBER\"\r\n ></vector-text-field>\r\n <vector-dropdown-field\r\n *ngIf=\"field.type === fieldTypes.DROPDOWN || field.type === fieldTypes.DYNAMIC_DROPDOWN\"\r\n [dynamicFilters]=\"field.filterTypes\"\r\n [options]=\"field.options || []\"\r\n [service]=\"field.service\"\r\n [isRequired]=\"field.required\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [paged]=\"false\"\r\n [dependencies]=\"getFieldDependencies(field)\"\r\n ></vector-dropdown-field>\r\n <vector-currency-field\r\n *ngIf=\"field.type === fieldTypes.CURRENCY\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [outlined]=\"true\"\r\n ></vector-currency-field>\r\n <vector-calendar-field\r\n *ngIf=\"field.type === fieldTypes.DATE\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [isRequired]=\"field.required\"\r\n [label]=\"field.placeholder || ''\"\r\n ></vector-calendar-field>\r\n <vector-select-button-field\r\n *ngIf=\"field.type === fieldTypes.SELECT_BUTTON\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [options]=\"field.options\"\r\n >\r\n </vector-select-button-field>\r\n </div>\r\n <div class=\"search-button sm:col-4\">\r\n <vector-button\r\n label=\"Pesquisar\"\r\n (click)=\"search()\"\r\n [disabled]=\"!formGroup.valid\"\r\n style=\"float: right; width: 150px\"\r\n ></vector-button>\r\n </div>\r\n</div>\r\n", styles: [".filter-container{align-items:center}.filter-container .field{display:flex;flex-direction:column}.filter-container .search-button{flex:1;padding-right:7px}@media (min-width: 768px){.filter-container .search-button{padding-top:36px}}.display-none{display:none!important}\n"] }]
|
|
2197
|
+
args: [{ selector: 'vector-filters', template: "<div class=\"grid filter-container\" [ngClass]=\"{ 'display-none': hideFilters }\" [formGroup]=\"formGroup\">\r\n <div *ngFor=\"let field of fields | notHidden\" class=\"field col-12 sm:col-8 {{ getGridClass(field) }}\">\r\n <label>{{ field.label }}</label>\r\n <vector-text-field\r\n *ngIf=\"isTextFieldType(field)\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [mask]=\"field.mask\"\r\n [label]=\"field.placeholder\"\r\n [isRequired]=\"field.required\"\r\n [numeric]=\"field.type === fieldTypes.NUMBER\"\r\n ></vector-text-field>\r\n <vector-dropdown-field\r\n *ngIf=\"field.type === fieldTypes.DROPDOWN || field.type === fieldTypes.DYNAMIC_DROPDOWN\"\r\n [dynamicFilters]=\"field.filterTypes\"\r\n [options]=\"field.options || []\"\r\n [service]=\"field.service\"\r\n [isRequired]=\"field.required\"\r\n [minLengthToService]=\"field.minLengthToService\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [paged]=\"false\"\r\n [dependencies]=\"getFieldDependencies(field)\"\r\n ></vector-dropdown-field>\r\n <vector-currency-field\r\n *ngIf=\"field.type === fieldTypes.CURRENCY\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [outlined]=\"true\"\r\n ></vector-currency-field>\r\n <vector-calendar-field\r\n *ngIf=\"field.type === fieldTypes.DATE\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [isRequired]=\"field.required\"\r\n [label]=\"field.placeholder || ''\"\r\n ></vector-calendar-field>\r\n <vector-select-button-field\r\n *ngIf=\"field.type === fieldTypes.SELECT_BUTTON\"\r\n [control]=\"formGroup.get(field.name)\"\r\n [options]=\"field.options\"\r\n >\r\n </vector-select-button-field>\r\n </div>\r\n <div class=\"search-button sm:col-4\">\r\n <vector-button\r\n label=\"Pesquisar\"\r\n (click)=\"search()\"\r\n [disabled]=\"!formGroup.valid\"\r\n style=\"float: right; width: 150px\"\r\n ></vector-button>\r\n </div>\r\n</div>\r\n", styles: [".filter-container{align-items:center}.filter-container .field{display:flex;flex-direction:column}.filter-container .search-button{flex:1;padding-right:7px}@media (min-width: 768px){.filter-container .search-button{padding-top:36px}}.display-none{display:none!important}\n"] }]
|
|
2192
2198
|
}], ctorParameters: function () { return []; }, propDecorators: { fields: [{
|
|
2193
2199
|
type: Input
|
|
2194
2200
|
}], onSearch: [{
|
|
@@ -2207,6 +2213,7 @@ class DataTableComponent {
|
|
|
2207
2213
|
this.pagination = true;
|
|
2208
2214
|
this.virtualPagination = false;
|
|
2209
2215
|
this.addItemButtonPlusSign = false;
|
|
2216
|
+
this.hasActions = true;
|
|
2210
2217
|
this.onLazyLoad = new EventEmitter();
|
|
2211
2218
|
this.onFilter = new EventEmitter();
|
|
2212
2219
|
this.onAdd = new EventEmitter();
|
|
@@ -2234,6 +2241,24 @@ class DataTableComponent {
|
|
|
2234
2241
|
}
|
|
2235
2242
|
lazyLoaded(params = { filter: false, data: { start: 0, rows: 10 } }) {
|
|
2236
2243
|
if (!params.filter) {
|
|
2244
|
+
const columns = this.columns.map((col) => {
|
|
2245
|
+
return {
|
|
2246
|
+
data: col.field,
|
|
2247
|
+
name: `${col.field.substring(0, 1).toUpperCase()}${col.field.substring(1, col.field.length)}`,
|
|
2248
|
+
orderable: true,
|
|
2249
|
+
search: { value: '', regex: false },
|
|
2250
|
+
searchable: true,
|
|
2251
|
+
};
|
|
2252
|
+
});
|
|
2253
|
+
if (this.hasActions) {
|
|
2254
|
+
columns.unshift({
|
|
2255
|
+
data: 'active',
|
|
2256
|
+
name: 'Active',
|
|
2257
|
+
orderable: true,
|
|
2258
|
+
search: { value: '', regex: false },
|
|
2259
|
+
searchable: true,
|
|
2260
|
+
});
|
|
2261
|
+
}
|
|
2237
2262
|
this.lastLazyLoadEvent = Object.assign(Object.assign({}, (this.lastLazyLoadEvent || {})), { start: params.data.first, length: params.data.rows, draw: this.draw++, order: params.data.sortField
|
|
2238
2263
|
? [
|
|
2239
2264
|
{
|
|
@@ -2241,24 +2266,7 @@ class DataTableComponent {
|
|
|
2241
2266
|
dir: params.data.sortOrder > 0 ? 'asc' : 'desc',
|
|
2242
2267
|
},
|
|
2243
2268
|
]
|
|
2244
|
-
: [{ column: 0, dir: 'desc' }], columns:
|
|
2245
|
-
{
|
|
2246
|
-
data: 'active',
|
|
2247
|
-
name: 'Active',
|
|
2248
|
-
orderable: true,
|
|
2249
|
-
search: { value: '', regex: false },
|
|
2250
|
-
searchable: true,
|
|
2251
|
-
},
|
|
2252
|
-
...this.columns.map((col) => {
|
|
2253
|
-
return {
|
|
2254
|
-
data: col.field,
|
|
2255
|
-
name: `${col.field.substring(0, 1).toUpperCase()}${col.field.substring(1, col.field.length)}`,
|
|
2256
|
-
orderable: true,
|
|
2257
|
-
search: { value: '', regex: false },
|
|
2258
|
-
searchable: true,
|
|
2259
|
-
};
|
|
2260
|
-
}),
|
|
2261
|
-
] });
|
|
2269
|
+
: [{ column: 0, dir: 'desc' }], columns: columns });
|
|
2262
2270
|
}
|
|
2263
2271
|
else {
|
|
2264
2272
|
this.lastLazyLoadEvent = Object.assign(Object.assign({}, this.lastLazyLoadEvent), params.data);
|
|
@@ -2292,6 +2300,9 @@ class DataTableComponent {
|
|
|
2292
2300
|
if (col.type === TableColumnType.ACTIVE_BOOLEAN_BADGE) {
|
|
2293
2301
|
content += `<div class="text-centered"><i class="fas fa-circle status-table-field ${this.getActiveStatusColor(item[col.field])}"></i></div>`;
|
|
2294
2302
|
}
|
|
2303
|
+
if (col.type === TableColumnType.BUTTON) {
|
|
2304
|
+
content += `<div class="text-centered"><i class="fas ${col.icon || 'fa-circle'} status-table-field table-button"></i></div>`;
|
|
2305
|
+
}
|
|
2295
2306
|
content += `</span>`;
|
|
2296
2307
|
return content;
|
|
2297
2308
|
}
|
|
@@ -2317,10 +2328,10 @@ class DataTableComponent {
|
|
|
2317
2328
|
}
|
|
2318
2329
|
}
|
|
2319
2330
|
DataTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2320
|
-
DataTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: DataTableComponent, selector: "vector-data-table", inputs: { columns: "columns", data: "data", exportExcel: "exportExcel", exportPDF: "exportPDF", totalRecords: "totalRecords", filters: "filters", addItemLabel: "addItemLabel", pagination: "pagination", virtualPagination: "virtualPagination", tabs: "tabs", addItemButtonPlusSign: "addItemButtonPlusSign" }, outputs: { onLazyLoad: "onLazyLoad", onFilter: "onFilter", onAdd: "onAdd", onExportExcel: "onExportExcel", onExportPDF: "onExportPDF" }, viewQueries: [{ propertyName: "filtersComponent", first: true, predicate: FiltersComponent, descendants: true, static: true }], ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <vector-filters [fields]=\"filters\" (onSearch)=\"lazyLoaded({ filter: true, data: $event })\"></vector-filters>\r\n </div>\r\n <div class=\"table-header-actions field\" *ngIf=\"addItemLabel\">\r\n <button *ngIf=\"exportExcel\" (click)=\"onExportExcel.emit()\" class=\"export-button export-excel\">\r\n <i class=\"fas fa-file\"></i><span>Excel</span>\r\n </button>\r\n <button *ngIf=\"exportPDF\" (click)=\"onExportPDF.emit()\" class=\"export-button export-pdf\">\r\n <i class=\"fas fa-file\"></i><span>PDF</span>\r\n </button>\r\n <vector-button\r\n class=\"add-item-button\"\r\n [label]=\"addItemLabel\"\r\n (click)=\"onAdd.emit()\"\r\n [rightIcon]=\"addItemButtonPlusSign ? 'pi pi-plus' : ''\"\r\n ></vector-button>\r\n </div>\r\n <div class=\"col-12\">\r\n <vector-panel class=\"data-table-panel\">\r\n <p-tabView (onChange)=\"onTabChange($event)\" *ngIf=\"tabs?.length\">\r\n <p-tabPanel *ngFor=\"let tab of tabs\" [header]=\"tab.name\"></p-tabPanel>\r\n </p-tabView>\r\n <p-table\r\n currentPageReportTemplate=\"Mostrando {first} at\u00E9 {last} de {totalRecords} registros\"\r\n sortMode=\"single\"\r\n [rows]=\"10\"\r\n [lazy]=\"pagination && !virtualPagination\"\r\n [value]=\"data\"\r\n [paginator]=\"pagination\"\r\n [totalRecords]=\"totalRecords\"\r\n [showCurrentPageReport]=\"true\"\r\n [rowsPerPageOptions]=\"[10, 25, 50, 100]\"\r\n [responsive]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [scrollable]=\"true\"\r\n scrollDirection=\"vertical\"\r\n responsiveLayout=\"scroll\"\r\n (onLazyLoad)=\"lazyLoaded({ filter: false, data: $event })\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr class=\"header\">\r\n <th style=\"max-width: 100px\" class=\"centered\">A\u00E7\u00F5es</th>\r\n <th *ngFor=\"let col of columns\" [ngStyle]=\"getColStyle(col)\" [pSortableColumn]=\"col.field\">\r\n {{ col.header }} <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item>\r\n <tr class=\"row\">\r\n <td style=\"max-width: 100px\" class=\"centered\">\r\n <p-menu #menu [model]=\"item.actions\" [popup]=\"true\" appendTo=\"body\"></p-menu>\r\n <i class=\"actions-menu-button fas fa-cog\" (click)=\"menu.toggle($event)\"></i>\r\n </td>\r\n <td\r\n *ngFor=\"let col of columns\"\r\n class=\"cell\"\r\n [innerHTML]=\"getCellContent(item, col)\"\r\n [ngStyle]=\"getColStyle(col)\"\r\n ></td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr class=\"row\">\r\n <td class=\"no-results\" [attr.colspan]=\"columns.length + 1\">Nenhum resultado encontrado</td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"paginatorright\"> </ng-template>\r\n <ng-template let-item pTemplate=\"paginatordropdownitem\"> {{ item.value }} </ng-template>\r\n </p-table>\r\n </vector-panel>\r\n </div>\r\n</div>\r\n", styles: [".no-results{padding:15px;background-color:#fff;width:100%}.centered{display:flex;justify-content:center}.table-header-actions{display:flex;justify-content:flex-end;align-items:flex-end;width:100%;padding-right:7px;margin-bottom:15px!important}@media (min-width: 768px){.table-header-actions{margin-top:-3px}}.table-header-actions .export-button{padding:7px 10px;color:#fff;display:flex;align-items:center;border:none;border-radius:5px;margin:5px;font-size:.75rem;cursor:pointer}.table-header-actions .export-button.export-excel{background-color:var(--success-color)}.table-header-actions .export-button.export-excel:hover{background-color:var(--success-color-dark)}.table-header-actions .export-button.export-pdf{background-color:var(--error-color)}.table-header-actions .export-button.export-pdf:hover{background-color:var(--error-color-dark)}.table-header-actions .export-button i{color:#fff}.table-header-actions .export-button span{margin-left:5px}.table-header-actions .add-item-button{margin-left:10px}.actions-menu-button{font-size:23px;cursor:pointer;color:var(--theme-medium)}\n"], components: [{ type: FiltersComponent, selector: "vector-filters", inputs: ["fields"], outputs: ["onSearch"] }, { type: ButtonComponent, selector: "vector-button", inputs: ["disabled", "label", "type", "leftIcon", "rightIcon", "noShadow", "style"], outputs: ["onClick"] }, { type: PanelComponent, selector: "vector-panel" }, { type: i4.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: i6$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }] });
|
|
2331
|
+
DataTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: DataTableComponent, selector: "vector-data-table", inputs: { columns: "columns", data: "data", exportExcel: "exportExcel", exportPDF: "exportPDF", totalRecords: "totalRecords", filters: "filters", addItemLabel: "addItemLabel", pagination: "pagination", virtualPagination: "virtualPagination", tabs: "tabs", addItemButtonPlusSign: "addItemButtonPlusSign", hasActions: "hasActions" }, outputs: { onLazyLoad: "onLazyLoad", onFilter: "onFilter", onAdd: "onAdd", onExportExcel: "onExportExcel", onExportPDF: "onExportPDF" }, viewQueries: [{ propertyName: "filtersComponent", first: true, predicate: FiltersComponent, descendants: true, static: true }], ngImport: i0, template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <vector-filters [fields]=\"filters\" (onSearch)=\"lazyLoaded({ filter: true, data: $event })\"></vector-filters>\r\n </div>\r\n <div class=\"table-header-actions field\" *ngIf=\"addItemLabel\">\r\n <button *ngIf=\"exportExcel\" (click)=\"onExportExcel.emit()\" class=\"export-button export-excel\">\r\n <i class=\"fas fa-file\"></i><span>Excel</span>\r\n </button>\r\n <button *ngIf=\"exportPDF\" (click)=\"onExportPDF.emit()\" class=\"export-button export-pdf\">\r\n <i class=\"fas fa-file\"></i><span>PDF</span>\r\n </button>\r\n <vector-button\r\n class=\"add-item-button\"\r\n [label]=\"addItemLabel\"\r\n (click)=\"onAdd.emit()\"\r\n [rightIcon]=\"addItemButtonPlusSign ? 'pi pi-plus' : ''\"\r\n ></vector-button>\r\n </div>\r\n <div class=\"col-12\">\r\n <vector-panel class=\"data-table-panel\">\r\n <p-tabView (onChange)=\"onTabChange($event)\" *ngIf=\"tabs?.length\">\r\n <p-tabPanel *ngFor=\"let tab of tabs\" [header]=\"tab.name\"></p-tabPanel>\r\n </p-tabView>\r\n <p-table\r\n currentPageReportTemplate=\"Mostrando {first} at\u00E9 {last} de {totalRecords} registros\"\r\n sortMode=\"single\"\r\n [rows]=\"10\"\r\n [lazy]=\"pagination && !virtualPagination\"\r\n [value]=\"data\"\r\n [paginator]=\"pagination\"\r\n [totalRecords]=\"totalRecords\"\r\n [showCurrentPageReport]=\"true\"\r\n [rowsPerPageOptions]=\"[10, 25, 50, 100]\"\r\n [responsive]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [scrollable]=\"true\"\r\n scrollDirection=\"vertical\"\r\n responsiveLayout=\"scroll\"\r\n (onLazyLoad)=\"lazyLoaded({ filter: false, data: $event })\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr class=\"header\">\r\n <th style=\"max-width: 100px\" class=\"centered\" *ngIf=\"hasActions\">A\u00E7\u00F5es</th>\r\n <th *ngFor=\"let col of columns\" [ngStyle]=\"getColStyle(col)\" [pSortableColumn]=\"col.field\">\r\n {{ col.header }} <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item>\r\n <tr class=\"row\">\r\n <td style=\"max-width: 100px\" class=\"centered\" *ngIf=\"hasActions\">\r\n <p-menu #menu [model]=\"item.actions\" [popup]=\"true\" appendTo=\"body\"></p-menu>\r\n <i class=\"actions-menu-button fas fa-cog\" (click)=\"menu.toggle($event)\"></i>\r\n </td>\r\n <td\r\n *ngFor=\"let col of columns\"\r\n class=\"cell\"\r\n [innerHTML]=\"getCellContent(item, col)\"\r\n (click)=\"col && col.clickFunction && col.clickFunction(item)\"\r\n [ngStyle]=\"getColStyle(col)\"\r\n ></td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr class=\"row\">\r\n <td class=\"no-results\" [attr.colspan]=\"columns.length + 1\">Nenhum resultado encontrado</td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"paginatorright\"> </ng-template>\r\n <ng-template let-item pTemplate=\"paginatordropdownitem\"> {{ item.value }} </ng-template>\r\n </p-table>\r\n </vector-panel>\r\n </div>\r\n</div>\r\n", styles: [".no-results{padding:15px;background-color:#fff;width:100%}.centered{display:flex;justify-content:center}.table-header-actions{display:flex;justify-content:flex-end;align-items:flex-end;width:100%;padding-right:7px;margin-bottom:15px!important}@media (min-width: 768px){.table-header-actions{margin-top:-3px}}.table-header-actions .export-button{padding:7px 10px;color:#fff;display:flex;align-items:center;border:none;border-radius:5px;margin:5px;font-size:.75rem;cursor:pointer}.table-header-actions .export-button.export-excel{background-color:var(--success-color)}.table-header-actions .export-button.export-excel:hover{background-color:var(--success-color-dark)}.table-header-actions .export-button.export-pdf{background-color:var(--error-color)}.table-header-actions .export-button.export-pdf:hover{background-color:var(--error-color-dark)}.table-header-actions .export-button i{color:#fff}.table-header-actions .export-button span{margin-left:5px}.table-header-actions .add-item-button{margin-left:10px}.actions-menu-button{font-size:23px;cursor:pointer;color:var(--theme-medium)}\n"], components: [{ type: FiltersComponent, selector: "vector-filters", inputs: ["fields"], outputs: ["onSearch"] }, { type: ButtonComponent, selector: "vector-button", inputs: ["disabled", "label", "type", "leftIcon", "rightIcon", "noShadow", "style"], outputs: ["onClick"] }, { type: PanelComponent, selector: "vector-panel" }, { type: i4.TabView, selector: "p-tabView", inputs: ["orientation", "style", "styleClass", "controlClose", "scrollable", "activeIndex"], outputs: ["onChange", "onClose", "activeIndexChange"] }, { type: i4.TabPanel, selector: "p-tabPanel", inputs: ["closable", "headerStyle", "headerStyleClass", "cache", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "selected", "disabled", "header", "leftIcon", "rightIcon"] }, { type: i5.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollDelay", "virtualRowHeight", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "minBufferPx", "maxBufferPx", "responsiveLayout", "breakpoint", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["selectAllChange", "selectionChange", "contextMenuSelectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { type: i5.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { type: i6$1.Menu, selector: "p-menu", inputs: ["model", "popup", "style", "styleClass", "appendTo", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i5.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }] });
|
|
2321
2332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: DataTableComponent, decorators: [{
|
|
2322
2333
|
type: Component,
|
|
2323
|
-
args: [{ selector: 'vector-data-table', template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <vector-filters [fields]=\"filters\" (onSearch)=\"lazyLoaded({ filter: true, data: $event })\"></vector-filters>\r\n </div>\r\n <div class=\"table-header-actions field\" *ngIf=\"addItemLabel\">\r\n <button *ngIf=\"exportExcel\" (click)=\"onExportExcel.emit()\" class=\"export-button export-excel\">\r\n <i class=\"fas fa-file\"></i><span>Excel</span>\r\n </button>\r\n <button *ngIf=\"exportPDF\" (click)=\"onExportPDF.emit()\" class=\"export-button export-pdf\">\r\n <i class=\"fas fa-file\"></i><span>PDF</span>\r\n </button>\r\n <vector-button\r\n class=\"add-item-button\"\r\n [label]=\"addItemLabel\"\r\n (click)=\"onAdd.emit()\"\r\n [rightIcon]=\"addItemButtonPlusSign ? 'pi pi-plus' : ''\"\r\n ></vector-button>\r\n </div>\r\n <div class=\"col-12\">\r\n <vector-panel class=\"data-table-panel\">\r\n <p-tabView (onChange)=\"onTabChange($event)\" *ngIf=\"tabs?.length\">\r\n <p-tabPanel *ngFor=\"let tab of tabs\" [header]=\"tab.name\"></p-tabPanel>\r\n </p-tabView>\r\n <p-table\r\n currentPageReportTemplate=\"Mostrando {first} at\u00E9 {last} de {totalRecords} registros\"\r\n sortMode=\"single\"\r\n [rows]=\"10\"\r\n [lazy]=\"pagination && !virtualPagination\"\r\n [value]=\"data\"\r\n [paginator]=\"pagination\"\r\n [totalRecords]=\"totalRecords\"\r\n [showCurrentPageReport]=\"true\"\r\n [rowsPerPageOptions]=\"[10, 25, 50, 100]\"\r\n [responsive]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [scrollable]=\"true\"\r\n scrollDirection=\"vertical\"\r\n responsiveLayout=\"scroll\"\r\n (onLazyLoad)=\"lazyLoaded({ filter: false, data: $event })\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr class=\"header\">\r\n <th style=\"max-width: 100px\" class=\"centered\">A\u00E7\u00F5es</th>\r\n <th *ngFor=\"let col of columns\" [ngStyle]=\"getColStyle(col)\" [pSortableColumn]=\"col.field\">\r\n {{ col.header }} <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item>\r\n <tr class=\"row\">\r\n <td style=\"max-width: 100px\" class=\"centered\">\r\n <p-menu #menu [model]=\"item.actions\" [popup]=\"true\" appendTo=\"body\"></p-menu>\r\n <i class=\"actions-menu-button fas fa-cog\" (click)=\"menu.toggle($event)\"></i>\r\n </td>\r\n <td\r\n *ngFor=\"let col of columns\"\r\n class=\"cell\"\r\n [innerHTML]=\"getCellContent(item, col)\"\r\n [ngStyle]=\"getColStyle(col)\"\r\n ></td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr class=\"row\">\r\n <td class=\"no-results\" [attr.colspan]=\"columns.length + 1\">Nenhum resultado encontrado</td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"paginatorright\"> </ng-template>\r\n <ng-template let-item pTemplate=\"paginatordropdownitem\"> {{ item.value }} </ng-template>\r\n </p-table>\r\n </vector-panel>\r\n </div>\r\n</div>\r\n", styles: [".no-results{padding:15px;background-color:#fff;width:100%}.centered{display:flex;justify-content:center}.table-header-actions{display:flex;justify-content:flex-end;align-items:flex-end;width:100%;padding-right:7px;margin-bottom:15px!important}@media (min-width: 768px){.table-header-actions{margin-top:-3px}}.table-header-actions .export-button{padding:7px 10px;color:#fff;display:flex;align-items:center;border:none;border-radius:5px;margin:5px;font-size:.75rem;cursor:pointer}.table-header-actions .export-button.export-excel{background-color:var(--success-color)}.table-header-actions .export-button.export-excel:hover{background-color:var(--success-color-dark)}.table-header-actions .export-button.export-pdf{background-color:var(--error-color)}.table-header-actions .export-button.export-pdf:hover{background-color:var(--error-color-dark)}.table-header-actions .export-button i{color:#fff}.table-header-actions .export-button span{margin-left:5px}.table-header-actions .add-item-button{margin-left:10px}.actions-menu-button{font-size:23px;cursor:pointer;color:var(--theme-medium)}\n"] }]
|
|
2334
|
+
args: [{ selector: 'vector-data-table', template: "<div class=\"grid\">\r\n <div class=\"col-12\">\r\n <vector-filters [fields]=\"filters\" (onSearch)=\"lazyLoaded({ filter: true, data: $event })\"></vector-filters>\r\n </div>\r\n <div class=\"table-header-actions field\" *ngIf=\"addItemLabel\">\r\n <button *ngIf=\"exportExcel\" (click)=\"onExportExcel.emit()\" class=\"export-button export-excel\">\r\n <i class=\"fas fa-file\"></i><span>Excel</span>\r\n </button>\r\n <button *ngIf=\"exportPDF\" (click)=\"onExportPDF.emit()\" class=\"export-button export-pdf\">\r\n <i class=\"fas fa-file\"></i><span>PDF</span>\r\n </button>\r\n <vector-button\r\n class=\"add-item-button\"\r\n [label]=\"addItemLabel\"\r\n (click)=\"onAdd.emit()\"\r\n [rightIcon]=\"addItemButtonPlusSign ? 'pi pi-plus' : ''\"\r\n ></vector-button>\r\n </div>\r\n <div class=\"col-12\">\r\n <vector-panel class=\"data-table-panel\">\r\n <p-tabView (onChange)=\"onTabChange($event)\" *ngIf=\"tabs?.length\">\r\n <p-tabPanel *ngFor=\"let tab of tabs\" [header]=\"tab.name\"></p-tabPanel>\r\n </p-tabView>\r\n <p-table\r\n currentPageReportTemplate=\"Mostrando {first} at\u00E9 {last} de {totalRecords} registros\"\r\n sortMode=\"single\"\r\n [rows]=\"10\"\r\n [lazy]=\"pagination && !virtualPagination\"\r\n [value]=\"data\"\r\n [paginator]=\"pagination\"\r\n [totalRecords]=\"totalRecords\"\r\n [showCurrentPageReport]=\"true\"\r\n [rowsPerPageOptions]=\"[10, 25, 50, 100]\"\r\n [responsive]=\"true\"\r\n [resizableColumns]=\"true\"\r\n [scrollable]=\"true\"\r\n scrollDirection=\"vertical\"\r\n responsiveLayout=\"scroll\"\r\n (onLazyLoad)=\"lazyLoaded({ filter: false, data: $event })\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr class=\"header\">\r\n <th style=\"max-width: 100px\" class=\"centered\" *ngIf=\"hasActions\">A\u00E7\u00F5es</th>\r\n <th *ngFor=\"let col of columns\" [ngStyle]=\"getColStyle(col)\" [pSortableColumn]=\"col.field\">\r\n {{ col.header }} <p-sortIcon [field]=\"col.field\"></p-sortIcon>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-item>\r\n <tr class=\"row\">\r\n <td style=\"max-width: 100px\" class=\"centered\" *ngIf=\"hasActions\">\r\n <p-menu #menu [model]=\"item.actions\" [popup]=\"true\" appendTo=\"body\"></p-menu>\r\n <i class=\"actions-menu-button fas fa-cog\" (click)=\"menu.toggle($event)\"></i>\r\n </td>\r\n <td\r\n *ngFor=\"let col of columns\"\r\n class=\"cell\"\r\n [innerHTML]=\"getCellContent(item, col)\"\r\n (click)=\"col && col.clickFunction && col.clickFunction(item)\"\r\n [ngStyle]=\"getColStyle(col)\"\r\n ></td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"emptymessage\">\r\n <tr class=\"row\">\r\n <td class=\"no-results\" [attr.colspan]=\"columns.length + 1\">Nenhum resultado encontrado</td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"paginatorright\"> </ng-template>\r\n <ng-template let-item pTemplate=\"paginatordropdownitem\"> {{ item.value }} </ng-template>\r\n </p-table>\r\n </vector-panel>\r\n </div>\r\n</div>\r\n", styles: [".no-results{padding:15px;background-color:#fff;width:100%}.centered{display:flex;justify-content:center}.table-header-actions{display:flex;justify-content:flex-end;align-items:flex-end;width:100%;padding-right:7px;margin-bottom:15px!important}@media (min-width: 768px){.table-header-actions{margin-top:-3px}}.table-header-actions .export-button{padding:7px 10px;color:#fff;display:flex;align-items:center;border:none;border-radius:5px;margin:5px;font-size:.75rem;cursor:pointer}.table-header-actions .export-button.export-excel{background-color:var(--success-color)}.table-header-actions .export-button.export-excel:hover{background-color:var(--success-color-dark)}.table-header-actions .export-button.export-pdf{background-color:var(--error-color)}.table-header-actions .export-button.export-pdf:hover{background-color:var(--error-color-dark)}.table-header-actions .export-button i{color:#fff}.table-header-actions .export-button span{margin-left:5px}.table-header-actions .add-item-button{margin-left:10px}.actions-menu-button{font-size:23px;cursor:pointer;color:var(--theme-medium)}\n"] }]
|
|
2324
2335
|
}], ctorParameters: function () { return []; }, propDecorators: { columns: [{
|
|
2325
2336
|
type: Input
|
|
2326
2337
|
}], data: [{
|
|
@@ -2343,6 +2354,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImpor
|
|
|
2343
2354
|
type: Input
|
|
2344
2355
|
}], addItemButtonPlusSign: [{
|
|
2345
2356
|
type: Input
|
|
2357
|
+
}], hasActions: [{
|
|
2358
|
+
type: Input
|
|
2346
2359
|
}], onLazyLoad: [{
|
|
2347
2360
|
type: Output
|
|
2348
2361
|
}], onFilter: [{
|