@sankhyalabs/sankhyablocks 9.1.0-dev.1 → 9.1.0-dev.11
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/dist/cjs/{ClientSideExporterProvider-0ce2bcd9.js → ClientSideExporterProvider-6a4108c9.js} +4 -4
- package/dist/cjs/{ConfigStorage-48ba265b.js → ConfigStorage-34aa43d8.js} +2 -2
- package/dist/cjs/{DataFetcher-1afdb18e.js → DataFetcher-e23a263b.js} +6 -1
- package/dist/cjs/{ISave-c76e2c51.js → ISave-e0be2362.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-aa4631bd.js → SnkFormConfigManager-61bf3266.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-e3b7850b.js → SnkMessageBuilder-221cc88d.js} +10 -2
- package/dist/cjs/{auth-fetcher-1687ac0a.js → auth-fetcher-8670a38f.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-a723f0dc.js → dataunit-fetcher-c34a8217.js} +4 -1
- package/dist/cjs/field-config_2.cjs.entry.js +1 -1
- package/dist/cjs/fields-layout.cjs.entry.js +1 -1
- package/dist/cjs/fields-selector.cjs.entry.js +2 -2
- package/dist/cjs/{form-config-fetcher-40d3f752.js → form-config-fetcher-d8b78403.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +5 -5
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +63 -203
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +33 -16
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +6 -5
- package/dist/cjs/snk-data-exporter.cjs.entry.js +6 -6
- package/dist/cjs/{snk-data-unit-3684c96e.js → snk-data-unit-a4f9287b.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
- package/dist/cjs/snk-entity-list.cjs.entry.js +20 -14
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +44 -112
- package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +9 -8
- package/dist/cjs/{snk-guides-viewer-edc0a00a.js → snk-guides-viewer-29298823.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +6 -4
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +15 -15
- package/dist/collection/components/snk-attach/snk-attach.js +45 -11
- package/dist/collection/components/snk-configurator/snk-configurator.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +19 -0
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +40 -15
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +6 -4
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +4 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +49 -121
- package/dist/collection/components/snk-form-config/field-item/field-item.css +3 -23
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +4 -12
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +4 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +1 -1
- package/dist/collection/components/snk-grid/snk-grid.js +37 -2
- package/dist/collection/components/snk-grid-config/snk-grid-config.css +7 -41
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +58 -193
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.css +1 -0
- package/dist/collection/components/snk-grid-config/snk-select-box/snk-select-box.js +20 -1
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +9 -9
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +1 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +1 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +6 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +3 -0
- package/dist/collection/lib/message/resources/snk-grid.msg.js +10 -2
- package/dist/components/DataFetcher.js +6 -1
- package/dist/components/SnkMessageBuilder.js +10 -2
- package/dist/components/dataunit-fetcher.js +3 -0
- package/dist/components/field-item2.js +1 -1
- package/dist/components/fields-layout2.js +1 -1
- package/dist/components/fields-selector2.js +2 -2
- package/dist/components/pesquisa-grid2.js +1 -1
- package/dist/components/snk-attach2.js +29 -11
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +1 -0
- package/dist/components/snk-entity-list.js +21 -15
- package/dist/components/snk-filter-detail2.js +3 -1
- package/dist/components/snk-filter-item2.js +43 -111
- package/dist/components/snk-grid-config2.js +56 -195
- package/dist/components/snk-grid2.js +5 -2
- package/dist/components/snk-personalized-filter-editor.js +6 -4
- package/dist/components/snk-select-box2.js +5 -3
- package/dist/components/snk-simple-crud2.js +8 -8
- package/dist/components/snk-simple-form-config2.js +2 -2
- package/dist/esm/{ClientSideExporterProvider-3ed744fd.js → ClientSideExporterProvider-09dee1a3.js} +4 -4
- package/dist/esm/{ConfigStorage-79b9e180.js → ConfigStorage-89154c4e.js} +2 -2
- package/dist/esm/{DataFetcher-88e56266.js → DataFetcher-db08cad0.js} +6 -1
- package/dist/esm/{ISave-5efafc97.js → ISave-da565824.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-b4b93298.js → SnkFormConfigManager-d64d62d6.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-9c269caf.js → SnkMessageBuilder-da87a821.js} +10 -2
- package/dist/esm/{auth-fetcher-3510520e.js → auth-fetcher-43c8d76b.js} +1 -1
- package/dist/esm/{dataunit-fetcher-0e025732.js → dataunit-fetcher-1b78797a.js} +4 -1
- package/dist/esm/field-config_2.entry.js +1 -1
- package/dist/esm/fields-layout.entry.js +1 -1
- package/dist/esm/fields-selector.entry.js +2 -2
- package/dist/esm/{form-config-fetcher-fa208a6c.js → form-config-fetcher-e623539b.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +5 -5
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_8.entry.js +63 -203
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +33 -16
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +6 -5
- package/dist/esm/snk-data-exporter.entry.js +6 -6
- package/dist/esm/{snk-data-unit-027bca56.js → snk-data-unit-330db397.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +8 -8
- package/dist/esm/snk-entity-list.entry.js +20 -14
- package/dist/esm/snk-filter-bar_4.entry.js +45 -113
- package/dist/esm/snk-filter-detail.entry.js +3 -1
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form_2.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +9 -8
- package/dist/esm/{snk-guides-viewer-32f3d3ab.js → snk-guides-viewer-9335318d.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter-editor.entry.js +6 -4
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +4 -4
- package/dist/esm/snk-simple-crud.entry.js +15 -15
- package/dist/sankhyablocks/p-02480593.entry.js +1 -0
- package/dist/sankhyablocks/{p-09e60995.entry.js → p-1079e61b.entry.js} +1 -1
- package/dist/sankhyablocks/p-162bddae.entry.js +1 -0
- package/dist/sankhyablocks/{p-1456d7cb.entry.js → p-1c69a957.entry.js} +1 -1
- package/dist/sankhyablocks/p-22a8656b.entry.js +1 -0
- package/dist/sankhyablocks/{p-349d1968.entry.js → p-23b20add.entry.js} +1 -1
- package/dist/sankhyablocks/p-25209340.entry.js +1 -0
- package/dist/sankhyablocks/p-295b83ae.entry.js +1 -0
- package/dist/sankhyablocks/{p-a5bb2f93.entry.js → p-2d58f98e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9751c42f.entry.js → p-31193a60.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7993b2e3.js → p-37b4f642.js} +1 -1
- package/dist/sankhyablocks/{p-2bde486e.js → p-3b1d73f9.js} +1 -1
- package/dist/sankhyablocks/{p-a6513fcb.js → p-412e06e9.js} +1 -1
- package/dist/sankhyablocks/p-5126b34e.entry.js +1 -0
- package/dist/sankhyablocks/{p-e3521eae.entry.js → p-5b31b239.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bd665460.entry.js → p-60d3abf6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0cb295c1.entry.js → p-7c9815ea.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a06bf7b9.entry.js → p-7ced2cf4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6416975c.js → p-8758404f.js} +1 -1
- package/dist/sankhyablocks/{p-65c5d430.entry.js → p-9a6fbf3d.entry.js} +1 -1
- package/dist/sankhyablocks/p-a2c6944d.entry.js +1 -0
- package/dist/sankhyablocks/{p-601b252b.js → p-b21d32f6.js} +1 -1
- package/dist/sankhyablocks/{p-c926cf6b.entry.js → p-b2946adb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6dd38d7b.js → p-c9657baa.js} +1 -1
- package/dist/sankhyablocks/p-cb2a4613.entry.js +1 -0
- package/dist/sankhyablocks/{p-fbba7e3d.js → p-cd1a5b6a.js} +1 -1
- package/dist/sankhyablocks/p-cfc219f6.entry.js +1 -0
- package/dist/sankhyablocks/{p-73285a8a.js → p-e25412da.js} +1 -1
- package/dist/sankhyablocks/p-e56eb36b.entry.js +1 -0
- package/dist/sankhyablocks/p-f442c8f6.entry.js +1 -0
- package/dist/sankhyablocks/{p-763b04fa.js → p-fa591f6f.js} +1 -1
- package/dist/sankhyablocks/p-fc4eac32.js +1 -0
- package/dist/sankhyablocks/{p-fc0b609e.js → p-fc87708a.js} +1 -1
- package/dist/sankhyablocks/p-fd571197.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/interfaces/ICrudConfig.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +5 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +1 -0
- package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +8 -4
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +10 -20
- package/dist/types/components/snk-grid/snk-grid.d.ts +8 -0
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +7 -20
- package/dist/types/components/snk-grid-config/snk-select-box/snk-select-box.d.ts +4 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -1
- package/dist/types/components.d.ts +41 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-19156e59.entry.js +0 -1
- package/dist/sankhyablocks/p-3a48bff3.entry.js +0 -1
- package/dist/sankhyablocks/p-3f24c9b2.js +0 -1
- package/dist/sankhyablocks/p-67d6d0c8.entry.js +0 -1
- package/dist/sankhyablocks/p-83c100f2.entry.js +0 -1
- package/dist/sankhyablocks/p-90805683.entry.js +0 -1
- package/dist/sankhyablocks/p-9ad3557c.entry.js +0 -1
- package/dist/sankhyablocks/p-c3324d79.entry.js +0 -1
- package/dist/sankhyablocks/p-cfd0a4c6.entry.js +0 -1
- package/dist/sankhyablocks/p-d9491f6f.entry.js +0 -1
- package/dist/sankhyablocks/p-e7cccc45.entry.js +0 -1
- package/dist/sankhyablocks/p-e824d565.entry.js +0 -1
- package/dist/sankhyablocks/p-ff7060bc.entry.js +0 -1
- /package/dist/collection/components/snk-simple-crud/{regular-buttons.js → snk-simple-crud.constants.js} +0 -0
- /package/dist/types/components/snk-simple-crud/{regular-buttons.d.ts → snk-simple-crud.constants.d.ts} +0 -0
@@ -1,16 +1,9 @@
|
|
1
|
-
import { ElementIDUtils,
|
1
|
+
import { ElementIDUtils, DateUtils, MaskFormatter } from '@sankhyalabs/core';
|
2
2
|
import { h, Host } from '@stencil/core';
|
3
3
|
import FilterItemType from './filter-item-type.enum';
|
4
4
|
import { FilterNumberVariation } from './editors/enum/filterNumberVariation';
|
5
5
|
export class SnkFilterItem {
|
6
6
|
constructor() {
|
7
|
-
this.innerClickCheck = (_floatingContainer, node) => {
|
8
|
-
if (node.id != FloatingManager.MODAL_ELEMENT_ID) {
|
9
|
-
return true;
|
10
|
-
}
|
11
|
-
this.detailIsVisible = false;
|
12
|
-
return false;
|
13
|
-
};
|
14
7
|
this.detailIsVisible = undefined;
|
15
8
|
this.config = undefined;
|
16
9
|
this.getMessage = undefined;
|
@@ -19,57 +12,28 @@ export class SnkFilterItem {
|
|
19
12
|
observeDetailIsVisible(value) {
|
20
13
|
this.visibleChanged.emit(value);
|
21
14
|
}
|
15
|
+
/**
|
16
|
+
* Emitido quando o estado do filtro é alterado.
|
17
|
+
*/
|
18
|
+
filterChangeListener() {
|
19
|
+
this.hideDetail();
|
20
|
+
}
|
22
21
|
/**
|
23
22
|
* Exibe os detalhes de um item da lista.
|
24
23
|
*/
|
25
24
|
async showUp(open = false) {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
(_a = this._chipElement) === null || _a === void 0 ? void 0 : _a.blur();
|
32
|
-
window.requestAnimationFrame(() => {
|
33
|
-
this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, this.getFloatOptions());
|
34
|
-
this._popover.show();
|
35
|
-
this.detailIsVisible = true;
|
36
|
-
});
|
37
|
-
}
|
38
|
-
});
|
39
|
-
}
|
40
|
-
updatePosition() {
|
41
|
-
if (this._floatingID == undefined) {
|
42
|
-
return;
|
25
|
+
var _a;
|
26
|
+
this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
|
27
|
+
if (open) {
|
28
|
+
await ((_a = this._chipElement) === null || _a === void 0 ? void 0 : _a.setBlur());
|
29
|
+
await this._popover.showUnder(this._chipElement);
|
43
30
|
}
|
44
|
-
FloatingManager.updateFloatPosition(this._popover, this._popoverContainer, this.getFloatOptions());
|
45
|
-
}
|
46
|
-
getFloatOptions() {
|
47
|
-
return {
|
48
|
-
autoClose: true,
|
49
|
-
innerClickTest: this.innerClickCheck,
|
50
|
-
backClickListener: () => this.onDetailCloseCallback(),
|
51
|
-
left: this.getOffsetLeft(),
|
52
|
-
top: this.getOffsetTop(),
|
53
|
-
useOverlay: true,
|
54
|
-
overlayClassName: 'ez-scrim ez-scrim--light',
|
55
|
-
isFixed: true
|
56
|
-
};
|
57
|
-
}
|
58
|
-
getOffsetLeft() {
|
59
|
-
const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
|
60
|
-
const rect = this._filterItemElement.getBoundingClientRect();
|
61
|
-
// Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
|
62
|
-
const filterDetailWidth = 430;
|
63
|
-
const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
|
64
|
-
return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
|
65
31
|
}
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
window.removeEventListener("scroll", this.updatePosition.bind(this));
|
72
|
-
window.addEventListener("scroll", this.updatePosition.bind(this));
|
32
|
+
/**
|
33
|
+
* Oculta os detalhes de um item da lista.
|
34
|
+
*/
|
35
|
+
async hideDetail() {
|
36
|
+
await this._popover.hide();
|
73
37
|
}
|
74
38
|
getConfigChanges() {
|
75
39
|
var _a;
|
@@ -82,51 +46,24 @@ export class SnkFilterItem {
|
|
82
46
|
const newValue = hasMultiValues ? configToBeCleared.value.map((valueItem) => (Object.assign(Object.assign({}, valueItem), { check: false }))) : undefined;
|
83
47
|
return Object.assign(Object.assign({}, configToBeCleared), { value: newValue });
|
84
48
|
}
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
if (this._floatingID != undefined) {
|
91
|
-
FloatingManager.close(this._floatingID);
|
92
|
-
}
|
49
|
+
clearFilter(event) {
|
50
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
51
|
+
if (this.canClearFilter()) {
|
52
|
+
const configChanged = this.getConfigChanges();
|
53
|
+
this.filterChange.emit(configChanged);
|
93
54
|
}
|
94
|
-
|
95
|
-
|
96
|
-
this._floatingID = undefined;
|
97
|
-
this.detailIsVisible = false;
|
98
|
-
if (this._closeCallback) {
|
99
|
-
this._closeCallback();
|
100
|
-
this._closeCallback = undefined;
|
55
|
+
else {
|
56
|
+
this.togglePopover();
|
101
57
|
}
|
102
58
|
}
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
if (evt.target === this._rightIconElement && this.canClearFilter()) {
|
109
|
-
const configChanged = this.getConfigChanges();
|
110
|
-
this.filterChange.emit(configChanged);
|
111
|
-
}
|
112
|
-
else {
|
113
|
-
if (this.detailIsVisible) {
|
114
|
-
this.hideDetail();
|
115
|
-
}
|
116
|
-
else {
|
117
|
-
this.showUp(true);
|
118
|
-
}
|
119
|
-
}
|
120
|
-
evt.preventDefault();
|
121
|
-
evt.stopImmediatePropagation();
|
122
|
-
evt.stopPropagation();
|
59
|
+
async togglePopover(event) {
|
60
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
61
|
+
event === null || event === void 0 ? void 0 : event.stopPropagation();
|
62
|
+
if (this.detailIsVisible) {
|
63
|
+
await this.hideDetail();
|
123
64
|
}
|
124
|
-
|
125
|
-
|
126
|
-
if (this.detailIsVisible && [this._chipElement, this._leftIconElement, this._rightIconElement].includes(evt.target)) {
|
127
|
-
evt.preventDefault();
|
128
|
-
evt.stopImmediatePropagation();
|
129
|
-
evt.stopPropagation();
|
65
|
+
else {
|
66
|
+
await this.showUp(true);
|
130
67
|
}
|
131
68
|
}
|
132
69
|
getLabel(isTooltipLabel = false) {
|
@@ -247,20 +184,6 @@ export class SnkFilterItem {
|
|
247
184
|
ElementIDUtils.addIDInfo(this._filterItemElement);
|
248
185
|
this._idSnkFilterDetail = `filterDetail_${this.config.id}`;
|
249
186
|
}
|
250
|
-
this.controlScrollPage();
|
251
|
-
}
|
252
|
-
componentDidRender() {
|
253
|
-
if (this._floatingID == undefined) {
|
254
|
-
if (this._popover) {
|
255
|
-
this._popover.remove();
|
256
|
-
}
|
257
|
-
}
|
258
|
-
}
|
259
|
-
/**
|
260
|
-
* Emitido quando o estado do filtro é alterado.
|
261
|
-
*/
|
262
|
-
filterChangeListener() {
|
263
|
-
this.hideDetail();
|
264
187
|
}
|
265
188
|
canClearFilter() {
|
266
189
|
const { value, groupedItems = [] } = this.config;
|
@@ -291,17 +214,34 @@ export class SnkFilterItem {
|
|
291
214
|
return (config.type !== FilterItemType.MULTI_LIST && config.value !== undefined) || this.hasActiveElements(config.value);
|
292
215
|
}
|
293
216
|
getEnabledChip() {
|
217
|
+
if (this.detailIsVisible) {
|
218
|
+
return true;
|
219
|
+
}
|
294
220
|
if (this.config.type === FilterItemType.PERSONALIZED) {
|
295
221
|
const { groupedItems = [] } = this.config;
|
296
222
|
return groupedItems.some(item => item.visible);
|
297
223
|
}
|
298
224
|
return this.hasActiveValue(this.config);
|
299
225
|
}
|
226
|
+
handleVisibilityPopover(event) {
|
227
|
+
this.detailIsVisible = event.detail;
|
228
|
+
}
|
300
229
|
render() {
|
301
230
|
const leftIcon = this.getLeftIconName();
|
302
|
-
return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), h("
|
231
|
+
return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip(), onClick: (event) => this.togglePopover(event), disableAutoUpdateValue: true }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter", onClick: (event) => this.clearFilter(event) }))), h("ez-popover-core", { ref: elem => this._popover = elem, onEzVisibilityChange: (event) => this.handleVisibilityPopover(event) }, h("snk-filter-detail", { key: this.config.id, config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips }))));
|
303
232
|
}
|
304
233
|
static get is() { return "snk-filter-item"; }
|
234
|
+
static get encapsulation() { return "scoped"; }
|
235
|
+
static get originalStyleUrls() {
|
236
|
+
return {
|
237
|
+
"$": ["snk-filter-item.css"]
|
238
|
+
};
|
239
|
+
}
|
240
|
+
static get styleUrls() {
|
241
|
+
return {
|
242
|
+
"$": ["snk-filter-item.css"]
|
243
|
+
};
|
244
|
+
}
|
305
245
|
static get properties() {
|
306
246
|
return {
|
307
247
|
"config": {
|
@@ -448,18 +388,6 @@ export class SnkFilterItem {
|
|
448
388
|
}
|
449
389
|
static get listeners() {
|
450
390
|
return [{
|
451
|
-
"name": "click",
|
452
|
-
"method": "clickListener",
|
453
|
-
"target": undefined,
|
454
|
-
"capture": true,
|
455
|
-
"passive": false
|
456
|
-
}, {
|
457
|
-
"name": "mousedown",
|
458
|
-
"method": "mouseDownListener",
|
459
|
-
"target": undefined,
|
460
|
-
"capture": true,
|
461
|
-
"passive": false
|
462
|
-
}, {
|
463
391
|
"name": "filterChange",
|
464
392
|
"method": "filterChangeListener",
|
465
393
|
"target": undefined,
|
@@ -1,6 +1,5 @@
|
|
1
1
|
:host {
|
2
|
-
width:
|
3
|
-
min-width: 200px;
|
2
|
+
width: 100%;
|
4
3
|
display: flex;
|
5
4
|
padding: 12px 8px;
|
6
5
|
border-radius: var(--border--radius-small, 4px);
|
@@ -12,25 +11,7 @@
|
|
12
11
|
background: #FAFCFF;
|
13
12
|
}
|
14
13
|
|
15
|
-
:host.
|
16
|
-
width: 32% !important;
|
17
|
-
}
|
18
|
-
|
19
|
-
@container (max-width: 430px) {
|
20
|
-
:host,
|
21
|
-
:host.ghost{
|
22
|
-
width: 100% !important;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
|
26
|
-
@container (min-width: 431px) and (max-width: 632px) {
|
27
|
-
:host,
|
28
|
-
:host.ghost {
|
29
|
-
width: 48% !important;
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
:host.full-width{
|
14
|
+
:host.full-width {
|
34
15
|
width: 100%;
|
35
16
|
}
|
36
17
|
|
@@ -81,7 +62,6 @@ ez-icon {
|
|
81
62
|
align-self: self-start;
|
82
63
|
}
|
83
64
|
|
84
|
-
|
85
65
|
.actions {
|
86
66
|
display: flex;
|
87
67
|
flex-direction: row;
|
@@ -105,4 +85,4 @@ ez-button {
|
|
105
85
|
:host:hover .hiddeble {
|
106
86
|
visibility: visible;
|
107
87
|
opacity: 1;
|
108
|
-
}
|
88
|
+
}
|
@@ -15,9 +15,6 @@
|
|
15
15
|
height: calc(100vh - 225px);
|
16
16
|
}
|
17
17
|
|
18
|
-
.groups-container {
|
19
|
-
}
|
20
|
-
|
21
18
|
.guide-header {
|
22
19
|
display: flex;
|
23
20
|
width: 100%;
|
@@ -51,15 +48,13 @@
|
|
51
48
|
width: 100%;
|
52
49
|
}
|
53
50
|
|
54
|
-
|
55
51
|
.group-content {
|
56
|
-
display:
|
57
|
-
flex-direction: row;
|
58
|
-
flex-wrap: wrap;
|
52
|
+
display: grid;
|
59
53
|
gap: 12px;
|
60
54
|
min-height: 65px;
|
61
55
|
width: 100%;
|
62
56
|
padding: 6px 0;
|
57
|
+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
63
58
|
}
|
64
59
|
|
65
60
|
.group-content.empty-content {
|
@@ -79,7 +74,6 @@
|
|
79
74
|
justify-content: center;
|
80
75
|
pointer-events: none;
|
81
76
|
transition: opacity 0.3s;
|
82
|
-
width: 100%;
|
83
77
|
height: 100%;
|
84
78
|
box-sizing: border-box;
|
85
79
|
padding: 10px;
|
@@ -94,7 +88,7 @@
|
|
94
88
|
border-bottom: 1px solid #dce0e8;
|
95
89
|
}
|
96
90
|
|
97
|
-
.no-group-container::before{
|
91
|
+
.no-group-container::before {
|
98
92
|
content: "Inclua estes campos nos grupos ou deixe-os separados no topo do formulário";
|
99
93
|
width: 100%;
|
100
94
|
display: block;
|
@@ -117,7 +111,6 @@
|
|
117
111
|
height: 55px;
|
118
112
|
}
|
119
113
|
|
120
|
-
|
121
114
|
.no-guide-selected {
|
122
115
|
display: block;
|
123
116
|
margin: auto;
|
@@ -129,5 +122,4 @@
|
|
129
122
|
.ghost {
|
130
123
|
opacity: .5;
|
131
124
|
background: #c8fbe2;
|
132
|
-
}
|
133
|
-
|
125
|
+
}
|
@@ -55,7 +55,7 @@ export class FieldsSelector {
|
|
55
55
|
this.initializeDraggableContainer();
|
56
56
|
}
|
57
57
|
render() {
|
58
|
-
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
58
|
+
return (h(Host, { class: 'ez-col ez-col--sd-4 ez-col--tb-4 ez-padding--medium' }, h("span", { class: 'fields-label ez-padding-bottom--small' }, "Campos dispon\u00EDveis"), h("ez-filter-input", { class: 'filter-input', slot: "content", mode: "slim", label: "Buscar campo", onEzChange: evt => this.filterTerm = evt.detail }), h("span", { class: 'fields-count' }, this.getCountText()), h("ez-scroller", { direction: 'vertical', activeShadow: true }, h("div", { id: ID_AVAILABLE_FIELDS, class: 'fields-container' }, this.renderFields()))));
|
59
59
|
}
|
60
60
|
static get is() { return "fields-selector"; }
|
61
61
|
static get encapsulation() { return "scoped"; }
|
@@ -83,6 +83,8 @@ export class SnkGrid {
|
|
83
83
|
this.useSearchColumn = true;
|
84
84
|
this.multipleEditionEnabled = true;
|
85
85
|
this.paginationCounterMode = 'auto';
|
86
|
+
this.suppressCheckboxColumn = undefined;
|
87
|
+
this.compact = undefined;
|
86
88
|
}
|
87
89
|
getGridHeaderSelectedBtns() {
|
88
90
|
const btns = [
|
@@ -211,7 +213,6 @@ export class SnkGrid {
|
|
211
213
|
this._grid.getColumnsState()
|
212
214
|
.then((gridColumns) => {
|
213
215
|
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
214
|
-
this._snkGridConfig.selectedIndex = 0;
|
215
216
|
this._popUpGridConfig = true;
|
216
217
|
});
|
217
218
|
}
|
@@ -499,7 +500,7 @@ export class SnkGrid {
|
|
499
500
|
return undefined;
|
500
501
|
}
|
501
502
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large ez-box--no-outline", tabindex: "0" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
502
|
-
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-
|
503
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium ez-padding-top--extra-small", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none', actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode, useSearchColumn: this.useSearchColumn, suppressHorizontalScroll: this.suppressHorizontalScroll, paginationCounterMode: this.paginationCounterMode, suppressCheckboxColumn: this.suppressCheckboxColumn, compact: this.compact }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId, actionsSettingsList: this.getActionsSettingsList() }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12 snk-grid-container__footer" }, h("slot", { name: "SnkGridFooter" })), h("ez-popup", { size: "medium", heightMode: "auto", useHeader: false, opened: this._popUpGridConfig, onEzClosePopup: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
503
504
|
}
|
504
505
|
static get is() { return "snk-grid"; }
|
505
506
|
static get encapsulation() { return "scoped"; }
|
@@ -1112,6 +1113,40 @@ export class SnkGrid {
|
|
1112
1113
|
"attribute": "pagination-counter-mode",
|
1113
1114
|
"reflect": false,
|
1114
1115
|
"defaultValue": "'auto'"
|
1116
|
+
},
|
1117
|
+
"suppressCheckboxColumn": {
|
1118
|
+
"type": "boolean",
|
1119
|
+
"mutable": false,
|
1120
|
+
"complexType": {
|
1121
|
+
"original": "boolean",
|
1122
|
+
"resolved": "boolean",
|
1123
|
+
"references": {}
|
1124
|
+
},
|
1125
|
+
"required": false,
|
1126
|
+
"optional": false,
|
1127
|
+
"docs": {
|
1128
|
+
"tags": [],
|
1129
|
+
"text": "Informa se a coluna de chechbox deve ser suprimida"
|
1130
|
+
},
|
1131
|
+
"attribute": "suppress-checkbox-column",
|
1132
|
+
"reflect": false
|
1133
|
+
},
|
1134
|
+
"compact": {
|
1135
|
+
"type": "boolean",
|
1136
|
+
"mutable": false,
|
1137
|
+
"complexType": {
|
1138
|
+
"original": "boolean",
|
1139
|
+
"resolved": "boolean",
|
1140
|
+
"references": {}
|
1141
|
+
},
|
1142
|
+
"required": false,
|
1143
|
+
"optional": false,
|
1144
|
+
"docs": {
|
1145
|
+
"tags": [],
|
1146
|
+
"text": "Define se a grade deve ser exibida em modo compacto"
|
1147
|
+
},
|
1148
|
+
"attribute": "compact",
|
1149
|
+
"reflect": false
|
1115
1150
|
}
|
1116
1151
|
};
|
1117
1152
|
}
|
@@ -55,17 +55,14 @@
|
|
55
55
|
/*@doc Define a largura da barra de rolagem do componente.*/
|
56
56
|
--snk-grid-config__scrollbar--width: var(--space--small, 6px);
|
57
57
|
|
58
|
-
display:
|
59
|
-
|
58
|
+
display: flex;
|
59
|
+
flex-direction: column;
|
60
60
|
max-height: 100%;
|
61
61
|
width: 100%;
|
62
62
|
}
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
width: 359px;
|
67
|
-
max-width: 359px;
|
68
|
-
}
|
64
|
+
.grid-config__body {
|
65
|
+
overflow: auto;
|
69
66
|
}
|
70
67
|
|
71
68
|
.padding-right--medium {
|
@@ -134,42 +131,11 @@ ez-list {
|
|
134
131
|
.grid-config__main {
|
135
132
|
overflow-y: auto;
|
136
133
|
scrollbar-width: thin;
|
134
|
+
width: 100%;
|
135
|
+
padding-bottom: 20px;
|
137
136
|
|
138
137
|
/*public*/
|
139
138
|
scrollbar-color: var(--snk-grid-config__scrollbar--color-clicked) var(--snk-grid-config__scrollbar--color-background);
|
140
|
-
padding-right: var(--snk-grid-config__main--padding-right);
|
141
|
-
}
|
142
|
-
|
143
|
-
.grid-config__main::-webkit-scrollbar {
|
144
|
-
/*public*/
|
145
|
-
width: var(--snk-grid-config__scrollbar--width);
|
146
|
-
max-width: var(--snk-grid-config__scrollbar--width);
|
147
|
-
min-width: var(--snk-grid-config__scrollbar--width);
|
148
|
-
background-color: var(--snk-grid-config__scrollbar--color-background);
|
149
|
-
}
|
150
|
-
|
151
|
-
.grid-config__main::-webkit-scrollbar-track {
|
152
|
-
/*public*/
|
153
|
-
background-color: var(--snk-grid-config__scrollbar--color-background);
|
154
|
-
border-radius: var(--snk-grid-config__scrollbar--border-radius);
|
155
|
-
}
|
156
|
-
|
157
|
-
.grid-config__main::-webkit-scrollbar-thumb {
|
158
|
-
/*public*/
|
159
|
-
background-color: var(--snk-grid-config__scrollbar--color-default);
|
160
|
-
border-radius: var(--snk-grid-config__scrollbar--border-radius);
|
161
|
-
}
|
162
|
-
|
163
|
-
.grid-config__main::-webkit-scrollbar-thumb:vertical:hover,
|
164
|
-
.grid-config__main::-webkit-scrollbar-thumb:horizontal:hover {
|
165
|
-
/*public*/
|
166
|
-
background-color: var(--snk-grid-config__scrollbar--color-hover);
|
167
|
-
}
|
168
|
-
|
169
|
-
.grid-config__main::-webkit-scrollbar-thumb:vertical:active,
|
170
|
-
.grid-config__main::-webkit-scrollbar-thumb:horizontal:active {
|
171
|
-
/*public*/
|
172
|
-
background-color: var(--snk-grid-config__scrollbar--color-clicked);
|
173
139
|
}
|
174
140
|
|
175
141
|
.group-name {
|
@@ -178,4 +144,4 @@ ez-list {
|
|
178
144
|
font-size: var(--snk-grid-config__group--font-size);
|
179
145
|
font-weight: var(--snk-grid-config__group--font-weight);
|
180
146
|
padding-bottom: var(--snk-grid-config__group--padding-bottom);
|
181
|
-
}
|
147
|
+
}
|