@sankhyalabs/sankhyablocks 5.4.3 → 5.6.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/{SnkMessageBuilder-115e8a80.js → SnkMessageBuilder-e64dce7f.js} +49 -1
- package/dist/cjs/{constants-ae0ed870.js → constants-3787fa32.js} +1 -0
- package/dist/cjs/dataunit-fetcher-8f5ade55.js +319 -0
- package/dist/cjs/index-8d94b7e0.js +7 -0
- package/dist/cjs/{index-fc7ca86c.js → index-de79181a.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +3 -315
- package/dist/cjs/snk-attach.cjs.entry.js +450 -0
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +23 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +3 -3
- package/dist/cjs/{snk-data-unit-aa613f3b.js → snk-data-unit-85d6565e.js} +4 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +5 -5
- package/dist/cjs/snk-expression-item.cjs.entry.js +213 -0
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +435 -0
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +11 -3
- package/dist/cjs/{snk-guides-viewer-7db960c2.js → snk-guides-viewer-9784c527.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +126 -0
- package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
- package/dist/cjs/{snk-simple-crud.cjs.entry.js → snk-simple-bar_2.cjs.entry.js} +48 -5
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +6 -4
- package/dist/cjs/{taskbar-elements-5e87cf44.js → taskbar-elements-bc2598f9.js} +4 -1
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/snk-attach/interfaces/index.js +1 -0
- package/dist/collection/components/snk-attach/snk-attach.css +8 -0
- package/dist/collection/components/snk-attach/snk-attach.js +202 -0
- package/dist/collection/components/snk-attach/structure/crud-config-builder.js +37 -0
- package/dist/collection/components/snk-attach/structure/data-unit-builder.js +106 -0
- package/dist/collection/components/snk-attach/structure/index.js +3 -0
- package/dist/collection/components/snk-attach/structure/taskbar-builder.js +47 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +3 -3
- package/dist/collection/components/snk-crud/snk-crud.js +22 -11
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +21 -0
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js +62 -69
- package/dist/collection/components/snk-grid/snk-grid.js +11 -3
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css +4 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +87 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +34 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css +97 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +298 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +2 -2
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +37 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +65 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +4 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/attach-fetcher.js +136 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.js +6 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.js +3 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +63 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +7 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +27 -0
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +12 -0
- package/dist/collection/lib/message/resources/snk-simple-bar.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/store/index.js +2 -1
- package/dist/collection/lib/utils/constants.js +1 -0
- package/dist/components/SnkMessageBuilder.js +49 -1
- package/dist/components/constants.js +1 -0
- package/dist/components/dataunit-fetcher.js +317 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index2.js +1 -1
- package/dist/components/index3.js +199 -0
- package/dist/components/snk-application2.js +2 -314
- package/dist/components/snk-attach.d.ts +11 -0
- package/dist/components/snk-attach.js +6 -0
- package/dist/components/snk-attach2.js +498 -0
- package/dist/components/snk-crud.js +77 -48
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-data-unit2.js +4 -0
- package/dist/components/snk-expression-item.d.ts +11 -0
- package/dist/components/snk-expression-item.js +6 -0
- package/dist/components/snk-expression-item2.js +241 -0
- package/dist/components/snk-filter-field-search.js +1 -200
- package/dist/{esm/snk-filter-field-search.entry.js → components/snk-filter-field-search2.js} +65 -38
- package/dist/components/snk-filter-param-config.js +1 -273
- package/dist/{esm/snk-filter-param-config.entry.js → components/snk-filter-param-config2.js} +35 -11
- package/dist/components/snk-grid2.js +12 -4
- package/dist/components/snk-personalized-filter.d.ts +11 -0
- package/dist/components/snk-personalized-filter.js +158 -0
- package/dist/components/snk-simple-bar.js +1 -41
- package/dist/components/snk-simple-bar2.js +59 -0
- package/dist/components/snk-simple-crud.js +1 -328
- package/dist/{esm/snk-simple-crud.entry.js → components/snk-simple-crud2.js} +73 -18
- package/dist/components/snk-taskbar2.js +10 -199
- package/dist/esm/{SnkMessageBuilder-a15d22f8.js → SnkMessageBuilder-f3590f65.js} +49 -1
- package/dist/esm/{constants-15617e7d.js → constants-e916ccc3.js} +1 -0
- package/dist/esm/dataunit-fetcher-d32c6a47.js +317 -0
- package/dist/esm/{index-6519a79e.js → index-507e19ec.js} +1 -1
- package/dist/esm/index-620ac460.js +7 -0
- package/dist/esm/{index-e467ade5.js → index-8efbf198.js} +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +3 -315
- package/dist/esm/snk-attach.entry.js +446 -0
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +25 -15
- package/dist/esm/snk-data-exporter.entry.js +4 -4
- package/dist/esm/{snk-data-unit-5ed93c0e.js → snk-data-unit-50b1660c.js} +4 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +6 -6
- package/dist/esm/snk-expression-item.entry.js +209 -0
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-field-search_2.entry.js +430 -0
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-grid-config.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +13 -5
- package/dist/esm/{snk-guides-viewer-1e7c21f6.js → snk-guides-viewer-4d12f268.js} +3 -3
- package/dist/esm/snk-guides-viewer.entry.js +5 -5
- package/dist/esm/snk-personalized-filter.entry.js +122 -0
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-bar_2.entry.js +325 -0
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +7 -5
- package/dist/esm/{taskbar-elements-10d80c79.js → taskbar-elements-e6af3e93.js} +5 -2
- package/dist/sankhyablocks/p-17375123.js +1 -0
- package/dist/sankhyablocks/{p-b80cf644.entry.js → p-1c0ee011.entry.js} +1 -1
- package/dist/sankhyablocks/p-1dcfd32a.entry.js +1 -0
- package/dist/sankhyablocks/p-27e264d9.entry.js +1 -0
- package/dist/sankhyablocks/p-343699ad.entry.js +1 -0
- package/dist/sankhyablocks/p-3d3263b4.js +1 -0
- package/dist/sankhyablocks/p-3fbe2d69.entry.js +11 -0
- package/dist/sankhyablocks/p-433dfa63.entry.js +1 -0
- package/dist/sankhyablocks/{p-f132e371.js → p-4c2015a9.js} +1 -1
- package/dist/sankhyablocks/p-4eefe631.entry.js +1 -0
- package/dist/sankhyablocks/p-6a02e236.js +1 -0
- package/dist/sankhyablocks/{p-0a1e7f75.entry.js → p-6ac29569.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f4d36823.entry.js → p-6f0b3cc0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6516f35a.entry.js → p-86f75e7a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32599159.entry.js → p-8b02b276.entry.js} +1 -1
- package/dist/sankhyablocks/p-8bdf5e57.entry.js +1 -0
- package/dist/sankhyablocks/{p-9bfa3cfb.entry.js → p-c4417efb.entry.js} +1 -1
- package/dist/sankhyablocks/p-c9477950.js +1 -0
- package/dist/sankhyablocks/{p-703dddb9.js → p-ccd26e3a.js} +1 -1
- package/dist/sankhyablocks/p-d410f45a.js +1 -0
- package/dist/sankhyablocks/p-df8f13b4.entry.js +1 -0
- package/dist/sankhyablocks/{p-3169584f.entry.js → p-e0b4aec3.entry.js} +1 -1
- package/dist/sankhyablocks/p-e9f42525.entry.js +1 -0
- package/dist/sankhyablocks/{p-1393dc00.entry.js → p-f344b811.entry.js} +1 -1
- package/dist/sankhyablocks/p-f4184ce7.js +1 -0
- package/dist/sankhyablocks/p-f821768b.js +74 -0
- package/dist/sankhyablocks/{p-f29caa0a.entry.js → p-f8c66aa3.entry.js} +1 -1
- package/dist/sankhyablocks/p-fd4ed40a.entry.js +1 -0
- package/dist/sankhyablocks/p-ff96b509.entry.js +27 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/interfaces/index.d.ts +10 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +45 -0
- package/dist/types/components/snk-attach/structure/crud-config-builder.d.ts +7 -0
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +16 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +3 -0
- package/dist/types/components/snk-attach/structure/taskbar-builder.d.ts +8 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +5 -0
- package/dist/types/components/snk-filter-field-search/interfaces/index.d.ts +14 -4
- package/dist/types/components/snk-filter-field-search/snk-filter-field-search.d.ts +13 -10
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +20 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.d.ts +9 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +54 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.d.ts +4 -2
- package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +14 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
- package/dist/types/components.d.ts +150 -9
- package/dist/types/global.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/attach-fetcher.d.ts +14 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.d.ts +26 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +7 -0
- package/dist/types/lib/message/resources/snk-attach.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-personalized-filter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-simple-bar.msg.d.ts +1 -0
- package/dist/types/lib/store/index.d.ts +1 -0
- package/dist/types/lib/utils/constants.d.ts +2 -1
- package/package.json +1 -1
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/snk-filter-field-search.cjs.entry.js +0 -185
- package/dist/cjs/snk-filter-param-config.cjs.entry.js +0 -256
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -30
- package/dist/esm/snk-simple-bar.entry.js +0 -26
- package/dist/sankhyablocks/p-1c17eecf.entry.js +0 -1
- package/dist/sankhyablocks/p-2ecf14ff.js +0 -1
- package/dist/sankhyablocks/p-340d6fb0.entry.js +0 -84
- package/dist/sankhyablocks/p-74724fa7.js +0 -1
- package/dist/sankhyablocks/p-79d22df0.entry.js +0 -1
- package/dist/sankhyablocks/p-79f01b63.entry.js +0 -1
- package/dist/sankhyablocks/p-81e85890.entry.js +0 -1
- package/dist/sankhyablocks/p-93d8fe00.entry.js +0 -1
- package/dist/sankhyablocks/p-94e6fc90.entry.js +0 -1
- package/dist/sankhyablocks/p-98f7f796.js +0 -1
- package/dist/sankhyablocks/p-b3e71248.entry.js +0 -1
- package/dist/sankhyablocks/p-bc281de0.js +0 -1
- package/dist/sankhyablocks/p-d61759a5.entry.js +0 -1
- package/dist/sankhyablocks/p-d65809d5.entry.js +0 -1
- package/dist/sankhyablocks/p-f587a454.js +0 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -259
- package/dist/types/components/snk-crud/snk-crud.d.ts +0 -73
- package/dist/types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.d.ts +0 -40
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +0 -27
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +0 -23
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +0 -29
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +0 -25
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +0 -19
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -38
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +0 -74
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +0 -53
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -95
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +0 -59
package/dist/{esm/snk-filter-param-config.entry.js → components/snk-filter-param-config2.js}
RENAMED
@@ -1,7 +1,7 @@
|
|
1
|
-
import {
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
2
2
|
import { StringUtils, DataType, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
3
3
|
import { ModalAction } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
4
|
-
import {
|
4
|
+
import { a as FilterOperand, d as FilterConfigType, e as FilterEntities, F as FilterUserConfigTypes } from './index2.js';
|
5
5
|
|
6
6
|
class PersonalizedFilterUtils {
|
7
7
|
/**
|
@@ -58,11 +58,12 @@ class PersonalizedFilterUtils {
|
|
58
58
|
}
|
59
59
|
}
|
60
60
|
|
61
|
-
const snkFilterParamConfigCss = "
|
61
|
+
const snkFilterParamConfigCss = ":host{--snk-filter-param-config__expression--color:var(--title--primary, #2b3a54);display:flex;position:relative}.snk-filter-param-config__expression{--text-area__input--disabled--color:var(--snk-filter-param-config__expression--color)}";
|
62
62
|
|
63
|
-
const SnkFilterParamConfig = class {
|
64
|
-
constructor(
|
65
|
-
|
63
|
+
const SnkFilterParamConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
64
|
+
constructor() {
|
65
|
+
super();
|
66
|
+
this.__registerHost();
|
66
67
|
this._opened = false;
|
67
68
|
this._configType = FilterConfigType.SYSTEM_CONFIG;
|
68
69
|
this._expressionItem = undefined;
|
@@ -91,7 +92,8 @@ const SnkFilterParamConfig = class {
|
|
91
92
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
|
92
93
|
*/
|
93
94
|
getMessage(key, params) {
|
94
|
-
|
95
|
+
var _a;
|
96
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
95
97
|
}
|
96
98
|
getConfigValue(configName, inputName, inputAlias = "") {
|
97
99
|
var _a, _b, _c;
|
@@ -245,8 +247,30 @@ const SnkFilterParamConfig = class {
|
|
245
247
|
return (h("option", { value: FilterUserConfigTypes[configType] }, this.getMessage(`snkFilterParamConfig.labelTypeValues.${configType.toLowerCase()}`)));
|
246
248
|
})))), h("ez-text-area", Object.assign({ ref: (ref) => this._expressionElement = ref, class: "snk-filter-param-config__expression", label: this.getMessage("snkFilterParamConfig.labelExpression"), enabled: false }, this.getElementID("presentationExpression"))), h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, h("ez-button", Object.assign({ class: "ez-padding-right--medium", label: this.getMessage("snkFilterParamConfig.labelCancel"), onClick: () => this.close() }, this.getElementID("cancelEditParam"))), h("ez-button", Object.assign({ class: "ez-button--primary", label: this.getMessage("snkFilterParamConfig.labelSave"), onClick: () => this.save(), enabled: this._canSave }, this.getElementID("saveEditParam")))))));
|
247
249
|
}
|
248
|
-
get _element() { return
|
249
|
-
}
|
250
|
-
|
250
|
+
get _element() { return this; }
|
251
|
+
static get style() { return snkFilterParamConfigCss; }
|
252
|
+
}, [0, "snk-filter-param-config", {
|
253
|
+
"messagesBuilder": [1040],
|
254
|
+
"_opened": [32],
|
255
|
+
"_configType": [32],
|
256
|
+
"_expressionItem": [32],
|
257
|
+
"_informedInstance": [32],
|
258
|
+
"_canSave": [32],
|
259
|
+
"open": [64],
|
260
|
+
"close": [64]
|
261
|
+
}]);
|
262
|
+
function defineCustomElement() {
|
263
|
+
if (typeof customElements === "undefined") {
|
264
|
+
return;
|
265
|
+
}
|
266
|
+
const components = ["snk-filter-param-config"];
|
267
|
+
components.forEach(tagName => { switch (tagName) {
|
268
|
+
case "snk-filter-param-config":
|
269
|
+
if (!customElements.get(tagName)) {
|
270
|
+
customElements.define(tagName, SnkFilterParamConfig);
|
271
|
+
}
|
272
|
+
break;
|
273
|
+
} });
|
274
|
+
}
|
251
275
|
|
252
|
-
export { SnkFilterParamConfig as
|
276
|
+
export { SnkFilterParamConfig as S, defineCustomElement as d };
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
-
import { ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
|
2
|
+
import { VersionUtils, ElementIDUtils, ApplicationContext, DataType } from '@sankhyalabs/core';
|
3
3
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
4
|
+
import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
4
5
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
5
6
|
import { P as PresentationMode } from './index2.js';
|
6
7
|
import { T as TaskbarProcessor } from './taskbar-processor.js';
|
7
|
-
import { s as store
|
8
|
+
import { s as store } from './index3.js';
|
8
9
|
import { d as defineCustomElement$a } from './snk-data-exporter2.js';
|
9
10
|
import { d as defineCustomElement$9 } from './snk-exporter-email-sender2.js';
|
10
11
|
import { d as defineCustomElement$8 } from './snk-filter-bar2.js';
|
@@ -31,7 +32,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
31
32
|
});
|
32
33
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
33
34
|
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
|
34
|
-
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"],
|
35
|
+
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", this.getAttachAvailable(), "REFRESH", "DATA_EXPORTER"],
|
35
36
|
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
|
36
37
|
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
37
38
|
});
|
@@ -72,6 +73,13 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
72
73
|
async setConfig(config) {
|
73
74
|
this.setGridConfig(config);
|
74
75
|
}
|
76
|
+
getAttachAvailable() {
|
77
|
+
var _a;
|
78
|
+
const isValidVersion = VersionUtils.isRequiredVersion((_a = window.envContext) === null || _a === void 0 ? void 0 : _a.sysVersion, '4.22');
|
79
|
+
if (isValidVersion)
|
80
|
+
return TaskbarElement.ATTACH;
|
81
|
+
return "";
|
82
|
+
}
|
75
83
|
openGridConfig() {
|
76
84
|
this._grid.getColumnsState()
|
77
85
|
.then((gridColumns) => {
|
@@ -241,7 +249,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
241
249
|
const disabledButtons = [];
|
242
250
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
|
243
251
|
if (this._dataState.selectionInfo.length > 1) {
|
244
|
-
disabledButtons.push(
|
252
|
+
disabledButtons.push(TaskbarElement.CLONE, "ATTACH");
|
245
253
|
}
|
246
254
|
if (this._dataState.selectionInfo.isAllRecords()) {
|
247
255
|
disabledButtons.push("REMOVE");
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
2
|
+
|
3
|
+
interface SnkPersonalizedFilter extends Components.SnkPersonalizedFilter, HTMLElement {}
|
4
|
+
export const SnkPersonalizedFilter: {
|
5
|
+
prototype: SnkPersonalizedFilter;
|
6
|
+
new (): SnkPersonalizedFilter;
|
7
|
+
};
|
8
|
+
/**
|
9
|
+
* Used to define this component and all nested components recursively.
|
10
|
+
*/
|
11
|
+
export const defineCustomElement: () => void;
|
@@ -0,0 +1,158 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
|
+
import { d as dist, D as DataFetcher } from './DataFetcher.js';
|
3
|
+
import { F as FilterUserConfigTypes, a as FilterOperand } from './index2.js';
|
4
|
+
import { s as store } from './index3.js';
|
5
|
+
import { StringUtils, ApplicationContext } from '@sankhyalabs/core';
|
6
|
+
import { d as defineCustomElement$4 } from './snk-expression-item2.js';
|
7
|
+
import { d as defineCustomElement$3 } from './snk-filter-field-search2.js';
|
8
|
+
import { d as defineCustomElement$2 } from './snk-filter-param-config2.js';
|
9
|
+
|
10
|
+
class PersonalizedFilterFetcher {
|
11
|
+
constructor() {
|
12
|
+
this.templateByQuery = new Map();
|
13
|
+
this.buildTemplates();
|
14
|
+
}
|
15
|
+
buildTemplates() {
|
16
|
+
const query = dist.gql `
|
17
|
+
query($name: String!) {
|
18
|
+
$queryAlias$: fetchFilterFields(name: $name){
|
19
|
+
currentLink {
|
20
|
+
description
|
21
|
+
uri
|
22
|
+
}
|
23
|
+
links {
|
24
|
+
description
|
25
|
+
uri
|
26
|
+
fieldCount
|
27
|
+
}
|
28
|
+
fields {
|
29
|
+
name
|
30
|
+
description
|
31
|
+
uri
|
32
|
+
onlyDate
|
33
|
+
dataType
|
34
|
+
userInterface
|
35
|
+
properties {
|
36
|
+
name
|
37
|
+
value
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
`;
|
43
|
+
this.templateByQuery.set("fetchFilterFields", query);
|
44
|
+
}
|
45
|
+
loadFields(uri) {
|
46
|
+
return new Promise((resolve, reject) => {
|
47
|
+
DataFetcher.get()
|
48
|
+
.callGraphQL({
|
49
|
+
values: { name: uri },
|
50
|
+
query: this.templateByQuery.get("fetchFilterFields"),
|
51
|
+
})
|
52
|
+
.then((resp) => {
|
53
|
+
let fields = resp.fields;
|
54
|
+
for (const field of fields) {
|
55
|
+
if (Array.isArray(field.properties) && field.properties.length > 0 && field.userInterface === "SEARCH") {
|
56
|
+
const propertiesConvertedObject = field.properties.reduce((accumulator, prop) => {
|
57
|
+
accumulator[prop.name] = prop.value;
|
58
|
+
return accumulator;
|
59
|
+
}, {});
|
60
|
+
field.properties = propertiesConvertedObject;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
resolve(Object.assign(Object.assign({}, resp), { fields: fields }));
|
64
|
+
})
|
65
|
+
.catch((error) => {
|
66
|
+
reject(error);
|
67
|
+
});
|
68
|
+
});
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
const snkPersonalizedFilterCss = ":host{display:flex}";
|
73
|
+
|
74
|
+
const SnkPersonalizedFilter$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
75
|
+
constructor() {
|
76
|
+
super();
|
77
|
+
this.__registerHost();
|
78
|
+
this._personalizedFilterFetcher = new PersonalizedFilterFetcher();
|
79
|
+
this._dataSourceFetcher = {
|
80
|
+
fetchData: async (entity) => {
|
81
|
+
let entityURI = entity === null || entity === void 0 ? void 0 : entity.uri;
|
82
|
+
if (StringUtils.isEmpty(entityURI)) {
|
83
|
+
entityURI = "dd://Financeiro/br.com.sankhya.fin.cad.receber"; //TODO: Receber como prop
|
84
|
+
}
|
85
|
+
return await this._personalizedFilterFetcher.loadFields(entityURI);
|
86
|
+
}
|
87
|
+
};
|
88
|
+
this.items = {
|
89
|
+
entityName: "Financeiro",
|
90
|
+
fieldName: "CODBCO",
|
91
|
+
description: "Financeiro >> Banco",
|
92
|
+
type: FilterUserConfigTypes.DECIMAL,
|
93
|
+
expression: "Financeiro.CODBCO",
|
94
|
+
operand: FilterOperand.EQUAL,
|
95
|
+
paramVariable: false,
|
96
|
+
value: "61",
|
97
|
+
systemConfig: null,
|
98
|
+
userConfig: null
|
99
|
+
};
|
100
|
+
this.handleFilterItemChange = (changes) => {
|
101
|
+
console.log("Campo do ExpressionItem alterado");
|
102
|
+
console.log(changes);
|
103
|
+
};
|
104
|
+
this.handleFilterItemRemove = (expression) => {
|
105
|
+
console.log("Event de deleção disparado");
|
106
|
+
console.log(expression);
|
107
|
+
};
|
108
|
+
this.messagesBuilder = undefined;
|
109
|
+
}
|
110
|
+
componentWillLoad() {
|
111
|
+
if (store.get("filterFieldsDataSource") == undefined) {
|
112
|
+
store.set("filterFieldsDataSource", this._dataSourceFetcher);
|
113
|
+
}
|
114
|
+
if (!this.messagesBuilder) {
|
115
|
+
const snkApp = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
116
|
+
this.messagesBuilder = snkApp === null || snkApp === void 0 ? void 0 : snkApp.messagesBuilder;
|
117
|
+
}
|
118
|
+
}
|
119
|
+
render() {
|
120
|
+
return (h(Host, null, h("div", null, h("snk-expression-item", { expression: this.items, canRemove: true, onEzFilterItemChange: (evt) => this.handleFilterItemChange(evt.detail), onEzFilterItemRemove: (evt) => this.handleFilterItemRemove(evt.detail), messagesBuilder: this.messagesBuilder }))));
|
121
|
+
}
|
122
|
+
static get style() { return snkPersonalizedFilterCss; }
|
123
|
+
}, [0, "snk-personalized-filter", {
|
124
|
+
"messagesBuilder": [1040]
|
125
|
+
}]);
|
126
|
+
function defineCustomElement$1() {
|
127
|
+
if (typeof customElements === "undefined") {
|
128
|
+
return;
|
129
|
+
}
|
130
|
+
const components = ["snk-personalized-filter", "snk-expression-item", "snk-filter-field-search", "snk-filter-param-config"];
|
131
|
+
components.forEach(tagName => { switch (tagName) {
|
132
|
+
case "snk-personalized-filter":
|
133
|
+
if (!customElements.get(tagName)) {
|
134
|
+
customElements.define(tagName, SnkPersonalizedFilter$1);
|
135
|
+
}
|
136
|
+
break;
|
137
|
+
case "snk-expression-item":
|
138
|
+
if (!customElements.get(tagName)) {
|
139
|
+
defineCustomElement$4();
|
140
|
+
}
|
141
|
+
break;
|
142
|
+
case "snk-filter-field-search":
|
143
|
+
if (!customElements.get(tagName)) {
|
144
|
+
defineCustomElement$3();
|
145
|
+
}
|
146
|
+
break;
|
147
|
+
case "snk-filter-param-config":
|
148
|
+
if (!customElements.get(tagName)) {
|
149
|
+
defineCustomElement$2();
|
150
|
+
}
|
151
|
+
break;
|
152
|
+
} });
|
153
|
+
}
|
154
|
+
|
155
|
+
const SnkPersonalizedFilter = SnkPersonalizedFilter$1;
|
156
|
+
const defineCustomElement = defineCustomElement$1;
|
157
|
+
|
158
|
+
export { SnkPersonalizedFilter, defineCustomElement };
|
@@ -1,44 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { ElementIDUtils } from '@sankhyalabs/core';
|
3
|
-
|
4
|
-
const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
|
5
|
-
|
6
|
-
const SnkSimpleBar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
7
|
-
constructor() {
|
8
|
-
super();
|
9
|
-
this.__registerHost();
|
10
|
-
this.clickBreadcrumbItem = createEvent(this, "clickBreadcrumbItem", 3);
|
11
|
-
this.exit = createEvent(this, "exit", 3);
|
12
|
-
this.label = undefined;
|
13
|
-
this.breadcrumbItens = undefined;
|
14
|
-
}
|
15
|
-
componentDidLoad() {
|
16
|
-
if (!this._element)
|
17
|
-
return;
|
18
|
-
ElementIDUtils.addIDInfo(this._element);
|
19
|
-
}
|
20
|
-
render() {
|
21
|
-
return (h("div", { class: "simple-bar__container ez-margin-vertical--medium ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
|
22
|
-
}
|
23
|
-
get _element() { return this; }
|
24
|
-
static get style() { return snkSimpleBarCss; }
|
25
|
-
}, [6, "snk-simple-bar", {
|
26
|
-
"label": [1],
|
27
|
-
"breadcrumbItens": [16]
|
28
|
-
}]);
|
29
|
-
function defineCustomElement$1() {
|
30
|
-
if (typeof customElements === "undefined") {
|
31
|
-
return;
|
32
|
-
}
|
33
|
-
const components = ["snk-simple-bar"];
|
34
|
-
components.forEach(tagName => { switch (tagName) {
|
35
|
-
case "snk-simple-bar":
|
36
|
-
if (!customElements.get(tagName)) {
|
37
|
-
customElements.define(tagName, SnkSimpleBar$1);
|
38
|
-
}
|
39
|
-
break;
|
40
|
-
} });
|
41
|
-
}
|
1
|
+
import { S as SnkSimpleBar$1, d as defineCustomElement$1 } from './snk-simple-bar2.js';
|
42
2
|
|
43
3
|
const SnkSimpleBar = SnkSimpleBar$1;
|
44
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
+
import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
3
|
+
|
4
|
+
const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
|
5
|
+
|
6
|
+
const SnkSimpleBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
7
|
+
constructor() {
|
8
|
+
super();
|
9
|
+
this.__registerHost();
|
10
|
+
this.clickBreadcrumbItem = createEvent(this, "clickBreadcrumbItem", 3);
|
11
|
+
this.exit = createEvent(this, "exit", 3);
|
12
|
+
this.label = undefined;
|
13
|
+
this.breadcrumbItens = undefined;
|
14
|
+
this.messagesBuilder = undefined;
|
15
|
+
}
|
16
|
+
/**
|
17
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
18
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
19
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
20
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-simple-bar.msg.ts"
|
21
|
+
*/
|
22
|
+
getMessage(key, params) {
|
23
|
+
var _a;
|
24
|
+
if (this.messagesBuilder)
|
25
|
+
return this.messagesBuilder.getMessage(key, params);
|
26
|
+
if ((_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder)
|
27
|
+
return this._application.messagesBuilder.getMessage(key, params);
|
28
|
+
}
|
29
|
+
componentDidLoad() {
|
30
|
+
if (!this._element)
|
31
|
+
return;
|
32
|
+
ElementIDUtils.addIDInfo(this._element);
|
33
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
34
|
+
}
|
35
|
+
render() {
|
36
|
+
return (h("div", { class: "simple-bar__container ez-margin-vertical--medium ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
|
37
|
+
}
|
38
|
+
get _element() { return this; }
|
39
|
+
static get style() { return snkSimpleBarCss; }
|
40
|
+
}, [6, "snk-simple-bar", {
|
41
|
+
"label": [1],
|
42
|
+
"breadcrumbItens": [16],
|
43
|
+
"messagesBuilder": [1040]
|
44
|
+
}]);
|
45
|
+
function defineCustomElement() {
|
46
|
+
if (typeof customElements === "undefined") {
|
47
|
+
return;
|
48
|
+
}
|
49
|
+
const components = ["snk-simple-bar"];
|
50
|
+
components.forEach(tagName => { switch (tagName) {
|
51
|
+
case "snk-simple-bar":
|
52
|
+
if (!customElements.get(tagName)) {
|
53
|
+
customElements.define(tagName, SnkSimpleBar);
|
54
|
+
}
|
55
|
+
break;
|
56
|
+
} });
|
57
|
+
}
|
58
|
+
|
59
|
+
export { SnkSimpleBar as S, defineCustomElement as d };
|