@sankhyalabs/sankhyablocks 1.4.0-beta.5 → 1.4.0-beta.6

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.
Files changed (82) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  3. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  4. package/dist/cjs/snk-filter-bar_5.cjs.entry.js +122 -36
  5. package/dist/cjs/snk-filter-binary-select.cjs.entry.js +3 -0
  6. package/dist/cjs/snk-filter-detail.cjs.entry.js +14 -3
  7. package/dist/cjs/snk-filter-multi-select.cjs.entry.js +4 -1
  8. package/dist/cjs/snk-filter-number.cjs.entry.js +4 -1
  9. package/dist/cjs/snk-filter-period.cjs.entry.js +3 -0
  10. package/dist/cjs/snk-filter-personalized.cjs.entry.js +14 -7
  11. package/dist/cjs/snk-filter-search.cjs.entry.js +3 -0
  12. package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
  13. package/dist/collection/components/snk-application/snk-application.js +1 -1
  14. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +23 -0
  15. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +24 -1
  16. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +24 -1
  17. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +23 -0
  18. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +34 -7
  19. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +23 -0
  20. package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
  21. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +34 -3
  22. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +37 -15
  23. package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +82 -8
  24. package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +30 -5
  25. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +17 -4
  26. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +18 -8
  27. package/dist/components/snk-application2.js +1 -1
  28. package/dist/components/snk-filter-bar2.js +19 -9
  29. package/dist/components/snk-filter-binary-select.js +5 -1
  30. package/dist/components/snk-filter-detail2.js +16 -4
  31. package/dist/components/snk-filter-item2.js +23 -16
  32. package/dist/components/snk-filter-list2.js +56 -10
  33. package/dist/components/snk-filter-modal2.js +30 -5
  34. package/dist/components/snk-filter-multi-select.js +6 -2
  35. package/dist/components/snk-filter-number.js +6 -2
  36. package/dist/components/snk-filter-period.js +5 -1
  37. package/dist/components/snk-filter-personalized.js +16 -8
  38. package/dist/components/snk-filter-search.js +5 -1
  39. package/dist/components/snk-filter-text.js +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/sankhyablocks.js +1 -1
  42. package/dist/esm/snk-application.entry.js +1 -1
  43. package/dist/esm/snk-filter-bar_5.entry.js +122 -36
  44. package/dist/esm/snk-filter-binary-select.entry.js +3 -0
  45. package/dist/esm/snk-filter-detail.entry.js +14 -3
  46. package/dist/esm/snk-filter-multi-select.entry.js +4 -1
  47. package/dist/esm/snk-filter-number.entry.js +4 -1
  48. package/dist/esm/snk-filter-period.entry.js +3 -0
  49. package/dist/esm/snk-filter-personalized.entry.js +14 -7
  50. package/dist/esm/snk-filter-search.entry.js +3 -0
  51. package/dist/esm/snk-filter-text.entry.js +1 -1
  52. package/dist/sankhyablocks/{p-01823784.entry.js → p-0ea25487.entry.js} +1 -1
  53. package/dist/sankhyablocks/{p-c564f823.entry.js → p-1a58f45c.entry.js} +2 -2
  54. package/dist/sankhyablocks/p-21e940aa.entry.js +1 -0
  55. package/dist/sankhyablocks/p-40b27004.entry.js +1 -0
  56. package/dist/sankhyablocks/p-4574a955.entry.js +1 -0
  57. package/dist/sankhyablocks/p-49580cdd.entry.js +1 -0
  58. package/dist/sankhyablocks/p-5bdb8452.entry.js +1 -0
  59. package/dist/sankhyablocks/p-6386d720.entry.js +1 -0
  60. package/dist/sankhyablocks/p-a14c49db.entry.js +1 -0
  61. package/dist/sankhyablocks/p-ba426ea9.entry.js +1 -0
  62. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  63. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +1 -0
  64. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +2 -0
  65. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +2 -0
  66. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
  67. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +1 -0
  68. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +1 -0
  69. package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +1 -0
  70. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  71. package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +7 -2
  72. package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -2
  73. package/dist/types/components.d.ts +9 -0
  74. package/package.json +1 -1
  75. package/dist/sankhyablocks/p-07ebda01.entry.js +0 -1
  76. package/dist/sankhyablocks/p-46caa101.entry.js +0 -1
  77. package/dist/sankhyablocks/p-6f8303f3.entry.js +0 -1
  78. package/dist/sankhyablocks/p-746fc78b.entry.js +0 -1
  79. package/dist/sankhyablocks/p-c1c3b5d8.entry.js +0 -1
  80. package/dist/sankhyablocks/p-c9eec639.entry.js +0 -1
  81. package/dist/sankhyablocks/p-eea6444c.entry.js +0 -1
  82. package/dist/sankhyablocks/p-fb705f81.entry.js +0 -1
