@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
@@ -1,5 +1,5 @@
|
|
1
1
|
import { h } from '@stencil/core';
|
2
|
-
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { ApplicationContext, ElementIDUtils, VersionUtils } from '@sankhyalabs/core';
|
3
3
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
4
4
|
import { PresentationMode } from '../../lib';
|
5
5
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
@@ -12,6 +12,7 @@ export class SnkCrud {
|
|
12
12
|
constructor() {
|
13
13
|
this._dataUnit = undefined;
|
14
14
|
this._dataState = undefined;
|
15
|
+
this.attachmentRegisterKey = undefined;
|
15
16
|
this._currentViewMode = VIEW_MODE.GRID;
|
16
17
|
this.configName = undefined;
|
17
18
|
this.actionsList = undefined;
|
@@ -33,15 +34,17 @@ export class SnkCrud {
|
|
33
34
|
this.setViewMode(VIEW_MODE.FORM);
|
34
35
|
}
|
35
36
|
async executeAction(act) {
|
36
|
-
if (act === TaskbarElement.GRID_MODE)
|
37
|
-
this.setViewMode(VIEW_MODE.GRID);
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
this.
|
44
|
-
|
37
|
+
if (act === TaskbarElement.GRID_MODE)
|
38
|
+
return this.setViewMode(VIEW_MODE.GRID);
|
39
|
+
if (act === TaskbarElement.FORM_MODE || act === TaskbarElement.UPDATE)
|
40
|
+
return this.gridToForm(act !== TaskbarElement.UPDATE);
|
41
|
+
if (act === TaskbarElement.CONFIGURATOR)
|
42
|
+
return this._snkConfigurator.open();
|
43
|
+
if (act === "ATTACH")
|
44
|
+
return this.setViewMode(VIEW_MODE.ATTACHMENT);
|
45
|
+
}
|
46
|
+
handleAttachBack() {
|
47
|
+
this.setViewMode(VIEW_MODE.GRID);
|
45
48
|
}
|
46
49
|
setViewMode(viewMode) {
|
47
50
|
this._viewStack.show(viewMode);
|
@@ -104,8 +107,15 @@ export class SnkCrud {
|
|
104
107
|
this.messagesBuilder = this._snkDataUnit.messagesBuilder;
|
105
108
|
}
|
106
109
|
}
|
110
|
+
async canRenderAttachment() {
|
111
|
+
var _a, _b, _c, _d, _e;
|
112
|
+
const isValidVersion = VersionUtils.isRequiredVersion((_a = window.envContext) === null || _a === void 0 ? void 0 : _a.sysVersion, '4.22');
|
113
|
+
const recordCriteria = await ((_c = (_b = this._snkDataUnit) === null || _b === void 0 ? void 0 : _b.getSelectedRecordsIDsInfo) === null || _c === void 0 ? void 0 : _c.call(_b));
|
114
|
+
this.attachmentRegisterKey = (_d = recordCriteria.find(criteria => !!criteria.value)) === null || _d === void 0 ? void 0 : _d.value;
|
115
|
+
return isValidVersion && ((_e = this._dataState) === null || _e === void 0 ? void 0 : _e.selectedRecord) !== undefined;
|
116
|
+
}
|
107
117
|
render() {
|
108
|
-
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form" }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
118
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form" }, h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, this.canRenderAttachment() && (h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.handleAttachBack.bind(this) }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
109
119
|
}
|
110
120
|
static get is() { return "snk-crud"; }
|
111
121
|
static get encapsulation() { return "scoped"; }
|
@@ -288,6 +298,7 @@ export class SnkCrud {
|
|
288
298
|
return {
|
289
299
|
"_dataUnit": {},
|
290
300
|
"_dataState": {},
|
301
|
+
"attachmentRegisterKey": {},
|
291
302
|
"_currentViewMode": {}
|
292
303
|
};
|
293
304
|
}
|
@@ -55,6 +55,7 @@ export class SnkDataUnit {
|
|
55
55
|
this.dataUnit = undefined;
|
56
56
|
this.beforeSave = undefined;
|
57
57
|
this.afterSave = undefined;
|
58
|
+
this.useCancelConfirm = true;
|
58
59
|
}
|
59
60
|
observePageSize() {
|
60
61
|
if (this.dataUnit) {
|
@@ -204,6 +205,8 @@ export class SnkDataUnit {
|
|
204
205
|
}
|
205
206
|
break;
|
206
207
|
case Action.EDITION_CANCELED:
|
208
|
+
if (!this.useCancelConfirm)
|
209
|
+
return resolve(action);
|
207
210
|
if (this.dataState.hasDirtyRecords) {
|
208
211
|
const cancelConfirmation = this.getMessage("snkDataUnit.cancelConfirmation");
|
209
212
|
if ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fromParent) {
|
@@ -563,6 +566,24 @@ export class SnkDataUnit {
|
|
563
566
|
"tags": [],
|
564
567
|
"text": "Executado ap\u00F3s a a\u00E7\u00E3o de salvar."
|
565
568
|
}
|
569
|
+
},
|
570
|
+
"useCancelConfirm": {
|
571
|
+
"type": "boolean",
|
572
|
+
"mutable": false,
|
573
|
+
"complexType": {
|
574
|
+
"original": "boolean",
|
575
|
+
"resolved": "boolean",
|
576
|
+
"references": {}
|
577
|
+
},
|
578
|
+
"required": false,
|
579
|
+
"optional": false,
|
580
|
+
"docs": {
|
581
|
+
"tags": [],
|
582
|
+
"text": "Determina se ser\u00E1 usado mensagem de confirma\u00E7\u00E3o padr\u00E3o na tentativa de cancelar a edi\u00E7\u00E3o."
|
583
|
+
},
|
584
|
+
"attribute": "use-cancel-confirm",
|
585
|
+
"reflect": false,
|
586
|
+
"defaultValue": "true"
|
566
587
|
}
|
567
588
|
};
|
568
589
|
}
|
@@ -6,61 +6,63 @@ const SNK_CONTEXT_KEY = "__SNK__APPLICATION__";
|
|
6
6
|
export class SnkFilterFieldSearch {
|
7
7
|
constructor() {
|
8
8
|
this._filterMetadataStorage = new Map();
|
9
|
-
this.
|
9
|
+
this._currentMetadata = null;
|
10
10
|
this._filterText = "";
|
11
11
|
this._isLoading = false;
|
12
12
|
this.searchable = true;
|
13
|
+
this.fieldsDataSource = undefined;
|
13
14
|
this.breadcrumbItems = [];
|
14
15
|
this.linkItems = [];
|
15
16
|
this.fieldItems = [];
|
16
17
|
}
|
17
18
|
/**
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
|
22
|
-
* @throws {Error} - Quando o link atual não for do tipo link.
|
23
|
-
*/
|
24
|
-
async setDataSource(currentLink, fetchData) {
|
19
|
+
* Realiza a abertura do componente e faz a primeira carga
|
20
|
+
* de dados.
|
21
|
+
* */
|
22
|
+
async show() {
|
25
23
|
var _a;
|
24
|
+
(_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.show();
|
25
|
+
return this.loadData();
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Filtra a fonte de dados do componente.
|
29
|
+
* @param {string} filterText - Texto para filtrar a fonte de dados.
|
30
|
+
* @throws {Error} - Quando o componente estiver com a propriedade searchable como true.
|
31
|
+
*/
|
32
|
+
async applyFilter(filterText) {
|
33
|
+
if (this.searchable)
|
34
|
+
throw new Error('This method is not available when searchable is true');
|
35
|
+
this.handleFilterChange(filterText);
|
36
|
+
}
|
37
|
+
async loadData() {
|
26
38
|
this._isLoading = true;
|
27
|
-
let metadata
|
39
|
+
let metadata;
|
40
|
+
if (this._currentLink != undefined) {
|
41
|
+
metadata = this._filterMetadataStorage.get(this._currentLink.uri);
|
42
|
+
}
|
28
43
|
if (!metadata) {
|
29
|
-
metadata = await fetchData(
|
30
|
-
this.
|
44
|
+
metadata = await this.fieldsDataSource.fetchData(this._currentLink);
|
45
|
+
this._currentLink = metadata.currentLink;
|
46
|
+
this._filterMetadataStorage.set(this._currentLink.uri, metadata);
|
31
47
|
}
|
32
48
|
const { fields, links } = metadata || {};
|
33
49
|
if (!Array.isArray(fields) || !Array.isArray(links))
|
34
50
|
throw new Error('Invalid metadata');
|
35
|
-
|
36
|
-
throw new Error('The current link must be a link type');
|
37
|
-
this._dataSource = metadata;
|
38
|
-
this._currentLink = currentLink;
|
51
|
+
this._currentMetadata = metadata;
|
39
52
|
this.mapDataSourceToLinkItems();
|
40
53
|
this.mapDataSourceToFieldItems();
|
41
54
|
this._isLoading = false;
|
42
|
-
(_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.show();
|
43
55
|
this._ezFieldList.scrollToTop();
|
44
56
|
this._ezLinkList.scrollToTop();
|
45
57
|
}
|
46
|
-
/**
|
47
|
-
* Filtra a fonte de dados do componente.
|
48
|
-
* @param {string} filterText - Texto para filtrar a fonte de dados.
|
49
|
-
* @throws {Error} - Quando o componente estiver com a propriedade searchable como true.
|
50
|
-
*/
|
51
|
-
async filterDataSource(filterText) {
|
52
|
-
if (this.searchable)
|
53
|
-
throw new Error('This method is not available when searchable is true');
|
54
|
-
this.handleFilterChange(filterText);
|
55
|
-
}
|
56
58
|
mapDataSourceToLinkItems() {
|
57
59
|
var _a;
|
58
|
-
const { links } = this.
|
60
|
+
const { links } = this._currentMetadata;
|
59
61
|
const filterLinkLabelMessage = this.getMessage('snkFilterFieldSearch.linkLabel', { link: (_a = this._currentLink) === null || _a === void 0 ? void 0 : _a.description });
|
60
62
|
const items = links.map(link => (Object.assign({ label: link.description }, link)));
|
61
63
|
this.linkItems = [{
|
62
64
|
group: filterLinkLabelMessage,
|
63
|
-
items
|
65
|
+
items,
|
64
66
|
}];
|
65
67
|
if (this.breadcrumbItems.length === 0) {
|
66
68
|
this.breadcrumbItems = [Object.assign({ id: JSUtils.generateUUID(), label: this._currentLink.description }, this._currentLink)];
|
@@ -68,7 +70,7 @@ export class SnkFilterFieldSearch {
|
|
68
70
|
}
|
69
71
|
mapDataSourceToFieldItems() {
|
70
72
|
var _a;
|
71
|
-
const { fields } = this.
|
73
|
+
const { fields } = this._currentMetadata;
|
72
74
|
const filterFieldLabelMessage = this.getMessage('snkFilterFieldSearch.fieldLabel', { link: (_a = this._currentLink) === null || _a === void 0 ? void 0 : _a.description });
|
73
75
|
const filteredFields = fields.filter(field => {
|
74
76
|
if (!this._currentLink)
|
@@ -100,7 +102,10 @@ export class SnkFilterFieldSearch {
|
|
100
102
|
else {
|
101
103
|
this.breadcrumbItems = [...this.breadcrumbItems, Object.assign({ id: JSUtils.generateUUID(), label: item.description }, item)];
|
102
104
|
}
|
103
|
-
|
105
|
+
const selectedItem = Object.assign(Object.assign({}, item), { type: SelectedItemType.LINK });
|
106
|
+
this._currentLink = selectedItem;
|
107
|
+
this.ezSelectFilterItem.emit(selectedItem);
|
108
|
+
this.loadData();
|
104
109
|
}
|
105
110
|
handleSelectField({ detail: item }) {
|
106
111
|
var _a;
|
@@ -141,7 +146,7 @@ export class SnkFilterFieldSearch {
|
|
141
146
|
render() {
|
142
147
|
var _a;
|
143
148
|
const searchLabelMessage = this.getMessage('snkFilterFieldSearch.searchLabel');
|
144
|
-
return (h("ez-popover", Object.assign({ ref: (el) => this._ezPopover = el, role: "dialog", "aria-hidden": !((_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.opened) }, this.getElementID('EzPopover')), h("div", { class: "snk-filter-field-search__container" }, h("header", { class: "snk-filter-field-search__header" }, this.searchable && !!searchLabelMessage && (h("ez-filter-input", Object.assign({ class: "snk-filter-field-search__input", label: searchLabelMessage, asyncSearch: true, canShowError: false, onEzSearching: (event) => this.handleFilterChange.bind(this)(event.detail), "aria-label": searchLabelMessage, "aria-required": "false", "aria-invalid": "false" }, this.getElementID('EzFilterInput')))), this.breadcrumbItems.length > 0 && (h("ez-breadcrumb", Object.assign({ items: this.breadcrumbItems, onSelectedItem: this.handleSelectLink.bind(this), role: "navigation", "aria-current": "step" }, this.getElementID('EzBreadcrumb')))), h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" })), h("section", { class: "snk-filter-field-search__section" }, h("ez-list", Object.assign({ ref: (el) => this._ezLinkList = el, class: "snk-filter-field-search__list", id: "filterLinkList", useGroups: true, dataSource: this.linkItems, onEzSelectItem: this.handleSelectLink.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: ({ fieldCount }) => h("ez-badge", { label: fieldCount }), "aria-describedby": "filterLinkLabel" }, this.getElementID('EzListLinks'))), h("ez-list", Object.assign({ ref: (el) => this._ezFieldList = el, class: "snk-filter-field-search__list", id: "filterFieldList", useGroups: true, dataSource: this.fieldItems, onEzSelectItem: this.handleSelectField.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: ListItem, "aria-describedby": "filterFieldLabel" }, this.getElementID('EzListFields')))))));
|
149
|
+
return (h("ez-popover", Object.assign({ ref: (el) => this._ezPopover = el, role: "dialog", overlayType: "none", "aria-hidden": !((_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.opened) }, this.getElementID('EzPopover')), h("div", { class: "snk-filter-field-search__container" }, h("header", { class: "snk-filter-field-search__header" }, this.searchable && !!searchLabelMessage && (h("ez-filter-input", Object.assign({ class: "snk-filter-field-search__input", label: searchLabelMessage, asyncSearch: true, canShowError: false, onEzSearching: (event) => this.handleFilterChange.bind(this)(event.detail), "aria-label": searchLabelMessage, "aria-required": "false", "aria-invalid": "false" }, this.getElementID('EzFilterInput')))), this.breadcrumbItems.length > 0 && (h("ez-breadcrumb", Object.assign({ items: this.breadcrumbItems, onSelectedItem: this.handleSelectLink.bind(this), role: "navigation", "aria-current": "step" }, this.getElementID('EzBreadcrumb')))), h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" })), h("section", { class: "snk-filter-field-search__section" }, h("ez-list", Object.assign({ ref: (el) => this._ezLinkList = el, class: "snk-filter-field-search__list", id: "filterLinkList", useGroups: true, dataSource: this.linkItems, onEzSelectItem: this.handleSelectLink.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: ({ fieldCount }) => h("ez-badge", { label: fieldCount }), "aria-describedby": "filterLinkLabel" }, this.getElementID('EzListLinks'))), h("ez-list", Object.assign({ ref: (el) => this._ezFieldList = el, class: "snk-filter-field-search__list", id: "filterFieldList", useGroups: true, dataSource: this.fieldItems, onEzSelectItem: this.handleSelectField.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: ListItem, "aria-describedby": "filterFieldLabel" }, this.getElementID('EzListFields')))))));
|
145
150
|
}
|
146
151
|
static get is() { return "snk-filter-field-search"; }
|
147
152
|
static get encapsulation() { return "scoped"; }
|
@@ -174,6 +179,26 @@ export class SnkFilterFieldSearch {
|
|
174
179
|
"attribute": "searchable",
|
175
180
|
"reflect": false,
|
176
181
|
"defaultValue": "true"
|
182
|
+
},
|
183
|
+
"fieldsDataSource": {
|
184
|
+
"type": "unknown",
|
185
|
+
"mutable": false,
|
186
|
+
"complexType": {
|
187
|
+
"original": "FilterFieldsDataSource",
|
188
|
+
"resolved": "FilterFieldsDataSource",
|
189
|
+
"references": {
|
190
|
+
"FilterFieldsDataSource": {
|
191
|
+
"location": "import",
|
192
|
+
"path": "./interfaces"
|
193
|
+
}
|
194
|
+
}
|
195
|
+
},
|
196
|
+
"required": false,
|
197
|
+
"optional": false,
|
198
|
+
"docs": {
|
199
|
+
"tags": [],
|
200
|
+
"text": "Define a fonte de dados que o componente vai utilizar\npara carregamento dos campos."
|
201
|
+
}
|
177
202
|
}
|
178
203
|
};
|
179
204
|
}
|
@@ -216,55 +241,23 @@ export class SnkFilterFieldSearch {
|
|
216
241
|
}
|
217
242
|
static get methods() {
|
218
243
|
return {
|
219
|
-
"
|
244
|
+
"show": {
|
220
245
|
"complexType": {
|
221
|
-
"signature": "(
|
222
|
-
"parameters": [
|
223
|
-
"tags": [{
|
224
|
-
"name": "param",
|
225
|
-
"text": "currentLink - Link atual da entidade."
|
226
|
-
}],
|
227
|
-
"text": "- Link atual da entidade."
|
228
|
-
}, {
|
229
|
-
"tags": [{
|
230
|
-
"name": "param",
|
231
|
-
"text": "fetchData - callback que executa a busca de dados."
|
232
|
-
}],
|
233
|
-
"text": "- callback que executa a busca de dados."
|
234
|
-
}],
|
246
|
+
"signature": "() => Promise<void>",
|
247
|
+
"parameters": [],
|
235
248
|
"references": {
|
236
249
|
"Promise": {
|
237
250
|
"location": "global"
|
238
|
-
},
|
239
|
-
"IFilterLink": {
|
240
|
-
"location": "import",
|
241
|
-
"path": "./interfaces"
|
242
|
-
},
|
243
|
-
"DataFetcher": {
|
244
|
-
"location": "import",
|
245
|
-
"path": "./interfaces"
|
246
251
|
}
|
247
252
|
},
|
248
253
|
"return": "Promise<void>"
|
249
254
|
},
|
250
255
|
"docs": {
|
251
|
-
"text": "
|
252
|
-
"tags": [
|
253
|
-
"name": "param",
|
254
|
-
"text": "currentLink - Link atual da entidade."
|
255
|
-
}, {
|
256
|
-
"name": "param",
|
257
|
-
"text": "fetchData - callback que executa a busca de dados."
|
258
|
-
}, {
|
259
|
-
"name": "throws",
|
260
|
-
"text": "{Error} - Quando os metadados n\u00E3o forem v\u00E1lidos."
|
261
|
-
}, {
|
262
|
-
"name": "throws",
|
263
|
-
"text": "{Error} - Quando o link atual n\u00E3o for do tipo link."
|
264
|
-
}]
|
256
|
+
"text": "Realiza a abertura do componente e faz a primeira carga \nde dados.",
|
257
|
+
"tags": []
|
265
258
|
}
|
266
259
|
},
|
267
|
-
"
|
260
|
+
"applyFilter": {
|
268
261
|
"complexType": {
|
269
262
|
"signature": "(filterText: string) => Promise<void>",
|
270
263
|
"parameters": [{
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { h } from '@stencil/core';
|
2
|
-
import { ApplicationContext, DataType, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { ApplicationContext, DataType, ElementIDUtils, VersionUtils } from '@sankhyalabs/core';
|
3
3
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
4
|
+
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
4
5
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
5
6
|
import { PresentationMode } from '../../lib/@types';
|
6
7
|
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
@@ -15,7 +16,7 @@ export class SnkGrid {
|
|
15
16
|
});
|
16
17
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
17
18
|
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
|
18
|
-
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"],
|
19
|
+
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", this.getAttachAvailable(), "REFRESH", "DATA_EXPORTER"],
|
19
20
|
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
|
20
21
|
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
21
22
|
});
|
@@ -56,6 +57,13 @@ export class SnkGrid {
|
|
56
57
|
async setConfig(config) {
|
57
58
|
this.setGridConfig(config);
|
58
59
|
}
|
60
|
+
getAttachAvailable() {
|
61
|
+
var _a;
|
62
|
+
const isValidVersion = VersionUtils.isRequiredVersion((_a = window.envContext) === null || _a === void 0 ? void 0 : _a.sysVersion, '4.22');
|
63
|
+
if (isValidVersion)
|
64
|
+
return TaskbarElement.ATTACH;
|
65
|
+
return "";
|
66
|
+
}
|
59
67
|
openGridConfig() {
|
60
68
|
this._grid.getColumnsState()
|
61
69
|
.then((gridColumns) => {
|
@@ -225,7 +233,7 @@ export class SnkGrid {
|
|
225
233
|
const disabledButtons = [];
|
226
234
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
|
227
235
|
if (this._dataState.selectionInfo.length > 1) {
|
228
|
-
disabledButtons.push(
|
236
|
+
disabledButtons.push(TaskbarElement.CLONE, "ATTACH");
|
229
237
|
}
|
230
238
|
if (this._dataState.selectionInfo.isAllRecords()) {
|
231
239
|
disabledButtons.push("REMOVE");
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
2
|
+
import PersonalizedFilterFetcher from "../../lib/http/data-fetcher/fetchers/personalized-filter-fetcher";
|
3
|
+
import { FilterOperand, FilterUserConfigTypes } from "../../lib/@types";
|
4
|
+
import store from '../../lib/store';
|
5
|
+
import { ApplicationContext, StringUtils } from '@sankhyalabs/core';
|
6
|
+
export class SnkPersonalizedFilter {
|
7
|
+
constructor() {
|
8
|
+
this._personalizedFilterFetcher = new PersonalizedFilterFetcher();
|
9
|
+
this._dataSourceFetcher = {
|
10
|
+
fetchData: async (entity) => {
|
11
|
+
let entityURI = entity === null || entity === void 0 ? void 0 : entity.uri;
|
12
|
+
if (StringUtils.isEmpty(entityURI)) {
|
13
|
+
entityURI = "dd://Financeiro/br.com.sankhya.fin.cad.receber"; //TODO: Receber como prop
|
14
|
+
}
|
15
|
+
return await this._personalizedFilterFetcher.loadFields(entityURI);
|
16
|
+
}
|
17
|
+
};
|
18
|
+
this.items = {
|
19
|
+
entityName: "Financeiro",
|
20
|
+
fieldName: "CODBCO",
|
21
|
+
description: "Financeiro >> Banco",
|
22
|
+
type: FilterUserConfigTypes.DECIMAL,
|
23
|
+
expression: "Financeiro.CODBCO",
|
24
|
+
operand: FilterOperand.EQUAL,
|
25
|
+
paramVariable: false,
|
26
|
+
value: "61",
|
27
|
+
systemConfig: null,
|
28
|
+
userConfig: null
|
29
|
+
};
|
30
|
+
this.handleFilterItemChange = (changes) => {
|
31
|
+
console.log("Campo do ExpressionItem alterado");
|
32
|
+
console.log(changes);
|
33
|
+
};
|
34
|
+
this.handleFilterItemRemove = (expression) => {
|
35
|
+
console.log("Event de deleção disparado");
|
36
|
+
console.log(expression);
|
37
|
+
};
|
38
|
+
this.messagesBuilder = undefined;
|
39
|
+
}
|
40
|
+
componentWillLoad() {
|
41
|
+
if (store.get("filterFieldsDataSource") == undefined) {
|
42
|
+
store.set("filterFieldsDataSource", this._dataSourceFetcher);
|
43
|
+
}
|
44
|
+
if (!this.messagesBuilder) {
|
45
|
+
const snkApp = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
46
|
+
this.messagesBuilder = snkApp === null || snkApp === void 0 ? void 0 : snkApp.messagesBuilder;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
render() {
|
50
|
+
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 }))));
|
51
|
+
}
|
52
|
+
static get is() { return "snk-personalized-filter"; }
|
53
|
+
static get originalStyleUrls() {
|
54
|
+
return {
|
55
|
+
"$": ["snk-personalized-filter.css"]
|
56
|
+
};
|
57
|
+
}
|
58
|
+
static get styleUrls() {
|
59
|
+
return {
|
60
|
+
"$": ["snk-personalized-filter.css"]
|
61
|
+
};
|
62
|
+
}
|
63
|
+
static get properties() {
|
64
|
+
return {
|
65
|
+
"messagesBuilder": {
|
66
|
+
"type": "unknown",
|
67
|
+
"mutable": true,
|
68
|
+
"complexType": {
|
69
|
+
"original": "SnkMessageBuilder",
|
70
|
+
"resolved": "SnkMessageBuilder",
|
71
|
+
"references": {
|
72
|
+
"SnkMessageBuilder": {
|
73
|
+
"location": "import",
|
74
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
75
|
+
}
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"required": false,
|
79
|
+
"optional": false,
|
80
|
+
"docs": {
|
81
|
+
"tags": [],
|
82
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
83
|
+
}
|
84
|
+
}
|
85
|
+
};
|
86
|
+
}
|
87
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { FilterOperand } from "../../../../../lib/@types";
|
2
|
+
import { UserInterface } from '@sankhyalabs/core';
|
3
|
+
export const FilterOperandDefault = [
|
4
|
+
{ value: FilterOperand.EQUAL, label: "Igual (=)" },
|
5
|
+
{ value: FilterOperand.DIFFERENT, label: "Diferente (<>)" },
|
6
|
+
{ value: FilterOperand.LIKE, label: "Contendo (LIKE)" },
|
7
|
+
{ value: FilterOperand.IN, label: "Contido em (IN)" },
|
8
|
+
{ value: FilterOperand.START_WITH, label: "Iniciado com (%?)" },
|
9
|
+
{ value: FilterOperand.FINISHED_WITH, label: "Terminado com (?%)" },
|
10
|
+
{ value: FilterOperand.NULL, label: "Vazio (NULL)" },
|
11
|
+
{ value: FilterOperand.NOT_NULL, label: "Não Vazio (NOT NULL)" },
|
12
|
+
{ value: FilterOperand.LARGER, label: "Maior (>)" },
|
13
|
+
{ value: FilterOperand.LARGER_EQUAL, label: "Maior ou Igual (>=)" },
|
14
|
+
{ value: FilterOperand.SMALLER, label: "Menor (<)" },
|
15
|
+
{ value: FilterOperand.SMALLER_EQUAL, label: "Menor ou Igual (<=)" }
|
16
|
+
];
|
17
|
+
export const FilterOperandTypeTextSearch = [
|
18
|
+
{ value: FilterOperand.EQUAL, label: "Igual (=)" },
|
19
|
+
{ value: FilterOperand.DIFFERENT, label: "Diferente (<>)" },
|
20
|
+
{ value: FilterOperand.LIKE, label: "Contendo (LIKE)" },
|
21
|
+
{ value: FilterOperand.IN, label: "Contido em (IN)" },
|
22
|
+
{ value: FilterOperand.START_WITH, label: "Iniciado com (%?)" },
|
23
|
+
{ value: FilterOperand.FINISHED_WITH, label: "Terminado com (?%)" },
|
24
|
+
{ value: FilterOperand.NULL, label: "Vazio (NULL)" },
|
25
|
+
{ value: FilterOperand.NOT_NULL, label: "Não Vazio (NOT NULL)" }
|
26
|
+
];
|
27
|
+
export const FIELD_TYPE_SEARCH_AND_TEXT = [
|
28
|
+
UserInterface.SEARCH,
|
29
|
+
UserInterface.SHORTTEXT,
|
30
|
+
UserInterface.PASSWORD,
|
31
|
+
UserInterface.MASKEDTEXT,
|
32
|
+
UserInterface.LONGTEXT,
|
33
|
+
UserInterface.HTML
|
34
|
+
];
|
@@ -0,0 +1,97 @@
|
|
1
|
+
:host {
|
2
|
+
/*private*/
|
3
|
+
display: flex;
|
4
|
+
width: 100%;
|
5
|
+
|
6
|
+
/*@doc Define a cor de fundo do componente.*/
|
7
|
+
--snk-expression-item--background-color: var(--background--xlight, #fff);
|
8
|
+
|
9
|
+
/* Spacing */
|
10
|
+
/*@doc Define o espaçamento interno entre os itens*/
|
11
|
+
--snk-expression-item__itens--padding: var(--space--small, 6px);
|
12
|
+
|
13
|
+
/* Sizes */
|
14
|
+
/*@doc Define o tamanho do campo operator*/
|
15
|
+
--snk-expression-item__width--input-operator: 220px;
|
16
|
+
/*@doc Define o tamanho do campo value*/
|
17
|
+
--snk-expression-item__width--input-value: 240px;
|
18
|
+
/*@doc Define o tamanho do campo value-variable*/
|
19
|
+
--snk-expression-item__width--input-value-variable: 176px;
|
20
|
+
|
21
|
+
/* Bordes */
|
22
|
+
/*@doc Define o arredondamento das bordas*/
|
23
|
+
--snk-expression-item--border-radius: var(--border--radius-medium, 12px);
|
24
|
+
/*@doc Define a cor da borda.*/
|
25
|
+
--snk-expression-item--border-color: var(--color--strokes, #DCE0E8);
|
26
|
+
/*@doc Define largura e estilo da borda.*/
|
27
|
+
--snk-expression-item--border-style: var(--border--small, 1px solid);
|
28
|
+
}
|
29
|
+
|
30
|
+
.box{
|
31
|
+
/*private*/
|
32
|
+
width: 100%;
|
33
|
+
height: 100%;
|
34
|
+
background: var(--snk-expression-item--background-color);
|
35
|
+
|
36
|
+
/*public*/
|
37
|
+
margin: var(--space--small, 6px);
|
38
|
+
border: var(--snk-expression-item--border-color) var(--snk-expression-item--border-style);
|
39
|
+
border-radius: var(--snk-expression-item--border-radius);
|
40
|
+
}
|
41
|
+
|
42
|
+
.box__container{
|
43
|
+
/*private*/
|
44
|
+
display: flex;
|
45
|
+
align-items: center;
|
46
|
+
justify-content: space-between;
|
47
|
+
white-space: nowrap;
|
48
|
+
|
49
|
+
/*public*/
|
50
|
+
margin: var(--space--small, 6px);
|
51
|
+
}
|
52
|
+
|
53
|
+
.box__container--input-filter{
|
54
|
+
width: 100%;
|
55
|
+
}
|
56
|
+
|
57
|
+
.box__container--input-operator{
|
58
|
+
/*private*/
|
59
|
+
display: flex;
|
60
|
+
/*public*/
|
61
|
+
width: var(--snk-expression-item__width--input-operator);
|
62
|
+
min-width: var(--snk-expression-item__width--input-operator);
|
63
|
+
}
|
64
|
+
|
65
|
+
.box__container--input-value{
|
66
|
+
/*private*/
|
67
|
+
display: flex;
|
68
|
+
/*public*/
|
69
|
+
width: var(--snk-expression-item__width--input-value);
|
70
|
+
min-width: var(--snk-expression-item__width--input-value);
|
71
|
+
}
|
72
|
+
|
73
|
+
.box__container--input-value-variable{
|
74
|
+
/*private*/
|
75
|
+
display: flex;
|
76
|
+
/*public*/
|
77
|
+
width: var(--snk-expression-item__width--input-value-variable);
|
78
|
+
min-width: var(--snk-expression-item__width--input-value-variable);
|
79
|
+
}
|
80
|
+
|
81
|
+
.box__container--button-delete{
|
82
|
+
display: flex;
|
83
|
+
}
|
84
|
+
|
85
|
+
.box__container > div {
|
86
|
+
padding-left: var(--snk-expression-item__itens--padding);
|
87
|
+
padding-right: var(--snk-expression-item__itens--padding);
|
88
|
+
}
|
89
|
+
|
90
|
+
.box__container--button-delete--icon {
|
91
|
+
width: 42px;
|
92
|
+
min-width: 42px;
|
93
|
+
}
|
94
|
+
|
95
|
+
.box__container--input-value-variable--icon{
|
96
|
+
cursor: pointer;
|
97
|
+
}
|