@sankhyalabs/sankhyablocks 5.0.0 → 5.1.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/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +4 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +12 -2
- package/dist/cjs/snk-simple-bar.cjs.entry.js +30 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/snk-application/snk-application.js +4 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view.js +1 -1
- package/dist/collection/components/snk-grid/snk-grid.js +29 -2
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.css +32 -0
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +111 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/snk-application2.js +4 -1
- package/dist/components/snk-detail-view2.js +1 -1
- package/dist/components/snk-grid2.js +13 -2
- package/dist/components/snk-simple-bar.d.ts +11 -0
- package/dist/components/snk-simple-bar.js +46 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +4 -1
- package/dist/esm/snk-detail-view.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +12 -2
- package/dist/esm/snk-simple-bar.entry.js +26 -0
- package/dist/sankhyablocks/{p-187b6778.entry.js → p-0abc00e7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-5fed359b.entry.js → p-64afbfc9.entry.js} +2 -2
- package/dist/sankhyablocks/p-8f359cbf.entry.js +1 -0
- package/dist/sankhyablocks/p-b3e71248.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +4 -0
- package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +23 -0
- package/dist/types/components.d.ts +50 -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-6975f711.entry.js +0 -1
package/dist/esm/loader.js
CHANGED
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
13
13
|
return patchEsm().then(() => {
|
14
|
-
return bootstrapLazy([["snk-simple-crud",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"taskbarManager":[16],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-field-search",[[2,"snk-filter-field-search",{"searchable":[4],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"setDataSource":[64],"filterDataSource":[64]}]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"_disabledButtons":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-filter-bar",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid-config",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-field-config",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-taskbar",[[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]}]]],["snk-filter-item",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-select-box",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud",[[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],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-grid",[[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]}]]],["snk-form-summary",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal",[[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]}]]]], options);
|
14
|
+
return bootstrapLazy([["snk-simple-crud",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"taskbarManager":[16],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-field-search",[[2,"snk-filter-field-search",{"searchable":[4],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"setDataSource":[64],"filterDataSource":[64]}]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-simple-bar",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16]}]]],["snk-detail-view",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"_disabledButtons":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-filter-bar",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid-config",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-field-config",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-taskbar",[[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]}]]],["snk-filter-item",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-select-box",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud",[[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],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-grid",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}]]],["snk-form-summary",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal",[[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]}]]]], options);
|
15
15
|
});
|
16
16
|
};
|
17
17
|
|
@@ -14,5 +14,5 @@ const patchBrowser = () => {
|
|
14
14
|
};
|
15
15
|
|
16
16
|
patchBrowser().then(options => {
|
17
|
-
return bootstrapLazy([["snk-simple-crud",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"taskbarManager":[16],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-field-search",[[2,"snk-filter-field-search",{"searchable":[4],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"setDataSource":[64],"filterDataSource":[64]}]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-detail-view",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"_disabledButtons":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-filter-bar",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid-config",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-field-config",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-taskbar",[[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]}]]],["snk-filter-item",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-select-box",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud",[[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],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-grid",[[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]}]]],["snk-form-summary",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal",[[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]}]]]], options);
|
17
|
+
return bootstrapLazy([["snk-simple-crud",[[6,"snk-simple-crud",{"dataState":[16],"dataUnit":[16],"mode":[2],"taskbarManager":[16],"_currentViewMode":[32],"_config":[32],"goToView":[64],"setMetadata":[64],"setRecords":[64],"getRecords":[64]},[[0,"actionClick","actionClickListener"]]]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-field-search",[[2,"snk-filter-field-search",{"searchable":[4],"breadcrumbItems":[32],"linkItems":[32],"fieldItems":[32],"setDataSource":[64],"filterDataSource":[64]}]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-param-config",[[2,"snk-filter-param-config",{"_opened":[32],"_configType":[32],"_expressionItem":[32],"_informedInstance":[32],"_canSave":[32],"open":[64],"close":[64]}]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"fix":[16],"unfix":[16],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-simple-bar",[[6,"snk-simple-bar",{"label":[1],"breadcrumbItens":[16]}]]],["snk-detail-view",[[2,"snk-detail-view",{"formConfigManager":[1040],"dataUnitName":[1,"data-unit-name"],"guideItemPath":[16],"entityName":[1,"entity-name"],"label":[1],"dataUnit":[1040],"selectedForm":[1025,"selected-form"],"dataState":[1040],"_disabledButtons":[32],"changeViewMode":[64],"configGrid":[64],"showUp":[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-configurator",[[2,"snk-configurator",{"configName":[1,"config-name"],"viewMode":[2,"view-mode"],"_opened":[32],"_permissions":[32],"open":[64],"close":[64]}]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-filter-bar",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32],"scrollerLocked":[32]},[[0,"filterChange","filterChangeListener"]]]]],["snk-grid-config",[[2,"snk-grid-config",{"selectedIndex":[1026,"selected-index"],"application":[16],"columns":[1040],"config":[1040],"configName":[1,"config-name"]}]]],["snk-config-options",[[2,"snk-config-options",{"fieldConfig":[16],"idConfig":[513,"id-config"],"dataUnit":[16],"_defaultType":[32]}]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64],"getSelectedRecordsIDsInfo":[64]}]]],["snk-field-config",[[2,"snk-field-config",{"isConfigActive":[16],"fieldConfig":[16],"modeInsertion":[516,"mode-insertion"],"dataUnit":[16]}]]],["snk-tab-config",[[6,"snk-tab-config",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"_activeEditText":[32],"_activeEditTextIndex":[32],"_actionsHide":[32],"_actionsShow":[32]}]]],["snk-form-config",[[2,"snk-form-config",{"dataUnit":[16],"configManager":[16],"_formConfigOptions":[32],"_fieldConfigSelected":[32],"_layoutFormConfig":[32],"_fieldsAvailable":[32],"_formConfig":[32],"_formConfigChanged":[32],"_optionFormConfigSelected":[32],"_optionFormConfigChanged":[32],"_tempGroups":[32]}]]],["snk-taskbar",[[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]}]]],["snk-filter-item",[[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["snk-filter-list",[[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]]]],["snk-select-box",[[1,"snk-select-box",{"selectedOption":[1,"selected-option"]}]]],["snk-exporter-email-sender",[[0,"snk-exporter-email-sender",{"getMessage":[16],"_config":[32],"_opened":[32],"_currentStep":[32],"open":[64],"close":[64]}]]],["snk-data-exporter",[[2,"snk-data-exporter",{"provider":[16],"_items":[32],"_showDropdown":[32],"_releasedToExport":[32]}]]],["snk-guides-viewer",[[2,"snk-guides-viewer",{"dataUnit":[16],"dataState":[16],"configName":[1,"config-name"],"entityPath":[1,"entity-path"],"actionsList":[16],"recordsValidator":[16],"masterFormConfig":[1040],"selectedGuide":[16],"taskbarManager":[16],"presentationMode":[1,"presentation-mode"],"_breadcrumbItems":[32],"_guides":[32],"_formEditorConfigManager":[32],"_formEditorDataUnit":[32],"showFormConfig":[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["snk-crud",[[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],"_currentViewMode":[32],"goToView":[64]}]]],["snk-form",[[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"_dataUnit":[32],"_dataState":[32],"_showFormConfig":[32],"_configManager":[32],"showConfig":[64],"hideConfig":[64]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"webConnection":[64],"createDataunit":[64],"updateDataunitCache":[64],"getDataUnit":[64],"addClientEvent":[64],"removeClientEvent":[64],"hasClientEvent":[64],"getResourceID":[64],"getUserID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadGridConfig":[64],"loadTotals":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64],"getAppLabel":[64],"addSearchListener":[64]}]]],["snk-filter-detail",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-grid",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"isDetail":[4,"is-detail"],"taskbarManager":[16],"statusResolver":[16],"multipleSelection":[4,"multiple-selection"],"presentationMode":[1,"presentation-mode"],"_dataUnit":[32],"_dataState":[32],"_gridConfig":[32],"_popUpGridConfig":[32],"showConfig":[64],"hideConfig":[64],"setConfig":[64]}]]],["snk-form-summary",[[2,"snk-form-summary",{"fixed":[1540],"contracted":[1540],"summary":[16]}]]],["snk-form-view",[[6,"snk-form-view",{"levelPath":[1,"level-path"],"label":[1],"name":[1],"fields":[16],"formMetadata":[8,"form-metadata"],"dataUnit":[16],"contracted":[4],"fixed":[1540],"summaryFields":[16],"canExpand":[4,"can-expand"],"canFix":[4,"can-fix"],"recordsValidator":[16],"showUp":[64]}]]],["snk-filter-modal",[[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]}]]]], options);
|
18
18
|
});
|
@@ -1023,7 +1023,10 @@ const SnkApplication = class {
|
|
1023
1023
|
params: dependency.masterFields.map(fieldName => {
|
1024
1024
|
const masterDescriptor = dataUnit.getField(fieldName);
|
1025
1025
|
const dataType = (masterDescriptor === null || masterDescriptor === void 0 ? void 0 : masterDescriptor.dataType) || DataType.TEXT;
|
1026
|
-
|
1026
|
+
let value = dataUnit.getFieldValue(fieldName);
|
1027
|
+
if (dataType == DataType.OBJECT) {
|
1028
|
+
value = JSON.stringify(value);
|
1029
|
+
}
|
1027
1030
|
if (value == undefined) {
|
1028
1031
|
this.alert("Erro ao pesquisar", `É necessario informar o campo ${masterDescriptor.label} para executar a pesquisa.`);
|
1029
1032
|
throw new Error(`É necessario informar o campo ${masterDescriptor.label} para executar a pesquisa.`);
|
@@ -200,7 +200,7 @@ const SnkDetailView = class {
|
|
200
200
|
render() {
|
201
201
|
this.updateLabel();
|
202
202
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
203
|
-
return (h(Host, null, h("snk-data-unit", { dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: evt => this.dataState = evt.detail }, h("ez-view-stack", { ref: ref => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: evt => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit })))))));
|
203
|
+
return (h(Host, null, h("snk-data-unit", { dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: evt => this.dataState = evt.detail }, h("ez-view-stack", { ref: ref => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: evt => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, isDetail: true }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit })))))));
|
204
204
|
}
|
205
205
|
static get watchers() { return {
|
206
206
|
"dataState": ["observerDataState"]
|
@@ -24,7 +24,9 @@ const SnkGrid = class {
|
|
24
24
|
});
|
25
25
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
26
26
|
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER"],
|
27
|
-
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"]
|
27
|
+
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH", "DATA_EXPORTER"],
|
28
|
+
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH"],
|
29
|
+
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
28
30
|
});
|
29
31
|
this._dataUnit = undefined;
|
30
32
|
this._dataState = undefined;
|
@@ -32,6 +34,7 @@ const SnkGrid = class {
|
|
32
34
|
this._popUpGridConfig = false;
|
33
35
|
this.configName = undefined;
|
34
36
|
this.actionsList = undefined;
|
37
|
+
this.isDetail = undefined;
|
35
38
|
this.taskbarManager = undefined;
|
36
39
|
this.statusResolver = undefined;
|
37
40
|
this.multipleSelection = undefined;
|
@@ -240,7 +243,14 @@ const SnkGrid = class {
|
|
240
243
|
}
|
241
244
|
componentWillRender() {
|
242
245
|
const invisibleButtons = this._dataUnit && this._dataUnit.records.length > 0 ? [] : ["DATA_EXPORTER"];
|
243
|
-
const
|
246
|
+
const selectedRecord = this._dataState && this._dataState.selectedRecord;
|
247
|
+
let headerTaskbarId;
|
248
|
+
if (selectedRecord) {
|
249
|
+
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.selected" : "snkGridHeaderTaskbar.selected";
|
250
|
+
}
|
251
|
+
else {
|
252
|
+
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.unselected" : "snkGridHeaderTaskbar.unselected";
|
253
|
+
}
|
244
254
|
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
245
255
|
this._topTaskbarProcessor.process(this.getTopTaskBarId(this.presentationMode === PresentationMode.SECONDARY ? ".secondary" : ""), this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
246
256
|
this.dataExporterProviderStore();
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cfd4bb13.js';
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
3
|
+
|
4
|
+
const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
|
5
|
+
|
6
|
+
const SnkSimpleBar = class {
|
7
|
+
constructor(hostRef) {
|
8
|
+
registerInstance(this, hostRef);
|
9
|
+
this.clickBreadcrumbItem = createEvent(this, "clickBreadcrumbItem", 3);
|
10
|
+
this.exit = createEvent(this, "exit", 3);
|
11
|
+
this.label = undefined;
|
12
|
+
this.breadcrumbItens = undefined;
|
13
|
+
}
|
14
|
+
componentDidLoad() {
|
15
|
+
if (!this._element)
|
16
|
+
return;
|
17
|
+
ElementIDUtils.addIDInfo(this._element);
|
18
|
+
}
|
19
|
+
render() {
|
20
|
+
return (h("div", { class: "simple-bar__container ez-margin-vertical--medium ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
|
21
|
+
}
|
22
|
+
get _element() { return getElement(this); }
|
23
|
+
};
|
24
|
+
SnkSimpleBar.style = snkSimpleBarCss;
|
25
|
+
|
26
|
+
export { SnkSimpleBar as snk_simple_bar };
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,c as i,f as s,h as e,H as a}from"./p-b9667fbe.js";import{S as o}from"./p-70037212.js";import{FormMetadata as h,buildFormMetadata as r}from"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-9cff8df2.js";import"./p-e0a07ff1.js";import"@sankhyalabs/core";import{P as n}from"./p-f132e371.js";import{T as d}from"./p-74724fa7.js";import{c as l}from"./p-f587a454.js";import{S as c}from"./p-db304fd4.js";import"./p-25341d65.js";import"./p-9d4a25d2.js";import"./p-112455b1.js";import"./p-98f7f796.js";import"./p-c2beb95c.js";const u=class{constructor(s){t(this,s),this.snkDetailGuidesChange=i(this,"snkDetailGuidesChange",7),this.snkSwitchGuide=i(this,"snkSwitchGuide",7),this._disabledButtons=void 0,this.formConfigManager=void 0,this.dataUnitName=void 0,this.guideItemPath=void 0,this.entityName=void 0,this.label=void 0,this.dataUnit=void 0,this.selectedForm=void 0,this.dataState=void 0}observerDataState(t,i){var s;const e=!(null==i?void 0:i.insertionMode)&&(null==t?void 0:t.insertionMode),a=(null==i?void 0:i.insertionMode)&&!(null==t?void 0:t.insertionMode);if((e||a)&&this.loadMetadata(),null==this._formMetadata)return;const o=null===(s=this.dataState)||void 0===s?void 0:s.selectedRecord,h=this.getNewGuideItem(o);this.snkDetailGuidesChange.emit({item:h,recordId:null==o?void 0:o.__record__id__}),e&&setTimeout((()=>{this.changeViewMode(l.FORM)}),0),a&&this.changeViewMode(l.GRID);const r=[];this.dataState.hasPrevious||r.push(d.PREVIOUS),this.dataState.hasNext||r.push(d.NEXT),this._disabledButtons=r}async changeViewMode(t){this.emitSwitchEvent(t)}async configGrid(){this._snkGrid&&this._snkGrid.showConfig()}async showUp(){this._snkFormView&&this._snkFormView.showUp(),this._snkGrid&&this._snkGrid.scrollIntoView({behavior:"smooth",block:"start"})}onContentCardChanged(t){c.updateContentCard(t.detail.formName,t.detail.cardConfig,t.detail.propertyChanged,this.formConfigManager).then((()=>s(this))),t.stopPropagation()}updateLabel(){const t=this.guideItemPath?this.guideItemPath.length:0;if(t>0){const i=t>0?this.guideItemPath.map((t=>t.label)):void 0;this.label=i.pop(),this._levelPath=i.length>0?i.join(" / "):void 0,this._guideId=this.guideItemPath[t-1].id}else this.label="",this._levelPath=void 0,this._guideId=void 0}getNewGuideItem(t){if(null==t)return;const i=this.dataUnit.isNewRecord(t.__record__id__),s=Array.from(this._formMetadata.getAllSheets().values()).map((t=>{const{name:s,label:e}=t,a=null!=h.getDetailName(s.split("::").pop()),o=a&&i;return{id:a?this.getChildGuideId(s):this.getFormGuideId(s),label:e,disabled:o,tooltip:o?"Finalize o cadastro para ter acesso a esta guia.":void 0}})),e=s.shift();return e.label=i?"Novo Registro":t.__record__label__,e.children=s,e.expanded=!0,e}getFormGuideId(t){var i;if(!t){if(null==(null===(i=this.dataState)||void 0===i?void 0:i.selectedRecord))return;const s=Array.from(this._formMetadata.getAllSheets().keys());if(!s||0==s.length)return;t=s[0]}return`${this.stripFormPattern(this._guideId)}__FORM:${t}`}getChildGuideId(t){return`${this.stripFormPattern(this._guideId)}::${t}`}stripFormPattern(t){return t.replace(u.REGEX_FORM_ID,"")}loadMetadata(){var t;if(!this.dataUnit)return;if(!this.formConfigManager.isLoaded)return;const i=this.formConfigManager.getConfig(null===(t=this.dataState)||void 0===t?void 0:t.insertionMode,this.dataUnit);this._formMetadata=r(null==i||0===i.fields.length?void 0:i,this.dataUnit,!0)}dataUnitReadyHandler(t){this.dataUnit=t.detail,this.loadMetadata()}updateViewStack(t){t.show(this.selectedForm?1:0)}getFormFields(){return this.selectedForm&&this._formMetadata?this._formMetadata.getSheet(this.selectedForm).fields:[]}emitSwitchEvent(t){const i=t===l.GRID?this.stripFormPattern(this._guideId):this.getFormGuideId();i&&this.snkSwitchGuide.emit(i)}executeActionHandler(t){t.detail===d.GRID_MODE&&(this.emitSwitchEvent(l.GRID),t.stopPropagation()),t.detail===d.FORM_MODE&&(this.emitSwitchEvent(l.FORM),t.stopPropagation())}componentWillLoad(){this._configName=`dynaform.${this.entityName}`,this.formConfigManager=new o(this._configName,(()=>this.loadMetadata())),this.formConfigManager.loadConfig()}render(){return this.updateLabel(),e(a,null,e("snk-data-unit",{dataUnitName:`${this.dataUnitName}`,onDataUnitReady:t=>this.dataUnitReadyHandler(t),entityName:this.entityName,onDataStateChange:t=>this.dataState=t.detail},e("ez-view-stack",{ref:t=>this.updateViewStack(t)},e("stack-item",null,e("div",{class:"ez-box ez-box--shadow grid-container"},e("div",{class:"ez-flex ez-size-width--full ez-padding--large detail-header"},e("div",{class:"ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center"},this._levelPath?e("span",{class:"level-path"},this._levelPath+" /"):void 0,this.label)),e("snk-grid",{class:"ez-size-width--full ez-size-height--full",ref:t=>this._snkGrid=t,configName:this._configName,onGridDoubleClick:()=>this.emitSwitchEvent(l.FORM),onActionClick:t=>this.executeActionHandler(t),presentationMode:n.SECONDARY}))),e("stack-item",null,e("snk-form-view",{ref:t=>this._snkFormView=t,canExpand:!1,canFix:!1,name:this.selectedForm,formMetadata:this._formMetadata,dataUnit:this.dataUnit,fields:this.getFormFields(),label:this.label,levelPath:this._levelPath},e("snk-taskbar",{key:"guideViewerTaskbar",class:"form-taskbar","data-element-id":"guideViewer",configName:this._configName,disabledButtons:this._disabledButtons,buttons:"INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR",primaryButton:"INSERT",presentationMode:n.SECONDARY,onActionClick:t=>this.executeActionHandler(t),dataUnit:this.dataUnit}))))))}static get watchers(){return{dataState:["observerDataState"]}}};u.REGEX_FORM_ID=/__FORM:[^:]+/g,u.style=".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";export{u as snk_detail_view}
|
1
|
+
import{r as t,c as i,f as s,h as e,H as a}from"./p-b9667fbe.js";import{S as o}from"./p-70037212.js";import{FormMetadata as h,buildFormMetadata as r}from"@sankhyalabs/ezui/dist/collection/utils/form";import"./p-9cff8df2.js";import"./p-e0a07ff1.js";import"@sankhyalabs/core";import{P as n}from"./p-f132e371.js";import{T as d}from"./p-74724fa7.js";import{c as l}from"./p-f587a454.js";import{S as c}from"./p-db304fd4.js";import"./p-25341d65.js";import"./p-9d4a25d2.js";import"./p-112455b1.js";import"./p-98f7f796.js";import"./p-c2beb95c.js";const u=class{constructor(s){t(this,s),this.snkDetailGuidesChange=i(this,"snkDetailGuidesChange",7),this.snkSwitchGuide=i(this,"snkSwitchGuide",7),this._disabledButtons=void 0,this.formConfigManager=void 0,this.dataUnitName=void 0,this.guideItemPath=void 0,this.entityName=void 0,this.label=void 0,this.dataUnit=void 0,this.selectedForm=void 0,this.dataState=void 0}observerDataState(t,i){var s;const e=!(null==i?void 0:i.insertionMode)&&(null==t?void 0:t.insertionMode),a=(null==i?void 0:i.insertionMode)&&!(null==t?void 0:t.insertionMode);if((e||a)&&this.loadMetadata(),null==this._formMetadata)return;const o=null===(s=this.dataState)||void 0===s?void 0:s.selectedRecord,h=this.getNewGuideItem(o);this.snkDetailGuidesChange.emit({item:h,recordId:null==o?void 0:o.__record__id__}),e&&setTimeout((()=>{this.changeViewMode(l.FORM)}),0),a&&this.changeViewMode(l.GRID);const r=[];this.dataState.hasPrevious||r.push(d.PREVIOUS),this.dataState.hasNext||r.push(d.NEXT),this._disabledButtons=r}async changeViewMode(t){this.emitSwitchEvent(t)}async configGrid(){this._snkGrid&&this._snkGrid.showConfig()}async showUp(){this._snkFormView&&this._snkFormView.showUp(),this._snkGrid&&this._snkGrid.scrollIntoView({behavior:"smooth",block:"start"})}onContentCardChanged(t){c.updateContentCard(t.detail.formName,t.detail.cardConfig,t.detail.propertyChanged,this.formConfigManager).then((()=>s(this))),t.stopPropagation()}updateLabel(){const t=this.guideItemPath?this.guideItemPath.length:0;if(t>0){const i=t>0?this.guideItemPath.map((t=>t.label)):void 0;this.label=i.pop(),this._levelPath=i.length>0?i.join(" / "):void 0,this._guideId=this.guideItemPath[t-1].id}else this.label="",this._levelPath=void 0,this._guideId=void 0}getNewGuideItem(t){if(null==t)return;const i=this.dataUnit.isNewRecord(t.__record__id__),s=Array.from(this._formMetadata.getAllSheets().values()).map((t=>{const{name:s,label:e}=t,a=null!=h.getDetailName(s.split("::").pop()),o=a&&i;return{id:a?this.getChildGuideId(s):this.getFormGuideId(s),label:e,disabled:o,tooltip:o?"Finalize o cadastro para ter acesso a esta guia.":void 0}})),e=s.shift();return e.label=i?"Novo Registro":t.__record__label__,e.children=s,e.expanded=!0,e}getFormGuideId(t){var i;if(!t){if(null==(null===(i=this.dataState)||void 0===i?void 0:i.selectedRecord))return;const s=Array.from(this._formMetadata.getAllSheets().keys());if(!s||0==s.length)return;t=s[0]}return`${this.stripFormPattern(this._guideId)}__FORM:${t}`}getChildGuideId(t){return`${this.stripFormPattern(this._guideId)}::${t}`}stripFormPattern(t){return t.replace(u.REGEX_FORM_ID,"")}loadMetadata(){var t;if(!this.dataUnit)return;if(!this.formConfigManager.isLoaded)return;const i=this.formConfigManager.getConfig(null===(t=this.dataState)||void 0===t?void 0:t.insertionMode,this.dataUnit);this._formMetadata=r(null==i||0===i.fields.length?void 0:i,this.dataUnit,!0)}dataUnitReadyHandler(t){this.dataUnit=t.detail,this.loadMetadata()}updateViewStack(t){t.show(this.selectedForm?1:0)}getFormFields(){return this.selectedForm&&this._formMetadata?this._formMetadata.getSheet(this.selectedForm).fields:[]}emitSwitchEvent(t){const i=t===l.GRID?this.stripFormPattern(this._guideId):this.getFormGuideId();i&&this.snkSwitchGuide.emit(i)}executeActionHandler(t){t.detail===d.GRID_MODE&&(this.emitSwitchEvent(l.GRID),t.stopPropagation()),t.detail===d.FORM_MODE&&(this.emitSwitchEvent(l.FORM),t.stopPropagation())}componentWillLoad(){this._configName=`dynaform.${this.entityName}`,this.formConfigManager=new o(this._configName,(()=>this.loadMetadata())),this.formConfigManager.loadConfig()}render(){return this.updateLabel(),e(a,null,e("snk-data-unit",{dataUnitName:`${this.dataUnitName}`,onDataUnitReady:t=>this.dataUnitReadyHandler(t),entityName:this.entityName,onDataStateChange:t=>this.dataState=t.detail},e("ez-view-stack",{ref:t=>this.updateViewStack(t)},e("stack-item",null,e("div",{class:"ez-box ez-box--shadow grid-container"},e("div",{class:"ez-flex ez-size-width--full ez-padding--large detail-header"},e("div",{class:"ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center"},this._levelPath?e("span",{class:"level-path"},this._levelPath+" /"):void 0,this.label)),e("snk-grid",{class:"ez-size-width--full ez-size-height--full",ref:t=>this._snkGrid=t,configName:this._configName,onGridDoubleClick:()=>this.emitSwitchEvent(l.FORM),onActionClick:t=>this.executeActionHandler(t),presentationMode:n.SECONDARY,isDetail:!0}))),e("stack-item",null,e("snk-form-view",{ref:t=>this._snkFormView=t,canExpand:!1,canFix:!1,name:this.selectedForm,formMetadata:this._formMetadata,dataUnit:this.dataUnit,fields:this.getFormFields(),label:this.label,levelPath:this._levelPath},e("snk-taskbar",{key:"guideViewerTaskbar",class:"form-taskbar","data-element-id":"guideViewer",configName:this._configName,disabledButtons:this._disabledButtons,buttons:"INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR",primaryButton:"INSERT",presentationMode:n.SECONDARY,onActionClick:t=>this.executeActionHandler(t),dataUnit:this.dataUnit}))))))}static get watchers(){return{dataState:["observerDataState"]}}};u.REGEX_FORM_ID=/__FORM:[^:]+/g,u.style=".sc-snk-detail-view-h{display:flex;row-gap:24px;flex-direction:column;width:100%;height:100%}.level-path.sc-snk-detail-view{color:var(--color--title-primary, #2B3A54);font-weight:var(--text-weight--medium, 400);padding-right:3px}.form-taskbar.sc-snk-detail-view{padding-bottom:var(--space--medium)}.grid-container.sc-snk-detail-view{background-color:#FFF;min-height:100px}.detail-header.sc-snk-detail-view{padding-bottom:0}";export{u as snk_detail_view}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as t,c as e,h as s,g as r}from"./p-b9667fbe.js";import{WaitingChangeException as n,WarningException as i,ErrorException as a,ObjectUtils as o,DataUnit as c,StringUtils as h,DataType as l,DataUnitStorage as u,ChangeOperation as d,DateUtils as p,DependencyType as m,ElementIDUtils as f,ApplicationContext as y,ErrorTracking as w}from"@sankhyalabs/core";import{d as _,D as v,U as g}from"./p-9cff8df2.js";import{ApplicationUtils as I}from"@sankhyalabs/ezui/dist/collection/utils";import{P}from"./p-e0a07ff1.js";import{S as D}from"./p-28c800b9.js";import{G as $,C as b}from"./p-25341d65.js";import{R as
|
1
|
+
import{r as t,c as e,h as s,g as r}from"./p-b9667fbe.js";import{WaitingChangeException as n,WarningException as i,ErrorException as a,ObjectUtils as o,DataUnit as c,StringUtils as h,DataType as l,DataUnitStorage as u,ChangeOperation as d,DateUtils as p,DependencyType as m,ElementIDUtils as f,ApplicationContext as y,ErrorTracking as w}from"@sankhyalabs/core";import{d as _,D as v,U as g}from"./p-9cff8df2.js";import{ApplicationUtils as I}from"@sankhyalabs/ezui/dist/collection/utils";import{P}from"./p-e0a07ff1.js";import{S as D}from"./p-28c800b9.js";import{G as $,C as b}from"./p-25341d65.js";import{R as S}from"./p-9d4a25d2.js";import"./p-112455b1.js";class A{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}rejectionHandler(t){const e=t.reason;e instanceof n||(e?this.processException(e):this._app.isDebugMode().then((t=>{t&&this._app.error("Promise rejeitada","Erro interno: Uma promise foi rejeitada sem razão determinada.")})))}errorHandler(t){this.processException(t.error)}buildErrorCodeHTML(t){return'<br><a href="#" onclick="try{window.workspace.openHelp(\'_tbcode:'+t.errorCode+"')} catch(e){alert('Não é possível abrir a ajuda fora do workspace Sankhya');}\">Código: "+t.errorCode+"</a>"}processException(t){t.errorCode&&(t.message+=this.buildErrorCodeHTML(t)),t instanceof n||t instanceof i?this._app.alert(t.title,t.message):t instanceof a?this._app.error(t.title,t.message):this._app.isDebugMode().then((e=>{if(e)if(t instanceof Error)this._app.error(t.name,t.message);else{const e=(null==t?void 0:t.title)||"Erro detectado",s="string"==typeof t?t:t.message||`Erro interno "${o.objectToString(t)}"`;this._app.error(e,s)}}))}}function T(){const t=["2909523kXwted","CompanyName=Sankhya Jiva Tecnologia e Inovao Ltda,LicensedApplication=Sankhya Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869","1131048CARoeW","502909mLEPmu","447255iQEXuN","428UHbJwW","270AFTxAV","194369jhGqTI","1540nWuTrj","2044062GicUQI","30CkXPWg"];return(T=function(){return t})()}const C=E;function E(t,e){const s=T();return(E=function(t){return s[t-=392]})(t,e)}!function(){const t=E,e=T();for(;;)try{if(951926==-parseInt(t(398))/1+-parseInt(t(393))/2+parseInt(t(395))/3+-parseInt(t(400))/4*(parseInt(t(392))/5)+-parseInt(t(401))/6*(-parseInt(t(402))/7)+parseInt(t(397))/8+-parseInt(t(399))/9*(-parseInt(t(394))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const U=C(396);class O{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchTotals",_.gql`query($filters: [InputFilter!] $name: String!) {
|
2
2
|
$queryAlias$: fetchTotals(name: $name, filters: $filters ){
|
3
3
|
name
|
4
4
|
value
|
@@ -80,4 +80,4 @@ import{r as t,c as e,h as s,g as r}from"./p-b9667fbe.js";import{WaitingChangeExc
|
|
80
80
|
name
|
81
81
|
resource
|
82
82
|
}
|
83
|
-
}`)}async getParam(t){const e=`param://application?params=${t}`;return v.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchParam")})}async asString(t){const e=await this.getParam(t);return this.getValue(e)}async asInteger(t){const e=await this.getParam(t);return parseInt(this.getValue(e))}async asFloat(t){const e=await this.getParam(t);return parseFloat(this.getValue(e))}async asBoolean(t){const e=await this.getParam(t);return"S"===this.getValue(e)}async asDate(t){const e=await this.getParam(t);return p.strToDate(this.getValue(e))}async getBatchParams(t){const e=await this.getParam(t.join(",")),s={};return e.forEach((t=>s[t.name]=t.resource)),s}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),h.isEmpty(t.resource))return"";try{const e=o.stringToObject(t.resource),[s]=Object.keys(e);return e[s]}catch(t){console.warn("Erro ao converter string JSON.")}}}const k=F;function F(t,e){const s=M();return(F=function(t){return s[t-=378]})(t,e)}function M(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(M=function(){return t})()}!function(){const t=F,e=M();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class x{[k(397)](t){const e=k;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const s=new z("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>s.putAccess(t[e(382)],String(t.status)==e(398)))),s}}class z{constructor(t){const e=k;this.isSup=t,this[e(384)]={}}[k(378)](t,e){this[k(384)][t]=e}[k(393)](t){const e=k;if(this[e(402)])return!0;let s=!0;return this[e(384)][e(380)](t)&&(s=this.actions[t]),s}isUserSup(){return this.isSup}}class G extends A{getData(t){const e=`cfg://auth/${t}`;return new Promise(((t,s)=>{this.loadResource(e).then((e=>{let s=o.stringToObject(e);s&&"object"==typeof s&&t(s)})).catch((t=>{s(t)}))}))}}var H;!function(t){t.INSERT="I",t.UPDATE="A",t.REMOVE="E",t.SHOW="C",t.CONFIG="F",t.CONFIG_NUMBER="N",t.CLONE="D",t.CONFIG_GRID="G"}(H||(H={}));const J=class{constructor(s){t(this,s),this.applicationLoaded=e(this,"applicationLoaded",7),this.applicationLoading=e(this,"applicationLoading",7),this._authPromises=[],this._duCache=new Map,this._duPromises=new Map,this._requestListener=new W,this.messagesBuilder=void 0,this.configName=void 0}get parameters(){return this._parameters||(this._parameters=new L),this._parameters}get resourceID(){return this._resourceID||(this._resourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||j.resourceID||"unknown.resource.id"),this._resourceID}get auth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,e)=>{const s=this._authPromises.length>0;this._authPromises.push(new B(t,e)),s||this.authFetcher.getData(this.resourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}async isUserSup(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{t(e.isSup)})).catch((t=>e(t)))}))}))}async hasAccess(t){return new Promise(((e,s)=>{this.auth.then((r=>{this.getAuthList(r).then((s=>{e(s.isSup||s.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{const s={};s.isSup=e.isSup,Object.entries(H).forEach((t=>{s[t[0]]=e.actions[t[1]]||!1})),t(s)})).catch((t=>e(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,e="full",s=!0){this.clearContent(this._popUp),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=e,this._popUp.useHeader=s,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const e=t.split(",");return new Promise(((t,s)=>{this.getAttributeFromHTMLWrapper("opc0009").then((r=>{"1"===r?t(!0):Promise.all(e.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((e=>{t(e.includes("1"))})).catch((t=>{s(t)}))})).catch((t=>{s(t)}))}))}async getConfig(t){let e={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,s)=>{v.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(e)).then((e=>{var s;return t(null===(s=e.config)||void 0===s?void 0:s.data)})).catch((t=>s(t)))}))}async saveConfig(t,e){let s={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:e}}};return new Promise(((t,e)=>{v.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(s)).then((e=>t(e))).catch((t=>e(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,e){j.openAppActivity(t,e)}async webConnection(t,e,s){this.getStringParam(t).then((t=>{q.webConnectionCaller(t,e,s)}))}getDuPromissesStack(t){let e;return t&&(e=this._duPromises.get(t),e||(e=[],this._duPromises.set(t,e))),e||[]}async createDataunit(t,e,s){return new Promise(((r,n)=>{const i=this.getDuPromissesStack(e),a=i.length>0;if(i.push(new B(r,n)),!a){const r=this.dataUnitFetcher.getDataUnit(t,this.resourceID,s);r.loadMetadata().then((()=>{for(e&&this.updateDataunitCache(void 0,e,r);i.length>0;)i.pop().resolve(r)})).catch((t=>{for(;i.length>0;)i.pop().reject(t)}))}}))}async updateDataunitCache(t,e,s){t&&this._duCache.delete(t),this._duCache.set(e,s)}async getDataUnit(t,e,s){return new Promise(((r,n)=>{const i=this._duCache.get(e);i?r(i):this.createDataunit(t,e,s).then((t=>{r(t)})).catch((t=>n(t)))}))}async addClientEvent(t,e){return new Promise((s=>{v.addClientEvent(t,e),s()}))}async removeClientEvent(t){return new Promise((e=>{v.removeClientEvent(t),e()}))}async hasClientEvent(t){return new Promise((e=>{e(v.hasClientEvent(t))}))}async getResourceID(){return Promise.resolve(this.resourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,e,s,r){return I.alert(t,e,s,r)}async error(t,e,s,r){return I.error(t,e,s,r)}async success(t,e,s,r){return I.success(t,e,s,r)}async message(t,e,s,r){return I.message(t,e,s,r)}async confirm(t,e,s,r,n){return I.confirm(t,e,s,r,n)}async info(t,e){return I.info(t,e)}async loadGridConfig(t){return this.gridConfigFetcher.getConfig(t,this.resourceID)}async loadTotals(t,e,s){return this.totalsFetcher.fetchTotals(t,e,s)}async getAuthList(t){return await(new x).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=g.getQueryParams(location.search)),this._urlParams}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new R),this._dataUnitFetcher}get gridConfigFetcher(){return this._gridConfigFetcher||(this._gridConfigFetcher=new $),this._gridConfigFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new O),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new P),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new G),this._authFetcher}async executeSearch(t,e,s){const r=null==s?void 0:s.getField(e);if(r){const{mode:e,argument:n}=t,{ENTITYNAME:i,CODEFIELD:a,DESCRIPTIONFIELD:o,ROOTENTITY:c,DESCRIPTIONENTITY:h}=r.properties,u=r.dependencies;let d;const p={rootEntity:c,descriptionFieldName:o,codeFieldName:a,showInactives:!1,dataUnitId:s.dataUnitId};return null==u||u.filter((t=>t.masterFields)).forEach((t=>{var e;t.type===m.SEARCHING&&(null===(e=t.masterFields)||void 0===e?void 0:e.length)>0&&(d={expression:t.expression,params:t.masterFields.map((t=>{const e=s.getField(t),r=(null==e?void 0:e.dataType)||l.TEXT,n=s.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${e.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${e.label} para executar a pesquisa.`);return{name:t,value:n,dataType:r}}))})})),this.executePreparedSearch(e,n,{entity:i,entityDescription:h,criteria:d,searchOptions:p})}}async executePreparedSearch(t,e,s){const{entity:r,entityDescription:n,criteria:i,searchOptions:a}=s;return"ADVANCED"===t?new Promise((t=>{const s=document.createElement("snk-pesquisa");s[f.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${r}`,s.argument=e,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(r,t,i,a),s.selectItem=e=>{t(e),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(n),this.showPopUp(s)})):this.pesquisaFetcher.loadSearchOptions(r,e,i,a)}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return j.getAppLabel(this._resourceID)}addSearchListener(t,e,s){return new Promise((r=>{r(this.pesquisaFetcher.addSearchListener(t,e.dataUnitId,s))}))}clearContent(t){t&&Array.from(t.children).forEach((e=>{t.removeChild(e)}))}clearPopUpTitle(){this._popUp.ezTitle=""}setPopUpTitle(t){this._popUp.ezTitle=t}componentWillLoad(){this._errorHandler=new S(this),this.messagesBuilder=new D,y.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${g.getUrlBase()}/mge/upload/file`),y.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,e,s)=>this.executeSearch(t,e,s))),y.setContextValue("__EZUI__GRID_LICENSE__",U),w.init(),b.get()}connectedCallback(){y.setContextValue("__SNK__APPLICATION__",this),v.addRequestListener(this._requestListener)}disconnectedCallback(){v.removeRequestListener(this._requestListener)}componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{this.applicationLoaded.emit(!0)})),f.addIDInfo(this._element,`resource_${this._resourceID}`)}render(){return s("div",null,s("ez-loading-bar",{ref:t=>this._requestListener.loadingBar=t}),s("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),s("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}))}get _element(){return r(this)}};class W{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.loadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.loadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){var e;if(1==(null===(e=null==t?void 0:t.requestBody)||void 0===e?void 0:e.length)){const{name:e}=t.requestBody[0].variables;if(e){const t=e.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class B{constructor(t,e){this.resolve=t,this.reject=e}}J.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{J as snk_application}
|
83
|
+
}`)}async getParam(t){const e=`param://application?params=${t}`;return v.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchParam")})}async asString(t){const e=await this.getParam(t);return this.getValue(e)}async asInteger(t){const e=await this.getParam(t);return parseInt(this.getValue(e))}async asFloat(t){const e=await this.getParam(t);return parseFloat(this.getValue(e))}async asBoolean(t){const e=await this.getParam(t);return"S"===this.getValue(e)}async asDate(t){const e=await this.getParam(t);return p.strToDate(this.getValue(e))}async getBatchParams(t){const e=await this.getParam(t.join(",")),s={};return e.forEach((t=>s[t.name]=t.resource)),s}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),h.isEmpty(t.resource))return"";try{const e=o.stringToObject(t.resource),[s]=Object.keys(e);return e[s]}catch(t){console.warn("Erro ao converter string JSON.")}}}const k=F;function F(t,e){const s=M();return(F=function(t){return s[t-=378]})(t,e)}function M(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(M=function(){return t})()}!function(){const t=F,e=M();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class x{[k(397)](t){const e=k;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const s=new z("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>s.putAccess(t[e(382)],String(t.status)==e(398)))),s}}class z{constructor(t){const e=k;this.isSup=t,this[e(384)]={}}[k(378)](t,e){this[k(384)][t]=e}[k(393)](t){const e=k;if(this[e(402)])return!0;let s=!0;return this[e(384)][e(380)](t)&&(s=this.actions[t]),s}isUserSup(){return this.isSup}}class G extends S{getData(t){const e=`cfg://auth/${t}`;return new Promise(((t,s)=>{this.loadResource(e).then((e=>{let s=o.stringToObject(e);s&&"object"==typeof s&&t(s)})).catch((t=>{s(t)}))}))}}var H;!function(t){t.INSERT="I",t.UPDATE="A",t.REMOVE="E",t.SHOW="C",t.CONFIG="F",t.CONFIG_NUMBER="N",t.CLONE="D",t.CONFIG_GRID="G"}(H||(H={}));const J=class{constructor(s){t(this,s),this.applicationLoaded=e(this,"applicationLoaded",7),this.applicationLoading=e(this,"applicationLoading",7),this._authPromises=[],this._duCache=new Map,this._duPromises=new Map,this._requestListener=new W,this.messagesBuilder=void 0,this.configName=void 0}get parameters(){return this._parameters||(this._parameters=new L),this._parameters}get resourceID(){return this._resourceID||(this._resourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||j.resourceID||"unknown.resource.id"),this._resourceID}get auth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,e)=>{const s=this._authPromises.length>0;this._authPromises.push(new B(t,e)),s||this.authFetcher.getData(this.resourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}async isUserSup(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{t(e.isSup)})).catch((t=>e(t)))}))}))}async hasAccess(t){return new Promise(((e,s)=>{this.auth.then((r=>{this.getAuthList(r).then((s=>{e(s.isSup||s.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{const s={};s.isSup=e.isSup,Object.entries(H).forEach((t=>{s[t[0]]=e.actions[t[1]]||!1})),t(s)})).catch((t=>e(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,e="full",s=!0){this.clearContent(this._popUp),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=e,this._popUp.useHeader=s,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const e=t.split(",");return new Promise(((t,s)=>{this.getAttributeFromHTMLWrapper("opc0009").then((r=>{"1"===r?t(!0):Promise.all(e.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((e=>{t(e.includes("1"))})).catch((t=>{s(t)}))})).catch((t=>{s(t)}))}))}async getConfig(t){let e={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,s)=>{v.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(e)).then((e=>{var s;return t(null===(s=e.config)||void 0===s?void 0:s.data)})).catch((t=>s(t)))}))}async saveConfig(t,e){let s={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:e}}};return new Promise(((t,e)=>{v.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(s)).then((e=>t(e))).catch((t=>e(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,e){j.openAppActivity(t,e)}async webConnection(t,e,s){this.getStringParam(t).then((t=>{q.webConnectionCaller(t,e,s)}))}getDuPromissesStack(t){let e;return t&&(e=this._duPromises.get(t),e||(e=[],this._duPromises.set(t,e))),e||[]}async createDataunit(t,e,s){return new Promise(((r,n)=>{const i=this.getDuPromissesStack(e),a=i.length>0;if(i.push(new B(r,n)),!a){const r=this.dataUnitFetcher.getDataUnit(t,this.resourceID,s);r.loadMetadata().then((()=>{for(e&&this.updateDataunitCache(void 0,e,r);i.length>0;)i.pop().resolve(r)})).catch((t=>{for(;i.length>0;)i.pop().reject(t)}))}}))}async updateDataunitCache(t,e,s){t&&this._duCache.delete(t),this._duCache.set(e,s)}async getDataUnit(t,e,s){return new Promise(((r,n)=>{const i=this._duCache.get(e);i?r(i):this.createDataunit(t,e,s).then((t=>{r(t)})).catch((t=>n(t)))}))}async addClientEvent(t,e){return new Promise((s=>{v.addClientEvent(t,e),s()}))}async removeClientEvent(t){return new Promise((e=>{v.removeClientEvent(t),e()}))}async hasClientEvent(t){return new Promise((e=>{e(v.hasClientEvent(t))}))}async getResourceID(){return Promise.resolve(this.resourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,e,s,r){return I.alert(t,e,s,r)}async error(t,e,s,r){return I.error(t,e,s,r)}async success(t,e,s,r){return I.success(t,e,s,r)}async message(t,e,s,r){return I.message(t,e,s,r)}async confirm(t,e,s,r,n){return I.confirm(t,e,s,r,n)}async info(t,e){return I.info(t,e)}async loadGridConfig(t){return this.gridConfigFetcher.getConfig(t,this.resourceID)}async loadTotals(t,e,s){return this.totalsFetcher.fetchTotals(t,e,s)}async getAuthList(t){return await(new x).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=g.getQueryParams(location.search)),this._urlParams}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new R),this._dataUnitFetcher}get gridConfigFetcher(){return this._gridConfigFetcher||(this._gridConfigFetcher=new $),this._gridConfigFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new O),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new P),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new G),this._authFetcher}async executeSearch(t,e,s){const r=null==s?void 0:s.getField(e);if(r){const{mode:e,argument:n}=t,{ENTITYNAME:i,CODEFIELD:a,DESCRIPTIONFIELD:o,ROOTENTITY:c,DESCRIPTIONENTITY:h}=r.properties,u=r.dependencies;let d;const p={rootEntity:c,descriptionFieldName:o,codeFieldName:a,showInactives:!1,dataUnitId:s.dataUnitId};return null==u||u.filter((t=>t.masterFields)).forEach((t=>{var e;t.type===m.SEARCHING&&(null===(e=t.masterFields)||void 0===e?void 0:e.length)>0&&(d={expression:t.expression,params:t.masterFields.map((t=>{const e=s.getField(t),r=(null==e?void 0:e.dataType)||l.TEXT;let n=s.getFieldValue(t);if(r==l.OBJECT&&(n=JSON.stringify(n)),null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${e.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${e.label} para executar a pesquisa.`);return{name:t,value:n,dataType:r}}))})})),this.executePreparedSearch(e,n,{entity:i,entityDescription:h,criteria:d,searchOptions:p})}}async executePreparedSearch(t,e,s){const{entity:r,entityDescription:n,criteria:i,searchOptions:a}=s;return"ADVANCED"===t?new Promise((t=>{const s=document.createElement("snk-pesquisa");s[f.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${r}`,s.argument=e,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(r,t,i,a),s.selectItem=e=>{t(e),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(n),this.showPopUp(s)})):this.pesquisaFetcher.loadSearchOptions(r,e,i,a)}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return j.getAppLabel(this._resourceID)}addSearchListener(t,e,s){return new Promise((r=>{r(this.pesquisaFetcher.addSearchListener(t,e.dataUnitId,s))}))}clearContent(t){t&&Array.from(t.children).forEach((e=>{t.removeChild(e)}))}clearPopUpTitle(){this._popUp.ezTitle=""}setPopUpTitle(t){this._popUp.ezTitle=t}componentWillLoad(){this._errorHandler=new A(this),this.messagesBuilder=new D,y.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${g.getUrlBase()}/mge/upload/file`),y.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,e,s)=>this.executeSearch(t,e,s))),y.setContextValue("__EZUI__GRID_LICENSE__",U),w.init(),b.get()}connectedCallback(){y.setContextValue("__SNK__APPLICATION__",this),v.addRequestListener(this._requestListener)}disconnectedCallback(){v.removeRequestListener(this._requestListener)}componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{this.applicationLoaded.emit(!0)})),f.addIDInfo(this._element,`resource_${this._resourceID}`)}render(){return s("div",null,s("ez-loading-bar",{ref:t=>this._requestListener.loadingBar=t}),s("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),s("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}))}get _element(){return r(this)}};class W{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.loadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.loadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){var e;if(1==(null===(e=null==t?void 0:t.requestBody)||void 0===e?void 0:e.length)){const{name:e}=t.requestBody[0].variables;if(e){const t=e.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class B{constructor(t,e){this.resolve=t,this.reject=e}}J.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{J as snk_application}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,c as t,h as s,g as e}from"./p-b9667fbe.js";import{ElementIDUtils as d,ApplicationContext as r,DataType as n}from"@sankhyalabs/core";import{UserInterface as a}from"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import{C as o}from"./p-25341d65.js";import{P as l}from"./p-f132e371.js";import{T as h}from"./p-c2beb95c.js";import{s as c}from"./p-98f7f796.js";import"./p-9d4a25d2.js";import"./p-9cff8df2.js";import"./p-112455b1.js";const u=class{constructor(s){i(this,s),this.actionClick=t(this,"actionClick",7),this.gridDoubleClick=t(this,"gridDoubleClick",7),this._topTaskbarProcessor=new h({"snkGridTopTaskbar.regular":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.regular.secondary":["FORM_MODE","CONFIGURATOR","INSERT"],"snkGridTopTaskbar.finish_edition":["CANCEL","SAVE"],"snkGridTopTaskbar.finish_edition.secondary":[]}),this._headerTaskbarProcessor=new h({"snkGridHeaderTaskbar.unselected":["REFRESH","DATA_EXPORTER"],"snkGridHeaderTaskbar.selected":["UPDATE","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","REFRESH","DATA_EXPORTER"],"snkGridHeaderTaskbar.detail.unselected":["REFRESH"],"snkGridHeaderTaskbar.detail.selected":["UPDATE","CLONE","REMOVE","MORE_OPTIONS","DIVIDER","REFRESH"]}),this._dataUnit=void 0,this._dataState=void 0,this._gridConfig=void 0,this._popUpGridConfig=!1,this.configName=void 0,this.actionsList=void 0,this.isDetail=void 0,this.taskbarManager=void 0,this.statusResolver=void 0,this.multipleSelection=void 0,this.presentationMode=l.PRIMARY}async showConfig(){null!=this._grid&&this.openGridConfig()}async hideConfig(){null!=this._grid&&this.closeGridConfig()}async setConfig(i){this.setGridConfig(i)}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._snkGridConfig.selectedIndex=0,this._popUpGridConfig=!0}))}closeGridConfig(){this._popUpGridConfig=!1}setGridConfig(i){this._gridConfig=i}loadConfig(){o.get().then((i=>{i.loadGridConfig(this.configName).then((i=>{this.setGridConfig(i)})).catch((i=>{console.warn(i)}))}))}gridConfigChangeHandler(i){o.saveGridConfig(i.detail,this.configName),i.stopPropagation()}modalConfigChangeHandler(i){const t=i.detail;this._grid.setColumnsState(t.columns).then((()=>{this.setGridConfig(t),this.closeGridConfig(),this.dataExporterProviderStore()})),i.stopPropagation()}buildColumnsMetadata(i,t){return null==t||t.forEach((t=>{var s,e;if(t.hidden&&"RECDESP"!==t.name)return;const d=null===(s=this._dataUnit)||void 0===s?void 0:s.getField(t.name);if(i.push({label:t.label,id:t.name,width:t.width,type:null==d?void 0:d.dataType,userInterface:null==d?void 0:d.userInterface}),null!=(null===(e=null==d?void 0:d.properties)||void 0===e?void 0:e.DESCRIPTIONFIELD)){const t=d.properties.mergedFrom;i.push({label:d.properties.DESCRIPTIONENTITY,id:`${t?t+".":""}${d.properties.ENTITYNAME}.${d.properties.DESCRIPTIONFIELD}`,width:200,type:n.TEXT,userInterface:a.LONGTEXT})}})),i||[]}getPaginationInfo(){var i;return null===(i=this._dataUnit)||void 0===i?void 0:i.getPaginationInfo()}getExporterOffset(i){if(null==i)return;const t=i.firstRecord;return t>0?t-1:t}async dataExporterProviderStore(){var i,t;const s=[],e=await(null===(i=this._snkDataUnit)||void 0===i?void 0:i.getSelectedRecordsIDsInfo());await(null===(t=this._grid)||void 0===t?void 0:t.getColumnsState().then(this.buildColumnsMetadata.bind(this,s)));const d={getFilters:()=>{var i;return null===(i=this._dataUnit)||void 0===i?void 0:i.getAppliedFilters()},getColumnsMetadata:()=>s,getOrders:()=>{var i;return null===(i=this._dataUnit)||void 0===i?void 0:i.getSort()},getResourceURI:()=>{var i;return null===(i=this._dataUnit)||void 0===i?void 0:i.name},getSelectedNumber:()=>{var i,t;return null===(t=null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo)||void 0===t?void 0:t.length},getTotalRecords:()=>{var i,t,s;const{total:e}=(null===(i=this._dataUnit)||void 0===i?void 0:i.getPaginationInfo())||{};return null!=e?e:null===(s=null===(t=this._dataUnit)||void 0===t?void 0:t.records)||void 0===s?void 0:s.length},getSelectedIDs:()=>e||[],getOffset:()=>this.getExporterOffset(this.getPaginationInfo()),getLimit:()=>{var i;return null===(i=this._dataUnit)||void 0===i?void 0:i.pageSize},getRecordID:()=>{var i,t,s;return null===(s=null===(t=null===(i=this._dataUnit)||void 0===i?void 0:i.records)||void 0===t?void 0:t[0])||void 0===s?void 0:s.__record__id__}};c.set("exporterProviders",Object.assign(Object.assign({},c.get("exporterProviders")),{[this.configName]:d}))}addElementID(){d.addIDInfo(this._element,null,{dataUnit:this._dataUnit})}componentWillLoad(){this._application=r.getContextValue("__SNK__APPLICATION__");let i=this._element.parentElement;for(;i;){if("SNK-DATA-UNIT"===i.tagName.toUpperCase()){this._snkDataUnit=i,this._dataUnit=this._snkDataUnit.dataUnit,this._dataUnit?this.addElementID():this._snkDataUnit.addEventListener("dataUnitReady",(i=>{this._dataUnit=i.detail,this.addElementID()})),this._snkDataUnit.addEventListener("dataStateChange",(i=>{this._dataState=i.detail}));break}i=i.parentElement}this.loadConfig()}getHeaderDisabledButtons(){var i;const t=[];return(null===(i=this._dataState)||void 0===i?void 0:i.selectionInfo)&&(this._dataState.selectionInfo.length>1&&t.push("CLONE"),this._dataState.selectionInfo.isAllRecords()&&t.push("REMOVE")),t}componentWillRender(){const i=this._dataUnit&&this._dataUnit.records.length>0?[]:["DATA_EXPORTER"];let t;t=this._dataState&&this._dataState.selectedRecord?this.isDetail?"snkGridHeaderTaskbar.detail.selected":"snkGridHeaderTaskbar.selected":this.isDetail?"snkGridHeaderTaskbar.detail.unselected":"snkGridHeaderTaskbar.unselected",this._headerTaskbarProcessor.process(t,this.taskbarManager,this._dataState,this.getHeaderDisabledButtons(),i),this._topTaskbarProcessor.process(this.getTopTaskBarId(this.presentationMode===l.SECONDARY?".secondary":""),this.taskbarManager,this._dataState,void 0,i),this.dataExporterProviderStore()}getTopTaskBarId(i){var t;return(null===(t=this._dataState)||void 0===t?void 0:t.isDirty)?`snkGridTopTaskbar.finish_edition${i}`:`snkGridTopTaskbar.regular${i}`}getPrimaryButton(){return this.presentationMode===l.PRIMARY?"INSERT":""}render(){var i,t;if(this._dataUnit)return s("div",{class:"snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large"},s("div",{class:"snk-grid__header ez-margin-bottom--medium"},s("snk-filter-bar",{ref:i=>this._snkFilterBar=i,dataUnit:this._dataUnit,"data-element-id":"gridFilter",class:"snk-grid__filter-bar ez-align--top",configName:this.configName}),(null===(t=null===(i=this._snkFilterBar)||void 0===i?void 0:i.filterConfig)||void 0===t?void 0:t.length)>0&&s("hr",{class:"ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider"}),s("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:this.getPrimaryButton()})),s("ez-grid",{ref:i=>this._grid=i,class:(this.presentationMode===l.SECONDARY?"snk-grid-container__without-shadow ":"")+"snk-grid__table","data-element-id":"embedded",dataUnit:this._dataUnit,key:"grid-"+this._snkDataUnit.entityName,config:this._gridConfig,onConfigChange:i=>{this.gridConfigChangeHandler(i)},onEzDoubleClick:()=>this.gridDoubleClick.emit(),statusResolver:this.statusResolver,multipleSelection:this.multipleSelection},s("snk-taskbar",{dataUnit:this._dataUnit,configName:this.configName,"data-element-id":"grid_left",buttons:this._headerTaskbarProcessor.buttons,disabledButtons:this._headerTaskbarProcessor.disabledButtons,customButtons:this._headerTaskbarProcessor.customButtons,slot:"leftButtons",actionsList:this.actionsList})),s("div",{class:"ez-col ez-col--sd-12"},s("slot",{name:"SnkGridFooter"})),s("ez-modal",{modalSize:"small",closeEsc:!1,closeOutsideClick:!1,opened:this._popUpGridConfig,onEzCloseModal:()=>this.closeGridConfig()},s("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this._gridConfig,"data-element-id":this._element.getAttribute(d.DATA_ELEMENT_ID_ATTRIBUTE_NAME),application:this._application,selectedIndex:0,configName:this.configName,onConfigChange:i=>this.modalConfigChangeHandler(i),onConfigCancel:()=>this.closeGridConfig()})))}get _element(){return e(this)}};u.style=".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:300px}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";export{u as snk_grid}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as e,c as s,h as i,g as t}from"./p-b9667fbe.js";import{ElementIDUtils as l}from"@sankhyalabs/core";const a=class{constructor(i){e(this,i),this.clickBreadcrumbItem=s(this,"clickBreadcrumbItem",3),this.exit=s(this,"exit",3),this.label=void 0,this.breadcrumbItens=void 0}componentDidLoad(){this._element&&l.addIDInfo(this._element)}render(){return i("div",{class:"simple-bar__container ez-margin-vertical--medium ez-padding--extra-small"},i("div",{class:"simple-bar__left-slot"},i("ez-button",{class:"ez-padding-right--medium",mode:"icon",iconName:"arrow_back",size:"medium",onClick:()=>this.exit.emit()}),i("div",{class:"simple-bar__column"},i("h1",{class:"ez-title ez-title--primary ez-title--extra-large"},this.label),i("ez-breadcrumb",{items:this.breadcrumbItens,onSelectedItem:({detail:e})=>this.clickBreadcrumbItem.emit(e)}))),i("div",{class:"simple-bar__right-slot"},i("slot",{name:"rightSlot"})))}get _element(){return t(this)}};a.style=".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";export{a as snk_simple_bar}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as e,b as t}from"./p-b9667fbe.js";export{s as setNonce}from"./p-b9667fbe.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-8bd60ba6",[[6,"snk-simple-crud",{dataState:[16],dataUnit:[16],mode:[2],taskbarManager:[16],_currentViewMode:[32],_config:[32],goToView:[64],setMetadata:[64],setRecords:[64],getRecords:[64]},[[0,"actionClick","actionClickListener"]]]]],["p-e551b19a",[[1,"teste-pesquisa"]]],["p-86d29b6f",[[0,"snk-filter-binary-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-79d22df0",[[2,"snk-filter-field-search",{searchable:[4],breadcrumbItems:[32],linkItems:[32],fieldItems:[32],setDataSource:[64],filterDataSource:[64]}]]],["p-ee82c157",[[0,"snk-filter-multi-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-ad51bf1c",[[0,"snk-filter-number",{config:[16],value:[2],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-0154ae58",[[2,"snk-filter-param-config",{_opened:[32],_configType:[32],_expressionItem:[32],_informedInstance:[32],_canSave:[32],open:[64],close:[64]}]]],["p-5fc55684",[[0,"snk-filter-period",{config:[16],value:[8],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d5c9c1f8",[[0,"snk-filter-personalized",{config:[16],value:[1040],fix:[16],unfix:[16],show:[64]}]]],["p-5e62a17b",[[0,"snk-filter-search",{config:[16],value:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-c336170d",[[0,"snk-filter-text",{config:[16],value:[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-
|
1
|
+
import{p as e,b as t}from"./p-b9667fbe.js";export{s as setNonce}from"./p-b9667fbe.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-8bd60ba6",[[6,"snk-simple-crud",{dataState:[16],dataUnit:[16],mode:[2],taskbarManager:[16],_currentViewMode:[32],_config:[32],goToView:[64],setMetadata:[64],setRecords:[64],getRecords:[64]},[[0,"actionClick","actionClickListener"]]]]],["p-e551b19a",[[1,"teste-pesquisa"]]],["p-86d29b6f",[[0,"snk-filter-binary-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-79d22df0",[[2,"snk-filter-field-search",{searchable:[4],breadcrumbItems:[32],linkItems:[32],fieldItems:[32],setDataSource:[64],filterDataSource:[64]}]]],["p-ee82c157",[[0,"snk-filter-multi-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-ad51bf1c",[[0,"snk-filter-number",{config:[16],value:[2],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-0154ae58",[[2,"snk-filter-param-config",{_opened:[32],_configType:[32],_expressionItem:[32],_informedInstance:[32],_canSave:[32],open:[64],close:[64]}]]],["p-5fc55684",[[0,"snk-filter-period",{config:[16],value:[8],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d5c9c1f8",[[0,"snk-filter-personalized",{config:[16],value:[1040],fix:[16],unfix:[16],show:[64]}]]],["p-5e62a17b",[[0,"snk-filter-search",{config:[16],value:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-c336170d",[[0,"snk-filter-text",{config:[16],value:[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-b3e71248",[[6,"snk-simple-bar",{label:[1],breadcrumbItens:[16]}]]],["p-0abc00e7",[[2,"snk-detail-view",{formConfigManager:[1040],dataUnitName:[1,"data-unit-name"],guideItemPath:[16],entityName:[1,"entity-name"],label:[1],dataUnit:[1040],selectedForm:[1025,"selected-form"],dataState:[1040],_disabledButtons:[32],changeViewMode:[64],configGrid:[64],showUp:[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-31d4e5d4",[[2,"snk-configurator",{configName:[1,"config-name"],viewMode:[2,"view-mode"],_opened:[32],_permissions:[32],open:[64],close:[64]}]]],["p-e701646c",[[2,"snk-pesquisa",{searchLoader:[16],selectItem:[16],argument:[1025],_itemList:[32],_startLoading:[32]}]]],["p-840494aa",[[2,"snk-filter-bar",{dataUnit:[1040],configName:[1,"config-name"],filterConfig:[1040],allowDefault:[32],scrollerLocked:[32]},[[0,"filterChange","filterChangeListener"]]]]],["p-89cf5a29",[[2,"snk-grid-config",{selectedIndex:[1026,"selected-index"],application:[16],columns:[1040],config:[1040],configName:[1,"config-name"]}]]],["p-af8cf505",[[2,"snk-config-options",{fieldConfig:[16],idConfig:[513,"id-config"],dataUnit:[16],_defaultType:[32]}]]],["p-94fef424",[[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]}]]],["p-f9ca6d74",[[2,"snk-field-config",{isConfigActive:[16],fieldConfig:[16],modeInsertion:[516,"mode-insertion"],dataUnit:[16]}]]],["p-c88c4f80",[[6,"snk-tab-config",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],_processedTabs:[32],_activeEditText:[32],_activeEditTextIndex:[32],_actionsHide:[32],_actionsShow:[32]}]]],["p-5a0ef952",[[2,"snk-form-config",{dataUnit:[16],configManager:[16],_formConfigOptions:[32],_fieldConfigSelected:[32],_layoutFormConfig:[32],_fieldsAvailable:[32],_formConfig:[32],_formConfigChanged:[32],_optionFormConfigSelected:[32],_optionFormConfigChanged:[32],_tempGroups:[32]}]]],["p-eb7b2496",[[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]}]]],["p-3a2ce158",[[0,"snk-filter-item",{config:[1040],getMessage:[16],detailIsVisible:[32],showUp:[64],hideDetail:[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-093febff",[[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"]]]]],["p-3169584f",[[1,"snk-select-box",{selectedOption:[1,"selected-option"]}]]],["p-22e44b9d",[[0,"snk-exporter-email-sender",{getMessage:[16],_config:[32],_opened:[32],_currentStep:[32],open:[64],close:[64]}]]],["p-3a426d45",[[2,"snk-data-exporter",{provider:[16],_items:[32],_showDropdown:[32],_releasedToExport:[32]}]]],["p-97486e9f",[[2,"snk-guides-viewer",{dataUnit:[16],dataState:[16],configName:[1,"config-name"],entityPath:[1,"entity-path"],actionsList:[16],recordsValidator:[16],masterFormConfig:[1040],selectedGuide:[16],taskbarManager:[16],presentationMode:[1,"presentation-mode"],_breadcrumbItems:[32],_guides:[32],_formEditorConfigManager:[32],_formEditorDataUnit:[32],showFormConfig:[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-e9603900",[[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],_currentViewMode:[32],goToView:[64]}]]],["p-8899a7ea",[[2,"snk-form",{configName:[1,"config-name"],recordsValidator:[16],_dataUnit:[32],_dataState:[32],_showFormConfig:[32],_configManager:[32],showConfig:[64],hideConfig:[64]}]]],["p-64afbfc9",[[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],updateDataunitCache:[64],getDataUnit:[64],addClientEvent:[64],removeClientEvent:[64],hasClientEvent:[64],getResourceID:[64],getUserID:[64],alert:[64],error:[64],success:[64],message:[64],confirm:[64],info:[64],loadGridConfig:[64],loadTotals:[64],executeSearch:[64],executePreparedSearch:[64],isDebugMode:[64],getAppLabel:[64],addSearchListener:[64]}]]],["p-afba9bbe",[[0,"snk-filter-detail",{config:[1040],getMessage:[16],show:[64]}]]],["p-8f359cbf",[[6,"snk-grid",{configName:[1,"config-name"],actionsList:[16],isDetail:[4,"is-detail"],taskbarManager:[16],statusResolver:[16],multipleSelection:[4,"multiple-selection"],presentationMode:[1,"presentation-mode"],_dataUnit:[32],_dataState:[32],_gridConfig:[32],_popUpGridConfig:[32],showConfig:[64],hideConfig:[64],setConfig:[64]}]]],["p-900b2889",[[2,"snk-form-summary",{fixed:[1540],contracted:[1540],summary:[16]}]]],["p-9ebb164d",[[6,"snk-form-view",{levelPath:[1,"level-path"],label:[1],name:[1],fields:[16],formMetadata:[8,"form-metadata"],dataUnit:[16],contracted:[4],fixed:[1540],summaryFields:[16],canExpand:[4,"can-expand"],canFix:[4,"can-fix"],recordsValidator:[16],showUp:[64]}]]],["p-73e830cf",[[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]}]]]],e)));
|
@@ -28,6 +28,10 @@ export declare class SnkGrid {
|
|
28
28
|
* Lista de ações que devem ser usadas no botão "Mais opções" do componente snk-taskbar.
|
29
29
|
*/
|
30
30
|
actionsList: Array<Action>;
|
31
|
+
/**
|
32
|
+
* Determina se a grade está vinculada a um detalhe.
|
33
|
+
*/
|
34
|
+
isDetail: boolean;
|
31
35
|
/**
|
32
36
|
* Gerenciador das barras de tarefas. É possível determinar botões específicos
|
33
37
|
* ou mesmo gerenciar o estado dos botões.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
2
|
+
import { IBreadcrumbItem } from "@sankhyalabs/ezui/dist/types/components/ez-breadcrumb/ez-breadcrumb";
|
3
|
+
export declare class SnkSimpleBar {
|
4
|
+
private _element;
|
5
|
+
/**
|
6
|
+
* Define o título do header
|
7
|
+
*/
|
8
|
+
label: string;
|
9
|
+
/**
|
10
|
+
* Define os itens que serão apresentados pelo breadcrumb
|
11
|
+
*/
|
12
|
+
breadcrumbItens: Array<IBreadcrumbItem>;
|
13
|
+
/**
|
14
|
+
* Emitido quando algum item do breadcrumb é clicado
|
15
|
+
*/
|
16
|
+
clickBreadcrumbItem: EventEmitter<IBreadcrumbItem>;
|
17
|
+
/**
|
18
|
+
* Emitido quando o botão voltar é acionado
|
19
|
+
*/
|
20
|
+
exit: EventEmitter<void>;
|
21
|
+
componentDidLoad(): void;
|
22
|
+
render(): any;
|
23
|
+
}
|
@@ -38,6 +38,7 @@ import { IFormViewField } from "@sankhyalabs/ezui/dist/types/components/ez-form-
|
|
38
38
|
import { FormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
39
39
|
import { PresentationMode as PresentationMode1 } from "./lib/@types";
|
40
40
|
import { SnkApplication } from "./components/snk-application/snk-application";
|
41
|
+
import { IBreadcrumbItem } from "@sankhyalabs/ezui/dist/types/components/ez-breadcrumb/ez-breadcrumb";
|
41
42
|
import { ITab } from "./components/snk-form/subcomponents/snk-tab-config/snk-tab-config";
|
42
43
|
import { Action as Action1, CustomButton } from "./components/snk-taskbar/snk-taskbar";
|
43
44
|
export namespace Components {
|
@@ -736,6 +737,10 @@ export namespace Components {
|
|
736
737
|
* Fecha a janela de configurações da grade.
|
737
738
|
*/
|
738
739
|
"hideConfig": () => Promise<void>;
|
740
|
+
/**
|
741
|
+
* Determina se a grade está vinculada a um detalhe.
|
742
|
+
*/
|
743
|
+
"isDetail": boolean;
|
739
744
|
/**
|
740
745
|
* Determina se pode haver mais de uma linha selecionada.
|
741
746
|
*/
|
@@ -850,6 +855,16 @@ export namespace Components {
|
|
850
855
|
*/
|
851
856
|
"selectedOption": IOption | string;
|
852
857
|
}
|
858
|
+
interface SnkSimpleBar {
|
859
|
+
/**
|
860
|
+
* Define os itens que serão apresentados pelo breadcrumb
|
861
|
+
*/
|
862
|
+
"breadcrumbItens": Array<IBreadcrumbItem>;
|
863
|
+
/**
|
864
|
+
* Define o título do header
|
865
|
+
*/
|
866
|
+
"label": string;
|
867
|
+
}
|
853
868
|
interface SnkSimpleCrud {
|
854
869
|
"dataState": DataState1;
|
855
870
|
"dataUnit": DataUnit;
|
@@ -989,6 +1004,10 @@ export interface SnkSelectBoxCustomEvent<T> extends CustomEvent<T> {
|
|
989
1004
|
detail: T;
|
990
1005
|
target: HTMLSnkSelectBoxElement;
|
991
1006
|
}
|
1007
|
+
export interface SnkSimpleBarCustomEvent<T> extends CustomEvent<T> {
|
1008
|
+
detail: T;
|
1009
|
+
target: HTMLSnkSimpleBarElement;
|
1010
|
+
}
|
992
1011
|
export interface SnkSimpleCrudCustomEvent<T> extends CustomEvent<T> {
|
993
1012
|
detail: T;
|
994
1013
|
target: HTMLSnkSimpleCrudElement;
|
@@ -1194,6 +1213,12 @@ declare global {
|
|
1194
1213
|
prototype: HTMLSnkSelectBoxElement;
|
1195
1214
|
new (): HTMLSnkSelectBoxElement;
|
1196
1215
|
};
|
1216
|
+
interface HTMLSnkSimpleBarElement extends Components.SnkSimpleBar, HTMLStencilElement {
|
1217
|
+
}
|
1218
|
+
var HTMLSnkSimpleBarElement: {
|
1219
|
+
prototype: HTMLSnkSimpleBarElement;
|
1220
|
+
new (): HTMLSnkSimpleBarElement;
|
1221
|
+
};
|
1197
1222
|
interface HTMLSnkSimpleCrudElement extends Components.SnkSimpleCrud, HTMLStencilElement {
|
1198
1223
|
}
|
1199
1224
|
var HTMLSnkSimpleCrudElement: {
|
@@ -1251,6 +1276,7 @@ declare global {
|
|
1251
1276
|
"snk-guides-viewer": HTMLSnkGuidesViewerElement;
|
1252
1277
|
"snk-pesquisa": HTMLSnkPesquisaElement;
|
1253
1278
|
"snk-select-box": HTMLSnkSelectBoxElement;
|
1279
|
+
"snk-simple-bar": HTMLSnkSimpleBarElement;
|
1254
1280
|
"snk-simple-crud": HTMLSnkSimpleCrudElement;
|
1255
1281
|
"snk-tab-config": HTMLSnkTabConfigElement;
|
1256
1282
|
"snk-taskbar": HTMLSnkTaskbarElement;
|
@@ -1778,6 +1804,10 @@ declare namespace LocalJSX {
|
|
1778
1804
|
* Nome usado para salvar/recuperar a configuração.
|
1779
1805
|
*/
|
1780
1806
|
"configName"?: string;
|
1807
|
+
/**
|
1808
|
+
* Determina se a grade está vinculada a um detalhe.
|
1809
|
+
*/
|
1810
|
+
"isDetail"?: boolean;
|
1781
1811
|
/**
|
1782
1812
|
* Determina se pode haver mais de uma linha selecionada.
|
1783
1813
|
*/
|
@@ -1907,6 +1937,24 @@ declare namespace LocalJSX {
|
|
1907
1937
|
*/
|
1908
1938
|
"selectedOption"?: IOption | string;
|
1909
1939
|
}
|
1940
|
+
interface SnkSimpleBar {
|
1941
|
+
/**
|
1942
|
+
* Define os itens que serão apresentados pelo breadcrumb
|
1943
|
+
*/
|
1944
|
+
"breadcrumbItens"?: Array<IBreadcrumbItem>;
|
1945
|
+
/**
|
1946
|
+
* Define o título do header
|
1947
|
+
*/
|
1948
|
+
"label"?: string;
|
1949
|
+
/**
|
1950
|
+
* Emitido quando algum item do breadcrumb é clicado
|
1951
|
+
*/
|
1952
|
+
"onClickBreadcrumbItem"?: (event: SnkSimpleBarCustomEvent<IBreadcrumbItem>) => void;
|
1953
|
+
/**
|
1954
|
+
* Emitido quando o botão voltar é acionado
|
1955
|
+
*/
|
1956
|
+
"onExit"?: (event: SnkSimpleBarCustomEvent<void>) => void;
|
1957
|
+
}
|
1910
1958
|
interface SnkSimpleCrud {
|
1911
1959
|
"dataState"?: DataState1;
|
1912
1960
|
"dataUnit"?: DataUnit;
|
@@ -2035,6 +2083,7 @@ declare namespace LocalJSX {
|
|
2035
2083
|
"snk-guides-viewer": SnkGuidesViewer;
|
2036
2084
|
"snk-pesquisa": SnkPesquisa;
|
2037
2085
|
"snk-select-box": SnkSelectBox;
|
2086
|
+
"snk-simple-bar": SnkSimpleBar;
|
2038
2087
|
"snk-simple-crud": SnkSimpleCrud;
|
2039
2088
|
"snk-tab-config": SnkTabConfig;
|
2040
2089
|
"snk-taskbar": SnkTaskbar;
|
@@ -2077,6 +2126,7 @@ declare module "@stencil/core" {
|
|
2077
2126
|
"snk-guides-viewer": LocalJSX.SnkGuidesViewer & JSXBase.HTMLAttributes<HTMLSnkGuidesViewerElement>;
|
2078
2127
|
"snk-pesquisa": LocalJSX.SnkPesquisa & JSXBase.HTMLAttributes<HTMLSnkPesquisaElement>;
|
2079
2128
|
"snk-select-box": LocalJSX.SnkSelectBox & JSXBase.HTMLAttributes<HTMLSnkSelectBoxElement>;
|
2129
|
+
"snk-simple-bar": LocalJSX.SnkSimpleBar & JSXBase.HTMLAttributes<HTMLSnkSimpleBarElement>;
|
2080
2130
|
"snk-simple-crud": LocalJSX.SnkSimpleCrud & JSXBase.HTMLAttributes<HTMLSnkSimpleCrudElement>;
|
2081
2131
|
"snk-tab-config": LocalJSX.SnkTabConfig & JSXBase.HTMLAttributes<HTMLSnkTabConfigElement>;
|
2082
2132
|
"snk-taskbar": LocalJSX.SnkTaskbar & JSXBase.HTMLAttributes<HTMLSnkTaskbarElement>;
|
package/package.json
CHANGED
package/react/components.d.ts
CHANGED
@@ -32,6 +32,7 @@ export declare const SnkGridConfig: import("react").ForwardRefExoticComponent<JS
|
|
32
32
|
export declare const SnkGuidesViewer: import("react").ForwardRefExoticComponent<JSX.SnkGuidesViewer & Omit<import("react").HTMLAttributes<HTMLSnkGuidesViewerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkGuidesViewerElement>>;
|
33
33
|
export declare const SnkPesquisa: import("react").ForwardRefExoticComponent<JSX.SnkPesquisa & Omit<import("react").HTMLAttributes<HTMLSnkPesquisaElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkPesquisaElement>>;
|
34
34
|
export declare const SnkSelectBox: import("react").ForwardRefExoticComponent<JSX.SnkSelectBox & Omit<import("react").HTMLAttributes<HTMLSnkSelectBoxElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkSelectBoxElement>>;
|
35
|
+
export declare const SnkSimpleBar: import("react").ForwardRefExoticComponent<JSX.SnkSimpleBar & Omit<import("react").HTMLAttributes<HTMLSnkSimpleBarElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkSimpleBarElement>>;
|
35
36
|
export declare const SnkSimpleCrud: import("react").ForwardRefExoticComponent<JSX.SnkSimpleCrud & Omit<import("react").HTMLAttributes<HTMLSnkSimpleCrudElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkSimpleCrudElement>>;
|
36
37
|
export declare const SnkTabConfig: import("react").ForwardRefExoticComponent<JSX.SnkTabConfig & Omit<import("react").HTMLAttributes<HTMLSnkTabConfigElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkTabConfigElement>>;
|
37
38
|
export declare const SnkTaskbar: import("react").ForwardRefExoticComponent<JSX.SnkTaskbar & Omit<import("react").HTMLAttributes<HTMLSnkTaskbarElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLSnkTaskbarElement>>;
|
package/react/components.js
CHANGED
@@ -34,6 +34,7 @@ export const SnkGridConfig = /*@__PURE__*/ createReactComponent('snk-grid-config
|
|
34
34
|
export const SnkGuidesViewer = /*@__PURE__*/ createReactComponent('snk-guides-viewer');
|
35
35
|
export const SnkPesquisa = /*@__PURE__*/ createReactComponent('snk-pesquisa');
|
36
36
|
export const SnkSelectBox = /*@__PURE__*/ createReactComponent('snk-select-box');
|
37
|
+
export const SnkSimpleBar = /*@__PURE__*/ createReactComponent('snk-simple-bar');
|
37
38
|
export const SnkSimpleCrud = /*@__PURE__*/ createReactComponent('snk-simple-crud');
|
38
39
|
export const SnkTabConfig = /*@__PURE__*/ createReactComponent('snk-tab-config');
|
39
40
|
export const SnkTaskbar = /*@__PURE__*/ createReactComponent('snk-taskbar');
|