@sankhyalabs/sankhyablocks 2.12.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{constants-0069b951.js → constants-8f3504ec.js} +2 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +10 -6
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter_8.cjs.entry.js +94 -18
- package/dist/cjs/snk-data-unit.cjs.entry.js +23 -0
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/collection/components/snk-data-exporter/interfaces/ISelectedID.js +1 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +13 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +76 -14
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +53 -0
- package/dist/collection/components/snk-grid/snk-grid.js +9 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js +18 -0
- package/dist/collection/lib/utils/constants.js +1 -0
- package/dist/components/constants.js +2 -1
- package/dist/components/snk-data-exporter2.js +95 -18
- package/dist/components/snk-data-unit.js +25 -1
- package/dist/components/snk-grid2.js +9 -5
- package/dist/esm/{constants-8ad13317.js → constants-965d7a7f.js} +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +10 -6
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-exporter_8.entry.js +94 -18
- package/dist/esm/snk-data-unit.entry.js +23 -0
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/sankhyablocks/{p-e24e488b.entry.js → p-3c7ec56e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-392d3c18.entry.js → p-3f6c05c7.entry.js} +1 -1
- package/dist/sankhyablocks/p-b4093344.js +1 -0
- package/dist/sankhyablocks/{p-223d1bd9.entry.js → p-bcb2fb03.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7ba9d7c7.entry.js → p-e728ca22.entry.js} +1 -1
- package/dist/sankhyablocks/p-f1ae398e.entry.js +1 -0
- package/dist/sankhyablocks/{p-ecdf80bf.entry.js → p-f9829109.entry.js} +1 -1
- package/dist/sankhyablocks/p-fa885483.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +3 -1
- package/dist/types/components/snk-data-exporter/interfaces/IRecordID.d.ts +6 -0
- package/dist/types/components/snk-data-exporter/interfaces/ISelectedID.d.ts +13 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +8 -3
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +6 -0
- package/dist/types/components.d.ts +7 -1
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.d.ts +4 -0
- package/dist/types/lib/utils/constants.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-12fb5088.entry.js +0 -1
- package/dist/sankhyablocks/p-790e1ed5.entry.js +0 -1
- package/dist/sankhyablocks/p-ad2026bb.js +0 -1
- package/dist/types/lib/applet-caller/interfaces/IAppletCallerParams.d.ts +0 -6
- /package/dist/collection/{lib/applet-caller/interfaces/IAppletCallerParams.js → components/snk-data-exporter/interfaces/IRecordID.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const REPORT_LAUNCHER_RESOURCE_ID = "br.com.sankhya.controls.ReportLauncher";
|
|
3
4
|
const KEY_PORT_EXPORT = "global.porta.app.impressao";
|
|
4
5
|
const VIEW_MODE = {
|
|
5
6
|
grid: {
|
|
@@ -105,6 +106,7 @@ exports.DEFAULT_TYPE = DEFAULT_TYPE;
|
|
|
105
106
|
exports.KEY_EVENTS = KEY_EVENTS;
|
|
106
107
|
exports.KEY_PORT_EXPORT = KEY_PORT_EXPORT;
|
|
107
108
|
exports.ORDER_VALUES = ORDER_VALUES;
|
|
109
|
+
exports.REPORT_LAUNCHER_RESOURCE_ID = REPORT_LAUNCHER_RESOURCE_ID;
|
|
108
110
|
exports.TAB_NAMES = TAB_NAMES;
|
|
109
111
|
exports.TAGS_BY_TYPE = TAGS_BY_TYPE;
|
|
110
112
|
exports.TYPE_ACTIONS = TYPE_ACTIONS;
|
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([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[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.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["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],"value":[8],"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-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[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.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[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.cjs",[[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-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter_8.cjs",[[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]}],[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"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application.cjs",[[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],"webConnection":[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],"getAppLabel":[64]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[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],"getSelectedRecordsIDsInfo":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["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],"value":[8],"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-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[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.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[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.cjs",[[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-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter_8.cjs",[[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]}],[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"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application.cjs",[[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],"webConnection":[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],"getAppLabel":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[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.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["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],"value":[8],"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-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[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.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[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.cjs",[[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-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter_8.cjs",[[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]}],[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"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application.cjs",[[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],"webConnection":[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],"getAppLabel":[64]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[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],"getSelectedRecordsIDsInfo":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["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],"value":[8],"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-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-config-options.cjs",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-tab-config.cjs",[[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.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-configurator_3.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}],[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.cjs",[[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-exporter-email-sender.cjs",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter_8.cjs",[[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]}],[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"],"_permissions":[32]}],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[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],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-form.cjs",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32],"_showFormConfig":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_viewMode":[32],"goToView":[64]}]]],["snk-application.cjs",[[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],"webConnection":[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],"getAppLabel":[64]}]]]], options);
|
|
19
19
|
});
|
|
@@ -6,7 +6,7 @@ const index = require('./index-2cd6f753.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
const constants = require('./constants-
|
|
9
|
+
const constants = require('./constants-8f3504ec.js');
|
|
10
10
|
|
|
11
11
|
const snkConfigOptionsCss = ".sc-snk-config-options-h{--snk-config-options--border:2px solid var(--color--secondary-200, #D2D3DA);width:100%;border-radius:15px;border:var(--snk-config-options--border)}.config-options__switch-row.sc-snk-config-options{margin-top:-30px}";
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const constants = require('./constants-
|
|
7
|
+
const constants = require('./constants-8f3504ec.js');
|
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
9
9
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
10
10
|
const ConfigStorage = require('./ConfigStorage-8b5e3261.js');
|
|
@@ -298,10 +298,11 @@ const SnkGrid = class {
|
|
|
298
298
|
return limit;
|
|
299
299
|
}
|
|
300
300
|
async dataExporterProviderStore() {
|
|
301
|
-
var _a;
|
|
301
|
+
var _a, _b;
|
|
302
302
|
const paginationInfo = this.getPaginationInfo();
|
|
303
303
|
const columnsMetadata = [];
|
|
304
|
-
await ((_a = this.
|
|
304
|
+
const selectedIDs = await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecordsIDsInfo());
|
|
305
|
+
await ((_b = this._grid) === null || _b === void 0 ? void 0 : _b.getColumnsState().then(this.buildColumnsMetadata.bind(this, columnsMetadata)));
|
|
305
306
|
const dataExporterProvider = {
|
|
306
307
|
getFilters: () => {
|
|
307
308
|
var _a;
|
|
@@ -318,15 +319,18 @@ const SnkGrid = class {
|
|
|
318
319
|
var _a;
|
|
319
320
|
return (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.name;
|
|
320
321
|
},
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
return (_b = (_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectedRecords) === null || _b === void 0 ? void 0 : _b.length;
|
|
322
|
+
getSelectedIDs: () => {
|
|
323
|
+
return selectedIDs || [];
|
|
324
324
|
},
|
|
325
325
|
getOffset: () => {
|
|
326
326
|
return this.getExporterOffset(paginationInfo);
|
|
327
327
|
},
|
|
328
328
|
getLimit: () => {
|
|
329
329
|
return this.getExporterLimit(paginationInfo);
|
|
330
|
+
},
|
|
331
|
+
getRecordID: () => {
|
|
332
|
+
var _a, _b, _c;
|
|
333
|
+
return (_c = (_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
|
|
330
334
|
}
|
|
331
335
|
};
|
|
332
336
|
index$2.store.set("exporterProviders", Object.assign(Object.assign({}, index$2.store.get("exporterProviders")), { [this.configName]: dataExporterProvider }));
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const constants = require('./constants-
|
|
7
|
+
const constants = require('./constants-8f3504ec.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-81ad590c.js');
|
|
9
9
|
const index$1 = require('./index-0e663819.js');
|
|
10
10
|
require('./index-696b5c3b.js');
|
|
@@ -6,8 +6,8 @@ const index$1 = require('./index-2cd6f753.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const index = require('./index-0e663819.js');
|
|
9
|
+
const constants = require('./constants-8f3504ec.js');
|
|
9
10
|
const ConfigStorage = require('./ConfigStorage-8b5e3261.js');
|
|
10
|
-
const constants = require('./constants-0069b951.js');
|
|
11
11
|
const filterItemType_enum = require('./filter-item-type.enum-3daf58d3.js');
|
|
12
12
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
13
13
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
@@ -174,11 +174,11 @@ function fetchDataExporter(_a) {
|
|
|
174
174
|
return new Promise((resolve, reject) => {
|
|
175
175
|
ConfigStorage.DataFetcher.get()
|
|
176
176
|
.callServiceBroker(serviceName, core.ObjectUtils.objectToString(payload))
|
|
177
|
-
.then(result => resolve(getFormatResponse(result)))
|
|
177
|
+
.then(result => resolve(getFormatResponse$1(result)))
|
|
178
178
|
.catch(error => reject(error));
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
function getFormatResponse(result) {
|
|
181
|
+
function getFormatResponse$1(result) {
|
|
182
182
|
var _a;
|
|
183
183
|
const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
|
|
184
184
|
if (response == undefined) {
|
|
@@ -211,13 +211,31 @@ function webConnection(fileSessionKey, canPrint, canExport) {
|
|
|
211
211
|
application.webConnection(keyPort, methodName, params);
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
|
|
214
|
+
function getPersonalizedReports(requestBody) {
|
|
215
|
+
const serviceName = "DataExporterSPBean.getPersonalizedReports";
|
|
216
|
+
const payload = { serviceName, requestBody };
|
|
217
|
+
return new Promise((resolve, reject) => (ConfigStorage.DataFetcher.get()
|
|
218
|
+
.callServiceBroker(serviceName, core.ObjectUtils.objectToString(payload))
|
|
219
|
+
.then(result => resolve(getFormatResponse(result)))
|
|
220
|
+
.catch(error => reject(error))));
|
|
221
|
+
}
|
|
222
|
+
function getFormatResponse(result) {
|
|
223
|
+
var _a;
|
|
224
|
+
const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
|
|
225
|
+
if (response == undefined) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
return core.ObjectUtils.stringToObject(response);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const snkDataExporterCss = ".sc-snk-data-exporter-h{--snk-data-exporter--z-index:var(--most-visible, 3);display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter--overlap.sc-snk-data-exporter{z-index:var(--snk-data-exporter--z-index)}.snk-data-exporter__dropdown.sc-snk-data-exporter{display:none}.snk-data-exporter__dropdown--show.sc-snk-data-exporter{display:flex;flex-direction:column;position:fixed}.snk-data-exporter__dropdown.sc-snk-data-exporter>ez-dropdown.sc-snk-data-exporter{position:relative}";
|
|
215
232
|
|
|
216
233
|
const SnkDataExporter = class {
|
|
217
234
|
constructor(hostRef) {
|
|
218
235
|
index$1.registerInstance(this, hostRef);
|
|
219
|
-
this._items = [];
|
|
220
236
|
this._selectedNumber = 0;
|
|
237
|
+
this._customPrefix = "$custom$";
|
|
238
|
+
this._items = [];
|
|
221
239
|
this._showDropdown = false;
|
|
222
240
|
this._releasedToExport = [
|
|
223
241
|
index.DataExporterOption.EXPORT_TO_PDF,
|
|
@@ -266,11 +284,11 @@ const SnkDataExporter = class {
|
|
|
266
284
|
positionDropdown() {
|
|
267
285
|
var _a;
|
|
268
286
|
const bounding = (_a = this._ezButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
269
|
-
if (bounding == undefined || this.
|
|
287
|
+
if (bounding == undefined || this._dropdownParent == undefined) {
|
|
270
288
|
return;
|
|
271
289
|
}
|
|
272
|
-
this.
|
|
273
|
-
this.
|
|
290
|
+
this._dropdownParent.style.top = (bounding.y + bounding.height + 5) + "px";
|
|
291
|
+
this._dropdownParent.style.left = bounding.x + "px";
|
|
274
292
|
}
|
|
275
293
|
closeDropdown(evt) {
|
|
276
294
|
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
@@ -342,7 +360,13 @@ const SnkDataExporter = class {
|
|
|
342
360
|
});
|
|
343
361
|
}
|
|
344
362
|
async processExporter(evt) {
|
|
363
|
+
var _a;
|
|
345
364
|
const item = evt === null || evt === void 0 ? void 0 : evt.detail;
|
|
365
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.includes(this._customPrefix)) {
|
|
366
|
+
this.openPersonalizedReports(item.id);
|
|
367
|
+
this._showDropdown = false;
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
346
370
|
if (!this._releasedToExport.includes(item === null || item === void 0 ? void 0 : item.id)) {
|
|
347
371
|
return;
|
|
348
372
|
}
|
|
@@ -354,26 +378,70 @@ const SnkDataExporter = class {
|
|
|
354
378
|
}
|
|
355
379
|
this._showDropdown = false;
|
|
356
380
|
}
|
|
357
|
-
|
|
381
|
+
loadItems() {
|
|
358
382
|
const items = [];
|
|
359
383
|
this._releasedToExport
|
|
360
384
|
.forEach((option) => {
|
|
361
385
|
var _a;
|
|
362
386
|
(_a = this._itemBuilder) === null || _a === void 0 ? void 0 : _a.setExportOption(option, items);
|
|
363
387
|
});
|
|
364
|
-
|
|
388
|
+
this.loadPersonalizedItems(items);
|
|
365
389
|
}
|
|
366
|
-
|
|
390
|
+
async loadPersonalizedItems(items) {
|
|
367
391
|
var _a;
|
|
368
|
-
|
|
392
|
+
const recordID = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID();
|
|
393
|
+
if (recordID == undefined) {
|
|
394
|
+
this._items = items;
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const personalizedReports = await getPersonalizedReports({ recordID });
|
|
398
|
+
personalizedReports === null || personalizedReports === void 0 ? void 0 : personalizedReports.forEach((item) => {
|
|
399
|
+
items.push({
|
|
400
|
+
id: `${this._customPrefix}_${item.ID}`,
|
|
401
|
+
label: item.label,
|
|
402
|
+
group: this.getMessage("snkDataExporter.group.custom")
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
this._items = items;
|
|
406
|
+
}
|
|
407
|
+
openPersonalizedReports(option) {
|
|
408
|
+
var _a;
|
|
409
|
+
const pkObject = [];
|
|
410
|
+
const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
|
|
411
|
+
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
|
|
412
|
+
const dataFields = [];
|
|
413
|
+
const fields = [];
|
|
414
|
+
fields['fields'] = [];
|
|
415
|
+
// Se for o primeiro elemento, adiciona essa primeira PK
|
|
416
|
+
if (index === 0) {
|
|
417
|
+
pkObject[`PK_${name}`] = { type, value };
|
|
418
|
+
pkObject['pks'] = [];
|
|
419
|
+
}
|
|
420
|
+
dataFields.push({ nome: name, tipo: type, valor: value });
|
|
421
|
+
fields['fields'].push(dataFields);
|
|
422
|
+
pkObject['pks'].push(fields);
|
|
423
|
+
});
|
|
424
|
+
this._application.openApp(`${constants.REPORT_LAUNCHER_RESOURCE_ID}${appId}`, pkObject);
|
|
425
|
+
}
|
|
426
|
+
loadDropdown() {
|
|
427
|
+
var _a, _b;
|
|
428
|
+
this._selectedNumber = ((_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs()) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
369
429
|
this._itemBuilder = new ItemBuilder(this.getMessage.bind(this), this._selectedNumber);
|
|
370
|
-
this.
|
|
430
|
+
this.loadItems();
|
|
431
|
+
}
|
|
432
|
+
getElementID(sufix) {
|
|
433
|
+
return {
|
|
434
|
+
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(sufix)
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
canShowDropdown() {
|
|
438
|
+
var _a;
|
|
439
|
+
return this._showDropdown && ((_a = this._items) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
371
440
|
}
|
|
372
441
|
componentWillLoad() {
|
|
373
442
|
var _a;
|
|
374
443
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
375
444
|
(_a = this._application) === null || _a === void 0 ? void 0 : _a.getAppLabel().then(result => this._appLabel = result);
|
|
376
|
-
this.loadDropdown();
|
|
377
445
|
this.setEvents();
|
|
378
446
|
}
|
|
379
447
|
componentDidLoad() {
|
|
@@ -384,20 +452,28 @@ const SnkDataExporter = class {
|
|
|
384
452
|
this.positionDropdown();
|
|
385
453
|
}
|
|
386
454
|
componentWillUpdate() {
|
|
387
|
-
|
|
455
|
+
var _a;
|
|
456
|
+
if (this._showDropdown && !((_a = this._items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
388
457
|
this.loadDropdown();
|
|
389
458
|
}
|
|
390
459
|
}
|
|
391
460
|
componentDidUpdate() {
|
|
461
|
+
var _a;
|
|
392
462
|
if (this._showDropdown) {
|
|
393
463
|
this.positionDropdown();
|
|
394
464
|
}
|
|
465
|
+
else if (((_a = this._items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
466
|
+
this._items = [];
|
|
467
|
+
}
|
|
395
468
|
}
|
|
396
469
|
render() {
|
|
397
470
|
return (index$1.h(index$1.Host, null, index$1.h("div", { class: `snk-data-exporter
|
|
398
|
-
${this.
|
|
399
|
-
` }, index$1.h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", title: this.getMessage("snkDataExporter.group.export.title"), onClick: () => this.controlDropdown() },
|
|
400
|
-
|
|
471
|
+
${this.canShowDropdown() ? " snk-data-exporter--overlap" : ""}
|
|
472
|
+
` }, index$1.h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", title: this.getMessage("snkDataExporter.group.export.title"), onClick: () => this.controlDropdown() }, this.getElementID("button"))), index$1.h("div", Object.assign({ ref: (ref) => this._dropdownParent = ref, class: `snk-data-exporter__dropdown
|
|
473
|
+
${this.canShowDropdown() ? "snk-data-exporter__dropdown--show" : ""}
|
|
474
|
+
` }, this.getElementID("dropdown")), this.canShowDropdown() &&
|
|
475
|
+
index$1.h("ez-dropdown", Object.assign({ items: this._items, onEzClick: (evt) => this.processExporter(evt) }, this.getElementID("dropdown"))))), this.canShowDropdown() &&
|
|
476
|
+
index$1.h("div", Object.assign({ class: "ez-scrim ez-scrim--light" }, this.getElementID("ezScrim"))), index$1.h("snk-exporter-email-sender", Object.assign({ ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) }, this.getElementID("snkExporterEmailSender")))));
|
|
401
477
|
}
|
|
402
478
|
get _element() { return index$1.getElement(this); }
|
|
403
479
|
};
|
|
@@ -101,6 +101,29 @@ const SnkDataUnit = class {
|
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Método que retorna a lista de IDs dos registros selecionados.
|
|
106
|
+
* @returns Retorna a lista de IDs dos registros selecionados.
|
|
107
|
+
*/
|
|
108
|
+
async getSelectedRecordsIDsInfo() {
|
|
109
|
+
var _a;
|
|
110
|
+
const selectedRecordsIDsInfo = [];
|
|
111
|
+
const selectedRecords = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecords();
|
|
112
|
+
if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) > 0) {
|
|
113
|
+
selectedRecords.forEach(({ __record__id__ }) => {
|
|
114
|
+
const revertBase64ToObject = JSON.parse(window.atob(__record__id__));
|
|
115
|
+
Object.entries(revertBase64ToObject).forEach(([name, value]) => {
|
|
116
|
+
var _a;
|
|
117
|
+
const metadataField = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(name);
|
|
118
|
+
if (metadataField == undefined) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
selectedRecordsIDsInfo.push(Object.assign({ name, type: metadataField.dataType }, value));
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return selectedRecordsIDsInfo;
|
|
126
|
+
}
|
|
104
127
|
async interceptAction(action) {
|
|
105
128
|
return new Promise(resolve => {
|
|
106
129
|
switch (action.type) {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-2cd6f753.js');
|
|
|
6
6
|
const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
const constants = require('./constants-
|
|
9
|
+
const constants = require('./constants-8f3504ec.js');
|
|
10
10
|
const ConfigStorage = require('./ConfigStorage-8b5e3261.js');
|
|
11
11
|
require('./_commonjsHelpers-537d719a.js');
|
|
12
12
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-2cd6f753.js');
|
|
6
6
|
const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
|
-
const constants = require('./constants-
|
|
8
|
+
const constants = require('./constants-8f3504ec.js');
|
|
9
9
|
require('./_commonjsHelpers-537d719a.js');
|
|
10
10
|
|
|
11
11
|
const snkTabConfigCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}.sc-snk-tab-config-h{--snk-tab-config--backward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--snk-tab-config--forward-icon:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--snk-tab-config__lower-bar--background-color:var(--color--disable-primary, #e5eaf0);--snk-tab-config__lower-bar--border:2px solid var(--color--disable-primary, #e5eaf0);--snk-tab-config__tab--color:var(--text--primary, #626e82);--snk-tab-config__tab--font-family:var(--font-pattern, \"Roboto\");--snk-tab-config__tab--font-size:var(--title--small, 14px);--snk-tab-config__tab--padding:var(--space--small, 6px) var(--space--medium, 12px);--snk-tab-config__tab-is-active--color:var(--color--primary, #008561);--snk-tab-config__tab-hover--color:var(--color--secondary, #383c45);--snk-tab-config__tab-is-focused--border:1px dashed var(--color--primary, #008561);--snk-tab-config__tab-label--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--snk-tab-config__tab-label--margin-bottom:var(--space--extra-small, 3px);--snk-tab-config__new-button-icon--color:var(--color--secondary-700, #1C1D22);--snk-tab-config__forward-button--background-color:var(--text--primary, #626e82);--snk-tab-config__forward-button-hover--background-color:var(--color--primary, #008561);--snk-tab-config__left-icon--padding-right:var(--space--small, 6px);--snk-tab-config__left-icon--color:var(--text--disable, #AFB6C0);--snk-tab-config__tab-label-disabled--color:var(--text--disable, #AFB6C0);--snk-tab-config__slot--margin-left:var(--space--small, 6px);display:flex;position:relative;width:100%;overflow:hidden}.tab-config__scroll.sc-snk-tab-config{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.tab-config__lower-bar.sc-snk-tab-config{position:absolute;left:0%;right:0%;top:91%;bottom:0%;border-radius:2px;background-color:var(--snk-tab-config__lower-bar--background-color);border:var(--snk-tab-config__lower-bar--border)}.tab-config__tab.sc-snk-tab-config{display:flex;border:none;background-color:unset;cursor:pointer;align-items:center;justify-content:center;min-width:fit-content;color:var(--snk-tab-config__tab--color);font-family:var(--snk-tab-config__tab--font-family);font-size:var(--snk-tab-config__tab--font-size);padding:var(--snk-tab-config__tab--padding)}.tab-config__tab.sc-snk-tab-config:focus,.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{outline:none}.tab-config__tab--is-active.sc-snk-tab-config{position:relative;color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-active.sc-snk-tab-config::after{content:\"\";position:absolute;width:100%;height:100%;clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out;background-color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-focused.sc-snk-tab-config{border:var(--snk-tab-config__tab-is-focused--border)}.tab-config__tab-label.sc-snk-tab-config{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--snk-tab-config__tab-label--text-shadow);margin-bottom:var(--snk-tab-config__tab-label--margin-bottom)}.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__new-button-icon--color)}.tab-config__backward-button.sc-snk-tab-config{left:0px;box-shadow:10px 10px 5px 5px white;background:white}.tab-config__forward-button.sc-snk-tab-config{box-shadow:10px 10px 5px 20px white;background:white}.tab-config__forward-button.sc-snk-tab-config::after,.tab-config__backward-button.sc-snk-tab-config::after{content:'';display:flex;width:10px;height:16px;background-color:var(--snk-tab-config__forward-button--background-color)}.tab-config__forward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--forward-icon);mask-image:var(--snk-tab-config--forward-icon)}.tab-config__backward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--backward-icon);mask-image:var(--snk-tab-config--backward-icon)}.tab-config__forward-button.sc-snk-tab-config:hover::after,.tab-config__backward-button.sc-snk-tab-config:hover::after{background-color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__new-button.sc-snk-tab-config:hover ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__hidden.sc-snk-tab-config{display:none}.tab-config__scroll.sc-snk-tab-config::-webkit-scrollbar{display:none}.tab-config__left-icon.sc-snk-tab-config{padding-right:var(--snk-tab-config__left-icon--padding-right);--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__left-icon--eye-off.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__right-icon.sc-snk-tab-config{visibility:hidden;padding-left:var(--snk-tab-config__left-icon--padding-right)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{visibility:visible}.tab-config__tab--is-active.sc-snk-tab-config .tab-config__right-icon.sc-snk-tab-config{visibility:visible;--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__actions-button.sc-snk-tab-config{--ez-actions-button__btn-action--min-width:100px;visibility:hidden;opacity:0;transition:visibility 1s linear, opacity 0.3s linear}.tab-config__tab.sc-snk-tab-config:hover .tab-config__actions-button.sc-snk-tab-config{visibility:visible;opacity:1;transition:visibility 0.2s linear, opacity 0.10s linear}[data-draggable-element].sc-snk-tab-config{cursor:grab}.tab-config__tab-label-disabled.sc-snk-tab-config{color:var(--snk-tab-config__tab-label-disabled--color)}.tab-config__slot.sc-snk-tab-config{margin-left:var(--snk-tab-config__slot--margin-left)}";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -20,7 +20,19 @@
|
|
|
20
20
|
z-index: var(--snk-data-exporter--z-index);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.snk-data-exporter__dropdown
|
|
23
|
+
.snk-data-exporter__dropdown {
|
|
24
24
|
/*private*/
|
|
25
25
|
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.snk-data-exporter__dropdown--show {
|
|
29
|
+
/*private*/
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
position: fixed;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.snk-data-exporter__dropdown > ez-dropdown {
|
|
36
|
+
/*private*/
|
|
37
|
+
position: relative;
|
|
26
38
|
}
|
|
@@ -3,12 +3,15 @@ import { h, Host } from '@stencil/core';
|
|
|
3
3
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { ItemBuilder } from './structure/ItemBuilder';
|
|
5
5
|
import { DataExporterFormat, DataExporterOption, DataExporterType } from '../../lib/@types';
|
|
6
|
+
import { REPORT_LAUNCHER_RESOURCE_ID } from '../../lib/utils/constants';
|
|
6
7
|
import fetchDataExporter from "../../lib/http/data-fetcher/fetchers/fetchDataExporter";
|
|
7
8
|
import fileViewer from "../../lib/utils/fileViewer";
|
|
9
|
+
import getPersonalizedReports from '../../lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher';
|
|
8
10
|
export class SnkDataExporter {
|
|
9
11
|
constructor() {
|
|
10
|
-
this._items = [];
|
|
11
12
|
this._selectedNumber = 0;
|
|
13
|
+
this._customPrefix = "$custom$";
|
|
14
|
+
this._items = [];
|
|
12
15
|
this._showDropdown = false;
|
|
13
16
|
this._releasedToExport = [
|
|
14
17
|
DataExporterOption.EXPORT_TO_PDF,
|
|
@@ -57,11 +60,11 @@ export class SnkDataExporter {
|
|
|
57
60
|
positionDropdown() {
|
|
58
61
|
var _a;
|
|
59
62
|
const bounding = (_a = this._ezButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
60
|
-
if (bounding == undefined || this.
|
|
63
|
+
if (bounding == undefined || this._dropdownParent == undefined) {
|
|
61
64
|
return;
|
|
62
65
|
}
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
66
|
+
this._dropdownParent.style.top = (bounding.y + bounding.height + 5) + "px";
|
|
67
|
+
this._dropdownParent.style.left = bounding.x + "px";
|
|
65
68
|
}
|
|
66
69
|
closeDropdown(evt) {
|
|
67
70
|
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
@@ -133,7 +136,13 @@ export class SnkDataExporter {
|
|
|
133
136
|
});
|
|
134
137
|
}
|
|
135
138
|
async processExporter(evt) {
|
|
139
|
+
var _a;
|
|
136
140
|
const item = evt === null || evt === void 0 ? void 0 : evt.detail;
|
|
141
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.includes(this._customPrefix)) {
|
|
142
|
+
this.openPersonalizedReports(item.id);
|
|
143
|
+
this._showDropdown = false;
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
137
146
|
if (!this._releasedToExport.includes(item === null || item === void 0 ? void 0 : item.id)) {
|
|
138
147
|
return;
|
|
139
148
|
}
|
|
@@ -145,26 +154,70 @@ export class SnkDataExporter {
|
|
|
145
154
|
}
|
|
146
155
|
this._showDropdown = false;
|
|
147
156
|
}
|
|
148
|
-
|
|
157
|
+
loadItems() {
|
|
149
158
|
const items = [];
|
|
150
159
|
this._releasedToExport
|
|
151
160
|
.forEach((option) => {
|
|
152
161
|
var _a;
|
|
153
162
|
(_a = this._itemBuilder) === null || _a === void 0 ? void 0 : _a.setExportOption(option, items);
|
|
154
163
|
});
|
|
155
|
-
|
|
164
|
+
this.loadPersonalizedItems(items);
|
|
156
165
|
}
|
|
157
|
-
|
|
166
|
+
async loadPersonalizedItems(items) {
|
|
167
|
+
var _a;
|
|
168
|
+
const recordID = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID();
|
|
169
|
+
if (recordID == undefined) {
|
|
170
|
+
this._items = items;
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const personalizedReports = await getPersonalizedReports({ recordID });
|
|
174
|
+
personalizedReports === null || personalizedReports === void 0 ? void 0 : personalizedReports.forEach((item) => {
|
|
175
|
+
items.push({
|
|
176
|
+
id: `${this._customPrefix}_${item.ID}`,
|
|
177
|
+
label: item.label,
|
|
178
|
+
group: this.getMessage("snkDataExporter.group.custom")
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
this._items = items;
|
|
182
|
+
}
|
|
183
|
+
openPersonalizedReports(option) {
|
|
158
184
|
var _a;
|
|
159
|
-
|
|
185
|
+
const pkObject = [];
|
|
186
|
+
const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
|
|
187
|
+
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
|
|
188
|
+
const dataFields = [];
|
|
189
|
+
const fields = [];
|
|
190
|
+
fields['fields'] = [];
|
|
191
|
+
// Se for o primeiro elemento, adiciona essa primeira PK
|
|
192
|
+
if (index === 0) {
|
|
193
|
+
pkObject[`PK_${name}`] = { type, value };
|
|
194
|
+
pkObject['pks'] = [];
|
|
195
|
+
}
|
|
196
|
+
dataFields.push({ nome: name, tipo: type, valor: value });
|
|
197
|
+
fields['fields'].push(dataFields);
|
|
198
|
+
pkObject['pks'].push(fields);
|
|
199
|
+
});
|
|
200
|
+
this._application.openApp(`${REPORT_LAUNCHER_RESOURCE_ID}${appId}`, pkObject);
|
|
201
|
+
}
|
|
202
|
+
loadDropdown() {
|
|
203
|
+
var _a, _b;
|
|
204
|
+
this._selectedNumber = ((_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs()) === null || _b === void 0 ? void 0 : _b.length) || 0;
|
|
160
205
|
this._itemBuilder = new ItemBuilder(this.getMessage.bind(this), this._selectedNumber);
|
|
161
|
-
this.
|
|
206
|
+
this.loadItems();
|
|
207
|
+
}
|
|
208
|
+
getElementID(sufix) {
|
|
209
|
+
return {
|
|
210
|
+
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
canShowDropdown() {
|
|
214
|
+
var _a;
|
|
215
|
+
return this._showDropdown && ((_a = this._items) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
162
216
|
}
|
|
163
217
|
componentWillLoad() {
|
|
164
218
|
var _a;
|
|
165
219
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
166
220
|
(_a = this._application) === null || _a === void 0 ? void 0 : _a.getAppLabel().then(result => this._appLabel = result);
|
|
167
|
-
this.loadDropdown();
|
|
168
221
|
this.setEvents();
|
|
169
222
|
}
|
|
170
223
|
componentDidLoad() {
|
|
@@ -175,20 +228,28 @@ export class SnkDataExporter {
|
|
|
175
228
|
this.positionDropdown();
|
|
176
229
|
}
|
|
177
230
|
componentWillUpdate() {
|
|
178
|
-
|
|
231
|
+
var _a;
|
|
232
|
+
if (this._showDropdown && !((_a = this._items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
179
233
|
this.loadDropdown();
|
|
180
234
|
}
|
|
181
235
|
}
|
|
182
236
|
componentDidUpdate() {
|
|
237
|
+
var _a;
|
|
183
238
|
if (this._showDropdown) {
|
|
184
239
|
this.positionDropdown();
|
|
185
240
|
}
|
|
241
|
+
else if (((_a = this._items) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
242
|
+
this._items = [];
|
|
243
|
+
}
|
|
186
244
|
}
|
|
187
245
|
render() {
|
|
188
246
|
return (h(Host, null, h("div", { class: `snk-data-exporter
|
|
189
|
-
${this.
|
|
190
|
-
` }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", title: this.getMessage("snkDataExporter.group.export.title"), onClick: () => this.controlDropdown() },
|
|
191
|
-
|
|
247
|
+
${this.canShowDropdown() ? " snk-data-exporter--overlap" : ""}
|
|
248
|
+
` }, h("ez-button", Object.assign({ ref: (ref) => this._ezButton = ref, iconName: "file-download", size: "small", mode: "icon", title: this.getMessage("snkDataExporter.group.export.title"), onClick: () => this.controlDropdown() }, this.getElementID("button"))), h("div", Object.assign({ ref: (ref) => this._dropdownParent = ref, class: `snk-data-exporter__dropdown
|
|
249
|
+
${this.canShowDropdown() ? "snk-data-exporter__dropdown--show" : ""}
|
|
250
|
+
` }, this.getElementID("dropdown")), this.canShowDropdown() &&
|
|
251
|
+
h("ez-dropdown", Object.assign({ items: this._items, onEzClick: (evt) => this.processExporter(evt) }, this.getElementID("dropdown"))))), this.canShowDropdown() &&
|
|
252
|
+
h("div", Object.assign({ class: "ez-scrim ez-scrim--light" }, this.getElementID("ezScrim"))), h("snk-exporter-email-sender", Object.assign({ ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) }, this.getElementID("snkExporterEmailSender")))));
|
|
192
253
|
}
|
|
193
254
|
static get is() { return "snk-data-exporter"; }
|
|
194
255
|
static get encapsulation() { return "scoped"; }
|
|
@@ -229,6 +290,7 @@ export class SnkDataExporter {
|
|
|
229
290
|
}
|
|
230
291
|
static get states() {
|
|
231
292
|
return {
|
|
293
|
+
"_items": {},
|
|
232
294
|
"_showDropdown": {},
|
|
233
295
|
"_releasedToExport": {}
|
|
234
296
|
};
|