@@ -12,7 +12,7 @@ const SnkFilterText$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
12
12
  if (!this.config) {
13
13
  return undefined;
14
14
  }
15
- return (h("ez-text-input", { label: this.config.label, value: this.config.value }));
15
+ return (h("ez-text-input", { ref: ref => this._textInputElement = ref, label: this.config.label, value: this.config.value }));
16
16
  }
17
17
  }, [0, "snk-filter-text", {
18
18
  "config": [16],
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"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",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5",[[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",[[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);
13
+ return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"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",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-bar_5",[[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",[[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);
14
14
  });
15
15
  };
16
16
 
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"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",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16]}]]],["snk-filter-bar_5",[[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",[[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);
16
+ return bootstrapLazy([["snk-crud",[[6,"snk-crud",{"configName":[1025,"config-name"],"actionsList":[16],"taskbarManager":[16],"recordsValidator":[16],"statusResolver":[16],"_dataUnit":[32],"_dataState":[32],"goToView":[64]}]]],["teste-pesquisa",[[1,"teste-pesquisa"]]],["snk-data-unit",[[2,"snk-data-unit",{"dataState":[1040],"dataUnitName":[1,"data-unit-name"],"entityName":[1,"entity-name"],"pageSize":[2,"page-size"],"dataUnit":[1040],"beforeSave":[16],"afterSave":[16],"getDataUnit":[64]}]]],["snk-filter-binary-select",[[0,"snk-filter-binary-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-multi-select",[[0,"snk-filter-multi-select",{"value":[1544],"config":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-number",[[0,"snk-filter-number",{"config":[16],"value":[2],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-period",[[0,"snk-filter-period",{"config":[16],"value":[8],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-personalized",[[0,"snk-filter-personalized",{"config":[16],"value":[1040],"show":[64]}]]],["snk-filter-search",[[0,"snk-filter-search",{"config":[16],"value":[16],"show":[64]},[[0,"ezChange","ezChangeListener"]]]]],["snk-filter-text",[[0,"snk-filter-text",{"config":[16],"value":[1]},[[0,"ezChange","ezChangeListener"]]]]],["snk-pesquisa",[[2,"snk-pesquisa",{"searchLoader":[16],"selectItem":[16],"argument":[1025],"_itemList":[32],"_startLoading":[32]}]]],["snk-application",[[2,"snk-application",{"messagesBuilder":[1040],"configName":[1,"config-name"],"isUserSup":[64],"hasAccess":[64],"getAllAccess":[64],"getStringParam":[64],"getIntParam":[64],"getFloatParam":[64],"getBooleanParam":[64],"getDateParam":[64],"showPopUp":[64],"showModal":[64],"closeModal":[64],"closePopUp":[64],"temOpcional":[64],"getConfig":[64],"saveConfig":[64],"getAttributeFromHTMLWrapper":[64],"openApp":[64],"createDataunit":[64],"getDataUnit":[64],"getResourceID":[64],"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",[[0,"snk-filter-detail",{"config":[1040],"getMessage":[16],"show":[64]}]]],["snk-filter-bar_5",[[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",[[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
17
  });
@@ -7951,7 +7951,7 @@ const SnkApplication = class {
7951
7951
  });
7952
7952
  }
7953
7953
  render() {
7954
- return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "col col--sd-3", closeOutsideClick: true })));
7954
+ return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.loadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "col col--sd-3", closeOutsideClick: true, closeEsc: true })));
7955
7955
  }
7956
7956
  };
7957
7957
  class RequestListenerLoadingBar {
@@ -102,11 +102,13 @@ function buildPersonalized(item) {
102
102
  };
103
103
  }
104
104
 
105
- 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;flex-grow:0}.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)}.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.preselected.sc-snk-filter-bar{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{display:flex;flex-direction:row;border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7)}.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);width:100%}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:100%;height:100%}";
105
+ 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%}";
106
106
 
