@sankhyalabs/sankhyablocks 2.4.8 → 2.4.9
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-61f00e7f.js → SnkMessageBuilder-370e23ae.js} +24 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator_3.cjs.entry.js +44 -6
- package/dist/cjs/snk-crud.cjs.entry.js +6 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/{snk-filter-bar_7.cjs.entry.js → snk-exporter-email-sender_8.cjs.entry.js} +120 -9
- package/dist/cjs/snk-form.cjs.entry.js +1 -1
- package/dist/cjs/{taskbar-elements-b995b84d.js → taskbar-elements-3807c809.js} +3 -0
- package/dist/cjs/{taskbar-processor-6bd0d35c.js → taskbar-processor-6f3d2a75.js} +9 -7
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-crud/snk-crud.js +23 -1
- package/dist/collection/components/snk-data-exporter/data/attachment.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/email.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/export-config.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/export-result.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/report.js +1 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/email-info-step.js +6 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +21 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +141 -0
- package/dist/collection/components/snk-grid/snk-grid.js +71 -6
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +25 -8
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +9 -7
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +2 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +3 -1
- package/dist/collection/lib/message/resources/snk-exporter.msg.js +21 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/components/SnkMessageBuilder.js +24 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-crud.js +16 -5
- package/dist/components/snk-exporter-email-sender.d.ts +11 -0
- package/dist/components/snk-exporter-email-sender.js +6 -0
- package/dist/components/snk-exporter-email-sender2.js +136 -0
- package/dist/components/snk-grid-config2.js +6 -8
- package/dist/components/snk-grid2.js +53 -9
- package/dist/components/snk-taskbar2.js +5 -1
- package/dist/components/taskbar-processor.js +9 -7
- package/dist/esm/{SnkMessageBuilder-f5ef87df.js → SnkMessageBuilder-7d583c9a.js} +24 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-configurator_3.entry.js +44 -6
- package/dist/esm/snk-crud.entry.js +6 -2
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/{snk-filter-bar_7.entry.js → snk-exporter-email-sender_8.entry.js} +122 -12
- package/dist/esm/snk-form.entry.js +1 -1
- package/dist/esm/{taskbar-elements-a0a8c3ac.js → taskbar-elements-b2bbe275.js} +3 -0
- package/dist/esm/{taskbar-processor-aa6772c9.js → taskbar-processor-c2a99aba.js} +9 -7
- package/dist/sankhyablocks/{p-a72a0a5d.entry.js → p-1b7f87cf.entry.js} +1 -1
- package/dist/sankhyablocks/p-37f489d3.entry.js +1 -0
- package/dist/sankhyablocks/p-5a3e0eb6.js +1 -0
- package/dist/sankhyablocks/{p-eb94df0b.entry.js → p-70e52fee.entry.js} +1 -1
- package/dist/sankhyablocks/p-c118ef2a.entry.js +1 -0
- package/dist/sankhyablocks/p-dbaad88c.js +1 -0
- package/dist/sankhyablocks/p-df53643b.entry.js +1 -0
- package/dist/sankhyablocks/p-e7f772ed.js +1 -0
- package/dist/sankhyablocks/{p-71997e4c.entry.js → p-fb96840c.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/data/attachment.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/data/email.d.ts +7 -0
- package/dist/types/components/snk-data-exporter/data/export-config.d.ts +9 -0
- package/dist/types/components/snk-data-exporter/data/export-result.d.ts +8 -0
- package/dist/types/components/snk-data-exporter/data/report.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/exporter-email-sender/email-info-step.d.ts +9 -0
- package/dist/types/components/snk-data-exporter/exporter-email-sender/options-step.d.ts +9 -0
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +6 -3
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +1 -0
- package/dist/types/components.d.ts +43 -0
- package/dist/types/lib/message/resources/snk-exporter.msg.d.ts +2 -0
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/sankhyablocks/p-03f0a380.entry.js +0 -1
- package/dist/sankhyablocks/p-03f9c407.js +0 -1
- package/dist/sankhyablocks/p-4cbc4ae3.js +0 -1
- package/dist/sankhyablocks/p-877bd6cf.js +0 -1
- package/dist/sankhyablocks/p-e6e0efe7.entry.js +0 -1
- package/dist/sankhyablocks/p-f1de5d1f.entry.js +0 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +0 -70
|
@@ -91,6 +91,7 @@ const snkTaskbarMessages = {
|
|
|
91
91
|
titleGridMode: "Modo Grade",
|
|
92
92
|
titleFormMode: "Modo Formulário",
|
|
93
93
|
titleConfigurator: "Configurações",
|
|
94
|
+
titleExportar: "Exportar",
|
|
94
95
|
forbidden: "Permissão não liberada"
|
|
95
96
|
};
|
|
96
97
|
|
|
@@ -98,6 +99,27 @@ const crudUtilsMessages = {
|
|
|
98
99
|
errorArray: "CrudUtils.find deve receber um array de fields, ou uma lista separada por virgula.",
|
|
99
100
|
};
|
|
100
101
|
|
|
102
|
+
const snkExporterMessages = {
|
|
103
|
+
emailSenderTitle: "Enviar por email",
|
|
104
|
+
emailSenderBackButton: "Voltar",
|
|
105
|
+
emailSenderNextButton: "Avançar",
|
|
106
|
+
emailSenderCancelButton: "Cancelar",
|
|
107
|
+
emailSenderSendButton: "Enviar",
|
|
108
|
+
emailSenderOptStep_subtitle: "Primeiro, escolha o formato do arquivo",
|
|
109
|
+
emailSenderOptStep_lblFormat: "Formato:",
|
|
110
|
+
emailSenderOptStep_formatPDF: "PDF (.pdf)",
|
|
111
|
+
emailSenderOptStep_formatXLSX: "Planilha (.xlsx)",
|
|
112
|
+
emailSenderOptStep_export: "Exportar:",
|
|
113
|
+
emailSenderOptStep_allData: "Toda a grade",
|
|
114
|
+
emailSenderOptStep_currentPage: "Somente a página atual",
|
|
115
|
+
emailSenderOptStep_someRecords: "{{SELECTION_COUNT}} linhas selecionadas",
|
|
116
|
+
emailSenderOptStep_oneRecord: "Somente a linha selecionada",
|
|
117
|
+
emailSenderInfoStep_subtitle: "Informações de email",
|
|
118
|
+
emailSenderInfoStep_sendTo: "Enviar para",
|
|
119
|
+
emailSenderInfoStep_subject: "Assunto",
|
|
120
|
+
emailSenderInfoStep_message: "Mensagem"
|
|
121
|
+
};
|
|
122
|
+
|
|
101
123
|
const snkFormMessages = {
|
|
102
124
|
title: {
|
|
103
125
|
clone: "Duplicar registro",
|
|
@@ -219,7 +241,8 @@ class SnkMessageBuilder {
|
|
|
219
241
|
snkTabConfig: snkTabConfigMessages,
|
|
220
242
|
crudUtils: crudUtilsMessages,
|
|
221
243
|
snkGrid: snkGridMessages,
|
|
222
|
-
snkGridConfig: snkGridConfigMessages
|
|
244
|
+
snkGridConfig: snkGridConfigMessages,
|
|
245
|
+
snkExporter: snkExporterMessages
|
|
223
246
|
};
|
|
224
247
|
this._currentOperation = exports.OperationMap.CLEAN;
|
|
225
248
|
this.loadAppMessages().then((msgs) => {
|
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"],"_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-
|
|
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"],"enableDataExporter":[4,"enable-data-exporter"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]},[[0,"actionClick","actionClickHandler"]]],[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_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]}],[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"]]],[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"]}],[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form.cjs",[[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.cjs",[[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.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],"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);
|
|
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"],"_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-
|
|
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"],"enableDataExporter":[4,"enable-data-exporter"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]},[[0,"actionClick","actionClickHandler"]]],[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_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]}],[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"]]],[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"]}],[6,"snk-taskbar",{"configName":[1,"config-name"],"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form.cjs",[[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.cjs",[[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.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],"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);
|
|
19
19
|
});
|
|
@@ -6,7 +6,7 @@ const index = require('./index-20e8b68a.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const ConfigStorage = require('./ConfigStorage-c112de1d.js');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
9
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-370e23ae.js');
|
|
10
10
|
require('./_commonjsHelpers-537d719a.js');
|
|
11
11
|
|
|
12
12
|
class SnkErrorHandler {
|
|
@@ -6,8 +6,9 @@ const index = require('./index-20e8b68a.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const constants = require('./constants-a47a5190.js');
|
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
9
|
-
const taskbarProcessor = require('./taskbar-processor-
|
|
9
|
+
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
10
10
|
const ConfigStorage = require('./ConfigStorage-c112de1d.js');
|
|
11
|
+
const taskbarElements = require('./taskbar-elements-3807c809.js');
|
|
11
12
|
require('./_commonjsHelpers-537d719a.js');
|
|
12
13
|
|
|
13
14
|
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)}";
|
|
@@ -166,10 +167,14 @@ const SnkGrid = class {
|
|
|
166
167
|
"snkGridTopTaskbar": ["FORM_MODE", "CONFIGURATOR", "INSERT"]
|
|
167
168
|
});
|
|
168
169
|
this._headerTaskbarProcessor = new taskbarProcessor.TaskbarProcessor({
|
|
169
|
-
"snkGridHeaderTaskbar.unselected": ["REFRESH"],
|
|
170
|
-
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
|
170
|
+
"snkGridHeaderTaskbar.unselected": ["REFRESH", "EXPORT"],
|
|
171
|
+
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "EXPORT"]
|
|
171
172
|
});
|
|
172
173
|
this._popUpGridConfig = false;
|
|
174
|
+
/**
|
|
175
|
+
* Determina se haverá exportação de dados
|
|
176
|
+
*/
|
|
177
|
+
this.enableDataExporter = false;
|
|
173
178
|
}
|
|
174
179
|
/**
|
|
175
180
|
* Exibe a janela de configurações da grade.
|
|
@@ -195,6 +200,37 @@ const SnkGrid = class {
|
|
|
195
200
|
async setConfig(config) {
|
|
196
201
|
this.setGridConfig(config);
|
|
197
202
|
}
|
|
203
|
+
actionClickHandler(event) {
|
|
204
|
+
if (event.detail === taskbarElements.TaskbarElement.EXPORT) {
|
|
205
|
+
// TODO: Quando o exportador de grades for implementado, essa ação
|
|
206
|
+
// vai fazer mostrar as opções disponíveis. Enviar por email será
|
|
207
|
+
// apenas mais uma
|
|
208
|
+
const selectedRows = this._dataState.selectedRecords.length;
|
|
209
|
+
const config = {
|
|
210
|
+
format: "pdf",
|
|
211
|
+
type: selectedRows > 0 ? "selection" : "all",
|
|
212
|
+
selectedRows,
|
|
213
|
+
email: {
|
|
214
|
+
attachments: [
|
|
215
|
+
{ name: "Movimentação Financeira.pdf", size: 1024 * 231 }
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
this._snkEmailSender.open(config)
|
|
220
|
+
.then((result) => {
|
|
221
|
+
this._application.message("resultado", JSON.stringify(result));
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
227
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
228
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
229
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-grid.msg.ts"
|
|
230
|
+
*/
|
|
231
|
+
getMessage(key, params) {
|
|
232
|
+
return this._application.messagesBuilder.getMessage(key, params);
|
|
233
|
+
}
|
|
198
234
|
openGridConfig() {
|
|
199
235
|
this._grid.getColumnsState()
|
|
200
236
|
.then((gridColumns) => {
|
|
@@ -230,6 +266,7 @@ const SnkGrid = class {
|
|
|
230
266
|
});
|
|
231
267
|
}
|
|
232
268
|
componentWillLoad() {
|
|
269
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
233
270
|
let parent = this._element.parentElement;
|
|
234
271
|
while (parent) {
|
|
235
272
|
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
|
@@ -254,9 +291,10 @@ const SnkGrid = class {
|
|
|
254
291
|
this.loadConfig();
|
|
255
292
|
}
|
|
256
293
|
componentWillRender() {
|
|
294
|
+
const invisibleButtons = this.enableDataExporter ? [] : ["EXPORT"];
|
|
257
295
|
const headerTaskbarId = this._dataState && this._dataState.selectedRecords.length > 0 ? "snkGridHeaderTaskbar.selected" : "snkGridHeaderTaskbar.unselected";
|
|
258
|
-
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState);
|
|
259
|
-
this._topTaskbarProcessor.process("snkGridTopTaskbar", this.taskbarManager, this._dataState);
|
|
296
|
+
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
297
|
+
this._topTaskbarProcessor.process("snkGridTopTaskbar", this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
|
260
298
|
}
|
|
261
299
|
addElementID() {
|
|
262
300
|
const dataInfo = { dataUnit: this._dataUnit };
|
|
@@ -266,7 +304,7 @@ const SnkGrid = class {
|
|
|
266
304
|
if (!this._dataUnit) {
|
|
267
305
|
return undefined;
|
|
268
306
|
}
|
|
269
|
-
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), index.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 }, index.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 })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
307
|
+
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-padding-bottom--medium ez-margin-bottom--medium" }, index.h("snk-filter-bar", { dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: "INSERT" })), index.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 }, index.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 })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("snk-exporter-email-sender", { ref: ref => this._snkEmailSender = ref, getMessage: (key, params) => this.getMessage(key, params) }), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, onConfigChange: (evt) => this.changeConfig(evt.detail), onConfigCancel: () => this.closeGridConfig() }))));
|
|
270
308
|
}
|
|
271
309
|
get _element() { return index.getElement(this); }
|
|
272
310
|
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const constants = require('./constants-a47a5190.js');
|
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
|
8
|
+
const taskbarElements = require('./taskbar-elements-3807c809.js');
|
|
9
9
|
|
|
10
10
|
const snkCrudCss = ".sc-snk-crud-h{display:flex;flex-direction:column;height:100%;width:100%}";
|
|
11
11
|
|
|
@@ -20,6 +20,10 @@ const SnkCrud = class {
|
|
|
20
20
|
* Determina se pode haver mais de uma linha selecionada na grade.
|
|
21
21
|
*/
|
|
22
22
|
this.multipleSelection = true;
|
|
23
|
+
/**
|
|
24
|
+
* Determina se haverá exportação de dados
|
|
25
|
+
*/
|
|
26
|
+
this.enableDataExporter = false;
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* Usado para alternar a visão entre GRID e FORM externamente.
|
|
@@ -98,7 +102,7 @@ const SnkCrud = class {
|
|
|
98
102
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
99
103
|
}
|
|
100
104
|
render() {
|
|
101
|
-
return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail) }, index.h("slot", { name: "SnkFormTaskBar" }))), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
|
105
|
+
return (index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, enableDataExporter: this.enableDataExporter }, index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail) }, index.h("slot", { name: "SnkFormTaskBar" }))), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
|
102
106
|
}
|
|
103
107
|
get _element() { return index.getElement(this); }
|
|
104
108
|
};
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
8
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-370e23ae.js');
|
|
9
9
|
|
|
10
10
|
const snkDataUnitCss = ".sc-snk-data-unit-h{display:flex;flex-direction:column;height:100%}";
|
|
11
11
|
|
|
@@ -11,9 +11,121 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
11
11
|
const ConfigStorage = require('./ConfigStorage-c112de1d.js');
|
|
12
12
|
const constants = require('./constants-a47a5190.js');
|
|
13
13
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
|
14
|
-
const taskbarElements = require('./taskbar-elements-
|
|
14
|
+
const taskbarElements = require('./taskbar-elements-3807c809.js');
|
|
15
15
|
require('./_commonjsHelpers-537d719a.js');
|
|
16
16
|
|
|
17
|
+
const EmailInfoStep = ({ getMessage, changeInfo, data }) => {
|
|
18
|
+
return index.h("div", null,
|
|
19
|
+
index.h("ez-text-input", Object.assign({ label: `${getMessage("snkExporter.emailSenderInfoStep_sendTo")} (obrigatório) *`, required: true, value: data === null || data === void 0 ? void 0 : data.to, onEzChange: evt => changeInfo("to", evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("sendTo")}` })),
|
|
20
|
+
index.h("ez-text-input", Object.assign({ label: `${getMessage("snkExporter.emailSenderInfoStep_subject")} (obrigatório) *`, required: true, value: data === null || data === void 0 ? void 0 : data.subject, onEzChange: evt => changeInfo("subject", evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("subject")}` })),
|
|
21
|
+
index.h("ez-text-area", Object.assign({ label: getMessage("snkExporter.emailSenderInfoStep_message"), value: data === null || data === void 0 ? void 0 : data.message, onEzChange: evt => changeInfo("message", evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("message")}` })),
|
|
22
|
+
((data === null || data === void 0 ? void 0 : data.attachments) || [])
|
|
23
|
+
.map((file, index$1) => index.h("ez-file-item", Object.assign({ class: "ez-padding-bottom--large", fileName: file.name, fileSize: file.size, canRemove: false }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("fileItem_") + (index$1 + 1)}` }))));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const OptionsStep = ({ getMessage, changeInfo, data }) => {
|
|
27
|
+
const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
|
|
28
|
+
const formatOptions = [
|
|
29
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
|
|
30
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_formatXLSX"), value: "xlsx" }
|
|
31
|
+
];
|
|
32
|
+
const typeOptions = [
|
|
33
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
|
|
34
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_currentPage"), value: "page" },
|
|
35
|
+
];
|
|
36
|
+
if (selectionCount > 0) {
|
|
37
|
+
const label = getMessage(selectionCount > 1 ? "snkExporter.emailSenderOptStep_someRecords" : "snkExporter.emailSenderOptStep_oneRecord", { SELECTION_COUNT: selectionCount });
|
|
38
|
+
typeOptions.push({
|
|
39
|
+
label,
|
|
40
|
+
value: "selection"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return index.h("div", null,
|
|
44
|
+
index.h("ez-radio-button", Object.assign({ class: "ez-margin-bottom--large" }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("formato")}` }, { label: getMessage("snkExporter.emailSenderOptStep_lblFormat"), direction: "horizontal", value: (data === null || data === void 0 ? void 0 : data.format) || "pdf", onEzChange: evt => changeInfo("format", evt.detail), options: formatOptions })),
|
|
45
|
+
index.h("ez-radio-button", Object.assign({ class: "ez-margin-bottom--large" }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("type")}` }, { label: getMessage("snkExporter.emailSenderOptStep_export"), value: (data === null || data === void 0 ? void 0 : data.type) || "all", onEzChange: evt => changeInfo("type", evt.detail), options: typeOptions })));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const SnkExporterEmailSender = class {
|
|
49
|
+
constructor(hostRef) {
|
|
50
|
+
index.registerInstance(this, hostRef);
|
|
51
|
+
this._stepInfo = [
|
|
52
|
+
{
|
|
53
|
+
subTitle: "snkExporter.emailSenderOptStep_subtitle",
|
|
54
|
+
firstButton: "snkExporter.emailSenderCancelButton",
|
|
55
|
+
secondButton: "snkExporter.emailSenderNextButton",
|
|
56
|
+
firstButtonAction: () => this.close(),
|
|
57
|
+
secondButtonAction: () => this.changeStep(1)
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
subTitle: "snkExporter.emailSenderInfoStep_subtitle",
|
|
61
|
+
firstButton: "snkExporter.emailSenderBackButton",
|
|
62
|
+
secondButton: "snkExporter.emailSenderSendButton",
|
|
63
|
+
firstButtonAction: () => this.changeStep(0),
|
|
64
|
+
secondButtonAction: () => this.send(),
|
|
65
|
+
secondButtonEnabledTester: () => this.isFilled()
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
this._opened = false;
|
|
69
|
+
this._currentStep = 0;
|
|
70
|
+
}
|
|
71
|
+
open(config) {
|
|
72
|
+
this._config = config;
|
|
73
|
+
this._opened = true;
|
|
74
|
+
this.changeStep(0);
|
|
75
|
+
return new Promise(accept => {
|
|
76
|
+
this._promiseResolver = accept;
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
getStepMessage(key) {
|
|
80
|
+
const stepInfo = this._stepInfo[this._currentStep] || {};
|
|
81
|
+
return this.getMessage(stepInfo[key]);
|
|
82
|
+
}
|
|
83
|
+
executeButtonAction(first) {
|
|
84
|
+
const stepInfo = this._stepInfo[this._currentStep] || {};
|
|
85
|
+
stepInfo[first ? "firstButtonAction" : "secondButtonAction"]();
|
|
86
|
+
}
|
|
87
|
+
checkButtonEnabled(first) {
|
|
88
|
+
const stepInfo = this._stepInfo[this._currentStep] || {};
|
|
89
|
+
const testFunction = stepInfo[first ? "firstButtonEnabledTester" : "secondButtonEnabledTester"];
|
|
90
|
+
if (testFunction) {
|
|
91
|
+
return testFunction();
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
changeStep(index) {
|
|
96
|
+
this._currentStep = index;
|
|
97
|
+
if (this._viewStack) {
|
|
98
|
+
this._viewStack.show(this._currentStep);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
send() {
|
|
102
|
+
const { format, type, email } = this._config;
|
|
103
|
+
this._promiseResolver({ format, type, email, report: undefined });
|
|
104
|
+
}
|
|
105
|
+
close() {
|
|
106
|
+
this._opened = false;
|
|
107
|
+
}
|
|
108
|
+
isFilled() {
|
|
109
|
+
var _a, _b;
|
|
110
|
+
return ((_a = this._config.email) === null || _a === void 0 ? void 0 : _a.to) && ((_b = this._config.email) === null || _b === void 0 ? void 0 : _b.subject) ? true : false;
|
|
111
|
+
}
|
|
112
|
+
updateEmailInfo(field, value) {
|
|
113
|
+
this._config = Object.assign(Object.assign({}, this._config), { email: Object.assign(Object.assign({}, this._config.email), { [field]: value }) });
|
|
114
|
+
}
|
|
115
|
+
updateConfigInfo(field, value) {
|
|
116
|
+
this._config = Object.assign(Object.assign({}, this._config), { [field]: value });
|
|
117
|
+
}
|
|
118
|
+
render() {
|
|
119
|
+
var _a;
|
|
120
|
+
core.ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkExporterEmailSender');
|
|
121
|
+
return (index.h("ez-popup", { useHeader: false, size: "x-small", heightMode: "auto", opened: this._opened }, index.h("ez-modal-container", { onEzModalAction: evt => {
|
|
122
|
+
if (evt.detail === "CLOSE")
|
|
123
|
+
this.close();
|
|
124
|
+
}, modalTitle: this.getMessage("snkExporter.emailSenderTitle"), modalSubTitle: this.getStepMessage("subTitle") }, index.h("ez-view-stack", { ref: ref => this._viewStack = ref }, index.h("stack-item", null, index.h(OptionsStep, { getMessage: this.getMessage, data: this._config, changeInfo: (field, value) => this.updateConfigInfo(field, value) })), index.h("stack-item", null, index.h(EmailInfoStep, { getMessage: this.getMessage, data: (_a = this._config) === null || _a === void 0 ? void 0 : _a.email, changeInfo: (field, value) => this.updateEmailInfo(field, value) }))), index.h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, index.h("ez-button", Object.assign({ class: "ez-button--tertiary ez-padding-right--medium", label: this.getStepMessage("firstButton"), onClick: () => this.executeButtonAction(true), enabled: this.checkButtonEnabled(true) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("firstButton")}` })), index.h("ez-button", Object.assign({ class: "ez-button--secondary", label: this.getStepMessage("secondButton"), onClick: () => this.executeButtonAction(false), enabled: this.checkButtonEnabled(false) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("secondButton")}` }))))));
|
|
125
|
+
}
|
|
126
|
+
get _element() { return index.getElement(this); }
|
|
127
|
+
};
|
|
128
|
+
|
|
17
129
|
const buildFilter = (item) => {
|
|
18
130
|
switch (item.type) {
|
|
19
131
|
case filterItemType_enum.FilterItemType.DEFAULT_FILTER:
|
|
@@ -879,7 +991,7 @@ const EzGridConfig = class {
|
|
|
879
991
|
this._componenteInternalKey = Date.now();
|
|
880
992
|
/**
|
|
881
993
|
* Aba selecionada das configurações da grade.
|
|
882
|
-
|
|
994
|
+
*/
|
|
883
995
|
this.selectedIndex = 0;
|
|
884
996
|
}
|
|
885
997
|
/* Creation Methods */
|
|
@@ -888,10 +1000,10 @@ const EzGridConfig = class {
|
|
|
888
1000
|
*/
|
|
889
1001
|
async saveConfig(config) {
|
|
890
1002
|
var _a;
|
|
891
|
-
if (config == undefined || ((_a = this.
|
|
1003
|
+
if (config == undefined || ((_a = this.application) === null || _a === void 0 ? void 0 : _a.configName) == undefined) {
|
|
892
1004
|
return;
|
|
893
1005
|
}
|
|
894
|
-
ConfigStorage.ConfigStorage.saveGridConfig(config, this.
|
|
1006
|
+
ConfigStorage.ConfigStorage.saveGridConfig(config, this.application.configName)
|
|
895
1007
|
.then((response) => {
|
|
896
1008
|
if ((response === null || response === void 0 ? void 0 : response.resource) != undefined) {
|
|
897
1009
|
this.configChange.emit(config);
|
|
@@ -906,7 +1018,7 @@ const EzGridConfig = class {
|
|
|
906
1018
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-grid.msg.ts"
|
|
907
1019
|
*/
|
|
908
1020
|
getMessage(key, params) {
|
|
909
|
-
return this.
|
|
1021
|
+
return this.application.messagesBuilder.getMessage(key, params);
|
|
910
1022
|
}
|
|
911
1023
|
createOrderList() {
|
|
912
1024
|
let newList = [];
|
|
@@ -1325,9 +1437,6 @@ const EzGridConfig = class {
|
|
|
1325
1437
|
this.locateColumn(new KeyboardEvent("arrow-right", { key: "ArrowRight" }), this._searchElement.value);
|
|
1326
1438
|
}
|
|
1327
1439
|
}
|
|
1328
|
-
componentWillLoad() {
|
|
1329
|
-
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
1330
|
-
}
|
|
1331
1440
|
componentDidLoad() {
|
|
1332
1441
|
core.ElementIDUtils.addIDInfo(this._element);
|
|
1333
1442
|
}
|
|
@@ -1379,7 +1488,8 @@ const SnkTaskbar = class {
|
|
|
1379
1488
|
[taskbarElements.TaskbarElement.SAVE]: "snkTaskbar.titleSave",
|
|
1380
1489
|
[taskbarElements.TaskbarElement.GRID_MODE]: "snkTaskbar.titleGridMode",
|
|
1381
1490
|
[taskbarElements.TaskbarElement.FORM_MODE]: "snkTaskbar.titleFormMode",
|
|
1382
|
-
[taskbarElements.TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator"
|
|
1491
|
+
[taskbarElements.TaskbarElement.CONFIGURATOR]: "snkTaskbar.titleConfigurator",
|
|
1492
|
+
[taskbarElements.TaskbarElement.EXPORT]: "snkTaskbar.titleExportar"
|
|
1383
1493
|
};
|
|
1384
1494
|
}
|
|
1385
1495
|
observeButtons() {
|
|
@@ -1548,6 +1658,7 @@ const SnkTaskbar = class {
|
|
|
1548
1658
|
};
|
|
1549
1659
|
SnkTaskbar.style = snkTaskbarCss;
|
|
1550
1660
|
|
|
1661
|
+
exports.snk_exporter_email_sender = SnkExporterEmailSender;
|
|
1551
1662
|
exports.snk_filter_bar = SnkFilterBar;
|
|
1552
1663
|
exports.snk_filter_item = SnkFilterItem;
|
|
1553
1664
|
exports.snk_filter_list = SnkFilterList;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-20e8b68a.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const taskbarProcessor = require('./taskbar-processor-
|
|
7
|
+
const taskbarProcessor = require('./taskbar-processor-6f3d2a75.js');
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-c112de1d.js');
|
|
9
9
|
require('./_commonjsHelpers-537d719a.js');
|
|
10
10
|
|
|
@@ -18,6 +18,7 @@ exports.TaskbarElement = void 0;
|
|
|
18
18
|
TaskbarElement["MORE_OPTIONS"] = "MORE_OPTIONS";
|
|
19
19
|
TaskbarElement["DIVIDER"] = "DIVIDER";
|
|
20
20
|
TaskbarElement["CONFIGURATOR"] = "CONFIGURATOR";
|
|
21
|
+
TaskbarElement["EXPORT"] = "EXPORT";
|
|
21
22
|
})(exports.TaskbarElement || (exports.TaskbarElement = {}));
|
|
22
23
|
exports.AuthorizationElements = void 0;
|
|
23
24
|
(function (AuthorizationElements) {
|
|
@@ -72,6 +73,8 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
|
72
73
|
return iconButton("list", element, className, dataElementId, title, action, isEnabled);
|
|
73
74
|
case exports.TaskbarElement.CONFIGURATOR:
|
|
74
75
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
|
76
|
+
case exports.TaskbarElement.EXPORT:
|
|
77
|
+
return iconButton("file-download", element, className, dataElementId, title, action, isEnabled);
|
|
75
78
|
case exports.TaskbarElement.MORE_OPTIONS:
|
|
76
79
|
return actionButton(element, className, dataElementId, title, action, isEnabled, actions);
|
|
77
80
|
case exports.TaskbarElement.DIVIDER:
|
|
@@ -4,7 +4,7 @@ class TaskbarProcessor {
|
|
|
4
4
|
constructor(defaultButtons) {
|
|
5
5
|
this._defaultButtons = defaultButtons;
|
|
6
6
|
}
|
|
7
|
-
process(taskbarId, taskbarManager, dataState, disabledButtons = []) {
|
|
7
|
+
process(taskbarId, taskbarManager, dataState, disabledButtons = [], invisibleButtons = []) {
|
|
8
8
|
var _a;
|
|
9
9
|
this.customButtons = new Map();
|
|
10
10
|
this.buttons = "";
|
|
@@ -19,13 +19,15 @@ class TaskbarProcessor {
|
|
|
19
19
|
this.customButtons.set(customBtn.name, customBtn);
|
|
20
20
|
buttonName = customBtn.name;
|
|
21
21
|
}
|
|
22
|
-
if (!
|
|
23
|
-
this.
|
|
22
|
+
if (!invisibleButtons.includes(buttonName)) {
|
|
23
|
+
if (!this.isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabledButtons)) {
|
|
24
|
+
this.disabledButtons.push(buttonName);
|
|
25
|
+
}
|
|
26
|
+
if (this.buttons.length > 0) {
|
|
27
|
+
this.buttons += ",";
|
|
28
|
+
}
|
|
29
|
+
this.buttons += buttonName;
|
|
24
30
|
}
|
|
25
|
-
if (this.buttons.length > 0) {
|
|
26
|
-
this.buttons += ",";
|
|
27
|
-
}
|
|
28
|
-
this.buttons += buttonName;
|
|
29
31
|
});
|
|
30
32
|
}
|
|
31
33
|
getButtonsArray(taskbarId, taskbarManager, dataState) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"./components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js",
|
|
10
10
|
"./components/snk-configurator/snk-configurator.js",
|
|
11
11
|
"./components/snk-crud/snk-crud.js",
|
|
12
|
+
"./components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js",
|
|
12
13
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js",
|
|
13
14
|
"./components/snk-filter-bar/snk-filter-bar.js",
|
|
14
15
|
"./components/snk-filter-bar/filter-item/snk-filter-detail.js",
|
|
@@ -16,6 +16,10 @@ export class SnkCrud {
|
|
|
16
16
|
* Determina se pode haver mais de uma linha selecionada na grade.
|
|
17
17
|
*/
|
|
18
18
|
this.multipleSelection = true;
|
|
19
|
+
/**
|
|
20
|
+
* Determina se haverá exportação de dados
|
|
21
|
+
*/
|
|
22
|
+
this.enableDataExporter = false;
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
21
25
|
* Usado para alternar a visão entre GRID e FORM externamente.
|
|
@@ -94,7 +98,7 @@ export class SnkCrud {
|
|
|
94
98
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
95
99
|
}
|
|
96
100
|
render() {
|
|
97
|
-
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail) }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
|
101
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, enableDataExporter: this.enableDataExporter }, h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-form", { ref: (ref) => this._snkForm = ref, "data-element-id": "crud_form", configName: this.configName, actionsList: this.actionsList, onExit: () => this.setViewMode(GRID_MODE), recordsValidator: this.recordsValidator, taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail) }, h("slot", { name: "SnkFormTaskBar" }))), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._viewMode, onConfigSelected: (evt) => this.executeAction(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
|
98
102
|
}
|
|
99
103
|
static get is() { return "snk-crud"; }
|
|
100
104
|
static get encapsulation() { return "scoped"; }
|
|
@@ -227,6 +231,24 @@ export class SnkCrud {
|
|
|
227
231
|
"attribute": "multiple-selection",
|
|
228
232
|
"reflect": false,
|
|
229
233
|
"defaultValue": "true"
|
|
234
|
+
},
|
|
235
|
+
"enableDataExporter": {
|
|
236
|
+
"type": "boolean",
|
|
237
|
+
"mutable": false,
|
|
238
|
+
"complexType": {
|
|
239
|
+
"original": "boolean",
|
|
240
|
+
"resolved": "boolean",
|
|
241
|
+
"references": {}
|
|
242
|
+
},
|
|
243
|
+
"required": false,
|
|
244
|
+
"optional": false,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": "Determina se haver\u00E1 exporta\u00E7\u00E3o de dados"
|
|
248
|
+
},
|
|
249
|
+
"attribute": "enable-data-exporter",
|
|
250
|
+
"reflect": false,
|
|
251
|
+
"defaultValue": "false"
|
|
230
252
|
}
|
|
231
253
|
};
|
|
232
254
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
export const EmailInfoStep = ({ getMessage, changeInfo, data }) => {
|
|
4
|
+
return h("div", null, h("ez-text-input", Object.assign({ label: `${getMessage("snkExporter.emailSenderInfoStep_sendTo")} (obrigatório) *`, required: true, value: data === null || data === void 0 ? void 0 : data.to, onEzChange: evt => changeInfo("to", evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("sendTo")}` })), h("ez-text-input", Object.assign({ label: `${getMessage("snkExporter.emailSenderInfoStep_subject")} (obrigatório) *`, required: true, value: data === null || data === void 0 ? void 0 : data.subject, onEzChange: evt => changeInfo("subject", evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("subject")}` })), h("ez-text-area", Object.assign({ label: getMessage("snkExporter.emailSenderInfoStep_message"), value: data === null || data === void 0 ? void 0 : data.message, onEzChange: evt => changeInfo("message", evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("message")}` })), ((data === null || data === void 0 ? void 0 : data.attachments) || [])
|
|
5
|
+
.map((file, index) => h("ez-file-item", Object.assign({ class: "ez-padding-bottom--large", fileName: file.name, fileSize: file.size, canRemove: false }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("fileItem_") + (index + 1)}` }))));
|
|
6
|
+
};
|