@sankhyalabs/sankhyablocks 5.18.1 → 5.19.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/{dataunit-fetcher-8f5ade55.js → dataunit-fetcher-01fabb36.js} +28 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +10 -1
- package/dist/cjs/snk-attach.cjs.entry.js +2 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +5 -4
- package/dist/cjs/snk-grid.cjs.entry.js +39 -5
- package/dist/collection/components/snk-application/snk-application.js +40 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +5 -4
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +29 -0
- package/dist/collection/components/snk-grid/snk-grid.js +11 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +28 -0
- package/dist/components/dataunit-fetcher.js +28 -0
- package/dist/components/snk-application2.js +10 -1
- package/dist/components/snk-configurator2.js +5 -4
- package/dist/components/snk-grid2.js +42 -8
- package/dist/esm/{dataunit-fetcher-d32c6a47.js → dataunit-fetcher-784325e9.js} +28 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +10 -1
- package/dist/esm/snk-attach.entry.js +2 -1
- package/dist/esm/snk-configurator.entry.js +5 -4
- package/dist/esm/snk-grid.entry.js +42 -8
- package/dist/sankhyablocks/p-538c057a.entry.js +1 -0
- package/dist/sankhyablocks/p-553f5dcf.js +76 -0
- package/dist/sankhyablocks/p-82bc4666.entry.js +1 -0
- package/dist/sankhyablocks/{p-cbe93a18.entry.js → p-8652d177.entry.js} +3 -3
- package/dist/sankhyablocks/p-971abcc2.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +6 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -5
- package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +12 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +3 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-44cf545f.entry.js +0 -1
- package/dist/sankhyablocks/p-eb07d0eb.entry.js +0 -1
- package/dist/sankhyablocks/p-f821768b.js +0 -74
- package/dist/sankhyablocks/p-fa2d0376.entry.js +0 -1
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
4
4
|
const DataFetcher = require('./DataFetcher-a9d0228f.js');
|
5
|
+
const constants = require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
5
6
|
|
6
7
|
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
7
8
|
var t = {};
|
@@ -98,6 +99,9 @@ class DataUnitFetcher {
|
|
98
99
|
}
|
99
100
|
}
|
100
101
|
}`);
|
102
|
+
this.templateByQuery.set("fetchDistinctColumn", DataFetcher.dist.gql `query($dataUnit: String!, $fieldName: String!, $argument: String, $filters: [InputFilter], $parentRecordId: String) {
|
103
|
+
$queryAlias$: selectDistinct(dataUnit: $dataUnit, fieldName: $fieldName, argument: $argument, filters: $filters, parentRecordId: $parentRecordId)
|
104
|
+
}`);
|
101
105
|
}
|
102
106
|
getDataUnit(entityName, resourceID, parentDataUnit) {
|
103
107
|
const dataUnit = parentDataUnit != undefined ? parentDataUnit.getChildDataunit(`dd://${entityName}/${resourceID}`) : new core.DataUnit(`dd://${entityName}/${resourceID}`);
|
@@ -157,6 +161,30 @@ class DataUnitFetcher {
|
|
157
161
|
}, 200);
|
158
162
|
});
|
159
163
|
}
|
164
|
+
loadSelectDistinct(dataUnit, fieldName, argument) {
|
165
|
+
const { parentRecordId, filters } = dataUnit.getLastLoadRequest() || {};
|
166
|
+
const filteredFilters = filters.filter(f => f.name !== `${constants.DISTINCT_FILTER_NAME_PREFIX}${fieldName}`);
|
167
|
+
const values = {
|
168
|
+
dataUnit: dataUnit.name,
|
169
|
+
argument,
|
170
|
+
fieldName,
|
171
|
+
parentRecordId,
|
172
|
+
filters: filteredFilters
|
173
|
+
};
|
174
|
+
return new Promise((resolve, reject) => {
|
175
|
+
DataFetcher.DataFetcher.get()
|
176
|
+
.callGraphQL({
|
177
|
+
values,
|
178
|
+
query: this.templateByQuery.get("fetchDistinctColumn"),
|
179
|
+
})
|
180
|
+
.then((result) => {
|
181
|
+
resolve(result);
|
182
|
+
})
|
183
|
+
.catch((error) => {
|
184
|
+
reject(error);
|
185
|
+
});
|
186
|
+
});
|
187
|
+
}
|
160
188
|
doLoadData(dataUnit, request) {
|
161
189
|
return new Promise((resolve, reject) => {
|
162
190
|
var _a;
|
package/dist/cjs/loader.cjs.js
CHANGED
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
16
16
|
return patchEsm().then(() => {
|
17
|
-
return index.bootstrapLazy(JSON.parse("[[\"snk-personalized-filter.cjs\",[[0,\"snk-personalized-filter\",{\"messagesBuilder\":[1040]}]]],[\"teste-pesquisa.cjs\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal.cjs\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"filters\":[1040],\"applyFilters\":[16],\"clearAll\":[16],\"closeModal\":[16]}]]],[\"snk-actions-form.cjs\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm.cjs\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-entity-list.cjs\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select.cjs\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-list.cjs\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select.cjs\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number.cjs\",[[0,\"snk-filter-number\",{\"config\":[16],\"value\":[2],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period.cjs\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-personalized.cjs\",[[0,\"snk-filter-personalized\",{\"config\":[16],\"value\":[1040],\"fix\":[16],\"unfix\":[16],\"show\":[64]}]]],[\"snk-filter-search.cjs\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text.cjs\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-expression-item.cjs\",[[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-filter-modal-item.cjs\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040]}]]],[\"snk-detail-view.cjs\",[[2,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[16],\"_disabledButtons\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-configurator.cjs\",[[6,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"viewMode\":[2,\"view-mode\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-pesquisa.cjs\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-filter-bar.cjs\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"configName\":[1,\"config-name\"],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"allowDefault\":[32],\"scrollerLocked\":[32],\"reload\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-select-box.cjs\",[[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}]]],[\"snk-grid-config.cjs\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"application\":[16],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"]}]]],[\"snk-config-options.cjs\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config.cjs\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config.cjs\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config.cjs\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-filter-field-search_2.cjs\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-filter-item.cjs\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-data-unit.cjs\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-exporter-email-sender.cjs\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-exporter.cjs\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-actions-button.cjs\",[[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}]]],[\"snk-taskbar.cjs\",[[6,\"snk-taskbar\",{\"configName\":[1,\"config-name\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32]}]]],[\"snk-grid.cjs\",[[6,\"snk-grid\",{\"configName\":[1,\"config-name\"],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-guides-viewer.cjs\",[[2,\"snk-guides-viewer\",{\"_guideBuilders\":[16],\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"presentationMode\":[1,\"presentation-mode\"],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"showFormConfig\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-crud.cjs\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-form.cjs\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-application.cjs\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"isUserSup\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadGridConfig\":[64],\"loadTotals\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64]}]]],[\"snk-attach.cjs\",[[2,\"snk-attach\",{\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"dataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary.cjs\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view.cjs\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"showUp\":[64]}]]],[\"snk-filter-detail.cjs\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"show\":[64]}]]],[\"snk-simple-bar_2.cjs\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[16],\"formConfig\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"_currentViewMode\":[32],\"_config\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]],[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]]]"), options);
|
17
|
+
return index.bootstrapLazy(JSON.parse("[[\"snk-personalized-filter.cjs\",[[0,\"snk-personalized-filter\",{\"messagesBuilder\":[1040]}]]],[\"teste-pesquisa.cjs\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal.cjs\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"filters\":[1040],\"applyFilters\":[16],\"clearAll\":[16],\"closeModal\":[16]}]]],[\"snk-actions-form.cjs\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm.cjs\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-entity-list.cjs\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select.cjs\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-list.cjs\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select.cjs\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number.cjs\",[[0,\"snk-filter-number\",{\"config\":[16],\"value\":[2],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period.cjs\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-personalized.cjs\",[[0,\"snk-filter-personalized\",{\"config\":[16],\"value\":[1040],\"fix\":[16],\"unfix\":[16],\"show\":[64]}]]],[\"snk-filter-search.cjs\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text.cjs\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-expression-item.cjs\",[[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-filter-modal-item.cjs\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040]}]]],[\"snk-detail-view.cjs\",[[2,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[16],\"_disabledButtons\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-configurator.cjs\",[[6,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"viewMode\":[2,\"view-mode\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-pesquisa.cjs\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-filter-bar.cjs\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"configName\":[1,\"config-name\"],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"allowDefault\":[32],\"scrollerLocked\":[32],\"reload\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-select-box.cjs\",[[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}]]],[\"snk-grid-config.cjs\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"application\":[16],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"]}]]],[\"snk-config-options.cjs\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config.cjs\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config.cjs\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config.cjs\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-filter-field-search_2.cjs\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-filter-item.cjs\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-data-unit.cjs\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-exporter-email-sender.cjs\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-exporter.cjs\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-actions-button.cjs\",[[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}]]],[\"snk-taskbar.cjs\",[[6,\"snk-taskbar\",{\"configName\":[1,\"config-name\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32]}]]],[\"snk-grid.cjs\",[[6,\"snk-grid\",{\"configName\":[1,\"config-name\"],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-guides-viewer.cjs\",[[2,\"snk-guides-viewer\",{\"_guideBuilders\":[16],\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"presentationMode\":[1,\"presentation-mode\"],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"showFormConfig\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-crud.cjs\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-form.cjs\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-application.cjs\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"isUserSup\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadGridConfig\":[64],\"loadTotals\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"executeSelectDistinct\":[64]}]]],[\"snk-attach.cjs\",[[2,\"snk-attach\",{\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"dataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary.cjs\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view.cjs\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"showUp\":[64]}]]],[\"snk-filter-detail.cjs\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"show\":[64]}]]],[\"snk-simple-bar_2.cjs\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[16],\"formConfig\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"_currentViewMode\":[32],\"_config\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]],[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]]]"), options);
|
18
18
|
});
|
19
19
|
};
|
20
20
|
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
17
17
|
};
|
18
18
|
|
19
19
|
patchBrowser().then(options => {
|
20
|
-
return index.bootstrapLazy(JSON.parse("[[\"snk-personalized-filter.cjs\",[[0,\"snk-personalized-filter\",{\"messagesBuilder\":[1040]}]]],[\"teste-pesquisa.cjs\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal.cjs\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"filters\":[1040],\"applyFilters\":[16],\"clearAll\":[16],\"closeModal\":[16]}]]],[\"snk-actions-form.cjs\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm.cjs\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-entity-list.cjs\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select.cjs\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-list.cjs\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select.cjs\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number.cjs\",[[0,\"snk-filter-number\",{\"config\":[16],\"value\":[2],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period.cjs\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-personalized.cjs\",[[0,\"snk-filter-personalized\",{\"config\":[16],\"value\":[1040],\"fix\":[16],\"unfix\":[16],\"show\":[64]}]]],[\"snk-filter-search.cjs\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text.cjs\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-expression-item.cjs\",[[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-filter-modal-item.cjs\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040]}]]],[\"snk-detail-view.cjs\",[[2,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[16],\"_disabledButtons\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-configurator.cjs\",[[6,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"viewMode\":[2,\"view-mode\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-pesquisa.cjs\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-filter-bar.cjs\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"configName\":[1,\"config-name\"],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"allowDefault\":[32],\"scrollerLocked\":[32],\"reload\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-select-box.cjs\",[[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}]]],[\"snk-grid-config.cjs\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"application\":[16],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"]}]]],[\"snk-config-options.cjs\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config.cjs\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config.cjs\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config.cjs\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-filter-field-search_2.cjs\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-filter-item.cjs\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-data-unit.cjs\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-exporter-email-sender.cjs\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-exporter.cjs\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-actions-button.cjs\",[[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}]]],[\"snk-taskbar.cjs\",[[6,\"snk-taskbar\",{\"configName\":[1,\"config-name\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32]}]]],[\"snk-grid.cjs\",[[6,\"snk-grid\",{\"configName\":[1,\"config-name\"],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-guides-viewer.cjs\",[[2,\"snk-guides-viewer\",{\"_guideBuilders\":[16],\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"presentationMode\":[1,\"presentation-mode\"],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"showFormConfig\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-crud.cjs\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-form.cjs\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-application.cjs\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"isUserSup\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadGridConfig\":[64],\"loadTotals\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64]}]]],[\"snk-attach.cjs\",[[2,\"snk-attach\",{\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"dataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary.cjs\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view.cjs\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"showUp\":[64]}]]],[\"snk-filter-detail.cjs\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"show\":[64]}]]],[\"snk-simple-bar_2.cjs\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[16],\"formConfig\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"_currentViewMode\":[32],\"_config\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]],[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]]]"), options);
|
20
|
+
return index.bootstrapLazy(JSON.parse("[[\"snk-personalized-filter.cjs\",[[0,\"snk-personalized-filter\",{\"messagesBuilder\":[1040]}]]],[\"teste-pesquisa.cjs\",[[1,\"teste-pesquisa\"]]],[\"snk-filter-modal.cjs\",[[0,\"snk-filter-modal\",{\"getMessage\":[16],\"filters\":[1040],\"applyFilters\":[16],\"clearAll\":[16],\"closeModal\":[16]}]]],[\"snk-actions-form.cjs\",[[2,\"snk-actions-form\",{\"action\":[16],\"applyParameters\":[16],\"dataUnit\":[32],\"openPopup\":[64]}]]],[\"snk-client-confirm.cjs\",[[2,\"snk-client-confirm\",{\"titleMessage\":[1,\"title-message\"],\"message\":[1],\"accept\":[16],\"cancel\":[16],\"openPopup\":[64]}]]],[\"snk-entity-list.cjs\",[[2,\"snk-entity-list\",{\"config\":[1040],\"rightListSlotBuilder\":[1040],\"maxHeightList\":[1,\"max-height-list\"],\"_searchValue\":[32],\"_ezListSource\":[32],\"reloadList\":[64]}]]],[\"snk-filter-binary-select.cjs\",[[0,\"snk-filter-binary-select\",{\"value\":[1544],\"config\":[16],\"presentationMode\":[2,\"presentation-mode\"]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-list.cjs\",[[4,\"snk-filter-list\",{\"label\":[1],\"iconName\":[1,\"icon-name\"],\"items\":[16],\"getMessage\":[16],\"emptyText\":[1,\"empty-text\"],\"findFilterText\":[1,\"find-filter-text\"],\"buttonClass\":[1,\"button-class\"],\"_filterArgument\":[32],\"_showAll\":[32],\"hideDetail\":[64]},[[2,\"keydown\",\"keyDownHandler\"]]]]],[\"snk-filter-multi-select.cjs\",[[0,\"snk-filter-multi-select\",{\"value\":[1544],\"config\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-number.cjs\",[[0,\"snk-filter-number\",{\"config\":[16],\"value\":[2],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-period.cjs\",[[0,\"snk-filter-period\",{\"config\":[16],\"getMessage\":[16],\"value\":[8],\"presentationMode\":[2,\"presentation-mode\"],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-personalized.cjs\",[[0,\"snk-filter-personalized\",{\"config\":[16],\"value\":[1040],\"fix\":[16],\"unfix\":[16],\"show\":[64]}]]],[\"snk-filter-search.cjs\",[[0,\"snk-filter-search\",{\"config\":[16],\"value\":[16],\"show\":[64]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-filter-text.cjs\",[[0,\"snk-filter-text\",{\"config\":[16],\"value\":[1]},[[0,\"ezChange\",\"ezChangeListener\"]]]]],[\"snk-expression-item.cjs\",[[2,\"snk-expression-item\",{\"expression\":[16],\"canRemove\":[516,\"can-remove\"],\"messagesBuilder\":[1040],\"_showValueVariable\":[32],\"_fieldSelected\":[32],\"_optionNotNull\":[32]}]]],[\"snk-filter-modal-item.cjs\",[[0,\"snk-filter-modal-item\",{\"filterItem\":[1040]}]]],[\"snk-detail-view.cjs\",[[2,\"snk-detail-view\",{\"formConfigManager\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"guideItemPath\":[16],\"entityName\":[1,\"entity-name\"],\"label\":[1],\"dataUnit\":[1040],\"selectedForm\":[1025,\"selected-form\"],\"dataState\":[1040],\"messagesBuilder\":[1040],\"branchGuide\":[16],\"_disabledButtons\":[32],\"attachmentRegisterKey\":[32],\"changeViewMode\":[64],\"configGrid\":[64],\"showUp\":[64]},[[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-configurator.cjs\",[[6,\"snk-configurator\",{\"showActionButtons\":[4,\"show-action-buttons\"],\"configName\":[1,\"config-name\"],\"viewMode\":[2,\"view-mode\"],\"messagesBuilder\":[1040],\"_opened\":[32],\"_permissions\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-pesquisa.cjs\",[[2,\"snk-pesquisa\",{\"searchLoader\":[16],\"selectItem\":[16],\"argument\":[1025],\"_itemList\":[32],\"_startLoading\":[32]}]]],[\"snk-filter-bar.cjs\",[[2,\"snk-filter-bar\",{\"dataUnit\":[1040],\"configName\":[1,\"config-name\"],\"filterConfig\":[1040],\"messagesBuilder\":[1040],\"allowDefault\":[32],\"scrollerLocked\":[32],\"reload\":[64]},[[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-select-box.cjs\",[[1,\"snk-select-box\",{\"selectedOption\":[1,\"selected-option\"]}]]],[\"snk-grid-config.cjs\",[[2,\"snk-grid-config\",{\"selectedIndex\":[1026,\"selected-index\"],\"application\":[16],\"columns\":[1040],\"config\":[1040],\"configName\":[1,\"config-name\"]}]]],[\"snk-config-options.cjs\",[[2,\"snk-config-options\",{\"fieldConfig\":[16],\"idConfig\":[513,\"id-config\"],\"dataUnit\":[16],\"messagesBuilder\":[1040],\"_defaultType\":[32]}]]],[\"snk-field-config.cjs\",[[2,\"snk-field-config\",{\"isConfigActive\":[16],\"fieldConfig\":[16],\"modeInsertion\":[516,\"mode-insertion\"],\"dataUnit\":[16],\"messagesBuilder\":[1040]}]]],[\"snk-tab-config.cjs\",[[6,\"snk-tab-config\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"tabItems\":[16],\"messagesBuilder\":[1040],\"_processedTabs\":[32],\"_activeEditText\":[32],\"_activeEditTextIndex\":[32],\"_actionsHide\":[32],\"_actionsShow\":[32]}]]],[\"snk-form-config.cjs\",[[2,\"snk-form-config\",{\"dataUnit\":[16],\"configManager\":[16],\"messagesBuilder\":[1040],\"_formConfigOptions\":[32],\"_fieldConfigSelected\":[32],\"_layoutFormConfig\":[32],\"_fieldsAvailable\":[32],\"_formConfig\":[32],\"_formConfigChanged\":[32],\"_optionFormConfigSelected\":[32],\"_optionFormConfigChanged\":[32],\"_tempGroups\":[32]}]]],[\"snk-filter-field-search_2.cjs\",[[2,\"snk-filter-field-search\",{\"searchable\":[4],\"fieldsDataSource\":[16],\"breadcrumbItems\":[32],\"linkItems\":[32],\"fieldItems\":[32],\"show\":[64],\"applyFilter\":[64]}],[0,\"snk-filter-param-config\",{\"messagesBuilder\":[1040],\"_opened\":[32],\"_configType\":[32],\"_expressionItem\":[32],\"_informedInstance\":[32],\"_canSave\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-filter-item.cjs\",[[0,\"snk-filter-item\",{\"config\":[1040],\"getMessage\":[16],\"detailIsVisible\":[32],\"showUp\":[64],\"hideDetail\":[64]},[[2,\"click\",\"clickListener\"],[2,\"mousedown\",\"mouseDownListener\"],[0,\"filterChange\",\"filterChangeListener\"]]]]],[\"snk-data-unit.cjs\",[[2,\"snk-data-unit\",{\"dataState\":[1040],\"messagesBuilder\":[1040],\"dataUnitName\":[1,\"data-unit-name\"],\"entityName\":[1,\"entity-name\"],\"pageSize\":[2,\"page-size\"],\"dataUnit\":[1040],\"beforeSave\":[16],\"afterSave\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"getDataUnit\":[64],\"getSelectedRecordsIDsInfo\":[64]}]]],[\"snk-exporter-email-sender.cjs\",[[0,\"snk-exporter-email-sender\",{\"getMessage\":[16],\"_config\":[32],\"_opened\":[32],\"_currentStep\":[32],\"open\":[64],\"close\":[64]}]]],[\"snk-data-exporter.cjs\",[[2,\"snk-data-exporter\",{\"provider\":[16],\"messagesBuilder\":[1040],\"_items\":[32],\"_showDropdown\":[32],\"_releasedToExport\":[32]}]]],[\"snk-actions-button.cjs\",[[2,\"snk-actions-button\",{\"_items\":[32],\"_showDropdown\":[32],\"_actions\":[32],\"_isOrderActions\":[32]}]]],[\"snk-taskbar.cjs\",[[6,\"snk-taskbar\",{\"configName\":[1,\"config-name\"],\"buttons\":[1],\"customButtons\":[16],\"actionsList\":[16],\"primaryButton\":[1,\"primary-button\"],\"disabledButtons\":[16],\"dataUnit\":[16],\"presentationMode\":[1537,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_permissions\":[32]}]]],[\"snk-grid.cjs\",[[6,\"snk-grid\",{\"configName\":[1,\"config-name\"],\"actionsList\":[16],\"isDetail\":[4,\"is-detail\"],\"taskbarManager\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_gridConfig\":[32],\"_popUpGridConfig\":[32],\"showConfig\":[64],\"hideConfig\":[64],\"setConfig\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-guides-viewer.cjs\",[[2,\"snk-guides-viewer\",{\"_guideBuilders\":[16],\"dataUnit\":[16],\"dataState\":[16],\"configName\":[1,\"config-name\"],\"entityPath\":[1,\"entity-path\"],\"actionsList\":[16],\"recordsValidator\":[16],\"masterFormConfig\":[1040],\"selectedGuide\":[16],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"presentationMode\":[1,\"presentation-mode\"],\"_breadcrumbItems\":[32],\"_guides\":[32],\"_formEditorConfigManager\":[32],\"_formEditorDataUnit\":[32],\"showFormConfig\":[64]},[[2,\"actionClick\",\"onActionClick\"],[0,\"snkContentCardChanged\",\"onContentCardChanged\"]]]]],[\"snk-crud.cjs\",[[6,\"snk-crud\",{\"configName\":[1025,\"config-name\"],\"showActionButtons\":[4,\"show-action-buttons\"],\"actionsList\":[16],\"taskbarManager\":[16],\"recordsValidator\":[16],\"statusResolver\":[16],\"multipleSelection\":[4,\"multiple-selection\"],\"presentationMode\":[1,\"presentation-mode\"],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"attachmentRegisterKey\":[32],\"_currentViewMode\":[32],\"goToView\":[64],\"openConfigurator\":[64],\"closeConfigurator\":[64],\"reloadFilterBar\":[64]}]]],[\"snk-form.cjs\",[[2,\"snk-form\",{\"configName\":[1,\"config-name\"],\"recordsValidator\":[16],\"messagesBuilder\":[1040],\"_dataUnit\":[32],\"_dataState\":[32],\"_showFormConfig\":[32],\"_configManager\":[32],\"showConfig\":[64],\"hideConfig\":[64]}]]],[\"snk-application.cjs\",[[2,\"snk-application\",{\"messagesBuilder\":[1040],\"configName\":[1,\"config-name\"],\"isUserSup\":[64],\"initOnboarding\":[64],\"hasAccess\":[64],\"getAllAccess\":[64],\"getStringParam\":[64],\"getIntParam\":[64],\"getFloatParam\":[64],\"getBooleanParam\":[64],\"getDateParam\":[64],\"showPopUp\":[64],\"showModal\":[64],\"closeModal\":[64],\"closePopUp\":[64],\"temOpcional\":[64],\"getConfig\":[64],\"saveConfig\":[64],\"getAttributeFromHTMLWrapper\":[64],\"openApp\":[64],\"webConnection\":[64],\"createDataunit\":[64],\"updateDataunitCache\":[64],\"getDataUnit\":[64],\"addClientEvent\":[64],\"removeClientEvent\":[64],\"hasClientEvent\":[64],\"getResourceID\":[64],\"getUserID\":[64],\"alert\":[64],\"error\":[64],\"success\":[64],\"message\":[64],\"confirm\":[64],\"info\":[64],\"loadGridConfig\":[64],\"loadTotals\":[64],\"executeSearch\":[64],\"executePreparedSearch\":[64],\"isDebugMode\":[64],\"getAppLabel\":[64],\"addSearchListener\":[64],\"executeSelectDistinct\":[64]}]]],[\"snk-attach.cjs\",[[2,\"snk-attach\",{\"registerKey\":[1,\"register-key\"],\"entityName\":[1,\"entity-name\"],\"messagesBuilder\":[1040],\"dataUnit\":[32],\"crudConfig\":[32]}]]],[\"snk-form-summary.cjs\",[[2,\"snk-form-summary\",{\"fixed\":[1540],\"contracted\":[1540],\"summary\":[16]}]]],[\"snk-form-view.cjs\",[[6,\"snk-form-view\",{\"levelPath\":[1,\"level-path\"],\"label\":[1],\"name\":[1],\"fields\":[16],\"formMetadata\":[8,\"form-metadata\"],\"dataUnit\":[16],\"contracted\":[4],\"fixed\":[1540],\"summaryFields\":[16],\"canExpand\":[4,\"can-expand\"],\"canFix\":[4,\"can-fix\"],\"recordsValidator\":[16],\"showUp\":[64]}]]],[\"snk-filter-detail.cjs\",[[0,\"snk-filter-detail\",{\"config\":[1040],\"getMessage\":[16],\"show\":[64]}]]],[\"snk-simple-bar_2.cjs\",[[6,\"snk-simple-crud\",{\"dataState\":[16],\"dataUnit\":[16],\"mode\":[2],\"gridConfig\":[16],\"formConfig\":[16],\"useCancelConfirm\":[4,\"use-cancel-confirm\"],\"taskbarManager\":[16],\"messagesBuilder\":[1040],\"_currentViewMode\":[32],\"_config\":[32],\"goToView\":[64],\"setMetadata\":[64],\"setRecords\":[64],\"getRecords\":[64]},[[0,\"actionClick\",\"actionClickListener\"]]],[6,\"snk-simple-bar\",{\"label\":[1],\"breadcrumbItens\":[16],\"messagesBuilder\":[1040]}]]]]"), options);
|
21
21
|
});
|
22
22
|
|
23
23
|
exports.setNonce = index.setNonce;
|
@@ -8,13 +8,14 @@ const DataFetcher = require('./DataFetcher-a9d0228f.js');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
9
9
|
const pesquisaFetcher = require('./pesquisa-fetcher-954b74c3.js');
|
10
10
|
const ConfigStorage = require('./ConfigStorage-f68c3607.js');
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-01fabb36.js');
|
12
12
|
const resourceFetcher = require('./resource-fetcher-2979b54b.js');
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-3b5b5614.js');
|
14
14
|
require('./_commonjsHelpers-537d719a.js');
|
15
15
|
require('./form-config-fetcher-92bc8fe7.js');
|
16
16
|
require('./filter-bar-config-fetcher-a14536bf.js');
|
17
17
|
require('./filter-item-type.enum-aa823a00.js');
|
18
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
18
19
|
|
19
20
|
class SnkErrorHandler {
|
20
21
|
constructor(app) {
|
@@ -786,6 +787,14 @@ const SnkApplication = class {
|
|
786
787
|
resolve(removeListener);
|
787
788
|
});
|
788
789
|
}
|
790
|
+
/**
|
791
|
+
* Com base em um campo realiza um "select distinct" respeitando os
|
792
|
+
* filtros atuais do dataUnit e um critério de filtro para a própria
|
793
|
+
* coluna.
|
794
|
+
*/
|
795
|
+
executeSelectDistinct(dataUnit, fieldName, argument) {
|
796
|
+
return this.dataUnitFetcher.loadSelectDistinct(dataUnit, fieldName, argument);
|
797
|
+
}
|
789
798
|
clearContent(container) {
|
790
799
|
if (container) {
|
791
800
|
Array.from(container.children).forEach(child => {
|
@@ -6,9 +6,10 @@ const index = require('./index-21bd01e1.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const DataFetcher = require('./DataFetcher-a9d0228f.js');
|
8
8
|
const constants = require('./constants-3787fa32.js');
|
9
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
9
|
+
const dataunitFetcher = require('./dataunit-fetcher-01fabb36.js');
|
10
10
|
const taskbarElements = require('./taskbar-elements-3be287d6.js');
|
11
11
|
require('./_commonjsHelpers-537d719a.js');
|
12
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
12
13
|
require('./index-f400b1d6.js');
|
13
14
|
require('./index-de79181a.js');
|
14
15
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-21bd01e1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
8
7
|
const constants = require('./constants-3787fa32.js');
|
8
|
+
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
9
9
|
|
10
10
|
const snkConfiguratorCss = ".sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--medium, 12px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.snk-configurator__collsable-box-action.sc-snk-configurator{width:100%}.snk-configurator__action-buttons.sc-snk-configurator{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium)}.snk-configurator__outline.sc-snk-configurator{display:flex;flex-direction:column;gap:var(--space--small);margin-top:var(--space--small);margin-bottom:var(--space--large)}@media screen and (min-width: 480px){.snk-configurator.sc-snk-configurator{width:359px;max-width:359px}}.snk-configurator__button-config.sc-snk-configurator{--ez-button--min-width:100%}.snk-configurator__header.sc-snk-configurator{display:flex;justify-content:space-between;align-items:center;width:100%}.snk-configurator__title.sc-snk-configurator{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-configurator__title--color);font-size:var(--snk-configurator__title--font-size);font-family:var(--snk-configurator__title--font-family);font-weight:var(--snk-configurator__title--font-weight)}.snk-configurator__subtitle.sc-snk-configurator{display:flex;margin:0;padding-top:var(--space--medium);padding-bottom:var(--space--small);color:var(--snk-configurator__subtitle--color);font-size:var(--snk-configurator__subtitle--font-size);font-family:var(--snk-configurator__subtitle--font-family);font-weight:var(--snk-configurator__subtitle--font-weight)}.snk-configurator__button-close.sc-snk-configurator{padding-left:var(--snk-configurator__button-close--padding-left)}.snk-configurator__main.sc-snk-configurator{overflow-y:auto;scrollbar-width:thin;margin:var(--space--medium) 0;scrollbar-color:var(--snk-configurator__scrollbar--color-clicked) var(--snk-configurator__scrollbar--color-background)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar{background-color:var(--snk-configurator__scrollbar--color-background);width:var(--snk-configurator__scrollbar--width);max-width:var(--snk-configurator__scrollbar--width);min-width:var(--snk-configurator__scrollbar--width)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-track{background-color:var(--snk-configurator__scrollbar--color-background);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb{background-color:var(--snk-configurator__scrollbar--color-default);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:hover,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-configurator__scrollbar--color-hover)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:active,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-configurator__scrollbar--color-clicked)}";
|
11
11
|
|
@@ -29,6 +29,7 @@ const SnkConfigurator = class {
|
|
29
29
|
async open() {
|
30
30
|
this._opened = true;
|
31
31
|
this.configSelected.emit(this.getViewModeValue());
|
32
|
+
this.modal.heightMode = 'full';
|
32
33
|
}
|
33
34
|
/**
|
34
35
|
* Fecha a janela de configuração.
|
@@ -81,16 +82,16 @@ const SnkConfigurator = class {
|
|
81
82
|
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {});
|
82
83
|
}
|
83
84
|
componentWillLoad() {
|
84
|
-
this._application = core.ApplicationContext.getContextValue(
|
85
|
+
this._application = core.ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
85
86
|
if (this._application) {
|
86
|
-
this._application.getAllAccess().then(access => this._permissions = access);
|
87
|
+
this._application.getAllAccess().then(access => (this._permissions = access));
|
87
88
|
}
|
88
89
|
else {
|
89
90
|
this._permissions = {};
|
90
91
|
}
|
91
92
|
}
|
92
93
|
render() {
|
93
|
-
return (index.h("ez-modal", { opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, index.h("div", { class: "snk-configurator" }, index.h("div", { class: "snk-configurator__header" }, index.h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), index.h("div", { class: "snk-configurator__button-close" }, index.h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), index.h("div", { class: "snk-configurator__main" }, index.h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, index.h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, index.h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: constants.VIEW_MODE.GRID }), index.h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: constants.VIEW_MODE.FORM })), index.h("div", { class: "snk-configurator__collsable-box-action" }, index.h("ez-button", { label: this.viewMode === constants.VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), index.h("div", { class: "snk-configurator__outline" }, index.h("slot", { name: "SnkConfigContainerSlot" }))), this.showActionButtons && (index.h("div", { class: "snk-configurator__action-buttons" }, index.h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), index.h("ez-button", { label: "Salvar", onClick: () => this.save.emit(), class: "ez-button--primary" }))))));
|
94
|
+
return (index.h("ez-modal", { ref: (element) => (this.modal = element), opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, index.h("div", { class: "snk-configurator" }, index.h("div", { class: "snk-configurator__header" }, index.h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), index.h("div", { class: "snk-configurator__button-close" }, index.h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), index.h("div", { class: "snk-configurator__main" }, index.h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, index.h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, index.h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: constants.VIEW_MODE.GRID }), index.h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: constants.VIEW_MODE.FORM })), index.h("div", { class: "snk-configurator__collsable-box-action" }, index.h("ez-button", { label: this.viewMode === constants.VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), index.h("div", { class: "snk-configurator__outline" }, index.h("slot", { name: "SnkConfigContainerSlot" }))), this.showActionButtons && (index.h("div", { class: "snk-configurator__action-buttons" }, index.h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), index.h("ez-button", { label: "Salvar", onClick: () => this.save.emit(), class: "ez-button--primary" }))))));
|
94
95
|
}
|
95
96
|
};
|
96
97
|
SnkConfigurator.style = snkConfiguratorCss;
|
@@ -17,6 +17,35 @@ require('./resource-fetcher-2979b54b.js');
|
|
17
17
|
require('./filter-bar-config-fetcher-a14536bf.js');
|
18
18
|
require('./filter-item-type.enum-aa823a00.js');
|
19
19
|
|
20
|
+
class SnkMultiSelectionListDataSource {
|
21
|
+
setDataUnit(dataUnit) {
|
22
|
+
this._dataUnit = dataUnit;
|
23
|
+
}
|
24
|
+
setApplication(application) {
|
25
|
+
this._application = application;
|
26
|
+
}
|
27
|
+
formatLabel(fieldName, value) {
|
28
|
+
const { userInterface } = this._dataUnit.getField(fieldName);
|
29
|
+
if (userInterface === core.UserInterface.DATETIME) {
|
30
|
+
return core.DateUtils.formatDate(this._dataUnit.valueFromString(fieldName, value));
|
31
|
+
}
|
32
|
+
return String(this._dataUnit.getFormattedValue(fieldName, value));
|
33
|
+
}
|
34
|
+
fetchData(filterTerm, fieldName) {
|
35
|
+
return new Promise(resolve => {
|
36
|
+
this._application.executeSelectDistinct(this._dataUnit, fieldName, filterTerm).then(result => {
|
37
|
+
resolve(result.map(item => {
|
38
|
+
const field = this._dataUnit.getField(fieldName);
|
39
|
+
if (field.userInterface === core.UserInterface.SEARCH) {
|
40
|
+
return Object.assign(Object.assign({}, JSON.parse(item)), { check: true });
|
41
|
+
}
|
42
|
+
return { value: item, label: this.formatLabel(fieldName, item), check: true };
|
43
|
+
}));
|
44
|
+
});
|
45
|
+
});
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
20
49
|
const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:300px}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
|
21
50
|
|
22
51
|
const SnkGrid = class {
|
@@ -24,6 +53,7 @@ const SnkGrid = class {
|
|
24
53
|
index.registerInstance(this, hostRef);
|
25
54
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
26
55
|
this.gridDoubleClick = index.createEvent(this, "gridDoubleClick", 7);
|
56
|
+
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
27
57
|
this._topTaskbarProcessor = new taskbarProcessor.TaskbarProcessor({
|
28
58
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
29
59
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
@@ -220,6 +250,12 @@ const SnkGrid = class {
|
|
220
250
|
const dataInfo = { dataUnit: this._dataUnit };
|
221
251
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
222
252
|
}
|
253
|
+
finshLoading() {
|
254
|
+
this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
|
255
|
+
this.addElementID();
|
256
|
+
this._multiSelectionListDataSource.setApplication(this._application);
|
257
|
+
this._multiSelectionListDataSource.setDataUnit(this._dataUnit);
|
258
|
+
}
|
223
259
|
componentWillLoad() {
|
224
260
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
225
261
|
let parent = this._element.parentElement;
|
@@ -230,13 +266,11 @@ const SnkGrid = class {
|
|
230
266
|
if (!this._dataUnit) {
|
231
267
|
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
232
268
|
this._dataUnit = evt.detail;
|
233
|
-
this.
|
234
|
-
this.addElementID();
|
269
|
+
this.finshLoading();
|
235
270
|
});
|
236
271
|
}
|
237
272
|
else {
|
238
|
-
this.
|
239
|
-
this.addElementID();
|
273
|
+
this.finshLoading();
|
240
274
|
}
|
241
275
|
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
242
276
|
this._dataState = evt.detail;
|
@@ -296,7 +330,7 @@ const SnkGrid = class {
|
|
296
330
|
return undefined;
|
297
331
|
}
|
298
332
|
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, index.h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
299
|
-
index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady() }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
333
|
+
index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this._multiSelectionListDataSource }, index.h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
300
334
|
}
|
301
335
|
get _element() { return index.getElement(this); }
|
302
336
|
};
|
@@ -559,6 +559,14 @@ export class SnkApplication {
|
|
559
559
|
resolve(removeListener);
|
560
560
|
});
|
561
561
|
}
|
562
|
+
/**
|
563
|
+
* Com base em um campo realiza um "select distinct" respeitando os
|
564
|
+
* filtros atuais do dataUnit e um critério de filtro para a própria
|
565
|
+
* coluna.
|
566
|
+
*/
|
567
|
+
executeSelectDistinct(dataUnit, fieldName, argument) {
|
568
|
+
return this.dataUnitFetcher.loadSelectDistinct(dataUnit, fieldName, argument);
|
569
|
+
}
|
562
570
|
clearContent(container) {
|
563
571
|
if (container) {
|
564
572
|
Array.from(container.children).forEach(child => {
|
@@ -1732,6 +1740,38 @@ export class SnkApplication {
|
|
1732
1740
|
"text": "Adiciona um listener no fetcher de Pesquisa",
|
1733
1741
|
"tags": []
|
1734
1742
|
}
|
1743
|
+
},
|
1744
|
+
"executeSelectDistinct": {
|
1745
|
+
"complexType": {
|
1746
|
+
"signature": "(dataUnit: DataUnit, fieldName: string, argument: string) => Promise<Array<any>>",
|
1747
|
+
"parameters": [{
|
1748
|
+
"tags": [],
|
1749
|
+
"text": ""
|
1750
|
+
}, {
|
1751
|
+
"tags": [],
|
1752
|
+
"text": ""
|
1753
|
+
}, {
|
1754
|
+
"tags": [],
|
1755
|
+
"text": ""
|
1756
|
+
}],
|
1757
|
+
"references": {
|
1758
|
+
"Promise": {
|
1759
|
+
"location": "global"
|
1760
|
+
},
|
1761
|
+
"DataUnit": {
|
1762
|
+
"location": "import",
|
1763
|
+
"path": "@sankhyalabs/core"
|
1764
|
+
},
|
1765
|
+
"Array": {
|
1766
|
+
"location": "global"
|
1767
|
+
}
|
1768
|
+
},
|
1769
|
+
"return": "Promise<any[]>"
|
1770
|
+
},
|
1771
|
+
"docs": {
|
1772
|
+
"text": "Com base em um campo realiza um \"select distinct\" respeitando os \nfiltros atuais do dataUnit e um crit\u00E9rio de filtro para a pr\u00F3pria \ncoluna.",
|
1773
|
+
"tags": []
|
1774
|
+
}
|
1735
1775
|
}
|
1736
1776
|
};
|
1737
1777
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ApplicationContext } from '@sankhyalabs/core';
|
2
2
|
import { h } from '@stencil/core';
|
3
|
-
import { AuthorizationConfig } from './AuthorizationConfig';
|
4
3
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
4
|
+
import { AuthorizationConfig } from './AuthorizationConfig';
|
5
5
|
export class SnkConfigurator {
|
6
6
|
constructor() {
|
7
7
|
this._opened = false;
|
@@ -17,6 +17,7 @@ export class SnkConfigurator {
|
|
17
17
|
async open() {
|
18
18
|
this._opened = true;
|
19
19
|
this.configSelected.emit(this.getViewModeValue());
|
20
|
+
this.modal.heightMode = 'full';
|
20
21
|
}
|
21
22
|
/**
|
22
23
|
* Fecha a janela de configuração.
|
@@ -69,16 +70,16 @@ export class SnkConfigurator {
|
|
69
70
|
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {});
|
70
71
|
}
|
71
72
|
componentWillLoad() {
|
72
|
-
this._application = ApplicationContext.getContextValue(
|
73
|
+
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
73
74
|
if (this._application) {
|
74
|
-
this._application.getAllAccess().then(access => this._permissions = access);
|
75
|
+
this._application.getAllAccess().then(access => (this._permissions = access));
|
75
76
|
}
|
76
77
|
else {
|
77
78
|
this._permissions = {};
|
78
79
|
}
|
79
80
|
}
|
80
81
|
render() {
|
81
|
-
return (h("ez-modal", { opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, h("div", { class: "snk-configurator" }, h("div", { class: "snk-configurator__header" }, h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), h("div", { class: "snk-configurator__button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), h("div", { class: "snk-configurator__main" }, h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: VIEW_MODE.GRID }), h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: VIEW_MODE.FORM })), h("div", { class: "snk-configurator__collsable-box-action" }, h("ez-button", { label: this.viewMode === VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), h("div", { class: "snk-configurator__outline" }, h("slot", { name: "SnkConfigContainerSlot" }))), this.showActionButtons && (h("div", { class: "snk-configurator__action-buttons" }, h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), h("ez-button", { label: "Salvar", onClick: () => this.save.emit(), class: "ez-button--primary" }))))));
|
82
|
+
return (h("ez-modal", { ref: (element) => (this.modal = element), opened: this._opened, "close-esc": false, "close-outside-click": false, "modal-size": "small", scrim: "light" }, h("div", { class: "snk-configurator" }, h("div", { class: "snk-configurator__header" }, h("label", { class: "snk-configurator__title" }, this.getMessage('snkConfigurator.titleConfigurations')), h("div", { class: "snk-configurator__button-close" }, h("ez-button", { mode: "icon", iconName: "close", size: "medium", onClick: () => this.closeConfig() }))), h("div", { class: "snk-configurator__main" }, h("ez-collapsible-box", { boxBordered: true, label: "Modo de visualiza\u00E7\u00E3o ", headerSize: "medium", class: "snk-configurator__collapsable-box" }, h("ez-radio-button", { value: this.getViewModeValue().toString(), onEzChange: (evt) => this.onViewModeChanged(evt), enabled: this.enableModeConfig() }, h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelGrid'), value: VIEW_MODE.GRID }), h("ez-radio-button-option", { label: this.getMessage('snkConfigurator.labelForm'), value: VIEW_MODE.FORM })), h("div", { class: "snk-configurator__collsable-box-action" }, h("ez-button", { label: this.viewMode === VIEW_MODE.GRID ? this.getMessage('snkConfigurator.labelConfigGrid') : this.getMessage('snkConfigurator.labelConfigForm'), class: "snk-configurator__button-config ez-button--secondary", onClick: () => this.onClickOpenConfig(), id: "openConfigurator" }))), h("div", { class: "snk-configurator__outline" }, h("slot", { name: "SnkConfigContainerSlot" }))), this.showActionButtons && (h("div", { class: "snk-configurator__action-buttons" }, h("ez-button", { label: "Cancelar", onClick: () => this.cancel.emit() }), h("ez-button", { label: "Salvar", onClick: () => this.save.emit(), class: "ez-button--primary" }))))));
|
82
83
|
}
|
83
84
|
static get is() { return "snk-configurator"; }
|
84
85
|
static get encapsulation() { return "scoped"; }
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { DateUtils, UserInterface } from '@sankhyalabs/core';
|
2
|
+
export default class SnkMultiSelectionListDataSource {
|
3
|
+
setDataUnit(dataUnit) {
|
4
|
+
this._dataUnit = dataUnit;
|
5
|
+
}
|
6
|
+
setApplication(application) {
|
7
|
+
this._application = application;
|
8
|
+
}
|
9
|
+
formatLabel(fieldName, value) {
|
10
|
+
const { userInterface } = this._dataUnit.getField(fieldName);
|
11
|
+
if (userInterface === UserInterface.DATETIME) {
|
12
|
+
return DateUtils.formatDate(this._dataUnit.valueFromString(fieldName, value));
|
13
|
+
}
|
14
|
+
return String(this._dataUnit.getFormattedValue(fieldName, value));
|
15
|
+
}
|
16
|
+
fetchData(filterTerm, fieldName) {
|
17
|
+
return new Promise(resolve => {
|
18
|
+
this._application.executeSelectDistinct(this._dataUnit, fieldName, filterTerm).then(result => {
|
19
|
+
resolve(result.map(item => {
|
20
|
+
const field = this._dataUnit.getField(fieldName);
|
21
|
+
if (field.userInterface === UserInterface.SEARCH) {
|
22
|
+
return Object.assign(Object.assign({}, JSON.parse(item)), { check: true });
|
23
|
+
}
|
24
|
+
return { value: item, label: this.formatLabel(fieldName, item), check: true };
|
25
|
+
}));
|
26
|
+
});
|
27
|
+
});
|
28
|
+
}
|
29
|
+
}
|
@@ -6,8 +6,10 @@ import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
|
6
6
|
import { PresentationMode } from '../../lib/@types';
|
7
7
|
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
8
8
|
import store from "../../lib/store";
|
9
|
+
import SnkMultiSelectionListDataSource from './filtercolumn/SnkMultiSelectionListDataSource';
|
9
10
|
export class SnkGrid {
|
10
11
|
constructor() {
|
12
|
+
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
11
13
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
12
14
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
13
15
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
@@ -204,6 +206,12 @@ export class SnkGrid {
|
|
204
206
|
const dataInfo = { dataUnit: this._dataUnit };
|
205
207
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
206
208
|
}
|
209
|
+
finshLoading() {
|
210
|
+
this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
|
211
|
+
this.addElementID();
|
212
|
+
this._multiSelectionListDataSource.setApplication(this._application);
|
213
|
+
this._multiSelectionListDataSource.setDataUnit(this._dataUnit);
|
214
|
+
}
|
207
215
|
componentWillLoad() {
|
208
216
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
209
217
|
let parent = this._element.parentElement;
|
@@ -214,13 +222,11 @@ export class SnkGrid {
|
|
214
222
|
if (!this._dataUnit) {
|
215
223
|
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
216
224
|
this._dataUnit = evt.detail;
|
217
|
-
this.
|
218
|
-
this.addElementID();
|
225
|
+
this.finshLoading();
|
219
226
|
});
|
220
227
|
}
|
221
228
|
else {
|
222
|
-
this.
|
223
|
-
this.addElementID();
|
229
|
+
this.finshLoading();
|
224
230
|
}
|
225
231
|
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
226
232
|
this._dataState = evt.detail;
|
@@ -280,7 +286,7 @@ export class SnkGrid {
|
|
280
286
|
return undefined;
|
281
287
|
}
|
282
288
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
283
|
-
h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady() }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
289
|
+
h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this._multiSelectionListDataSource }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
284
290
|
}
|
285
291
|
static get is() { return "snk-grid"; }
|
286
292
|
static get encapsulation() { return "scoped"; }
|