107
107
  const PERSONALIZED_FILTER = "PERSONALIZED_FILTER";
108
108
  const DEFAULT_FILTER = "DEFAULT_FILTER";
109
109
  const CLEAR_ALL_FILTERS = "CLEAR_ALL_FILTERS";
110
+ const ADD_FILTER = "ADD_FILTER";
111
+ const APPLIED_FILTERS = "APPLIED_FILTERS";
110
112
  const SnkFilterBar = class {
111
113
  constructor(hostRef) {
112
114
  registerInstance(this, hostRef);
@@ -205,13 +207,26 @@ const SnkFilterBar = class {
205
207
  this.dataUnit.loadData();
206
208
  }
207
209
  }
210
+ itemFocused(selectedItem) {
211
+ this._element.querySelectorAll("snk-filter-item,snk-filter-list").forEach(item => {
212
+ if (item.id === selectedItem) {
213
+ if (item.tagName.toLowerCase() === "snk-filter-item" && item.getClientRects()[0].x < 0) {
214
+ item.scrollIntoView({ behavior: "auto", inline: 'nearest' });
215
+ }
216
+ }
217
+ else {
218
+ item["hideDetail"]();
219
+ }
220
+ });
221
+ }
208
222
  getFilterItems() {
209
223
  const pinnedItems = [];
210
224
  const unpinnedItems = [];
211
225
  this.filterConfig
212
226
  .filter(item => item.visible)
213
227
  .forEach((item, index) => {
214
- const filterItem = (h("snk-filter-item", { id: `filter-${item.id}`, config: item, class: index > 0 ? "ez-padding-left--medium" : "", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
228
+ const itemId = `filter-${item.id}`;
229
+ const filterItem = (h("snk-filter-item", { onFocusin: () => this.itemFocused(itemId), id: itemId, config: item, class: index > 0 ? "ez-padding-left--medium" : "", getMessage: (key, props) => this.getMessage(key, props), key: item.id }));
215
230
  if (item.fixed || item.hardFixed) {
216
231
  pinnedItems.push(filterItem);
217
232
  }
@@ -415,13 +430,8 @@ const SnkFilterBar = class {
415
430
  this.openDefaultFilterModal();
416
431
  }
417
432
  else if (filterItem) {
433
+ this._pendingFilters.push(itemName);
418
434
  this.updateFilter(Object.assign(Object.assign({}, filterItem), { visible: true }));
419
- window.requestAnimationFrame(() => {
420
- const filterItemElement = this._element.querySelector("#filter-" + itemName);
421
- if (filterItemElement) {
422
- filterItemElement.showUp();
423
- }
424
- });
425
435
  }
426
436
  }
427
437
  appliedFilterHandler(itemName) {
@@ -452,7 +462,7 @@ const SnkFilterBar = class {
452
462
  if (!this.dataUnit || !this.filterConfig || this.filterConfig.length === 0) {
453
463
  return undefined;
454
464
  }
455
- return (h(Host, null, h("ez-scroller", { direction: "horizontal" }, this.getFilterItems()), 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) }), 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) }, h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
465
+ return (h(Host, null, h("ez-scroller", { direction: "horizontal" }, this.getFilterItems()), 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) }), 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) }, h("ez-icon", { slot: "leftIcon", class: "ez-padding-right--small", iconName: "plus" }))));
456
466
  }
