@sankhyalabs/sankhyablocks 1.4.0-beta.1 → 1.4.0-beta.2
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/{SnkMessageBuilder-7717f1e4.js → SnkMessageBuilder-d8215915.js} +14 -119
- package/dist/cjs/{filter-item-type.enum-e2e1bc5b.js → filter-item-type.enum-3daf58d3.js} +2 -0
- package/dist/cjs/index-84fe3b86.js +20 -0
- package/dist/cjs/index-93965c41.js +141 -0
- package/dist/cjs/{index-02201bc9.js → index-e90ae303.js} +11 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +43 -25
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +10 -18
- package/dist/cjs/snk-filter-bar.cjs.entry.js +334 -146
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +37 -2
- package/dist/cjs/snk-filter-item.cjs.entry.js +34 -11
- package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal.cjs.entry.js +37 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +89 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +2 -2
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +1 -1
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/snk-application/snk-application.js +54 -7
- package/dist/collection/components/snk-crud/snk-crud.js +2 -4
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +0 -27
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +100 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +161 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +2 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +36 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +32 -9
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +196 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +22 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +238 -139
- package/dist/collection/components/snk-grid/snk-grid.js +2 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +18 -10
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +14 -2
- package/dist/components/SnkMessageBuilder.js +15 -119
- package/dist/components/filter-item-type.enum.js +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index2.js +11 -1
- package/dist/components/index3.js +139 -0
- package/dist/components/snk-application2.js +39 -19
- package/dist/components/snk-crud.js +15 -9
- package/dist/components/snk-data-unit.js +2 -11
- package/dist/components/snk-filter-bar2.js +340 -146
- package/dist/components/snk-filter-detail2.js +36 -1
- package/dist/components/snk-filter-item2.js +32 -9
- package/dist/components/snk-filter-list2.js +1 -1
- package/dist/components/snk-filter-modal.d.ts +11 -0
- package/dist/components/snk-filter-modal.js +6 -0
- package/dist/components/snk-filter-modal2.js +73 -0
- package/dist/components/snk-filter-personalized.d.ts +11 -0
- package/dist/components/snk-filter-personalized.js +107 -0
- package/dist/components/snk-grid2.js +15 -9
- package/dist/{sankhyablocks/SnkMessageBuilder-a7da466b.js → esm/SnkMessageBuilder-35a20271.js} +15 -119
- package/dist/esm/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js} +2 -0
- package/dist/esm/index-5992b7e6.js +139 -0
- package/dist/esm/{index-f1d3e4da.js → index-c683b2b0.js} +11 -1
- package/dist/esm/index-c71285cb.js +17 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +37 -19
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -11
- package/dist/esm/snk-filter-bar.entry.js +328 -140
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +37 -2
- package/dist/esm/snk-filter-item.entry.js +34 -11
- package/dist/esm/snk-filter-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal.entry.js +33 -0
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-personalized.entry.js +85 -0
- package/dist/esm/snk-filter-search.entry.js +2 -2
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +1 -1
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/{esm/SnkMessageBuilder-a7da466b.js → sankhyablocks/SnkMessageBuilder-35a20271.js} +15 -119
- package/dist/sankhyablocks/{filter-item-type.enum-61fbf80a.js → filter-item-type.enum-a79b2fa8.js} +2 -0
- package/dist/sankhyablocks/index-5992b7e6.js +139 -0
- package/dist/sankhyablocks/{index-f1d3e4da.js → index-c683b2b0.js} +11 -1
- package/dist/sankhyablocks/index-c71285cb.js +17 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/sankhyablocks/snk-application.entry.js +37 -19
- package/dist/sankhyablocks/snk-crud.entry.js +1 -1
- package/dist/sankhyablocks/snk-data-unit.entry.js +3 -11
- package/dist/sankhyablocks/snk-filter-bar.entry.js +328 -140
- package/dist/sankhyablocks/snk-filter-binary-select.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-detail.entry.js +37 -2
- package/dist/sankhyablocks/snk-filter-item.entry.js +34 -11
- package/dist/sankhyablocks/snk-filter-list.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-modal.entry.js +33 -0
- package/dist/sankhyablocks/snk-filter-multi-select.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-number.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-period.entry.js +1 -1
- package/dist/sankhyablocks/snk-filter-personalized.entry.js +85 -0
- package/dist/sankhyablocks/snk-filter-search.entry.js +2 -2
- package/dist/sankhyablocks/snk-form.entry.js +1 -1
- package/dist/sankhyablocks/snk-grid.entry.js +1 -1
- package/dist/sankhyablocks/snk-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/snk-taskbar.entry.js +1 -1
- package/dist/sankhyablocks/teste-pesquisa.entry.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +4 -1
- package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +23 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +3 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +23 -0
- package/dist/types/components.d.ts +56 -8
- package/package.json +3 -3
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +0 -51
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FloatingManager } from './index-
|
|
3
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FloatingManager } from './index-c683b2b0.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
5
5
|
const SnkFilterItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -22,16 +22,20 @@ const SnkFilterItem = class {
|
|
|
22
22
|
} while ((current = current.offsetParent) != null);
|
|
23
23
|
}
|
|
24
24
|
this.detailIsVisible = false;
|
|
25
|
+
this.executeCloseCallback();
|
|
25
26
|
return false;
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
async showUp(open = false) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
return new Promise(resolve => {
|
|
31
|
+
this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
|
|
32
|
+
if (open) {
|
|
33
|
+
window.requestAnimationFrame(() => {
|
|
34
|
+
this._closeCallback = resolve;
|
|
35
|
+
this.showDetail();
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
});
|
|
35
39
|
}
|
|
36
40
|
showDetail() {
|
|
37
41
|
this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset() });
|
|
@@ -46,6 +50,13 @@ const SnkFilterItem = class {
|
|
|
46
50
|
}
|
|
47
51
|
this._floatingID = undefined;
|
|
48
52
|
this.detailIsVisible = false;
|
|
53
|
+
this.executeCloseCallback();
|
|
54
|
+
}
|
|
55
|
+
executeCloseCallback() {
|
|
56
|
+
if (this._closeCallback) {
|
|
57
|
+
this._closeCallback();
|
|
58
|
+
this._closeCallback = undefined;
|
|
59
|
+
}
|
|
49
60
|
}
|
|
50
61
|
//---------------------------------------------
|
|
51
62
|
// Event handlers
|
|
@@ -120,6 +131,9 @@ const SnkFilterItem = class {
|
|
|
120
131
|
if (type === FilterItemType.SEARCH) {
|
|
121
132
|
return `${label}: ${value.value} - ${value.label}`;
|
|
122
133
|
}
|
|
134
|
+
if (type === FilterItemType.PERSONALIZED) {
|
|
135
|
+
return label;
|
|
136
|
+
}
|
|
123
137
|
return `${label}: ${value}`;
|
|
124
138
|
}
|
|
125
139
|
return label;
|
|
@@ -134,15 +148,24 @@ const SnkFilterItem = class {
|
|
|
134
148
|
filterChangeListener() {
|
|
135
149
|
this.hideDetail();
|
|
136
150
|
}
|
|
137
|
-
|
|
151
|
+
getRightIconName() {
|
|
138
152
|
if (this.config.value != undefined) {
|
|
139
153
|
return "close";
|
|
140
154
|
}
|
|
141
155
|
return this.detailIsVisible ? "chevron-up" : "chevron-down";
|
|
142
156
|
}
|
|
157
|
+
getLeftIconName() {
|
|
158
|
+
switch (this.config.type) {
|
|
159
|
+
case FilterItemType.PERIOD:
|
|
160
|
+
return "calendar";
|
|
161
|
+
case FilterItemType.PERSONALIZED:
|
|
162
|
+
return "tune";
|
|
163
|
+
}
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
143
166
|
render() {
|
|
144
|
-
const leftIcon = this.
|
|
145
|
-
return (h(Host, null, h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.
|
|
167
|
+
const leftIcon = this.getLeftIconName();
|
|
168
|
+
return (h(Host, null, h("ez-chip", { ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.config.value != undefined }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id }))));
|
|
146
169
|
}
|
|
147
170
|
get _filterItemElement() { return getElement(this); }
|
|
148
171
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FloatingManager,
|
|
2
|
+
import { F as FloatingManager, h as ArrayUtils } from './index-c683b2b0.js';
|
|
3
3
|
|
|
4
4
|
const SHOW_MORE_ITEM_NAME = "__SHOWMORE__";
|
|
5
5
|
const MAX_FILTERS = 5;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
+
import { a as ModalButtonStatus } from './index-c71285cb.js';
|
|
3
|
+
import { h as ArrayUtils } from './index-c683b2b0.js';
|
|
4
|
+
|
|
5
|
+
const SnkFilterModal = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
updateValue(id, value) {
|
|
10
|
+
this.items = this.items.map(item => {
|
|
11
|
+
if (item.id === id) {
|
|
12
|
+
return Object.assign(Object.assign({}, item), { active: value });
|
|
13
|
+
}
|
|
14
|
+
return item;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
getActiveFiltersMsg() {
|
|
18
|
+
const activeFilters = this.items.filter(item => item.active).length;
|
|
19
|
+
if (activeFilters === 0) {
|
|
20
|
+
return this.getMessage("snkFilterBar.noActiveFilters");
|
|
21
|
+
}
|
|
22
|
+
return this.getMessage(activeFilters > 1 ? "snkFilterBar.activeFilters" : "snkFilterBar.activeFilter", { ACTIVE_FILTERS: activeFilters });
|
|
23
|
+
}
|
|
24
|
+
getFilteredItems() {
|
|
25
|
+
return this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items) : [];
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const allowCancel = this.items.filter(item => item.active).length > 0;
|
|
29
|
+
return (h("ez-modal-container", { modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.processModalAction(evt.detail), cancelButtonStatus: allowCancel ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED }, h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, h("div", null, this.useSearch ? h("ez-filter-input", { label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail }) : undefined), this.getFilteredItems().length > 0 ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, h("div", null, this.getFilteredItems().map(item => h("div", { class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, h("ez-check", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-item__check", onEzChange: evt => this.updateValue(item.id, evt.detail), enabled: item.enabled, value: item.active, mode: "switch" }), h("div", { class: "ez-text ez-title--primary ez-text--medium ez-margin-left--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item__label" }, item.label)))), h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { SnkFilterModal as snk_filter_modal };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
3
|
|
|
4
4
|
const SnkFilterMultiSelect = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
3
|
|
|
4
4
|
const SnkFilterPeriod = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
3
3
|
|
|
4
4
|
const SnkFilterPeriod = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { r as registerInstance, h, f as Host } from './index-2b4d2d14.js';
|
|
2
|
+
import { U as UserInterface, c as convertType, A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
|
+
|
|
5
|
+
const SnkFilterPersonalized = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
}
|
|
9
|
+
getValue(param, index) {
|
|
10
|
+
if (this.value && index >= 0 && index < this.value.length) {
|
|
11
|
+
const rawValue = this.value[index];
|
|
12
|
+
if (param.type === UserInterface.SEARCH) {
|
|
13
|
+
return rawValue;
|
|
14
|
+
}
|
|
15
|
+
return convertType(param.dataType, rawValue);
|
|
16
|
+
}
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
setValue(index, value) {
|
|
20
|
+
if (this.value == undefined) {
|
|
21
|
+
this.value = Array(index).fill(null);
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
this.value = [...this.value];
|
|
25
|
+
}
|
|
26
|
+
this.value[index] = value;
|
|
27
|
+
if (this.value.filter(item => item != undefined).length == 0) {
|
|
28
|
+
this.value = null;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
doSearch(mode, argument, param) {
|
|
32
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
33
|
+
if (this.fix) {
|
|
34
|
+
this.fix();
|
|
35
|
+
}
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
application.executePreparedSearch(mode, argument, param.searchContext)
|
|
38
|
+
.then(result => {
|
|
39
|
+
resolve(result);
|
|
40
|
+
if (this.unfix) {
|
|
41
|
+
this.unfix();
|
|
42
|
+
}
|
|
43
|
+
}).catch(reason => {
|
|
44
|
+
reject(reason);
|
|
45
|
+
if (this.unfix) {
|
|
46
|
+
this.unfix();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getParamsInterface() {
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
const params = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.personalizedFilter) === null || _c === void 0 ? void 0 : _c.parameters;
|
|
54
|
+
return params.map((param, index) => {
|
|
55
|
+
var _a;
|
|
56
|
+
switch (param.type) {
|
|
57
|
+
case UserInterface.SEARCH:
|
|
58
|
+
return h("ez-search", { suppressEmptyOption: true, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
|
|
59
|
+
case UserInterface.SWITCH:
|
|
60
|
+
case UserInterface.CHECKBOX:
|
|
61
|
+
const mode = UserInterface.SWITCH === param.type ? "switch" : "regular";
|
|
62
|
+
return h("ez-check", { class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index), label: param.label, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
63
|
+
case UserInterface.DECIMALNUMBER:
|
|
64
|
+
case UserInterface.INTEGERNUMBER:
|
|
65
|
+
return h("ez-number-input", { label: param.label, value: this.getValue(param, index), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index, evt.detail) });
|
|
66
|
+
case UserInterface.OPTIONSELECTOR:
|
|
67
|
+
return h("ez-combo-box", { label: param.label, value: this.getValue(param, index), options: param.options, onEzChange: evt => { var _a; return this.setValue(index, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
|
|
68
|
+
case UserInterface.DATE:
|
|
69
|
+
return h("ez-date-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
70
|
+
case UserInterface.DATETIME:
|
|
71
|
+
return h("ez-date-time-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
72
|
+
default:
|
|
73
|
+
return h("ez-text-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
render() {
|
|
78
|
+
if (!this.config || this.config.type !== FilterItemType.PERSONALIZED) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
return (h(Host, null, this.getParamsInterface()));
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export { SnkFilterPersonalized as snk_filter_personalized };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { A as ApplicationContext } from './index-
|
|
3
|
-
import { F as FilterItemType } from './filter-item-type.enum-
|
|
2
|
+
import { A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
5
5
|
const SnkFilterSearch = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { A as ApplicationContext } from './index-
|
|
2
|
+
import { A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
3
|
import { T as TaskbarProcessor } from './taskbar-processor-aa6772c9.js';
|
|
4
4
|
|
|
5
5
|
const snkFormCss = ".sc-snk-form-h{display:block}.snk-form.sc-snk-form{position:relative;padding:var(--space--large);padding-top:var(--space--medium)}.snk-form__header.sc-snk-form{position:relative;padding-top:var(--space--medium);padding-bottom:var(--space--medium);margin-bottom:var(--space--medium)}.snk-form__header--fixed.sc-snk-form{position:sticky;top:0;background:var(--background--body);z-index:var(--more-visible, 2);padding-left:var(--space--large);padding-right:var(--space--large);margin-left:calc(var(--space--large) * -1);margin-right:calc(var(--space--large) * -1);width:calc(100% + (var(--space--large) * 2))}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, g as getElement } from './index-2b4d2d14.js';
|
|
2
|
-
import { A as ApplicationContext } from './index-
|
|
2
|
+
import { A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
3
|
import { T as TaskbarElement } from './taskbar-elements-35d64ff9.js';
|
|
4
4
|
import { T as TaskbarProcessor } from './taskbar-processor-aa6772c9.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, f as Host } from './index-2b4d2d14.js';
|
|
2
|
-
import { O as ObjectUtils, S as StringUtils } from './index-
|
|
2
|
+
import { O as ObjectUtils, S as StringUtils } from './index-c683b2b0.js';
|
|
3
3
|
|
|
4
4
|
const snkPesquisaCss = ".sc-snk-pesquisa-h{--snk-pesquisa--font-size:var(--text--medium, 14px);--snk-pesquisa--font-family:var(--font-pattern, Arial);--snk-pesquisa--font-weight:var(--text-weight--medium, 400);--snk-pesquisa__records--color:var(--text--primary, #626e82);--snk-pesquisa__records--padding-vertical:var(--space--medium, 12px);--snk-pesquisa__content--padding-right:var(--space--small, 6px);--snk-pesquisa__content-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--snk-pesquisa__content-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--snk-pesquisa__content-scrollbar--border-radius:var(--border--radius-small, 6px);--snk-pesquisa__content-scrollbar--width:var(--space--medium, 12px);--snk-pesquisa__btn--color:var(--title--primary, #2B3A54);--snk-pesquisa__btn-disabled--color:var(--text--disable, #AFB6C0);--snk-pesquisa__btn-hover--color:var(--color--primary, #4e4e4e);max-height:100%;height:100%;display:flex;flex-direction:column;overflow-y:auto}.snk-pesquisa.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%}.snk-pesquisa__input.sc-snk-pesquisa{display:flex;width:100%;box-sizing:border-box;padding-top:4px;padding-right:4px}.snk-pesquisa__input.sc-snk-pesquisa ez-icon.sc-snk-pesquisa{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.snk-pesquisa__content.sc-snk-pesquisa{display:flex;flex-direction:column;height:100%;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--snk-pesquisa__content-scrollbar--background-color-primary) var(--snk-pesquisa__content-scrollbar--background-color-secondary);padding-right:var(--snk-pesquisa__content--padding-right)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-track{background-color:var(--snk-pesquisa__content-scrollbar--background-color-secondary);border-radius:var(--snk-pesquisa__content-scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar-thumb{background-color:var(--snk-pesquisa__content-scrollbar--background-color-primary);border-radius:var(--snk-pesquisa__content-scrollbar--border-radius)}.snk-pesquisa__content.sc-snk-pesquisa::-webkit-scrollbar{background-color:var(--snk-pesquisa__content-scrollbar--background-color-secondary);width:var(--snk-pesquisa__content-scrollbar--width);max-width:var(--snk-pesquisa__content-scrollbar--width);min-width:var(--snk-pesquisa__content-scrollbar--width)}.snk-pesquisa__records.sc-snk-pesquisa{font-family:var(--snk-pesquisa--font-family);font-weight:var(--snk-pesquisa--font-weight);font-size:var(--snk-pesquisa--font-size);color:var(--snk-pesquisa__records--color);padding-bottom:var(--snk-pesquisa__records--padding-vertical);padding-top:var(--snk-pesquisa__records--padding-vertical)}.snk-pesquisa__btn.sc-snk-pesquisa{outline:none;border:none;background:none;cursor:pointer;color:var(--snk-pesquisa__btn--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:disabled:hover{cursor:unset;color:var(--snk-pesquisa__btn-disabled--color)}.snk-pesquisa__btn.sc-snk-pesquisa:hover{color:var(--snk-pesquisa__btn-hover--color)}";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, e as createEvent, h, f as Host } from './index-2b4d2d14.js';
|
|
2
|
-
import { A as ApplicationContext } from './index-
|
|
2
|
+
import { A as ApplicationContext } from './index-c683b2b0.js';
|
|
3
3
|
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-35d64ff9.js';
|
|
4
4
|
|
|
5
5
|
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-2b4d2d14.js';
|
|
2
|
-
import { D as DataUnit, b as DataType, U as UserInterface } from './index-
|
|
2
|
+
import { D as DataUnit, b as DataType, U as UserInterface } from './index-c683b2b0.js';
|
|
3
3
|
|
|
4
4
|
const testePesquisaCss = ":host{display:block}";
|
|
5
5
|
|
|
@@ -29,6 +29,7 @@ export declare class SnkApplication {
|
|
|
29
29
|
_filterBarConfigFetcher: FilterBarConfigFetcher;
|
|
30
30
|
_resourceID: string;
|
|
31
31
|
_popUp: HTMLEzPopupElement;
|
|
32
|
+
_rightModal: HTMLEzModalElement;
|
|
32
33
|
_errorHandler: SnkErrorHandler;
|
|
33
34
|
_authPromises: Array<PendingPromise>;
|
|
34
35
|
_filterConfigPromise: Promise<Array<SnkFilterItemConfig>>;
|
|
@@ -85,6 +86,8 @@ export declare class SnkApplication {
|
|
|
85
86
|
* Mostra o conteúdo passado em um Popup
|
|
86
87
|
*/
|
|
87
88
|
showPopUp(content: HTMLElement): Promise<void>;
|
|
89
|
+
showModal(content: HTMLElement): Promise<void>;
|
|
90
|
+
closeModal(): Promise<void>;
|
|
88
91
|
/**
|
|
89
92
|
* Fecha o popup, liberando o conteúdo.
|
|
90
93
|
*/
|
|
@@ -192,7 +195,7 @@ export declare class SnkApplication {
|
|
|
192
195
|
executeSearch(searchArgument: any, fieldName: string, dataUnit: DataUnit): Promise<Array<Option> | Option>;
|
|
193
196
|
executePreparedSearch(mode: string, argument: string, options: any): Promise<Array<Option> | Option>;
|
|
194
197
|
isDebugMode(): Promise<boolean>;
|
|
195
|
-
private
|
|
198
|
+
private clearContent;
|
|
196
199
|
private clearPopUpTitle;
|
|
197
200
|
private setPopUpTitle;
|
|
198
201
|
componentWillLoad(): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DataType, UserInterface } from '@sankhyalabs/core';
|
|
2
|
+
import { Option } from '@sankhyalabs/ezui/dist/types/components/ez-combo-box/ez-combo-box';
|
|
3
|
+
import { SnkFilterItemConfig } from '../snk-filter-item';
|
|
4
|
+
export declare class SnkFilterPersonalized {
|
|
5
|
+
config: SnkFilterItemConfig;
|
|
6
|
+
value: Array<Option | boolean | string | number | Date>;
|
|
7
|
+
fix: () => void;
|
|
8
|
+
unfix: () => void;
|
|
9
|
+
getValue(param: FilterParameter, index: number): Option | boolean | string | number | Date;
|
|
10
|
+
setValue(index: number, value: Option | boolean | string | number | Date): void;
|
|
11
|
+
doSearch(mode: string, argument: string, param: FilterParameter): Promise<Array<Option> | Option>;
|
|
12
|
+
getParamsInterface(): any[];
|
|
13
|
+
render(): any;
|
|
14
|
+
}
|
|
15
|
+
export interface FilterParameter {
|
|
16
|
+
label: string;
|
|
17
|
+
name: string;
|
|
18
|
+
type: UserInterface;
|
|
19
|
+
dataType: DataType;
|
|
20
|
+
options?: Array<Option>;
|
|
21
|
+
searchContext?: any;
|
|
22
|
+
props?: any;
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ModalAction } from "@sankhyalabs/ezui/dist/collection/components/ez-modal-container";
|
|
2
|
+
export declare class SnkFilterModal {
|
|
3
|
+
getMessage: (key: string, props?: any) => string;
|
|
4
|
+
items: Array<ModalItem>;
|
|
5
|
+
_filterArgument: string;
|
|
6
|
+
modalTitle: string;
|
|
7
|
+
modalSubTitle: string;
|
|
8
|
+
cancelButtonLabel: string;
|
|
9
|
+
okButtonLabel: string;
|
|
10
|
+
infoText: string;
|
|
11
|
+
useSearch: boolean;
|
|
12
|
+
processModalAction: (action: ModalAction) => void;
|
|
13
|
+
updateValue(id: string, value: boolean): void;
|
|
14
|
+
getActiveFiltersMsg(): string;
|
|
15
|
+
getFilteredItems(): any[];
|
|
16
|
+
render(): any;
|
|
17
|
+
}
|
|
18
|
+
export interface ModalItem {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
active: boolean;
|
|
23
|
+
}
|
|
@@ -18,6 +18,8 @@ import { Action, TaskbarManager } from "./components/snk-taskbar/snk-taskbar";
|
|
|
18
18
|
import { DataState } from "./components/snk-data-unit/snk-data-unit";
|
|
19
19
|
import { SnkFilterItemConfig as SnkFilterItemConfig1 } from "./components/snk-filter-bar/filter-item/snk-filter-item";
|
|
20
20
|
import { ListItem } from "./components/snk-filter-bar/filter-list/snk-filter-list";
|
|
21
|
+
import { ModalItem } from "./components/snk-filter-bar/filter-modal/snk-filter-modal";
|
|
22
|
+
import { ModalAction } from "@sankhyalabs/ezui/dist/collection/components/ez-modal-container";
|
|
21
23
|
import { Action as Action1, CustomButton } from "./components/snk-taskbar/snk-taskbar";
|
|
22
24
|
export namespace Components {
|
|
23
25
|
interface SnkApplication {
|
|
@@ -25,6 +27,7 @@ export namespace Components {
|
|
|
25
27
|
* Mostra o diálogo de alerta de acordo com os parâmetros passados.
|
|
26
28
|
*/
|
|
27
29
|
"alert": (title: string, message: string, icon?: string, options?: MessageOptions) => Promise<boolean>;
|
|
30
|
+
"closeModal": () => Promise<void>;
|
|
28
31
|
/**
|
|
29
32
|
* Fecha o popup, liberando o conteúdo.
|
|
30
33
|
*/
|
|
@@ -140,6 +143,7 @@ export namespace Components {
|
|
|
140
143
|
* Salva a configuração de grade.
|
|
141
144
|
*/
|
|
142
145
|
"saveGridConfig": (config: IGridConfig) => Promise<boolean>;
|
|
146
|
+
"showModal": (content: HTMLElement) => Promise<void>;
|
|
143
147
|
/**
|
|
144
148
|
* Mostra o conteúdo passado em um Popup
|
|
145
149
|
*/
|
|
@@ -180,10 +184,6 @@ export namespace Components {
|
|
|
180
184
|
* Executado após a ação de salvar
|
|
181
185
|
*/
|
|
182
186
|
"afterSave": (dataUnit: DataUnit) => void;
|
|
183
|
-
/**
|
|
184
|
-
* Quando ativada essa propriedade faz com que haja uma carga imediata no DataUnit
|
|
185
|
-
*/
|
|
186
|
-
"autoLoad": boolean;
|
|
187
187
|
/**
|
|
188
188
|
* Executado imediatamente antes da ação de salvar as alterações. Útil no caso de validações por exemplo. Caso retorne "false" (ou a promessa se resolva como false), cancela a ação.
|
|
189
189
|
*/
|
|
@@ -251,6 +251,17 @@ export namespace Components {
|
|
|
251
251
|
"items": Array<ListItem>;
|
|
252
252
|
"label": string;
|
|
253
253
|
}
|
|
254
|
+
interface SnkFilterModal {
|
|
255
|
+
"cancelButtonLabel": string;
|
|
256
|
+
"getMessage": (key: string, props?: any) => string;
|
|
257
|
+
"infoText": string;
|
|
258
|
+
"items": Array<ModalItem>;
|
|
259
|
+
"modalSubTitle": string;
|
|
260
|
+
"modalTitle": string;
|
|
261
|
+
"okButtonLabel": string;
|
|
262
|
+
"processModalAction": (action: ModalAction) => void;
|
|
263
|
+
"useSearch": boolean;
|
|
264
|
+
}
|
|
254
265
|
interface SnkFilterMultiSelect {
|
|
255
266
|
"config": SnkFilterItemConfig;
|
|
256
267
|
"value": any;
|
|
@@ -263,6 +274,12 @@ export namespace Components {
|
|
|
263
274
|
"config": SnkFilterItemConfig;
|
|
264
275
|
"value": any;
|
|
265
276
|
}
|
|
277
|
+
interface SnkFilterPersonalized {
|
|
278
|
+
"config": SnkFilterItemConfig;
|
|
279
|
+
"fix": ()=>void;
|
|
280
|
+
"unfix": ()=>void;
|
|
281
|
+
"value": Array<Option|boolean|string|number|Date>;
|
|
282
|
+
}
|
|
266
283
|
interface SnkFilterSearch {
|
|
267
284
|
"config": SnkFilterItemConfig;
|
|
268
285
|
"fix": ()=>void;
|
|
@@ -428,6 +445,12 @@ declare global {
|
|
|
428
445
|
prototype: HTMLSnkFilterListElement;
|
|
429
446
|
new (): HTMLSnkFilterListElement;
|
|
430
447
|
};
|
|
448
|
+
interface HTMLSnkFilterModalElement extends Components.SnkFilterModal, HTMLStencilElement {
|
|
449
|
+
}
|
|
450
|
+
var HTMLSnkFilterModalElement: {
|
|
451
|
+
prototype: HTMLSnkFilterModalElement;
|
|
452
|
+
new (): HTMLSnkFilterModalElement;
|
|
453
|
+
};
|
|
431
454
|
interface HTMLSnkFilterMultiSelectElement extends Components.SnkFilterMultiSelect, HTMLStencilElement {
|
|
432
455
|
}
|
|
433
456
|
var HTMLSnkFilterMultiSelectElement: {
|
|
@@ -446,6 +469,12 @@ declare global {
|
|
|
446
469
|
prototype: HTMLSnkFilterPeriodElement;
|
|
447
470
|
new (): HTMLSnkFilterPeriodElement;
|
|
448
471
|
};
|
|
472
|
+
interface HTMLSnkFilterPersonalizedElement extends Components.SnkFilterPersonalized, HTMLStencilElement {
|
|
473
|
+
}
|
|
474
|
+
var HTMLSnkFilterPersonalizedElement: {
|
|
475
|
+
prototype: HTMLSnkFilterPersonalizedElement;
|
|
476
|
+
new (): HTMLSnkFilterPersonalizedElement;
|
|
477
|
+
};
|
|
449
478
|
interface HTMLSnkFilterSearchElement extends Components.SnkFilterSearch, HTMLStencilElement {
|
|
450
479
|
}
|
|
451
480
|
var HTMLSnkFilterSearchElement: {
|
|
@@ -497,9 +526,11 @@ declare global {
|
|
|
497
526
|
"snk-filter-detail": HTMLSnkFilterDetailElement;
|
|
498
527
|
"snk-filter-item": HTMLSnkFilterItemElement;
|
|
499
528
|
"snk-filter-list": HTMLSnkFilterListElement;
|
|
529
|
+
"snk-filter-modal": HTMLSnkFilterModalElement;
|
|
500
530
|
"snk-filter-multi-select": HTMLSnkFilterMultiSelectElement;
|
|
501
531
|
"snk-filter-number": HTMLSnkFilterNumberElement;
|
|
502
532
|
"snk-filter-period": HTMLSnkFilterPeriodElement;
|
|
533
|
+
"snk-filter-personalized": HTMLSnkFilterPersonalizedElement;
|
|
503
534
|
"snk-filter-search": HTMLSnkFilterSearchElement;
|
|
504
535
|
"snk-filter-text": HTMLSnkFilterTextElement;
|
|
505
536
|
"snk-form": HTMLSnkFormElement;
|
|
@@ -559,10 +590,6 @@ declare namespace LocalJSX {
|
|
|
559
590
|
* Executado após a ação de salvar
|
|
560
591
|
*/
|
|
561
592
|
"afterSave"?: (dataUnit: DataUnit) => void;
|
|
562
|
-
/**
|
|
563
|
-
* Quando ativada essa propriedade faz com que haja uma carga imediata no DataUnit
|
|
564
|
-
*/
|
|
565
|
-
"autoLoad"?: boolean;
|
|
566
593
|
/**
|
|
567
594
|
* Executado imediatamente antes da ação de salvar as alterações. Útil no caso de validações por exemplo. Caso retorne "false" (ou a promessa se resolva como false), cancela a ação.
|
|
568
595
|
*/
|
|
@@ -643,6 +670,17 @@ declare namespace LocalJSX {
|
|
|
643
670
|
"label"?: string;
|
|
644
671
|
"onSnkItemSelected"?: (event: SnkFilterListCustomEvent<string>) => void;
|
|
645
672
|
}
|
|
673
|
+
interface SnkFilterModal {
|
|
674
|
+
"cancelButtonLabel"?: string;
|
|
675
|
+
"getMessage"?: (key: string, props?: any) => string;
|
|
676
|
+
"infoText"?: string;
|
|
677
|
+
"items"?: Array<ModalItem>;
|
|
678
|
+
"modalSubTitle"?: string;
|
|
679
|
+
"modalTitle"?: string;
|
|
680
|
+
"okButtonLabel"?: string;
|
|
681
|
+
"processModalAction"?: (action: ModalAction) => void;
|
|
682
|
+
"useSearch"?: boolean;
|
|
683
|
+
}
|
|
646
684
|
interface SnkFilterMultiSelect {
|
|
647
685
|
"config"?: SnkFilterItemConfig;
|
|
648
686
|
"value"?: any;
|
|
@@ -655,6 +693,12 @@ declare namespace LocalJSX {
|
|
|
655
693
|
"config"?: SnkFilterItemConfig;
|
|
656
694
|
"value"?: any;
|
|
657
695
|
}
|
|
696
|
+
interface SnkFilterPersonalized {
|
|
697
|
+
"config"?: SnkFilterItemConfig;
|
|
698
|
+
"fix"?: ()=>void;
|
|
699
|
+
"unfix"?: ()=>void;
|
|
700
|
+
"value"?: Array<Option|boolean|string|number|Date>;
|
|
701
|
+
}
|
|
658
702
|
interface SnkFilterSearch {
|
|
659
703
|
"config"?: SnkFilterItemConfig;
|
|
660
704
|
"fix"?: ()=>void;
|
|
@@ -763,9 +807,11 @@ declare namespace LocalJSX {
|
|
|
763
807
|
"snk-filter-detail": SnkFilterDetail;
|
|
764
808
|
"snk-filter-item": SnkFilterItem;
|
|
765
809
|
"snk-filter-list": SnkFilterList;
|
|
810
|
+
"snk-filter-modal": SnkFilterModal;
|
|
766
811
|
"snk-filter-multi-select": SnkFilterMultiSelect;
|
|
767
812
|
"snk-filter-number": SnkFilterNumber;
|
|
768
813
|
"snk-filter-period": SnkFilterPeriod;
|
|
814
|
+
"snk-filter-personalized": SnkFilterPersonalized;
|
|
769
815
|
"snk-filter-search": SnkFilterSearch;
|
|
770
816
|
"snk-filter-text": SnkFilterText;
|
|
771
817
|
"snk-form": SnkForm;
|
|
@@ -787,9 +833,11 @@ declare module "@stencil/core" {
|
|
|
787
833
|
"snk-filter-detail": LocalJSX.SnkFilterDetail & JSXBase.HTMLAttributes<HTMLSnkFilterDetailElement>;
|
|
788
834
|
"snk-filter-item": LocalJSX.SnkFilterItem & JSXBase.HTMLAttributes<HTMLSnkFilterItemElement>;
|
|
789
835
|
"snk-filter-list": LocalJSX.SnkFilterList & JSXBase.HTMLAttributes<HTMLSnkFilterListElement>;
|
|
836
|
+
"snk-filter-modal": LocalJSX.SnkFilterModal & JSXBase.HTMLAttributes<HTMLSnkFilterModalElement>;
|
|
790
837
|
"snk-filter-multi-select": LocalJSX.SnkFilterMultiSelect & JSXBase.HTMLAttributes<HTMLSnkFilterMultiSelectElement>;
|
|
791
838
|
"snk-filter-number": LocalJSX.SnkFilterNumber & JSXBase.HTMLAttributes<HTMLSnkFilterNumberElement>;
|
|
792
839
|
"snk-filter-period": LocalJSX.SnkFilterPeriod & JSXBase.HTMLAttributes<HTMLSnkFilterPeriodElement>;
|
|
840
|
+
"snk-filter-personalized": LocalJSX.SnkFilterPersonalized & JSXBase.HTMLAttributes<HTMLSnkFilterPersonalizedElement>;
|
|
793
841
|
"snk-filter-search": LocalJSX.SnkFilterSearch & JSXBase.HTMLAttributes<HTMLSnkFilterSearchElement>;
|
|
794
842
|
"snk-filter-text": LocalJSX.SnkFilterText & JSXBase.HTMLAttributes<HTMLSnkFilterTextElement>;
|
|
795
843
|
"snk-form": LocalJSX.SnkForm & JSXBase.HTMLAttributes<HTMLSnkFormElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sankhyalabs/sankhyablocks",
|
|
3
|
-
"version": "1.4.0-beta.
|
|
3
|
+
"version": "1.4.0-beta.2",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@babel/preset-env": "^7.18.2",
|
|
39
|
-
"@sankhyalabs/core": "1.0.71-beta.
|
|
40
|
-
"@sankhyalabs/ezui": "
|
|
39
|
+
"@sankhyalabs/core": "1.0.71-beta.10",
|
|
40
|
+
"@sankhyalabs/ezui": "1.2.0-beta.15",
|
|
41
41
|
"@sankhyalabs/skippeerdeps": "^1.0.2",
|
|
42
42
|
"@semantic-release/git": "^9.0.0",
|
|
43
43
|
"@semantic-release/gitlab": "^6.1.0",
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { DataUnit } from '@sankhyalabs/core';
|
|
2
|
-
import { SnkApplication } from '../snk-application/snk-application';
|
|
3
|
-
import { SnkFilterItemConfig } from './filter-item/snk-filter-item';
|
|
4
|
-
import { FilterProvider, Filter } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
|
-
import { ListItem } from './filter-list/snk-filter-list';
|
|
6
|
-
export declare class SnkFilterBar implements FilterProvider {
|
|
7
|
-
_element: HTMLElement;
|
|
8
|
-
_application: SnkApplication;
|
|
9
|
-
_updateSequence: Array<string>;
|
|
10
|
-
_calculateSortIndex: (item: SnkFilterItemConfig) => number;
|
|
11
|
-
_filtersComparator: (a: SnkFilterItemConfig, b: SnkFilterItemConfig) => number;
|
|
12
|
-
/**
|
|
13
|
-
* Recebe o DataUnit do ambiente. Se não for informado, procura pela referência
|
|
14
|
-
* do SnkDataUnit. Necessário para se registrar como provedor de filtros.
|
|
15
|
-
*/
|
|
16
|
-
dataUnit: DataUnit;
|
|
17
|
-
/**
|
|
18
|
-
* Eventualmente poderemos ter mais de uma barra de filtros. Essa propriedade
|
|
19
|
-
* serve para separar a configuração de cada uma.
|
|
20
|
-
*/
|
|
21
|
-
configName: string;
|
|
22
|
-
/**
|
|
23
|
-
* Lista de todos os filtros disponíveis ao usuário.
|
|
24
|
-
*/
|
|
25
|
-
filterConfig: Array<SnkFilterItemConfig>;
|
|
26
|
-
/**
|
|
27
|
-
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
28
|
-
* através de um pequeno modulo na estrutura da aplicação:
|
|
29
|
-
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
30
|
-
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-bar.msg.ts"
|
|
31
|
-
*/
|
|
32
|
-
private getMessage;
|
|
33
|
-
getFilter(_dataUnit: string): Array<Filter>;
|
|
34
|
-
buildDUFilter(item: SnkFilterItemConfig): {
|
|
35
|
-
name: string;
|
|
36
|
-
expression: any;
|
|
37
|
-
params: any[];
|
|
38
|
-
};
|
|
39
|
-
componentWillLoad(): void;
|
|
40
|
-
getFilterItems(): Array<HTMLElement>;
|
|
41
|
-
calculateUpdateSequence(item: SnkFilterItemConfig): void;
|
|
42
|
-
filterChangeListener(evt: CustomEvent): void;
|
|
43
|
-
normalizeItem(item: SnkFilterItemConfig): SnkFilterItemConfig;
|
|
44
|
-
updateFilter(newItem: SnkFilterItemConfig, clear?: boolean): boolean;
|
|
45
|
-
getAddListItems(): Array<ListItem>;
|
|
46
|
-
getActiveClass(): "" | "sc-snk-filter-bar snk-filter-bar__filter-list-items-button--active";
|
|
47
|
-
getAppliedListItems(): Array<ListItem>;
|
|
48
|
-
addFilterHandler(itemName: string): void;
|
|
49
|
-
appliedFilterHandler(itemName: string): void;
|
|
50
|
-
render(): any;
|
|
51
|
-
}
|