@sankhyalabs/sankhyablocks 1.4.0-beta.5 → 1.4.0-beta.7
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 +37 -2
- package/dist/cjs/snk-filter-bar_5.cjs.entry.js +122 -36
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +14 -3
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +14 -7
- package/dist/cjs/snk-filter-search.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +1 -1
- package/dist/collection/components/snk-application/snk-application.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +23 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +24 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +24 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +23 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +34 -7
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +23 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +34 -3
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +37 -15
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +82 -8
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +30 -5
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +17 -4
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +18 -8
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +35 -0
- package/dist/components/snk-application2.js +37 -2
- package/dist/components/snk-filter-bar2.js +19 -9
- package/dist/components/snk-filter-binary-select.js +5 -1
- package/dist/components/snk-filter-detail2.js +16 -4
- package/dist/components/snk-filter-item2.js +23 -16
- package/dist/components/snk-filter-list2.js +56 -10
- package/dist/components/snk-filter-modal2.js +30 -5
- package/dist/components/snk-filter-multi-select.js +6 -2
- package/dist/components/snk-filter-number.js +6 -2
- package/dist/components/snk-filter-period.js +5 -1
- package/dist/components/snk-filter-personalized.js +16 -8
- package/dist/components/snk-filter-search.js +5 -1
- package/dist/components/snk-filter-text.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +37 -2
- package/dist/esm/snk-filter-bar_5.entry.js +122 -36
- package/dist/esm/snk-filter-binary-select.entry.js +3 -0
- package/dist/esm/snk-filter-detail.entry.js +14 -3
- package/dist/esm/snk-filter-multi-select.entry.js +4 -1
- package/dist/esm/snk-filter-number.entry.js +4 -1
- package/dist/esm/snk-filter-period.entry.js +3 -0
- package/dist/esm/snk-filter-personalized.entry.js +14 -7
- package/dist/esm/snk-filter-search.entry.js +3 -0
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/sankhyablocks/{p-01823784.entry.js → p-0ea25487.entry.js} +1 -1
- package/dist/sankhyablocks/p-21e940aa.entry.js +1 -0
- package/dist/sankhyablocks/p-40b27004.entry.js +1 -0
- package/dist/sankhyablocks/{p-c564f823.entry.js → p-42036db1.entry.js} +13 -3
- package/dist/sankhyablocks/p-4574a955.entry.js +1 -0
- package/dist/sankhyablocks/p-49580cdd.entry.js +1 -0
- package/dist/sankhyablocks/p-5bdb8452.entry.js +1 -0
- package/dist/sankhyablocks/p-6386d720.entry.js +1 -0
- package/dist/sankhyablocks/p-a14c49db.entry.js +1 -0
- package/dist/sankhyablocks/p-ba426ea9.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +7 -2
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -2
- package/dist/types/components.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +1 -0
- package/package.json +3 -3
- package/dist/sankhyablocks/p-07ebda01.entry.js +0 -1
- package/dist/sankhyablocks/p-46caa101.entry.js +0 -1
- package/dist/sankhyablocks/p-6f8303f3.entry.js +0 -1
- package/dist/sankhyablocks/p-746fc78b.entry.js +0 -1
- package/dist/sankhyablocks/p-c1c3b5d8.entry.js +0 -1
- package/dist/sankhyablocks/p-c9eec639.entry.js +0 -1
- package/dist/sankhyablocks/p-eea6444c.entry.js +0 -1
- package/dist/sankhyablocks/p-fb705f81.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32]}],[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]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
17
|
+
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-bar_5.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32]}],[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]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
18
|
+
return index.bootstrapLazy([["snk-crud.cjs",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa.cjs",[[1,"teste-pesquisa"]]],["snk-data-unit.cjs",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select.cjs",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select.cjs",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number.cjs",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period.cjs",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized.cjs",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"show":[64]}]]],["snk-filter-search.cjs",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text.cjs",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa.cjs",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application.cjs",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"alert":[64],"error":[64],"success":[64],"message":[64],"confirm":[64],"info":[64],"loadFormConfig":[64],"loadGridConfig":[64],"loadTotals":[64],"saveGridConfig":[64],"getFilterBarConfig":[64],"saveFilterBarConfig":[64],"executeSearch":[64],"executePreparedSearch":[64],"isDebugMode":[64]}]]],["snk-filter-detail.cjs",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-bar_5.cjs",[[2,"snk-filter-bar",{"dataUnit":[1040],"configName":[1,"config-name"],"filterConfig":[1040],"allowDefault":[32]},[[0,"filterChange","filterChangeListener"]]],[0,"snk-filter-item",{"config":[1040],"getMessage":[16],"detailIsVisible":[32],"showUp":[64],"hideDetail":[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]],[4,"snk-filter-list",{"label":[1],"iconName":[1,"icon-name"],"items":[16],"getMessage":[16],"emptyText":[1,"empty-text"],"findFilterText":[1,"find-filter-text"],"buttonClass":[1,"button-class"],"_filterArgument":[32],"_showAll":[32],"hideDetail":[64]},[[2,"keydown","keyDownHandler"]]],[0,"snk-filter-modal",{"getMessage":[16],"items":[1040],"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"infoText":[1,"info-text"],"useSearch":[4,"use-search"],"processModalAction":[16],"_filterArgument":[32]}],[6,"snk-taskbar",{"buttons":[1],"customButtons":[16],"actionsList":[16],"primaryButton":[1,"primary-button"],"disabledButtons":[16],"dataUnit":[16],"_permissions":[32]}]]],["snk-form_2.cjs",[[6,"snk-grid",{"configName":[1,"config-name"],"actionsList":[16],"taskbarManager":[16],"statusResolver":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_gridConfig":[32]}],[2,"snk-form",{"configName":[1,"config-name"],"recordsValidator":[16],"actionsList":[16],"taskbarManager":[16],"_dataUnit":[32],"_configLoaded":[32],"_dataState":[32],"_editionFormConfig":[32],"_insertionFormConfig":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -6773,6 +6773,17 @@ class DataUnitFetcher {
|
|
|
6773
6773
|
}
|
|
6774
6774
|
}
|
|
6775
6775
|
}`);
|
|
6776
|
+
this.templateByQuery.set("fetchDataRecord", dist.gql `query($dataunit: String! $recordID: [String!]) {
|
|
6777
|
+
$queryAlias$: fetchDataUnit(name: $dataunit){
|
|
6778
|
+
record(id: $recordID){
|
|
6779
|
+
id
|
|
6780
|
+
fields {
|
|
6781
|
+
name
|
|
6782
|
+
value
|
|
6783
|
+
}
|
|
6784
|
+
}
|
|
6785
|
+
}
|
|
6786
|
+
}`);
|
|
6776
6787
|
}
|
|
6777
6788
|
getDataUnit(entityName, resourceID) {
|
|
6778
6789
|
const dataUnit = new core.DataUnit(`dd://${entityName}/${resourceID}`);
|
|
@@ -6780,6 +6791,7 @@ class DataUnitFetcher {
|
|
|
6780
6791
|
dataUnit.dataLoader = (dataUnit, request) => this.loadData(dataUnit, request);
|
|
6781
6792
|
dataUnit.saveLoader = (dataUnit, changes) => this.saveData(dataUnit, changes);
|
|
6782
6793
|
dataUnit.removeLoader = (dataUnit, recordIds) => this.removeRecords(dataUnit, recordIds);
|
|
6794
|
+
dataUnit.recordLoader = (dataUnit, recordIds) => this.loadRecord(dataUnit, recordIds);
|
|
6783
6795
|
return dataUnit;
|
|
6784
6796
|
}
|
|
6785
6797
|
loadMetadata(dataUnit) {
|
|
@@ -6948,6 +6960,29 @@ class DataUnitFetcher {
|
|
|
6948
6960
|
});
|
|
6949
6961
|
});
|
|
6950
6962
|
}
|
|
6963
|
+
loadRecord(dataUnit, recordIds) {
|
|
6964
|
+
return new Promise((resolve, reject) => {
|
|
6965
|
+
DataFetcher.get()
|
|
6966
|
+
.callGraphQL({
|
|
6967
|
+
values: { recordID: recordIds, dataunit: dataUnit.name },
|
|
6968
|
+
query: this.templateByQuery.get("fetchDataRecord"),
|
|
6969
|
+
})
|
|
6970
|
+
.then((response) => {
|
|
6971
|
+
const dataUnitRecords = [];
|
|
6972
|
+
response.record.forEach(responseRecord => {
|
|
6973
|
+
const duRecord = { __record__id__: responseRecord.id };
|
|
6974
|
+
responseRecord.fields.forEach(({ name, value }) => {
|
|
6975
|
+
duRecord[name] = dataUnit.valueFromString(name, value);
|
|
6976
|
+
});
|
|
6977
|
+
dataUnitRecords.push(duRecord);
|
|
6978
|
+
});
|
|
6979
|
+
resolve(dataUnitRecords);
|
|
6980
|
+
})
|
|
6981
|
+
.catch((error) => {
|
|
6982
|
+
reject(error);
|
|
6983
|
+
});
|
|
6984
|
+
});
|
|
6985
|
+
}
|
|
6951
6986
|
}
|
|
6952
6987
|
|
|
6953
6988
|
var _a;
|
|
@@ -7280,7 +7315,7 @@ class SnkErrorHandler {
|
|
|
7280
7315
|
return '<br><a href="#" onclick="' + onclick + '">Código: ' + exception.errorCode + '</a>';
|
|
7281
7316
|
}
|
|
7282
7317
|
processException(exception) {
|
|
7283
|
-
if (exception.errorCode
|
|
7318
|
+
if (exception.errorCode) {
|
|
7284
7319
|
exception.message += this.buildErrorCodeHTML(exception);
|
|
7285
7320
|
}
|
|
7286
7321
|
if (exception instanceof core.WaitingChangeException) {
|
|
@@ -7955,7 +7990,7 @@ const SnkApplication = class {
|
|
|
7955
7990
|
});
|
|
7956
7991
|
}
|
|
7957
7992
|
render() {
|
|
7958
|
-
return (index.h("div", null, index.h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), index.h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), index.h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "col col--sd-3", closeOutsideClick: true })));
|
|
7993
|
+
return (index.h("div", null, index.h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), index.h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), index.h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "col col--sd-3", closeOutsideClick: true, closeEsc: true })));
|
|
7959
7994
|
}
|
|
7960
7995
|
};
|
|
7961
7996
|
class RequestListenerLoadingBar {
|
|
@@ -106,11 +106,13 @@ function buildPersonalized(item) {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;z-index:var(--more-visible, 1);background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;
|
|
109
|
+
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;z-index:var(--more-visible, 1);background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:100%;height:100%}";
|
|
110
110
|
|
|
111
111
|
const PERSONALIZED_FILTER = "PERSONALIZED_FILTER";
|
|
112
112
|
const DEFAULT_FILTER = "DEFAULT_FILTER";
|
|
113
113
|
const CLEAR_ALL_FILTERS = "CLEAR_ALL_FILTERS";
|
|
114
|
+
const ADD_FILTER = "ADD_FILTER";
|
|
115
|
+
const APPLIED_FILTERS = "APPLIED_FILTERS";
|
|
114
116
|
const SnkFilterBar = class {
|
|
115
117
|
constructor(hostRef) {
|
|
116
118
|
index.registerInstance(this, hostRef);
|
|
@@ -209,13 +211,26 @@ const SnkFilterBar = class {
|
|
|
209
211
|
this.dataUnit.loadData();
|
|
210
212
|
}
|
|
211
213
|
}
|
|
214
|
+
itemFocused(selectedItem) {
|
|
215
|
+
this._element.querySelectorAll("snk-filter-item,snk-filter-list").forEach(item => {
|
|
216
|
+
if (item.id === selectedItem) {
|
|
217
|
+
if (item.tagName.toLowerCase() === "snk-filter-item" && item.getClientRects()[0].x < 0) {
|
|
218
|
+
item.scrollIntoView({ behavior: "auto", inline: 'nearest' });
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
item["hideDetail"]();
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
}
|
|
212
226
|
getFilterItems() {
|
|
213
227
|
const pinnedItems = [];
|
|
214
228
|
const unpinnedItems = [];
|
|
215
229
|
this.filterConfig
|
|
216
230
|
.filter(item => item.visible)
|
|
217
231
|
.forEach((item, index$1) => {
|
|
218
|
-
const
|
|
232
|
+
const itemId = `filter-${item.id}`;
|
|
233
|
+
const filterItem = (index.h("snk-filter-item", { onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class: index$1 > 0 ? "ez-padding-left--medium" : "", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
|
|
219
234
|
if (item.fixed || item.hardFixed) {
|
|
220
235
|
pinnedItems.push(filterItem);
|
|
221
236
|
}
|
|
@@ -419,13 +434,8 @@ const SnkFilterBar = class {
|
|
|
419
434
|
this.openDefaultFilterModal();
|
|
420
435
|
}
|
|
421
436
|
else if (filterItem) {
|
|
437
|
+
this._pendingFilters.push(itemName);
|
|
422
438
|
this.updateFilter(Object.assign(Object.assign({}, filterItem), { visible: true }));
|
|
423
|
-
window.requestAnimationFrame(() => {
|
|
424
|
-
const filterItemElement = this._element.querySelector("#filter-" + itemName);
|
|
425
|
-
if (filterItemElement) {
|
|
426
|
-
filterItemElement.showUp();
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
439
|
}
|
|
430
440
|
}
|
|
431
441
|
appliedFilterHandler(itemName) {
|
|
@@ -456,7 +466,7 @@ const SnkFilterBar = class {
|
|
|
456
466
|
if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
|
|
457
467
|
return undefined;
|
|
458
468
|
}
|
|
459
|
-
return (index.h(index.Host, null, index.h("ez-scroller", { direction: "horizontal" }, this.getFilterItems()), index.h("snk-filter-list", { items: this.getAppliedListItems(), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyAppliedFiltersList"), findFilterText: this.getMessage("snkFilterBar.findFilter"), iconName: "filter", class: "ez-padding-left--medium", buttonClass: this.getActiveClass(), onSnkItemSelected: evt => this.appliedFilterHandler(evt.detail) }), index.h("snk-filter-list", { items: this.getAddListItems(), label: this.getMessage("snkFilterBar.addFilter"), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyFiltersList"), findFilterText: this.getMessage("snkFilterBar.findField"), class: "ez-padding-left--medium", onSnkItemSelected: evt => this.addFilterHandler(evt.detail) }, index.h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
|
|
469
|
+
return (index.h(index.Host, null, index.h("ez-scroller", { direction: "horizontal" }, this.getFilterItems()), index.h("snk-filter-list", { id: APPLIED_FILTERS, onFocusin: () => this.itemFocused(APPLIED_FILTERS), items: this.getAppliedListItems(), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyAppliedFiltersList"), findFilterText: this.getMessage("snkFilterBar.findFilter"), iconName: "filter", class: "ez-padding-left--medium", buttonClass: this.getActiveClass(), onSnkItemSelected: evt => this.appliedFilterHandler(evt.detail) }), index.h("snk-filter-list", { id: ADD_FILTER, onFocusin: () => this.itemFocused(ADD_FILTER), items: this.getAddListItems(), label: this.getMessage("snkFilterBar.addFilter"), getMessage: (key, params) => this.getMessage(key, params), emptyText: this.getMessage("snkFilterBar.emptyFiltersList"), findFilterText: this.getMessage("snkFilterBar.findField"), class: "ez-padding-left--medium", onSnkItemSelected: evt => this.addFilterHandler(evt.detail) }, index.h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
|
|
460
470
|
}
|
|
461
471
|
get _element() { return index.getElement(this); }
|
|
462
472
|
static get watchers() { return {
|
|
@@ -474,7 +484,6 @@ const SnkFilterItem = class {
|
|
|
474
484
|
return true;
|
|
475
485
|
}
|
|
476
486
|
this.detailIsVisible = false;
|
|
477
|
-
this.executeCloseCallback();
|
|
478
487
|
return false;
|
|
479
488
|
};
|
|
480
489
|
}
|
|
@@ -482,29 +491,36 @@ const SnkFilterItem = class {
|
|
|
482
491
|
return new Promise(resolve => {
|
|
483
492
|
this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
|
|
484
493
|
if (open) {
|
|
494
|
+
this._closeCallback = resolve;
|
|
485
495
|
window.requestAnimationFrame(() => {
|
|
486
|
-
this.
|
|
487
|
-
|
|
496
|
+
this._floatingID = core.FloatingManager.float(this._popover, this._popoverContainer, {
|
|
497
|
+
autoClose: true,
|
|
498
|
+
innerClickTest: this.innerClickCheck,
|
|
499
|
+
backClickListener: () => this.onDetailCloseCallback(),
|
|
500
|
+
left: this.getScrollOffset(),
|
|
501
|
+
useOverlay: true
|
|
502
|
+
});
|
|
503
|
+
this._popover.show();
|
|
504
|
+
this.detailIsVisible = true;
|
|
488
505
|
});
|
|
489
506
|
}
|
|
490
507
|
});
|
|
491
508
|
}
|
|
492
|
-
showDetail() {
|
|
493
|
-
this._floatingID = core.FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset(), useOverlay: true });
|
|
494
|
-
this.detailIsVisible = true;
|
|
495
|
-
}
|
|
496
509
|
getScrollOffset() {
|
|
497
|
-
|
|
510
|
+
const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
|
|
511
|
+
const rect = this._filterItemElement.getBoundingClientRect();
|
|
512
|
+
return `calc(${rect.left}px + ${padding})`;
|
|
498
513
|
}
|
|
499
|
-
hideDetail() {
|
|
500
|
-
if (this.
|
|
501
|
-
|
|
514
|
+
async hideDetail() {
|
|
515
|
+
if (this.detailIsVisible) {
|
|
516
|
+
if (this._floatingID != undefined) {
|
|
517
|
+
core.FloatingManager.close(this._floatingID);
|
|
518
|
+
}
|
|
502
519
|
}
|
|
520
|
+
}
|
|
521
|
+
onDetailCloseCallback() {
|
|
503
522
|
this._floatingID = undefined;
|
|
504
523
|
this.detailIsVisible = false;
|
|
505
|
-
this.executeCloseCallback();
|
|
506
|
-
}
|
|
507
|
-
executeCloseCallback() {
|
|
508
524
|
if (this._closeCallback) {
|
|
509
525
|
this._closeCallback();
|
|
510
526
|
this._closeCallback = undefined;
|
|
@@ -523,7 +539,7 @@ const SnkFilterItem = class {
|
|
|
523
539
|
this.hideDetail();
|
|
524
540
|
}
|
|
525
541
|
else {
|
|
526
|
-
this.
|
|
542
|
+
this.showUp(true);
|
|
527
543
|
}
|
|
528
544
|
}
|
|
529
545
|
evt.preventDefault();
|
|
@@ -628,6 +644,7 @@ const SnkFilterList = class {
|
|
|
628
644
|
constructor(hostRef) {
|
|
629
645
|
index.registerInstance(this, hostRef);
|
|
630
646
|
this.snkItemSelected = index.createEvent(this, "snkItemSelected", 7);
|
|
647
|
+
this._preselection = -1;
|
|
631
648
|
this.innerClickCheck = (_floatingContainer, node) => {
|
|
632
649
|
if (node.id != core.FloatingManager.MODAL_ELEMENT_ID) {
|
|
633
650
|
return true;
|
|
@@ -636,25 +653,34 @@ const SnkFilterList = class {
|
|
|
636
653
|
return false;
|
|
637
654
|
};
|
|
638
655
|
}
|
|
639
|
-
|
|
640
|
-
this.
|
|
656
|
+
showDetail() {
|
|
657
|
+
this._preselection = -1;
|
|
658
|
+
this._floatingID = core.FloatingManager.float(this._popover, this._popoverContainer, {
|
|
659
|
+
autoClose: true,
|
|
660
|
+
innerClickTest: this.innerClickCheck,
|
|
661
|
+
backClickListener: () => this.onListCloseCallback(),
|
|
662
|
+
useOverlay: true
|
|
663
|
+
});
|
|
641
664
|
this._detailIsVisible = true;
|
|
642
665
|
this._showAll = false;
|
|
643
666
|
this._filterArgument = "";
|
|
667
|
+
this._filterInput.setFocus();
|
|
644
668
|
}
|
|
645
|
-
|
|
669
|
+
async hideDetail() {
|
|
646
670
|
if (this._floatingID != undefined) {
|
|
647
671
|
core.FloatingManager.close(this._floatingID);
|
|
648
672
|
}
|
|
673
|
+
}
|
|
674
|
+
onListCloseCallback() {
|
|
649
675
|
this._floatingID = undefined;
|
|
650
676
|
this._detailIsVisible = false;
|
|
651
677
|
}
|
|
652
678
|
buttonClick() {
|
|
653
679
|
if (this._detailIsVisible) {
|
|
654
|
-
this.
|
|
680
|
+
this.hideDetail();
|
|
655
681
|
}
|
|
656
682
|
else {
|
|
657
|
-
this.
|
|
683
|
+
this.showDetail();
|
|
658
684
|
}
|
|
659
685
|
}
|
|
660
686
|
componentDidRender() {
|
|
@@ -665,14 +691,15 @@ const SnkFilterList = class {
|
|
|
665
691
|
}
|
|
666
692
|
}
|
|
667
693
|
buildItemElement(item) {
|
|
668
|
-
|
|
694
|
+
const itemId = ++this._selectableItemsCount;
|
|
695
|
+
return (index.h("button", { id: `filter-item${itemId}`, onFocusin: () => this._preselection = itemId, class: `ez-col ez-col--sd-12 ez-align--middle ez-padding--small sc-snk-filter-bar snk-filter-bar__filter-list-item`, onClick: () => this.itemSelected(item.name) }, item.iconName ? index.h("ez-icon", { iconName: item.iconName, size: "small", class: `ez-padding-right--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__icon ${item.iconClass || ""}` }) : undefined, index.h("div", { class: `ez-text ez-text--medium ez-text--primary ez-padding--extra-small sc-snk-filter-bar snk-filter-bar__filter-list-item__label ${item.labelClass || ""}` }, item.label)));
|
|
669
696
|
}
|
|
670
697
|
itemSelected(itemName) {
|
|
671
698
|
if (itemName === SHOW_MORE_ITEM_NAME) {
|
|
672
699
|
this._showAll = true;
|
|
673
700
|
}
|
|
674
701
|
else {
|
|
675
|
-
this.
|
|
702
|
+
this.hideDetail();
|
|
676
703
|
this.snkItemSelected.emit(itemName);
|
|
677
704
|
}
|
|
678
705
|
}
|
|
@@ -686,13 +713,47 @@ const SnkFilterList = class {
|
|
|
686
713
|
items.splice(MAX_FILTERS);
|
|
687
714
|
items.push({ kind: "INTERNAL", label: "Mostrar mais", iconName: "dots-horizontal", name: SHOW_MORE_ITEM_NAME, iconClass: "snk-filter-bar__filter-list-item__icon--secondary", labelClass: "snk-filter-bar__filter-list-item__label--secondary" });
|
|
688
715
|
}
|
|
716
|
+
this._selectableItemsCount = 0;
|
|
689
717
|
return index.h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-list-items-container" }, items.map(item => this.buildItemElement(item)));
|
|
690
718
|
}
|
|
691
719
|
getFooterItems() {
|
|
692
720
|
return this.items.filter(item => item.kind === "FOOTER");
|
|
693
721
|
}
|
|
722
|
+
keyDownHandler(event) {
|
|
723
|
+
switch (event.key) {
|
|
724
|
+
case "ArrowDown":
|
|
725
|
+
this.changePreselection(this._preselection + 1);
|
|
726
|
+
//Paramos a propagação do evento para evitar scroll indesejado
|
|
727
|
+
event.stopImmediatePropagation();
|
|
728
|
+
event.stopPropagation();
|
|
729
|
+
event.preventDefault();
|
|
730
|
+
break;
|
|
731
|
+
case "ArrowUp":
|
|
732
|
+
this.changePreselection(this._preselection - 1);
|
|
733
|
+
//Paramos a propagação do evento para evitar scroll indesejado
|
|
734
|
+
event.stopImmediatePropagation();
|
|
735
|
+
event.stopPropagation();
|
|
736
|
+
event.preventDefault();
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
changePreselection(newSelection) {
|
|
741
|
+
if (newSelection < 0) {
|
|
742
|
+
newSelection = this._selectableItemsCount;
|
|
743
|
+
}
|
|
744
|
+
this._preselection = newSelection > this._selectableItemsCount ? 0 : newSelection;
|
|
745
|
+
if (this._preselection === 0) {
|
|
746
|
+
this._filterInput.setFocus();
|
|
747
|
+
}
|
|
748
|
+
else {
|
|
749
|
+
const item = this._element.querySelector(`#filter-item${this._preselection}`);
|
|
750
|
+
if (item) {
|
|
751
|
+
item.focus();
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
694
755
|
render() {
|
|
695
|
-
return (index.h(index.Host, { class: "ez-flex ez-flex--column" }, index.h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, index.h("slot", { name: "leftIcon" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, index.h("ez-filter-input", { ref: ref => this._filterInput = ref, mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail }), this.getFilterItems(), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
|
|
756
|
+
return (index.h(index.Host, { class: "ez-flex ez-flex--column" }, index.h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, index.h("slot", { name: "leftIcon" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, index.h("ez-filter-input", { ref: ref => this._filterInput = ref, mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail, onFocus: () => this._preselection = 0 }), this.getFilterItems(), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
|
|
696
757
|
}
|
|
697
758
|
get _element() { return index.getElement(this); }
|
|
698
759
|
};
|
|
@@ -701,9 +762,12 @@ const SnkFilterModal = class {
|
|
|
701
762
|
constructor(hostRef) {
|
|
702
763
|
index.registerInstance(this, hostRef);
|
|
703
764
|
}
|
|
704
|
-
updateValue(id, value) {
|
|
765
|
+
updateValue(id, value = undefined) {
|
|
705
766
|
this.items = this.items.map(item => {
|
|
706
767
|
if (item.id === id) {
|
|
768
|
+
if (value == undefined) {
|
|
769
|
+
value = !item.active;
|
|
770
|
+
}
|
|
707
771
|
return Object.assign(Object.assign({}, item), { active: value });
|
|
708
772
|
}
|
|
709
773
|
return item;
|
|
@@ -716,12 +780,34 @@ const SnkFilterModal = class {
|
|
|
716
780
|
}
|
|
717
781
|
return this.getMessage(activeFilters > 1 ? "snkFilterBar.activeFilters" : "snkFilterBar.activeFilter", { ACTIVE_FILTERS: activeFilters });
|
|
718
782
|
}
|
|
719
|
-
|
|
720
|
-
return
|
|
783
|
+
buildItems(list) {
|
|
784
|
+
return list.map(item => {
|
|
785
|
+
return (index.h("button", { onClick: () => this.updateValue(item.id), class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, index.h("ez-check", { id: `checkbox_${item.id}`, tabIndex: "-1", class: "sc-snk-filter-bar snk-filter-bar__filter-modal-item__check", onEzChange: evt => this.updateValue(item.id, evt.detail), enabled: item.enabled, value: item.active, mode: "switch" }), index.h("div", { class: "ez-text ez-title--primary ez-text--medium ez-margin-left--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item__label" }, item.label)));
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
itemKeyBoardSelect(event, item) {
|
|
789
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
790
|
+
this.updateValue(item.id);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
modalActionListener(evt) {
|
|
794
|
+
const modalAction = evt.detail;
|
|
795
|
+
if (modalAction === ezModalContainer.ModalAction.LOAD) {
|
|
796
|
+
if (this._filterInput) {
|
|
797
|
+
this._filterInput.setFocus();
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
else {
|
|
801
|
+
this.processModalAction(modalAction);
|
|
802
|
+
}
|
|
721
803
|
}
|
|
722
804
|
render() {
|
|
723
805
|
const allowCancel = this.items.filter(item => item.active).length > 0;
|
|
724
|
-
|
|
806
|
+
const items = (this.items ? core.ArrayUtils.applyStringFilter(this._filterArgument, this.items) : []);
|
|
807
|
+
return (index.h("ez-modal-container", { modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.modalActionListener(evt), cancelButtonStatus: allowCancel ? ezModalContainer.ModalButtonStatus.ENABLED : ezModalContainer.ModalButtonStatus.DISABLED }, index.h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, index.h("div", null, this.useSearch ?
|
|
808
|
+
index.h("ez-filter-input", { ref: ref => this._filterInput = ref, label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail })
|
|
809
|
+
:
|
|
810
|
+
undefined), items.length > 0 ? index.h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, index.h("div", null, this.buildItems(items)), index.h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
|
|
725
811
|
}
|
|
726
812
|
};
|
|
727
813
|
|
|
@@ -35,6 +35,9 @@ const SnkFilterBinarySelect = class {
|
|
|
35
35
|
this.value = undefined;
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
async show() {
|
|
39
|
+
this._checkOne.setFocus();
|
|
40
|
+
}
|
|
38
41
|
render() {
|
|
39
42
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.BINARY_SELECT) {
|
|
40
43
|
return undefined;
|
|
@@ -11,6 +11,9 @@ const SnkFilterDetail = class {
|
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
this.filterChange = index.createEvent(this, "filterChange", 7);
|
|
13
13
|
}
|
|
14
|
+
async show() {
|
|
15
|
+
this._editor["show"]();
|
|
16
|
+
}
|
|
14
17
|
changeConfig(newConfig) {
|
|
15
18
|
this.filterChange.emit(newConfig);
|
|
16
19
|
}
|
|
@@ -39,10 +42,13 @@ const SnkFilterDetail = class {
|
|
|
39
42
|
return undefined;
|
|
40
43
|
}
|
|
41
44
|
return ([
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()),
|
|
46
|
+
this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))
|
|
44
47
|
]);
|
|
45
48
|
}
|
|
49
|
+
buildIcon(title, iconName, action) {
|
|
50
|
+
return (index.h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button" }, index.h("ez-icon", { title: title, iconName: iconName })));
|
|
51
|
+
}
|
|
46
52
|
apply() {
|
|
47
53
|
var _a;
|
|
48
54
|
let value = this._editor["value"];
|
|
@@ -86,9 +92,14 @@ const SnkFilterDetail = class {
|
|
|
86
92
|
clear() {
|
|
87
93
|
this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
|
|
88
94
|
}
|
|
95
|
+
onKeyDonwListener(event) {
|
|
96
|
+
if (event.key === "Enter") {
|
|
97
|
+
this._applyButton.setFocus().then(() => this.apply());
|
|
98
|
+
}
|
|
99
|
+
}
|
|
89
100
|
render() {
|
|
90
101
|
const ContentEditor = this.getContentEditor();
|
|
91
|
-
return (index.h(index.Host, null, index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), index.h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config }), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), index.h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, index.h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), index.h("ez-button", { label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
|
102
|
+
return (index.h(index.Host, null, index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), index.h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt) }), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), index.h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, index.h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), index.h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
|
92
103
|
}
|
|
93
104
|
};
|
|
94
105
|
|
|
@@ -12,11 +12,14 @@ const SnkFilterMultiSelect = class {
|
|
|
12
12
|
ezChangeListener(evt) {
|
|
13
13
|
this.value = evt.detail.value;
|
|
14
14
|
}
|
|
15
|
+
async show() {
|
|
16
|
+
this._comboElement.setFocus();
|
|
17
|
+
}
|
|
15
18
|
render() {
|
|
16
19
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.MULTI_SELECT) {
|
|
17
20
|
return undefined;
|
|
18
21
|
}
|
|
19
|
-
return (index.h("ez-combo-box", { label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
22
|
+
return (index.h("ez-combo-box", { ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
|
|
20
23
|
}
|
|
21
24
|
};
|
|
22
25
|
|
|
@@ -12,12 +12,15 @@ const SnkFilterPeriod = class {
|
|
|
12
12
|
ezChangeListener(evt) {
|
|
13
13
|
this.value = evt.detail;
|
|
14
14
|
}
|
|
15
|
+
async show() {
|
|
16
|
+
this._numberElement.setFocus();
|
|
17
|
+
}
|
|
15
18
|
render() {
|
|
16
19
|
var _a;
|
|
17
20
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.NUMBER) {
|
|
18
21
|
return undefined;
|
|
19
22
|
}
|
|
20
|
-
return (index.h("ez-number-input", { label: this.config.label, value: this.config.value, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }));
|
|
23
|
+
return (index.h("ez-number-input", { ref: ref => this._numberElement = ref, label: this.config.label, value: this.config.value, precision: (_a = this.config.props) === null || _a === void 0 ? void 0 : _a.precision }));
|
|
21
24
|
}
|
|
22
25
|
};
|
|
23
26
|
|
|
@@ -49,27 +49,34 @@ const SnkFilterPersonalized = class {
|
|
|
49
49
|
const params = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.personalizedFilter) === null || _c === void 0 ? void 0 : _c.parameters;
|
|
50
50
|
return params.map((param, index$1) => {
|
|
51
51
|
var _a;
|
|
52
|
+
const elemId = 'param_' + index$1;
|
|
52
53
|
switch (param.type) {
|
|
53
54
|
case core.UserInterface.SEARCH:
|
|
54
|
-
return index.h("ez-search", { suppressEmptyOption: true, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
|
|
55
|
+
return index.h("ez-search", { id: elemId, suppressEmptyOption: true, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
|
|
55
56
|
case core.UserInterface.SWITCH:
|
|
56
57
|
case core.UserInterface.CHECKBOX:
|
|
57
58
|
const mode = core.UserInterface.SWITCH === param.type ? "switch" : "regular";
|
|
58
|
-
return index.h("ez-check", { class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index$1), label: param.label, onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
59
|
+
return index.h("ez-check", { id: elemId, class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index$1), label: param.label, onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
59
60
|
case core.UserInterface.DECIMALNUMBER:
|
|
60
61
|
case core.UserInterface.INTEGERNUMBER:
|
|
61
|
-
return index.h("ez-number-input", { label: param.label, value: this.getValue(param, index$1), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
62
|
+
return index.h("ez-number-input", { id: elemId, label: param.label, value: this.getValue(param, index$1), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
62
63
|
case core.UserInterface.OPTIONSELECTOR:
|
|
63
|
-
return index.h("ez-combo-box", { label: param.label, value: this.getValue(param, index$1), options: param.options, onEzChange: evt => { var _a; return this.setValue(index$1, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
|
|
64
|
+
return index.h("ez-combo-box", { id: elemId, label: param.label, value: this.getValue(param, index$1), options: param.options, onEzChange: evt => { var _a; return this.setValue(index$1, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
|
|
64
65
|
case core.UserInterface.DATE:
|
|
65
|
-
return index.h("ez-date-input", { label: param.label, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
66
|
+
return index.h("ez-date-input", { id: elemId, label: param.label, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
66
67
|
case core.UserInterface.DATETIME:
|
|
67
|
-
return index.h("ez-date-time-input", { label: param.label, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
68
|
+
return index.h("ez-date-time-input", { id: elemId, label: param.label, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
68
69
|
default:
|
|
69
|
-
return index.h("ez-text-input", { label: param.label, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
70
|
+
return index.h("ez-text-input", { id: elemId, label: param.label, value: this.getValue(param, index$1), onEzChange: evt => this.setValue(index$1, evt.detail) });
|
|
70
71
|
}
|
|
71
72
|
});
|
|
72
73
|
}
|
|
74
|
+
async show() {
|
|
75
|
+
const elem = document.querySelector("#param_0");
|
|
76
|
+
if (elem) {
|
|
77
|
+
elem["setFocus"]();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
73
80
|
render() {
|
|
74
81
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.PERSONALIZED) {
|
|
75
82
|
return undefined;
|
|
@@ -15,7 +15,7 @@ const SnkFilterText = class {
|
|
|
15
15
|
if (!this.config) {
|
|
16
16
|
return undefined;
|
|
17
17
|
}
|
|
18
|
-
return (index.h("ez-text-input", { label: this.config.label, value: this.config.value }));
|
|
18
|
+
return (index.h("ez-text-input", { ref: ref => this._textInputElement = ref, label: this.config.label, value: this.config.value }));
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -30,7 +30,7 @@ export class SnkErrorHandler {
|
|
|
30
30
|
return '<br><a href="#" onclick="' + onclick + '">Código: ' + exception.errorCode + '</a>';
|
|
31
31
|
}
|
|
32
32
|
processException(exception) {
|
|
33
|
-
if (exception.errorCode
|
|
33
|
+
if (exception.errorCode) {
|
|
34
34
|
exception.message += this.buildErrorCodeHTML(exception);
|
|
35
35
|
}
|
|
36
36
|
if (exception instanceof WaitingChangeException) {
|