457
467
  get _element() { return getElement(this); }
458
468
  static get watchers() { return {
@@ -470,7 +480,6 @@ const SnkFilterItem = class {
470
480
  return true;
471
481
  }
472
482
  this.detailIsVisible = false;
473
- this.executeCloseCallback();
474
483
  return false;
475
484
  };
476
485
  }
@@ -478,29 +487,36 @@ const SnkFilterItem = class {
478
487
  return new Promise(resolve => {
479
488
  this._filterItemElement.scrollIntoView({ behavior: "auto", block: "nearest", inline: "nearest" });
480
489
  if (open) {
490
+ this._closeCallback = resolve;
481
491
  window.requestAnimationFrame(() => {
482
- this._closeCallback = resolve;
483
- this.showDetail();
492
+ this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, {
493
+ autoClose: true,
494
+ innerClickTest: this.innerClickCheck,
495
+ backClickListener: () => this.onDetailCloseCallback(),
496
+ left: this.getScrollOffset(),
497
+ useOverlay: true
498
+ });
499
+ this._popover.show();
500
+ this.detailIsVisible = true;
484
501
  });
485
502
  }
486
503
  });
487
504
  }
488
- showDetail() {
489
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, left: this.getScrollOffset(), useOverlay: true });
490
- this.detailIsVisible = true;
491
- }
492
505
  getScrollOffset() {
493
- return `${this._filterItemElement.getBoundingClientRect().left + 12}px`;
506
+ const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
507
+ const rect = this._filterItemElement.getBoundingClientRect();
508
+ return `calc(${rect.left}px + ${padding})`;
494
509
  }
