@sankhyalabs/sankhyablocks 6.9.2 → 7.0.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/dist/cjs/{ConfigStorage-3aaa8a9f.js → ConfigStorage-97468a0f.js} +31 -25
- package/dist/cjs/{DataFetcher-093c47ae.js → DataFetcher-04c70ba9.js} +88 -24
- package/dist/cjs/{PersonalizedFilterUtils-cfcd9af2.js → PersonalizedFilterUtils-9848e09b.js} +18 -64
- package/dist/cjs/{SnkFormConfigManager-ddad3cbb.js → SnkFormConfigManager-bef6e022.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-e55c7afa.js → SnkMessageBuilder-f40df6d4.js} +20 -3
- package/dist/cjs/{dataunit-fetcher-2f67ac79.js → dataunit-fetcher-4102080d.js} +1 -1
- package/dist/cjs/{filter-bar-config-fetcher-81868495.js → filter-bar-config-fetcher-a7747f69.js} +23 -6
- package/dist/cjs/{form-config-fetcher-affb0b28.js → form-config-fetcher-56442594.js} +2 -2
- package/dist/cjs/index-8d94b7e0.js +7 -0
- package/dist/cjs/index-c5771aba.js +44 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-21c3afc9.js → pesquisa-fetcher-cab451b6.js} +1 -1
- package/dist/cjs/{resource-fetcher-e71a11b8.js → resource-fetcher-260e98a4.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button.cjs.entry.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +8 -8
- package/dist/cjs/snk-attach.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +2 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-26cf970c.js → snk-data-unit-b0cc2d42.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -9
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +542 -0
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +66 -0
- package/dist/cjs/snk-filter-bar.cjs.entry.js +17 -17
- package/dist/cjs/snk-filter-detail.cjs.entry.js +5 -5
- package/dist/cjs/{snk-expression-item_3.cjs.entry.js → snk-filter-field-search_2.cjs.entry.js} +23 -315
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -5
- package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -2
- package/dist/cjs/snk-form-config.cjs.entry.js +3 -3
- package/dist/cjs/snk-form.cjs.entry.js +6 -6
- package/dist/cjs/snk-grid-config.cjs.entry.js +5 -5
- package/dist/cjs/snk-grid.cjs.entry.js +5 -5
- package/dist/cjs/{snk-guides-viewer-b0f98cf4.js → snk-guides-viewer-897368ea.js} +3 -3
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +125 -34
- package/dist/cjs/snk-print-selector.cjs.entry.js +15 -11
- package/dist/cjs/snk-simple-crud.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css +5 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +114 -23
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +4 -6
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +2 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.css +10 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.js +95 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.css +66 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +158 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +8 -2
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +14 -23
- package/dist/collection/components/snk-print-selector/snk-print-selector.css +9 -1
- package/dist/collection/components/snk-print-selector/snk-print-selector.js +17 -14
- package/dist/collection/lib/configs/ConfigStorage.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +22 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +22 -18
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +18 -2
- package/dist/collection/lib/message/resources/snk-print-selector.msg.js +2 -1
- package/dist/collection/lib/utils/PrintUtils.js +88 -24
- package/dist/components/ConfigStorage.js +27 -21
- package/dist/components/DataFetcher.js +88 -24
- package/dist/components/PersonalizedFilterUtils.js +14 -23
- package/dist/components/SnkMessageBuilder.js +20 -3
- package/dist/components/filter-bar-config-fetcher.js +22 -5
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/snk-crud.js +34 -22
- package/dist/components/snk-detail-view2.js +49 -27
- package/dist/components/snk-expression-group2.js +4 -6
- package/dist/components/snk-expression-item2.js +2 -1
- package/dist/components/snk-filter-advanced-mode.d.ts +11 -0
- package/dist/components/snk-filter-advanced-mode.js +6 -0
- package/dist/components/snk-filter-advanced-mode2.js +46 -0
- package/dist/components/snk-filter-assistent-mode.d.ts +11 -0
- package/dist/components/snk-filter-assistent-mode.js +6 -0
- package/dist/components/snk-filter-assistent-mode2.js +77 -0
- package/dist/components/snk-filter-bar2.js +17 -5
- package/dist/components/snk-filter-param-config2.js +6 -0
- package/dist/components/snk-grid2.js +22 -10
- package/dist/components/snk-personalized-filter2.js +131 -28
- package/dist/components/snk-print-selector.js +14 -10
- package/dist/esm/{ConfigStorage-24b221ba.js → ConfigStorage-02f17a26.js} +31 -25
- package/dist/esm/{DataFetcher-6153ff3e.js → DataFetcher-fddeb917.js} +88 -24
- package/dist/esm/{PersonalizedFilterUtils-1a167d89.js → PersonalizedFilterUtils-731cae01.js} +16 -62
- package/dist/esm/{SnkFormConfigManager-fcbefc1a.js → SnkFormConfigManager-cd9e6cab.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-96e66d9c.js → SnkMessageBuilder-5be56185.js} +20 -3
- package/dist/esm/{dataunit-fetcher-09586248.js → dataunit-fetcher-66f42154.js} +1 -1
- package/dist/esm/{filter-bar-config-fetcher-73ebc12f.js → filter-bar-config-fetcher-790283d8.js} +23 -6
- package/dist/esm/{form-config-fetcher-01e9985d.js → form-config-fetcher-533b895e.js} +2 -2
- package/dist/esm/index-620ac460.js +7 -0
- package/dist/esm/index-ae591a44.js +44 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-829ec5a9.js → pesquisa-fetcher-4a702655.js} +1 -1
- package/dist/esm/{resource-fetcher-d053e214.js → resource-fetcher-0f20a072.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button.entry.js +2 -2
- package/dist/esm/snk-application.entry.js +8 -8
- package/dist/esm/snk-attach.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +2 -2
- package/dist/esm/snk-data-exporter.entry.js +3 -3
- package/dist/esm/{snk-data-unit-0f2d3c74.js → snk-data-unit-b9b4bb5f.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +9 -9
- package/dist/esm/snk-expression-group_2.entry.js +537 -0
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +61 -0
- package/dist/esm/snk-filter-bar.entry.js +8 -8
- package/dist/esm/snk-filter-detail.entry.js +5 -5
- package/dist/esm/{snk-expression-item_3.entry.js → snk-filter-field-search_2.entry.js} +12 -303
- package/dist/esm/snk-filter-modal-item.entry.js +5 -5
- package/dist/esm/snk-filter-modal.entry.js +2 -2
- package/dist/esm/snk-form-config.entry.js +3 -3
- package/dist/esm/snk-form.entry.js +6 -6
- package/dist/esm/snk-grid-config.entry.js +5 -5
- package/dist/esm/snk-grid.entry.js +5 -5
- package/dist/esm/{snk-guides-viewer-ab5c376c.js → snk-guides-viewer-579c70cc.js} +3 -3
- package/dist/esm/snk-guides-viewer.entry.js +8 -8
- package/dist/esm/snk-personalized-filter.entry.js +122 -31
- package/dist/esm/snk-print-selector.entry.js +15 -11
- package/dist/esm/snk-simple-crud.entry.js +2 -2
- package/dist/sankhyablocks/{p-e665c93f.entry.js → p-19fdcf88.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4ab8d0ee.entry.js → p-1fe2976e.entry.js} +1 -1
- package/dist/sankhyablocks/p-2227bb94.js +1 -0
- package/dist/sankhyablocks/{p-85e6068d.entry.js → p-2ddf3e87.entry.js} +1 -1
- package/dist/sankhyablocks/p-386102a7.entry.js +1 -0
- package/dist/sankhyablocks/{p-eaec700d.js → p-3b059f4e.js} +1 -1
- package/dist/sankhyablocks/p-4af6cbef.entry.js +1 -0
- package/dist/sankhyablocks/p-4bbc7aac.entry.js +1 -0
- package/dist/sankhyablocks/p-4f550a1a.js +1 -0
- package/dist/sankhyablocks/{p-7dd92fb8.entry.js → p-4f687570.entry.js} +1 -1
- package/dist/sankhyablocks/p-5098f618.js +1 -0
- package/dist/sankhyablocks/{p-16ad23d5.entry.js → p-5596a2dd.entry.js} +1 -1
- package/dist/sankhyablocks/p-7e636457.entry.js +1 -0
- package/dist/sankhyablocks/p-7f1c4687.js +56 -0
- package/dist/sankhyablocks/p-82800006.entry.js +1 -0
- package/dist/sankhyablocks/{p-05d82333.entry.js → p-88f4ef73.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d20e2ce3.js → p-8f484733.js} +1 -1
- package/dist/sankhyablocks/{p-eb0c9f4c.js → p-90a926c7.js} +1 -1
- package/dist/sankhyablocks/{p-432dd007.entry.js → p-90e7c3a2.entry.js} +1 -1
- package/dist/sankhyablocks/p-933c0c0b.js +1 -0
- package/dist/sankhyablocks/p-9666c0d0.entry.js +1 -0
- package/dist/sankhyablocks/p-97720467.entry.js +1 -0
- package/dist/sankhyablocks/{p-a4cd60bf.entry.js → p-97c586ab.entry.js} +1 -1
- package/dist/sankhyablocks/{p-814f9247.js → p-982107dc.js} +1 -1
- package/dist/sankhyablocks/{p-354ce206.entry.js → p-9fa9331b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-07cb8a03.entry.js → p-a357d13c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bfe8b96d.js → p-acd8b97b.js} +1 -1
- package/dist/sankhyablocks/{p-40a5d35e.entry.js → p-ad6673fb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3e8748b1.entry.js → p-af8ed6d5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bd1f8640.entry.js → p-bc19b890.entry.js} +1 -1
- package/dist/sankhyablocks/p-bd86c9d3.entry.js +1 -0
- package/dist/sankhyablocks/{p-1b596ea1.entry.js → p-cdbdcf13.entry.js} +1 -1
- package/dist/sankhyablocks/{p-89fb7531.js → p-d97eb781.js} +2 -2
- package/dist/sankhyablocks/{p-60ad0dea.js → p-f034254e.js} +1 -1
- package/dist/sankhyablocks/p-f4184ce7.js +1 -0
- package/dist/sankhyablocks/{p-9a7aafe4.js → p-fb1e5b6d.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-personalized-filter/interfaces/IPersonalizedFilter.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +17 -6
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +2 -2
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.d.ts +20 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +31 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.d.ts +6 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +2 -2
- package/dist/types/components/snk-print-selector/snk-print-selector.d.ts +7 -1
- package/dist/types/components.d.ts +106 -4
- package/dist/types/lib/configs/ConfigStorage.d.ts +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/utils/PrintUtils.d.ts +5 -2
- package/package.json +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/IExpressionItem-0e32ebb7.js +0 -7
- package/dist/cjs/snk-expression-group.cjs.entry.js +0 -250
- package/dist/esm/IExpressionItem-21f225bf.js +0 -7
- package/dist/esm/snk-expression-group.entry.js +0 -246
- package/dist/sankhyablocks/p-13f0ed88.entry.js +0 -1
- package/dist/sankhyablocks/p-2b449454.js +0 -1
- package/dist/sankhyablocks/p-63bff2a8.js +0 -1
- package/dist/sankhyablocks/p-6f49f5d4.entry.js +0 -1
- package/dist/sankhyablocks/p-744d0fd2.js +0 -1
- package/dist/sankhyablocks/p-7d68a43a.js +0 -1
- package/dist/sankhyablocks/p-9404ad4d.entry.js +0 -1
- package/dist/sankhyablocks/p-ad4bb9d2.entry.js +0 -1
- package/dist/sankhyablocks/p-d9586ead.entry.js +0 -1
- package/dist/sankhyablocks/p-e789eb2d.js +0 -68
- package/dist/sankhyablocks/p-f8ce17d3.entry.js +0 -1
- package/dist/sankhyablocks/p-feb6963e.entry.js +0 -1
@@ -3,7 +3,7 @@ import { ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { PersonalizedFilterUtils } from './subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils';
|
4
4
|
import { ConfigStorage } from "../../lib/configs/ConfigStorage";
|
5
5
|
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
6
|
-
import { ObjectUtils } from "@sankhyalabs/core";
|
6
|
+
import { ObjectUtils, ElementIDUtils } from "@sankhyalabs/core";
|
7
7
|
import { FilterGroupCondition } from './interfaces/IExpressionItem';
|
8
8
|
import store from '../../lib/store';
|
9
9
|
import PersonalizedFilterFetcher from "../../lib/http/data-fetcher/fetchers/personalized-filter-fetcher";
|
@@ -90,6 +90,13 @@ export class SnkPersonalizedFilter {
|
|
90
90
|
}
|
91
91
|
this.loadFilter(this.filterId, undefined);
|
92
92
|
}
|
93
|
+
componentDidRender() {
|
94
|
+
var _a;
|
95
|
+
(_a = this._viewStackRef) === null || _a === void 0 ? void 0 : _a.show(this._filterAssistentMode ? 0 : 1);
|
96
|
+
if (this._elButtonMode) {
|
97
|
+
this._elButtonMode.setAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME, ElementIDUtils.getInternalIDInfo(`${this._filterAssistentMode ? "advancedMode_ezButton" : "assistentMode_ezButton"}`));
|
98
|
+
}
|
99
|
+
}
|
93
100
|
getMessage(key, params) {
|
94
101
|
return this._application.messagesBuilder.getMessage(key, params);
|
95
102
|
}
|
@@ -107,26 +114,55 @@ export class SnkPersonalizedFilter {
|
|
107
114
|
removeFilter() {
|
108
115
|
ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.configName);
|
109
116
|
}
|
110
|
-
async handleFilterGroupChange() {
|
111
|
-
const assistent = await this._mainExpressionGroup.getExpressionGroup();
|
112
|
-
this._filterAssistent = Object.assign(Object.assign({}, this._filterAssistent), { assistent });
|
113
|
-
this._filterAssistent.parameters = PersonalizedFilterUtils.buildVariableParameters(this._filterAssistent.assistent);
|
114
|
-
this._elTextAreaExpression.value = PersonalizedFilterUtils.buildGroupExpression(this._filterAssistent.assistent, true);
|
115
|
-
this._elButtonSave.enabled = !this.hasChangesToSave();
|
116
|
-
}
|
117
117
|
hasChangesToSave() {
|
118
118
|
return JSON.stringify(this._filterAssistent) === JSON.stringify(this._originalFilterAssistent);
|
119
119
|
}
|
120
|
-
handleSave() {
|
120
|
+
async handleSave() {
|
121
|
+
if (this._filterAssistentMode) {
|
122
|
+
const isValid = PersonalizedFilterUtils.validateFields(this._filterAssistent.assistent);
|
123
|
+
if (!isValid || !this._filterAssistent.name)
|
124
|
+
return this._application.error(this.getMessage("snkPersonalizedFilter.error.title"), this.getMessage("snkPersonalizedFilter.error.description"));
|
125
|
+
this.saveAssistentMode();
|
126
|
+
}
|
127
|
+
else {
|
128
|
+
if (!this._filterAssistent.expression || !this._filterAssistent.name)
|
129
|
+
return this._application.error(this.getMessage("snkPersonalizedFilter.error.title"), this.getMessage("snkPersonalizedFilter.error.description"));
|
130
|
+
const isValidExpressionForAdvancedMode = await this.validateExpressionBeforeSaving();
|
131
|
+
if (!isValidExpressionForAdvancedMode)
|
132
|
+
return;
|
133
|
+
this.saveAdvancedMode();
|
134
|
+
}
|
135
|
+
}
|
136
|
+
saveAssistentMode() {
|
121
137
|
const { assistent, expression } = this._filterAssistent;
|
122
|
-
const isValid = PersonalizedFilterUtils.validateFields(assistent);
|
123
|
-
if (!isValid || !this._filterAssistent.name)
|
124
|
-
return this._application.error(this.getMessage("snkPersonalizedFilter.error.title"), this.getMessage("snkPersonalizedFilter.error.description"));
|
125
138
|
const expressionQuery = !!assistent ? PersonalizedFilterUtils.buildGroupExpression(assistent) : expression;
|
126
139
|
this._filterAssistent.expression = expressionQuery;
|
127
140
|
this.ezSave.emit(expressionQuery);
|
128
141
|
this.saveFilter();
|
129
142
|
}
|
143
|
+
saveAdvancedMode() {
|
144
|
+
if (this._filterAssistent.assistent) {
|
145
|
+
ApplicationUtils.confirm(this.getMessage("snkPersonalizedFilter.confirmSaveModeAdvanced.title"), this.getMessage("snkPersonalizedFilter.confirmSaveModeAdvanced.description"))
|
146
|
+
.then((confirm) => {
|
147
|
+
if (!confirm)
|
148
|
+
return;
|
149
|
+
this.saveAndTransformToAdvancedMode();
|
150
|
+
});
|
151
|
+
}
|
152
|
+
else {
|
153
|
+
this.saveAndTransformToAdvancedMode();
|
154
|
+
}
|
155
|
+
}
|
156
|
+
saveAndTransformToAdvancedMode() {
|
157
|
+
this._filterAssistent.assistent = undefined;
|
158
|
+
this.ezSave.emit(this._filterAssistent.expression);
|
159
|
+
this.saveFilter();
|
160
|
+
}
|
161
|
+
async validateExpressionBeforeSaving() {
|
162
|
+
const { valid, message } = await this._personalizedFilterFetcher.validatePersonalizedFilter(this.entityUri, this._filterAssistent.expression);
|
163
|
+
valid || this._application.error(this.getMessage("snkPersonalizedFilter.error.title"), message);
|
164
|
+
return valid;
|
165
|
+
}
|
130
166
|
handleCancel() {
|
131
167
|
if (this.hasChangesToSave()) {
|
132
168
|
return this.ezCancel.emit();
|
@@ -160,32 +196,87 @@ export class SnkPersonalizedFilter {
|
|
160
196
|
}
|
161
197
|
return resp;
|
162
198
|
}
|
163
|
-
|
199
|
+
handleExpressionChangeAdvancedMode(expression) {
|
164
200
|
this._filterAssistent = Object.assign(Object.assign({}, this._filterAssistent), { expression });
|
165
201
|
this._elButtonSave.enabled = !this.hasChangesToSave();
|
166
202
|
}
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
203
|
+
handleChangeFilterAssistentMode(filterAssistent) {
|
204
|
+
this._elButtonSave.enabled = !this.hasChangesToSave();
|
205
|
+
this._filterAssistent = Object.assign({}, filterAssistent);
|
206
|
+
}
|
207
|
+
selectField(fieldName) {
|
208
|
+
if (!('name' in fieldName))
|
209
|
+
return;
|
210
|
+
const fieldExpression = this.buildExpression(fieldName.entityName, fieldName.name, fieldName.entityPath);
|
211
|
+
const textAreaElement = this._elAdvancedMode.querySelector('ez-text-area');
|
212
|
+
textAreaElement.appendTextToSelection(fieldExpression);
|
213
|
+
}
|
214
|
+
buildExpression(entityName, fieldName, entityPath) {
|
215
|
+
if (entityPath.length > 0) {
|
216
|
+
entityPath.shift();
|
171
217
|
}
|
172
|
-
return
|
218
|
+
return entityPath.length > 0 ? `${entityPath.join("->")}->${fieldName}` : `${entityName}.${fieldName}`;
|
219
|
+
}
|
220
|
+
onAddField(target) {
|
221
|
+
const textAreaElement = this._elAdvancedMode.querySelector('ez-text-area');
|
222
|
+
const options = { horizontalGap: 0, verticalGap: 12, fromRight: true };
|
223
|
+
textAreaElement.setFocus();
|
224
|
+
target.setBlur();
|
225
|
+
if (this._elFilterFieldSearch)
|
226
|
+
this._elFilterFieldSearch.show(target, options);
|
227
|
+
}
|
228
|
+
renderButtonAddField() {
|
229
|
+
if (this._filterAssistentMode)
|
230
|
+
return;
|
231
|
+
return (h(Fragment, null, h("ez-button", { class: "snk-personalized-filter__button-mode", label: this.getMessage("snkPersonalizedFilter.info.addField"), enabled: true, onClick: (evt) => this.onAddField(evt.target) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: "plus" })), h("snk-filter-field-search", { class: "ez-padding-left--medium", ref: ref => this._elFilterFieldSearch = ref, onEzSelectFilterItem: (evt) => this.selectField(evt.detail), fieldsDataSource: this._dataSourceFetcher })));
|
173
232
|
}
|
174
233
|
buildContainerPersonalizedFilter() {
|
175
|
-
|
234
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStackRef = ref }, h("stack-item", null, this._filterAssistentMode &&
|
235
|
+
h("snk-filter-assistent-mode", { filterAssistent: this._filterAssistent, messagesBuilder: this.messagesBuilder, filterId: this.filterId, entityUri: this.entityUri, application: this._application, onEzChangeFilter: (ev) => this.handleChangeFilterAssistentMode(ev.detail) })), h("stack-item", null, h("snk-filter-advanced-mode", { ref: (ref) => this._elAdvancedMode = ref, filterAssistent: this._filterAssistent, application: this._application, onEzExpressionChange: (ev) => this.handleExpressionChangeAdvancedMode(ev.detail) }))));
|
236
|
+
}
|
237
|
+
handleModeChange() {
|
238
|
+
var _a, _b;
|
176
239
|
if (this._filterAssistentMode) {
|
177
|
-
|
240
|
+
ApplicationUtils.confirm(this.getMessage("snkPersonalizedFilter.confirmChangeModeAssistent.title"), this.getMessage("snkPersonalizedFilter.confirmChangeModeAssistent.description"))
|
241
|
+
.then((canCancel) => {
|
242
|
+
if (!canCancel)
|
243
|
+
return;
|
244
|
+
this._filterAssistentMode = !this._filterAssistentMode;
|
245
|
+
if (!this.hasChangesToSave()) {
|
246
|
+
const expression = PersonalizedFilterUtils.buildGroupExpression(this._filterAssistent.assistent);
|
247
|
+
this._filterAssistent.expression = expression;
|
248
|
+
this._elButtonSave.enabled = !this.hasChangesToSave();
|
249
|
+
}
|
250
|
+
});
|
178
251
|
}
|
179
252
|
else {
|
180
|
-
|
253
|
+
if (((_a = this._filterAssistent) === null || _a === void 0 ? void 0 : _a.expression) === ((_b = this._originalFilterAssistent) === null || _b === void 0 ? void 0 : _b.expression)) {
|
254
|
+
this._filterAssistentMode = !this._filterAssistentMode;
|
255
|
+
}
|
256
|
+
else {
|
257
|
+
const expressionBefore = this._filterAssistent.expression;
|
258
|
+
const expression = PersonalizedFilterUtils.buildGroupExpression(this._filterAssistent.assistent);
|
259
|
+
if (expressionBefore !== expression) {
|
260
|
+
ApplicationUtils.confirm(this.getMessage("snkPersonalizedFilter.confirmChangeModeAdvanced.title"), this.getMessage("snkPersonalizedFilter.confirmChangeModeAdvanced.description"))
|
261
|
+
.then((canCancel) => {
|
262
|
+
if (!canCancel)
|
263
|
+
return;
|
264
|
+
this._filterAssistent = Object.assign(Object.assign({}, this._filterAssistent), { expression });
|
265
|
+
this._filterAssistentMode = !this._filterAssistentMode;
|
266
|
+
});
|
267
|
+
}
|
268
|
+
else {
|
269
|
+
this._filterAssistentMode = !this._filterAssistentMode;
|
270
|
+
}
|
271
|
+
}
|
181
272
|
}
|
182
273
|
}
|
183
274
|
render() {
|
184
|
-
var _a, _b;
|
275
|
+
var _a, _b, _c, _d;
|
185
276
|
if (!((_a = this._filterAssistent) === null || _a === void 0 ? void 0 : _a.assistent) && this._filterAssistentMode) {
|
186
277
|
return;
|
187
278
|
}
|
188
|
-
return (h(Host, null, h("div", { class: "snk-personalized-filter" }, h("div", null, h("snk-simple-bar", { label: this.filterId ? this.getMessage("snkPersonalizedFilter.info.titleEdit") : this.getMessage("snkPersonalizedFilter.info.titleAdd"), onExit: () => this.handleCancel() }, h("div", { class: "snk-personalized-filter__header-actions", slot: "rightSlot" }, h("ez-button", { size: "small", label: this.getMessage("snkPersonalizedFilter.info.labelCancel"), onClick: () => this.handleCancel() }), h("ez-button", { size: "small", ref: (el) => this._elButtonSave = el, enabled: false, class: "ez-button--primary", label: this.getMessage("snkPersonalizedFilter.info.labelSave"), onClick: this.handleSave.bind(this) })))), h("div", { class: "ez-box ez-margin-bottom--medium ez-box__main" }, h("div", { class: "ez-box__container" }, h("div", { class: "ez-flex ez-flex--column ez-size-width--full" }, h("div", { class: "ez-flex" }, h("ez-text-input", { class: "ez-padding-right--medium", label: this.getMessage("snkPersonalizedFilter.info.labelNameFilter"), value: (_b = this._filterAssistent) === null || _b === void 0 ? void 0 : _b.name, onEzChange: (evt) => this.handleTitleChange(evt.detail) })), this.buildContainerPersonalizedFilter()))))));
|
279
|
+
return (h(Host, null, h("div", { class: "snk-personalized-filter" }, h("div", null, h("snk-simple-bar", { label: this.filterId ? this.getMessage("snkPersonalizedFilter.info.titleEdit") : this.getMessage("snkPersonalizedFilter.info.titleAdd"), onExit: () => this.handleCancel() }, h("div", { class: "snk-personalized-filter__header-actions", slot: "rightSlot" }, h("ez-button", { size: "small", label: this.getMessage("snkPersonalizedFilter.info.labelCancel"), onClick: () => this.handleCancel() }), h("ez-button", { size: "small", ref: (el) => this._elButtonSave = el, enabled: false, class: "ez-button--primary", label: this.getMessage("snkPersonalizedFilter.info.labelSave"), onClick: this.handleSave.bind(this) })))), h("div", { class: "ez-box ez-margin-bottom--medium ez-box__main" }, h("div", { class: "ez-box__container" }, h("div", { class: "ez-flex ez-flex--column ez-size-width--full" }, h("div", { class: "ez-flex" }, h("ez-text-input", { class: "ez-padding-right--medium", label: this.getMessage("snkPersonalizedFilter.info.labelNameFilter"), value: (_b = this._filterAssistent) === null || _b === void 0 ? void 0 : _b.name, onEzChange: (evt) => this.handleTitleChange(evt.detail) }), this.renderButtonAddField(), h("ez-button", { ref: (el) => this._elButtonMode = el, class: "snk-personalized-filter__button-mode", label: this._filterAssistentMode ? this.getMessage("snkPersonalizedFilter.info.activeModeAdvanced") : this.getMessage("snkPersonalizedFilter.info.activeModeAssistent"), onClick: () => this.handleModeChange(), "data-tooltip": !(this._filterAssistentMode || ((_c = this._filterAssistent) === null || _c === void 0 ? void 0 : _c.assistent)) ? this.getMessage("snkPersonalizedFilter.info.tooltipDisabledAssistentMode") : undefined, "data-flow": "bottom", enabled: (!this._filterAssistent.name || Boolean(this._filterAssistentMode || ((_d = this._filterAssistent) === null || _d === void 0 ? void 0 : _d.assistent))) })), this.buildContainerPersonalizedFilter()))))));
|
189
280
|
}
|
190
281
|
static get is() { return "snk-personalized-filter"; }
|
191
282
|
static get encapsulation() { return "scoped"; }
|
@@ -25,8 +25,8 @@ export class SnkExpressionGroup {
|
|
25
25
|
this.updateDashes();
|
26
26
|
}
|
27
27
|
/*
|
28
|
-
|
29
|
-
|
28
|
+
* Retorna o grupo da expressão.
|
29
|
+
*/
|
30
30
|
async getExpressionGroup() {
|
31
31
|
return this._group;
|
32
32
|
}
|
@@ -40,9 +40,7 @@ export class SnkExpressionGroup {
|
|
40
40
|
if (!this.getDataGroupLevel()) {
|
41
41
|
this._element.setAttribute('data-group-level', this.FIRST_LEVEL);
|
42
42
|
}
|
43
|
-
|
44
|
-
this.canAddExpression = false;
|
45
|
-
}
|
43
|
+
this.canAddExpression = this.group.items.every(this.isFilledItem);
|
46
44
|
}
|
47
45
|
componentDidRender() {
|
48
46
|
this.setSelfTop();
|
@@ -227,7 +225,7 @@ export class SnkExpressionGroup {
|
|
227
225
|
}
|
228
226
|
render() {
|
229
227
|
const canAddGroup = this.canAddGroup();
|
230
|
-
return (h(Host, null, h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), h("div", { class: 'ez-flex ez-flex--align-items-center' }, h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), h("div", null, h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), h("option", { value: FilterGroupCondition.AND }, "E"), h("option", { value: FilterGroupCondition.OR }, "OU")))), h("ez-button", { class: "ez-padding-right--medium ez-padding-left--medium", mode: "icon", iconName: "plus", size: "small", enabled: this.canAddExpression, title: this.getMessageAddTooltip(), onClick: () => this.handleAddExpression() }), h("ez-button", { label: this.getMessage("snkPersonalizedFilter.info.addGroup"), size: "small", enabled: canAddGroup, title: !canAddGroup ? this.getMessage('snkPersonalizedFilter.info.labelDisabledAddGroupButton', { LIMIT_GROUP_LEVEL: this.LIMIT_GROUP_LEVEL + 1 }) : '', onClick: () => this.handleAddGroup() }, h("ez-icon", { slot: "leftIcon", iconName: "plus" })), !this.isFirstLevel() && h("ez-button", { title: this.getMessage("snkPersonalizedFilter.info.labelDeleteExpression"), class: "ez-padding-left--medium", mode: "icon", iconName: "delete", size: "small", onClick: (evt) => this.confirmRemoveGroup(evt) })), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderExpressionItems())), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderGroups()))));
|
228
|
+
return (h(Host, null, h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), h("div", { class: 'ez-flex ez-flex--align-items-center' }, h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), h("div", null, h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), h("option", { value: FilterGroupCondition.AND }, "E"), h("option", { value: FilterGroupCondition.OR }, "OU")))), h("ez-button", { class: "ez-padding-right--medium ez-padding-left--medium", mode: "icon", iconName: "plus", size: "small", enabled: this.canAddExpression, title: this.getMessageAddTooltip(), onClick: () => this.handleAddExpression() }), h("ez-button", { label: this.getMessage("snkPersonalizedFilter.info.addGroup"), size: "small", enabled: canAddGroup, title: !canAddGroup ? this.getMessage('snkPersonalizedFilter.info.labelDisabledAddGroupButton', { LIMIT_GROUP_LEVEL: this.LIMIT_GROUP_LEVEL + 1 }) : '', onClick: () => this.handleAddGroup() }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: "plus" })), !this.isFirstLevel() && h("ez-button", { title: this.getMessage("snkPersonalizedFilter.info.labelDeleteExpression"), class: "ez-padding-left--medium", mode: "icon", iconName: "delete", size: "small", onClick: (evt) => this.confirmRemoveGroup(evt) })), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderExpressionItems())), h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, h("div", { class: "ez-padding-top--small" }, this.renderGroups()))));
|
231
229
|
}
|
232
230
|
static get is() { return "snk-expression-group"; }
|
233
231
|
static get encapsulation() { return "scoped"; }
|
@@ -38,7 +38,8 @@ export class SnkExpressionItem {
|
|
38
38
|
}
|
39
39
|
}
|
40
40
|
componentDidRender() {
|
41
|
-
|
41
|
+
var _a;
|
42
|
+
this._showValueVariable = (_a = this._elValueVariable) === null || _a === void 0 ? void 0 : _a.value;
|
42
43
|
}
|
43
44
|
updateFieldSelected() {
|
44
45
|
const field = {
|
@@ -0,0 +1,95 @@
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
2
|
+
import { StringUtils } from '@sankhyalabs/core';
|
3
|
+
export class SnkFilterAdvancedMode {
|
4
|
+
constructor() {
|
5
|
+
this.filterAssistent = undefined;
|
6
|
+
this.application = undefined;
|
7
|
+
}
|
8
|
+
getMessage(key, params) {
|
9
|
+
return this.application.messagesBuilder.getMessage(key, params);
|
10
|
+
}
|
11
|
+
getWarningMessageComponent() {
|
12
|
+
var _a;
|
13
|
+
if (StringUtils.isEmpty((_a = this.filterAssistent) === null || _a === void 0 ? void 0 : _a.warningMessage))
|
14
|
+
return undefined;
|
15
|
+
return (h("div", { class: "ez-flex" }, h("ez-alert", { alertType: "warn" }, this.filterAssistent.warningMessage)));
|
16
|
+
}
|
17
|
+
render() {
|
18
|
+
var _a;
|
19
|
+
return (h(Host, null, h("span", { class: "ez-title ez-title--small ez-padding-bottom--small snk-filter-advanced-mode__title" }, this.getMessage("snkPersonalizedFilter.info.applyExpression")), h("ez-text-area", { rows: 9, label: this.getMessage("snkPersonalizedFilter.info.labelExpression"), value: (_a = this.filterAssistent) === null || _a === void 0 ? void 0 : _a.expression, onEzChange: (evt) => this.ezExpressionChange.emit(evt.detail) }), this.getWarningMessageComponent()));
|
20
|
+
}
|
21
|
+
static get is() { return "snk-filter-advanced-mode"; }
|
22
|
+
static get encapsulation() { return "scoped"; }
|
23
|
+
static get originalStyleUrls() {
|
24
|
+
return {
|
25
|
+
"$": ["snk-filter-advanced-mode.css"]
|
26
|
+
};
|
27
|
+
}
|
28
|
+
static get styleUrls() {
|
29
|
+
return {
|
30
|
+
"$": ["snk-filter-advanced-mode.css"]
|
31
|
+
};
|
32
|
+
}
|
33
|
+
static get properties() {
|
34
|
+
return {
|
35
|
+
"filterAssistent": {
|
36
|
+
"type": "unknown",
|
37
|
+
"mutable": true,
|
38
|
+
"complexType": {
|
39
|
+
"original": "IPersonalizedFilter",
|
40
|
+
"resolved": "IPersonalizedFilter",
|
41
|
+
"references": {
|
42
|
+
"IPersonalizedFilter": {
|
43
|
+
"location": "import",
|
44
|
+
"path": "../../interfaces/IPersonalizedFilter"
|
45
|
+
}
|
46
|
+
}
|
47
|
+
},
|
48
|
+
"required": false,
|
49
|
+
"optional": false,
|
50
|
+
"docs": {
|
51
|
+
"tags": [],
|
52
|
+
"text": "Propriedade que cont\u00E9m informa\u00E7\u00F5es do filtro personalizado."
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"application": {
|
56
|
+
"type": "unknown",
|
57
|
+
"mutable": true,
|
58
|
+
"complexType": {
|
59
|
+
"original": "SnkApplication",
|
60
|
+
"resolved": "SnkApplication",
|
61
|
+
"references": {
|
62
|
+
"SnkApplication": {
|
63
|
+
"location": "import",
|
64
|
+
"path": "../../../snk-application/snk-application"
|
65
|
+
}
|
66
|
+
}
|
67
|
+
},
|
68
|
+
"required": false,
|
69
|
+
"optional": false,
|
70
|
+
"docs": {
|
71
|
+
"tags": [],
|
72
|
+
"text": "Propriedade que mant\u00E9m informa\u00E7\u00F5es relacionadas ao SnkApplication."
|
73
|
+
}
|
74
|
+
}
|
75
|
+
};
|
76
|
+
}
|
77
|
+
static get events() {
|
78
|
+
return [{
|
79
|
+
"method": "ezExpressionChange",
|
80
|
+
"name": "ezExpressionChange",
|
81
|
+
"bubbles": true,
|
82
|
+
"cancelable": true,
|
83
|
+
"composed": true,
|
84
|
+
"docs": {
|
85
|
+
"tags": [],
|
86
|
+
"text": "Evento emitido sempre que uma edi\u00E7\u00E3o na express\u00E3o \u00E9 realizada."
|
87
|
+
},
|
88
|
+
"complexType": {
|
89
|
+
"original": "void",
|
90
|
+
"resolved": "void",
|
91
|
+
"references": {}
|
92
|
+
}
|
93
|
+
}];
|
94
|
+
}
|
95
|
+
}
|
@@ -0,0 +1,66 @@
|
|
1
|
+
:host {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
height: 100%;
|
5
|
+
|
6
|
+
/*@doc Define a família da fonte.*/
|
7
|
+
--text-area--font-family: var(--font-pattern, Arial);
|
8
|
+
/*@doc Define o posicionamento do label.*/
|
9
|
+
--text-area__label--floating--top: var(--space--small, 6px);
|
10
|
+
/*@doc Define o raio da borda do container*/
|
11
|
+
--snk-filter-assistent-mode__container--border-radius: var(--border--radius-medium, 12px);
|
12
|
+
/*@doc Define a cor de fundo do container.*/
|
13
|
+
--snk-filter-assistent-mode__container--background: var(--background--medium, #f0f3f7);
|
14
|
+
/*@doc Define a margem interna do container*/
|
15
|
+
--snk-filter-assistent-mode__container--margin: var(--space--small, 6px) var(--space--medium, 12px);
|
16
|
+
}
|
17
|
+
|
18
|
+
.ez-box__container--external {
|
19
|
+
/*private*/
|
20
|
+
height: 100px;
|
21
|
+
width: 100%;
|
22
|
+
overflow-y: auto;
|
23
|
+
|
24
|
+
/*public*/
|
25
|
+
background-color: var(--snk-filter-assistent-mode__container--background);
|
26
|
+
border-radius: var(--snk-filter-assistent-mode__container--border-radius);
|
27
|
+
}
|
28
|
+
|
29
|
+
.ez-box__container--internal {
|
30
|
+
/*public*/
|
31
|
+
margin: var(--snk-filter-assistent-mode__container--margin);
|
32
|
+
}
|
33
|
+
|
34
|
+
.ez-box__container--title{
|
35
|
+
/*private*/
|
36
|
+
display: block;
|
37
|
+
user-select: none;
|
38
|
+
|
39
|
+
/*public*/
|
40
|
+
font-family: var(--text-area--font-family);
|
41
|
+
font-size: var(--text--extra-small);
|
42
|
+
color: var(--title--primary);
|
43
|
+
top: var(--text-area__label--floating--top);
|
44
|
+
}
|
45
|
+
|
46
|
+
.ez-box__container--expression{
|
47
|
+
/*private*/
|
48
|
+
display: block;
|
49
|
+
|
50
|
+
/*public*/
|
51
|
+
font-family: var(--text-area--font-family);
|
52
|
+
font-size: var(--text--medium);
|
53
|
+
color: var(--title--primary);
|
54
|
+
top: var(--text-area__label--floating--top);
|
55
|
+
}
|
56
|
+
|
57
|
+
.snk-personalized-filter__expression-input--line {
|
58
|
+
/*private*/
|
59
|
+
width: 100%;
|
60
|
+
height: 2px;
|
61
|
+
|
62
|
+
/*public*/
|
63
|
+
background-color: var(--snk-personalized-filter--background-color-line);
|
64
|
+
margin-top: var(--snk-personalized-filter--margin-line);
|
65
|
+
margin-bottom: var(--snk-personalized-filter--margin-line);
|
66
|
+
}
|
@@ -0,0 +1,158 @@
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
2
|
+
import { PersonalizedFilterUtils } from '../../subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils';
|
3
|
+
export class SnkFilterAssistentMode {
|
4
|
+
constructor() {
|
5
|
+
this.filterAssistent = undefined;
|
6
|
+
this.messagesBuilder = undefined;
|
7
|
+
this.filterId = undefined;
|
8
|
+
this.entityUri = undefined;
|
9
|
+
this.application = undefined;
|
10
|
+
}
|
11
|
+
getMessage(key, params) {
|
12
|
+
return this.application.messagesBuilder.getMessage(key, params);
|
13
|
+
}
|
14
|
+
async handleFilterGroupChange() {
|
15
|
+
const assistent = await this._mainExpressionGroup.getExpressionGroup();
|
16
|
+
this.filterAssistent = Object.assign(Object.assign({}, this.filterAssistent), { assistent });
|
17
|
+
this.filterAssistent.parameters = PersonalizedFilterUtils.buildVariableParameters(this.filterAssistent.assistent);
|
18
|
+
this.filterAssistent.expression = PersonalizedFilterUtils.buildGroupExpression(this.filterAssistent.assistent);
|
19
|
+
this.ezChangeFilter.emit(this.filterAssistent);
|
20
|
+
}
|
21
|
+
render() {
|
22
|
+
var _a, _b;
|
23
|
+
return (h(Host, null, h("div", { class: "ez-padding-top--small snk-personalized-filter__group" }, h("snk-expression-group", { ref: (el) => this._mainExpressionGroup = el, group: (_a = this.filterAssistent) === null || _a === void 0 ? void 0 : _a.assistent, messagesBuilder: this.messagesBuilder, onEzFilterGroupChange: this.handleFilterGroupChange.bind(this), filterId: this.filterId, entityURI: this.entityUri })), h("div", { class: "ez-margin-top--auto" }, h("div", { class: "snk-personalized-filter__expression-input--line" }), h("ez-collapsible-box", { label: this.getMessage("snkPersonalizedFilter.info.titleCollapsible"), headerSize: "medium", value: true }, h("div", { class: "ez-box" }, h("div", { class: "ez-box__container--external" }, h("div", { class: "ez-box__container--internal" }, h("span", { class: "ez-box__container--title" }, this.getMessage("snkPersonalizedFilter.info.labelExpression")), h("span", { class: "ez-box__container--expression" }, (_b = this.filterAssistent) === null || _b === void 0 ? void 0 : _b.expression))))))));
|
24
|
+
}
|
25
|
+
static get is() { return "snk-filter-assistent-mode"; }
|
26
|
+
static get encapsulation() { return "scoped"; }
|
27
|
+
static get originalStyleUrls() {
|
28
|
+
return {
|
29
|
+
"$": ["snk-filter-assistent-mode.css"]
|
30
|
+
};
|
31
|
+
}
|
32
|
+
static get styleUrls() {
|
33
|
+
return {
|
34
|
+
"$": ["snk-filter-assistent-mode.css"]
|
35
|
+
};
|
36
|
+
}
|
37
|
+
static get properties() {
|
38
|
+
return {
|
39
|
+
"filterAssistent": {
|
40
|
+
"type": "unknown",
|
41
|
+
"mutable": true,
|
42
|
+
"complexType": {
|
43
|
+
"original": "IPersonalizedFilter",
|
44
|
+
"resolved": "IPersonalizedFilter",
|
45
|
+
"references": {
|
46
|
+
"IPersonalizedFilter": {
|
47
|
+
"location": "import",
|
48
|
+
"path": "../../interfaces/IPersonalizedFilter"
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
"required": false,
|
53
|
+
"optional": false,
|
54
|
+
"docs": {
|
55
|
+
"tags": [],
|
56
|
+
"text": "Propriedade que cont\u00E9m informa\u00E7\u00F5es do filtro personalizado."
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"messagesBuilder": {
|
60
|
+
"type": "unknown",
|
61
|
+
"mutable": true,
|
62
|
+
"complexType": {
|
63
|
+
"original": "SnkMessageBuilder",
|
64
|
+
"resolved": "SnkMessageBuilder",
|
65
|
+
"references": {
|
66
|
+
"SnkMessageBuilder": {
|
67
|
+
"location": "import",
|
68
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
69
|
+
}
|
70
|
+
}
|
71
|
+
},
|
72
|
+
"required": false,
|
73
|
+
"optional": false,
|
74
|
+
"docs": {
|
75
|
+
"tags": [],
|
76
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
77
|
+
}
|
78
|
+
},
|
79
|
+
"filterId": {
|
80
|
+
"type": "string",
|
81
|
+
"mutable": true,
|
82
|
+
"complexType": {
|
83
|
+
"original": "string",
|
84
|
+
"resolved": "string",
|
85
|
+
"references": {}
|
86
|
+
},
|
87
|
+
"required": false,
|
88
|
+
"optional": false,
|
89
|
+
"docs": {
|
90
|
+
"tags": [],
|
91
|
+
"text": "Id do filtro que ser\u00E1 carregado."
|
92
|
+
},
|
93
|
+
"attribute": "filter-id",
|
94
|
+
"reflect": false
|
95
|
+
},
|
96
|
+
"entityUri": {
|
97
|
+
"type": "string",
|
98
|
+
"mutable": true,
|
99
|
+
"complexType": {
|
100
|
+
"original": "string",
|
101
|
+
"resolved": "string",
|
102
|
+
"references": {}
|
103
|
+
},
|
104
|
+
"required": false,
|
105
|
+
"optional": false,
|
106
|
+
"docs": {
|
107
|
+
"tags": [],
|
108
|
+
"text": "Respons\u00E1vel por receber a URI da entidade."
|
109
|
+
},
|
110
|
+
"attribute": "entity-uri",
|
111
|
+
"reflect": false
|
112
|
+
},
|
113
|
+
"application": {
|
114
|
+
"type": "unknown",
|
115
|
+
"mutable": true,
|
116
|
+
"complexType": {
|
117
|
+
"original": "SnkApplication",
|
118
|
+
"resolved": "SnkApplication",
|
119
|
+
"references": {
|
120
|
+
"SnkApplication": {
|
121
|
+
"location": "import",
|
122
|
+
"path": "../../../snk-application/snk-application"
|
123
|
+
}
|
124
|
+
}
|
125
|
+
},
|
126
|
+
"required": false,
|
127
|
+
"optional": false,
|
128
|
+
"docs": {
|
129
|
+
"tags": [],
|
130
|
+
"text": "Propriedade que mant\u00E9m informa\u00E7\u00F5es relacionadas ao SnkApplication."
|
131
|
+
}
|
132
|
+
}
|
133
|
+
};
|
134
|
+
}
|
135
|
+
static get events() {
|
136
|
+
return [{
|
137
|
+
"method": "ezChangeFilter",
|
138
|
+
"name": "ezChangeFilter",
|
139
|
+
"bubbles": true,
|
140
|
+
"cancelable": true,
|
141
|
+
"composed": true,
|
142
|
+
"docs": {
|
143
|
+
"tags": [],
|
144
|
+
"text": ""
|
145
|
+
},
|
146
|
+
"complexType": {
|
147
|
+
"original": "IPersonalizedFilter",
|
148
|
+
"resolved": "IPersonalizedFilter",
|
149
|
+
"references": {
|
150
|
+
"IPersonalizedFilter": {
|
151
|
+
"location": "import",
|
152
|
+
"path": "../../interfaces/IPersonalizedFilter"
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}];
|
157
|
+
}
|
158
|
+
}
|
@@ -12,6 +12,9 @@ export class SnkFilterParamConfig {
|
|
12
12
|
this._canSave = false;
|
13
13
|
this.messagesBuilder = undefined;
|
14
14
|
}
|
15
|
+
/**
|
16
|
+
* Abre o modal de configuração de valor variável
|
17
|
+
*/
|
15
18
|
open(expressionItem) {
|
16
19
|
this._opened = true;
|
17
20
|
this._expressionItem = expressionItem;
|
@@ -20,6 +23,9 @@ export class SnkFilterParamConfig {
|
|
20
23
|
this._promiseResolver = accept;
|
21
24
|
});
|
22
25
|
}
|
26
|
+
/**
|
27
|
+
* Fecha o modal de configuração de valor variável
|
28
|
+
*/
|
23
29
|
close() {
|
24
30
|
this._opened = false;
|
25
31
|
return new Promise(accept => {
|
@@ -255,7 +261,7 @@ export class SnkFilterParamConfig {
|
|
255
261
|
"return": "Promise<IExpressionItem>"
|
256
262
|
},
|
257
263
|
"docs": {
|
258
|
-
"text": "",
|
264
|
+
"text": "Abre o modal de configura\u00E7\u00E3o de valor vari\u00E1vel",
|
259
265
|
"tags": []
|
260
266
|
}
|
261
267
|
},
|
@@ -275,7 +281,7 @@ export class SnkFilterParamConfig {
|
|
275
281
|
"return": "Promise<IExpressionItem>"
|
276
282
|
},
|
277
283
|
"docs": {
|
278
|
-
"text": "",
|
284
|
+
"text": "Fecha o modal de configura\u00E7\u00E3o de valor vari\u00E1vel",
|
279
285
|
"tags": []
|
280
286
|
}
|
281
287
|
}
|