@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-49699.1 → 0.0.0-bugfix-dev-KB-50737.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/cjs/{ConfigStorage-34be11ce.js → ConfigStorage-8d4e9d53.js} +1 -1
  2. package/dist/cjs/{SnkFormConfigManager-531a191c.js → SnkFormConfigManager-33995e92.js} +2 -2
  3. package/dist/cjs/{SnkMultiSelectionListDataSource-5213120b.js → SnkMultiSelectionListDataSource-1438f8f2.js} +1 -1
  4. package/dist/cjs/{auth-fetcher-5161d082.js → auth-fetcher-bb8e9ae4.js} +1 -1
  5. package/dist/cjs/{form-config-fetcher-9f1a13ca.js → form-config-fetcher-d73f4449.js} +12 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  8. package/dist/cjs/snk-actions-button_4.cjs.entry.js +2 -2
  9. package/dist/cjs/snk-application.cjs.entry.js +3 -3
  10. package/dist/cjs/snk-attach.cjs.entry.js +2 -2
  11. package/dist/cjs/snk-crud.cjs.entry.js +2 -2
  12. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
  13. package/dist/cjs/snk-filter-bar.cjs.entry.js +18 -6
  14. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  15. package/dist/cjs/snk-filter-item.cjs.entry.js +2 -1
  16. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
  17. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  18. package/dist/cjs/snk-form.cjs.entry.js +3 -3
  19. package/dist/cjs/snk-grid.cjs.entry.js +4 -7
  20. package/dist/cjs/{snk-guides-viewer-76b4c346.js → snk-guides-viewer-25721856.js} +2 -2
  21. package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
  22. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  23. package/dist/cjs/snk-simple-crud.cjs.entry.js +60 -48
  24. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
  25. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +20 -1
  26. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -1
  27. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +15 -3
  28. package/dist/collection/components/snk-grid/snk-grid.js +1 -4
  29. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +76 -45
  30. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
  31. package/dist/components/form-config-fetcher.js +12 -0
  32. package/dist/components/snk-filter-bar2.js +16 -4
  33. package/dist/components/snk-filter-detail2.js +5 -1
  34. package/dist/components/snk-filter-item2.js +3 -1
  35. package/dist/components/snk-grid2.js +1 -4
  36. package/dist/components/snk-simple-crud2.js +58 -45
  37. package/dist/esm/{ConfigStorage-101a2b4c.js → ConfigStorage-6e241cd7.js} +1 -1
  38. package/dist/esm/{SnkFormConfigManager-02ecf57f.js → SnkFormConfigManager-7a4e678f.js} +2 -2
  39. package/dist/esm/{SnkMultiSelectionListDataSource-7e7eada5.js → SnkMultiSelectionListDataSource-aad5d4ff.js} +1 -1
  40. package/dist/esm/{auth-fetcher-17dc5b5e.js → auth-fetcher-8ec448b0.js} +1 -1
  41. package/dist/esm/{form-config-fetcher-f121f880.js → form-config-fetcher-765b8498.js} +12 -0
  42. package/dist/esm/loader.js +1 -1
  43. package/dist/esm/sankhyablocks.js +1 -1
  44. package/dist/esm/snk-actions-button_4.entry.js +2 -2
  45. package/dist/esm/snk-application.entry.js +3 -3
  46. package/dist/esm/snk-attach.entry.js +2 -2
  47. package/dist/esm/snk-crud.entry.js +2 -2
  48. package/dist/esm/snk-detail-view.entry.js +4 -4
  49. package/dist/esm/snk-filter-bar.entry.js +18 -6
  50. package/dist/esm/snk-filter-detail.entry.js +4 -1
  51. package/dist/esm/snk-filter-item.entry.js +2 -1
  52. package/dist/esm/snk-filter-modal-item.entry.js +2 -2
  53. package/dist/esm/snk-form-config.entry.js +1 -1
  54. package/dist/esm/snk-form.entry.js +3 -3
  55. package/dist/esm/snk-grid.entry.js +4 -7
  56. package/dist/esm/{snk-guides-viewer-90ca9105.js → snk-guides-viewer-b94752f2.js} +2 -2
  57. package/dist/esm/snk-guides-viewer.entry.js +4 -4
  58. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  59. package/dist/esm/snk-simple-crud.entry.js +60 -48
  60. package/dist/sankhyablocks/p-004c356e.js +26 -0
  61. package/dist/sankhyablocks/{p-5c0b53ce.js → p-0624f62d.js} +1 -1
  62. package/dist/sankhyablocks/{p-d01ceda6.entry.js → p-0bba5c9f.entry.js} +1 -1
  63. package/dist/sankhyablocks/{p-663ff67b.entry.js → p-1048bd26.entry.js} +1 -1
  64. package/dist/sankhyablocks/p-125bb902.js +1 -0
  65. package/dist/sankhyablocks/{p-7ddd95b6.entry.js → p-24ed6ad6.entry.js} +1 -1
  66. package/dist/sankhyablocks/{p-1fa5a18c.entry.js → p-400097f2.entry.js} +1 -1
  67. package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
  68. package/dist/sankhyablocks/p-5c8b136d.entry.js +1 -0
  69. package/dist/sankhyablocks/{p-2897fb8c.js → p-6c9adfca.js} +1 -1
  70. package/dist/sankhyablocks/p-85af23fe.entry.js +1 -0
  71. package/dist/sankhyablocks/{p-b41a622a.entry.js → p-85ba3d6b.entry.js} +1 -1
  72. package/dist/sankhyablocks/{p-384fd6ae.js → p-88b29791.js} +1 -1
  73. package/dist/sankhyablocks/{p-ba4871b5.entry.js → p-9e8618ec.entry.js} +1 -1
  74. package/dist/sankhyablocks/p-a043314f.entry.js +1 -0
  75. package/dist/sankhyablocks/{p-7f97fee2.entry.js → p-a1642e7c.entry.js} +1 -1
  76. package/dist/sankhyablocks/{p-6b28cc74.entry.js → p-ac77949b.entry.js} +1 -1
  77. package/dist/sankhyablocks/{p-2cfe0c2c.entry.js → p-b47c2963.entry.js} +1 -1
  78. package/dist/sankhyablocks/{p-7e05bd83.entry.js → p-bf39bdb8.entry.js} +1 -1
  79. package/dist/sankhyablocks/{p-8111f63f.entry.js → p-d5cb4b5a.entry.js} +1 -1
  80. package/dist/sankhyablocks/{p-fad4c2fe.js → p-efeca7ba.js} +1 -1
  81. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  82. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  83. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +4 -0
  84. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +2 -0
  85. package/dist/types/components/snk-grid/snk-grid.d.ts +0 -1
  86. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +11 -4
  87. package/dist/types/components.d.ts +24 -0
  88. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
  89. package/package.json +1 -1
  90. package/dist/sankhyablocks/p-1f3174cb.entry.js +0 -1
  91. package/dist/sankhyablocks/p-50783a8b.js +0 -1
  92. package/dist/sankhyablocks/p-7c501259.entry.js +0 -1
  93. package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
  94. package/dist/sankhyablocks/p-a13ccb86.js +0 -26
  95. package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,g as e}from"./p-d2d301a6.js";import{StringUtils as n,ApplicationContext as o,ObjectUtils as a,DataType as h,UserInterface as r,JSUtils as l,FloatingManager as d,ElementIDUtils as c}from"@sankhyalabs/core";import{d as u,S as m}from"./p-b0ef4383.js";import{T as g}from"./p-ae4fc9a9.js";import"./p-be75153c.js";import{I as p}from"./p-d78d4062.js";import{S as f,C as v}from"./p-2897fb8c.js";import{P as C}from"./p-38289a55.js";import"./p-21749402.js";import"@sankhyalabs/ezui/dist/collection/utils/constants";import"@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";import"./p-ff1990ad.js";import"./p-a13ccb86.js";import{T as S,b as k,o as b}from"./p-c2495304.js";import{C as y}from"./p-5c0b53ce.js";import{S as T}from"./p-fad4c2fe.js";import"./p-6dc031de.js";import"./p-8d884fab.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils";import"./p-688dcb4c.js";import"@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource";const w=["INSERT","REFRESH","PREVIOUS","NEXT","DIVIDER","MORE_OPTIONS"],E=["INSERT","REFRESH","PREVIOUS","NEXT","DIVIDER","CLONE","REMOVE","DIVIDER","MORE_OPTIONS"],_=class{constructor(s){i(this,s),this.dataStateChange=t(this,"dataStateChange",3),this.dataUnitReady=t(this,"dataUnitReady",3),this.actionClick=t(this,"actionClick",7),this.formItemsReady=t(this,"formItemsReady",7),this.configuratorSave=t(this,"configuratorSave",7),this.configuratorCancel=t(this,"configuratorCancel",7),this._multiSelectionListDataSource=new f,this._keyDownHandler=i=>this.keyDownListener(i),this._taskbarProcessor=new S({"snkSimpleCrudTaskbar.form_regular":this.getButtons(!1,g.GRID_MODE),"snkSimpleCrudTaskbar.grid_regular":this.getButtons(!1,g.FORM_MODE),"snkSimpleCrudTaskbar.form_selected":this.getButtons(!0,g.GRID_MODE),"snkSimpleCrudTaskbar.grid_selected":this.getButtons(!0,g.FORM_MODE),"snkSimpleCrudTaskbar.finish_edition":["CANCEL","SAVE"]}),this._showPopUpGridConfig=!1,this._showFormConfig=!1,this._currentViewMode=u.GRID,this._config=void 0,this._fieldToGetFocus=void 0,this._customContainerId=`SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${n.generateUUID()}`,this.dataState=void 0,this.dataUnit=void 0,this.mode=m.SERVER,this.gridConfig=void 0,this.formConfig=void 0,this._formFields=[],this.multipleSelection=void 0,this.useCancelConfirm=!0,this.taskbarManager=void 0,this.messagesBuilder=void 0,this.useEnterLikeTab=!1,this.actionsList=void 0,this.configName=void 0,this.showConfiguratorButtons=void 0,this.gridLegacyConfigName=void 0,this.formLegacyConfigName=void 0,this.ignoreReadOnlyFormFields=!1}getButtons(i,t){return this.addConfigButton(this.resolveInMemoryBtns(i?E:w).concat(t))}addConfigButton(i){return void 0===this.configName?i:i.concat(g.CONFIGURATOR)}get application(){return o.getContextValue("__SNK__APPLICATION__")}resolveInMemoryBtns(i){const t=[...i];return this.mode===m.IN_MEMORY&&t.splice(1,1),t}async goToView(i){this._currentViewMode=i,this._viewStack&&this._viewStack.show(i)}actionClickListener(i){const t=i.detail;t===g.CONFIGURATOR?this._snkConfigurator.open():t===g.GRID_MODE?this.goToView(u.GRID):t===g.FORM_MODE&&this.goToView(u.FORM),i.stopPropagation()}onModeChange(){this.mode==m.IN_MEMORY&&this.initInMemoryDataUnit()}observeDataState(i,t){a.objectToString(t)!=a.objectToString(i)&&this.dataStateChange.emit(i)}async observeFormLegacy(){await this.handleUpdateFormLegacyConfig()}async observeGridLegacy(){await this.handleUpdateGridLegacyConfig()}async handleUpdateGridLegacyConfig(){this.gridLegacyConfigName&&(this.addGridLegacyConfigName(),this._gridConfigAlreadyLoaded&&await this.loadGridConfig(!0))}async handleUpdateFormLegacyConfig(){var i,t,s;if(!this.formLegacyConfigName)return;const e=await this.fetchFormLegacyConfig();if(!e)return;const n=null!==(s=null===(t=null===(i=null==e?void 0:e.formConfig)||void 0===i?void 0:i.layout)||void 0===t?void 0:t.field)&&void 0!==s?s:[],o=Array.isArray(n)?n:[n];this.setFormConfig({emptyConfig:!1,fields:o},!0),this.getFormConfigManger().setConfig(this.formConfig)}async fetchFormLegacyConfig(){const i={requestBody:{config:{chave:this.formLegacyConfigName,tipo:"T"}}};return await this.application.callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(i))}openConfig(i){this._snkConfigurator.close(),i===u.GRID?this.openGridConfig():i===u.FORM&&this.openFormConfig()}openGridConfig(){this._grid.getColumnsState().then((i=>{this._snkGridConfig.columns=i.filter((i=>i.name)),this._snkGridConfig.selectedIndex=0,this._showPopUpGridConfig=!0}))}openFormConfig(){this.formLegacyConfigName||(this._showFormConfig=!0)}addGridLegacyConfigName(){this.gridLegacyConfigName&&this.configName&&y.addGridLegacyConfig(this.configName,this.gridLegacyConfigName)}loadGridConfig(i){if(null==this.gridConfig&&!this._gridConfigAlreadyLoaded||i)return this._gridConfigAlreadyLoaded=!0,new Promise(((i,t)=>{y.loadGridConfig(this.configName,this._resourceID).then((t=>{this.setGridConfig(t),i()})).catch((i=>{t(i)}))}))}getFormConfigManger(){return null==this._formConfigManager&&(this._formConfigManager=new T(this.configName,this._resourceID)),this._formConfigManager}async loadFormConfig(){const i=this.getFormConfigManger();i.setConfig(this.formConfig),null!=this.formConfig||this._formConfigAlreadyLoaded||(this._formConfigAlreadyLoaded=!0,this.setFormConfig(await i.loadConfig()))}async componentWillRender(){this._resourceID=await this.application.getResourceID(),this._taskbarProcessor.process(this.getTaskBarId(),this.taskbarManager,this.dataState,this.getTaskBarDisabledButtons()),void 0!==this.configName&&(null!=this.gridConfig||this._gridConfigAlreadyLoaded||(await this.addGridLegacyConfigName(),this.loadGridConfig(),this.loadFormConfig()))}componentWillLoad(){this.processMetadata(),this.onModeChange(),this.configDatasource()}configDatasource(){this._multiSelectionListDataSource.setApplication(this.application),this._multiSelectionListDataSource.setDataUnit(this.dataUnit)}getTaskBarId(){var i,t,s;return(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?"snkSimpleCrudTaskbar.finish_edition":(null===(t=this.dataState)||void 0===t?void 0:t.selectionInfo)&&!this.dataState.selectionInfo.isAllRecords()&&(null===(s=this.dataState.selectionInfo.records)||void 0===s?void 0:s.length)>0?this._currentViewMode===u.GRID?"snkSimpleCrudTaskbar.grid_selected":"snkSimpleCrudTaskbar.form_selected":this._currentViewMode===u.GRID?"snkSimpleCrudTaskbar.grid_regular":"snkSimpleCrudTaskbar.form_regular"}initInMemoryDataUnit(){this._inMemoryLoader=new p(this._metadata),this.dataUnit=this._inMemoryLoader.dataUnit,this.dataUnitReady.emit(this.dataUnit)}setMetadata(i){return this._inMemoryLoader?this._inMemoryLoader.metadata=i:this.dataUnit&&(this.dataUnit.metadata=i),Promise.resolve()}setRecords(i){return this._inMemoryLoader?this._inMemoryLoader.records=i:this.dataUnit&&(this.dataUnit.records=i),Promise.resolve()}getRecords(){return Promise.resolve(this.dataUnit.records)}async openConfigurator(){var i;null===(i=this._snkConfigurator)||void 0===i||i.open()}async closeConfigurator(){var i;null===(i=this._snkConfigurator)||void 0===i||i.close()}processMetadata(){const i=this._element.querySelectorAll("snk-field-metadata"),t=[],s={fields:[],emptyConfig:!1};i.forEach((i=>{const e={name:i.getAttribute("name")||i.getAttribute("label"),label:i.getAttribute("label"),dataType:h[i.getAttribute("dataType")]||h.TEXT,userInterface:r[i.getAttribute("userInterface")]||r.SHORTTEXT,readOnly:"true"==i.getAttribute("readOnly"),required:"true"==i.getAttribute("required"),tab:i.getAttribute("tab")||void 0,visible:"false"!=i.getAttribute("visible")};s.fields.push({name:e.name,tab:e.tab,visible:e.visible}),t.push(e)})),t.length>0&&(this.formConfig||(this.formConfig=s),this._metadata={name:"SimpleCrud",label:"SimpleCrud",fields:t})}onDataStateChange(i){this.dataState=Object.assign({},i.detail)}getTaskBarDisabledButtons(){var i,t,s,e;const n=[];return(null===(i=this.dataState)||void 0===i?void 0:i.hasNext)||n.push(g.NEXT),(null===(t=this.dataState)||void 0===t?void 0:t.hasPrevious)||n.push(g.PREVIOUS),(null===(e=null===(s=this.dataState)||void 0===s?void 0:s.selectionInfo)||void 0===e?void 0:e.isEmpty())&&n.push(g.FORM_MODE),n}handleCancelEdit(){var i;(null===(i=this.dataState)||void 0===i?void 0:i.recordsIsEmpty)&&(this.goToView(u.GRID),this.dataUnit.clearSelection())}handleConfiguratorEvent(i,t){i.stopImmediatePropagation(),"SAVE"!==t?this.configuratorCancel.emit():this.configuratorSave.emit()}getColumnSearch(i,t){return null!=this._columnSearch||(this._moreOptions=i,this._columnSearch=k(t,(({argument:i})=>new Promise((t=>{this._grid.filterColumns(i).then((i=>{t(i.filter((i=>!i.hidden)).map((i=>({label:i.label,value:i.name}))))}))}))),(t=>{var s;null!=t&&(this._grid.locateColumn(t.value),null===(s=i.hideActions)||void 0===s||s.call(i))}))),this._columnSearch}onSelectField(i,t){null!=i&&(this._fieldToGetFocus=i.value,t.hideActions())}getFieldSearch(i,t){return null!=this._fieldSearch||(this._moreOptions=i,i.addEventListener("ezPopoverOpen",(()=>this.findField())),this._fieldSearch=k(t,(({argument:i})=>this.fieldsOptionLoader(i)),(t=>this.onSelectField(t,i)))),this._fieldSearch}getFormFields(){var i,t;return null!==(t=null===(i=this.formConfig)||void 0===i?void 0:i.fields)&&void 0!==t?t:this._formFields}handleFormSetFields(i){a.equals(this._formFields,i)||(this._formFields=null!=i?i:[])}fieldsOptionLoader(i){const t=null==i?void 0:i.toLowerCase(),s=this.getFormFields().map((i=>{var t;return null===(t=this.dataUnit)||void 0===t?void 0:t.getField(i.name)})).filter((i=>{var s,e;return(null===(s=i.name)||void 0===s?void 0:s.toLowerCase().includes(t))||(null===(e=i.label)||void 0===e?void 0:e.toLowerCase().includes(t))})).map((i=>({value:i.name,label:i.label})));return Promise.resolve(s)}getActionsList(){var i,t;const s=[{value:n.generateUUID(),label:null!==(t=null===(i=this.messagesBuilder)||void 0===i?void 0:i.getMessage("snkSimpleCrud.findColumn",void 0))&&void 0!==t?t:"Buscar",disableCloseOnSelect:!0,eagerInitialize:!0,itemBuilder:(i,t)=>this._currentViewMode===u.GRID?this.getColumnSearch(i,t):this.getFieldSearch(i,t)}];if(null!=this.taskbarManager&&null!=this.taskbarManager.getMoreOptions){const i=this.getTopTaskBarId();return s.concat(this.taskbarManager.getMoreOptions(i,this.configName,this.dataState,this.actionsList))}return s.concat(this.actionsList)}getTopTaskBarId(){var i;return(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?`snkGridTopTaskbar.finish_edition${C.PRIMARY}`:`snkGridTopTaskbar.regular${C.PRIMARY}`}async keyDownListener(i){i.ctrlKey&&null!=i.key&&"F"===i.key.toUpperCase()&&null!=this._element&&(l.isHiddenElement(this._element)||(d.closeAll(),this._currentViewMode===u.GRID?await this.findColumn():await this.findField(),i.preventDefault()))}async findField(){await this.openSeach(this._fieldSearch)}async findColumn(){await this.openSeach(this._columnSearch)}async openSeach(i){await b(this._moreOptions,i)}clearFieldToFocusHandler(){this._fieldToGetFocus=void 0}connectedCallback(){window.addEventListener("keydown",this._keyDownHandler,{capture:!0})}disconnectedCallback(){window.removeEventListener("keydown",this._keyDownHandler)}gridConfigChangeHandler(i){y.saveGridConfig(i.detail,this.configName,this._resourceID),i.stopPropagation()}modalConfigChangeHandler(i){const t=i.detail;this._grid.setColumnsState(t.columns).then((()=>{this.setGridConfig(t),this.closeGridConfig()})),i.stopPropagation()}setGridConfig(i){this.gridConfig=i,v.assertDefaultSorting(this.gridConfig,this.dataUnit)}setFormConfig(i,t){this.formConfig&&!t||(this.formConfig=i)}closeGridConfig(){this._showPopUpGridConfig=!1}closeFormConfig(){this._showFormConfig=!1}handleShowFormConfig(){return this._showFormConfig&&!this.formLegacyConfigName}render(){var i,t,e;if(null!=this.dataUnit)return s("snk-data-unit",{class:"simple-crud__container",dataUnit:this.dataUnit,useCancelConfirm:this.useCancelConfirm,onDataStateChange:i=>this.onDataStateChange(i),onCancelEdition:this.handleCancelEdit.bind(this),onInsertionMode:()=>this.goToView(u.FORM),onDataUnitReady:i=>this.dataUnitReady.emit(i.detail),ignoreSaveMessage:this._currentViewMode===u.GRID,onMessagesBuilderUpdated:i=>this.messagesBuilder=i.detail},s("header",null,s("slot",{name:"snkSimpleCrudHeader"})),s("section",{class:"ez-box ez-box--shadow simple-crud__container-section"},s("snk-taskbar",{class:"ez-box ez-box--shadow ez-padding--medium",dataUnit:this.dataUnit,primaryButton:(null===(i=this.dataState)||void 0===i?void 0:i.isDirty)?"SAVE":"INSERT","data-element-id":"grid_left",messagesBuilder:this.messagesBuilder,buttons:this._taskbarProcessor.buttons,actionsList:this.getActionsList(),disabledButtons:this._taskbarProcessor.disabledButtons,customButtons:this._taskbarProcessor.customButtons,slot:"leftButtons",presentationMode:C.SECONDARY},s("slot",{name:"TASKBAR_CUSTOM_ELEMENTS"})),s("ez-view-stack",{ref:i=>this._viewStack=i,"data-element-id":"simple-crud"},s("stack-item",null,s("ez-grid",{class:"ez-margin-bottom--large",ref:i=>this._grid=i,dataUnit:this.dataUnit,config:this.gridConfig,"no-header":!0,multipleSelection:this.multipleSelection,onEzDoubleClick:()=>this.goToView(u.FORM),onConfigChange:i=>this.gridConfigChangeHandler(i),columnfilterDataSource:this.dataUnit.name&&this.dataUnit.name.includes(p.IN_MEMORY_DATA_UNIT_NAME)?void 0:this._multiSelectionListDataSource,useEnterLikeTab:this.useEnterLikeTab},s("div",{slot:"footer"},s("slot",{name:"snkSimpleCrudFooter"})))),s("stack-item",null,s("ez-form",{class:"ez-margin-top--large "+(this.handleShowFormConfig()?"simple-crud__form--hidden":""),dataUnit:this.dataUnit,config:null===(t=this._formConfigManager)||void 0===t?void 0:t.getConfig(null===(e=this.dataState)||void 0===e?void 0:e.insertionMode,this.dataUnit,this.ignoreReadOnlyFormFields),fieldToFocus:this._fieldToGetFocus,onEzFormSetFields:i=>this.handleFormSetFields(i.detail),onEzFormRequestClearFieldToFocus:this.clearFieldToFocusHandler.bind(this)}),this.handleShowFormConfig()&&s("snk-form-config",{messagesBuilder:this.messagesBuilder,dataUnit:this.dataUnit,configManager:this._formConfigManager,onConfigClose:()=>this.closeFormConfig()})),this.messagesBuilder&&s("snk-configurator",{ref:i=>this._snkConfigurator=i,viewMode:this._currentViewMode,messagesBuilder:this.messagesBuilder,onConfigSelected:i=>this.goToView(i.detail),onOpenConfig:i=>this.openConfig(i.detail),showActionButtons:this.showConfiguratorButtons,onSave:i=>this.handleConfiguratorEvent(i,"SAVE"),onCancel:i=>this.handleConfiguratorEvent(i,"CANCEL"),resourceID:this._resourceID,customContainerId:this._customContainerId})),s("div",{id:`${this._customContainerId}`},s("slot",{name:"SnkConfigContainerSlot"}))),s("ez-modal",{modalSize:"small",closeEsc:!1,closeOutsideClick:!1,opened:this._showPopUpGridConfig,onEzCloseModal:()=>this.closeGridConfig()},s("snk-grid-config",{ref:i=>this._snkGridConfig=i,config:this.gridConfig,"data-element-id":this._element.getAttribute(c.DATA_ELEMENT_ID_ATTRIBUTE_NAME),selectedIndex:0,configName:this.configName,onConfigChange:i=>this.modalConfigChangeHandler(i),onConfigCancel:()=>this.closeGridConfig(),resourceID:this._resourceID})))}get _element(){return e(this)}static get watchers(){return{mode:["onModeChange"],dataState:["observeDataState"],formLegacyConfigName:["observeFormLegacy"],gridLegacyConfigName:["observeGridLegacy"]}}};_.style=".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";export{_ as snk_simple_crud}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,H as s,g as r}from"./p-d2d301a6.js";import{FloatingManager as n,DateUtils as l,ElementIDUtils as o}from"@sankhyalabs/core";import{F as h}from"./p-ff1990ad.js";import{F as a}from"./p-fa80e546.js";const c=class{constructor(e){t(this,e),this.visibleChanged=i(this,"visibleChanged",7),this.filterChange=i(this,"filterChange",3),this.innerClickCheck=(t,i)=>i.id!=n.MODAL_ELEMENT_ID||(this.detailIsVisible=!1,!1),this.detailIsVisible=void 0,this.config=void 0,this.getMessage=void 0}observeDetailIsVisible(t){this.visibleChanged.emit(t)}async showUp(t=!1){return new Promise((i=>{this._filterItemElement.scrollIntoView({behavior:"auto",block:"nearest",inline:"nearest"}),t&&(this._closeCallback=i,window.requestAnimationFrame((()=>{this._floatingID=n.float(this._popover,this._popoverContainer,this.getFloatOptions()),this._popover.show(),this.detailIsVisible=!0})))}))}updatePosition(){null!=this._floatingID&&n.updateFloatPosition(this._popover,this._popoverContainer,this.getFloatOptions())}getFloatOptions(){return{autoClose:!0,innerClickTest:this.innerClickCheck,backClickListener:()=>this.onDetailCloseCallback(),left:this.getScrollOffsetLeft(),top:this.getScrollOffsetTop(),useOverlay:!0,overlayClassName:"ez-scrim ez-scrim--light",isFixed:!0}}getScrollOffsetLeft(){const t=getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");return`calc(${this._filterItemElement.getBoundingClientRect().x}px + ${t})`}getScrollOffsetTop(){const t=this._filterItemElement.getBoundingClientRect();return t.y+t.height+"px"}controlScrollPage(){window.removeEventListener("scroll",this.updatePosition.bind(this)),window.addEventListener("scroll",this.updatePosition.bind(this))}getConfigChanges(){var t;const i=this.config;(null===(t=i.groupedItems)||void 0===t?void 0:t.length)&&(i.visible=!1,i.groupedItems=i.groupedItems.map((t=>Object.assign(Object.assign({},t),{visible:!1}))));const e=i.type===h.MULTI_LIST&&Array.isArray(i.value)?i.value.map((t=>Object.assign(Object.assign({},t),{check:!1}))):void 0;return Object.assign(Object.assign({},i),{value:e})}async hideDetail(){this.detailIsVisible&&null!=this._floatingID&&n.close(this._floatingID)}onDetailCloseCallback(){this._floatingID=void 0,this.detailIsVisible=!1,this._closeCallback&&(this._closeCallback(),this._closeCallback=void 0)}clickListener(t){if([this._chipElement,this._leftIconElement,this._rightIconElement].includes(t.target)){if(t.target===this._rightIconElement&&this.canClearFilter()){const t=this.getConfigChanges();this.filterChange.emit(t)}else this.detailIsVisible?this.hideDetail():this.showUp(!0);t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation()}}mouseDownListener(t){this.detailIsVisible&&[this._chipElement,this._leftIconElement,this._rightIconElement].includes(t.target)&&(t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation())}getLabel(t=!1){var i,e;const{type:s,value:r,label:n,props:o,groupedItems:c=[]}=this.config;if(r||c.length){if(s===h.BINARY_SELECT){const[i,e]=o.options,s=this.getMessage("snkFilterBar.binarySelectTooltip");if(i.name===r)return t?`${s} ${String(i.label).toLowerCase()}`:i.label;if(e.name===r)return t?`${s} ${String(e.label).toLowerCase()}`:e.label}if(s===h.MULTI_SELECT)return`${n}: ${o.options.find((t=>t.value===r)).label}`;if(s===h.PERIOD){let{end:i,start:e}=r;"string"==typeof i&&(i=new Date(i),i.setMinutes(i.getMinutes()+i.getTimezoneOffset())),"string"==typeof e&&(e=new Date(e),e.setMinutes(e.getMinutes()+e.getTimezoneOffset()));const s=new Intl.DateTimeFormat("pt-BR");if(i&&e){const s=e.getFullYear()===i.getFullYear(),r=Object.assign({day:"2-digit",month:"2-digit"},(!s||t)&&{year:"2-digit"}),o=l.formatDate(e,r),h=l.formatDate(i,r);return t?this.getMessage("snkFilterBar.fullPeriodTooltip",{LABEL:n,START_LABEL:o,END_LABEL:h}):`${n}: ${o} → ${h}`}return e?`${n}: ${this.getMessage("snkFilterBar.onlyStartToltip")} ${s.format(e)}`:i?`${n}: ${this.getMessage("snkFilterBar.onlyEndToltip")} ${s.format(i)}`:n}if(s===h.SEARCH)return`${n}: ${r.value} - ${r.label}`;if(s===h.PERSONALIZED){const t=this.calculateActiveCount(c);return t<=0?n:`${n}: ${this.getMessage("snkFilterBar.personalizedCount",{activeCount:t})}`}if(s===h.MULTI_LIST){const e=(null!==(i=r.elements)&&void 0!==i?i:r).filter((t=>null==t?void 0:t.check));return this.getLabelFromCheckedOptions(e,n,t)}if(s===h.CHECK_BOX_LIST){const i=Object.entries(null!=r?r:{}).filter((([t,i])=>!0===i)).map((([t,i])=>t)),s=(null!==(e=o.options)&&void 0!==e?e:[]).filter((t=>i.includes(t.name)));return this.getLabelFromCheckedOptions(s,n,t)}if(s===h.NUMBER&&o.variation===a.INTERVAL){const{start:t,end:i}=r;if(t&&i)return this.getMessage("snkFilterBar.fullIntervalTooltip",{LABEL:n,START_LABEL:t,END_LABEL:i});if(t)return`${n}: ${this.getMessage("snkFilterBar.onlyStartToltip")} ${Number(t)}`;if(i)return`${n}: ${this.getMessage("snkFilterBar.onlyEndToltip")} ${Number(i)}`}return`${n}: ${r}`}return n}getLabelFromCheckedOptions(t,i,e){const s=t.length;return 0===s?`${i}`:s>1?e?`${i}: ${t.map((t=>t.label)).join(",")}`:`${i}: ${s} ${this.getMessage("snkFilterBar.multiListToltip")}`:`${i}: ${t[0].label}`}calculateActiveCount(t){return t.reduce(((t,i)=>i.visible?t+1:t),0)}componentDidLoad(){this._filterItemElement&&(o.addIDInfo(this._filterItemElement),this._idSnkFilterDetail=`filterDetail_${this.config.id}`),this.controlScrollPage()}componentDidRender(){null==this._floatingID&&this._popover&&this._popover.remove()}filterChangeListener(){this.hideDetail()}canClearFilter(){const{value:t,groupedItems:i=[]}=this.config;return null!=t&&this.config.type===h.MULTI_LIST?t.some((t=>t.check)):void 0!==t||i.some((t=>t.visible))}getRightIconName(){return this.canClearFilter()?"close":this.detailIsVisible?"chevron-up":"chevron-down"}getLeftIconName(){switch(this.config.type){case h.PERIOD:return"calendar";case h.PERSONALIZED:return"tune"}}hasActiveElements(t){var i,e,s;return(null===(s=null===(e=null!==(i=null==t?void 0:t.elements)&&void 0!==i?i:t)||void 0===e?void 0:e.filter((t=>null==t?void 0:t.check)))||void 0===s?void 0:s.length)>0}hasActiveValue(t){return t.type!==h.MULTI_LIST&&void 0!==t.value||this.hasActiveElements(t.value)}getEnabledChip(){if(this.config.type===h.PERSONALIZED){const{groupedItems:t=[]}=this.config;return t.some((t=>t.visible))}return this.hasActiveValue(this.config)}render(){const t=this.getLeftIconName();return e(s,null,e("ez-chip",{id:this.config.id,ref:t=>this._chipElement=t,label:this.getLabel(),value:this.getEnabledChip()},t?e("ez-icon",{ref:t=>this._leftIconElement=t,iconName:t,class:"ez-padding-right--small",slot:"leftIcon"}):void 0,e("ez-icon",{ref:t=>this._rightIconElement=t,iconName:this.getRightIconName(),class:"ez-padding-left--small",slot:"rightIcon",id:"removeFilter"})),e("section",{class:"ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container",ref:t=>this._popoverContainer=t},e("snk-filter-detail",{config:this.config,getMessage:this.getMessage,class:"sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16",ref:t=>this._popover=t,key:this.config.id,"data-element-id":this._idSnkFilterDetail})))}get _filterItemElement(){return r(this)}static get watchers(){return{detailIsVisible:["observeDetailIsVisible"]}}};export{c as snk_filter_item}
@@ -1,26 +0,0 @@
1
- import{d as e,D as s}from"./p-be75153c.js";import{ObjectUtils as t}from"@sankhyalabs/core";class r{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchResource",e.gql`query($name: String!) {
2
- $queryAlias$: fetchResource(name: $name){
3
- resource
4
- }
5
- }`),this.templateByQuery.set("saveResource",e.gql`mutation($resource: InputResource!) {
6
- $queryAlias$: saveResource(resource: $resource){
7
- name
8
- resource
9
- }
10
- }`)}loadResource(e){if(r._loadingResource.has(e))return r._loadingResource.get(e);const t=new Promise(((t,n)=>{s.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchResource")}).then((s=>{t(null==s?void 0:s.resource),r._loadingResource.delete(e)})).catch((s=>{n(s),r._loadingResource.delete(e)}))}));return r._loadingResource.set(e,t),t}saveResource(e,t){return new Promise(((r,n)=>{s.get().callGraphQL({values:{resource:{name:t,resource:JSON.stringify(e)}},query:this.templateByQuery.get("saveResource")}).then((e=>{r(e)})).catch((e=>{n(e)}))}))}}r._loadingResource=new Map;class n extends r{constructor(){super(),this.queryConfig=new Map,this.buildTemplatesConfig()}buildTemplatesConfig(){this.queryConfig.set("fetchUserAvailableConfigs",e.gql`query($name: String!) {
11
- $queryAlias$: fetchUserAvailableConfigs(name: $name){
12
- name
13
- origin
14
- key
15
- }
16
- }`),this.queryConfig.set("fetchLegacyConfig",e.gql`query($name: String!) {
17
- $queryAlias$: fetchLegacyConfig(name: $name){
18
- name
19
- resource
20
- }
21
- }`),this.queryConfig.set("fetchDefaultConfig",e.gql`query($name: String!) {
22
- $queryAlias$: fetchDefaultConfig(name: $name){
23
- name
24
- resource
25
- }
26
- }`)}loadFormConfig(e,s){return new Promise(((t,r)=>{Promise.all([this.loadResource(this.getPath(s,e)),this.loadResource(this.getPath(`FormCardState:${s}`,e,"form-card")),this.loadResource(this.getPath(s,e,"summary")),this.loadResource(this.getPath(s,e,"defaultValues"))]).then((([e,s,r,n])=>{let a;if(null!=e){a=Object.assign(Object.assign({},JSON.parse(e)),{emptyConfig:!1});const{tabs:s,fields:t}=a;if(s){const e=new Map(s.map((e=>[e.label,e])));null==t||t.forEach((s=>{var t;return s.tab=(null===(t=e.get(this.getTabName(s.tab)))||void 0===t?void 0:t.label)||e.get(this.getTabName(s.tab))}))}a.fields=null==t?void 0:t.map((e=>{if("readonly"in e){const s=!0===e.readonly;delete e.readonly,e.readOnly=s}return e}))}null!=s&&(null==a&&(a={emptyConfig:!0,fields:[]}),a.cardsState=new Map(JSON.parse(s))),null!=r&&(null==a&&(a={emptyConfig:!0,fields:[]}),a.summary=new Map(Object.entries(JSON.parse(r)))),null!=n&&(null==a&&(a={emptyConfig:!0,fields:[]}),a.defaultVars=new Map(Object.entries(JSON.parse(n)))),t(a)})).catch((e=>{r(e)}))}))}getTabName(e){return"object"==typeof e?e.label:e}saveCardState(e,s,t){const r=this.getPath(`FormCardState:${t}`,s,"form-card");return new Promise(((s,t)=>{this.saveResource(Array.from(e.entries()),r).then((e=>{s(new Map(JSON.parse(e.resource)))})).catch((e=>{t(e)}))}))}saveConfig(e,s,t){delete e.cardsState,delete e.defaultVars,delete e.summary;const r=this.getPath(t,s);return new Promise(((s,t)=>{this.saveResource(e,r).then((e=>{s(JSON.parse(e.resource))})).catch((e=>{t(e)}))}))}fetchUserAvailableConfigs(e,t){const r=this.getPath(t,e);return new Promise(((e,t)=>{s.get().callGraphQL({values:{name:r},query:this.queryConfig.get("fetchUserAvailableConfigs")}).then((s=>{e(s)})).catch((e=>{t(e)}))}))}fetchLegacyConfig(e,r){const n=this.getPath(r,e);return new Promise(((e,r)=>{s.get().callGraphQL({values:{name:n},query:this.queryConfig.get("fetchLegacyConfig")}).then((s=>{e(t.stringToObject((null==s?void 0:s.resource)||""))})).catch((e=>{r(e)}))}))}fetchDefaultConfig(e,r){const n=this.getPath(r,e);return new Promise(((e,r)=>{s.get().callGraphQL({values:{name:n},query:this.queryConfig.get("fetchDefaultConfig")}).then((s=>{e(t.stringToObject((null==s?void 0:s.resource)||""))})).catch((e=>{r(e)}))}))}getPath(e,s,t="form"){return s?`cfg://${t}/${e}/${s}`:`cfg://${t}/${e}`}}var a;!function(e){e.USER="USER",e.DEFAULT="DEFAULT",e.SHARED="SHARED"}(a||(a={}));export{n as F,r as R,a as U}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,F as s,H as l,g as r}from"./p-d2d301a6.js";import{ApplicationUtils as n}from"@sankhyalabs/ezui/dist/collection/utils";import{F as a}from"./p-ff1990ad.js";import{ElementIDUtils as o,ObjectUtils as h}from"@sankhyalabs/core";import{E as c}from"./p-1a68fb59.js";import{P as d}from"./p-057fad05.js";import"./p-933c0c0b.js";const u=class{constructor(e){t(this,e),this.filterChange=i(this,"filterChange",7),this.config=void 0,this.getMessage=void 0}async show(){var t,i;null===(i=null===(t=this._editor)||void 0===t?void 0:t.show)||void 0===i||i.call(t)}observeConfig(t){var i,e;this._editor&&(this._editor.config=t),null===(e=null===(i=this._editor)||void 0===i?void 0:i.reloadList)||void 0===e||e.call(i)}componentDidLoad(){if(this._element){o.addIDInfo(this._element);const t=this._element.getAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME);this._idContentEditor=`${t}_${this.config.id}`}}changeConfig(t){this.filterChange.emit(t)}getContentEditor(){switch(this.config.type){case a.BINARY_SELECT:return{tag:"snk-filter-binary-select"};case a.MULTI_SELECT:return{tag:"snk-filter-multi-select"};case a.PERIOD:return{tag:"snk-filter-period"};case a.SEARCH:return{tag:"snk-filter-search"};case a.NUMBER:return{tag:"snk-filter-number"};case a.PERSONALIZED:return{tag:"snk-personalized-filter-editor",props:{presentationMode:c.CHIP,onValueChanged:t=>this.handleValueChanged(t)}};case a.CHECK_BOX_LIST:return{tag:"snk-filter-checkbox-list",props:{onValueChanged:t=>this.config=Object.assign(Object.assign({},this.config),{value:t.detail})}};case a.MULTI_LIST:return{tag:"snk-entity-list",props:{onValueChanged:t=>this.config=Object.assign(Object.assign({},this.config),{value:t.detail})}}}return{tag:"snk-filter-text"}}handleValueChanged({detail:t}){const i=(null==t?void 0:t.items)||this.config.groupedItems;this.config=Object.assign(Object.assign({},this.config),{groupedItems:i,visible:(i||[]).filter((t=>t.visible)).length>0})}removeItem(){const t=this.config.type===a.MULTI_LIST&&Array.isArray(this.config.value)?this.config.value.map((t=>Object.assign(Object.assign({},t),{check:!1}))):void 0,i=Object.assign(Object.assign({},this.config),{visible:!1,fixed:!1,value:t});null!=i.groupedItems&&(i.groupedItems=i.groupedItems.map((t=>Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})))),this.changeConfig(i)}removeItemFromGroup(t){return Object.assign(Object.assign({},t),{visible:!1,fixed:!1,value:void 0})}getPopUpHeaderButtons(){return e(s,null,!this.config.removalBlocked&&this.buildIcon(this.getMessage("snkFilterBar.removeFilter"),"delete",(()=>this.removeItem())),!this.config.hardFixed&&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})))))}buildIcon(t,i,s){return e("button",{onClick:()=>s(),class:"sc-snk-filter-bar snk-filter-item__editor-header-button",ref:i=>i&&this.buildIdButton(i,t)},e("ez-icon",Object.assign({title:t,iconName:i},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:`${o.getInternalIDInfo(`_${t}`)}`})))}buildIdButton(t,i){if(!t)return;const e={id:i};t.removeAttribute(o.DATA_ELEMENT_ID_ATTRIBUTE_NAME),o.addIDInfoIfNotExists(t,"button",e)}clearBinarySelectValues(){var t;const i=this._editor||{};null===(t=i.resetValues)||void 0===t||t.call(i),this.config=h.copy(this.originalConfig),this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}apply(){if(!d.validateVariableValues(this.config,this._editor.value))return n.alert(this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.title"),this.getMessage("snkFilterBar.filterModal.validations.notFullFilled.message"));const t=void 0!==this._editor.value?this._editor.value:this.config.value;this.changeConfig(Object.assign(Object.assign({},this.config),{visible:this.isVisible(),value:t}))}isVisible(){return!(this.config.groupedItems&&this.config.groupedItems.length>0)||this.config.groupedItems.filter((t=>t.visible)).length>0}clear(){var t;if(this.config.type!==a.BINARY_SELECT){if(a.MULTI_LIST===this.config.type){const i=h.copy(this.config);return null===(t=i.value)||void 0===t||t.forEach((t=>!!t&&(t.check=!1))),void(this.config=h.copy(i))}this.changeConfig(Object.assign(Object.assign({},this.config),{value:void 0}))}else this.clearBinarySelectValues()}filterCanBeCleared(){return this.config.type!==a.PERSONALIZED}onKeyDonwListener(t){"Enter"===t.key&&this._applyButton.setFocus().then((()=>this.apply()))}buildRightSlot(t){return e("ez-icon",{iconName:"delete",onClick:()=>this.removeValueFromConfig(t)})}removeValueFromConfig(t){var i,e;if(this.config){const s=h.copy(this.config),l=null===(i=s.value)||void 0===i?void 0:i.findIndex((i=>(null==i?void 0:i.id)===t.id));null===(e=s.value)||void 0===e||e.splice(l,1),this.config=h.copy(s)}}componentWillLoad(){this.originalConfig=h.copy(this.config)}render(){const{tag:t,props:i}=this.getContentEditor();return e(l,null,e("div",{class:"col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center"},e("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()),e(t,Object.assign({maxHeightList:"240px",ref:t=>this._editor=t,value:this.config.value,config:this.config,onKeyDown:t=>this.onKeyDonwListener(t),"data-element-id":this._idContentEditor,getMessage:this.getMessage,rightListSlotBuilder:t=>this.buildRightSlot(t)},i)),e("hr",{class:"sc-snk-filter-bar snk-filter__popover-rule"}),e("div",{class:"ez-col ez-col--sd-12 ez-align--right"},this.filterCanBeCleared()&&e("ez-button",{label:this.getMessage("snkFilterBar.cleanFilter"),onClick:()=>this.clear(),size:"small"}),e("ez-button",{ref:t=>this._applyButton=t,label:this.getMessage("snkFilterBar.applyFilter"),onClick:()=>this.apply(),size:"small",class:"ez-button--primary ez-padding-left--medium"})))}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};export{u as snk_filter_detail}