495
- hideDetail() {
496
- if (this._floatingID != undefined) {
497
- FloatingManager.close(this._floatingID);
510
+ async hideDetail() {
511
+ if (this.detailIsVisible) {
512
+ if (this._floatingID != undefined) {
513
+ FloatingManager.close(this._floatingID);
514
+ }
498
515
  }
516
+ }
517
+ onDetailCloseCallback() {
499
518
  this._floatingID = undefined;
500
519
  this.detailIsVisible = false;
501
- this.executeCloseCallback();
502
- }
503
- executeCloseCallback() {
504
520
  if (this._closeCallback) {
505
521
  this._closeCallback();
506
522
  this._closeCallback = undefined;
@@ -519,7 +535,7 @@ const SnkFilterItem = class {
519
535
  this.hideDetail();
520
536
  }
521
537
  else {
522
- this.showDetail();
538
+ this.showUp(true);
523
539
  }
524
540
  }
525
541
  evt.preventDefault();
@@ -624,6 +640,7 @@ const SnkFilterList = class {
624
640
  constructor(hostRef) {
625
641
  registerInstance(this, hostRef);
626
642
  this.snkItemSelected = createEvent(this, "snkItemSelected", 7);
643
+ this._preselection = -1;
627
644
  this.innerClickCheck = (_floatingContainer, node) => {
628
645
  if (node.id != FloatingManager.MODAL_ELEMENT_ID) {
629
646
  return true;
@@ -632,25 +649,34 @@ const SnkFilterList = class {
632
649
  return false;
633
650
  };
634
651
  }
635
- showList() {
636
- this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, { autoClose: true, innerClickTest: this.innerClickCheck, useOverlay: true });
652
+ showDetail() {
653
+ this._preselection = -1;
654
+ this._floatingID = FloatingManager.float(this._popover, this._popoverContainer, {
655
+ autoClose: true,
656
+ innerClickTest: this.innerClickCheck,
657
+ backClickListener: () => this.onListCloseCallback(),
658
+ useOverlay: true
659
+ });
637
660
  this._detailIsVisible = true;
638
661
  this._showAll = false;
639
662
  this._filterArgument = "";
663
+ this._filterInput.setFocus();
640
664
  }
641
- hideList() {
665
+ async hideDetail() {
642
666
  if (this._floatingID != undefined) {
643
667
  FloatingManager.close(this._floatingID);
644
668
  }
669
+ }
670
+ onListCloseCallback() {
645
671
  this._floatingID = undefined;
646
672
  this._detailIsVisible = false;
647
673
  }
648
674
  buttonClick() {
649
675
  if (this._detailIsVisible) {
650
- this.hideList();
676
+ this.hideDetail();
651
677
  }
652
678
  else {
653
- this.showList();
679
+ this.showDetail();
654
680
  }
655
681
  }
656
682
  componentDidRender() {
@@ -661,14 +687,15 @@ const SnkFilterList = class {
661
687
  }
662
688
  }
663
689
  buildItemElement(item) {
664
- return (h("div", { 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 ? 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, 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)));
690
+ const itemId = ++this._selectableItemsCount;
691
+ return (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 ? 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, 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)));
665
692
  }
666
693
  itemSelected(itemName) {
667
694
  if (itemName === SHOW_MORE_ITEM_NAME) {
668
695
  this._showAll = true;
669
696
  }
670
697
  else {
671
- this.hideList();
698
+ this.hideDetail();
672
699
  this.snkItemSelected.emit(itemName);
673
700
  }
674
701
  }
@@ -682,13 +709,47 @@ const SnkFilterList = class {
682
709
  items.splice(MAX_FILTERS);
683
710
  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" });
684
711
  }
712
+ this._selectableItemsCount = 0;
685
713
  return h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-list-items-container" }, items.map(item => this.buildItemElement(item)));
686
714
  }
687
715
  getFooterItems() {
688
716
  return this.items.filter(item => item.kind === "FOOTER");
689
717
  }
718
+ keyDownHandler(event) {
719
+ switch (event.key) {
720
+ case "ArrowDown":
721
+ this.changePreselection(this._preselection + 1);
722
+ //Paramos a propagação do evento para evitar scroll indesejado
723
+ event.stopImmediatePropagation();
724
+ event.stopPropagation();
725
+ event.preventDefault();
726
+ break;
727
+ case "ArrowUp":
728
+ this.changePreselection(this._preselection - 1);
729
+ //Paramos a propagação do evento para evitar scroll indesejado
730
+ event.stopImmediatePropagation();
731
+ event.stopPropagation();
732
+ event.preventDefault();
733
+ break;
734
+ }
735
+ }
736
+ changePreselection(newSelection) {
737
+ if (newSelection < 0) {
738
+ newSelection = this._selectableItemsCount;
739
+ }
740
+ this._preselection = newSelection > this._selectableItemsCount ? 0 : newSelection;
741
+ if (this._preselection === 0) {
742
+ this._filterInput.setFocus();
743
+ }
744
+ else {
745
+ const item = this._element.querySelector(`#filter-item${this._preselection}`);
746
+ if (item) {
747
+ item.focus();
748
+ }
749
+ }
750
+ }
690
751
  render() {
691
- return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, 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(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
752
+ return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, 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(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
692
753
  }
693
754
  get _element() { return getElement(this); }
694
755
  };
@@ -697,9 +758,12 @@ const SnkFilterModal = class {
697
758
  constructor(hostRef) {
698
759
  registerInstance(this, hostRef);
699
760
  }
700
- updateValue(id, value) {
761
+ updateValue(id, value = undefined) {
701
762
  this.items = this.items.map(item => {
702
763
  if (item.id === id) {
764
+ if (value == undefined) {
765
+ value = !item.active;
766
+ }
703
767
  return Object.assign(Object.assign({}, item), { active: value });
704
768
  }
705
769
  return item;
@@ -712,12 +776,34 @@ const SnkFilterModal = class {
712
776
  }
713
777
  return this.getMessage(activeFilters > 1 ? "snkFilterBar.activeFilters" : "snkFilterBar.activeFilter", { ACTIVE_FILTERS: activeFilters });
714
778
  }
715
- getFilteredItems() {
716
- return this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items) : [];
779
+ buildItems(list) {
780
+ return list.map(item => {
781
+ return (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" }, 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" }), 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)));
782
+ });
783
+ }
784
+ itemKeyBoardSelect(event, item) {
785
+ if (event.key === "Enter" || event.key === " ") {
786
+ this.updateValue(item.id);
787
+ }
788
+ }
789
+ modalActionListener(evt) {
790
+ const modalAction = evt.detail;
791
+ if (modalAction === ModalAction.LOAD) {
792
+ if (this._filterInput) {
793
+ this._filterInput.setFocus();
794
+ }
795
+ }
796
+ else {
797
+ this.processModalAction(modalAction);
798
+ }
717
799
  }
718
800
  render() {
719
801
  const allowCancel = this.items.filter(item => item.active).length > 0;
720
- return (h("ez-modal-container", { modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.processModalAction(evt.detail), cancelButtonStatus: allowCancel ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED }, h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, h("div", null, this.useSearch ? h("ez-filter-input", { label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail }) : undefined), this.getFilteredItems().length > 0 ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, h("div", null, this.getFilteredItems().map(item => h("div", { class: "ez-padding--medium sc-snk-filter-bar snk-filter-bar__filter-modal-item ez-align--middle ez-margin-bottom--small" }, h("ez-check", { 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" }), 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)))), h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
802
+ const items = (this.items ? ArrayUtils.applyStringFilter(this._filterArgument, this.items) : []);
803
+ return (h("ez-modal-container", { modalTitle: this.modalTitle, modalSubTitle: this.modalSubTitle, cancelButtonLabel: this.cancelButtonLabel, okButtonLabel: this.okButtonLabel, onEzModalAction: evt => this.modalActionListener(evt), cancelButtonStatus: allowCancel ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED }, h("div", { class: "sc-snk-filter-bar snk-filter-bar__filter-modal-content" }, h("div", null, this.useSearch ?
804
+ h("ez-filter-input", { ref: ref => this._filterInput = ref, label: this.getMessage("snkFilterBar.modalFindFilter"), onEzChange: (evt) => this._filterArgument = evt.detail })
805
+ :
806
+ undefined), items.length > 0 ? h("div", { class: "ez-text ez-text--medium ez-text--primary ez-padding-bottom--small" }, this.getActiveFiltersMsg()) : undefined, h("div", null, this.buildItems(items)), h("div", { class: "ez-text ez-text--large ez-align--middle ez-text--secondary ez-text--center ez-padding-bottom--large" }, this.infoText))));
721
807
  }
722
808
  };
723
809
 
@@ -31,6 +31,9 @@ const SnkFilterBinarySelect = class {
31
31
  this.value = undefined;
32
32
  }
33
33
  }
34
+ async show() {
35
+ this._checkOne.setFocus();
36
+ }
34
37
  render() {
35
38
  if (!this.config || this.config.type !== FilterItemType.BINARY_SELECT) {
36
39
  return undefined;
@@ -7,6 +7,9 @@ const SnkFilterDetail = class {
7
7
  registerInstance(this, hostRef);
8
8
  this.filterChange = createEvent(this, "filterChange", 7);
9
9
  }
10
+ async show() {
11
+ this._editor["show"]();
12
+ }
10
13
  changeConfig(newConfig) {
11
14
  this.filterChange.emit(newConfig);
12
15
  }
@@ -35,10 +38,13 @@ const SnkFilterDetail = class {
35
38
  return undefined;
36
39
  }
37
40
  return ([
38
- h("ez-icon", { title: this.getMessage("snkFilterBar.removeFilter"), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", iconName: "delete", onClick: () => this.removeItem() }),
39
- h("ez-icon", { title: this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), class: "ez-margin-left--small sc-snk-filter-bar snk-filter-item__editor-header-button", iconName: this.config.fixed ? "un-pin" : "push-pin", onClick: () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })) })
41
+ this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()),
42
+ 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 })))
40
43
  ]);
41
44
  }
45
+ buildIcon(title, iconName, action) {
46
+ return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button" }, h("ez-icon", { title: title, iconName: iconName })));
47
+ }
42
48
  apply() {
43
49
  var _a;
44
50
  let value = this._editor["value"];
@@ -82,9 +88,14 @@ const SnkFilterDetail = class {
82
88
  clear() {
83
89
  this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
84
90
  }
91
+ onKeyDonwListener(event) {
92
+ if (event.key === "Enter") {
93
+ this._applyButton.setFocus().then(() => this.apply());
94
+ }
95
+ }
85
96
  render() {
86
97
  const ContentEditor = this.getContentEditor();
87
- return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, 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()), h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config }), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), h("ez-button", { label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
98
+ return (h(Host, null, h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, 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()), h(ContentEditor, { ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt) }), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" }), 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" }))));
88
99
  }
