@sankhyalabs/sankhyablocks 2.5.1 → 2.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-370e23ae.js → SnkMessageBuilder-09b25b0a.js} +20 -1
- package/dist/cjs/data-exporter-option-417da37a.js +19 -0
- package/dist/cjs/{index-20e8b68a.js → index-2cd6f753.js} +26 -0
- package/dist/cjs/index-696b5c3b.js +200 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-application.cjs.entry.js +2 -2
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +71 -13
- package/dist/cjs/snk-crud.cjs.entry.js +3 -2
- package/dist/cjs/{snk-exporter-email-sender_8.cjs.entry.js → snk-data-exporter_9.cjs.entry.js} +305 -8
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-3807c809.js → taskbar-elements-bbb89cdb.js} +8 -5
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-data-exporter/enum/data-exporter-option.js +11 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +4 -4
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +19 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +181 -0
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +140 -0
- package/dist/collection/components/snk-grid/snk-grid.js +69 -10
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +7 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +33 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +16 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/store/index.js +5 -0
- package/dist/collection/lib/utils/fileViewer/index.js +3 -0
- package/dist/collection/lib/utils/fileViewer/interfaces/IFileViewerParams.js +1 -0
- package/dist/components/ConfigStorage.js +3 -6694
- package/dist/components/DataFetcher.js +6695 -0
- package/dist/components/SnkMessageBuilder.js +20 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +2 -1
- package/dist/components/snk-crud.js +10 -4
- package/dist/components/snk-data-exporter.d.ts +11 -0
- package/dist/components/snk-data-exporter.js +6 -0
- package/dist/components/snk-data-exporter2.js +330 -0
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-form2.js +8 -2
- package/dist/components/snk-grid2.js +74 -10
- package/dist/components/snk-taskbar2.js +212 -9
- package/dist/esm/{SnkMessageBuilder-7d583c9a.js → SnkMessageBuilder-47db5d75.js} +20 -1
- package/dist/esm/data-exporter-option-006307dd.js +19 -0
- package/dist/esm/{index-e4121713.js → index-a77b6f35.js} +25 -1
- package/dist/esm/index-d89e384f.js +198 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/sankhyablocks.js +2 -2
- package/dist/esm/snk-application.entry.js +2 -2
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +68 -10
- package/dist/esm/snk-crud.entry.js +3 -2
- package/dist/esm/{snk-exporter-email-sender_8.entry.js → snk-data-exporter_9.entry.js} +304 -8
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +1 -1
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-personalized.entry.js +1 -1
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/{taskbar-elements-b2bbe275.js → taskbar-elements-beec3b27.js} +8 -5
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-a3871147.entry.js → p-02d430a7.entry.js} +3 -3
- package/dist/sankhyablocks/p-04581d0c.entry.js +1 -0
- package/dist/sankhyablocks/p-112bb324.js +1 -0
- package/dist/sankhyablocks/{p-c17be74f.entry.js → p-12ebe36a.entry.js} +1 -1
- package/dist/sankhyablocks/p-13116d05.entry.js +1 -0
- package/dist/sankhyablocks/{p-14af45cc.entry.js → p-187b0d06.entry.js} +1 -1
- package/dist/sankhyablocks/{p-570cc474.entry.js → p-1a2533d0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fd3b562d.entry.js → p-1ccaea51.entry.js} +1 -1
- package/dist/sankhyablocks/p-1d7a0daf.js +1 -0
- package/dist/sankhyablocks/p-50c8bcb7.entry.js +1 -0
- package/dist/sankhyablocks/{p-44ce5b90.entry.js → p-57895452.entry.js} +1 -1
- package/dist/sankhyablocks/{p-48bbbd2c.entry.js → p-68fcc226.entry.js} +1 -1
- package/dist/sankhyablocks/p-719e570a.js +1 -0
- package/dist/sankhyablocks/{p-00b3c5d8.entry.js → p-772f1c44.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c30d0966.entry.js → p-82e20fc0.entry.js} +1 -1
- package/dist/sankhyablocks/{p-eff899b0.entry.js → p-91c23d20.entry.js} +1 -1
- package/dist/sankhyablocks/p-a77dd79a.js +2 -0
- package/dist/sankhyablocks/{p-f50c6ef6.entry.js → p-ab4ff312.entry.js} +1 -1
- package/dist/sankhyablocks/p-c8327a5c.js +1 -0
- package/dist/sankhyablocks/{p-2664ae24.entry.js → p-d3e402d3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9593c937.entry.js → p-d7ae56ce.entry.js} +1 -1
- package/dist/sankhyablocks/{p-70e52fee.entry.js → p-d96bf6a7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0a0222f.entry.js → p-df5d94c6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-db111acd.entry.js → p-e075dba7.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-data-exporter/data/attachment.d.ts +1 -1
- package/dist/types/components/snk-data-exporter/data/email.d.ts +3 -3
- package/dist/types/components/snk-data-exporter/data/export-config.d.ts +5 -5
- package/dist/types/components/snk-data-exporter/data/export-result.d.ts +5 -5
- package/dist/types/components/snk-data-exporter/data/report.d.ts +1 -1
- package/dist/types/components/snk-data-exporter/enum/data-exporter-option.d.ts +10 -0
- package/dist/types/components/snk-data-exporter/exporter-email-sender/email-info-step.d.ts +4 -4
- package/dist/types/components/snk-data-exporter/exporter-email-sender/options-step.d.ts +4 -4
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +9 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +40 -0
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +61 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -2
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -1
- package/dist/types/components.d.ts +33 -3
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +14 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.d.ts +7 -0
- package/dist/types/lib/message/resources/snk-data-exporter.msg.d.ts +1 -0
- package/dist/types/lib/store/index.d.ts +4 -0
- package/dist/types/lib/utils/fileViewer/index.d.ts +2 -0
- package/dist/types/lib/utils/fileViewer/interfaces/IFileViewerParams.d.ts +4 -0
- package/package.json +3 -2
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/AuthorizationConfig-79ffae4b.js +0 -7
- package/dist/esm/AuthorizationConfig-dcbd207a.js +0 -7
- package/dist/sankhyablocks/p-8a872a35.entry.js +0 -1
- package/dist/sankhyablocks/p-9ba3df4c.js +0 -2
- package/dist/sankhyablocks/p-9e67cf79.entry.js +0 -1
- package/dist/sankhyablocks/p-c118ef2a.entry.js +0 -1
- package/dist/sankhyablocks/p-dbaad88c.js +0 -1
- package/dist/sankhyablocks/p-dc36cfbf.js +0 -1
- package/dist/sankhyablocks/p-e7f772ed.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-a77b6f35.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.18.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"enableDataExporter":[4,"enable-data-exporter"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]},[[0,"
|
|
16
|
+
return bootstrapLazy([["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"enableDataExporter":[4,"enable-data-exporter"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]},[[0,"ezClickDataExporter","ezClickDataExporterHandler"]]],[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[1,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}],[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"formConfig":[16],"configName":[513,"config-name"],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-data-exporter_9",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]],[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"saveConfig":[64]}],[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}],[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"]]],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}],[2,"snk-data-exporter",{"provider":[16],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"enableDataExporter":[4,"enable-data-exporter"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[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],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"fetchUserAvailableConfigs":[64],"fetchLegacyConfig":[64],"fetchDefaultConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"saveFormConfig":[64],"getDefaultValues":[64],"getDefaultValue":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { WaitingChangeException, WarningException, ErrorException, ObjectUtils, DataType, DataUnit, StringUtils, ChangeOperation, DateUtils, DependencyType, ElementIDUtils, ApplicationContext, ErrorTracking } from '@sankhyalabs/core';
|
|
3
3
|
import { d as dist, D as DataFetcher, R as ResourceFetcher, U as UrlUtils, F as FormConfigFetcher, G as GridConfigFetcher, C as ConfigStorage } from './ConfigStorage-b59461d8.js';
|
|
4
4
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
|
5
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-47db5d75.js';
|
|
6
6
|
import './_commonjsHelpers-9943807e.js';
|
|
7
7
|
|
|
8
8
|
class SnkErrorHandler {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { UserInterface, ObjectUtils, StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { DataType, getConvertedValue } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
4
4
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
2
|
-
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
|
+
import { ApplicationContext, ElementIDUtils, DataType } from '@sankhyalabs/core';
|
|
3
3
|
import { c as VIEW_MODE, A as ACTION_CONFIG } from './constants-babe1a08.js';
|
|
4
|
-
import { A as AuthorizationConfig } from './
|
|
4
|
+
import { A as AuthorizationConfig, D as DataExporterOption } from './data-exporter-option-006307dd.js';
|
|
5
|
+
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
6
|
import { T as TaskbarProcessor } from './taskbar-processor-c2a99aba.js';
|
|
6
7
|
import { C as ConfigStorage } from './ConfigStorage-b59461d8.js';
|
|
7
|
-
import {
|
|
8
|
+
import { s as store } from './index-d89e384f.js';
|
|
8
9
|
import './_commonjsHelpers-9943807e.js';
|
|
9
10
|
|
|
10
11
|
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%}@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;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)}";
|
|
@@ -163,8 +164,8 @@ const SnkGrid = class {
|
|
|
163
164
|
"snkGridTopTaskbar": ["FORM_MODE", "CONFIGURATOR", "INSERT"]
|
|
164
165
|
});
|
|
165
166
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
|
166
|
-
"snkGridHeaderTaskbar.unselected": ["REFRESH", "
|
|
167
|
-
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "
|
|
167
|
+
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
|
|
168
|
+
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"]
|
|
168
169
|
});
|
|
169
170
|
this._popUpGridConfig = false;
|
|
170
171
|
/**
|
|
@@ -196,8 +197,9 @@ const SnkGrid = class {
|
|
|
196
197
|
async setConfig(config) {
|
|
197
198
|
this.setGridConfig(config);
|
|
198
199
|
}
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
ezClickDataExporterHandler(event) {
|
|
201
|
+
var _a;
|
|
202
|
+
if (((_a = event === null || event === void 0 ? void 0 : event.detail) === null || _a === void 0 ? void 0 : _a.id) === DataExporterOption.EXPORT_BY_EMAIL) {
|
|
201
203
|
// TODO: Quando o exportador de grades for implementado, essa ação
|
|
202
204
|
// vai fazer mostrar as opções disponíveis. Enviar por email será
|
|
203
205
|
// apenas mais uma
|
|
@@ -266,6 +268,61 @@ const SnkGrid = class {
|
|
|
266
268
|
this.closeGridConfig();
|
|
267
269
|
});
|
|
268
270
|
}
|
|
271
|
+
buildColumnsMetadata(columnsMetadata, gridColumns) {
|
|
272
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
|
|
273
|
+
var _a, _b, _c, _d, _e;
|
|
274
|
+
if (column.hidden) {
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
const fieldData = (_d = (_c = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.fields) === null || _c === void 0 ? void 0 : _c.filter((field) => field.name === column.name)) === null || _d === void 0 ? void 0 : _d[0];
|
|
278
|
+
const columnData = {
|
|
279
|
+
label: column.label,
|
|
280
|
+
id: column.name,
|
|
281
|
+
width: column.width,
|
|
282
|
+
dataType: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
283
|
+
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface
|
|
284
|
+
};
|
|
285
|
+
columnsMetadata.push(columnData);
|
|
286
|
+
if (((_e = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _e === void 0 ? void 0 : _e.DESCRIPTIONFIELD) != undefined) {
|
|
287
|
+
const descriptionColumn = {
|
|
288
|
+
label: fieldData.properties.DESCRIPTIONENTITY,
|
|
289
|
+
id: fieldData.properties.ENTITYNAME + "." + fieldData.properties.DESCRIPTIONFIELD,
|
|
290
|
+
width: 200,
|
|
291
|
+
dataType: DataType.TEXT,
|
|
292
|
+
userInterface: UserInterface.LONGTEXT
|
|
293
|
+
};
|
|
294
|
+
columnsMetadata.push(descriptionColumn);
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
return columnsMetadata || [];
|
|
298
|
+
}
|
|
299
|
+
async dataExporterProviderStore() {
|
|
300
|
+
var _a;
|
|
301
|
+
const columnsMetadata = [];
|
|
302
|
+
await ((_a = this._grid) === null || _a === void 0 ? void 0 : _a.getColumnsState().then(this.buildColumnsMetadata.bind(this, columnsMetadata)));
|
|
303
|
+
const dataExporterProvider = {
|
|
304
|
+
getFilters: () => {
|
|
305
|
+
var _a;
|
|
306
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getFilters();
|
|
307
|
+
},
|
|
308
|
+
getColumnsMetadata: () => {
|
|
309
|
+
return columnsMetadata;
|
|
310
|
+
},
|
|
311
|
+
getOrders: () => {
|
|
312
|
+
var _a;
|
|
313
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSort();
|
|
314
|
+
},
|
|
315
|
+
getResourceURI: () => {
|
|
316
|
+
var _a;
|
|
317
|
+
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name;
|
|
318
|
+
},
|
|
319
|
+
getSelectedNumber: () => {
|
|
320
|
+
var _a, _b;
|
|
321
|
+
return (_b = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectedRecords) === null || _b === void 0 ? void 0 : _b.length;
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
store.set("exporterProviders", Object.assign(Object.assign({}, store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
|
|
325
|
+
}
|
|
269
326
|
componentWillLoad() {
|
|
270
327
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
271
328
|
let parent = this._element.parentElement;
|
|
@@ -292,10 +349,11 @@ const SnkGrid = class {
|
|
|
292
349
|
this.loadConfig();
|
|
293
350
|
}
|
|
294
351
|
componentWillRender() {
|
|
295
|
-
const invisibleButtons = this.enableDataExporter ? [] : ["
|
|
352
|
+
const invisibleButtons = this.enableDataExporter && this._dataUnit && this._dataUnit.records.length > 0 ? [] : ["DATA_EXPORTER"];
|
|
296
353
|
const headerTaskbarId = this._dataState && this._dataState.selectedRecords.length > 0 ? "snkGridHeaderTaskbar.selected" : "snkGridHeaderTaskbar.unselected";
|
|
297
354
|
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
298
355
|
this._topTaskbarProcessor.process("snkGridTopTaskbar", this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
356
|
+
this.dataExporterProviderStore();
|
|
299
357
|
}
|
|
300
358
|
addElementID() {
|
|
301
359
|
const dataInfo = { dataUnit: this._dataUnit };
|
|
@@ -305,7 +363,7 @@ const SnkGrid = class {
|
|
|
305
363
|
if (!this._dataUnit) {
|
|
306
364
|
return undefined;
|
|
307
365
|
}
|
|
308
|
-
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", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, "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("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) }), 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, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
366
|
+
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", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), 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, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), h("ez-grid", { ref: ref => this._grid = ref, "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.saveConfig(evt.detail); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, "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("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) }), 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, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
309
367
|
}
|
|
310
368
|
get _element() { return getElement(this); }
|
|
311
369
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { c as VIEW_MODE } from './constants-babe1a08.js';
|
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-beec3b27.js';
|
|
5
|
+
import './index-d89e384f.js';
|
|
5
6
|
|
|
6
7
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
7
8
|
|
|
@@ -1,14 +1,310 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ElementIDUtils, DataType,
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
|
+
import { ObjectUtils, ApplicationContext, ElementIDUtils, DataType, StringUtils, ErrorException, FloatingManager, ArrayUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { D as DataExporterOption, A as AuthorizationConfig } from './data-exporter-option-006307dd.js';
|
|
4
|
+
import { D as DataFetcher, C as ConfigStorage } from './ConfigStorage-b59461d8.js';
|
|
3
5
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
6
|
import { ModalAction, ModalButtonStatus } from '@sankhyalabs/ezui/dist/collection/components/ez-modal-container';
|
|
5
7
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
6
8
|
import { CheckMode, ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
7
|
-
import { C as ConfigStorage } from './ConfigStorage-b59461d8.js';
|
|
8
9
|
import { O as ORDER_VALUES } from './constants-babe1a08.js';
|
|
9
|
-
import { A as
|
|
10
|
-
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-b2bbe275.js';
|
|
10
|
+
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-beec3b27.js';
|
|
11
11
|
import './_commonjsHelpers-9943807e.js';
|
|
12
|
+
import './index-d89e384f.js';
|
|
13
|
+
|
|
14
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
15
|
+
var t = {};
|
|
16
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
17
|
+
t[p] = s[p];
|
|
18
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
19
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
20
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
21
|
+
t[p[i]] = s[p[i]];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
function fetchDataExporter(_a) {
|
|
26
|
+
var { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
|
|
27
|
+
const serviceName = `DataExporterSPBean.${methodName}`;
|
|
28
|
+
const payload = { serviceName, requestBody };
|
|
29
|
+
return new Promise((resolve, reject) => {
|
|
30
|
+
DataFetcher.get()
|
|
31
|
+
.callServiceBroker(serviceName, ObjectUtils.objectToString(payload))
|
|
32
|
+
.then(result => resolve(getFormatResponse(result)))
|
|
33
|
+
.catch(error => reject(error));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function getFormatResponse(result) {
|
|
37
|
+
var _a;
|
|
38
|
+
const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
|
|
39
|
+
if (response == undefined) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
return ObjectUtils.stringToObject(response);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function fileViewer({ fileSessionKey }) {
|
|
46
|
+
window.open(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/mge/visualizadorArquivos.mge?chaveArquivo=${fileSessionKey}&download=S`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
class ItemBuilder {
|
|
50
|
+
constructor(getMessage, selectedNumber) {
|
|
51
|
+
this._selectedNumber = 0;
|
|
52
|
+
this._getMessage = getMessage;
|
|
53
|
+
this._selectedNumber = selectedNumber;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Método responsável por inserir os items no array de opções.
|
|
57
|
+
* @param option - Nome da opção que será inserida no array.
|
|
58
|
+
* @param items - Array que será alimentado com as opções permitidas.
|
|
59
|
+
*/
|
|
60
|
+
setExportOption(option, items) {
|
|
61
|
+
const groupName = this.getExportGroupName();
|
|
62
|
+
if (option === DataExporterOption.EXPORT_TO_PDF) {
|
|
63
|
+
items.push(this.getExportToPDF(groupName));
|
|
64
|
+
}
|
|
65
|
+
if (option === DataExporterOption.EXPORT_TO_XLS) {
|
|
66
|
+
items.push(this.getExportToXLS(groupName));
|
|
67
|
+
}
|
|
68
|
+
this.setExportCurrentPage(option, items);
|
|
69
|
+
this.setExportByEmail(option, items);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Método responsável por inserir os itens de exportação personalizada.
|
|
73
|
+
* @param option - Nome da opção que será inserida no array.
|
|
74
|
+
* @param items - Array que será alimentado com as opções permitidas.
|
|
75
|
+
*/
|
|
76
|
+
setExportCurrentPage(option, items) {
|
|
77
|
+
var _a;
|
|
78
|
+
const pageOptions = [DataExporterOption.EXPORT_PAGE_TO_PDF, DataExporterOption.EXPORT_PAGE_TO_XLS];
|
|
79
|
+
if (option === DataExporterOption.EXPORT_CURRENT_PAGE) {
|
|
80
|
+
items.push(this.getCurrentPage());
|
|
81
|
+
}
|
|
82
|
+
if (pageOptions.includes(option)) {
|
|
83
|
+
let item = items.find((item) => item.id === DataExporterOption.EXPORT_CURRENT_PAGE);
|
|
84
|
+
if (item == undefined) {
|
|
85
|
+
items.push(this.getCurrentPage());
|
|
86
|
+
item = items.find((item) => item.id === DataExporterOption.EXPORT_CURRENT_PAGE);
|
|
87
|
+
}
|
|
88
|
+
if (!((_a = item === null || item === void 0 ? void 0 : item.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
89
|
+
item.children = [];
|
|
90
|
+
}
|
|
91
|
+
if (option === DataExporterOption.EXPORT_PAGE_TO_PDF) {
|
|
92
|
+
item.children.push(this.getExportPageToPDF());
|
|
93
|
+
}
|
|
94
|
+
if (option === DataExporterOption.EXPORT_PAGE_TO_XLS) {
|
|
95
|
+
item.children.push(this.getExportPageToXLS());
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Método responsável por inserir os itens de exportação por e-mail.
|
|
101
|
+
* @param option - Nome da opção que será inserida no array.
|
|
102
|
+
* @param items - Array que será alimentado com as opções permitidas.
|
|
103
|
+
*/
|
|
104
|
+
setExportByEmail(option, items) {
|
|
105
|
+
if (option === DataExporterOption.EXPORT_BY_EMAIL) {
|
|
106
|
+
items.push(this.getExportByEmail());
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Método responsável por capturar o objeto com os dados de exportação em PDF.
|
|
111
|
+
* @param groupName - Nome do grupo da opção que será inserida na lista.
|
|
112
|
+
* @returns Retorna o objeto com os dados de exportação em PDF.
|
|
113
|
+
*/
|
|
114
|
+
getExportToPDF(groupName) {
|
|
115
|
+
return {
|
|
116
|
+
id: DataExporterOption.EXPORT_TO_PDF,
|
|
117
|
+
label: "PDF (.pdf)",
|
|
118
|
+
group: groupName
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Método responsável por capturar o objeto com os dados de exportação em XLS.
|
|
123
|
+
* @param groupName - Nome do grupo da opção que será inserida na lista.
|
|
124
|
+
* @returns Retorna o objeto com os dados de exportação em XLS.
|
|
125
|
+
*/
|
|
126
|
+
getExportToXLS(groupName) {
|
|
127
|
+
return {
|
|
128
|
+
id: DataExporterOption.EXPORT_TO_XLS,
|
|
129
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`,
|
|
130
|
+
group: groupName
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Método responsável por capturar o objeto com os dados de exportação personalizada.
|
|
135
|
+
* @returns Retorna o objeto com os dados de exportação personalizada.
|
|
136
|
+
*/
|
|
137
|
+
getCurrentPage() {
|
|
138
|
+
return {
|
|
139
|
+
id: DataExporterOption.EXPORT_CURRENT_PAGE,
|
|
140
|
+
label: this._getMessage("snkDataExporter.label.currentPage"),
|
|
141
|
+
group: this._getMessage("snkDataExporter.group.custom")
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Método responsável por capturar o objeto com os dados de exportação personalizada em PDF.
|
|
146
|
+
* @returns Retorna o objeto com os dados de exportação personalizada em PDF.
|
|
147
|
+
*/
|
|
148
|
+
getExportPageToPDF() {
|
|
149
|
+
return {
|
|
150
|
+
id: DataExporterOption.EXPORT_PAGE_TO_PDF,
|
|
151
|
+
label: "PDF (.pdf)"
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Método responsável por capturar o objeto com os dados de exportação personalizada em XLS.
|
|
156
|
+
* @returns Retorna o objeto com os dados de exportação personalizada em XLS.
|
|
157
|
+
*/
|
|
158
|
+
getExportPageToXLS() {
|
|
159
|
+
return {
|
|
160
|
+
id: DataExporterOption.EXPORT_PAGE_TO_XLS,
|
|
161
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xlsx)`
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Método responsável por capturar o objeto com os dados de exportação por e-mail.
|
|
166
|
+
* @returns Retorna o objeto com os dados de exportação por e-mail.
|
|
167
|
+
*/
|
|
168
|
+
getExportByEmail() {
|
|
169
|
+
return {
|
|
170
|
+
id: DataExporterOption.EXPORT_BY_EMAIL,
|
|
171
|
+
label: `${this._getMessage("snkDataExporter.label.sendByEmail")}...`
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Método responsável por capturar o nome do grupo da opção que será inserida na lista.
|
|
176
|
+
* @returns Retorna o nome do grupo da opção que será inserida na lista.
|
|
177
|
+
*/
|
|
178
|
+
getExportGroupName() {
|
|
179
|
+
if (this._selectedNumber === 1) {
|
|
180
|
+
return this._getMessage("snkDataExporter.group.export.selectedLine");
|
|
181
|
+
}
|
|
182
|
+
if (this._selectedNumber > 1) {
|
|
183
|
+
return this._getMessage("snkDataExporter.group.export.multiSelected").replace('{0}', this._selectedNumber.toString());
|
|
184
|
+
}
|
|
185
|
+
return this._getMessage("snkDataExporter.group.export.default");
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
const snkDataExporterCss = ".sc-snk-data-exporter-h{--snk-data-exporter--z-index:var(--more-visible, 2);display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content;z-index:var(--snk-data-exporter--z-index)}";
|
|
190
|
+
|
|
191
|
+
const SnkDataExporter = class {
|
|
192
|
+
constructor(hostRef) {
|
|
193
|
+
registerInstance(this, hostRef);
|
|
194
|
+
this.ezClickDataExporter = createEvent(this, "ezClickDataExporter", 7);
|
|
195
|
+
this._items = [];
|
|
196
|
+
this._selectedNumber = 0;
|
|
197
|
+
this._showDropdown = false;
|
|
198
|
+
this._releasedToExport = [
|
|
199
|
+
DataExporterOption.EXPORT_TO_PDF,
|
|
200
|
+
DataExporterOption.EXPORT_BY_EMAIL,
|
|
201
|
+
DataExporterOption.EXPORT_PDF_TO_EMAIL,
|
|
202
|
+
DataExporterOption.EXPORT_XLS_TO_EMAIL
|
|
203
|
+
];
|
|
204
|
+
/**
|
|
205
|
+
* Provedor das informações para exportação dos dados.
|
|
206
|
+
*/
|
|
207
|
+
this.provider = null;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
211
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
212
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
213
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-data-exporter.msg.ts"
|
|
214
|
+
*/
|
|
215
|
+
getMessage(key, params) {
|
|
216
|
+
return this._application.messagesBuilder.getMessage(key, params);
|
|
217
|
+
}
|
|
218
|
+
positionDropdown() {
|
|
219
|
+
var _a;
|
|
220
|
+
const bounding = (_a = this._ezButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
221
|
+
if (bounding == undefined || this._ezDropdown == undefined) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
this._ezDropdown.style.top = (bounding.y + bounding.height + 5) + "px";
|
|
225
|
+
this._ezDropdown.style.left = bounding.x + "px";
|
|
226
|
+
}
|
|
227
|
+
closeDropdown(evt) {
|
|
228
|
+
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
229
|
+
if (target == undefined) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (!target.closest(".snk-data-exporter")) {
|
|
233
|
+
this._showDropdown = false;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
setEvents() {
|
|
237
|
+
document.removeEventListener("click", this.closeDropdown.bind(this));
|
|
238
|
+
document.addEventListener("click", this.closeDropdown.bind(this));
|
|
239
|
+
document.removeEventListener("scroll", this.positionDropdown.bind(this));
|
|
240
|
+
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
|
241
|
+
}
|
|
242
|
+
controlDropdown() {
|
|
243
|
+
this._showDropdown = !this._showDropdown;
|
|
244
|
+
}
|
|
245
|
+
async processExporter(evt) {
|
|
246
|
+
const item = evt === null || evt === void 0 ? void 0 : evt.detail;
|
|
247
|
+
if (!this._releasedToExport.includes(item === null || item === void 0 ? void 0 : item.id)) {
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
if (item.id !== DataExporterOption.EXPORT_BY_EMAIL) {
|
|
251
|
+
if (this.provider == undefined) {
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
const filters = this.provider.getFilters();
|
|
255
|
+
const columns = this.provider.getColumnsMetadata();
|
|
256
|
+
const sort = this.provider.getOrders();
|
|
257
|
+
const resourceURI = this.provider.getResourceURI();
|
|
258
|
+
fetchDataExporter({ filters, columns, sort, resourceURI, methodName: item.id })
|
|
259
|
+
.then((response) => fileViewer(Object.assign(Object.assign({}, response), { fileType: "PDF" })))
|
|
260
|
+
.catch(err => console.log(err));
|
|
261
|
+
}
|
|
262
|
+
this.ezClickDataExporter.emit(item);
|
|
263
|
+
this._showDropdown = false;
|
|
264
|
+
}
|
|
265
|
+
getItems() {
|
|
266
|
+
const items = [];
|
|
267
|
+
this._releasedToExport
|
|
268
|
+
.forEach((option) => {
|
|
269
|
+
this._itemBuilder.setExportOption(option, items);
|
|
270
|
+
});
|
|
271
|
+
return items;
|
|
272
|
+
}
|
|
273
|
+
loadDropdown() {
|
|
274
|
+
var _a;
|
|
275
|
+
this._selectedNumber = ((_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedNumber()) || 0;
|
|
276
|
+
this._itemBuilder = new ItemBuilder(this.getMessage.bind(this), this._selectedNumber);
|
|
277
|
+
this._items = this.getItems();
|
|
278
|
+
}
|
|
279
|
+
componentWillLoad() {
|
|
280
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
281
|
+
this.loadDropdown();
|
|
282
|
+
this.setEvents();
|
|
283
|
+
}
|
|
284
|
+
componentDidLoad() {
|
|
285
|
+
if (this._element == undefined) {
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
ElementIDUtils.addIDInfo(this._element);
|
|
289
|
+
}
|
|
290
|
+
componentWillUpdate() {
|
|
291
|
+
if (this._showDropdown) {
|
|
292
|
+
this.loadDropdown();
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
componentDidUpdate() {
|
|
296
|
+
if (this._showDropdown) {
|
|
297
|
+
this.positionDropdown();
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
render() {
|
|
301
|
+
return (h(Host, null, h("div", { class: "snk-data-exporter" }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", onClick: () => this.controlDropdown() }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("button")}` })), this._showDropdown &&
|
|
302
|
+
h("ez-dropdown", Object.assign({ ref: (ref) => this._ezDropdown = ref, items: this._items, onEzClick: (evt) => this.processExporter(evt) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("dropdown")}` }))), this._showDropdown &&
|
|
303
|
+
h("div", Object.assign({ class: "ez-scrim ez-scrim-light" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("ezScrim")}` }))));
|
|
304
|
+
}
|
|
305
|
+
get _element() { return getElement(this); }
|
|
306
|
+
};
|
|
307
|
+
SnkDataExporter.style = snkDataExporterCss;
|
|
12
308
|
|
|
13
309
|
const EmailInfoStep = ({ getMessage, changeInfo, data }) => {
|
|
14
310
|
return h("div", null,
|
|
@@ -1512,7 +1808,7 @@ const SnkTaskbar = class {
|
|
|
1512
1808
|
[TaskbarElement.GRID_MODE]: "snkTaskbar.titleGridMode",
|
|
1513
1809
|
[TaskbarElement.FORM_MODE]: "snkTaskbar.titleFormMode",
|
|
1514
1810
|
[TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator",
|
|
1515
|
-
[TaskbarElement.
|
|
1811
|
+
[TaskbarElement.DATA_EXPORTER]: "snkTaskbar.titleDataExporter"
|
|
1516
1812
|
};
|
|
1517
1813
|
}
|
|
1518
1814
|
observeButtons() {
|
|
@@ -1603,7 +1899,7 @@ const SnkTaskbar = class {
|
|
|
1603
1899
|
className += "ez-padding-left--medium";
|
|
1604
1900
|
}
|
|
1605
1901
|
if (TaskbarElement[def.toString()]) {
|
|
1606
|
-
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList);
|
|
1902
|
+
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.actionsList, this.configName);
|
|
1607
1903
|
}
|
|
1608
1904
|
else {
|
|
1609
1905
|
return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
|
@@ -1681,4 +1977,4 @@ const SnkTaskbar = class {
|
|
|
1681
1977
|
};
|
|
1682
1978
|
SnkTaskbar.style = snkTaskbarCss;
|
|
1683
1979
|
|
|
1684
|
-
export { SnkExporterEmailSender as snk_exporter_email_sender, SnkFilterBar as snk_filter_bar, SnkFilterItem as snk_filter_item, SnkFilterList as snk_filter_list, SnkFilterModal as snk_filter_modal, EzGridConfig as snk_grid_config, SelectBox as snk_select_box, SnkTaskbar as snk_taskbar };
|
|
1980
|
+
export { SnkDataExporter as snk_data_exporter, SnkExporterEmailSender as snk_exporter_email_sender, SnkFilterBar as snk_filter_bar, SnkFilterItem as snk_filter_item, SnkFilterList as snk_filter_list, SnkFilterModal as snk_filter_modal, EzGridConfig as snk_grid_config, SelectBox as snk_select_box, SnkTaskbar as snk_taskbar };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-a77b6f35.js';
|
|
2
2
|
import { Action, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
|
-
import { O as OperationMap } from './SnkMessageBuilder-
|
|
4
|
+
import { O as OperationMap } from './SnkMessageBuilder-47db5d75.js';
|
|
5
5
|
|
|
6
6
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
import { ElementIDUtils, DataType } from '@sankhyalabs/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ElementIDUtils, UserInterface, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
4
4
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-a79b2fa8.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { d as draggable_bundle } from './draggable.bundle-41d56f06.js';
|
|
3
3
|
import { ObjectUtils, ElementIDUtils, ArrayUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
4
4
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a77b6f35.js';
|
|
2
2
|
import { DateUtils, ObjectUtils, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { T as TaskbarProcessor } from './taskbar-processor-c2a99aba.js';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage-b59461d8.js';
|