89
100
  };
90
101
 
@@ -8,11 +8,14 @@ const SnkFilterMultiSelect = class {
8
8
  ezChangeListener(evt) {
9
9
  this.value = evt.detail.value;
10
10
  }
11
+ async show() {
12
+ this._comboElement.setFocus();
13
+ }
11
14
  render() {
12
15
  if (!this.config || this.config.type !== FilterItemType.MULTI_SELECT) {
13
16
  return undefined;
14
17
  }
15
- return (h("ez-combo-box", { label: this.config.label, value: this.config.value, options: this.config.props.options }));
18
+ return (h("ez-combo-box", { ref: ref => this._comboElement = ref, label: this.config.label, value: this.config.value, options: this.config.props.options }));
16
19
  }
17
20
  };
18
21
 
@@ -8,12 +8,15 @@ const SnkFilterPeriod = class {
8
8
  ezChangeListener(evt) {
9
9
  this.value = evt.detail;
10
10
  }
11
+ async show() {
12
+ this._numberElement.setFocus();
13
+ }
11
14
  render() {
12
15
  var _a;
13
16
  if (!this.config || this.config.type !== FilterItemType.NUMBER) {
14
17
  return undefined;
15
18
  }
16
- return (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 }));
19
+ return (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 }));
17
20
  }
18
21
  };
19
22
 
@@ -22,6 +22,9 @@ const SnkFilterPeriod = class {
22
22
  }
23
23
  return null;
24
24
  }
25
+ async show() {
26
+ this._startDate.setFocus();
27
+ }
25
28
  render() {
26
29
  if (!this.config || this.config.type !== FilterItemType.PERIOD) {
27
30
  return undefined;
@@ -45,27 +45,34 @@ const SnkFilterPersonalized = class {
45
45
  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;
46
46
  return params.map((param, index) => {
47
47
  var _a;
48
+ const elemId = 'param_' + index;
48
49
  switch (param.type) {
49
50
  case UserInterface.SEARCH:
50
- return h("ez-search", { suppressEmptyOption: true, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
51
+ return h("ez-search", { id: elemId, suppressEmptyOption: true, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail), label: param.label, optionLoader: ({ mode, argument }) => this.doSearch(mode, argument, param) });
51
52
  case UserInterface.SWITCH:
52
53
  case UserInterface.CHECKBOX:
53
54
  const mode = UserInterface.SWITCH === param.type ? "switch" : "regular";
54
- return h("ez-check", { class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index), label: param.label, onEzChange: evt => this.setValue(index, evt.detail) });
55
+ return h("ez-check", { id: elemId, class: "ez-padding-bottom--medium", mode: mode, value: this.getValue(param, index), label: param.label, onEzChange: evt => this.setValue(index, evt.detail) });
55
56
  case UserInterface.DECIMALNUMBER:
56
57
  case UserInterface.INTEGERNUMBER:
57
- return h("ez-number-input", { label: param.label, value: this.getValue(param, index), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index, evt.detail) });
58
+ return h("ez-number-input", { id: elemId, label: param.label, value: this.getValue(param, index), precision: (_a = param.props) === null || _a === void 0 ? void 0 : _a.precision, onEzChange: evt => this.setValue(index, evt.detail) });
58
59
  case UserInterface.OPTIONSELECTOR:
59
- return h("ez-combo-box", { label: param.label, value: this.getValue(param, index), options: param.options, onEzChange: evt => { var _a; return this.setValue(index, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
60
+ return h("ez-combo-box", { id: elemId, label: param.label, value: this.getValue(param, index), options: param.options, onEzChange: evt => { var _a; return this.setValue(index, (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); } });
60
61
  case UserInterface.DATE:
61
- return h("ez-date-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
62
+ return h("ez-date-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
62
63
  case UserInterface.DATETIME:
63
- return h("ez-date-time-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
64
+ return h("ez-date-time-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
64
65
  default:
65
- return h("ez-text-input", { label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
66
+ return h("ez-text-input", { id: elemId, label: param.label, value: this.getValue(param, index), onEzChange: evt => this.setValue(index, evt.detail) });
66
67
  }
67
68
  });
68
69
  }
70
+ async show() {
71
+ const elem = document.querySelector("#param_0");
72
+ if (elem) {
73
+ elem["setFocus"]();
74
+ }
75
+ }
69
76
  render() {
70
77
  if (!this.config || this.config.type !== FilterItemType.PERSONALIZED) {
71
78
  return undefined;
@@ -20,6 +20,9 @@ const SnkFilterSearch = class {
20
20
  });
21
21
  });
22
22
  }
23
+ async show() {
24
+ this._searchInput.setFocus();
25
+ }
23
26
  render() {
24
27
  if (!this.config || this.config.type !== FilterItemType.SEARCH) {
25
28
  return undefined;
@@ -11,7 +11,7 @@ const SnkFilterText = class {
11
11
  if (!this.config) {
12
12
  return undefined;
13
13
  }
14
- return (h("ez-text-input", { label: this.config.label, value: this.config.value }));
14
+ return (h("ez-text-input", { ref: ref => this._textInputElement = ref, label: this.config.label, value: this.config.value }));
15
15
  }
16
16
  };
17
17
 
@@ -1 +1 @@
1
- import{r as s,h as r}from"./p-fac2b6a9.js";import{ApplicationContext as t}from"@sankhyalabs/core";import{F as e}from"./p-9dd2b8cb.js";const i=class{constructor(r){s(this,r)}ezChangeListener(s){this.value=this._searchInput.value}doSearch(s,r){const e=t.getContextValue("__SNK__APPLICATION__");return new Promise(((t,i)=>{e.executePreparedSearch(s,r,this.config.props.searchContext).then((s=>{t(s)})).catch((s=>{i(s)}))}))}render(){if(this.config&&this.config.type===e.SEARCH)return r("ez-search",{suppressEmptyOption:!0,value:this.config.value,label:this.config.label,ref:s=>this._searchInput=s,optionLoader:({mode:s,argument:r})=>this.doSearch(s,r)})}};export{i as snk_filter_search}
1
+ import{r as s,h as r}from"./p-fac2b6a9.js";import{ApplicationContext as t}from"@sankhyalabs/core";import{F as e}from"./p-9dd2b8cb.js";const i=class{constructor(r){s(this,r)}ezChangeListener(s){this.value=this._searchInput.value}doSearch(s,r){const e=t.getContextValue("__SNK__APPLICATION__");return new Promise(((t,i)=>{e.executePreparedSearch(s,r,this.config.props.searchContext).then((s=>{t(s)})).catch((s=>{i(s)}))}))}async show(){this._searchInput.setFocus()}render(){if(this.config&&this.config.type===e.SEARCH)return r("ez-search",{suppressEmptyOption:!0,value:this.config.value,label:this.config.label,ref:s=>this._searchInput=s,optionLoader:({mode:s,argument:r})=>this.doSearch(s,r)})}};export{i as snk_filter_search}